Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _LINUX_NFS_MOUNT_H
0003 #define _LINUX_NFS_MOUNT_H
0004 
0005 /*
0006  *  linux/include/linux/nfs_mount.h
0007  *
0008  *  Copyright (C) 1992  Rick Sladkey
0009  *
0010  *  structure passed from user-space to kernel-space during an nfs mount
0011  */
0012 #include <linux/in.h>
0013 #include <linux/nfs.h>
0014 #include <linux/nfs2.h>
0015 #include <linux/nfs3.h>
0016 
0017 /*
0018  * WARNING!  Do not delete or change the order of these fields.  If
0019  * a new field is required then add it to the end.  The version field
0020  * tracks which fields are present.  This will ensure some measure of
0021  * mount-to-kernel version compatibility.  Some of these aren't used yet
0022  * but here they are anyway.
0023  */
0024 #define NFS_MOUNT_VERSION   6
0025 #define NFS_MAX_CONTEXT_LEN 256
0026 
0027 struct nfs_mount_data {
0028     int     version;        /* 1 */
0029     int     fd;         /* 1 */
0030     struct nfs2_fh  old_root;       /* 1 */
0031     int     flags;          /* 1 */
0032     int     rsize;          /* 1 */
0033     int     wsize;          /* 1 */
0034     int     timeo;          /* 1 */
0035     int     retrans;        /* 1 */
0036     int     acregmin;       /* 1 */
0037     int     acregmax;       /* 1 */
0038     int     acdirmin;       /* 1 */
0039     int     acdirmax;       /* 1 */
0040     struct sockaddr_in addr;        /* 1 */
0041     char        hostname[NFS_MAXNAMLEN + 1];        /* 1 */
0042     int     namlen;         /* 2 */
0043     unsigned int    bsize;          /* 3 */
0044     struct nfs3_fh  root;           /* 4 */
0045     int     pseudoflavor;       /* 5 */
0046     char        context[NFS_MAX_CONTEXT_LEN + 1];   /* 6 */
0047 };
0048 
0049 /* bits in the flags field visible to user space */
0050 
0051 #define NFS_MOUNT_SOFT      0x0001  /* 1 */
0052 #define NFS_MOUNT_INTR      0x0002  /* 1 */ /* now unused, but ABI */
0053 #define NFS_MOUNT_SECURE    0x0004  /* 1 */
0054 #define NFS_MOUNT_POSIX     0x0008  /* 1 */
0055 #define NFS_MOUNT_NOCTO     0x0010  /* 1 */
0056 #define NFS_MOUNT_NOAC      0x0020  /* 1 */
0057 #define NFS_MOUNT_TCP       0x0040  /* 2 */
0058 #define NFS_MOUNT_VER3      0x0080  /* 3 */
0059 #define NFS_MOUNT_KERBEROS  0x0100  /* 3 */
0060 #define NFS_MOUNT_NONLM     0x0200  /* 3 */
0061 #define NFS_MOUNT_BROKEN_SUID   0x0400  /* 4 */
0062 #define NFS_MOUNT_NOACL     0x0800  /* 4 */
0063 #define NFS_MOUNT_STRICTLOCK    0x1000  /* reserved for NFSv4 */
0064 #define NFS_MOUNT_SECFLAVOUR    0x2000  /* 5 non-text parsed mount data only */
0065 #define NFS_MOUNT_NORDIRPLUS    0x4000  /* 5 */
0066 #define NFS_MOUNT_UNSHARED  0x8000  /* 5 */
0067 #define NFS_MOUNT_FLAGMASK  0xFFFF
0068 
0069 #endif