diff options
author | Anand V. Avati <avati@blackhole.gluster.com> | 2010-08-12 05:05:01 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-12 03:55:12 -0700 |
commit | b69a4f1e31726260a07f883cefac28ed29cc6a12 (patch) | |
tree | 864d706e8f4d02d6b3296665f74e110020a03d4c /rpc/xdr/src/portmap-xdr.c | |
parent | f862864468c9d11d646bdcc347a1121fe75a1917 (diff) |
portmap functionality in glusterd
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1314 (portmapper functionality)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1314
Diffstat (limited to 'rpc/xdr/src/portmap-xdr.c')
-rw-r--r-- | rpc/xdr/src/portmap-xdr.c | 192 |
1 files changed, 192 insertions, 0 deletions
diff --git a/rpc/xdr/src/portmap-xdr.c b/rpc/xdr/src/portmap-xdr.c new file mode 100644 index 00000000000..a23eef9b314 --- /dev/null +++ b/rpc/xdr/src/portmap-xdr.c @@ -0,0 +1,192 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include "portmap-xdr.h" + +bool_t +xdr_pmap_port_by_brick_req (XDR *xdrs, pmap_port_by_brick_req *objp) +{ + if (!xdr_string (xdrs, &objp->brick, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_port_by_brick_rsp (XDR *xdrs, pmap_port_by_brick_rsp *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_int (xdrs, &objp->status)) + return FALSE; + if (!xdr_int (xdrs, &objp->port)) + return FALSE; + } else { + IXDR_PUT_LONG(buf, objp->op_ret); + IXDR_PUT_LONG(buf, objp->op_errno); + IXDR_PUT_LONG(buf, objp->status); + IXDR_PUT_LONG(buf, objp->port); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_int (xdrs, &objp->status)) + return FALSE; + if (!xdr_int (xdrs, &objp->port)) + return FALSE; + } else { + objp->op_ret = IXDR_GET_LONG(buf); + objp->op_errno = IXDR_GET_LONG(buf); + objp->status = IXDR_GET_LONG(buf); + objp->port = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_int (xdrs, &objp->status)) + return FALSE; + if (!xdr_int (xdrs, &objp->port)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_brick_by_port_req (XDR *xdrs, pmap_brick_by_port_req *objp) +{ + if (!xdr_int (xdrs, &objp->port)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_brick_by_port_rsp (XDR *xdrs, pmap_brick_by_port_rsp *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_int (xdrs, &objp->status)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->op_ret); + IXDR_PUT_LONG(buf, objp->op_errno); + IXDR_PUT_LONG(buf, objp->status); + } + if (!xdr_string (xdrs, &objp->brick, ~0)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_int (xdrs, &objp->status)) + return FALSE; + + } else { + objp->op_ret = IXDR_GET_LONG(buf); + objp->op_errno = IXDR_GET_LONG(buf); + objp->status = IXDR_GET_LONG(buf); + } + if (!xdr_string (xdrs, &objp->brick, ~0)) + return FALSE; + return TRUE; + } + + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_int (xdrs, &objp->status)) + return FALSE; + if (!xdr_string (xdrs, &objp->brick, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_signup_req (XDR *xdrs, pmap_signup_req *objp) +{ + if (!xdr_string (xdrs, &objp->brick, ~0)) + return FALSE; + if (!xdr_int (xdrs, &objp->port)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_signup_rsp (XDR *xdrs, pmap_signup_rsp *objp) +{ + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_signin_req (XDR *xdrs, pmap_signin_req *objp) +{ + if (!xdr_string (xdrs, &objp->brick, ~0)) + return FALSE; + if (!xdr_int (xdrs, &objp->port)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_signin_rsp (XDR *xdrs, pmap_signin_rsp *objp) +{ + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_signout_req (XDR *xdrs, pmap_signout_req *objp) +{ + if (!xdr_string (xdrs, &objp->brick, ~0)) + return FALSE; + if (!xdr_int (xdrs, &objp->port)) + return FALSE; + return TRUE; +} + +bool_t +xdr_pmap_signout_rsp (XDR *xdrs, pmap_signout_rsp *objp) +{ + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + return TRUE; +} |