xref: /openbmc/linux/include/uapi/linux/nfs4_mount.h (revision 6f52b16c)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells #ifndef _LINUX_NFS4_MOUNT_H
3607ca46eSDavid Howells #define _LINUX_NFS4_MOUNT_H
4607ca46eSDavid Howells 
5607ca46eSDavid Howells /*
6607ca46eSDavid Howells  *  linux/include/linux/nfs4_mount.h
7607ca46eSDavid Howells  *
8607ca46eSDavid Howells  *  Copyright (C) 2002  Trond Myklebust
9607ca46eSDavid Howells  *
10607ca46eSDavid Howells  *  structure passed from user-space to kernel-space during an nfsv4 mount
11607ca46eSDavid Howells  */
12607ca46eSDavid Howells 
13607ca46eSDavid Howells /*
14607ca46eSDavid Howells  * WARNING!  Do not delete or change the order of these fields.  If
15607ca46eSDavid Howells  * a new field is required then add it to the end.  The version field
16607ca46eSDavid Howells  * tracks which fields are present.  This will ensure some measure of
17607ca46eSDavid Howells  * mount-to-kernel version compatibility.  Some of these aren't used yet
18607ca46eSDavid Howells  * but here they are anyway.
19607ca46eSDavid Howells  */
20607ca46eSDavid Howells #define NFS4_MOUNT_VERSION	1
21607ca46eSDavid Howells 
22607ca46eSDavid Howells struct nfs_string {
23607ca46eSDavid Howells 	unsigned int len;
24607ca46eSDavid Howells 	const char __user * data;
25607ca46eSDavid Howells };
26607ca46eSDavid Howells 
27607ca46eSDavid Howells struct nfs4_mount_data {
28607ca46eSDavid Howells 	int version;				/* 1 */
29607ca46eSDavid Howells 	int flags;				/* 1 */
30607ca46eSDavid Howells 	int rsize;				/* 1 */
31607ca46eSDavid Howells 	int wsize;				/* 1 */
32607ca46eSDavid Howells 	int timeo;				/* 1 */
33607ca46eSDavid Howells 	int retrans;				/* 1 */
34607ca46eSDavid Howells 	int acregmin;				/* 1 */
35607ca46eSDavid Howells 	int acregmax;				/* 1 */
36607ca46eSDavid Howells 	int acdirmin;				/* 1 */
37607ca46eSDavid Howells 	int acdirmax;				/* 1 */
38607ca46eSDavid Howells 
39607ca46eSDavid Howells 	/* see the definition of 'struct clientaddr4' in RFC3010 */
40607ca46eSDavid Howells 	struct nfs_string client_addr;		/* 1 */
41607ca46eSDavid Howells 
42607ca46eSDavid Howells 	/* Mount path */
43607ca46eSDavid Howells 	struct nfs_string mnt_path;		/* 1 */
44607ca46eSDavid Howells 
45607ca46eSDavid Howells 	/* Server details */
46607ca46eSDavid Howells 	struct nfs_string hostname;		/* 1 */
47607ca46eSDavid Howells 	/* Server IP address */
48607ca46eSDavid Howells 	unsigned int host_addrlen;		/* 1 */
49607ca46eSDavid Howells 	struct sockaddr __user * host_addr;	/* 1 */
50607ca46eSDavid Howells 
51607ca46eSDavid Howells 	/* Transport protocol to use */
52607ca46eSDavid Howells 	int proto;				/* 1 */
53607ca46eSDavid Howells 
54607ca46eSDavid Howells 	/* Pseudo-flavours to use for authentication. See RFC2623 */
55607ca46eSDavid Howells 	int auth_flavourlen;			/* 1 */
56607ca46eSDavid Howells 	int __user *auth_flavours;		/* 1 */
57607ca46eSDavid Howells };
58607ca46eSDavid Howells 
59607ca46eSDavid Howells /* bits in the flags field */
60607ca46eSDavid Howells /* Note: the fields that correspond to existing NFSv2/v3 mount options
61607ca46eSDavid Howells  * 	 should mirror the values from include/linux/nfs_mount.h
62607ca46eSDavid Howells  */
63607ca46eSDavid Howells 
64607ca46eSDavid Howells #define NFS4_MOUNT_SOFT		0x0001	/* 1 */
65607ca46eSDavid Howells #define NFS4_MOUNT_INTR		0x0002	/* 1 */
66607ca46eSDavid Howells #define NFS4_MOUNT_NOCTO	0x0010	/* 1 */
67607ca46eSDavid Howells #define NFS4_MOUNT_NOAC		0x0020	/* 1 */
68607ca46eSDavid Howells #define NFS4_MOUNT_STRICTLOCK	0x1000	/* 1 */
69607ca46eSDavid Howells #define NFS4_MOUNT_UNSHARED	0x8000	/* 1 */
70607ca46eSDavid Howells #define NFS4_MOUNT_FLAGMASK	0x9033
71607ca46eSDavid Howells 
72607ca46eSDavid Howells #endif
73