/* SPDX-License-Identifier: GPL-2.0 */
/* Generated by xdrgen. Manual edits will be lost. */
/* XDR specification file: ../../Documentation/sunrpc/xdr/nfs4_1.x */
/* XDR specification modification time: Tue Jun 30 11:57:21 2026 */

#ifndef _LINUX_XDRGEN_NFS4_1_DEF_H
#define _LINUX_XDRGEN_NFS4_1_DEF_H

#include <linux/types.h>
#include <linux/sunrpc/xdrgen/_defs.h>

typedef s32 int32_t;

typedef u32 uint32_t;

typedef s64 int64_t;

typedef u64 uint64_t;

enum { NFS4_VERIFIER_SIZE = 8 };

enum { NFS4_FHSIZE = 128 };

enum nfsstat4 {
	NFS4_OK = 0,
	NFS4ERR_PERM = 1,
	NFS4ERR_NOENT = 2,
	NFS4ERR_IO = 5,
	NFS4ERR_NXIO = 6,
	NFS4ERR_ACCESS = 13,
	NFS4ERR_EXIST = 17,
	NFS4ERR_XDEV = 18,
	NFS4ERR_NOTDIR = 20,
	NFS4ERR_ISDIR = 21,
	NFS4ERR_INVAL = 22,
	NFS4ERR_FBIG = 27,
	NFS4ERR_NOSPC = 28,
	NFS4ERR_ROFS = 30,
	NFS4ERR_MLINK = 31,
	NFS4ERR_NAMETOOLONG = 63,
	NFS4ERR_NOTEMPTY = 66,
	NFS4ERR_DQUOT = 69,
	NFS4ERR_STALE = 70,
	NFS4ERR_BADHANDLE = 10001,
	NFS4ERR_BAD_COOKIE = 10003,
	NFS4ERR_NOTSUPP = 10004,
	NFS4ERR_TOOSMALL = 10005,
	NFS4ERR_SERVERFAULT = 10006,
	NFS4ERR_BADTYPE = 10007,
	NFS4ERR_DELAY = 10008,
	NFS4ERR_SAME = 10009,
	NFS4ERR_DENIED = 10010,
	NFS4ERR_EXPIRED = 10011,
	NFS4ERR_LOCKED = 10012,
	NFS4ERR_GRACE = 10013,
	NFS4ERR_FHEXPIRED = 10014,
	NFS4ERR_SHARE_DENIED = 10015,
	NFS4ERR_WRONGSEC = 10016,
	NFS4ERR_CLID_INUSE = 10017,
	NFS4ERR_RESOURCE = 10018,
	NFS4ERR_MOVED = 10019,
	NFS4ERR_NOFILEHANDLE = 10020,
	NFS4ERR_MINOR_VERS_MISMATCH = 10021,
	NFS4ERR_STALE_CLIENTID = 10022,
	NFS4ERR_STALE_STATEID = 10023,
	NFS4ERR_OLD_STATEID = 10024,
	NFS4ERR_BAD_STATEID = 10025,
	NFS4ERR_BAD_SEQID = 10026,
	NFS4ERR_NOT_SAME = 10027,
	NFS4ERR_LOCK_RANGE = 10028,
	NFS4ERR_SYMLINK = 10029,
	NFS4ERR_RESTOREFH = 10030,
	NFS4ERR_LEASE_MOVED = 10031,
	NFS4ERR_ATTRNOTSUPP = 10032,
	NFS4ERR_NO_GRACE = 10033,
	NFS4ERR_RECLAIM_BAD = 10034,
	NFS4ERR_RECLAIM_CONFLICT = 10035,
	NFS4ERR_BADXDR = 10036,
	NFS4ERR_LOCKS_HELD = 10037,
	NFS4ERR_OPENMODE = 10038,
	NFS4ERR_BADOWNER = 10039,
	NFS4ERR_BADCHAR = 10040,
	NFS4ERR_BADNAME = 10041,
	NFS4ERR_BAD_RANGE = 10042,
	NFS4ERR_LOCK_NOTSUPP = 10043,
	NFS4ERR_OP_ILLEGAL = 10044,
	NFS4ERR_DEADLOCK = 10045,
	NFS4ERR_FILE_OPEN = 10046,
	NFS4ERR_ADMIN_REVOKED = 10047,
	NFS4ERR_CB_PATH_DOWN = 10048,
	NFS4ERR_BADIOMODE = 10049,
	NFS4ERR_BADLAYOUT = 10050,
	NFS4ERR_BAD_SESSION_DIGEST = 10051,
	NFS4ERR_BADSESSION = 10052,
	NFS4ERR_BADSLOT = 10053,
	NFS4ERR_COMPLETE_ALREADY = 10054,
	NFS4ERR_CONN_NOT_BOUND_TO_SESSION = 10055,
	NFS4ERR_DELEG_ALREADY_WANTED = 10056,
	NFS4ERR_BACK_CHAN_BUSY = 10057,
	NFS4ERR_LAYOUTTRYLATER = 10058,
	NFS4ERR_LAYOUTUNAVAILABLE = 10059,
	NFS4ERR_NOMATCHING_LAYOUT = 10060,
	NFS4ERR_RECALLCONFLICT = 10061,
	NFS4ERR_UNKNOWN_LAYOUTTYPE = 10062,
	NFS4ERR_SEQ_MISORDERED = 10063,
	NFS4ERR_SEQUENCE_POS = 10064,
	NFS4ERR_REQ_TOO_BIG = 10065,
	NFS4ERR_REP_TOO_BIG = 10066,
	NFS4ERR_REP_TOO_BIG_TO_CACHE = 10067,
	NFS4ERR_RETRY_UNCACHED_REP = 10068,
	NFS4ERR_UNSAFE_COMPOUND = 10069,
	NFS4ERR_TOO_MANY_OPS = 10070,
	NFS4ERR_OP_NOT_IN_SESSION = 10071,
	NFS4ERR_HASH_ALG_UNSUPP = 10072,
	NFS4ERR_CLIENTID_BUSY = 10074,
	NFS4ERR_PNFS_IO_HOLE = 10075,
	NFS4ERR_SEQ_FALSE_RETRY = 10076,
	NFS4ERR_BAD_HIGH_SLOT = 10077,
	NFS4ERR_DEADSESSION = 10078,
	NFS4ERR_ENCR_ALG_UNSUPP = 10079,
	NFS4ERR_PNFS_NO_LAYOUT = 10080,
	NFS4ERR_NOT_ONLY_OP = 10081,
	NFS4ERR_WRONG_CRED = 10082,
	NFS4ERR_WRONG_TYPE = 10083,
	NFS4ERR_DIRDELEG_UNAVAIL = 10084,
	NFS4ERR_REJECT_DELEG = 10085,
	NFS4ERR_RETURNCONFLICT = 10086,
	NFS4ERR_DELEG_REVOKED = 10087,
	NFS4ERR_PARTNER_NOTSUPP = 10088,
	NFS4ERR_PARTNER_NO_AUTH = 10089,
	NFS4ERR_UNION_NOTSUPP = 10090,
	NFS4ERR_OFFLOAD_DENIED = 10091,
	NFS4ERR_WRONG_LFS = 10092,
	NFS4ERR_BADLABEL = 10093,
	NFS4ERR_OFFLOAD_NO_REQS = 10094,
	NFS4ERR_NOXATTR = 10095,
	NFS4ERR_XATTR2BIG = 10096,
};

typedef enum nfsstat4 nfsstat4;

typedef opaque attrlist4;

typedef struct {
	u32 count;
	uint32_t *element;
} bitmap4;

typedef u8 verifier4[NFS4_VERIFIER_SIZE];

typedef uint64_t nfs_cookie4;

typedef opaque nfs_fh4;

typedef opaque utf8string;

typedef utf8string utf8str_cis;

typedef utf8string utf8str_cs;

typedef utf8string utf8str_mixed;

typedef utf8str_cs component4;

typedef utf8str_cs linktext4;

typedef struct {
	u32 count;
	component4 *element;
} pathname4;

struct nfstime4 {
	int64_t seconds;
	uint32_t nseconds;
};

struct fattr4 {
	bitmap4 attrmask;
	attrlist4 attr_vals;
};

struct stateid4 {
	uint32_t seqid;
	u8 other[12];
};

typedef bool fattr4_offline;

enum { FATTR4_OFFLINE = 83 };

struct open_arguments4 {
	bitmap4 oa_share_access;
	bitmap4 oa_share_deny;
	bitmap4 oa_share_access_want;
	bitmap4 oa_open_claim;
	bitmap4 oa_create_mode;
};

enum open_args_share_access4 {
	OPEN_ARGS_SHARE_ACCESS_READ = 1,
	OPEN_ARGS_SHARE_ACCESS_WRITE = 2,
	OPEN_ARGS_SHARE_ACCESS_BOTH = 3,
};

typedef enum open_args_share_access4 open_args_share_access4;

enum open_args_share_deny4 {
	OPEN_ARGS_SHARE_DENY_NONE = 0,
	OPEN_ARGS_SHARE_DENY_READ = 1,
	OPEN_ARGS_SHARE_DENY_WRITE = 2,
	OPEN_ARGS_SHARE_DENY_BOTH = 3,
};

typedef enum open_args_share_deny4 open_args_share_deny4;

enum open_args_share_access_want4 {
	OPEN_ARGS_SHARE_ACCESS_WANT_ANY_DELEG = 3,
	OPEN_ARGS_SHARE_ACCESS_WANT_NO_DELEG = 4,
	OPEN_ARGS_SHARE_ACCESS_WANT_CANCEL = 5,
	OPEN_ARGS_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL = 17,
	OPEN_ARGS_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED = 18,
	OPEN_ARGS_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 20,
	OPEN_ARGS_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 21,
};

typedef enum open_args_share_access_want4 open_args_share_access_want4;

enum open_args_open_claim4 {
	OPEN_ARGS_OPEN_CLAIM_NULL = 0,
	OPEN_ARGS_OPEN_CLAIM_PREVIOUS = 1,
	OPEN_ARGS_OPEN_CLAIM_DELEGATE_CUR = 2,
	OPEN_ARGS_OPEN_CLAIM_DELEGATE_PREV = 3,
	OPEN_ARGS_OPEN_CLAIM_FH = 4,
	OPEN_ARGS_OPEN_CLAIM_DELEG_CUR_FH = 5,
	OPEN_ARGS_OPEN_CLAIM_DELEG_PREV_FH = 6,
};

typedef enum open_args_open_claim4 open_args_open_claim4;

enum open_args_createmode4 {
	OPEN_ARGS_CREATEMODE_UNCHECKED4 = 0,
	OPEN_ARGS_CREATE_MODE_GUARDED = 1,
	OPEN_ARGS_CREATEMODE_EXCLUSIVE4 = 2,
	OPEN_ARGS_CREATE_MODE_EXCLUSIVE4_1 = 3,
};

typedef enum open_args_createmode4 open_args_createmode4;

typedef struct open_arguments4 fattr4_open_arguments;

/*
 * Determine what OPEN supports.
 */

enum { FATTR4_OPEN_ARGUMENTS = 86 };

enum { OPEN4_RESULT_NO_OPEN_STATEID = 0x00000010 };

typedef struct nfstime4 fattr4_time_deleg_access;

typedef struct nfstime4 fattr4_time_deleg_modify;

/*
 * New RECOMMENDED Attribute for
 * delegation caching of times
 */

enum { FATTR4_TIME_DELEG_ACCESS = 84 };

enum { FATTR4_TIME_DELEG_MODIFY = 85 };

enum { OPEN4_SHARE_ACCESS_WANT_DELEG_MASK = 0xFF00 };

enum { OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE = 0x0000 };

enum { OPEN4_SHARE_ACCESS_WANT_READ_DELEG = 0x0100 };

enum { OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG = 0x0200 };

enum { OPEN4_SHARE_ACCESS_WANT_ANY_DELEG = 0x0300 };

enum { OPEN4_SHARE_ACCESS_WANT_NO_DELEG = 0x0400 };

enum { OPEN4_SHARE_ACCESS_WANT_CANCEL = 0x0500 };

enum { OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL = 0x10000 };

enum { OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED = 0x20000 };

enum { OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 0x100000 };

enum { OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 0x200000 };

enum open_delegation_type4 {
	OPEN_DELEGATE_NONE = 0,
	OPEN_DELEGATE_READ = 1,
	OPEN_DELEGATE_WRITE = 2,
	OPEN_DELEGATE_NONE_EXT = 3,
	OPEN_DELEGATE_READ_ATTRS_DELEG = 4,
	OPEN_DELEGATE_WRITE_ATTRS_DELEG = 5,
};

typedef enum open_delegation_type4 open_delegation_type4;

enum aclmodel4 {
	ACL_MODEL_NFS4 = 1,
	ACL_MODEL_POSIX_DRAFT = 2,
	ACL_MODEL_NONE = 3,
};

typedef enum aclmodel4 aclmodel4;

enum aclscope4 {
	ACL_SCOPE_FILE_OBJECT = 1,
	ACL_SCOPE_FILE_SYSTEM = 2,
	ACL_SCOPE_SERVER = 3,
};

typedef enum aclscope4 aclscope4;

enum posixacetag4 {
	POSIXACE4_TAG_USER_OBJ = 1,
	POSIXACE4_TAG_USER = 2,
	POSIXACE4_TAG_GROUP_OBJ = 3,
	POSIXACE4_TAG_GROUP = 4,
	POSIXACE4_TAG_MASK = 5,
	POSIXACE4_TAG_OTHER = 6,
};

typedef enum posixacetag4 posixacetag4;

typedef uint32_t posixaceperm4;

enum { POSIXACE4_PERM_EXECUTE = 0x00000001 };

enum { POSIXACE4_PERM_WRITE = 0x00000002 };

enum { POSIXACE4_PERM_READ = 0x00000004 };

struct posixace4 {
	posixacetag4 tag;
	posixaceperm4 perm;
	utf8str_mixed who;
};

typedef aclmodel4 fattr4_acl_trueform;

typedef aclscope4 fattr4_acl_trueform_scope;

typedef struct {
	u32 count;
	struct posixace4 *element;
} fattr4_posix_default_acl;

typedef struct {
	u32 count;
	struct posixace4 *element;
} fattr4_posix_access_acl;

/*
 * New for POSIX ACL extension
 */

enum { FATTR4_ACL_TRUEFORM = 89 };

enum { FATTR4_ACL_TRUEFORM_SCOPE = 90 };

enum { FATTR4_POSIX_DEFAULT_ACL = 91 };

enum { FATTR4_POSIX_ACCESS_ACL = 92 };

enum notify_type4 {
	NOTIFY4_CHANGE_CHILD_ATTRS = 0,
	NOTIFY4_CHANGE_DIR_ATTRS = 1,
	NOTIFY4_REMOVE_ENTRY = 2,
	NOTIFY4_ADD_ENTRY = 3,
	NOTIFY4_RENAME_ENTRY = 4,
	NOTIFY4_CHANGE_COOKIE_VERIFIER = 5,
	NOTIFY4_GFLAG_EXTEND = 6,
	NOTIFY4_AUFLAG_VALID = 7,
	NOTIFY4_AUFLAG_USER = 8,
	NOTIFY4_AUFLAG_GROUP = 9,
	NOTIFY4_AUFLAG_OTHER = 10,
	NOTIFY4_CHANGE_AUTH = 11,
	NOTIFY4_CFLAG_ORDER = 12,
	NOTIFY4_AUFLAG_GANOW = 13,
	NOTIFY4_AUFLAG_GALATER = 14,
	NOTIFY4_CHANGE_GA = 15,
	NOTIFY4_CHANGE_AMASK = 16,
};

typedef enum notify_type4 notify_type4;

struct notify_entry4 {
	component4 ne_file;
	struct fattr4 ne_attrs;
};

struct prev_entry4 {
	struct notify_entry4 pe_prev_entry;
	nfs_cookie4 pe_prev_entry_cookie;
};

struct notify_remove4 {
	struct notify_entry4 nrm_old_entry;
	nfs_cookie4 nrm_old_entry_cookie;
};

struct notify_add4 {
	struct {
		u32 count;
		struct notify_remove4 *element;
	} nad_old_entry;
	struct notify_entry4 nad_new_entry;
	struct {
		u32 count;
		nfs_cookie4 *element;
	} nad_new_entry_cookie;
	struct {
		u32 count;
		struct prev_entry4 *element;
	} nad_prev_entry;
	bool nad_last_entry;
};

struct notify_attr4 {
	struct notify_entry4 na_changed_entry;
};

struct notify_rename4 {
	struct notify_remove4 nrn_old_entry;
	struct notify_add4 nrn_new_entry;
};

struct notify_verifier4 {
	verifier4 nv_old_cookieverf;
	verifier4 nv_new_cookieverf;
};

typedef opaque notifylist4;

struct notify4 {
	bitmap4 notify_mask;
	notifylist4 notify_vals;
};

struct CB_NOTIFY4args {
	struct stateid4 cna_stateid;
	nfs_fh4 cna_fh;
	struct {
		u32 count;
		struct notify4 *element;
	} cna_changes;
};

struct CB_NOTIFY4res {
	nfsstat4 cnr_status;
};

#define NFS4_int32_t_sz                 \
	(XDR_int)
#define NFS4_uint32_t_sz                \
	(XDR_unsigned_int)
#define NFS4_int64_t_sz                 \
	(XDR_hyper)
#define NFS4_uint64_t_sz                \
	(XDR_unsigned_hyper)
#define NFS4_nfsstat4_sz                (XDR_int)
#define NFS4_attrlist4_sz               (XDR_unsigned_int)
#define NFS4_bitmap4_sz                 (XDR_unsigned_int)
#define NFS4_verifier4_sz               (XDR_QUADLEN(NFS4_VERIFIER_SIZE))
#define NFS4_nfs_cookie4_sz             \
	(NFS4_uint64_t_sz)
#define NFS4_nfs_fh4_sz                 (XDR_unsigned_int + XDR_QUADLEN(NFS4_FHSIZE))
#define NFS4_utf8string_sz              (XDR_unsigned_int)
#define NFS4_utf8str_cis_sz             \
	(NFS4_utf8string_sz)
#define NFS4_utf8str_cs_sz              \
	(NFS4_utf8string_sz)
#define NFS4_utf8str_mixed_sz           \
	(NFS4_utf8string_sz)
#define NFS4_component4_sz              \
	(NFS4_utf8str_cs_sz)
#define NFS4_linktext4_sz               \
	(NFS4_utf8str_cs_sz)
#define NFS4_pathname4_sz               (XDR_unsigned_int)
#define NFS4_nfstime4_sz                \
	(NFS4_int64_t_sz + NFS4_uint32_t_sz)
#define NFS4_fattr4_sz                  \
	(NFS4_bitmap4_sz + NFS4_attrlist4_sz)
#define NFS4_stateid4_sz                \
	(NFS4_uint32_t_sz + XDR_QUADLEN(12))
#define NFS4_fattr4_offline_sz          \
	(XDR_bool)
#define NFS4_open_arguments4_sz         \
	(NFS4_bitmap4_sz + NFS4_bitmap4_sz + NFS4_bitmap4_sz + NFS4_bitmap4_sz + NFS4_bitmap4_sz)
#define NFS4_open_args_share_access4_sz (XDR_int)
#define NFS4_open_args_share_deny4_sz   (XDR_int)
#define NFS4_open_args_share_access_want4_sz (XDR_int)
#define NFS4_open_args_open_claim4_sz   (XDR_int)
#define NFS4_open_args_createmode4_sz   (XDR_int)
#define NFS4_fattr4_open_arguments_sz   \
	(NFS4_open_arguments4_sz)
#define NFS4_fattr4_time_deleg_access_sz \
	(NFS4_nfstime4_sz)
#define NFS4_fattr4_time_deleg_modify_sz \
	(NFS4_nfstime4_sz)
#define NFS4_open_delegation_type4_sz   (XDR_int)
#define NFS4_aclmodel4_sz               (XDR_int)
#define NFS4_aclscope4_sz               (XDR_int)
#define NFS4_posixacetag4_sz            (XDR_int)
#define NFS4_posixaceperm4_sz           \
	(NFS4_uint32_t_sz)
#define NFS4_posixace4_sz               \
	(NFS4_posixacetag4_sz + NFS4_posixaceperm4_sz + NFS4_utf8str_mixed_sz)
#define NFS4_fattr4_acl_trueform_sz     \
	(NFS4_aclmodel4_sz)
#define NFS4_fattr4_acl_trueform_scope_sz \
	(NFS4_aclscope4_sz)
#define NFS4_fattr4_posix_default_acl_sz (XDR_unsigned_int)
#define NFS4_fattr4_posix_access_acl_sz (XDR_unsigned_int)
#define NFS4_notify_type4_sz            (XDR_int)
#define NFS4_notify_entry4_sz           \
	(NFS4_component4_sz + NFS4_fattr4_sz)
#define NFS4_prev_entry4_sz             \
	(NFS4_notify_entry4_sz + NFS4_nfs_cookie4_sz)
#define NFS4_notify_remove4_sz          \
	(NFS4_notify_entry4_sz + NFS4_nfs_cookie4_sz)
#define NFS4_notify_add4_sz             \
	(XDR_unsigned_int + (1 * (NFS4_notify_remove4_sz)) + NFS4_notify_entry4_sz + XDR_unsigned_int + (1 * (NFS4_nfs_cookie4_sz)) + XDR_unsigned_int + (1 * (NFS4_prev_entry4_sz)) + XDR_bool)
#define NFS4_notify_attr4_sz            \
	(NFS4_notify_entry4_sz)
#define NFS4_notify_rename4_sz          \
	(NFS4_notify_remove4_sz + NFS4_notify_add4_sz)
#define NFS4_notify_verifier4_sz        \
	(NFS4_verifier4_sz + NFS4_verifier4_sz)
#define NFS4_notifylist4_sz             (XDR_unsigned_int)
#define NFS4_notify4_sz                 \
	(NFS4_bitmap4_sz + NFS4_notifylist4_sz)
#define NFS4_CB_NOTIFY4args_sz          \
	(NFS4_stateid4_sz + NFS4_nfs_fh4_sz + XDR_unsigned_int)
#define NFS4_CB_NOTIFY4res_sz           \
	(NFS4_nfsstat4_sz)

#endif /* _LINUX_XDRGEN_NFS4_1_DEF_H */
