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