1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #ifndef _NLM_PROT_H_RPCGEN 7 #define _NLM_PROT_H_RPCGEN 8 9 #include <rpc/rpc.h> 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 #define LM_MAXSTRLEN 1024 16 #define MAXNAMELEN LM_MAXSTRLEN+1 17 18 enum nlm_stats { 19 nlm_granted = 0, 20 nlm_denied = 1, 21 nlm_denied_nolocks = 2, 22 nlm_blocked = 3, 23 nlm_denied_grace_period = 4, 24 nlm_deadlck = 5 25 }; 26 typedef enum nlm_stats nlm_stats; 27 28 struct nlm_holder { 29 bool_t exclusive; 30 int svid; 31 netobj oh; 32 u_int l_offset; 33 u_int l_len; 34 }; 35 typedef struct nlm_holder nlm_holder; 36 37 struct nlm_testrply { 38 nlm_stats stat; 39 union { 40 struct nlm_holder holder; 41 } nlm_testrply_u; 42 }; 43 typedef struct nlm_testrply nlm_testrply; 44 45 struct nlm_stat { 46 nlm_stats stat; 47 }; 48 typedef struct nlm_stat nlm_stat; 49 50 struct nlm_res { 51 netobj cookie; 52 nlm_stat stat; 53 }; 54 typedef struct nlm_res nlm_res; 55 56 struct nlm_testres { 57 netobj cookie; 58 nlm_testrply stat; 59 }; 60 typedef struct nlm_testres nlm_testres; 61 62 struct nlm_lock { 63 char *caller_name; 64 netobj fh; 65 netobj oh; 66 int svid; 67 u_int l_offset; 68 u_int l_len; 69 }; 70 typedef struct nlm_lock nlm_lock; 71 72 struct nlm_lockargs { 73 netobj cookie; 74 bool_t block; 75 bool_t exclusive; 76 struct nlm_lock alock; 77 bool_t reclaim; 78 int state; 79 }; 80 typedef struct nlm_lockargs nlm_lockargs; 81 82 struct nlm_cancargs { 83 netobj cookie; 84 bool_t block; 85 bool_t exclusive; 86 struct nlm_lock alock; 87 }; 88 typedef struct nlm_cancargs nlm_cancargs; 89 90 struct nlm_testargs { 91 netobj cookie; 92 bool_t exclusive; 93 struct nlm_lock alock; 94 }; 95 typedef struct nlm_testargs nlm_testargs; 96 97 struct nlm_unlockargs { 98 netobj cookie; 99 struct nlm_lock alock; 100 }; 101 typedef struct nlm_unlockargs nlm_unlockargs; 102 /* 103 * The following enums are actually bit encoded for efficient 104 * boolean algebra.... DON'T change them..... 105 */ 106 107 enum fsh_mode { 108 fsm_DN = 0, 109 fsm_DR = 1, 110 fsm_DW = 2, 111 fsm_DRW = 3 112 }; 113 typedef enum fsh_mode fsh_mode; 114 115 enum fsh_access { 116 fsa_NONE = 0, 117 fsa_R = 1, 118 fsa_W = 2, 119 fsa_RW = 3 120 }; 121 typedef enum fsh_access fsh_access; 122 123 struct nlm_share { 124 char *caller_name; 125 netobj fh; 126 netobj oh; 127 fsh_mode mode; 128 fsh_access access; 129 }; 130 typedef struct nlm_share nlm_share; 131 132 struct nlm_shareargs { 133 netobj cookie; 134 nlm_share share; 135 bool_t reclaim; 136 }; 137 typedef struct nlm_shareargs nlm_shareargs; 138 139 struct nlm_shareres { 140 netobj cookie; 141 nlm_stats stat; 142 int sequence; 143 }; 144 typedef struct nlm_shareres nlm_shareres; 145 146 struct nlm_notify { 147 char *name; 148 long state; 149 }; 150 typedef struct nlm_notify nlm_notify; 151 /* definitions for NLM version 4 */ 152 153 enum nlm4_stats { 154 nlm4_granted = 0, 155 nlm4_denied = 1, 156 nlm4_denied_nolocks = 2, 157 nlm4_blocked = 3, 158 nlm4_denied_grace_period = 4, 159 nlm4_deadlck = 5, 160 nlm4_rofs = 6, 161 nlm4_stale_fh = 7, 162 nlm4_fbig = 8, 163 nlm4_failed = 9 164 }; 165 typedef enum nlm4_stats nlm4_stats; 166 167 struct nlm4_stat { 168 nlm4_stats stat; 169 }; 170 typedef struct nlm4_stat nlm4_stat; 171 172 struct nlm4_holder { 173 bool_t exclusive; 174 uint32_t svid; 175 netobj oh; 176 uint64_t l_offset; 177 uint64_t l_len; 178 }; 179 typedef struct nlm4_holder nlm4_holder; 180 181 struct nlm4_lock { 182 char *caller_name; 183 netobj fh; 184 netobj oh; 185 uint32_t svid; 186 uint64_t l_offset; 187 uint64_t l_len; 188 }; 189 typedef struct nlm4_lock nlm4_lock; 190 191 struct nlm4_share { 192 char *caller_name; 193 netobj fh; 194 netobj oh; 195 fsh_mode mode; 196 fsh_access access; 197 }; 198 typedef struct nlm4_share nlm4_share; 199 200 struct nlm4_testrply { 201 nlm4_stats stat; 202 union { 203 struct nlm4_holder holder; 204 } nlm4_testrply_u; 205 }; 206 typedef struct nlm4_testrply nlm4_testrply; 207 208 struct nlm4_testres { 209 netobj cookie; 210 nlm4_testrply stat; 211 }; 212 typedef struct nlm4_testres nlm4_testres; 213 214 struct nlm4_testargs { 215 netobj cookie; 216 bool_t exclusive; 217 struct nlm4_lock alock; 218 }; 219 typedef struct nlm4_testargs nlm4_testargs; 220 221 struct nlm4_res { 222 netobj cookie; 223 nlm4_stat stat; 224 }; 225 typedef struct nlm4_res nlm4_res; 226 227 struct nlm4_lockargs { 228 netobj cookie; 229 bool_t block; 230 bool_t exclusive; 231 struct nlm4_lock alock; 232 bool_t reclaim; 233 int state; 234 }; 235 typedef struct nlm4_lockargs nlm4_lockargs; 236 237 struct nlm4_cancargs { 238 netobj cookie; 239 bool_t block; 240 bool_t exclusive; 241 struct nlm4_lock alock; 242 }; 243 typedef struct nlm4_cancargs nlm4_cancargs; 244 245 struct nlm4_unlockargs { 246 netobj cookie; 247 struct nlm4_lock alock; 248 }; 249 typedef struct nlm4_unlockargs nlm4_unlockargs; 250 251 struct nlm4_shareargs { 252 netobj cookie; 253 nlm4_share share; 254 bool_t reclaim; 255 }; 256 typedef struct nlm4_shareargs nlm4_shareargs; 257 258 struct nlm4_shareres { 259 netobj cookie; 260 nlm4_stats stat; 261 int sequence; 262 }; 263 typedef struct nlm4_shareres nlm4_shareres; 264 265 struct nlm_sm_status { 266 char *mon_name; 267 int state; 268 char priv[16]; 269 }; 270 typedef struct nlm_sm_status nlm_sm_status; 271 272 struct nlm4_notify { 273 char *name; 274 int32_t state; 275 }; 276 typedef struct nlm4_notify nlm4_notify; 277 278 #define NLM_PROG ((unsigned long)(100021)) 279 #define NLM_SM ((unsigned long)(0)) 280 281 #define NLM_SM_NOTIFY ((unsigned long)(1)) 282 extern enum clnt_stat nlm_sm_notify_0(struct nlm_sm_status *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 283 extern bool_t nlm_sm_notify_0_svc(struct nlm_sm_status *, void *, struct svc_req *); 284 #define NLM_VERS ((unsigned long)(1)) 285 286 #define NLM_TEST ((unsigned long)(1)) 287 extern enum clnt_stat nlm_test_1(struct nlm_testargs *, nlm_testres *, CLIENT *, struct rpc_callextra *, struct timeval); 288 extern bool_t nlm_test_1_svc(struct nlm_testargs *, nlm_testres *, struct svc_req *); 289 #define NLM_LOCK ((unsigned long)(2)) 290 extern enum clnt_stat nlm_lock_1(struct nlm_lockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); 291 extern bool_t nlm_lock_1_svc(struct nlm_lockargs *, nlm_res *, struct svc_req *); 292 #define NLM_CANCEL ((unsigned long)(3)) 293 extern enum clnt_stat nlm_cancel_1(struct nlm_cancargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); 294 extern bool_t nlm_cancel_1_svc(struct nlm_cancargs *, nlm_res *, struct svc_req *); 295 #define NLM_UNLOCK ((unsigned long)(4)) 296 extern enum clnt_stat nlm_unlock_1(struct nlm_unlockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); 297 extern bool_t nlm_unlock_1_svc(struct nlm_unlockargs *, nlm_res *, struct svc_req *); 298 #define NLM_GRANTED ((unsigned long)(5)) 299 extern enum clnt_stat nlm_granted_1(struct nlm_testargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); 300 extern bool_t nlm_granted_1_svc(struct nlm_testargs *, nlm_res *, struct svc_req *); 301 #define NLM_TEST_MSG ((unsigned long)(6)) 302 extern enum clnt_stat nlm_test_msg_1(struct nlm_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 303 extern bool_t nlm_test_msg_1_svc(struct nlm_testargs *, void *, struct svc_req *); 304 #define NLM_LOCK_MSG ((unsigned long)(7)) 305 extern enum clnt_stat nlm_lock_msg_1(struct nlm_lockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 306 extern bool_t nlm_lock_msg_1_svc(struct nlm_lockargs *, void *, struct svc_req *); 307 #define NLM_CANCEL_MSG ((unsigned long)(8)) 308 extern enum clnt_stat nlm_cancel_msg_1(struct nlm_cancargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 309 extern bool_t nlm_cancel_msg_1_svc(struct nlm_cancargs *, void *, struct svc_req *); 310 #define NLM_UNLOCK_MSG ((unsigned long)(9)) 311 extern enum clnt_stat nlm_unlock_msg_1(struct nlm_unlockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 312 extern bool_t nlm_unlock_msg_1_svc(struct nlm_unlockargs *, void *, struct svc_req *); 313 #define NLM_GRANTED_MSG ((unsigned long)(10)) 314 extern enum clnt_stat nlm_granted_msg_1(struct nlm_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 315 extern bool_t nlm_granted_msg_1_svc(struct nlm_testargs *, void *, struct svc_req *); 316 #define NLM_TEST_RES ((unsigned long)(11)) 317 extern enum clnt_stat nlm_test_res_1(nlm_testres *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 318 extern bool_t nlm_test_res_1_svc(nlm_testres *, void *, struct svc_req *); 319 #define NLM_LOCK_RES ((unsigned long)(12)) 320 extern enum clnt_stat nlm_lock_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 321 extern bool_t nlm_lock_res_1_svc(nlm_res *, void *, struct svc_req *); 322 #define NLM_CANCEL_RES ((unsigned long)(13)) 323 extern enum clnt_stat nlm_cancel_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 324 extern bool_t nlm_cancel_res_1_svc(nlm_res *, void *, struct svc_req *); 325 #define NLM_UNLOCK_RES ((unsigned long)(14)) 326 extern enum clnt_stat nlm_unlock_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 327 extern bool_t nlm_unlock_res_1_svc(nlm_res *, void *, struct svc_req *); 328 #define NLM_GRANTED_RES ((unsigned long)(15)) 329 extern enum clnt_stat nlm_granted_res_1(nlm_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 330 extern bool_t nlm_granted_res_1_svc(nlm_res *, void *, struct svc_req *); 331 extern int nlm_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); 332 #define NLM_VERSX ((unsigned long)(3)) 333 334 #define NLM_SHARE ((unsigned long)(20)) 335 extern enum clnt_stat nlm_share_3(nlm_shareargs *, nlm_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); 336 extern bool_t nlm_share_3_svc(nlm_shareargs *, nlm_shareres *, struct svc_req *); 337 #define NLM_UNSHARE ((unsigned long)(21)) 338 extern enum clnt_stat nlm_unshare_3(nlm_shareargs *, nlm_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); 339 extern bool_t nlm_unshare_3_svc(nlm_shareargs *, nlm_shareres *, struct svc_req *); 340 #define NLM_NM_LOCK ((unsigned long)(22)) 341 extern enum clnt_stat nlm_nm_lock_3(nlm_lockargs *, nlm_res *, CLIENT *, struct rpc_callextra *, struct timeval); 342 extern bool_t nlm_nm_lock_3_svc(nlm_lockargs *, nlm_res *, struct svc_req *); 343 #define NLM_FREE_ALL ((unsigned long)(23)) 344 extern enum clnt_stat nlm_free_all_3(nlm_notify *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 345 extern bool_t nlm_free_all_3_svc(nlm_notify *, void *, struct svc_req *); 346 extern int nlm_prog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); 347 #define NLM_VERS4 ((unsigned long)(4)) 348 349 #define NLM4_TEST ((unsigned long)(1)) 350 extern enum clnt_stat nlm4_test_4(nlm4_testargs *, nlm4_testres *, CLIENT *, struct rpc_callextra *, struct timeval); 351 extern bool_t nlm4_test_4_svc(nlm4_testargs *, nlm4_testres *, struct svc_req *); 352 #define NLM4_LOCK ((unsigned long)(2)) 353 extern enum clnt_stat nlm4_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); 354 extern bool_t nlm4_lock_4_svc(nlm4_lockargs *, nlm4_res *, struct svc_req *); 355 #define NLM4_CANCEL ((unsigned long)(3)) 356 extern enum clnt_stat nlm4_cancel_4(nlm4_cancargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); 357 extern bool_t nlm4_cancel_4_svc(nlm4_cancargs *, nlm4_res *, struct svc_req *); 358 #define NLM4_UNLOCK ((unsigned long)(4)) 359 extern enum clnt_stat nlm4_unlock_4(nlm4_unlockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); 360 extern bool_t nlm4_unlock_4_svc(nlm4_unlockargs *, nlm4_res *, struct svc_req *); 361 #define NLM4_GRANTED ((unsigned long)(5)) 362 extern enum clnt_stat nlm4_granted_4(nlm4_testargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); 363 extern bool_t nlm4_granted_4_svc(nlm4_testargs *, nlm4_res *, struct svc_req *); 364 #define NLM4_TEST_MSG ((unsigned long)(6)) 365 extern enum clnt_stat nlm4_test_msg_4(nlm4_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 366 extern bool_t nlm4_test_msg_4_svc(nlm4_testargs *, void *, struct svc_req *); 367 #define NLM4_LOCK_MSG ((unsigned long)(7)) 368 extern enum clnt_stat nlm4_lock_msg_4(nlm4_lockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 369 extern bool_t nlm4_lock_msg_4_svc(nlm4_lockargs *, void *, struct svc_req *); 370 #define NLM4_CANCEL_MSG ((unsigned long)(8)) 371 extern enum clnt_stat nlm4_cancel_msg_4(nlm4_cancargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 372 extern bool_t nlm4_cancel_msg_4_svc(nlm4_cancargs *, void *, struct svc_req *); 373 #define NLM4_UNLOCK_MSG ((unsigned long)(9)) 374 extern enum clnt_stat nlm4_unlock_msg_4(nlm4_unlockargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 375 extern bool_t nlm4_unlock_msg_4_svc(nlm4_unlockargs *, void *, struct svc_req *); 376 #define NLM4_GRANTED_MSG ((unsigned long)(10)) 377 extern enum clnt_stat nlm4_granted_msg_4(nlm4_testargs *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 378 extern bool_t nlm4_granted_msg_4_svc(nlm4_testargs *, void *, struct svc_req *); 379 #define NLM4_TEST_RES ((unsigned long)(11)) 380 extern enum clnt_stat nlm4_test_res_4(nlm4_testres *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 381 extern bool_t nlm4_test_res_4_svc(nlm4_testres *, void *, struct svc_req *); 382 #define NLM4_LOCK_RES ((unsigned long)(12)) 383 extern enum clnt_stat nlm4_lock_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 384 extern bool_t nlm4_lock_res_4_svc(nlm4_res *, void *, struct svc_req *); 385 #define NLM4_CANCEL_RES ((unsigned long)(13)) 386 extern enum clnt_stat nlm4_cancel_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 387 extern bool_t nlm4_cancel_res_4_svc(nlm4_res *, void *, struct svc_req *); 388 #define NLM4_UNLOCK_RES ((unsigned long)(14)) 389 extern enum clnt_stat nlm4_unlock_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 390 extern bool_t nlm4_unlock_res_4_svc(nlm4_res *, void *, struct svc_req *); 391 #define NLM4_GRANTED_RES ((unsigned long)(15)) 392 extern enum clnt_stat nlm4_granted_res_4(nlm4_res *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 393 extern bool_t nlm4_granted_res_4_svc(nlm4_res *, void *, struct svc_req *); 394 #define NLM4_SHARE ((unsigned long)(20)) 395 extern enum clnt_stat nlm4_share_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); 396 extern bool_t nlm4_share_4_svc(nlm4_shareargs *, nlm4_shareres *, struct svc_req *); 397 #define NLM4_UNSHARE ((unsigned long)(21)) 398 extern enum clnt_stat nlm4_unshare_4(nlm4_shareargs *, nlm4_shareres *, CLIENT *, struct rpc_callextra *, struct timeval); 399 extern bool_t nlm4_unshare_4_svc(nlm4_shareargs *, nlm4_shareres *, struct svc_req *); 400 #define NLM4_NM_LOCK ((unsigned long)(22)) 401 extern enum clnt_stat nlm4_nm_lock_4(nlm4_lockargs *, nlm4_res *, CLIENT *, struct rpc_callextra *, struct timeval); 402 extern bool_t nlm4_nm_lock_4_svc(nlm4_lockargs *, nlm4_res *, struct svc_req *); 403 #define NLM4_FREE_ALL ((unsigned long)(23)) 404 extern enum clnt_stat nlm4_free_all_4(nlm4_notify *, void *, CLIENT *, struct rpc_callextra *, struct timeval); 405 extern bool_t nlm4_free_all_4_svc(nlm4_notify *, void *, struct svc_req *); 406 extern int nlm_prog_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t); 407 408 /* the xdr functions */ 409 extern bool_t xdr_nlm_stats(XDR *, nlm_stats*); 410 extern bool_t xdr_nlm_holder(XDR *, nlm_holder*); 411 extern bool_t xdr_nlm_testrply(XDR *, nlm_testrply*); 412 extern bool_t xdr_nlm_stat(XDR *, nlm_stat*); 413 extern bool_t xdr_nlm_res(XDR *, nlm_res*); 414 extern bool_t xdr_nlm_testres(XDR *, nlm_testres*); 415 extern bool_t xdr_nlm_lock(XDR *, nlm_lock*); 416 extern bool_t xdr_nlm_lockargs(XDR *, nlm_lockargs*); 417 extern bool_t xdr_nlm_cancargs(XDR *, nlm_cancargs*); 418 extern bool_t xdr_nlm_testargs(XDR *, nlm_testargs*); 419 extern bool_t xdr_nlm_unlockargs(XDR *, nlm_unlockargs*); 420 extern bool_t xdr_fsh_mode(XDR *, fsh_mode*); 421 extern bool_t xdr_fsh_access(XDR *, fsh_access*); 422 extern bool_t xdr_nlm_share(XDR *, nlm_share*); 423 extern bool_t xdr_nlm_shareargs(XDR *, nlm_shareargs*); 424 extern bool_t xdr_nlm_shareres(XDR *, nlm_shareres*); 425 extern bool_t xdr_nlm_notify(XDR *, nlm_notify*); 426 extern bool_t xdr_nlm4_stats(XDR *, nlm4_stats*); 427 extern bool_t xdr_nlm4_stat(XDR *, nlm4_stat*); 428 extern bool_t xdr_nlm4_holder(XDR *, nlm4_holder*); 429 extern bool_t xdr_nlm4_lock(XDR *, nlm4_lock*); 430 extern bool_t xdr_nlm4_share(XDR *, nlm4_share*); 431 extern bool_t xdr_nlm4_testrply(XDR *, nlm4_testrply*); 432 extern bool_t xdr_nlm4_testres(XDR *, nlm4_testres*); 433 extern bool_t xdr_nlm4_testargs(XDR *, nlm4_testargs*); 434 extern bool_t xdr_nlm4_res(XDR *, nlm4_res*); 435 extern bool_t xdr_nlm4_lockargs(XDR *, nlm4_lockargs*); 436 extern bool_t xdr_nlm4_cancargs(XDR *, nlm4_cancargs*); 437 extern bool_t xdr_nlm4_unlockargs(XDR *, nlm4_unlockargs*); 438 extern bool_t xdr_nlm4_shareargs(XDR *, nlm4_shareargs*); 439 extern bool_t xdr_nlm4_shareres(XDR *, nlm4_shareres*); 440 extern bool_t xdr_nlm_sm_status(XDR *, nlm_sm_status*); 441 extern bool_t xdr_nlm4_notify(XDR *, nlm4_notify*); 442 443 #ifdef __cplusplus 444 } 445 #endif 446 447 #endif /* !_NLM_PROT_H_RPCGEN */ 448