6338866222a8fd1b4797058cf22251d718bedd34
2 * linux/include/linux/lockd/xdr.h
4 * XDR types for the NLM protocol
6 * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
13 #include <linux/nfs.h>
14 #include <linux/sunrpc/xdr.h>
16 #define SM_PRIV_SIZE 16
19 unsigned char data
[SM_PRIV_SIZE
];
24 #define NLM_MAXCOOKIELEN 32
25 #define NLM_MAXSTRLEN 1024
27 #define nlm_granted __constant_htonl(NLM_LCK_GRANTED)
28 #define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED)
29 #define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS)
30 #define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED)
31 #define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD)
33 #define nlm_drop_reply __constant_htonl(30000)
35 /* Lock info passed via NLM */
38 unsigned int len
; /* length of "caller" */
46 * NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes.
47 * FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to
53 unsigned char data
[NLM_MAXCOOKIELEN
];
58 * Generic lockd arguments for all but sm_notify
61 struct nlm_cookie cookie
;
71 typedef struct nlm_args nlm_args
;
74 * Generic lockd result
77 struct nlm_cookie cookie
;
83 * statd callback when client has rebooted
89 struct nsm_private priv
;
93 * Contents of statd callback when monitored host rebooted
95 #define NLMSVC_XDRSIZE sizeof(struct nlm_args)
97 int nlmsvc_decode_testargs(struct svc_rqst
*, __be32
*, struct nlm_args
*);
98 int nlmsvc_encode_testres(struct svc_rqst
*, __be32
*, struct nlm_res
*);
99 int nlmsvc_decode_lockargs(struct svc_rqst
*, __be32
*, struct nlm_args
*);
100 int nlmsvc_decode_cancargs(struct svc_rqst
*, __be32
*, struct nlm_args
*);
101 int nlmsvc_decode_unlockargs(struct svc_rqst
*, __be32
*, struct nlm_args
*);
102 int nlmsvc_encode_res(struct svc_rqst
*, __be32
*, struct nlm_res
*);
103 int nlmsvc_decode_res(struct svc_rqst
*, __be32
*, struct nlm_res
*);
104 int nlmsvc_encode_void(struct svc_rqst
*, __be32
*, void *);
105 int nlmsvc_decode_void(struct svc_rqst
*, __be32
*, void *);
106 int nlmsvc_decode_shareargs(struct svc_rqst
*, __be32
*, struct nlm_args
*);
107 int nlmsvc_encode_shareres(struct svc_rqst
*, __be32
*, struct nlm_res
*);
108 int nlmsvc_decode_notify(struct svc_rqst
*, __be32
*, struct nlm_args
*);
109 int nlmsvc_decode_reboot(struct svc_rqst
*, __be32
*, struct nlm_reboot
*);
111 int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
112 int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
113 int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
114 int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
117 #endif /* LOCKD_XDR_H */
This page took 0.044261 seconds and 5 git commands to generate.