Home
last modified time | relevance | path

Searched refs:ctlbuf (Results 1 – 25 of 47) sorted by relevance

12

/illumos-gate/usr/src/lib/libnsl/nsl/
H A Dt_rcvudata.c58 struct strbuf ctlbuf; in _tx_rcvudata() local
102 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvudata()
118 if ((retval = getmsg(fd, &ctlbuf, (struct strbuf *)&unitdata->udata, in _tx_rcvudata()
137 if (ctlbuf.len > 0) { in _tx_rcvudata()
138 if (ctlbuf.len < (int)sizeof (t_scalar_t)) { in _tx_rcvudata()
146 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcvudata()
151 if ((ctlbuf.len < in _tx_rcvudata()
154 (ctlbuf.len < (int)(pptr->unitdata_ind.OPT_length in _tx_rcvudata()
171 ctlbuf.buf + pptr->unitdata_ind.SRC_offset, in _tx_rcvudata()
184 (void) memcpy(unitdata->opt.buf, ctlbuf.buf + in _tx_rcvudata()
[all …]
H A Dt_rcvvudata.c58 struct strbuf ctlbuf; in _tx_rcvvudata() local
105 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvvudata()
132 if ((retval = getmsg(fd, &ctlbuf, &databuf, &flg)) < 0) { in _tx_rcvvudata()
147 if (ctlbuf.len > 0) { in _tx_rcvvudata()
148 if (ctlbuf.len < (int)sizeof (t_scalar_t)) { in _tx_rcvvudata()
155 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcvvudata()
160 if ((ctlbuf.len < in _tx_rcvvudata()
163 (ctlbuf.len < (int)(pptr->unitdata_ind.OPT_length in _tx_rcvvudata()
177 ctlbuf.buf + pptr->unitdata_ind.SRC_offset, in _tx_rcvvudata()
188 (void) memcpy(unitdata->opt.buf, ctlbuf.buf + in _tx_rcvvudata()
[all …]
H A Dt_rcvv.c51 struct strbuf ctlbuf, databuf; in _tx_rcvv() local
162 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvv()
175 free(ctlbuf.buf); in _tx_rcvv()
177 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_rcvv()
196 if ((retval = getmsg(fd, &ctlbuf, &databuf, &flg)) < 0) { in _tx_rcvv()
212 if (ctlbuf.len > 0) { in _tx_rcvv()
213 if (ctlbuf.len < (int)sizeof (t_scalar_t)) { in _tx_rcvv()
220 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcvv()
234 if ((ctlbuf.len < (int)sizeof (struct T_data_ind)) || in _tx_rcvv()
259 free(ctlbuf.buf); in _tx_rcvv()
[all …]
H A Dt_rcv.c53 struct strbuf ctlbuf, databuf; in _tx_rcv() local
161 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcv()
181 if ((retval = getmsg(fd, &ctlbuf, &databuf, &flg)) < 0) { in _tx_rcv()
197 if (ctlbuf.len > 0) { in _tx_rcv()
198 if (ctlbuf.len < (int)sizeof (t_scalar_t)) { in _tx_rcv()
205 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcv()
219 if ((ctlbuf.len < (int)sizeof (struct T_data_ind)) || in _tx_rcv()
244 free(ctlbuf.buf); in _tx_rcv()
246 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_rcv()
270 ctlbuf.buf, ctlbuf.len) < 0) { in _tx_rcv()
[all …]
H A Dt_rcvuderr.c48 struct strbuf ctlbuf, databuf; in _tx_rcvuderr() local
71 ctlbuf.len = tiptr->ti_lookbufs.tl_lookclen; in _tx_rcvuderr()
72 ctlbuf.buf = tiptr->ti_lookbufs.tl_lookcbuf; in _tx_rcvuderr()
76 assert(((union T_primitives *)ctlbuf.buf)->type in _tx_rcvuderr()
103 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvuderr()
121 if ((retval = getmsg(fd, &ctlbuf, &databuf, &flg)) < 0) { in _tx_rcvuderr()
138 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcvuderr()
140 if ((ctlbuf.len < (int)sizeof (struct T_uderror_ind)) || in _tx_rcvuderr()
154 (void) memcpy(uderr->addr.buf, ctlbuf.buf + in _tx_rcvuderr()
166 (void) memcpy(uderr->opt.buf, ctlbuf.buf + in _tx_rcvuderr()
[all …]
H A Dt_listen.c47 struct strbuf ctlbuf; in _tx_listen() local
110 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_listen()
123 free(ctlbuf.buf); in _tx_listen()
125 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_listen()
138 if ((retval = getmsg(fd, &ctlbuf, &databuf, &flg)) < 0) { in _tx_listen()
164 if (ctlbuf.len < (int)sizeof (t_scalar_t)) { in _tx_listen()
171 pptr = (union T_primitives *)ctlbuf.buf; in _tx_listen()
176 if ((ctlbuf.len < (int)sizeof (struct T_conn_ind)) || in _tx_listen()
177 (ctlbuf.len < (int)(pptr->conn_ind.OPT_length in _tx_listen()
204 (void) memcpy(call->addr.buf, ctlbuf.buf + in _tx_listen()
[all …]
H A Dt_rcvrel.c52 struct strbuf ctlbuf; in _tx_rcvrel() local
129 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvrel()
142 free(ctlbuf.buf); in _tx_rcvrel()
144 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_rcvrel()
156 retval = getmsg(fd, &ctlbuf, &databuf, &flg); in _tx_rcvrel()
173 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcvrel()
175 if (ctlbuf.len < (int)sizeof (struct T_ordrel_ind)) { in _tx_rcvrel()
190 databuf.len, ctlbuf.buf, in _tx_rcvrel()
191 ctlbuf.len) < 0) { in _tx_rcvrel()
209 free(ctlbuf.buf); in _tx_rcvrel()
[all …]
H A Dt_rcvreldata.c51 struct strbuf ctlbuf; in _tx_rcvreldata() local
131 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvreldata()
144 free(ctlbuf.buf); in _tx_rcvreldata()
146 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_rcvreldata()
158 retval = getmsg(fd, &ctlbuf, &databuf, &flg); in _tx_rcvreldata()
175 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcvreldata()
177 if (ctlbuf.len < (int)sizeof (struct T_ordrel_ind)) { in _tx_rcvreldata()
192 databuf.len, ctlbuf.buf, in _tx_rcvreldata()
193 ctlbuf.len) < 0) { in _tx_rcvreldata()
211 free(ctlbuf.buf); in _tx_rcvreldata()
[all …]
H A Dt_bind.c61 struct strbuf ctlbuf; in _tx_bind() local
91 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_bind()
100 bind_reqp = (struct T_bind_req *)ctlbuf.buf; in _tx_bind()
118 if (_t_aligned_copy(&ctlbuf, (int)bind_reqp->ADDR_length, size, in _tx_bind()
131 if (_t_do_ioctl(fd, ctlbuf.buf, size, TI_BIND, &retlen) < 0) { in _tx_bind()
142 bind_ackp = (struct T_bind_ack *)ctlbuf.buf; in _tx_bind()
159 (memcmp(req->addr.buf, ctlbuf.buf + in _tx_bind()
161 (void) _tx_unbind_locked(fd, tiptr, &ctlbuf); in _tx_bind()
180 ctlbuf.buf + bind_ackp->ADDR_offset, in _tx_bind()
190 free(ctlbuf.buf); in _tx_bind()
[all …]
H A Dt_sndudata.c52 struct strbuf ctlbuf; in _tx_sndudata() local
104 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_sndudata()
112 udreq = (struct T_unitdata_req *)ctlbuf.buf; in _tx_sndudata()
122 if (_t_aligned_copy(&ctlbuf, unitdata->addr.len, size, in _tx_sndudata()
136 if (_t_aligned_copy(&ctlbuf, unitdata->opt.len, size, in _tx_sndudata()
150 if (size > (int)ctlbuf.maxlen) { in _tx_sndudata()
156 ctlbuf.len = size; in _tx_sndudata()
167 if (putmsg(fd, &ctlbuf, (struct strbuf *)&unitdata->udata, 0) < 0) { in _tx_sndudata()
182 free(ctlbuf.buf); in _tx_sndudata()
184 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_sndudata()
[all …]
H A Dt_accept.c60 struct strbuf ctlbuf; in _tx_accept() local
169 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_accept()
187 cres = (struct T_conn_res *)ctlbuf.buf; in _tx_accept()
203 if (_t_aligned_copy(&ctlbuf, call->opt.len, size, in _tx_accept()
231 ctlbuf.len = size; in _tx_accept()
242 if (putmsg(fd, &ctlbuf, in _tx_accept()
252 strfdinsert.ctlbuf.maxlen = ctlbuf.maxlen; in _tx_accept()
253 strfdinsert.ctlbuf.len = ctlbuf.len; in _tx_accept()
254 strfdinsert.ctlbuf.buf = ctlbuf.buf; in _tx_accept()
338 free(ctlbuf.buf); in _tx_accept()
[all …]
H A Dt_rcvdis.c48 struct strbuf ctlbuf; in _tx_rcvdis() local
101 ctlbuf.len = tiptr->ti_lookbufs.tl_lookclen; in _tx_rcvdis()
102 ctlbuf.buf = tiptr->ti_lookbufs.tl_lookcbuf; in _tx_rcvdis()
134 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvdis()
147 free(ctlbuf.buf); in _tx_rcvdis()
149 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_rcvdis()
161 retval = getmsg(fd, &ctlbuf, &databuf, &flg); in _tx_rcvdis()
182 pptr = (union T_primitives *)ctlbuf.buf; in _tx_rcvdis()
184 if ((ctlbuf.len < (int)sizeof (struct T_discon_ind)) || in _tx_rcvdis()
228 free(ctlbuf.buf); in _tx_rcvdis()
[all …]
H A Dt_sndvudata.c54 struct strbuf ctlbuf; in _tx_sndvudata() local
107 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_sndvudata()
115 udreq = (struct T_unitdata_req *)ctlbuf.buf; in _tx_sndvudata()
125 if (_t_aligned_copy(&ctlbuf, unitdata->addr.len, size, in _tx_sndvudata()
139 if (_t_aligned_copy(&ctlbuf, unitdata->opt.len, size, in _tx_sndvudata()
153 if (size > (int)ctlbuf.maxlen) { in _tx_sndvudata()
159 ctlbuf.len = size; in _tx_sndvudata()
177 if (putmsg(fd, &ctlbuf, &databuf, 0) < 0) { in _tx_sndvudata()
192 free(ctlbuf.buf); in _tx_sndvudata()
194 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_sndvudata()
[all …]
H A Dt_getinfo.c59 struct strbuf ctlbuf; in _tx_getinfo() local
70 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_getinfo()
78 inforeqp = (struct T_info_req *)ctlbuf.buf; in _tx_getinfo()
82 retval = _t_do_ioctl(fd, ctlbuf.buf, in _tx_getinfo()
96 infoackp = (struct T_info_ack *)ctlbuf.buf; in _tx_getinfo()
113 free(ctlbuf.buf); in _tx_getinfo()
115 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_getinfo()
122 free(ctlbuf.buf); in _tx_getinfo()
124 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_getinfo()
H A Dt_optmgmt.c65 struct strbuf ctlbuf; in _tx_optmgmt() local
94 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_optmgmt()
224 optreq = (struct T_optmgmt_req *)ctlbuf.buf; in _tx_optmgmt()
236 if (_t_aligned_copy(&ctlbuf, optlen, size, in _tx_optmgmt()
248 if (_t_do_ioctl(fd, ctlbuf.buf, size, TI_OPTMGMT, &retlen) < 0) in _tx_optmgmt()
258 optack = (struct T_optmgmt_ack *)ctlbuf.buf; in _tx_optmgmt()
266 (char *)(ctlbuf.buf + optack->OPT_offset), in _tx_optmgmt()
310 free(ctlbuf.buf); in _tx_optmgmt()
312 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_optmgmt()
321 free(ctlbuf.buf); in _tx_optmgmt()
[all …]
H A Dt_connect.c62 struct strbuf ctlbuf; in _tx_connect() local
86 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_connect()
97 if (_t_snd_conn_req(tiptr, sndcall, &ctlbuf) < 0) { in _tx_connect()
133 if (_t_rcv_conn_con(tiptr, rcvcall, &ctlbuf, api_semantics) < 0) { in _tx_connect()
161 free(ctlbuf.buf); in _tx_connect()
163 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_connect()
170 free(ctlbuf.buf); in _tx_connect()
172 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_connect()
H A Dt_getname.c114 struct strbuf ctlbuf; in _tx_getprotaddr() local
140 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_getprotaddr()
148 addreqp = (struct T_addr_req *)ctlbuf.buf; in _tx_getprotaddr()
152 retval = _t_do_ioctl(fd, ctlbuf.buf, in _tx_getprotaddr()
173 addrackp = (struct T_addr_ack *)ctlbuf.buf; in _tx_getprotaddr()
187 ctlbuf.buf + addrackp->LOCADDR_offset, in _tx_getprotaddr()
212 ctlbuf.buf + addrackp->REMADDR_offset, in _tx_getprotaddr()
218 free(ctlbuf.buf); in _tx_getprotaddr()
220 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_getprotaddr()
H A Dt_look.c122 strpeek.ctlbuf.maxlen = (int)sizeof (ctltype); in _t_look_locked()
123 strpeek.ctlbuf.len = 0; in _t_look_locked()
124 strpeek.ctlbuf.buf = (char *)&ctltype; in _t_look_locked()
147 ((retval > 0) && (strpeek.ctlbuf.len >= in _t_look_locked()
150 pptr = (union T_primitives *)strpeek.ctlbuf.buf; in _t_look_locked()
224 if ((retval > 0) && (strpeek.ctlbuf.len <= 0)) { in _t_look_locked()
245 if ((retval > 0) && (strpeek.ctlbuf.len > 0)) { in _t_look_locked()
H A Dt_rcvconnect.c54 struct strbuf ctlbuf; in _tx_rcvconnect() local
78 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_rcvconnect()
85 retval = _t_rcv_conn_con(tiptr, call, &ctlbuf, api_semantics); in _tx_rcvconnect()
103 free(ctlbuf.buf); in _tx_rcvconnect()
105 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_rcvconnect()
H A Dt_sndrel.c50 struct strbuf ctlbuf; in _tx_sndrel() local
85 ctlbuf.maxlen = (int)sizeof (struct T_ordrel_req); in _tx_sndrel()
86 ctlbuf.len = (int)sizeof (struct T_ordrel_req); in _tx_sndrel()
87 ctlbuf.buf = (caddr_t)&orreq; in _tx_sndrel()
95 if (putmsg(fd, &ctlbuf, NULL, 0) < 0) { in _tx_sndrel()
H A Dt_sndreldata.c48 struct strbuf ctlbuf; in _tx_sndreldata() local
92 ctlbuf.maxlen = (int)sizeof (struct T_ordrel_req); in _tx_sndreldata()
93 ctlbuf.len = (int)sizeof (struct T_ordrel_req); in _tx_sndreldata()
94 ctlbuf.buf = (caddr_t)&orreq; in _tx_sndreldata()
102 if (putmsg(fd, &ctlbuf, NULL, 0) < 0) { in _tx_sndreldata()
H A D_utility.c337 struct strbuf ctlbuf; in _t_is_ok() local
350 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) in _t_is_ok()
357 free(ctlbuf.buf); in _t_is_ok()
359 tiptr->ti_ctlbuf = ctlbuf.buf; in _t_is_ok()
373 while ((retval = getmsg(fd, &ctlbuf, &databuf, &flags)) < 0) { in _t_is_ok()
394 if (ctlbuf.len < (int)sizeof (t_scalar_t)) { in _t_is_ok()
406 pptr = (union T_primitives *)ctlbuf.buf; in _t_is_ok()
410 if ((ctlbuf.len < (int)sizeof (struct T_ok_ack)) || in _t_is_ok()
417 free(ctlbuf.buf); in _t_is_ok()
419 tiptr->ti_ctlbuf = ctlbuf.buf; in _t_is_ok()
[all …]
H A Dt_unbind.c52 struct strbuf ctlbuf; in _tx_unbind() local
81 if (_t_acquire_ctlbuf(tiptr, &ctlbuf, &didalloc) < 0) { in _tx_unbind()
89 retval = _tx_unbind_locked(fd, tiptr, &ctlbuf); in _tx_unbind()
93 free(ctlbuf.buf); in _tx_unbind()
95 tiptr->ti_ctlbuf = ctlbuf.buf; in _tx_unbind()
H A Dt_snddis.c48 struct strbuf ctlbuf; in _tx_snddis() local
138 ctlbuf.len = (int)sizeof (struct T_discon_req); in _tx_snddis()
139 ctlbuf.maxlen = (int)sizeof (struct T_discon_req); in _tx_snddis()
140 ctlbuf.buf = (char *)&dreq; in _tx_snddis()
155 if (putmsg(fd, &ctlbuf, (databuf.len? &databuf: NULL), 0) < 0) { in _tx_snddis()
/illumos-gate/usr/src/uts/common/ktli/
H A Dt_koptmgmt.c71 char *ctlbuf = NULL; in t_koptmgmt() local
96 ctlbuf = kmem_alloc(ctlsize, KM_SLEEP); in t_koptmgmt()
99 opt_req = (struct T_optmgmt_req *)ctlbuf; in t_koptmgmt()
105 opt_data = ctlbuf + sizeof (*opt_req); in t_koptmgmt()
111 strioc.ic_dp = ctlbuf; in t_koptmgmt()
133 opt_ack = (struct T_optmgmt_ack *)ctlbuf; in t_koptmgmt()
145 opt_data = ctlbuf + opt_ack->OPT_offset; in t_koptmgmt()
151 if (ctlbuf != NULL) in t_koptmgmt()
152 kmem_free(ctlbuf, ctlsize); in t_koptmgmt()

12