~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/lockd/xdr.h

Version: ~ [ linux-5.18 ] ~ [ linux-5.17.9 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.41 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.117 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.195 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.244 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.280 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.315 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/lockd/xdr.h (Version linux-5.6.19) and /include/linux/lockd/xdr.h (Version linux-5.8.18)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * linux/include/linux/lockd/xdr.h                  3  * linux/include/linux/lockd/xdr.h
  4  *                                                  4  *
  5  * XDR types for the NLM protocol                   5  * XDR types for the NLM protocol
  6  *                                                  6  *
  7  * Copyright (C) 1996 Olaf Kirch <okir@monad.s      7  * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
  8  */                                                 8  */
  9                                                     9 
 10 #ifndef LOCKD_XDR_H                                10 #ifndef LOCKD_XDR_H
 11 #define LOCKD_XDR_H                                11 #define LOCKD_XDR_H
 12                                                    12 
 13 #include <linux/fs.h>                              13 #include <linux/fs.h>
 14 #include <linux/nfs.h>                             14 #include <linux/nfs.h>
 15 #include <linux/sunrpc/xdr.h>                      15 #include <linux/sunrpc/xdr.h>
 16                                                    16 
 17 #define SM_MAXSTRLEN            1024               17 #define SM_MAXSTRLEN            1024
 18 #define SM_PRIV_SIZE            16                 18 #define SM_PRIV_SIZE            16
 19                                                    19 
 20 struct nsm_private {                               20 struct nsm_private {
 21         unsigned char           data[SM_PRIV_S     21         unsigned char           data[SM_PRIV_SIZE];
 22 };                                                 22 };
 23                                                    23 
 24 struct svc_rqst;                                   24 struct svc_rqst;
 25                                                    25 
 26 #define NLM_MAXCOOKIELEN        32                 26 #define NLM_MAXCOOKIELEN        32
 27 #define NLM_MAXSTRLEN           1024               27 #define NLM_MAXSTRLEN           1024
 28                                                    28 
 29 #define nlm_granted             cpu_to_be32(NL     29 #define nlm_granted             cpu_to_be32(NLM_LCK_GRANTED)
 30 #define nlm_lck_denied          cpu_to_be32(NL     30 #define nlm_lck_denied          cpu_to_be32(NLM_LCK_DENIED)
 31 #define nlm_lck_denied_nolocks  cpu_to_be32(NL     31 #define nlm_lck_denied_nolocks  cpu_to_be32(NLM_LCK_DENIED_NOLOCKS)
 32 #define nlm_lck_blocked         cpu_to_be32(NL     32 #define nlm_lck_blocked         cpu_to_be32(NLM_LCK_BLOCKED)
 33 #define nlm_lck_denied_grace_period     cpu_to     33 #define nlm_lck_denied_grace_period     cpu_to_be32(NLM_LCK_DENIED_GRACE_PERIOD)
 34                                                    34 
 35 #define nlm_drop_reply          cpu_to_be32(30     35 #define nlm_drop_reply          cpu_to_be32(30000)
 36                                                    36 
 37 /* Lock info passed via NLM */                     37 /* Lock info passed via NLM */
 38 struct nlm_lock {                                  38 struct nlm_lock {
 39         char *                  caller;            39         char *                  caller;
 40         unsigned int            len;    /* len     40         unsigned int            len;    /* length of "caller" */
 41         struct nfs_fh           fh;                41         struct nfs_fh           fh;
 42         struct xdr_netobj       oh;                42         struct xdr_netobj       oh;
 43         u32                     svid;              43         u32                     svid;
 44         struct file_lock        fl;                44         struct file_lock        fl;
 45 };                                                 45 };
 46                                                    46 
 47 /*                                                 47 /*
 48  *      NLM cookies. Technically they can be 1     48  *      NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes.
 49  *      FreeBSD uses 16, Apple Mac OS X 10.3 u     49  *      FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to
 50  *      32 bytes.                                  50  *      32 bytes.
 51  */                                                51  */
 52                                                    52  
 53 struct nlm_cookie                                  53 struct nlm_cookie
 54 {                                                  54 {
 55         unsigned char data[NLM_MAXCOOKIELEN];      55         unsigned char data[NLM_MAXCOOKIELEN];
 56         unsigned int len;                          56         unsigned int len;
 57 };                                                 57 };
 58                                                    58 
 59 /*                                                 59 /*
 60  * Generic lockd arguments for all but sm_noti     60  * Generic lockd arguments for all but sm_notify
 61  */                                                61  */
 62 struct nlm_args {                                  62 struct nlm_args {
 63         struct nlm_cookie       cookie;            63         struct nlm_cookie       cookie;
 64         struct nlm_lock         lock;              64         struct nlm_lock         lock;
 65         u32                     block;             65         u32                     block;
 66         u32                     reclaim;           66         u32                     reclaim;
 67         u32                     state;             67         u32                     state;
 68         u32                     monitor;           68         u32                     monitor;
 69         u32                     fsm_access;        69         u32                     fsm_access;
 70         u32                     fsm_mode;          70         u32                     fsm_mode;
 71 };                                                 71 };
 72                                                    72 
 73 typedef struct nlm_args nlm_args;                  73 typedef struct nlm_args nlm_args;
 74                                                    74 
 75 /*                                                 75 /*
 76  * Generic lockd result                            76  * Generic lockd result
 77  */                                                77  */
 78 struct nlm_res {                                   78 struct nlm_res {
 79         struct nlm_cookie       cookie;            79         struct nlm_cookie       cookie;
 80         __be32                  status;            80         __be32                  status;
 81         struct nlm_lock         lock;              81         struct nlm_lock         lock;
 82 };                                                 82 };
 83                                                    83 
 84 /*                                                 84 /*
 85  * statd callback when client has rebooted         85  * statd callback when client has rebooted
 86  */                                                86  */
 87 struct nlm_reboot {                                87 struct nlm_reboot {
 88         char                    *mon;              88         char                    *mon;
 89         unsigned int            len;               89         unsigned int            len;
 90         u32                     state;             90         u32                     state;
 91         struct nsm_private      priv;              91         struct nsm_private      priv;
 92 };                                                 92 };
 93                                                    93 
 94 /*                                                 94 /*
 95  * Contents of statd callback when monitored h     95  * Contents of statd callback when monitored host rebooted
 96  */                                                96  */
 97 #define NLMSVC_XDRSIZE          sizeof(struct      97 #define NLMSVC_XDRSIZE          sizeof(struct nlm_args)
 98                                                    98 
 99 int     nlmsvc_decode_testargs(struct svc_rqst     99 int     nlmsvc_decode_testargs(struct svc_rqst *, __be32 *);
100 int     nlmsvc_encode_testres(struct svc_rqst     100 int     nlmsvc_encode_testres(struct svc_rqst *, __be32 *);
101 int     nlmsvc_decode_lockargs(struct svc_rqst    101 int     nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *);
102 int     nlmsvc_decode_cancargs(struct svc_rqst    102 int     nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *);
103 int     nlmsvc_decode_unlockargs(struct svc_rq    103 int     nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *);
104 int     nlmsvc_encode_res(struct svc_rqst *, _    104 int     nlmsvc_encode_res(struct svc_rqst *, __be32 *);
105 int     nlmsvc_decode_res(struct svc_rqst *, _    105 int     nlmsvc_decode_res(struct svc_rqst *, __be32 *);
106 int     nlmsvc_encode_void(struct svc_rqst *,     106 int     nlmsvc_encode_void(struct svc_rqst *, __be32 *);
107 int     nlmsvc_decode_void(struct svc_rqst *,     107 int     nlmsvc_decode_void(struct svc_rqst *, __be32 *);
108 int     nlmsvc_decode_shareargs(struct svc_rqs    108 int     nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *);
109 int     nlmsvc_encode_shareres(struct svc_rqst    109 int     nlmsvc_encode_shareres(struct svc_rqst *, __be32 *);
110 int     nlmsvc_decode_notify(struct svc_rqst *    110 int     nlmsvc_decode_notify(struct svc_rqst *, __be32 *);
111 int     nlmsvc_decode_reboot(struct svc_rqst *    111 int     nlmsvc_decode_reboot(struct svc_rqst *, __be32 *);
112 /*                                                112 /*
113 int     nlmclt_encode_testargs(struct rpc_rqst    113 int     nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
114 int     nlmclt_encode_lockargs(struct rpc_rqst    114 int     nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
115 int     nlmclt_encode_cancargs(struct rpc_rqst    115 int     nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
116 int     nlmclt_encode_unlockargs(struct rpc_rq    116 int     nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
117  */                                               117  */
118                                                   118 
119 #endif /* LOCKD_XDR_H */                          119 #endif /* LOCKD_XDR_H */
120                                                   120 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp