Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,299 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2024 Oracle and/or its affiliates.
*
* This header defines XDR data type primitives specified in
* Section 4 of RFC 4506, used by RPC programs implemented
* in the Linux kernel.
*/
#ifndef _SUNRPC_XDRGEN__BUILTINS_H_
#define _SUNRPC_XDRGEN__BUILTINS_H_
#include <linux/sunrpc/xdr.h>
static inline bool
xdrgen_decode_void(struct xdr_stream *xdr)
{
return true;
}
static inline bool
xdrgen_encode_void(struct xdr_stream *xdr)
{
return true;
}
static inline bool
xdrgen_decode_bool(struct xdr_stream *xdr, bool *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*ptr = (*p != xdr_zero);
return true;
}
static inline bool
xdrgen_encode_bool(struct xdr_stream *xdr, bool val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*p = val ? xdr_one : xdr_zero;
return true;
}
/*
* De facto (non-standard but commonly implemented) signed short type:
* - Wire sends sign-extended 32-bit value (e.g., 0xFFFFFFFF)
* - be32_to_cpup() returns u32 (0xFFFFFFFF)
* - Explicit (s16) cast truncates to 16 bits (0xFFFF = -1)
*/
static inline bool
xdrgen_decode_short(struct xdr_stream *xdr, s16 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*ptr = (s16)be32_to_cpup(p);
return true;
}
/*
* De facto (non-standard but commonly implemented) signed short type:
* - C integer promotion sign-extends s16 val to int before passing to
* cpu_to_be32()
* - This is well-defined: -1 as s16 -1 as int 0xFFFFFFFF on wire
*/
static inline bool
xdrgen_encode_short(struct xdr_stream *xdr, s16 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*p = cpu_to_be32(val);
return true;
}
/*
* De facto (non-standard but commonly implemented) unsigned short type:
* 16-bit integer zero-extended to fill one XDR_UNIT.
*/
static inline bool
xdrgen_decode_unsigned_short(struct xdr_stream *xdr, u16 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*ptr = (u16)be32_to_cpup(p);
return true;
}
static inline bool
xdrgen_encode_unsigned_short(struct xdr_stream *xdr, u16 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*p = cpu_to_be32(val);
return true;
}
static inline bool
xdrgen_decode_int(struct xdr_stream *xdr, s32 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*ptr = be32_to_cpup(p);
return true;
}
static inline bool
xdrgen_encode_int(struct xdr_stream *xdr, s32 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*p = cpu_to_be32(val);
return true;
}
static inline bool
xdrgen_decode_unsigned_int(struct xdr_stream *xdr, u32 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*ptr = be32_to_cpup(p);
return true;
}
static inline bool
xdrgen_encode_unsigned_int(struct xdr_stream *xdr, u32 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*p = cpu_to_be32(val);
return true;
}
static inline bool
xdrgen_decode_long(struct xdr_stream *xdr, s32 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*ptr = be32_to_cpup(p);
return true;
}
static inline bool
xdrgen_encode_long(struct xdr_stream *xdr, s32 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*p = cpu_to_be32(val);
return true;
}
static inline bool
xdrgen_decode_unsigned_long(struct xdr_stream *xdr, u32 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*ptr = be32_to_cpup(p);
return true;
}
static inline bool
xdrgen_encode_unsigned_long(struct xdr_stream *xdr, u32 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT);
if (unlikely(!p))
return false;
*p = cpu_to_be32(val);
return true;
}
static inline bool
xdrgen_decode_hyper(struct xdr_stream *xdr, s64 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT * 2);
if (unlikely(!p))
return false;
*ptr = get_unaligned_be64(p);
return true;
}
static inline bool
xdrgen_encode_hyper(struct xdr_stream *xdr, s64 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT * 2);
if (unlikely(!p))
return false;
put_unaligned_be64(val, p);
return true;
}
static inline bool
xdrgen_decode_unsigned_hyper(struct xdr_stream *xdr, u64 *ptr)
{
__be32 *p = xdr_inline_decode(xdr, XDR_UNIT * 2);
if (unlikely(!p))
return false;
*ptr = get_unaligned_be64(p);
return true;
}
static inline bool
xdrgen_encode_unsigned_hyper(struct xdr_stream *xdr, u64 val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT * 2);
if (unlikely(!p))
return false;
put_unaligned_be64(val, p);
return true;
}
static inline bool
xdrgen_decode_string(struct xdr_stream *xdr, string *ptr, u32 maxlen)
{
__be32 *p;
u32 len;
if (unlikely(xdr_stream_decode_u32(xdr, &len) < 0))
return false;
if (unlikely(maxlen && len > maxlen))
return false;
p = xdr_inline_decode(xdr, len);
if (unlikely(!p))
return false;
ptr->data = (unsigned char *)p;
ptr->len = len;
return true;
}
static inline bool
xdrgen_encode_string(struct xdr_stream *xdr, string val, u32 maxlen)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT + xdr_align_size(val.len));
if (unlikely(!p))
return false;
xdr_encode_opaque(p, val.data, val.len);
return true;
}
static inline bool
xdrgen_decode_opaque(struct xdr_stream *xdr, opaque *ptr, u32 maxlen)
{
__be32 *p;
u32 len;
if (unlikely(xdr_stream_decode_u32(xdr, &len) < 0))
return false;
if (unlikely(maxlen && len > maxlen))
return false;
p = xdr_inline_decode(xdr, len);
if (unlikely(!p))
return false;
ptr->data = (u8 *)p;
ptr->len = len;
return true;
}
static inline bool
xdrgen_encode_opaque(struct xdr_stream *xdr, opaque val)
{
__be32 *p = xdr_reserve_space(xdr, XDR_UNIT + xdr_align_size(val.len));
if (unlikely(!p))
return false;
xdr_encode_opaque(p, val.data, val.len);
return true;
}
#endif /* _SUNRPC_XDRGEN__BUILTINS_H_ */
@@ -0,0 +1,35 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2024 Oracle and/or its affiliates.
*
* This header defines XDR data type primitives specified in
* Section 4 of RFC 4506, used by RPC programs implemented
* in the Linux kernel.
*/
#ifndef _SUNRPC_XDRGEN__DEFS_H_
#define _SUNRPC_XDRGEN__DEFS_H_
#define TRUE (true)
#define FALSE (false)
typedef struct {
u32 len;
unsigned char *data;
} string;
typedef struct {
u32 len;
u8 *data;
} opaque;
#define XDR_void (0)
#define XDR_bool (1)
#define XDR_int (1)
#define XDR_unsigned_int (1)
#define XDR_long (1)
#define XDR_unsigned_long (1)
#define XDR_hyper (2)
#define XDR_unsigned_hyper (2)
#endif /* _SUNRPC_XDRGEN__DEFS_H_ */
@@ -0,0 +1,263 @@
/* 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 */
@@ -0,0 +1,210 @@
/* 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 */
@@ -0,0 +1,233 @@
/* 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 <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 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 */