1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #include <nlm/nlm_prot.h> 7 #include <sys/cdefs.h> 8 #ifndef lint 9 /*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/ 10 /*static char sccsid[] = "from: * @(#)nlm_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ 11 __RCSID("$NetBSD: nlm_prot.x,v 1.6 2000/06/07 14:30:15 bouyer Exp $"); 12 #endif /* not lint */ 13 __FBSDID("$FreeBSD$"); 14 15 bool_t 16 xdr_nlm_stats(XDR *xdrs, nlm_stats *objp) 17 { 18 19 if (!xdr_enum(xdrs, (enum_t *)objp)) 20 return (FALSE); 21 return (TRUE); 22 } 23 24 bool_t 25 xdr_nlm_holder(XDR *xdrs, nlm_holder *objp) 26 { 27 28 if (!xdr_bool(xdrs, &objp->exclusive)) 29 return (FALSE); 30 if (!xdr_int(xdrs, &objp->svid)) 31 return (FALSE); 32 if (!xdr_netobj(xdrs, &objp->oh)) 33 return (FALSE); 34 if (!xdr_u_int(xdrs, &objp->l_offset)) 35 return (FALSE); 36 if (!xdr_u_int(xdrs, &objp->l_len)) 37 return (FALSE); 38 return (TRUE); 39 } 40 41 bool_t 42 xdr_nlm_testrply(XDR *xdrs, nlm_testrply *objp) 43 { 44 45 if (!xdr_nlm_stats(xdrs, &objp->stat)) 46 return (FALSE); 47 switch (objp->stat) { 48 case nlm_denied: 49 if (!xdr_nlm_holder(xdrs, &objp->nlm_testrply_u.holder)) 50 return (FALSE); 51 break; 52 default: 53 break; 54 } 55 return (TRUE); 56 } 57 58 bool_t 59 xdr_nlm_stat(XDR *xdrs, nlm_stat *objp) 60 { 61 62 if (!xdr_nlm_stats(xdrs, &objp->stat)) 63 return (FALSE); 64 return (TRUE); 65 } 66 67 bool_t 68 xdr_nlm_res(XDR *xdrs, nlm_res *objp) 69 { 70 71 if (!xdr_netobj(xdrs, &objp->cookie)) 72 return (FALSE); 73 if (!xdr_nlm_stat(xdrs, &objp->stat)) 74 return (FALSE); 75 return (TRUE); 76 } 77 78 bool_t 79 xdr_nlm_testres(XDR *xdrs, nlm_testres *objp) 80 { 81 82 if (!xdr_netobj(xdrs, &objp->cookie)) 83 return (FALSE); 84 if (!xdr_nlm_testrply(xdrs, &objp->stat)) 85 return (FALSE); 86 return (TRUE); 87 } 88 89 bool_t 90 xdr_nlm_lock(XDR *xdrs, nlm_lock *objp) 91 { 92 93 if (!xdr_string(xdrs, &objp->caller_name, LM_MAXSTRLEN)) 94 return (FALSE); 95 if (!xdr_netobj(xdrs, &objp->fh)) 96 return (FALSE); 97 if (!xdr_netobj(xdrs, &objp->oh)) 98 return (FALSE); 99 if (!xdr_int(xdrs, &objp->svid)) 100 return (FALSE); 101 if (!xdr_u_int(xdrs, &objp->l_offset)) 102 return (FALSE); 103 if (!xdr_u_int(xdrs, &objp->l_len)) 104 return (FALSE); 105 return (TRUE); 106 } 107 108 bool_t 109 xdr_nlm_lockargs(XDR *xdrs, nlm_lockargs *objp) 110 { 111 112 if (!xdr_netobj(xdrs, &objp->cookie)) 113 return (FALSE); 114 if (!xdr_bool(xdrs, &objp->block)) 115 return (FALSE); 116 if (!xdr_bool(xdrs, &objp->exclusive)) 117 return (FALSE); 118 if (!xdr_nlm_lock(xdrs, &objp->alock)) 119 return (FALSE); 120 if (!xdr_bool(xdrs, &objp->reclaim)) 121 return (FALSE); 122 if (!xdr_int(xdrs, &objp->state)) 123 return (FALSE); 124 return (TRUE); 125 } 126 127 bool_t 128 xdr_nlm_cancargs(XDR *xdrs, nlm_cancargs *objp) 129 { 130 131 if (!xdr_netobj(xdrs, &objp->cookie)) 132 return (FALSE); 133 if (!xdr_bool(xdrs, &objp->block)) 134 return (FALSE); 135 if (!xdr_bool(xdrs, &objp->exclusive)) 136 return (FALSE); 137 if (!xdr_nlm_lock(xdrs, &objp->alock)) 138 return (FALSE); 139 return (TRUE); 140 } 141 142 bool_t 143 xdr_nlm_testargs(XDR *xdrs, nlm_testargs *objp) 144 { 145 146 if (!xdr_netobj(xdrs, &objp->cookie)) 147 return (FALSE); 148 if (!xdr_bool(xdrs, &objp->exclusive)) 149 return (FALSE); 150 if (!xdr_nlm_lock(xdrs, &objp->alock)) 151 return (FALSE); 152 return (TRUE); 153 } 154 155 bool_t 156 xdr_nlm_unlockargs(XDR *xdrs, nlm_unlockargs *objp) 157 { 158 159 if (!xdr_netobj(xdrs, &objp->cookie)) 160 return (FALSE); 161 if (!xdr_nlm_lock(xdrs, &objp->alock)) 162 return (FALSE); 163 return (TRUE); 164 } 165 166 bool_t 167 xdr_fsh_mode(XDR *xdrs, fsh_mode *objp) 168 { 169 170 if (!xdr_enum(xdrs, (enum_t *)objp)) 171 return (FALSE); 172 return (TRUE); 173 } 174 175 bool_t 176 xdr_fsh_access(XDR *xdrs, fsh_access *objp) 177 { 178 179 if (!xdr_enum(xdrs, (enum_t *)objp)) 180 return (FALSE); 181 return (TRUE); 182 } 183 184 bool_t 185 xdr_nlm_share(XDR *xdrs, nlm_share *objp) 186 { 187 188 if (!xdr_string(xdrs, &objp->caller_name, LM_MAXSTRLEN)) 189 return (FALSE); 190 if (!xdr_netobj(xdrs, &objp->fh)) 191 return (FALSE); 192 if (!xdr_netobj(xdrs, &objp->oh)) 193 return (FALSE); 194 if (!xdr_fsh_mode(xdrs, &objp->mode)) 195 return (FALSE); 196 if (!xdr_fsh_access(xdrs, &objp->access)) 197 return (FALSE); 198 return (TRUE); 199 } 200 201 bool_t 202 xdr_nlm_shareargs(XDR *xdrs, nlm_shareargs *objp) 203 { 204 205 if (!xdr_netobj(xdrs, &objp->cookie)) 206 return (FALSE); 207 if (!xdr_nlm_share(xdrs, &objp->share)) 208 return (FALSE); 209 if (!xdr_bool(xdrs, &objp->reclaim)) 210 return (FALSE); 211 return (TRUE); 212 } 213 214 bool_t 215 xdr_nlm_shareres(XDR *xdrs, nlm_shareres *objp) 216 { 217 218 if (!xdr_netobj(xdrs, &objp->cookie)) 219 return (FALSE); 220 if (!xdr_nlm_stats(xdrs, &objp->stat)) 221 return (FALSE); 222 if (!xdr_int(xdrs, &objp->sequence)) 223 return (FALSE); 224 return (TRUE); 225 } 226 227 bool_t 228 xdr_nlm_notify(XDR *xdrs, nlm_notify *objp) 229 { 230 231 if (!xdr_string(xdrs, &objp->name, MAXNAMELEN)) 232 return (FALSE); 233 if (!xdr_long(xdrs, &objp->state)) 234 return (FALSE); 235 return (TRUE); 236 } 237 238 bool_t 239 xdr_nlm4_stats(XDR *xdrs, nlm4_stats *objp) 240 { 241 242 if (!xdr_enum(xdrs, (enum_t *)objp)) 243 return (FALSE); 244 return (TRUE); 245 } 246 247 bool_t 248 xdr_nlm4_stat(XDR *xdrs, nlm4_stat *objp) 249 { 250 251 if (!xdr_nlm4_stats(xdrs, &objp->stat)) 252 return (FALSE); 253 return (TRUE); 254 } 255 256 bool_t 257 xdr_nlm4_holder(XDR *xdrs, nlm4_holder *objp) 258 { 259 260 if (!xdr_bool(xdrs, &objp->exclusive)) 261 return (FALSE); 262 if (!xdr_uint32_t(xdrs, &objp->svid)) 263 return (FALSE); 264 if (!xdr_netobj(xdrs, &objp->oh)) 265 return (FALSE); 266 if (!xdr_uint64_t(xdrs, &objp->l_offset)) 267 return (FALSE); 268 if (!xdr_uint64_t(xdrs, &objp->l_len)) 269 return (FALSE); 270 return (TRUE); 271 } 272 273 bool_t 274 xdr_nlm4_lock(XDR *xdrs, nlm4_lock *objp) 275 { 276 277 if (!xdr_string(xdrs, &objp->caller_name, MAXNAMELEN)) 278 return (FALSE); 279 if (!xdr_netobj(xdrs, &objp->fh)) 280 return (FALSE); 281 if (!xdr_netobj(xdrs, &objp->oh)) 282 return (FALSE); 283 if (!xdr_uint32_t(xdrs, &objp->svid)) 284 return (FALSE); 285 if (!xdr_uint64_t(xdrs, &objp->l_offset)) 286 return (FALSE); 287 if (!xdr_uint64_t(xdrs, &objp->l_len)) 288 return (FALSE); 289 return (TRUE); 290 } 291 292 bool_t 293 xdr_nlm4_share(XDR *xdrs, nlm4_share *objp) 294 { 295 296 if (!xdr_string(xdrs, &objp->caller_name, MAXNAMELEN)) 297 return (FALSE); 298 if (!xdr_netobj(xdrs, &objp->fh)) 299 return (FALSE); 300 if (!xdr_netobj(xdrs, &objp->oh)) 301 return (FALSE); 302 if (!xdr_fsh_mode(xdrs, &objp->mode)) 303 return (FALSE); 304 if (!xdr_fsh_access(xdrs, &objp->access)) 305 return (FALSE); 306 return (TRUE); 307 } 308 309 bool_t 310 xdr_nlm4_testrply(XDR *xdrs, nlm4_testrply *objp) 311 { 312 313 if (!xdr_nlm4_stats(xdrs, &objp->stat)) 314 return (FALSE); 315 switch (objp->stat) { 316 case nlm_denied: 317 if (!xdr_nlm4_holder(xdrs, &objp->nlm4_testrply_u.holder)) 318 return (FALSE); 319 break; 320 default: 321 break; 322 } 323 return (TRUE); 324 } 325 326 bool_t 327 xdr_nlm4_testres(XDR *xdrs, nlm4_testres *objp) 328 { 329 330 if (!xdr_netobj(xdrs, &objp->cookie)) 331 return (FALSE); 332 if (!xdr_nlm4_testrply(xdrs, &objp->stat)) 333 return (FALSE); 334 return (TRUE); 335 } 336 337 bool_t 338 xdr_nlm4_testargs(XDR *xdrs, nlm4_testargs *objp) 339 { 340 341 if (!xdr_netobj(xdrs, &objp->cookie)) 342 return (FALSE); 343 if (!xdr_bool(xdrs, &objp->exclusive)) 344 return (FALSE); 345 if (!xdr_nlm4_lock(xdrs, &objp->alock)) 346 return (FALSE); 347 return (TRUE); 348 } 349 350 bool_t 351 xdr_nlm4_res(XDR *xdrs, nlm4_res *objp) 352 { 353 354 if (!xdr_netobj(xdrs, &objp->cookie)) 355 return (FALSE); 356 if (!xdr_nlm4_stat(xdrs, &objp->stat)) 357 return (FALSE); 358 return (TRUE); 359 } 360 361 bool_t 362 xdr_nlm4_lockargs(XDR *xdrs, nlm4_lockargs *objp) 363 { 364 365 if (!xdr_netobj(xdrs, &objp->cookie)) 366 return (FALSE); 367 if (!xdr_bool(xdrs, &objp->block)) 368 return (FALSE); 369 if (!xdr_bool(xdrs, &objp->exclusive)) 370 return (FALSE); 371 if (!xdr_nlm4_lock(xdrs, &objp->alock)) 372 return (FALSE); 373 if (!xdr_bool(xdrs, &objp->reclaim)) 374 return (FALSE); 375 if (!xdr_int(xdrs, &objp->state)) 376 return (FALSE); 377 return (TRUE); 378 } 379 380 bool_t 381 xdr_nlm4_cancargs(XDR *xdrs, nlm4_cancargs *objp) 382 { 383 384 if (!xdr_netobj(xdrs, &objp->cookie)) 385 return (FALSE); 386 if (!xdr_bool(xdrs, &objp->block)) 387 return (FALSE); 388 if (!xdr_bool(xdrs, &objp->exclusive)) 389 return (FALSE); 390 if (!xdr_nlm4_lock(xdrs, &objp->alock)) 391 return (FALSE); 392 return (TRUE); 393 } 394 395 bool_t 396 xdr_nlm4_unlockargs(XDR *xdrs, nlm4_unlockargs *objp) 397 { 398 399 if (!xdr_netobj(xdrs, &objp->cookie)) 400 return (FALSE); 401 if (!xdr_nlm4_lock(xdrs, &objp->alock)) 402 return (FALSE); 403 return (TRUE); 404 } 405 406 bool_t 407 xdr_nlm4_shareargs(XDR *xdrs, nlm4_shareargs *objp) 408 { 409 410 if (!xdr_netobj(xdrs, &objp->cookie)) 411 return (FALSE); 412 if (!xdr_nlm4_share(xdrs, &objp->share)) 413 return (FALSE); 414 if (!xdr_bool(xdrs, &objp->reclaim)) 415 return (FALSE); 416 return (TRUE); 417 } 418 419 bool_t 420 xdr_nlm4_shareres(XDR *xdrs, nlm4_shareres *objp) 421 { 422 423 if (!xdr_netobj(xdrs, &objp->cookie)) 424 return (FALSE); 425 if (!xdr_nlm4_stats(xdrs, &objp->stat)) 426 return (FALSE); 427 if (!xdr_int(xdrs, &objp->sequence)) 428 return (FALSE); 429 return (TRUE); 430 } 431 432 bool_t 433 xdr_nlm_sm_status(XDR *xdrs, nlm_sm_status *objp) 434 { 435 436 if (!xdr_string(xdrs, &objp->mon_name, LM_MAXSTRLEN)) 437 return (FALSE); 438 if (!xdr_int(xdrs, &objp->state)) 439 return (FALSE); 440 if (!xdr_opaque(xdrs, objp->priv, 16)) 441 return (FALSE); 442 return (TRUE); 443 } 444 445 bool_t 446 xdr_nlm4_notify(XDR *xdrs, nlm4_notify *objp) 447 { 448 449 if (!xdr_string(xdrs, &objp->name, MAXNAMELEN)) 450 return (FALSE); 451 if (!xdr_int32_t(xdrs, &objp->state)) 452 return (FALSE); 453 return (TRUE); 454 } 455