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