blob: 75d0308e0ced3618b01a876de817b93e653cf9a8 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -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
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <linux/fs.h>
16#include <linux/nfs.h>
17#include <linux/sunrpc/xdr.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080018
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019#define NLM_MAXCOOKIELEN 32
20#define NLM_MAXSTRLEN 1024
Ben Cheng4b29af02012-03-07 16:14:53 -080021
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022#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)
Ben Cheng4b29af02012-03-07 16:14:53 -080027
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080028struct 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};
Ben Cheng4b29af02012-03-07 16:14:53 -080036
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080037struct nlm_cookie
38{
39 unsigned char data[NLM_MAXCOOKIELEN];
40 unsigned int len;
41};
Ben Cheng4b29af02012-03-07 16:14:53 -080042
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080043struct 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};
Ben Cheng4b29af02012-03-07 16:14:53 -080053
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054typedef struct nlm_args nlm_args;
Ben Cheng4b29af02012-03-07 16:14:53 -080055
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080056struct nlm_res {
57 struct nlm_cookie cookie;
58 u32 status;
59 struct nlm_lock lock;
60};
Ben Cheng4b29af02012-03-07 16:14:53 -080061
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080062struct nlm_reboot {
63 char * mon;
64 int len;
65 u32 state;
66 u32 addr;
67 u32 vers;
68 u32 proto;
69};
Ben Cheng4b29af02012-03-07 16:14:53 -080070
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080071#define NLMSVC_XDRSIZE sizeof(struct nlm_args)
Ben Cheng4b29af02012-03-07 16:14:53 -080072
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080073#endif