Lines Matching full:xdr
29 xdr_s_type *xdr;
62 extern void xdr_destroy_common(xdr_s_type *xdr);
63 extern bool_t xdr_recv_reply_header (xdr_s_type *xdr, rpc_reply_header *reply);
79 (client->xdr->x_prog | 0x01000000),
80 client->xdr->x_vers);
92 (client->xdr->x_prog | 0x01000000),
93 client->xdr->x_vers);
104 ntohl(((uint32 *)(client->xdr->in_msg))[RPC_OFFSET+3]);
106 ntohl(((uint32 *)(client->xdr->in_msg))[RPC_OFFSET+4]);
110 XDR **svc_xdr = (XDR **)svc;
111 D("%08x:%08x dispatching RPC call (XID %d, xdr %p) for "
113 client->xdr->x_prog,
114 client->xdr->x_vers,
115 ntohl(((uint32 *)(client->xdr->in_msg))[RPC_OFFSET]),
116 client->xdr,
118 /* We transplant the xdr of the client into the entry
127 D("%08x:%08x expecting XDR == NULL"
129 client->xdr->x_prog,
130 client->xdr->x_vers,
135 D("%08x:%08x cloning XDR for "
137 client->xdr->x_prog,
138 client->xdr->x_vers,
140 *svc_xdr = xdr_clone(client->xdr);
145 client->xdr->in_msg, client->xdr->in_len);
147 client->xdr->out_msg, client->xdr->out_next);
148 (*svc_xdr)->in_len = client->xdr->in_len;
149 (*svc_xdr)->out_next = client->xdr->out_next;
153 client->xdr->x_prog, client->xdr->x_vers);
164 client->xdr->x_prog,
165 client->xdr->x_vers,
170 client->xdr->x_prog,
171 client->xdr->x_vers);
179 (client->xdr->x_prog | 0x01000000),
180 client->xdr->x_vers);
204 if (FD_ISSET(client->xdr->fd, &rfds)) {
206 /* We need to make sure that the XDR's in_buf is not in
215 D("%08x:%08x waiting for XDR input buffer "
217 client->xdr->x_prog, client->xdr->x_vers);
223 client->xdr->x_prog, client->xdr->x_vers);
225 if (client->xdr->xops->read(client->xdr) == 0) {
227 client->xdr->x_prog, client->xdr->x_vers);
233 if (((uint32 *)(client->xdr->in_msg))[RPC_OFFSET+1] ==
238 client->xdr->x_prog,
239 client->xdr->x_vers,
240 ntohl(((uint32 *)client->xdr->in_msg)[RPC_OFFSET]));
243 client->xdr->x_prog,
244 client->xdr->x_vers);
253 client->xdr->x_prog,
254 client->xdr->x_vers);
258 client->xdr->x_prog,
259 client->xdr->x_vers);
266 client->xdr->x_prog,
267 client->xdr->x_vers);
281 if (trav->xdr)
283 trav->xdr->x_prog,
284 trav->xdr->x_vers,
285 trav->xdr->fd);
311 xdr_s_type *xdr = client->xdr;
321 xdr->x_op = XDR_ENCODE;
325 if (!xdr_call_msg_start (xdr, xdr->x_prog, xdr->x_vers,
327 XDR_MSG_ABORT (xdr);
330 client->xdr->x_prog,
331 client->xdr->x_vers);
337 if (!xdr_args (xdr, args_ptr)) {
338 XDR_MSG_ABORT(xdr);
341 client->xdr->x_prog,
342 client->xdr->x_vers);
349 client->xdr->x_prog, client->xdr->x_vers, client->xdr->xid);
350 if (!XDR_MSG_SEND(xdr)) {
357 client->xdr->x_prog, client->xdr->x_vers);
359 D("%08x:%08x received reply.\n", client->xdr->x_prog, client->xdr->x_vers);
361 if (((uint32 *)xdr->out_msg)[RPC_OFFSET] !=
362 ((uint32 *)xdr->in_msg)[RPC_OFFSET]) {
364 client->xdr->x_prog, client->xdr->x_vers,
365 ntohl(((uint32 *)xdr->in_msg)[RPC_OFFSET]),
366 ntohl(((uint32 *)xdr->out_msg)[RPC_OFFSET]));
372 client->xdr->x_prog, client->xdr->x_vers);
373 if (!xdr_recv_reply_header (client->xdr, &reply_header)) {
375 client->xdr->x_prog, client->xdr->x_vers);
385 (uint32_t)client->xdr->x_prog, client->xdr->x_vers);
391 (uint32_t)client->xdr->x_prog, client->xdr->x_vers);
395 xdr->x_op = XDR_DECODE;
397 if (!xdr_results(xdr, rets_ptr) || ! XDR_MSG_DONE(xdr)) {
400 client->xdr->x_prog, client->xdr->x_vers);
405 client->xdr->x_prog, client->xdr->x_vers);
410 client->xdr->x_prog, client->xdr->x_vers);
421 bool_t xdr_recv_auth (xdr_s_type *xdr, opaque_auth *auth)
425 if(!XDR_RECV_INT8(xdr, (int8_t *)&(auth->oa_flavor))) return FALSE;
428 if(!XDR_RECV_INT16(xdr, (int16_t *)&(auth->oa_flavor))) return FALSE;
431 if(!XDR_RECV_INT32(xdr, (int32_t *)&(auth->oa_flavor))) return FALSE;
434 if (!XDR_RECV_UINT (xdr, (unsigned *)&(auth->oa_length))) {
441 if (!XDR_RECV_BYTES (xdr, NULL, auth->oa_length))
451 xdr,
454 if (!xdr_recv_auth(xdr, &accreply->verf)) {
458 if (!XDR_RECV_ENUM(xdr, &accreply->stat)) {
464 if (!XDR_RECV_UINT32(xdr, &accreply->u.versions.low)) {
468 if (!XDR_RECV_UINT32(xdr, &accreply->u.versions.high)) {
489 static bool_t xdr_recv_denied_reply(xdr_s_type *xdr,
492 if (!XDR_RECV_ENUM (xdr, &rejreply->stat))
497 if (!XDR_RECV_UINT32(xdr, &rejreply->u.versions.low))
499 if (!XDR_RECV_UINT32(xdr, &rejreply->u.versions.high))
503 if (!XDR_RECV_ENUM (xdr, &rejreply->u.why))
513 bool_t xdr_recv_reply_header (xdr_s_type *xdr, rpc_reply_header *reply)
515 if (!XDR_RECV_ENUM(xdr, &reply->stat)) {
521 if (!xdr_recv_accepted_reply_header(xdr, &reply->u.ar))
525 if (!xdr_recv_denied_reply(xdr, &reply->u.dr))
553 client->xdr = xdr_init_common(name, 1 /* client XDR */);
554 if (!client->xdr) {
560 client->xdr->x_prog = prog;
561 client->xdr->x_vers = vers;
569 FD_SET(client->xdr->fd, &rx_fdset);
570 if (max_rxfd < client->xdr->fd)
571 max_rxfd = client->xdr->fd;
599 client->xdr->x_prog,
600 client->xdr->x_vers);
607 client->xdr->x_prog,
608 client->xdr->x_vers);
613 client->xdr->x_prog,
614 client->xdr->x_vers);
624 client->xdr->x_prog,
625 client->xdr->x_vers);
631 FD_CLR(client->xdr->fd, &rx_fdset);
649 xdr_destroy_common(client->xdr);