Lines Matching refs:args

70 clntudp_bufcreate1(struct clntudp_bufcreate_args *args)  in clntudp_bufcreate1()  argument
72 args->cl = (CLIENT *)mem_alloc(sizeof(CLIENT)); in clntudp_bufcreate1()
73 if (args->cl == NULL) { in clntudp_bufcreate1()
78 args->sendsz = ((args->sendsz + 3) / 4) * 4; in clntudp_bufcreate1()
79 args->recvsz = ((args->recvsz + 3) / 4) * 4; in clntudp_bufcreate1()
80 args->cu = (struct cu_data *)mem_alloc(sizeof(*args->cu) + in clntudp_bufcreate1()
81 args->sendsz + args->recvsz); in clntudp_bufcreate1()
82 if (args->cu == NULL) { in clntudp_bufcreate1()
87 args->cu->cu_outbuf = &args->cu->cu_inbuf[args->recvsz]; in clntudp_bufcreate1()
88 args->cl->cl_ops = &udp_ops; in clntudp_bufcreate1()
89 args->cl->cl_private = (caddr_t)args->cu; in clntudp_bufcreate1()
90 args->cu->cu_connected = 0; in clntudp_bufcreate1()
91 args->cu->cu_rlen = sizeof (args->cu->cu_raddr); in clntudp_bufcreate1()
92 args->cu->cu_wait = args->wait; in clntudp_bufcreate1()
93 args->cu->cu_total.tv_sec = -1; in clntudp_bufcreate1()
94 args->cu->cu_total.tv_usec = -1; in clntudp_bufcreate1()
95 args->cu->cu_sendsz = args->sendsz; in clntudp_bufcreate1()
96 args->cu->cu_recvsz = args->recvsz; in clntudp_bufcreate1()
97 args->cu->cu_closeit = FALSE; in clntudp_bufcreate1()
98 args->call_msg.rm_xid = arc4random(); in clntudp_bufcreate1()
99 args->call_msg.rm_direction = CALL; in clntudp_bufcreate1()
100 args->call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; in clntudp_bufcreate1()
101 args->call_msg.rm_call.cb_prog = args->program; in clntudp_bufcreate1()
102 args->call_msg.rm_call.cb_vers = args->version; in clntudp_bufcreate1()
107 clntudp_bufcreate2(struct clntudp_bufcreate_args *args) in clntudp_bufcreate2() argument
109 xdrmem_create(&(args->cu->cu_outxdrs), args->cu->cu_outbuf, in clntudp_bufcreate2()
110 args->sendsz, XDR_ENCODE); in clntudp_bufcreate2()
111 if (!xdr_callhdr(&(args->cu->cu_outxdrs), &args->call_msg)) in clntudp_bufcreate2()
113 args->cu->cu_xdrpos = XDR_GETPOS(&(args->cu->cu_outxdrs)); in clntudp_bufcreate2()
114 args->cl->cl_auth = authnone_create(); in clntudp_bufcreate2()
115 if (args->cl->cl_auth == NULL) { in clntudp_bufcreate2()
152 struct clntudp_bufcreate_args args; in clntudp_bufcreate_simple() local
154 args.raddr = raddr; in clntudp_bufcreate_simple()
155 args.program = program; in clntudp_bufcreate_simple()
156 args.version = version; in clntudp_bufcreate_simple()
157 args.wait = wait; in clntudp_bufcreate_simple()
158 args.sockp = sockp; in clntudp_bufcreate_simple()
159 args.sendsz = sendsz; in clntudp_bufcreate_simple()
160 args.recvsz = recvsz; in clntudp_bufcreate_simple()
161 args.cl = NULL; in clntudp_bufcreate_simple()
162 args.cu = NULL; in clntudp_bufcreate_simple()
164 if (clntudp_bufcreate1(&args) == -1) in clntudp_bufcreate_simple()
166 args.cu->cu_raddr = *raddr; in clntudp_bufcreate_simple()
167 args.cu->cu_sock = *sockp; in clntudp_bufcreate_simple()
168 if (clntudp_bufcreate2(&args) == -1) in clntudp_bufcreate_simple()
170 return (args.cl); in clntudp_bufcreate_simple()
172 if (args.cu) in clntudp_bufcreate_simple()
173 mem_free((caddr_t)args.cu, in clntudp_bufcreate_simple()
174 sizeof(*args.cu) + args.sendsz + args.recvsz); in clntudp_bufcreate_simple()
175 if (args.cl) in clntudp_bufcreate_simple()
176 mem_free((caddr_t)args.cl, sizeof(CLIENT)); in clntudp_bufcreate_simple()