linux/include/linux/lockd/xdr.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * linux/include/linux/lockd/xdr.h
 *
 * XDR types for the NLM protocol
 *
 * Copyright (C) 1996 Olaf Kirch <[email protected]>
 */

#ifndef LOCKD_XDR_H
#define LOCKD_XDR_H

#include <linux/fs.h>
#include <linux/filelock.h>
#include <linux/nfs.h>
#include <linux/sunrpc/xdr.h>

#define SM_MAXSTRLEN
#define SM_PRIV_SIZE

struct nsm_private {};

struct svc_rqst;

#define NLM_MAXCOOKIELEN
#define NLM_MAXSTRLEN

#define nlm_granted
#define nlm_lck_denied
#define nlm_lck_denied_nolocks
#define nlm_lck_blocked
#define nlm_lck_denied_grace_period

#define nlm_drop_reply

/* Lock info passed via NLM */
struct nlm_lock {};

/*
 *	NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes.
 *	FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to
 *	32 bytes.
 */

struct nlm_cookie
{};

/*
 * Generic lockd arguments for all but sm_notify
 */
struct nlm_args {};

nlm_args;

/*
 * Generic lockd result
 */
struct nlm_res {};

/*
 * statd callback when client has rebooted
 */
struct nlm_reboot {};

/*
 * Contents of statd callback when monitored host rebooted
 */
#define NLMSVC_XDRSIZE

bool	nlmsvc_decode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_testargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_lockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_cancargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_reboot(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_decode_notify(struct svc_rqst *rqstp, struct xdr_stream *xdr);

bool	nlmsvc_encode_testres(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_encode_res(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_encode_void(struct svc_rqst *rqstp, struct xdr_stream *xdr);
bool	nlmsvc_encode_shareres(struct svc_rqst *rqstp, struct xdr_stream *xdr);

#endif /* LOCKD_XDR_H */