/* 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: Thu Jan  8 23:12:07 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 s64 int64_t;

typedef u32 uint32_t;

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

typedef opaque utf8string;

typedef utf8string utf8str_cis;

typedef utf8string utf8str_cs;

typedef utf8string utf8str_mixed;

struct nfstime4 {
	int64_t seconds;
	uint32_t nseconds;
};

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 };

#define NFS4_int64_t_sz                 \
	(XDR_hyper)
#define NFS4_uint32_t_sz                \
	(XDR_unsigned_int)
#define NFS4_bitmap4_sz                 (XDR_unsigned_int)
#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_nfstime4_sz                \
	(NFS4_int64_t_sz + NFS4_uint32_t_sz)
#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)

#endif /* _LINUX_XDRGEN_NFS4_1_DEF_H */
