Home | History | Annotate | Download | only in lockd
      1 /****************************************************************************
      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 
     28 struct 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 
     37 struct nlm_cookie
     38 {
     39  unsigned char data[NLM_MAXCOOKIELEN];
     40  unsigned int len;
     41 };
     42 
     43 struct 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 
     54 typedef struct nlm_args nlm_args;
     55 
     56 struct nlm_res {
     57  struct nlm_cookie cookie;
     58  u32 status;
     59  struct nlm_lock lock;
     60 };
     61 
     62 struct 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
     74