diff options
author | peter <peter@FreeBSD.org> | 1998-05-31 20:09:01 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-05-31 20:09:01 +0000 |
commit | 19ad2aa63b82a877a2b1485a9812dcf6e7757ea9 (patch) | |
tree | c618465310d3c2ab3f4033443d34c221eef41ba1 /sys/nfs/nfsproto.h | |
parent | 401c250cc40de5fcfc5f53856a8194793ba32667 (diff) | |
download | FreeBSD-src-19ad2aa63b82a877a2b1485a9812dcf6e7757ea9.zip FreeBSD-src-19ad2aa63b82a877a2b1485a9812dcf6e7757ea9.tar.gz |
For the on-the-wire protocol, u_long -> u_int32_t; long -> int32_t;
int -> int32_t; u_short -> u_int16_t. Also, use mode_t instead of u_short
for storing modes (mode_t is a u_int16_t).
Obtained from: NetBSD
Diffstat (limited to 'sys/nfs/nfsproto.h')
-rw-r--r-- | sys/nfs/nfsproto.h | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/sys/nfs/nfsproto.h b/sys/nfs/nfsproto.h index 9ada127..665a187 100644 --- a/sys/nfs/nfsproto.h +++ b/sys/nfs/nfsproto.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsproto.h 8.2 (Berkeley) 3/30/95 - * $Id: nfsproto.h,v 1.4 1998/05/31 17:27:58 peter Exp $ + * $Id: nfsproto.h,v 1.5 1998/05/31 19:00:19 peter Exp $ */ #ifndef _NFS_NFSPROTO_H_ @@ -230,12 +230,12 @@ #define vtonfsv2_mode(t,m) \ txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \ MAKEIMODE((t), (m))) -#define vtonfsv3_mode(m) txdr_unsigned((m) & 07777) -#define nfstov_mode(a) (fxdr_unsigned(u_short, (a))&07777) -#define vtonfsv2_type(a) txdr_unsigned(nfsv2_type[((long)(a))]) -#define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((long)(a))]) -#define nfsv2tov_type(a) nv2tov_type[fxdr_unsigned(u_long,(a))&0x7] -#define nfsv3tov_type(a) nv3tov_type[fxdr_unsigned(u_long,(a))&0x7] +#define vtonfsv3_mode(m) txdr_unsigned((m) & ALLPERMS) +#define nfstov_mode(a) (fxdr_unsigned(u_int32_t, (a)) & ALLPERMS) +#define vtonfsv2_type(a) txdr_unsigned(nfsv2_type[((int32_t)(a))]) +#define vtonfsv3_type(a) txdr_unsigned(nfsv3_type[((int32_t)(a))]) +#define nfsv2tov_type(a) nv2tov_type[fxdr_unsigned(u_int32_t,(a))&0x7] +#define nfsv3tov_type(a) nv3tov_type[fxdr_unsigned(u_int32_t,(a))&0x7] /* File types */ typedef enum { NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5, @@ -259,14 +259,14 @@ union nfsfh { typedef union nfsfh nfsfh_t; struct nfsv2_time { - u_long nfsv2_sec; - u_long nfsv2_usec; + u_int32_t nfsv2_sec; + u_int32_t nfsv2_usec; }; typedef struct nfsv2_time nfstime2; struct nfsv3_time { - u_long nfsv3_sec; - u_long nfsv3_nsec; + u_int32_t nfsv3_sec; + u_int32_t nfsv3_nsec; }; typedef struct nfsv3_time nfstime3; @@ -275,7 +275,7 @@ typedef struct nfsv3_time nfstime3; * protocol and to facilitate xdr conversion. */ struct nfs_uquad { - u_long nfsuquad[2]; + u_int32_t nfsuquad[2]; }; typedef struct nfs_uquad nfsuint64; @@ -283,7 +283,7 @@ typedef struct nfs_uquad nfsuint64; * Used to convert between two u_longs and a u_quad_t. */ union nfs_quadconvert { - u_long lval[2]; + u_int32_t lval[2]; u_quad_t qval; }; typedef union nfs_quadconvert nfsquad_t; @@ -292,8 +292,8 @@ typedef union nfs_quadconvert nfsquad_t; * NFS Version 3 special file number. */ struct nfsv3_spec { - u_long specdata1; - u_long specdata2; + u_int32_t specdata1; + u_int32_t specdata2; }; typedef struct nfsv3_spec nfsv3spec; @@ -307,19 +307,19 @@ typedef struct nfsv3_spec nfsv3spec; * NFSX_FATTR(v3) macro. */ struct nfs_fattr { - u_long fa_type; - u_long fa_mode; - u_long fa_nlink; - u_long fa_uid; - u_long fa_gid; + u_int32_t fa_type; + u_int32_t fa_mode; + u_int32_t fa_nlink; + u_int32_t fa_uid; + u_int32_t fa_gid; union { struct { - u_long nfsv2fa_size; - u_long nfsv2fa_blocksize; - u_long nfsv2fa_rdev; - u_long nfsv2fa_blocks; - u_long nfsv2fa_fsid; - u_long nfsv2fa_fileid; + u_int32_t nfsv2fa_size; + u_int32_t nfsv2fa_blocksize; + u_int32_t nfsv2fa_rdev; + u_int32_t nfsv2fa_blocks; + u_int32_t nfsv2fa_fsid; + u_int32_t nfsv2fa_fileid; nfstime2 nfsv2fa_atime; nfstime2 nfsv2fa_mtime; nfstime2 nfsv2fa_ctime; @@ -357,10 +357,10 @@ struct nfs_fattr { #define fa3_ctime fa_un.fa_nfsv3.nfsv3fa_ctime struct nfsv2_sattr { - u_long sa_mode; - u_long sa_uid; - u_long sa_gid; - u_long sa_size; + u_int32_t sa_mode; + u_int32_t sa_uid; + u_int32_t sa_gid; + u_int32_t sa_size; nfstime2 sa_atime; nfstime2 sa_mtime; }; @@ -369,25 +369,25 @@ struct nfsv2_sattr { * NFS Version 3 sattr structure for the new node creation case. */ struct nfsv3_sattr { - u_long sa_modetrue; - u_long sa_mode; - u_long sa_uidfalse; - u_long sa_gidfalse; - u_long sa_sizefalse; - u_long sa_atimetype; + u_int32_t sa_modetrue; + u_int32_t sa_mode; + u_int32_t sa_uidfalse; + u_int32_t sa_gidfalse; + u_int32_t sa_sizefalse; + u_int32_t sa_atimetype; nfstime3 sa_atime; - u_long sa_mtimetype; + u_int32_t sa_mtimetype; nfstime3 sa_mtime; }; struct nfs_statfs { union { struct { - u_long nfsv2sf_tsize; - u_long nfsv2sf_bsize; - u_long nfsv2sf_blocks; - u_long nfsv2sf_bfree; - u_long nfsv2sf_bavail; + u_int32_t nfsv2sf_tsize; + u_int32_t nfsv2sf_bsize; + u_int32_t nfsv2sf_blocks; + u_int32_t nfsv2sf_bfree; + u_int32_t nfsv2sf_bavail; } sf_nfsv2; struct { nfsuint64 nfsv3sf_tbytes; @@ -396,7 +396,7 @@ struct nfs_statfs { nfsuint64 nfsv3sf_tfiles; nfsuint64 nfsv3sf_ffiles; nfsuint64 nfsv3sf_afiles; - u_long nfsv3sf_invarsec; + u_int32_t nfsv3sf_invarsec; } sf_nfsv3; } sf_un; }; @@ -415,25 +415,25 @@ struct nfs_statfs { #define sf_invarsec sf_un.sf_nfsv3.nfsv3sf_invarsec struct nfsv3_fsinfo { - u_long fs_rtmax; - u_long fs_rtpref; - u_long fs_rtmult; - u_long fs_wtmax; - u_long fs_wtpref; - u_long fs_wtmult; - u_long fs_dtpref; + u_int32_t fs_rtmax; + u_int32_t fs_rtpref; + u_int32_t fs_rtmult; + u_int32_t fs_wtmax; + u_int32_t fs_wtpref; + u_int32_t fs_wtmult; + u_int32_t fs_dtpref; nfsuint64 fs_maxfilesize; nfstime3 fs_timedelta; - u_long fs_properties; + u_int32_t fs_properties; }; struct nfsv3_pathconf { - u_long pc_linkmax; - u_long pc_namemax; - u_long pc_notrunc; - u_long pc_chownrestricted; - u_long pc_caseinsensitive; - u_long pc_casepreserving; + u_int32_t pc_linkmax; + u_int32_t pc_namemax; + u_int32_t pc_notrunc; + u_int32_t pc_chownrestricted; + u_int32_t pc_caseinsensitive; + u_int32_t pc_casepreserving; }; #endif |