/* SPDX-License-Identifier: GPL-2.0 */ /* Generated by xdrgen. Manual edits will be lost. */ /* XDR specification file: ../../Documentation/sunrpc/xdr/nlm4.x */ /* XDR specification modification time: Thu Dec 25 13:10:19 2025 */ #ifndef _LINUX_XDRGEN_NLM4_DEF_H #define _LINUX_XDRGEN_NLM4_DEF_H #include #include enum { LM_MAXSTRLEN = 1024 }; enum { LM_MAXNAMELEN = 1025 }; enum { MAXNETOBJ_SZ = 1024 }; typedef opaque netobj; enum fsh4_mode { fsm_DN = 0, fsm_DR = 1, fsm_DW = 2, fsm_DRW = 3, }; typedef enum fsh4_mode fsh4_mode; enum fsh4_access { fsa_NONE = 0, fsa_R = 1, fsa_W = 2, fsa_RW = 3, }; typedef enum fsh4_access fsh4_access; enum { SM_MAXSTRLEN = 1024 }; typedef u64 uint64; typedef s64 int64; typedef u32 uint32; typedef s32 int32; enum nlm4_stats { NLM4_GRANTED = 0, NLM4_DENIED = 1, NLM4_DENIED_NOLOCKS = 2, NLM4_BLOCKED = 3, NLM4_DENIED_GRACE_PERIOD = 4, NLM4_DEADLCK = 5, NLM4_ROFS = 6, NLM4_STALE_FH = 7, NLM4_FBIG = 8, NLM4_FAILED = 9, }; typedef __be32 nlm4_stats; struct nlm4_holder { bool exclusive; int32 svid; netobj oh; uint64 l_offset; uint64 l_len; }; struct nlm4_testrply { nlm4_stats stat; union { struct nlm4_holder holder; } u; }; struct nlm4_stat { nlm4_stats stat; }; struct nlm4_res { netobj cookie; struct nlm4_stat stat; }; struct nlm4_testres { netobj cookie; struct nlm4_testrply stat; }; struct nlm4_lock { string caller_name; netobj fh; netobj oh; int32 svid; uint64 l_offset; uint64 l_len; }; struct nlm4_lockargs { netobj cookie; bool block; bool exclusive; struct nlm4_lock alock; bool reclaim; int32 state; }; struct nlm4_cancargs { netobj cookie; bool block; bool exclusive; struct nlm4_lock alock; }; struct nlm4_testargs { netobj cookie; bool exclusive; struct nlm4_lock alock; }; struct nlm4_unlockargs { netobj cookie; struct nlm4_lock alock; }; struct nlm4_share { string caller_name; netobj fh; netobj oh; fsh4_mode mode; fsh4_access access; }; struct nlm4_shareargs { netobj cookie; struct nlm4_share share; bool reclaim; }; struct nlm4_shareres { netobj cookie; nlm4_stats stat; int32 sequence; }; struct nlm4_notify { string name; int32 state; }; enum { SM_PRIV_SIZE = 16 }; struct nlm4_notifyargs { struct nlm4_notify notify; u8 private[SM_PRIV_SIZE]; }; enum { NLMPROC4_NULL = 0, NLMPROC4_TEST = 1, NLMPROC4_LOCK = 2, NLMPROC4_CANCEL = 3, NLMPROC4_UNLOCK = 4, NLMPROC4_GRANTED = 5, NLMPROC4_TEST_MSG = 6, NLMPROC4_LOCK_MSG = 7, NLMPROC4_CANCEL_MSG = 8, NLMPROC4_UNLOCK_MSG = 9, NLMPROC4_GRANTED_MSG = 10, NLMPROC4_TEST_RES = 11, NLMPROC4_LOCK_RES = 12, NLMPROC4_CANCEL_RES = 13, NLMPROC4_UNLOCK_RES = 14, NLMPROC4_GRANTED_RES = 15, NLMPROC4_SM_NOTIFY = 16, NLMPROC4_SHARE = 20, NLMPROC4_UNSHARE = 21, NLMPROC4_NM_LOCK = 22, NLMPROC4_FREE_ALL = 23, }; #ifndef NLM4_PROG #define NLM4_PROG (100021) #endif #define NLM4_netobj_sz (XDR_unsigned_int + XDR_QUADLEN(MAXNETOBJ_SZ)) #define NLM4_fsh4_mode_sz (XDR_int) #define NLM4_fsh4_access_sz (XDR_int) #define NLM4_uint64_sz \ (XDR_unsigned_hyper) #define NLM4_int64_sz \ (XDR_hyper) #define NLM4_uint32_sz \ (XDR_unsigned_long) #define NLM4_int32_sz \ (XDR_long) #define NLM4_nlm4_stats_sz (XDR_int) #define NLM4_nlm4_holder_sz \ (XDR_bool + NLM4_int32_sz + NLM4_netobj_sz + NLM4_uint64_sz + NLM4_uint64_sz) #define NLM4_nlm4_testrply_sz \ (NLM4_nlm4_stats_sz + NLM4_nlm4_holder_sz) #define NLM4_nlm4_stat_sz \ (NLM4_nlm4_stats_sz) #define NLM4_nlm4_res_sz \ (NLM4_netobj_sz + NLM4_nlm4_stat_sz) #define NLM4_nlm4_testres_sz \ (NLM4_netobj_sz + NLM4_nlm4_testrply_sz) #define NLM4_nlm4_lock_sz \ (XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM4_netobj_sz + NLM4_netobj_sz + NLM4_int32_sz + NLM4_uint64_sz + NLM4_uint64_sz) #define NLM4_nlm4_lockargs_sz \ (NLM4_netobj_sz + XDR_bool + XDR_bool + NLM4_nlm4_lock_sz + XDR_bool + NLM4_int32_sz) #define NLM4_nlm4_cancargs_sz \ (NLM4_netobj_sz + XDR_bool + XDR_bool + NLM4_nlm4_lock_sz) #define NLM4_nlm4_testargs_sz \ (NLM4_netobj_sz + XDR_bool + NLM4_nlm4_lock_sz) #define NLM4_nlm4_unlockargs_sz \ (NLM4_netobj_sz + NLM4_nlm4_lock_sz) #define NLM4_nlm4_share_sz \ (XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM4_netobj_sz + NLM4_netobj_sz + NLM4_fsh4_mode_sz + NLM4_fsh4_access_sz) #define NLM4_nlm4_shareargs_sz \ (NLM4_netobj_sz + NLM4_nlm4_share_sz + XDR_bool) #define NLM4_nlm4_shareres_sz \ (NLM4_netobj_sz + NLM4_nlm4_stats_sz + NLM4_int32_sz) #define NLM4_nlm4_notify_sz \ (XDR_unsigned_int + XDR_QUADLEN(LM_MAXNAMELEN) + NLM4_int32_sz) #define NLM4_nlm4_notifyargs_sz \ (NLM4_nlm4_notify_sz + XDR_QUADLEN(SM_PRIV_SIZE)) #define NLM4_MAX_ARGS_SZ \ (NLM4_nlm4_lockargs_sz) #endif /* _LINUX_XDRGEN_NLM4_DEF_H */