check_type: fix incorrect documentation.
[ccan] / ccan / nfs / libnfs-raw-portmap.c
1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5
6 #include "rpc/portmap.h"
7
8 bool_t
9 xdr_mapping (XDR *xdrs, mapping *objp)
10 {
11         register int32_t *buf;
12
13
14         if (xdrs->x_op == XDR_ENCODE) {
15                 buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
16                 if (buf == NULL) {
17                          if (!xdr_u_int (xdrs, &objp->prog))
18                                  return FALSE;
19                          if (!xdr_u_int (xdrs, &objp->vers))
20                                  return FALSE;
21                          if (!xdr_u_int (xdrs, &objp->prot))
22                                  return FALSE;
23                          if (!xdr_u_int (xdrs, &objp->port))
24                                  return FALSE;
25                 } else {
26                         IXDR_PUT_U_LONG(buf, objp->prog);
27                         IXDR_PUT_U_LONG(buf, objp->vers);
28                         IXDR_PUT_U_LONG(buf, objp->prot);
29                         IXDR_PUT_U_LONG(buf, objp->port);
30                 }
31                 return TRUE;
32         } else if (xdrs->x_op == XDR_DECODE) {
33                 buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
34                 if (buf == NULL) {
35                          if (!xdr_u_int (xdrs, &objp->prog))
36                                  return FALSE;
37                          if (!xdr_u_int (xdrs, &objp->vers))
38                                  return FALSE;
39                          if (!xdr_u_int (xdrs, &objp->prot))
40                                  return FALSE;
41                          if (!xdr_u_int (xdrs, &objp->port))
42                                  return FALSE;
43                 } else {
44                         objp->prog = IXDR_GET_U_LONG(buf);
45                         objp->vers = IXDR_GET_U_LONG(buf);
46                         objp->prot = IXDR_GET_U_LONG(buf);
47                         objp->port = IXDR_GET_U_LONG(buf);
48                 }
49          return TRUE;
50         }
51
52          if (!xdr_u_int (xdrs, &objp->prog))
53                  return FALSE;
54          if (!xdr_u_int (xdrs, &objp->vers))
55                  return FALSE;
56          if (!xdr_u_int (xdrs, &objp->prot))
57                  return FALSE;
58          if (!xdr_u_int (xdrs, &objp->port))
59                  return FALSE;
60         return TRUE;
61 }
62
63 bool_t
64 xdr_call_args (XDR *xdrs, call_args *objp)
65 {
66         register int32_t *buf;
67
68
69         if (xdrs->x_op == XDR_ENCODE) {
70                 buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
71                 if (buf == NULL) {
72                          if (!xdr_u_int (xdrs, &objp->prog))
73                                  return FALSE;
74                          if (!xdr_u_int (xdrs, &objp->vers))
75                                  return FALSE;
76                          if (!xdr_u_int (xdrs, &objp->proc))
77                                  return FALSE;
78
79                 } else {
80                 IXDR_PUT_U_LONG(buf, objp->prog);
81                 IXDR_PUT_U_LONG(buf, objp->vers);
82                 IXDR_PUT_U_LONG(buf, objp->proc);
83                 }
84                  if (!xdr_bytes (xdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
85                          return FALSE;
86                 return TRUE;
87         } else if (xdrs->x_op == XDR_DECODE) {
88                 buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
89                 if (buf == NULL) {
90                          if (!xdr_u_int (xdrs, &objp->prog))
91                                  return FALSE;
92                          if (!xdr_u_int (xdrs, &objp->vers))
93                                  return FALSE;
94                          if (!xdr_u_int (xdrs, &objp->proc))
95                                  return FALSE;
96
97                 } else {
98                 objp->prog = IXDR_GET_U_LONG(buf);
99                 objp->vers = IXDR_GET_U_LONG(buf);
100                 objp->proc = IXDR_GET_U_LONG(buf);
101                 }
102                  if (!xdr_bytes (xdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
103                          return FALSE;
104          return TRUE;
105         }
106
107          if (!xdr_u_int (xdrs, &objp->prog))
108                  return FALSE;
109          if (!xdr_u_int (xdrs, &objp->vers))
110                  return FALSE;
111          if (!xdr_u_int (xdrs, &objp->proc))
112                  return FALSE;
113          if (!xdr_bytes (xdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
114                  return FALSE;
115         return TRUE;
116 }