/* 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: Mon Oct 14 09:10:13 2024 */

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

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;

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;

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;

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

#endif /* _LINUX_XDRGEN_NFS4_1_DEF_H */
