2 * Copyright (C) 2011-2012 Red Hat Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 #include <rpc/types.h>
28 #define WRAP_INT_PROTO_MAGIC 0x57524150 /* 'W' 'R' 'A' 'P' */
29 #define WRAP_INT_PROTOCOL 1
30 #define WRAP_INT_PROTO_TYPE_REQUEST 1
31 #define WRAP_INT_PROTO_TYPE_REPLY 2
32 #define WRAP_INT_PROTO_TYPE_ERROR 3
34 struct wrap_int_message_header {
35 uint32_t magic; /* WRAP_INT_PROTO_MAGIC */
36 uint32_t protocol; /* protocol version */
37 uint32_t serial; /* message serial number */
38 char *proc; /* procedure name */
39 uint32_t type; /* WRAP_INT_PROTO_TYPE_* */
42 struct wrap_int_message_error {
43 char *error_message; /* error message */
44 char *error_errno; /* errno as string, eg. "EINVAL", or empty */
45 char *error_func; /* function where error occurred */
48 extern bool_t wrap_int_xdr_message_header (XDR *, struct wrap_int_message_header *);
49 extern bool_t wrap_int_xdr_message_error (XDR *, struct wrap_int_message_error *);
51 #endif /* WRAPPI_INTERNAL_H_ */