2 * We want to be able to compile mount on old kernels in such a way
3 * that the binary will work well on more recent kernels.
4 * Thus, if necessary we teach nfsmount.c the structure of new fields
5 * that will come later.
7 * Moreover, the new kernel includes conflict with glibc includes
8 * so it is easiest to ignore the kernel altogether (at compile time).
14 #include <netinet/in.h>
15 #include <arpa/inet.h>
17 #define NFS_MOUNT_VERSION 6
18 #define NFS_MAX_CONTEXT_LEN 256
25 unsigned char data[64];
28 struct nfs_mount_data {
31 struct nfs2_fh old_root; /* 1 */
41 struct sockaddr_in addr; /* 1 */
42 char hostname[256]; /* 1 */
44 unsigned int bsize; /* 3 */
45 struct nfs3_fh root; /* 4 */
46 int pseudoflavor; /* 5 */
47 char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */
51 /* bits in the flags field */
53 #define NFS_MOUNT_SOFT 0x0001 /* 1 */
54 #define NFS_MOUNT_INTR 0x0002 /* 1 */
55 #define NFS_MOUNT_SECURE 0x0004 /* 1 */
56 #define NFS_MOUNT_POSIX 0x0008 /* 1 */
57 #define NFS_MOUNT_NOCTO 0x0010 /* 1 */
58 #define NFS_MOUNT_NOAC 0x0020 /* 1 */
59 #define NFS_MOUNT_TCP 0x0040 /* 2 */
60 #define NFS_MOUNT_VER3 0x0080 /* 3 */
61 #define NFS_MOUNT_KERBEROS 0x0100 /* 3 */
62 #define NFS_MOUNT_NONLM 0x0200 /* 3 */
63 #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */
64 #define NFS_MOUNT_NOACL 0x0800 /* 4 */
65 #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */
66 #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */
67 #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */
69 /* security pseudoflavors */
72 #define AUTH_GSS_KRB5 390003
73 #define AUTH_GSS_KRB5I 390004
74 #define AUTH_GSS_KRB5P 390005
75 #define AUTH_GSS_LKEY 390006
76 #define AUTH_GSS_LKEYI 390007
77 #define AUTH_GSS_LKEYP 390008
78 #define AUTH_GSS_SPKM 390009
79 #define AUTH_GSS_SPKMI 390010
80 #define AUTH_GSS_SPKMP 390011
83 int nfsmount(const char *, const char *, int , char **, int, int);
84 int nfsumount(int, char **);
86 #endif /* _NFS_MOUNT_H */