xdr_func.c (82794) | xdr_func.c (119679) |
---|---|
1/* | 1/* |
2 * Copyright (c) 1997-2001 Erez Zadok | 2 * Copyright (c) 1997-2003 Erez Zadok |
3 * Copyright (c) 1990 Jan-Simon Pendry 4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 5 * Copyright (c) 1990 The Regents of the University of California. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * Jan-Simon Pendry at Imperial College, London. 10 * --- 22 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * %W% (Berkeley) %G% 40 * | 3 * Copyright (c) 1990 Jan-Simon Pendry 4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 5 * Copyright (c) 1990 The Regents of the University of California. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * Jan-Simon Pendry at Imperial College, London. 10 * --- 22 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * %W% (Berkeley) %G% 40 * |
41 * $Id: xdr_func.c,v 1.4.2.4 2001/02/02 18:28:27 ezk Exp $ | 41 * $Id: xdr_func.c,v 1.4.2.7 2002/12/27 22:45:14 ezk Exp $ |
42 * 43 */ 44 45/* 46 * Complete list of all possible xdr functions which may be needed. 47 */ 48#ifdef HAVE_CONFIG_H 49# include <config.h> 50#endif /* HAVE_CONFIG_H */ 51#include <am_defs.h> 52#include <amu.h> 53 54 55/* 56 * MACROS: 57 */ | 42 * 43 */ 44 45/* 46 * Complete list of all possible xdr functions which may be needed. 47 */ 48#ifdef HAVE_CONFIG_H 49# include <config.h> 50#endif /* HAVE_CONFIG_H */ 51#include <am_defs.h> 52#include <amu.h> 53 54 55/* 56 * MACROS: 57 */ |
58#ifdef HAVE_FS_AUTOFS 59# ifndef A_MAXNAME 60# define A_MAXNAME 255 61# endif /* not A_MAXNAME */ 62# ifndef A_MAXOPTS 63# define A_MAXOPTS 255 64# endif /* not A_MAXOPTS */ 65# ifndef A_MAXPATH 66# define A_MAXPATH 1024 67# endif /* not A_MAXPATH */ 68#endif /* HAVE_FS_AUTOFS */ | |
69 70/* forward definitions, are they needed? */ 71extern bool_t xdr_exportnode(XDR *xdrs, exportnode *objp); 72extern bool_t xdr_groupnode(XDR *xdrs, groupnode *objp); 73extern bool_t xdr_name(XDR *xdrs, name *objp); 74 75 76#ifndef HAVE_XDR_ATTRSTAT --- 971 unchanged lines hidden (view full) --- 1048 (char **) & objp->wra_u.wra_val_u, 1049 (u_int *) & objp->wra_u.wra_len_u, 1050 NFS_MAXDATA)) { 1051 return (FALSE); 1052 } 1053 return (TRUE); 1054} 1055#endif /* not HAVE_XDR_WRITEARGS */ | 58 59/* forward definitions, are they needed? */ 60extern bool_t xdr_exportnode(XDR *xdrs, exportnode *objp); 61extern bool_t xdr_groupnode(XDR *xdrs, groupnode *objp); 62extern bool_t xdr_name(XDR *xdrs, name *objp); 63 64 65#ifndef HAVE_XDR_ATTRSTAT --- 971 unchanged lines hidden (view full) --- 1037 (char **) & objp->wra_u.wra_val_u, 1038 (u_int *) & objp->wra_u.wra_len_u, 1039 NFS_MAXDATA)) { 1040 return (FALSE); 1041 } 1042 return (TRUE); 1043} 1044#endif /* not HAVE_XDR_WRITEARGS */ |
1056 1057 1058/* 1059 * AUTOFS XDR FUNCTIONS: 1060 */ 1061#ifdef HAVE_FS_AUTOFS 1062# ifndef HAVE_XDR_MNTREQUEST 1063bool_t 1064xdr_mntrequest(XDR *xdrs, mntrequest *objp) 1065{ 1066#ifdef DEBUG 1067 amuDebug(D_XDRTRACE) 1068 plog(XLOG_DEBUG, "xdr_mntrequest:"); 1069#endif /* DEBUG */ 1070 1071 if (!xdr_string(xdrs, &objp->name, A_MAXNAME)) 1072 return (FALSE); 1073 1074 if (!xdr_string(xdrs, &objp->map, A_MAXNAME)) 1075 return (FALSE); 1076 1077 if (!xdr_string(xdrs, &objp->opts, A_MAXOPTS)) 1078 return (FALSE); 1079 1080 if (!xdr_string(xdrs, &objp->path, A_MAXPATH)) 1081 return (FALSE); 1082 1083 return (TRUE); 1084} 1085# endif /* not HAVE_XDR_MNTREQUEST */ 1086 1087 1088# ifndef HAVE_XDR_MNTRES 1089bool_t 1090xdr_mntres(XDR *xdrs, mntres *objp) 1091{ 1092#ifdef DEBUG 1093 amuDebug(D_XDRTRACE) 1094 plog(XLOG_DEBUG, "xdr_mntres:"); 1095#endif /* DEBUG */ 1096 1097 if (!xdr_int(xdrs, &objp->status)) 1098 return (FALSE); 1099 1100 return (TRUE); 1101} 1102# endif /* not HAVE_XDR_MNTRES */ 1103 1104 1105# ifndef HAVE_XDR_UMNTREQUEST 1106bool_t 1107xdr_umntrequest(XDR *xdrs, umntrequest *objp) 1108{ 1109#ifdef DEBUG 1110 amuDebug(D_XDRTRACE) 1111 plog(XLOG_DEBUG, "xdr_umntrequest:"); 1112#endif /* DEBUG */ 1113 1114 if (!xdr_int(xdrs, &objp->isdirect)) 1115 return (FALSE); 1116 1117 if (!xdr_u_int(xdrs, (u_int *) &objp->devid)) 1118 return (FALSE); 1119 1120#ifdef HAVE_FIELD_UMNTREQUEST_RDEVID 1121 if (!xdr_u_long(xdrs, &objp->rdevid)) 1122 return (FALSE); 1123#endif /* HAVE_FIELD_UMNTREQUEST_RDEVID */ 1124 1125 if (!xdr_pointer(xdrs, (char **) &objp->next, sizeof(umntrequest), (XDRPROC_T_TYPE) xdr_umntrequest)) 1126 return (FALSE); 1127 1128 return (TRUE); 1129} 1130# endif /* not HAVE_XDR_UMNTREQUEST */ 1131 1132 1133# ifndef HAVE_XDR_UMNTRES 1134bool_t 1135xdr_umntres(XDR *xdrs, umntres *objp) 1136{ 1137#ifdef DEBUG 1138 amuDebug(D_XDRTRACE) 1139 plog(XLOG_DEBUG, "xdr_mntres:"); 1140#endif /* DEBUG */ 1141 1142 if (!xdr_int(xdrs, &objp->status)) 1143 return (FALSE); 1144 1145 return (TRUE); 1146} 1147# endif /* not HAVE_XDR_UMNTRES */ 1148#endif /* HAVE_FS_AUTOFS */ | |