X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Finclude%2Fconn.h;fp=support%2Finclude%2Fconn.h;h=ae19a3e4912fea0ff377fb228d320860e79a2ea7;hb=4e2bae795e5eaf9922f0b966ab5df64994c836a2;hp=0000000000000000000000000000000000000000;hpb=a0520fa1a41bd33815b331b660b4545f2723495c;p=nfs-utils.git diff --git a/support/include/conn.h b/support/include/conn.h new file mode 100644 index 0000000..ae19a3e --- /dev/null +++ b/support/include/conn.h @@ -0,0 +1,42 @@ +/* + * conn.h -- Connection routines for NFS mount / umount code. + * + * 2006-06-06 Amit Gud + * - Moved code snippets here from util-linux/mount + */ + +#ifndef _CONN_H +#define _CONN_H + +#ifdef HAVE_RPCSVC_NFS_PROT_H +#include +#else +#include +#define nfsstat nfs_stat +#endif + +#include +#include + +#define MNT_SENDBUFSIZE ((u_int)2048) +#define MNT_RECVBUFSIZE ((u_int)1024) + +typedef struct { + char **hostname; + struct sockaddr_in saddr; + struct pmap pmap; +} clnt_addr_t; + +/* RPC call timeout values */ +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); +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); +CLIENT * mnt_openclnt(clnt_addr_t *, int *); +void mnt_closeclnt(CLIENT *, int); + +#endif /* _CONN_H */ +