2018-10-15 01:46:07 +08:00
|
|
|
/*
|
2021-03-08 18:19:04 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2018-10-15 01:46:07 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
*/
|
2010-05-20 08:10:15 +08:00
|
|
|
/*
|
|
|
|
* Please do not edit this file.
|
|
|
|
* It was generated using rpcgen.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "mount.h"
|
|
|
|
/* This file is copied from RFC1813
|
|
|
|
* Copyright 1995 Sun Micrososystems (I assume)
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_fhandle3(register XDR *xdrs, fhandle3 *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_bytes(xdrs, (char **)&objp->fhandle3_val, (unsigned int *) &objp->fhandle3_len, FHSIZE3))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_dirpath(register XDR *xdrs, dirpath *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_string(xdrs, objp, MNTPATHLEN))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_name(register XDR *xdrs, name *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_string(xdrs, objp, MNTNAMLEN))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_exports(register XDR *xdrs, exports *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct exportnode), (xdrproc_t) xdr_exportnode))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_groups(register XDR *xdrs, groups *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct groupnode), (xdrproc_t) xdr_groupnode))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_mountlist(register XDR *xdrs, mountlist *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct mountbody), (xdrproc_t) xdr_mountbody))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_mountstat3(register XDR *xdrs, mountstat3 *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
int enum_objp;
|
2010-05-20 08:10:15 +08:00
|
|
|
|
2021-03-08 18:19:04 +08:00
|
|
|
enum_objp = *objp;
|
2010-05-20 08:10:15 +08:00
|
|
|
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_enum(xdrs, (enum_t *)&enum_objp))
|
|
|
|
{
|
|
|
|
*objp = (mountstat3)enum_objp;
|
|
|
|
return (FALSE);
|
|
|
|
}
|
2010-05-20 08:10:15 +08:00
|
|
|
|
2021-03-08 18:19:04 +08:00
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_mountres3_ok(register XDR *xdrs, mountres3_ok *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_fhandle3(xdrs, &objp->fhandle))
|
|
|
|
return (FALSE);
|
|
|
|
if (!xdr_array(xdrs, (char **)&objp->auth_flavors.auth_flavors_val, (unsigned int *) &objp->auth_flavors.auth_flavors_len, ~0,
|
|
|
|
sizeof (int), (xdrproc_t) xdr_int))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_mountres3(register XDR *xdrs, mountres3 *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_mountstat3(xdrs, &objp->fhs_status))
|
|
|
|
return (FALSE);
|
|
|
|
switch (objp->fhs_status) {
|
|
|
|
case MNT3_OK:
|
|
|
|
if (!xdr_mountres3_ok(xdrs, &objp->mountres3_u.mountinfo))
|
|
|
|
return (FALSE);
|
|
|
|
break;
|
|
|
|
default :
|
|
|
|
return (FALSE);
|
|
|
|
}
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_mountbody(register XDR *xdrs, mountbody *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_name(xdrs, &objp->ml_hostname))
|
|
|
|
return (FALSE);
|
|
|
|
if (!xdr_dirpath(xdrs, &objp->ml_directory))
|
|
|
|
return (FALSE);
|
|
|
|
if (!xdr_mountlist(xdrs, &objp->ml_next))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_groupnode(register XDR *xdrs, groupnode *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_name(xdrs, &objp->gr_name))
|
|
|
|
return (FALSE);
|
|
|
|
if (!xdr_groups(xdrs, &objp->gr_next))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool_t
|
|
|
|
xdr_exportnode(register XDR *xdrs, exportnode *objp)
|
|
|
|
{
|
2021-03-08 18:19:04 +08:00
|
|
|
if (!xdr_dirpath(xdrs, &objp->ex_dir))
|
|
|
|
return (FALSE);
|
|
|
|
if (!xdr_groups(xdrs, &objp->ex_groups))
|
|
|
|
return (FALSE);
|
|
|
|
if (!xdr_exports(xdrs, &objp->ex_next))
|
|
|
|
return (FALSE);
|
|
|
|
return (TRUE);
|
2010-05-20 08:10:15 +08:00
|
|
|
}
|