]> git.decadent.org.uk Git - nfs-utils.git/blob - support/include/conn.h
f21c10e18a8ea83312946fc42b3e0f4d43e2a0bd
[nfs-utils.git] / support / include / conn.h
1 /* 
2  * conn.h -- Connection routines for NFS mount / umount code.
3  *
4  * 2006-06-06 Amit Gud <agud@redhat.com>
5  * - Moved code snippets here from util-linux/mount
6  */
7
8 #ifndef _CONN_H
9 #define _CONN_H
10
11 #ifdef HAVE_RPCSVC_NFS_PROT_H
12 #include <rpcsvc/nfs_prot.h>
13 #else
14 #include <linux/nfs.h>
15 #define nfsstat nfs_stat
16 #endif
17
18 #include <rpc/pmap_prot.h>
19 #include <rpc/clnt.h>
20
21 typedef struct {
22         char **hostname;
23         struct sockaddr_in saddr;
24         struct pmap pmap;
25 } clnt_addr_t;
26
27 /* RPC call timeout values */
28 static const struct timeval TIMEOUT = { 20, 0 };
29 static const struct timeval RETRY_TIMEOUT = { 3, 0 };
30
31 int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int,
32               struct sockaddr_in *);
33 u_long nfsvers_to_mnt(const u_long);
34 u_long mntvers_to_nfs(const u_long);
35 int get_socket(struct sockaddr_in *, u_int, int, int);
36
37 #endif /* _CONN_H */
38