diff options
author | Amar Tumballi <amar@gluster.com> | 2010-06-21 07:00:04 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-06-21 20:21:10 -0700 |
commit | fdd20492638fe98a62b5e6d5e82f18cf4799fd1a (patch) | |
tree | 98082d7bfdc66157f40666f2070d3a45b582327a /xlators/protocol/lib/src/glusterfs-xdr.c | |
parent | b9b8734a9496ccf5f8ed5527dc7714930a59948b (diff) |
rpc protocol
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/protocol/lib/src/glusterfs-xdr.c')
-rw-r--r-- | xlators/protocol/lib/src/glusterfs-xdr.c | 1847 |
1 files changed, 1847 insertions, 0 deletions
diff --git a/xlators/protocol/lib/src/glusterfs-xdr.c b/xlators/protocol/lib/src/glusterfs-xdr.c new file mode 100644 index 00000000000..2eccff29c6e --- /dev/null +++ b/xlators/protocol/lib/src/glusterfs-xdr.c @@ -0,0 +1,1847 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include "glusterfs-xdr.h" +#include "iatt.h" + +bool_t +xdr_gf_statfs (XDR *xdrs, gf_statfs *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->bsize)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->frsize)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->blocks)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->bfree)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->bavail)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->files)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ffree)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->favail)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->fsid)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->flag)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->namemax)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_flock (XDR *xdrs, gf_flock *objp) +{ + + if (!xdr_u_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->whence)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->start)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->len)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->pid)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_iatt (XDR *xdrs, gf_iatt *objp) +{ + register int32_t *buf; + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_u_quad_t (xdrs, &objp->ia_ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_gen)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_dev)) + return FALSE; + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_nlink)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_uid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_gid)) + return FALSE; + + } else { + IXDR_PUT_U_LONG(buf, objp->mode); + IXDR_PUT_U_LONG(buf, objp->ia_nlink); + IXDR_PUT_U_LONG(buf, objp->ia_uid); + IXDR_PUT_U_LONG(buf, objp->ia_gid); + } + if (!xdr_u_quad_t (xdrs, &objp->ia_rdev)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_size)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_blksize)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_blocks)) + return FALSE; + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->ia_atime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_atime_nsec)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_mtime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_mtime_nsec)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_ctime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_ctime_nsec)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->ia_atime); + IXDR_PUT_U_LONG(buf, objp->ia_atime_nsec); + IXDR_PUT_U_LONG(buf, objp->ia_mtime); + IXDR_PUT_U_LONG(buf, objp->ia_mtime_nsec); + IXDR_PUT_U_LONG(buf, objp->ia_ctime); + IXDR_PUT_U_LONG(buf, objp->ia_ctime_nsec); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_u_quad_t (xdrs, &objp->ia_ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_gen)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_dev)) + return FALSE; + buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_nlink)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_uid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_gid)) + return FALSE; + + } else { + objp->mode = IXDR_GET_U_LONG(buf); + objp->ia_nlink = IXDR_GET_U_LONG(buf); + objp->ia_uid = IXDR_GET_U_LONG(buf); + objp->ia_gid = IXDR_GET_U_LONG(buf); + } + if (!xdr_u_quad_t (xdrs, &objp->ia_rdev)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_size)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_blksize)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_blocks)) + return FALSE; + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->ia_atime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_atime_nsec)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_mtime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_mtime_nsec)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_ctime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_ctime_nsec)) + return FALSE; + } else { + objp->ia_atime = IXDR_GET_U_LONG(buf); + objp->ia_atime_nsec = IXDR_GET_U_LONG(buf); + objp->ia_mtime = IXDR_GET_U_LONG(buf); + objp->ia_mtime_nsec = IXDR_GET_U_LONG(buf); + objp->ia_ctime = IXDR_GET_U_LONG(buf); + objp->ia_ctime_nsec = IXDR_GET_U_LONG(buf); + } + return TRUE; + } + + if (!xdr_u_quad_t (xdrs, &objp->ia_ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_gen)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_dev)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_nlink)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_uid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_gid)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_rdev)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_size)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_blksize)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ia_blocks)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_atime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_atime_nsec)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_mtime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_mtime_nsec)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_ctime)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ia_ctime_nsec)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_stat_req (XDR *xdrs, gfs3_stat_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_stat_rsp (XDR *xdrs, gfs3_stat_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_readlink_req (XDR *xdrs, gfs3_readlink_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_readlink_rsp (XDR *xdrs, gfs3_readlink_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->buf)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_mknod_req (XDR *xdrs, gfs3_mknod_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->par)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->dev)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->bname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_mknod_rsp (XDR *xdrs, gfs3_mknod_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_mkdir_req (XDR *xdrs, gfs3_mkdir_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->par)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->bname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_mkdir_rsp (XDR *xdrs, gfs3_mkdir_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_unlink_req (XDR *xdrs, gfs3_unlink_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->par)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->bname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_unlink_rsp (XDR *xdrs, gfs3_unlink_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_rmdir_req (XDR *xdrs, gfs3_rmdir_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->par)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->bname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_rmdir_rsp (XDR *xdrs, gfs3_rmdir_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_symlink_req (XDR *xdrs, gfs3_symlink_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->par)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->bname, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->linkname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_symlink_rsp (XDR *xdrs, gfs3_symlink_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_rename_req (XDR *xdrs, gfs3_rename_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->oldpar)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->oldgen)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->newpar)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->newgen)) + return FALSE; + if (!xdr_string (xdrs, &objp->oldpath, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->oldbname, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->newpath, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->newbname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_rename_rsp (XDR *xdrs, gfs3_rename_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preoldparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postoldparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->prenewparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postnewparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_link_req (XDR *xdrs, gfs3_link_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->oldino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->oldgen)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->newpar)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->newgen)) + return FALSE; + if (!xdr_string (xdrs, &objp->oldpath, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->newpath, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->newbname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_link_rsp (XDR *xdrs, gfs3_link_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_truncate_req (XDR *xdrs, gfs3_truncate_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->offset)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_truncate_rsp (XDR *xdrs, gfs3_truncate_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->prestat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->poststat)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_open_req (XDR *xdrs, gfs3_open_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->wbflags)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_open_rsp (XDR *xdrs, gfs3_open_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_read_req (XDR *xdrs, gfs3_read_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->offset)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_read_rsp (XDR *xdrs, gfs3_read_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + + return TRUE; +} + +bool_t +xdr_gfs3_lookup_req (XDR *xdrs, gfs3_lookup_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->par)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->bname, ~0)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, + (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_lookup_rsp (XDR *xdrs, gfs3_lookup_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, + (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_write_req (XDR *xdrs, gfs3_write_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->offset)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_write_rsp (XDR *xdrs, gfs3_write_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->prestat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->poststat)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_statfs_req (XDR *xdrs, gfs3_statfs_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_statfs_rsp (XDR *xdrs, gfs3_statfs_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_statfs (xdrs, &objp->statfs)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_lk_req (XDR *xdrs, gfs3_lk_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->cmd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_gf_flock (xdrs, &objp->flock)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_lk_rsp (XDR *xdrs, gfs3_lk_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_flock (xdrs, &objp->flock)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_inodelk_req (XDR *xdrs, gfs3_inodelk_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->cmd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_gf_flock (xdrs, &objp->flock)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->volume, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_finodelk_req (XDR *xdrs, gfs3_finodelk_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->cmd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_gf_flock (xdrs, &objp->flock)) + return FALSE; + if (!xdr_string (xdrs, &objp->volume, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_flush_req (XDR *xdrs, gfs3_flush_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fsync_req (XDR *xdrs, gfs3_fsync_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->data)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fsync_rsp (XDR *xdrs, gfs3_fsync_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->prestat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->poststat)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_setxattr_req (XDR *xdrs, gfs3_setxattr_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fsetxattr_req (XDR *xdrs, gfs3_fsetxattr_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_xattrop_req (XDR *xdrs, gfs3_xattrop_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_xattrop_rsp (XDR *xdrs, gfs3_xattrop_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fxattrop_req (XDR *xdrs, gfs3_fxattrop_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fxattrop_rsp (XDR *xdrs, gfs3_fxattrop_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_getxattr_req (XDR *xdrs, gfs3_getxattr_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->namelen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->name, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_getxattr_rsp (XDR *xdrs, gfs3_getxattr_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fgetxattr_req (XDR *xdrs, gfs3_fgetxattr_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->namelen)) + return FALSE; + if (!xdr_string (xdrs, &objp->name, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fgetxattr_rsp (XDR *xdrs, gfs3_fgetxattr_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_removexattr_req (XDR *xdrs, gfs3_removexattr_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->name, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_opendir_req (XDR *xdrs, gfs3_opendir_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_opendir_rsp (XDR *xdrs, gfs3_opendir_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fsyncdir_req (XDR *xdrs, gfs3_fsyncdir_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_int (xdrs, &objp->data)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_readdir_req (XDR *xdrs, gfs3_readdir_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->offset)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_readdir_rsp (XDR *xdrs, gfs3_readdir_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->buf.buf_val, (u_int *) &objp->buf.buf_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_readdirp_req (XDR *xdrs, gfs3_readdirp_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->offset)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_readdirp_rsp (XDR *xdrs, gfs3_readdirp_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->buf.buf_val, (u_int *) &objp->buf.buf_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_setvolume_req (XDR *xdrs, gf_setvolume_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_setvolume_rsp (XDR *xdrs, gf_setvolume_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_access_req (XDR *xdrs, gfs3_access_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mask)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_create_req (XDR *xdrs, gfs3_create_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->par)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->bname, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_create_rsp (XDR *xdrs, gfs3_create_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->preparent)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->postparent)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_ftruncate_req (XDR *xdrs, gfs3_ftruncate_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->offset)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_ftruncate_rsp (XDR *xdrs, gfs3_ftruncate_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->prestat)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->poststat)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fstat_req (XDR *xdrs, gfs3_fstat_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fstat_rsp (XDR *xdrs, gfs3_fstat_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stat)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_entrylk_req (XDR *xdrs, gfs3_entrylk_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->cmd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->namelen)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->name, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->volume, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fentrylk_req (XDR *xdrs, gfs3_fentrylk_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->cmd)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->namelen)) + return FALSE; + if (!xdr_string (xdrs, &objp->name, ~0)) + return FALSE; + if (!xdr_string (xdrs, &objp->volume, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_checksum_req (XDR *xdrs, gfs3_checksum_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flag)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_checksum_rsp (XDR *xdrs, gfs3_checksum_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->fchecksum.fchecksum_val, (u_int *) &objp->fchecksum.fchecksum_len, ~0)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->dchecksum.dchecksum_val, (u_int *) &objp->dchecksum.dchecksum_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_setattr_req (XDR *xdrs, gfs3_setattr_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stbuf)) + return FALSE; + if (!xdr_int (xdrs, &objp->valid)) + return FALSE; + if (!xdr_string (xdrs, &objp->path, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_setattr_rsp (XDR *xdrs, gfs3_setattr_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->statpre)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->statpost)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fsetattr_req (XDR *xdrs, gfs3_fsetattr_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->stbuf)) + return FALSE; + if (!xdr_int (xdrs, &objp->valid)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_fsetattr_rsp (XDR *xdrs, gfs3_fsetattr_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->statpre)) + return FALSE; + if (!xdr_gf_iatt (xdrs, &objp->statpost)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_rchecksum_req (XDR *xdrs, gfs3_rchecksum_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->offset)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->len)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_rchecksum_rsp (XDR *xdrs, gfs3_rchecksum_rsp *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + 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_u_int (xdrs, &objp->weak_checksum)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->op_ret); + IXDR_PUT_LONG(buf, objp->op_errno); + IXDR_PUT_U_LONG(buf, objp->weak_checksum); + } + if (!xdr_bytes (xdrs, (char **)&objp->strong_checksum.strong_checksum_val, (u_int *) &objp->strong_checksum.strong_checksum_len, ~0)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + 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_u_int (xdrs, &objp->weak_checksum)) + return FALSE; + + } else { + objp->op_ret = IXDR_GET_LONG(buf); + objp->op_errno = IXDR_GET_LONG(buf); + objp->weak_checksum = IXDR_GET_U_LONG(buf); + } + if (!xdr_bytes (xdrs, (char **)&objp->strong_checksum.strong_checksum_val, (u_int *) &objp->strong_checksum.strong_checksum_len, ~0)) + return FALSE; + return TRUE; + } + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->weak_checksum)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->strong_checksum.strong_checksum_val, (u_int *) &objp->strong_checksum.strong_checksum_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_getspec_req (XDR *xdrs, gf_getspec_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->key, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_getspec_rsp (XDR *xdrs, gf_getspec_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_string (xdrs, &objp->spec, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_log_req (XDR *xdrs, gf_log_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->msg.msg_val, (u_int *) &objp->msg.msg_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_notify_req (XDR *xdrs, gf_notify_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->buf, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_notify_rsp (XDR *xdrs, gf_notify_rsp *objp) +{ + register int32_t *buf; + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + 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_u_int (xdrs, &objp->flags)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->op_ret); + IXDR_PUT_LONG(buf, objp->op_errno); + IXDR_PUT_U_LONG(buf, objp->flags); + } + if (!xdr_string (xdrs, &objp->buf, ~0)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + 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_u_int (xdrs, &objp->flags)) + return FALSE; + + } else { + objp->op_ret = IXDR_GET_LONG(buf); + objp->op_errno = IXDR_GET_LONG(buf); + objp->flags = IXDR_GET_U_LONG(buf); + } + if (!xdr_string (xdrs, &objp->buf, ~0)) + return FALSE; + return TRUE; + } + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->buf, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_releasedir_req (XDR *xdrs, gfs3_releasedir_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gfs3_release_req (XDR *xdrs, gfs3_release_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->ino)) + return FALSE; + if (!xdr_u_quad_t (xdrs, &objp->gen)) + return FALSE; + if (!xdr_quad_t (xdrs, &objp->fd)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_common_rsp (XDR *xdrs, gf_common_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + return TRUE; +} + + +bool_t +xdr_gf_dump_version_req (XDR *xdrs, gf_dump_version_req *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_string (xdrs, &objp->key, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_gf_dump_version_rsp (XDR *xdrs, gf_dump_version_rsp *objp) +{ + + if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_ret)) + return FALSE; + if (!xdr_int (xdrs, &objp->op_errno)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flags)) + return FALSE; + if (!xdr_bytes (xdrs, (char **)&objp->msg.msg_val, (u_int *) &objp->msg.msg_len, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr_auth_glusterfs_parms (XDR *xdrs, auth_glusterfs_parms *objp) +{ + register int32_t *buf; + + int i; + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_u_quad_t (xdrs, &objp->lk_owner)) + return FALSE; + buf = XDR_INLINE (xdrs, (4 + 16 )* BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->pid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->uid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->gid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ngrps)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->groups, 16, + sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->pid); + IXDR_PUT_U_LONG(buf, objp->uid); + IXDR_PUT_U_LONG(buf, objp->gid); + IXDR_PUT_U_LONG(buf, objp->ngrps); + { + register u_int *genp; + + for (i = 0, genp = objp->groups; + i < 16; ++i) { + IXDR_PUT_U_LONG(buf, *genp++); + } + } + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_u_quad_t (xdrs, &objp->lk_owner)) + return FALSE; + buf = XDR_INLINE (xdrs, (4 + 16 )* BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->pid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->uid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->gid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ngrps)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->groups, 16, + sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + } else { + objp->pid = IXDR_GET_U_LONG(buf); + objp->uid = IXDR_GET_U_LONG(buf); + objp->gid = IXDR_GET_U_LONG(buf); + objp->ngrps = IXDR_GET_U_LONG(buf); + { + register u_int *genp; + + for (i = 0, genp = objp->groups; + i < 16; ++i) { + *genp++ = IXDR_GET_U_LONG(buf); + } + } + } + return TRUE; + } + + if (!xdr_u_quad_t (xdrs, &objp->lk_owner)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->pid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->uid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->gid)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ngrps)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->groups, 16, + sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + return TRUE; +} |