1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Generated by xdrgen. Manual edits will be lost. */ 3 /* XDR specification file: ../../Documentation/sunrpc/xdr/nlm3.x */ 4 /* XDR specification modification time: Mon Jun 29 20:42:29 2026 */ 5 6 #ifndef _LINUX_XDRGEN_NLM3_DEF_H 7 #define _LINUX_XDRGEN_NLM3_DEF_H 8 9 #include <linux/types.h> 10 #include <linux/sunrpc/xdrgen/_defs.h> 11 12 enum { LM_MAXSTRLEN = 1024 }; 13 14 enum { LM_MAXNAMELEN = 1025 }; 15 16 enum { MAXNETOBJ_SZ = 1024 }; 17 18 typedef opaque netobj; 19 20 enum nlm_stats { 21 LCK_GRANTED = 0, 22 LCK_DENIED = 1, 23 LCK_DENIED_NOLOCKS = 2, 24 LCK_BLOCKED = 3, 25 LCK_DENIED_GRACE_PERIOD = 4, 26 }; 27 28 typedef __be32 nlm_stats; 29 30 struct nlm_stat { 31 nlm_stats stat; 32 }; 33 34 struct nlm_res { 35 netobj cookie; 36 struct nlm_stat stat; 37 }; 38 39 struct nlm_holder { 40 bool exclusive; 41 s32 uppid; 42 netobj oh; 43 u32 l_offset; 44 u32 l_len; 45 }; 46 47 struct nlm_testrply { 48 nlm_stats stat; 49 union { 50 struct nlm_holder holder; 51 } u; 52 }; 53 54 struct nlm_testres { 55 netobj cookie; 56 struct nlm_testrply test_stat; 57 }; 58 59 struct nlm_lock { 60 string caller_name; 61 netobj fh; 62 netobj oh; 63 s32 uppid; 64 u32 l_offset; 65 u32 l_len; 66 }; 67 68 struct nlm_lockargs { 69 netobj cookie; 70 bool block; 71 bool exclusive; 72 struct nlm_lock alock; 73 bool reclaim; 74 s32 state; 75 }; 76 77 struct nlm_cancargs { 78 netobj cookie; 79 bool block; 80 bool exclusive; 81 struct nlm_lock alock; 82 }; 83 84 struct nlm_testargs { 85 netobj cookie; 86 bool exclusive; 87 struct nlm_lock alock; 88 }; 89 90 struct nlm_unlockargs { 91 netobj cookie; 92 struct nlm_lock alock; 93 }; 94 95 enum fsh_mode { 96 fsm_DN = 0, 97 fsm_DR = 1, 98 fsm_DW = 2, 99 fsm_DRW = 3, 100 }; 101 102 typedef enum fsh_mode fsh_mode; 103 104 enum fsh_access { 105 fsa_NONE = 0, 106 fsa_R = 1, 107 fsa_W = 2, 108 fsa_RW = 3, 109 }; 110 111 typedef enum fsh_access fsh_access; 112 113 struct nlm_share { 114 string caller_name; 115 netobj fh; 116 netobj oh; 117 fsh_mode mode; 118 fsh_access access; 119 }; 120 121 struct nlm_shareargs { 122 netobj cookie; 123 struct nlm_share share; 124 bool reclaim; 125 }; 126 127 struct nlm_shareres { 128 netobj cookie; 129 nlm_stats stat; 130 s32 sequence; 131 }; 132 133 struct nlm_notify { 134 string name; 135 s32 state; 136 }; 137 138 enum { SM_PRIV_SIZE = 16 }; 139 140 struct nlm_notifyargs { 141 struct nlm_notify notify; 142 u8 private[SM_PRIV_SIZE]; 143 }; 144 145 enum { 146 NLM_NULL = 0, 147 NLM_TEST = 1, 148 NLM_LOCK = 2, 149 NLM_CANCEL = 3, 150 NLM_UNLOCK = 4, 151 NLM_GRANTED = 5, 152 NLM_TEST_MSG = 6, 153 NLM_LOCK_MSG = 7, 154 NLM_CANCEL_MSG = 8, 155 NLM_UNLOCK_MSG = 9, 156 NLM_GRANTED_MSG = 10, 157 NLM_TEST_RES = 11, 158 NLM_LOCK_RES = 12, 159 NLM_CANCEL_RES = 13, 160 NLM_UNLOCK_RES = 14, 161 NLM_GRANTED_RES = 15, 162 NLM_SM_NOTIFY = 16, 163 NLM_SHARE = 20, 164 NLM_UNSHARE = 21, 165 NLM_NM_LOCK = 22, 166 NLM_FREE_ALL = 23, 167 }; 168 169 #ifndef NLM_PROG 170 #define NLM_PROG (100021) 171 #endif 172 173 #define NLM3_netobj_sz (XDR_unsigned_int + XDR_QUADLEN(MAXNETOBJ_SZ)) 174 #define NLM3_nlm_stats_sz (XDR_int) 175 #define NLM3_nlm_stat_sz \ 176 (NLM3_nlm_stats_sz) 177 #define NLM3_nlm_res_sz \ 178 (NLM3_netobj_sz + NLM3_nlm_stat_sz) 179 #define NLM3_nlm_holder_sz \ 180 (XDR_bool + XDR_int + NLM3_netobj_sz + XDR_unsigned_int + XDR_unsigned_int) 181 #define NLM3_nlm_testrply_sz \ 182 (NLM3_nlm_stats_sz + NLM3_nlm_holder_sz) 183 #define NLM3_nlm_testres_sz \ 184 (NLM3_netobj_sz + NLM3_nlm_testrply_sz) 185 #define NLM3_nlm_lock_sz \ 186 (XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM3_netobj_sz + NLM3_netobj_sz + XDR_int + XDR_unsigned_int + XDR_unsigned_int) 187 #define NLM3_nlm_lockargs_sz \ 188 (NLM3_netobj_sz + XDR_bool + XDR_bool + NLM3_nlm_lock_sz + XDR_bool + XDR_int) 189 #define NLM3_nlm_cancargs_sz \ 190 (NLM3_netobj_sz + XDR_bool + XDR_bool + NLM3_nlm_lock_sz) 191 #define NLM3_nlm_testargs_sz \ 192 (NLM3_netobj_sz + XDR_bool + NLM3_nlm_lock_sz) 193 #define NLM3_nlm_unlockargs_sz \ 194 (NLM3_netobj_sz + NLM3_nlm_lock_sz) 195 #define NLM3_fsh_mode_sz (XDR_int) 196 #define NLM3_fsh_access_sz (XDR_int) 197 #define NLM3_nlm_share_sz \ 198 (XDR_unsigned_int + XDR_QUADLEN(LM_MAXSTRLEN) + NLM3_netobj_sz + NLM3_netobj_sz + NLM3_fsh_mode_sz + NLM3_fsh_access_sz) 199 #define NLM3_nlm_shareargs_sz \ 200 (NLM3_netobj_sz + NLM3_nlm_share_sz + XDR_bool) 201 #define NLM3_nlm_shareres_sz \ 202 (NLM3_netobj_sz + NLM3_nlm_stats_sz + XDR_int) 203 #define NLM3_nlm_notify_sz \ 204 (XDR_unsigned_int + XDR_QUADLEN(LM_MAXNAMELEN) + XDR_long) 205 #define NLM3_nlm_notifyargs_sz \ 206 (NLM3_nlm_notify_sz + XDR_QUADLEN(SM_PRIV_SIZE)) 207 #define NLM3_MAX_ARGS_SZ \ 208 (NLM3_nlm_lockargs_sz) 209 210 #endif /* _LINUX_XDRGEN_NLM3_DEF_H */ 211