mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
33 lines
1.6 KiB
C
33 lines
1.6 KiB
C
/* 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_DECL_H
|
|
#define _LINUX_XDRGEN_NLM4_DECL_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/sunrpc/xdr.h>
|
|
#include <linux/sunrpc/xdrgen/_defs.h>
|
|
#include <linux/sunrpc/xdrgen/_builtins.h>
|
|
#include <linux/sunrpc/xdrgen/nlm4.h>
|
|
|
|
bool nlm4_svc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_res(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_notifyargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_decode_nlm4_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
|
|
bool nlm4_svc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_encode_nlm4_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_encode_nlm4_res(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
bool nlm4_svc_encode_nlm4_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr);
|
|
|
|
#endif /* _LINUX_XDRGEN_NLM4_DECL_H */
|