diff options
Diffstat (limited to 'support/include')
-rw-r--r-- | support/include/conn.h | 3 | ||||
-rw-r--r-- | support/include/nfs/nfs.h | 11 | ||||
-rw-r--r-- | support/include/nfslib.h | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/support/include/conn.h b/support/include/conn.h index ae19a3e..1761dc4 100644 --- a/support/include/conn.h +++ b/support/include/conn.h @@ -31,7 +31,8 @@ typedef struct { static const struct timeval TIMEOUT = { 20, 0 }; static const struct timeval RETRY_TIMEOUT = { 3, 0 }; -int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int); +int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int, + struct sockaddr_in *); u_long nfsvers_to_mnt(const u_long); u_long mntvers_to_nfs(const u_long); int get_socket(struct sockaddr_in *, u_int, int); diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index c7fc42c..f0286b2 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -10,6 +10,9 @@ #define NFS3_FHSIZE 64 #define NFS_FHSIZE 32 +#define NFSD_MINVERS 2 +#define NFSD_MAXVERS 4 + struct nfs_fh_len { int fh_size; u_int8_t fh_handle[NFS3_FHSIZE]; @@ -40,7 +43,15 @@ struct nfs_fh_old { #define NFSCTL_LOCKD 0x10000 #define LOCKDCTL_SVC NFSCTL_LOCKD +#define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << ((_v) - 1))) +#define NFSCTL_UDPUNSET(_cltbits) ((_cltbits) &= ~(1 << (17 - 1))) +#define NFSCTL_TCPUNSET(_cltbits) ((_cltbits) &= ~(1 << (18 - 1))) + +#define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << ((_v) - 1))) +#define NFSCTL_UDPISSET(_cltbits) ((_cltbits) & (1 << (17 - 1))) +#define NFSCTL_TCPISSET(_cltbits) ((_cltbits) & (1 << (18 - 1))) +#define NFSCTL_ALLBITS (~0) /* SVC */ struct nfsctl_svc { diff --git a/support/include/nfslib.h b/support/include/nfslib.h index 8c83262..3e25761 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -120,7 +120,7 @@ int wildmat(char *text, char *pattern); * nfsd library functions. */ int nfsctl(int, struct nfsctl_arg *, union nfsctl_res *); -int nfssvc(int port, int nrservs); +int nfssvc(int port, int nrservs, unsigned int versbits, unsigned int portbits, char *haddr); int nfsaddclient(struct nfsctl_client *clp); int nfsdelclient(struct nfsctl_client *clp); int nfsexport(struct nfsctl_export *exp); |