Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Documentation: Add the RPC language description of NLM version 4

In order to generate source code to encode and decode NLMv4 protocol
elements, include a copy of the RPC language description of NLMv4
for xdrgen to process. The language description is an amalgam of
RFC 1813 and the Open Group's XNFS specification:

https://pubs.opengroup.org/onlinepubs/9629799/chap10.htm

The C code committed here was generated from the new nlm4.x file
using tools/net/sunrpc/xdrgen/xdrgen.

The goals of replacing hand-written XDR functions with ones that
are tool-generated are to improve memory safety and make XDR
encoding and decoding less brittle to maintain.

The xdrgen utility derives both the type definitions and the
encode/decode functions directly from protocol specifications,
using names and symbols familiar to anyone who knows those specs.
Unlike hand-written code that can inadvertently diverge from the
specification, xdrgen guarantees that the generated code matches
the specification exactly.

We would eventually like xdrgen to generate Rust code as well,
making the conversion of the kernel's NFS stacks to use Rust just
a little easier for us.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+1229 -1
+211
Documentation/sunrpc/xdr/nlm4.x
··· 1 + /* 2 + * This file was extracted by hand from 3 + * https://www.rfc-editor.org/rfc/rfc1813.html . 4 + * 5 + * Note that RFC 1813 is Informational. Its official date of 6 + * publication (June 1995) is before the IETF required its RFCs to 7 + * carry an explicit copyright or other IP ownership notices. 8 + * 9 + * Note also that RFC 1813 does not specify the whole NLM4 protocol. 10 + * In particular, the argument and result types are not present in 11 + * that document, and had to be reverse-engineered. 12 + */ 13 + 14 + /* 15 + * The NLMv4 protocol 16 + */ 17 + 18 + pragma header nlm4; 19 + 20 + /* 21 + * The following definitions are missing in RFC 1813, 22 + * but can be found in the OpenNetworking Network Lock 23 + * Manager protocol: 24 + * 25 + * https://pubs.opengroup.org/onlinepubs/9629799/chap10.htm 26 + */ 27 + 28 + const LM_MAXSTRLEN = 1024; 29 + 30 + const LM_MAXNAMELEN = 1025; 31 + 32 + const MAXNETOBJ_SZ = 1024; 33 + 34 + typedef opaque netobj<MAXNETOBJ_SZ>; 35 + 36 + enum fsh4_mode { 37 + fsm_DN = 0, /* deny none */ 38 + fsm_DR = 1, /* deny read */ 39 + fsm_DW = 2, /* deny write */ 40 + fsm_DRW = 3 /* deny read/write */ 41 + }; 42 + 43 + enum fsh4_access { 44 + fsa_NONE = 0, /* for completeness */ 45 + fsa_R = 1, /* read-only */ 46 + fsa_W = 2, /* write-only */ 47 + fsa_RW = 3 /* read/write */ 48 + }; 49 + 50 + /* 51 + * The following definitions come from the OpenNetworking 52 + * Network Status Monitor protocol: 53 + * 54 + * https://pubs.opengroup.org/onlinepubs/9629799/chap11.htm 55 + */ 56 + 57 + const SM_MAXSTRLEN = 1024; 58 + 59 + /* 60 + * The NLM protocol as extracted from: 61 + * https://tools.ietf.org/html/rfc1813 Appendix II 62 + */ 63 + 64 + typedef unsigned hyper uint64; 65 + 66 + typedef hyper int64; 67 + 68 + typedef unsigned long uint32; 69 + 70 + typedef long int32; 71 + 72 + enum nlm4_stats { 73 + NLM4_GRANTED = 0, 74 + NLM4_DENIED = 1, 75 + NLM4_DENIED_NOLOCKS = 2, 76 + NLM4_BLOCKED = 3, 77 + NLM4_DENIED_GRACE_PERIOD = 4, 78 + NLM4_DEADLCK = 5, 79 + NLM4_ROFS = 6, 80 + NLM4_STALE_FH = 7, 81 + NLM4_FBIG = 8, 82 + NLM4_FAILED = 9 83 + }; 84 + 85 + pragma big_endian nlm4_stats; 86 + 87 + struct nlm4_holder { 88 + bool exclusive; 89 + int32 svid; 90 + netobj oh; 91 + uint64 l_offset; 92 + uint64 l_len; 93 + }; 94 + 95 + union nlm4_testrply switch (nlm4_stats stat) { 96 + case NLM4_DENIED: 97 + nlm4_holder holder; 98 + default: 99 + void; 100 + }; 101 + 102 + struct nlm4_stat { 103 + nlm4_stats stat; 104 + }; 105 + 106 + struct nlm4_res { 107 + netobj cookie; 108 + nlm4_stat stat; 109 + }; 110 + 111 + struct nlm4_testres { 112 + netobj cookie; 113 + nlm4_testrply stat; 114 + }; 115 + 116 + struct nlm4_lock { 117 + string caller_name<LM_MAXSTRLEN>; 118 + netobj fh; 119 + netobj oh; 120 + int32 svid; 121 + uint64 l_offset; 122 + uint64 l_len; 123 + }; 124 + 125 + struct nlm4_lockargs { 126 + netobj cookie; 127 + bool block; 128 + bool exclusive; 129 + nlm4_lock alock; 130 + bool reclaim; 131 + int32 state; 132 + }; 133 + 134 + struct nlm4_cancargs { 135 + netobj cookie; 136 + bool block; 137 + bool exclusive; 138 + nlm4_lock alock; 139 + }; 140 + 141 + struct nlm4_testargs { 142 + netobj cookie; 143 + bool exclusive; 144 + nlm4_lock alock; 145 + }; 146 + 147 + struct nlm4_unlockargs { 148 + netobj cookie; 149 + nlm4_lock alock; 150 + }; 151 + 152 + struct nlm4_share { 153 + string caller_name<LM_MAXSTRLEN>; 154 + netobj fh; 155 + netobj oh; 156 + fsh4_mode mode; 157 + fsh4_access access; 158 + }; 159 + 160 + struct nlm4_shareargs { 161 + netobj cookie; 162 + nlm4_share share; 163 + bool reclaim; 164 + }; 165 + 166 + struct nlm4_shareres { 167 + netobj cookie; 168 + nlm4_stats stat; 169 + int32 sequence; 170 + }; 171 + 172 + struct nlm4_notify { 173 + string name<LM_MAXNAMELEN>; 174 + int32 state; 175 + }; 176 + 177 + /* 178 + * Argument for the Linux-private SM_NOTIFY procedure 179 + */ 180 + const SM_PRIV_SIZE = 16; 181 + 182 + struct nlm4_notifyargs { 183 + nlm4_notify notify; 184 + opaque private[SM_PRIV_SIZE]; 185 + }; 186 + 187 + program NLM4_PROG { 188 + version NLM4_VERS { 189 + void NLMPROC4_NULL(void) = 0; 190 + nlm4_testres NLMPROC4_TEST(nlm4_testargs) = 1; 191 + nlm4_res NLMPROC4_LOCK(nlm4_lockargs) = 2; 192 + nlm4_res NLMPROC4_CANCEL(nlm4_cancargs) = 3; 193 + nlm4_res NLMPROC4_UNLOCK(nlm4_unlockargs) = 4; 194 + nlm4_res NLMPROC4_GRANTED(nlm4_testargs) = 5; 195 + void NLMPROC4_TEST_MSG(nlm4_testargs) = 6; 196 + void NLMPROC4_LOCK_MSG(nlm4_lockargs) = 7; 197 + void NLMPROC4_CANCEL_MSG(nlm4_cancargs) = 8; 198 + void NLMPROC4_UNLOCK_MSG(nlm4_unlockargs) = 9; 199 + void NLMPROC4_GRANTED_MSG(nlm4_testargs) = 10; 200 + void NLMPROC4_TEST_RES(nlm4_testres) = 11; 201 + void NLMPROC4_LOCK_RES(nlm4_res) = 12; 202 + void NLMPROC4_CANCEL_RES(nlm4_res) = 13; 203 + void NLMPROC4_UNLOCK_RES(nlm4_res) = 14; 204 + void NLMPROC4_GRANTED_RES(nlm4_res) = 15; 205 + void NLMPROC4_SM_NOTIFY(nlm4_notifyargs) = 16; 206 + nlm4_shareres NLMPROC4_SHARE(nlm4_shareargs) = 20; 207 + nlm4_shareres NLMPROC4_UNSHARE(nlm4_shareargs) = 21; 208 + nlm4_res NLMPROC4_NM_LOCK(nlm4_lockargs) = 22; 209 + void NLMPROC4_FREE_ALL(nlm4_notify) = 23; 210 + } = 4; 211 + } = 100021;
+29 -1
fs/lockd/Makefile
··· 9 9 10 10 lockd-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o \ 11 11 svcshare.o svcproc.o svcsubs.o mon.o trace.o xdr.o netlink.o 12 - lockd-$(CONFIG_LOCKD_V4) += clnt4xdr.o xdr4.o svc4proc.o 12 + lockd-$(CONFIG_LOCKD_V4) += clnt4xdr.o xdr4.o svc4proc.o nlm4xdr_gen.o 13 13 lockd-$(CONFIG_PROC_FS) += procfs.o 14 + 15 + # 16 + # XDR code generation (requires Python and additional packages) 17 + # 18 + # The generated *xdr_gen.{h,c} files are checked into git. Normal kernel 19 + # builds do not require the xdrgen tool or its Python dependencies. 20 + # 21 + # Developers modifying .x files in Documentation/sunrpc/xdr/ should run 22 + # "make xdrgen" to regenerate the affected files. 23 + # 24 + .PHONY: xdrgen 25 + 26 + XDRGEN = ../../tools/net/sunrpc/xdrgen/xdrgen 27 + 28 + XDRGEN_DEFINITIONS = ../../include/linux/sunrpc/xdrgen/nlm4.h 29 + XDRGEN_DECLARATIONS = nlm4xdr_gen.h 30 + XDRGEN_SOURCE = nlm4xdr_gen.c 31 + 32 + xdrgen: $(XDRGEN_DEFINITIONS) $(XDRGEN_DECLARATIONS) $(XDRGEN_SOURCE) 33 + 34 + ../../include/linux/sunrpc/xdrgen/nlm4.h: ../../Documentation/sunrpc/xdr/nlm4.x 35 + $(XDRGEN) definitions $< > $@ 36 + 37 + nlm4xdr_gen.h: ../../Documentation/sunrpc/xdr/nlm4.x 38 + $(XDRGEN) declarations $< > $@ 39 + 40 + nlm4xdr_gen.c: ../../Documentation/sunrpc/xdr/nlm4.x 41 + $(XDRGEN) source --peer server $< > $@
+724
fs/lockd/nlm4xdr_gen.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + // Generated by xdrgen. Manual edits will be lost. 3 + // XDR specification file: ../../Documentation/sunrpc/xdr/nlm4.x 4 + // XDR specification modification time: Thu Dec 25 13:10:19 2025 5 + 6 + #include <linux/sunrpc/svc.h> 7 + 8 + #include "nlm4xdr_gen.h" 9 + 10 + static bool __maybe_unused 11 + xdrgen_decode_netobj(struct xdr_stream *xdr, netobj *ptr) 12 + { 13 + return xdrgen_decode_opaque(xdr, ptr, MAXNETOBJ_SZ); 14 + } 15 + 16 + static bool __maybe_unused 17 + xdrgen_decode_fsh4_mode(struct xdr_stream *xdr, fsh4_mode *ptr) 18 + { 19 + u32 val; 20 + 21 + if (xdr_stream_decode_u32(xdr, &val) < 0) 22 + return false; 23 + *ptr = val; 24 + return true; 25 + } 26 + 27 + static bool __maybe_unused 28 + xdrgen_decode_fsh4_access(struct xdr_stream *xdr, fsh4_access *ptr) 29 + { 30 + u32 val; 31 + 32 + if (xdr_stream_decode_u32(xdr, &val) < 0) 33 + return false; 34 + *ptr = val; 35 + return true; 36 + } 37 + 38 + static bool __maybe_unused 39 + xdrgen_decode_uint64(struct xdr_stream *xdr, uint64 *ptr) 40 + { 41 + return xdrgen_decode_unsigned_hyper(xdr, ptr); 42 + } 43 + 44 + static bool __maybe_unused 45 + xdrgen_decode_int64(struct xdr_stream *xdr, int64 *ptr) 46 + { 47 + return xdrgen_decode_hyper(xdr, ptr); 48 + } 49 + 50 + static bool __maybe_unused 51 + xdrgen_decode_uint32(struct xdr_stream *xdr, uint32 *ptr) 52 + { 53 + return xdrgen_decode_unsigned_long(xdr, ptr); 54 + } 55 + 56 + static bool __maybe_unused 57 + xdrgen_decode_int32(struct xdr_stream *xdr, int32 *ptr) 58 + { 59 + return xdrgen_decode_long(xdr, ptr); 60 + } 61 + 62 + static bool __maybe_unused 63 + xdrgen_decode_nlm4_stats(struct xdr_stream *xdr, nlm4_stats *ptr) 64 + { 65 + return xdr_stream_decode_be32(xdr, ptr) == 0; 66 + } 67 + 68 + static bool __maybe_unused 69 + xdrgen_decode_nlm4_holder(struct xdr_stream *xdr, struct nlm4_holder *ptr) 70 + { 71 + if (!xdrgen_decode_bool(xdr, &ptr->exclusive)) 72 + return false; 73 + if (!xdrgen_decode_int32(xdr, &ptr->svid)) 74 + return false; 75 + if (!xdrgen_decode_netobj(xdr, &ptr->oh)) 76 + return false; 77 + if (!xdrgen_decode_uint64(xdr, &ptr->l_offset)) 78 + return false; 79 + if (!xdrgen_decode_uint64(xdr, &ptr->l_len)) 80 + return false; 81 + return true; 82 + } 83 + 84 + static bool __maybe_unused 85 + xdrgen_decode_nlm4_testrply(struct xdr_stream *xdr, struct nlm4_testrply *ptr) 86 + { 87 + if (!xdrgen_decode_nlm4_stats(xdr, &ptr->stat)) 88 + return false; 89 + switch (ptr->stat) { 90 + case __constant_cpu_to_be32(NLM4_DENIED): 91 + if (!xdrgen_decode_nlm4_holder(xdr, &ptr->u.holder)) 92 + return false; 93 + break; 94 + default: 95 + break; 96 + } 97 + return true; 98 + } 99 + 100 + static bool __maybe_unused 101 + xdrgen_decode_nlm4_stat(struct xdr_stream *xdr, struct nlm4_stat *ptr) 102 + { 103 + if (!xdrgen_decode_nlm4_stats(xdr, &ptr->stat)) 104 + return false; 105 + return true; 106 + } 107 + 108 + static bool __maybe_unused 109 + xdrgen_decode_nlm4_res(struct xdr_stream *xdr, struct nlm4_res *ptr) 110 + { 111 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 112 + return false; 113 + if (!xdrgen_decode_nlm4_stat(xdr, &ptr->stat)) 114 + return false; 115 + return true; 116 + } 117 + 118 + static bool __maybe_unused 119 + xdrgen_decode_nlm4_testres(struct xdr_stream *xdr, struct nlm4_testres *ptr) 120 + { 121 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 122 + return false; 123 + if (!xdrgen_decode_nlm4_testrply(xdr, &ptr->stat)) 124 + return false; 125 + return true; 126 + } 127 + 128 + static bool __maybe_unused 129 + xdrgen_decode_nlm4_lock(struct xdr_stream *xdr, struct nlm4_lock *ptr) 130 + { 131 + if (!xdrgen_decode_string(xdr, (string *)ptr, LM_MAXSTRLEN)) 132 + return false; 133 + if (!xdrgen_decode_netobj(xdr, &ptr->fh)) 134 + return false; 135 + if (!xdrgen_decode_netobj(xdr, &ptr->oh)) 136 + return false; 137 + if (!xdrgen_decode_int32(xdr, &ptr->svid)) 138 + return false; 139 + if (!xdrgen_decode_uint64(xdr, &ptr->l_offset)) 140 + return false; 141 + if (!xdrgen_decode_uint64(xdr, &ptr->l_len)) 142 + return false; 143 + return true; 144 + } 145 + 146 + static bool __maybe_unused 147 + xdrgen_decode_nlm4_lockargs(struct xdr_stream *xdr, struct nlm4_lockargs *ptr) 148 + { 149 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 150 + return false; 151 + if (!xdrgen_decode_bool(xdr, &ptr->block)) 152 + return false; 153 + if (!xdrgen_decode_bool(xdr, &ptr->exclusive)) 154 + return false; 155 + if (!xdrgen_decode_nlm4_lock(xdr, &ptr->alock)) 156 + return false; 157 + if (!xdrgen_decode_bool(xdr, &ptr->reclaim)) 158 + return false; 159 + if (!xdrgen_decode_int32(xdr, &ptr->state)) 160 + return false; 161 + return true; 162 + } 163 + 164 + static bool __maybe_unused 165 + xdrgen_decode_nlm4_cancargs(struct xdr_stream *xdr, struct nlm4_cancargs *ptr) 166 + { 167 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 168 + return false; 169 + if (!xdrgen_decode_bool(xdr, &ptr->block)) 170 + return false; 171 + if (!xdrgen_decode_bool(xdr, &ptr->exclusive)) 172 + return false; 173 + if (!xdrgen_decode_nlm4_lock(xdr, &ptr->alock)) 174 + return false; 175 + return true; 176 + } 177 + 178 + static bool __maybe_unused 179 + xdrgen_decode_nlm4_testargs(struct xdr_stream *xdr, struct nlm4_testargs *ptr) 180 + { 181 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 182 + return false; 183 + if (!xdrgen_decode_bool(xdr, &ptr->exclusive)) 184 + return false; 185 + if (!xdrgen_decode_nlm4_lock(xdr, &ptr->alock)) 186 + return false; 187 + return true; 188 + } 189 + 190 + static bool __maybe_unused 191 + xdrgen_decode_nlm4_unlockargs(struct xdr_stream *xdr, struct nlm4_unlockargs *ptr) 192 + { 193 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 194 + return false; 195 + if (!xdrgen_decode_nlm4_lock(xdr, &ptr->alock)) 196 + return false; 197 + return true; 198 + } 199 + 200 + static bool __maybe_unused 201 + xdrgen_decode_nlm4_share(struct xdr_stream *xdr, struct nlm4_share *ptr) 202 + { 203 + if (!xdrgen_decode_string(xdr, (string *)ptr, LM_MAXSTRLEN)) 204 + return false; 205 + if (!xdrgen_decode_netobj(xdr, &ptr->fh)) 206 + return false; 207 + if (!xdrgen_decode_netobj(xdr, &ptr->oh)) 208 + return false; 209 + if (!xdrgen_decode_fsh4_mode(xdr, &ptr->mode)) 210 + return false; 211 + if (!xdrgen_decode_fsh4_access(xdr, &ptr->access)) 212 + return false; 213 + return true; 214 + } 215 + 216 + static bool __maybe_unused 217 + xdrgen_decode_nlm4_shareargs(struct xdr_stream *xdr, struct nlm4_shareargs *ptr) 218 + { 219 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 220 + return false; 221 + if (!xdrgen_decode_nlm4_share(xdr, &ptr->share)) 222 + return false; 223 + if (!xdrgen_decode_bool(xdr, &ptr->reclaim)) 224 + return false; 225 + return true; 226 + } 227 + 228 + static bool __maybe_unused 229 + xdrgen_decode_nlm4_shareres(struct xdr_stream *xdr, struct nlm4_shareres *ptr) 230 + { 231 + if (!xdrgen_decode_netobj(xdr, &ptr->cookie)) 232 + return false; 233 + if (!xdrgen_decode_nlm4_stats(xdr, &ptr->stat)) 234 + return false; 235 + if (!xdrgen_decode_int32(xdr, &ptr->sequence)) 236 + return false; 237 + return true; 238 + } 239 + 240 + static bool __maybe_unused 241 + xdrgen_decode_nlm4_notify(struct xdr_stream *xdr, struct nlm4_notify *ptr) 242 + { 243 + if (!xdrgen_decode_string(xdr, (string *)ptr, LM_MAXNAMELEN)) 244 + return false; 245 + if (!xdrgen_decode_int32(xdr, &ptr->state)) 246 + return false; 247 + return true; 248 + } 249 + 250 + static bool __maybe_unused 251 + xdrgen_decode_nlm4_notifyargs(struct xdr_stream *xdr, struct nlm4_notifyargs *ptr) 252 + { 253 + if (!xdrgen_decode_nlm4_notify(xdr, &ptr->notify)) 254 + return false; 255 + if (xdr_stream_decode_opaque_fixed(xdr, ptr->private, SM_PRIV_SIZE) < 0) 256 + return false; 257 + return true; 258 + } 259 + 260 + /** 261 + * nlm4_svc_decode_void - Decode a void argument 262 + * @rqstp: RPC transaction context 263 + * @xdr: source XDR data stream 264 + * 265 + * Return values: 266 + * %true: procedure arguments decoded successfully 267 + * %false: decode failed 268 + */ 269 + bool nlm4_svc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr) 270 + { 271 + return xdrgen_decode_void(xdr); 272 + } 273 + 274 + /** 275 + * nlm4_svc_decode_nlm4_testargs - Decode a nlm4_testargs argument 276 + * @rqstp: RPC transaction context 277 + * @xdr: source XDR data stream 278 + * 279 + * Return values: 280 + * %true: procedure arguments decoded successfully 281 + * %false: decode failed 282 + */ 283 + bool nlm4_svc_decode_nlm4_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr) 284 + { 285 + struct nlm4_testargs *argp = rqstp->rq_argp; 286 + 287 + return xdrgen_decode_nlm4_testargs(xdr, argp); 288 + } 289 + 290 + /** 291 + * nlm4_svc_decode_nlm4_lockargs - Decode a nlm4_lockargs argument 292 + * @rqstp: RPC transaction context 293 + * @xdr: source XDR data stream 294 + * 295 + * Return values: 296 + * %true: procedure arguments decoded successfully 297 + * %false: decode failed 298 + */ 299 + bool nlm4_svc_decode_nlm4_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr) 300 + { 301 + struct nlm4_lockargs *argp = rqstp->rq_argp; 302 + 303 + return xdrgen_decode_nlm4_lockargs(xdr, argp); 304 + } 305 + 306 + /** 307 + * nlm4_svc_decode_nlm4_cancargs - Decode a nlm4_cancargs argument 308 + * @rqstp: RPC transaction context 309 + * @xdr: source XDR data stream 310 + * 311 + * Return values: 312 + * %true: procedure arguments decoded successfully 313 + * %false: decode failed 314 + */ 315 + bool nlm4_svc_decode_nlm4_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr) 316 + { 317 + struct nlm4_cancargs *argp = rqstp->rq_argp; 318 + 319 + return xdrgen_decode_nlm4_cancargs(xdr, argp); 320 + } 321 + 322 + /** 323 + * nlm4_svc_decode_nlm4_unlockargs - Decode a nlm4_unlockargs argument 324 + * @rqstp: RPC transaction context 325 + * @xdr: source XDR data stream 326 + * 327 + * Return values: 328 + * %true: procedure arguments decoded successfully 329 + * %false: decode failed 330 + */ 331 + bool nlm4_svc_decode_nlm4_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr) 332 + { 333 + struct nlm4_unlockargs *argp = rqstp->rq_argp; 334 + 335 + return xdrgen_decode_nlm4_unlockargs(xdr, argp); 336 + } 337 + 338 + /** 339 + * nlm4_svc_decode_nlm4_testres - Decode a nlm4_testres argument 340 + * @rqstp: RPC transaction context 341 + * @xdr: source XDR data stream 342 + * 343 + * Return values: 344 + * %true: procedure arguments decoded successfully 345 + * %false: decode failed 346 + */ 347 + bool nlm4_svc_decode_nlm4_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 348 + { 349 + struct nlm4_testres *argp = rqstp->rq_argp; 350 + 351 + return xdrgen_decode_nlm4_testres(xdr, argp); 352 + } 353 + 354 + /** 355 + * nlm4_svc_decode_nlm4_res - Decode a nlm4_res argument 356 + * @rqstp: RPC transaction context 357 + * @xdr: source XDR data stream 358 + * 359 + * Return values: 360 + * %true: procedure arguments decoded successfully 361 + * %false: decode failed 362 + */ 363 + bool nlm4_svc_decode_nlm4_res(struct svc_rqst *rqstp, struct xdr_stream *xdr) 364 + { 365 + struct nlm4_res *argp = rqstp->rq_argp; 366 + 367 + return xdrgen_decode_nlm4_res(xdr, argp); 368 + } 369 + 370 + /** 371 + * nlm4_svc_decode_nlm4_notifyargs - Decode a nlm4_notifyargs argument 372 + * @rqstp: RPC transaction context 373 + * @xdr: source XDR data stream 374 + * 375 + * Return values: 376 + * %true: procedure arguments decoded successfully 377 + * %false: decode failed 378 + */ 379 + bool nlm4_svc_decode_nlm4_notifyargs(struct svc_rqst *rqstp, struct xdr_stream *xdr) 380 + { 381 + struct nlm4_notifyargs *argp = rqstp->rq_argp; 382 + 383 + return xdrgen_decode_nlm4_notifyargs(xdr, argp); 384 + } 385 + 386 + /** 387 + * nlm4_svc_decode_nlm4_shareargs - Decode a nlm4_shareargs argument 388 + * @rqstp: RPC transaction context 389 + * @xdr: source XDR data stream 390 + * 391 + * Return values: 392 + * %true: procedure arguments decoded successfully 393 + * %false: decode failed 394 + */ 395 + bool nlm4_svc_decode_nlm4_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr) 396 + { 397 + struct nlm4_shareargs *argp = rqstp->rq_argp; 398 + 399 + return xdrgen_decode_nlm4_shareargs(xdr, argp); 400 + } 401 + 402 + /** 403 + * nlm4_svc_decode_nlm4_notify - Decode a nlm4_notify argument 404 + * @rqstp: RPC transaction context 405 + * @xdr: source XDR data stream 406 + * 407 + * Return values: 408 + * %true: procedure arguments decoded successfully 409 + * %false: decode failed 410 + */ 411 + bool nlm4_svc_decode_nlm4_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr) 412 + { 413 + struct nlm4_notify *argp = rqstp->rq_argp; 414 + 415 + return xdrgen_decode_nlm4_notify(xdr, argp); 416 + } 417 + 418 + static bool __maybe_unused 419 + xdrgen_encode_netobj(struct xdr_stream *xdr, const netobj value) 420 + { 421 + return xdr_stream_encode_opaque(xdr, value.data, value.len) >= 0; 422 + } 423 + 424 + static bool __maybe_unused 425 + xdrgen_encode_fsh4_mode(struct xdr_stream *xdr, fsh4_mode value) 426 + { 427 + return xdr_stream_encode_u32(xdr, value) == XDR_UNIT; 428 + } 429 + 430 + static bool __maybe_unused 431 + xdrgen_encode_fsh4_access(struct xdr_stream *xdr, fsh4_access value) 432 + { 433 + return xdr_stream_encode_u32(xdr, value) == XDR_UNIT; 434 + } 435 + 436 + static bool __maybe_unused 437 + xdrgen_encode_uint64(struct xdr_stream *xdr, const uint64 value) 438 + { 439 + return xdrgen_encode_unsigned_hyper(xdr, value); 440 + } 441 + 442 + static bool __maybe_unused 443 + xdrgen_encode_int64(struct xdr_stream *xdr, const int64 value) 444 + { 445 + return xdrgen_encode_hyper(xdr, value); 446 + } 447 + 448 + static bool __maybe_unused 449 + xdrgen_encode_uint32(struct xdr_stream *xdr, const uint32 value) 450 + { 451 + return xdrgen_encode_unsigned_long(xdr, value); 452 + } 453 + 454 + static bool __maybe_unused 455 + xdrgen_encode_int32(struct xdr_stream *xdr, const int32 value) 456 + { 457 + return xdrgen_encode_long(xdr, value); 458 + } 459 + 460 + static bool __maybe_unused 461 + xdrgen_encode_nlm4_stats(struct xdr_stream *xdr, nlm4_stats value) 462 + { 463 + return xdr_stream_encode_be32(xdr, value) == XDR_UNIT; 464 + } 465 + 466 + static bool __maybe_unused 467 + xdrgen_encode_nlm4_holder(struct xdr_stream *xdr, const struct nlm4_holder *value) 468 + { 469 + if (!xdrgen_encode_bool(xdr, value->exclusive)) 470 + return false; 471 + if (!xdrgen_encode_int32(xdr, value->svid)) 472 + return false; 473 + if (!xdrgen_encode_netobj(xdr, value->oh)) 474 + return false; 475 + if (!xdrgen_encode_uint64(xdr, value->l_offset)) 476 + return false; 477 + if (!xdrgen_encode_uint64(xdr, value->l_len)) 478 + return false; 479 + return true; 480 + } 481 + 482 + static bool __maybe_unused 483 + xdrgen_encode_nlm4_testrply(struct xdr_stream *xdr, const struct nlm4_testrply *ptr) 484 + { 485 + if (!xdrgen_encode_nlm4_stats(xdr, ptr->stat)) 486 + return false; 487 + switch (ptr->stat) { 488 + case __constant_cpu_to_be32(NLM4_DENIED): 489 + if (!xdrgen_encode_nlm4_holder(xdr, &ptr->u.holder)) 490 + return false; 491 + break; 492 + default: 493 + break; 494 + } 495 + return true; 496 + } 497 + 498 + static bool __maybe_unused 499 + xdrgen_encode_nlm4_stat(struct xdr_stream *xdr, const struct nlm4_stat *value) 500 + { 501 + if (!xdrgen_encode_nlm4_stats(xdr, value->stat)) 502 + return false; 503 + return true; 504 + } 505 + 506 + static bool __maybe_unused 507 + xdrgen_encode_nlm4_res(struct xdr_stream *xdr, const struct nlm4_res *value) 508 + { 509 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 510 + return false; 511 + if (!xdrgen_encode_nlm4_stat(xdr, &value->stat)) 512 + return false; 513 + return true; 514 + } 515 + 516 + static bool __maybe_unused 517 + xdrgen_encode_nlm4_testres(struct xdr_stream *xdr, const struct nlm4_testres *value) 518 + { 519 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 520 + return false; 521 + if (!xdrgen_encode_nlm4_testrply(xdr, &value->stat)) 522 + return false; 523 + return true; 524 + } 525 + 526 + static bool __maybe_unused 527 + xdrgen_encode_nlm4_lock(struct xdr_stream *xdr, const struct nlm4_lock *value) 528 + { 529 + if (value->caller_name.len > LM_MAXSTRLEN) 530 + return false; 531 + if (xdr_stream_encode_opaque(xdr, value->caller_name.data, value->caller_name.len) < 0) 532 + return false; 533 + if (!xdrgen_encode_netobj(xdr, value->fh)) 534 + return false; 535 + if (!xdrgen_encode_netobj(xdr, value->oh)) 536 + return false; 537 + if (!xdrgen_encode_int32(xdr, value->svid)) 538 + return false; 539 + if (!xdrgen_encode_uint64(xdr, value->l_offset)) 540 + return false; 541 + if (!xdrgen_encode_uint64(xdr, value->l_len)) 542 + return false; 543 + return true; 544 + } 545 + 546 + static bool __maybe_unused 547 + xdrgen_encode_nlm4_lockargs(struct xdr_stream *xdr, const struct nlm4_lockargs *value) 548 + { 549 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 550 + return false; 551 + if (!xdrgen_encode_bool(xdr, value->block)) 552 + return false; 553 + if (!xdrgen_encode_bool(xdr, value->exclusive)) 554 + return false; 555 + if (!xdrgen_encode_nlm4_lock(xdr, &value->alock)) 556 + return false; 557 + if (!xdrgen_encode_bool(xdr, value->reclaim)) 558 + return false; 559 + if (!xdrgen_encode_int32(xdr, value->state)) 560 + return false; 561 + return true; 562 + } 563 + 564 + static bool __maybe_unused 565 + xdrgen_encode_nlm4_cancargs(struct xdr_stream *xdr, const struct nlm4_cancargs *value) 566 + { 567 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 568 + return false; 569 + if (!xdrgen_encode_bool(xdr, value->block)) 570 + return false; 571 + if (!xdrgen_encode_bool(xdr, value->exclusive)) 572 + return false; 573 + if (!xdrgen_encode_nlm4_lock(xdr, &value->alock)) 574 + return false; 575 + return true; 576 + } 577 + 578 + static bool __maybe_unused 579 + xdrgen_encode_nlm4_testargs(struct xdr_stream *xdr, const struct nlm4_testargs *value) 580 + { 581 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 582 + return false; 583 + if (!xdrgen_encode_bool(xdr, value->exclusive)) 584 + return false; 585 + if (!xdrgen_encode_nlm4_lock(xdr, &value->alock)) 586 + return false; 587 + return true; 588 + } 589 + 590 + static bool __maybe_unused 591 + xdrgen_encode_nlm4_unlockargs(struct xdr_stream *xdr, const struct nlm4_unlockargs *value) 592 + { 593 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 594 + return false; 595 + if (!xdrgen_encode_nlm4_lock(xdr, &value->alock)) 596 + return false; 597 + return true; 598 + } 599 + 600 + static bool __maybe_unused 601 + xdrgen_encode_nlm4_share(struct xdr_stream *xdr, const struct nlm4_share *value) 602 + { 603 + if (value->caller_name.len > LM_MAXSTRLEN) 604 + return false; 605 + if (xdr_stream_encode_opaque(xdr, value->caller_name.data, value->caller_name.len) < 0) 606 + return false; 607 + if (!xdrgen_encode_netobj(xdr, value->fh)) 608 + return false; 609 + if (!xdrgen_encode_netobj(xdr, value->oh)) 610 + return false; 611 + if (!xdrgen_encode_fsh4_mode(xdr, value->mode)) 612 + return false; 613 + if (!xdrgen_encode_fsh4_access(xdr, value->access)) 614 + return false; 615 + return true; 616 + } 617 + 618 + static bool __maybe_unused 619 + xdrgen_encode_nlm4_shareargs(struct xdr_stream *xdr, const struct nlm4_shareargs *value) 620 + { 621 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 622 + return false; 623 + if (!xdrgen_encode_nlm4_share(xdr, &value->share)) 624 + return false; 625 + if (!xdrgen_encode_bool(xdr, value->reclaim)) 626 + return false; 627 + return true; 628 + } 629 + 630 + static bool __maybe_unused 631 + xdrgen_encode_nlm4_shareres(struct xdr_stream *xdr, const struct nlm4_shareres *value) 632 + { 633 + if (!xdrgen_encode_netobj(xdr, value->cookie)) 634 + return false; 635 + if (!xdrgen_encode_nlm4_stats(xdr, value->stat)) 636 + return false; 637 + if (!xdrgen_encode_int32(xdr, value->sequence)) 638 + return false; 639 + return true; 640 + } 641 + 642 + static bool __maybe_unused 643 + xdrgen_encode_nlm4_notify(struct xdr_stream *xdr, const struct nlm4_notify *value) 644 + { 645 + if (value->name.len > LM_MAXNAMELEN) 646 + return false; 647 + if (xdr_stream_encode_opaque(xdr, value->name.data, value->name.len) < 0) 648 + return false; 649 + if (!xdrgen_encode_int32(xdr, value->state)) 650 + return false; 651 + return true; 652 + } 653 + 654 + static bool __maybe_unused 655 + xdrgen_encode_nlm4_notifyargs(struct xdr_stream *xdr, const struct nlm4_notifyargs *value) 656 + { 657 + if (!xdrgen_encode_nlm4_notify(xdr, &value->notify)) 658 + return false; 659 + if (xdr_stream_encode_opaque_fixed(xdr, value->private, SM_PRIV_SIZE) < 0) 660 + return false; 661 + return true; 662 + } 663 + 664 + /** 665 + * nlm4_svc_encode_void - Encode a void result 666 + * @rqstp: RPC transaction context 667 + * @xdr: target XDR data stream 668 + * 669 + * Return values: 670 + * %true: procedure results encoded successfully 671 + * %false: encode failed 672 + */ 673 + bool nlm4_svc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr) 674 + { 675 + return xdrgen_encode_void(xdr); 676 + } 677 + 678 + /** 679 + * nlm4_svc_encode_nlm4_testres - Encode a nlm4_testres result 680 + * @rqstp: RPC transaction context 681 + * @xdr: target XDR data stream 682 + * 683 + * Return values: 684 + * %true: procedure results encoded successfully 685 + * %false: encode failed 686 + */ 687 + bool nlm4_svc_encode_nlm4_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 688 + { 689 + struct nlm4_testres *resp = rqstp->rq_resp; 690 + 691 + return xdrgen_encode_nlm4_testres(xdr, resp); 692 + } 693 + 694 + /** 695 + * nlm4_svc_encode_nlm4_res - Encode a nlm4_res result 696 + * @rqstp: RPC transaction context 697 + * @xdr: target XDR data stream 698 + * 699 + * Return values: 700 + * %true: procedure results encoded successfully 701 + * %false: encode failed 702 + */ 703 + bool nlm4_svc_encode_nlm4_res(struct svc_rqst *rqstp, struct xdr_stream *xdr) 704 + { 705 + struct nlm4_res *resp = rqstp->rq_resp; 706 + 707 + return xdrgen_encode_nlm4_res(xdr, resp); 708 + } 709 + 710 + /** 711 + * nlm4_svc_encode_nlm4_shareres - Encode a nlm4_shareres result 712 + * @rqstp: RPC transaction context 713 + * @xdr: target XDR data stream 714 + * 715 + * Return values: 716 + * %true: procedure results encoded successfully 717 + * %false: encode failed 718 + */ 719 + bool nlm4_svc_encode_nlm4_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr) 720 + { 721 + struct nlm4_shareres *resp = rqstp->rq_resp; 722 + 723 + return xdrgen_encode_nlm4_shareres(xdr, resp); 724 + }
+32
fs/lockd/nlm4xdr_gen.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* Generated by xdrgen. Manual edits will be lost. */ 3 + /* XDR specification file: ../../Documentation/sunrpc/xdr/nlm4.x */ 4 + /* XDR specification modification time: Thu Dec 25 13:10:19 2025 */ 5 + 6 + #ifndef _LINUX_XDRGEN_NLM4_DECL_H 7 + #define _LINUX_XDRGEN_NLM4_DECL_H 8 + 9 + #include <linux/types.h> 10 + 11 + #include <linux/sunrpc/xdr.h> 12 + #include <linux/sunrpc/xdrgen/_defs.h> 13 + #include <linux/sunrpc/xdrgen/_builtins.h> 14 + #include <linux/sunrpc/xdrgen/nlm4.h> 15 + 16 + bool nlm4_svc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr); 17 + bool nlm4_svc_decode_nlm4_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 18 + bool nlm4_svc_decode_nlm4_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 19 + bool nlm4_svc_decode_nlm4_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 20 + bool nlm4_svc_decode_nlm4_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 21 + bool nlm4_svc_decode_nlm4_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 22 + bool nlm4_svc_decode_nlm4_res(struct svc_rqst *rqstp, struct xdr_stream *xdr); 23 + bool nlm4_svc_decode_nlm4_notifyargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 24 + bool nlm4_svc_decode_nlm4_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr); 25 + bool nlm4_svc_decode_nlm4_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr); 26 + 27 + bool nlm4_svc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr); 28 + bool nlm4_svc_encode_nlm4_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 29 + bool nlm4_svc_encode_nlm4_res(struct svc_rqst *rqstp, struct xdr_stream *xdr); 30 + bool nlm4_svc_encode_nlm4_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr); 31 + 32 + #endif /* _LINUX_XDRGEN_NLM4_DECL_H */
+233
include/linux/sunrpc/xdrgen/nlm4.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* Generated by xdrgen. Manual edits will be lost. */ 3 + /* XDR specification file: ../../Documentation/sunrpc/xdr/nlm4.x */ 4 + /* XDR specification modification time: Thu Dec 25 13:10:19 2025 */ 5 + 6 + #ifndef _LINUX_XDRGEN_NLM4_DEF_H 7 + #define _LINUX_XDRGEN_NLM4_DEF_H 8 + 9 + #include <linux/types.h> 10 + #include <linux/sunrpc/xdrgen/_defs.h> 11 + 12 + enum { LM_MAXSTRLEN = 1024 }; 13 + 14 + enum { LM_MAXNAMELEN = 1025 }; 15 + 16 + enum { MAXNETOBJ_SZ = 1024 }; 17 + 18 + typedef opaque netobj; 19 + 20 + enum fsh4_mode { 21 + fsm_DN = 0, 22 + fsm_DR = 1, 23 + fsm_DW = 2, 24 + fsm_DRW = 3, 25 + }; 26 + 27 + typedef enum fsh4_mode fsh4_mode; 28 + 29 + enum fsh4_access { 30 + fsa_NONE = 0, 31 + fsa_R = 1, 32 + fsa_W = 2, 33 + fsa_RW = 3, 34 + }; 35 + 36 + typedef enum fsh4_access fsh4_access; 37 + 38 + enum { SM_MAXSTRLEN = 1024 }; 39 + 40 + typedef u64 uint64; 41 + 42 + typedef s64 int64; 43 + 44 + typedef u32 uint32; 45 + 46 + typedef s32 int32; 47 + 48 + enum nlm4_stats { 49 + NLM4_GRANTED = 0, 50 + NLM4_DENIED = 1, 51 + NLM4_DENIED_NOLOCKS = 2, 52 + NLM4_BLOCKED = 3, 53 + NLM4_DENIED_GRACE_PERIOD = 4, 54 + NLM4_DEADLCK = 5, 55 + NLM4_ROFS = 6, 56 + NLM4_STALE_FH = 7, 57 + NLM4_FBIG = 8, 58 + NLM4_FAILED = 9, 59 + }; 60 + 61 + typedef __be32 nlm4_stats; 62 + 63 + struct nlm4_holder { 64 + bool exclusive; 65 + int32 svid; 66 + netobj oh; 67 + uint64 l_offset; 68 + uint64 l_len; 69 + }; 70 + 71 + struct nlm4_testrply { 72 + nlm4_stats stat; 73 + union { 74 + struct nlm4_holder holder; 75 + } u; 76 + }; 77 + 78 + struct nlm4_stat { 79 + nlm4_stats stat; 80 + }; 81 + 82 + struct nlm4_res { 83 + netobj cookie; 84 + struct nlm4_stat stat; 85 + }; 86 + 87 + struct nlm4_testres { 88 + netobj cookie; 89 + struct nlm4_testrply stat; 90 + }; 91 + 92 + struct nlm4_lock { 93 + string caller_name; 94 + netobj fh; 95 + netobj oh; 96 + int32 svid; 97 + uint64 l_offset; 98 + uint64 l_len; 99 + }; 100 + 101 + struct nlm4_lockargs { 102 + netobj cookie; 103 + bool block; 104 + bool exclusive; 105 + struct nlm4_lock alock; 106 + bool reclaim; 107 + int32 state; 108 + }; 109 + 110 + struct nlm4_cancargs { 111 + netobj cookie; 112 + bool block; 113 + bool exclusive; 114 + struct nlm4_lock alock; 115 + }; 116 + 117 + struct nlm4_testargs { 118 + netobj cookie; 119 + bool exclusive; 120 + struct nlm4_lock alock; 121 + }; 122 + 123 + struct nlm4_unlockargs { 124 + netobj cookie; 125 + struct nlm4_lock alock; 126 + }; 127 + 128 + struct nlm4_share { 129 + string caller_name; 130 + netobj fh; 131 + netobj oh; 132 + fsh4_mode mode; 133 + fsh4_access access; 134 + }; 135 + 136 + struct nlm4_shareargs { 137 + netobj cookie; 138 + struct nlm4_share share; 139 + bool reclaim; 140 + }; 141 + 142 + struct nlm4_shareres { 143 + netobj cookie; 144 + nlm4_stats stat; 145 + int32 sequence; 146 + }; 147 + 148 + struct nlm4_notify { 149 + string name; 150 + int32 state; 151 + }; 152 + 153 + enum { SM_PRIV_SIZE = 16 }; 154 + 155 + struct nlm4_notifyargs { 156 + struct nlm4_notify notify; 157 + u8 private[SM_PRIV_SIZE]; 158 + }; 159 + 160 + enum { 161 + NLMPROC4_NULL = 0, 162 + NLMPROC4_TEST = 1, 163 + NLMPROC4_LOCK = 2, 164 + NLMPROC4_CANCEL = 3, 165 + NLMPROC4_UNLOCK = 4, 166 + NLMPROC4_GRANTED = 5, 167 + NLMPROC4_TEST_MSG = 6, 168 + NLMPROC4_LOCK_MSG = 7, 169 + NLMPROC4_CANCEL_MSG = 8, 170 + NLMPROC4_UNLOCK_MSG = 9, 171 + NLMPROC4_GRANTED_MSG = 10, 172 + NLMPROC4_TEST_RES = 11, 173 + NLMPROC4_LOCK_RES = 12, 174 + NLMPROC4_CANCEL_RES = 13, 175 + NLMPROC4_UNLOCK_RES = 14, 176 + NLMPROC4_GRANTED_RES = 15, 177 + NLMPROC4_SM_NOTIFY = 16, 178 + NLMPROC4_SHARE = 20, 179 + NLMPROC4_UNSHARE = 21, 180 + NLMPROC4_NM_LOCK = 22, 181 + NLMPROC4_FREE_ALL = 23, 182 + }; 183 + 184 + #ifndef NLM4_PROG 185 + #define NLM4_PROG (100021) 186 + #endif 187 + 188 + #define NLM4_netobj_sz (XDR_unsigned_int + XDR_QUADLEN(MAXNETOBJ_SZ)) 189 + #define NLM4_fsh4_mode_sz (XDR_int) 190 + #define NLM4_fsh4_access_sz (XDR_int) 191 + #define NLM4_uint64_sz \ 192 + (XDR_unsigned_hyper) 193 + #define NLM4_int64_sz \ 194 + (XDR_hyper) 195 + #define NLM4_uint32_sz \ 196 + (XDR_unsigned_long) 197 + #define NLM4_int32_sz \ 198 + (XDR_long) 199 + #define NLM4_nlm4_stats_sz (XDR_int) 200 + #define NLM4_nlm4_holder_sz \ 201 + (XDR_bool + NLM4_int32_sz + NLM4_netobj_sz + NLM4_uint64_sz + NLM4_uint64_sz) 202 + #define NLM4_nlm4_testrply_sz \ 203 + (NLM4_nlm4_stats_sz + NLM4_nlm4_holder_sz) 204 + #define NLM4_nlm4_stat_sz \ 205 + (NLM4_nlm4_stats_sz) 206 + #define NLM4_nlm4_res_sz \ 207 + (NLM4_netobj_sz + NLM4_nlm4_stat_sz) 208 + #define NLM4_nlm4_testres_sz \ 209 + (NLM4_netobj_sz + NLM4_nlm4_testrply_sz) 210 + #define NLM4_nlm4_lock_sz \ 211 + (XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM4_netobj_sz + NLM4_netobj_sz + NLM4_int32_sz + NLM4_uint64_sz + NLM4_uint64_sz) 212 + #define NLM4_nlm4_lockargs_sz \ 213 + (NLM4_netobj_sz + XDR_bool + XDR_bool + NLM4_nlm4_lock_sz + XDR_bool + NLM4_int32_sz) 214 + #define NLM4_nlm4_cancargs_sz \ 215 + (NLM4_netobj_sz + XDR_bool + XDR_bool + NLM4_nlm4_lock_sz) 216 + #define NLM4_nlm4_testargs_sz \ 217 + (NLM4_netobj_sz + XDR_bool + NLM4_nlm4_lock_sz) 218 + #define NLM4_nlm4_unlockargs_sz \ 219 + (NLM4_netobj_sz + NLM4_nlm4_lock_sz) 220 + #define NLM4_nlm4_share_sz \ 221 + (XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM4_netobj_sz + NLM4_netobj_sz + NLM4_fsh4_mode_sz + NLM4_fsh4_access_sz) 222 + #define NLM4_nlm4_shareargs_sz \ 223 + (NLM4_netobj_sz + NLM4_nlm4_share_sz + XDR_bool) 224 + #define NLM4_nlm4_shareres_sz \ 225 + (NLM4_netobj_sz + NLM4_nlm4_stats_sz + NLM4_int32_sz) 226 + #define NLM4_nlm4_notify_sz \ 227 + (XDR_unsigned_int + XDR_QUADLEN(LM_MAXNAMELEN) + NLM4_int32_sz) 228 + #define NLM4_nlm4_notifyargs_sz \ 229 + (NLM4_nlm4_notify_sz + XDR_QUADLEN(SM_PRIV_SIZE)) 230 + #define NLM4_MAX_ARGS_SZ \ 231 + (NLM4_nlm4_lockargs_sz) 232 + 233 + #endif /* _LINUX_XDRGEN_NLM4_DEF_H */