Contributors: 1
Author Tokens Token Proportion Commits Commit Proportion
Chuck Lever 557 100.00% 1 100.00%
Total 557 1


/* SPDX-License-Identifier: GPL-2.0 */
/* Generated by xdrgen. Manual edits will be lost. */
/* XDR specification file: ../../Documentation/sunrpc/xdr/nlm3.x */
/* XDR specification modification time: Thu Apr 23 10:56:34 2026 */

#ifndef _LINUX_XDRGEN_NLM3_DEF_H
#define _LINUX_XDRGEN_NLM3_DEF_H

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

enum { LM_MAXSTRLEN = 1024 };

enum { LM_MAXNAMELEN = 1025 };

enum { MAXNETOBJ_SZ = 1024 };

typedef opaque netobj;

enum nlm_stats {
	LCK_GRANTED = 0,
	LCK_DENIED = 1,
	LCK_DENIED_NOLOCKS = 2,
	LCK_BLOCKED = 3,
	LCK_DENIED_GRACE_PERIOD = 4,
};

typedef __be32 nlm_stats;

struct nlm_stat {
	nlm_stats stat;
};

struct nlm_res {
	netobj cookie;
	struct nlm_stat stat;
};

struct nlm_holder {
	bool exclusive;
	s32 uppid;
	netobj oh;
	u32 l_offset;
	u32 l_len;
};

struct nlm_testrply {
	nlm_stats stat;
	union {
		struct nlm_holder holder;
	} u;
};

struct nlm_testres {
	netobj cookie;
	struct nlm_testrply test_stat;
};

struct nlm_lock {
	string caller_name;
	netobj fh;
	netobj oh;
	s32 uppid;
	u32 l_offset;
	u32 l_len;
};

struct nlm_lockargs {
	netobj cookie;
	bool block;
	bool exclusive;
	struct nlm_lock alock;
	bool reclaim;
	s32 state;
};

struct nlm_cancargs {
	netobj cookie;
	bool block;
	bool exclusive;
	struct nlm_lock alock;
};

struct nlm_testargs {
	netobj cookie;
	bool exclusive;
	struct nlm_lock alock;
};

struct nlm_unlockargs {
	netobj cookie;
	struct nlm_lock alock;
};

enum fsh_mode {
	fsm_DN = 0,
	fsm_DR = 1,
	fsm_DW = 2,
	fsm_DRW = 3,
};

typedef enum fsh_mode fsh_mode;

enum fsh_access {
	fsa_NONE = 0,
	fsa_R = 1,
	fsa_W = 2,
	fsa_RW = 3,
};

typedef enum fsh_access fsh_access;

struct nlm_share {
	string caller_name;
	netobj fh;
	netobj oh;
	fsh_mode mode;
	fsh_access access;
};

struct nlm_shareargs {
	netobj cookie;
	struct nlm_share share;
	bool reclaim;
};

struct nlm_shareres {
	netobj cookie;
	nlm_stats stat;
	s32 sequence;
};

struct nlm_notify {
	string name;
	s32 state;
};

enum { SM_PRIV_SIZE = 16 };

struct nlm_notifyargs {
	struct nlm_notify notify;
	u8 private[SM_PRIV_SIZE];
};

enum {
	NLM_NULL = 0,
	NLM_TEST = 1,
	NLM_LOCK = 2,
	NLM_CANCEL = 3,
	NLM_UNLOCK = 4,
	NLM_GRANTED = 5,
	NLM_TEST_MSG = 6,
	NLM_LOCK_MSG = 7,
	NLM_CANCEL_MSG = 8,
	NLM_UNLOCK_MSG = 9,
	NLM_GRANTED_MSG = 10,
	NLM_TEST_RES = 11,
	NLM_LOCK_RES = 12,
	NLM_CANCEL_RES = 13,
	NLM_UNLOCK_RES = 14,
	NLM_GRANTED_RES = 15,
	NLM_SM_NOTIFY = 16,
	NLM_SHARE = 20,
	NLM_UNSHARE = 21,
	NLM_NM_LOCK = 22,
	NLM_FREE_ALL = 23,
};

#ifndef NLM_PROG
#define NLM_PROG (100021)
#endif

#define NLM3_netobj_sz                  (XDR_unsigned_int + XDR_QUADLEN(MAXNETOBJ_SZ))
#define NLM3_nlm_stats_sz               (XDR_int)
#define NLM3_nlm_stat_sz                \
	(NLM3_nlm_stats_sz)
#define NLM3_nlm_res_sz                 \
	(NLM3_netobj_sz + NLM3_nlm_stat_sz)
#define NLM3_nlm_holder_sz              \
	(XDR_bool + XDR_int + NLM3_netobj_sz + XDR_unsigned_int + XDR_unsigned_int)
#define NLM3_nlm_testrply_sz            \
	(NLM3_nlm_stats_sz + NLM3_nlm_holder_sz)
#define NLM3_nlm_testres_sz             \
	(NLM3_netobj_sz + NLM3_nlm_testrply_sz)
#define NLM3_nlm_lock_sz                \
	(XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM3_netobj_sz + NLM3_netobj_sz + XDR_int + XDR_unsigned_int + XDR_unsigned_int)
#define NLM3_nlm_lockargs_sz            \
	(NLM3_netobj_sz + XDR_bool + XDR_bool + NLM3_nlm_lock_sz + XDR_bool + XDR_int)
#define NLM3_nlm_cancargs_sz            \
	(NLM3_netobj_sz + XDR_bool + XDR_bool + NLM3_nlm_lock_sz)
#define NLM3_nlm_testargs_sz            \
	(NLM3_netobj_sz + XDR_bool + NLM3_nlm_lock_sz)
#define NLM3_nlm_unlockargs_sz          \
	(NLM3_netobj_sz + NLM3_nlm_lock_sz)
#define NLM3_fsh_mode_sz                (XDR_int)
#define NLM3_fsh_access_sz              (XDR_int)
#define NLM3_nlm_share_sz               \
	(XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM3_netobj_sz + NLM3_netobj_sz + NLM3_fsh_mode_sz + NLM3_fsh_access_sz)
#define NLM3_nlm_shareargs_sz           \
	(NLM3_netobj_sz + NLM3_nlm_share_sz + XDR_bool)
#define NLM3_nlm_shareres_sz            \
	(NLM3_netobj_sz + NLM3_nlm_stats_sz + XDR_int)
#define NLM3_nlm_notify_sz              \
	(XDR_unsigned_int + XDR_QUADLEN(LM_MAXNAMELEN) + XDR_long)
#define NLM3_nlm_notifyargs_sz          \
	(NLM3_nlm_notify_sz + XDR_QUADLEN(SM_PRIV_SIZE))
#define NLM3_MAX_ARGS_SZ                \
	(NLM3_nlm_lockargs_sz)

#endif /* _LINUX_XDRGEN_NLM3_DEF_H */