blob: 75d0308e0ced3618b01a876de817b93e653cf9a8 [file] [log] [blame]
Dan Albert287553d2017-02-16 10:47:51 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef LOCKD_XDR_H
13#define LOCKD_XDR_H
14
15#include <linux/fs.h>
16#include <linux/nfs.h>
17#include <linux/sunrpc/xdr.h>
18
19#define NLM_MAXCOOKIELEN 32
20#define NLM_MAXSTRLEN 1024
21
22#define nlm_granted __constant_htonl(NLM_LCK_GRANTED)
23#define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED)
24#define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS)
25#define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED)
26#define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD)
27
28struct nlm_lock {
29 char * caller;
30 int len;
31 struct nfs_fh fh;
32 struct xdr_netobj oh;
33 u32 svid;
34 struct file_lock fl;
35};
36
37struct nlm_cookie
38{
39 unsigned char data[NLM_MAXCOOKIELEN];
40 unsigned int len;
41};
42
43struct nlm_args {
44 struct nlm_cookie cookie;
45 struct nlm_lock lock;
46 u32 block;
47 u32 reclaim;
48 u32 state;
49 u32 monitor;
50 u32 fsm_access;
51 u32 fsm_mode;
52};
53
54typedef struct nlm_args nlm_args;
55
56struct nlm_res {
57 struct nlm_cookie cookie;
58 u32 status;
59 struct nlm_lock lock;
60};
61
62struct nlm_reboot {
63 char * mon;
64 int len;
65 u32 state;
66 u32 addr;
67 u32 vers;
68 u32 proto;
69};
70
71#define NLMSVC_XDRSIZE sizeof(struct nlm_args)
72
73#endif