Home
last modified time | relevance | path

Searched refs:optlen (Results 1 – 25 of 97) sorted by relevance

1234

/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/
H A Dtrace.c87 int optlen; in print_opt() local
92 optlen = opt->nd_opt_len * 8; in print_opt()
93 if (optlen == 0) { in print_opt()
100 if (optlen != sizeof (*po) || in print_opt()
101 optlen > len) in print_opt()
124 optlen > len) in print_opt()
131 if (optlen < 8 || in print_opt()
132 optlen > len) in print_opt()
143 if (optlen < 8|| in print_opt()
144 optlen > len) in print_opt()
[all …]
H A Dndp.c291 int optlen; in incoming_rs() local
297 optlen = opt->nd_opt_len * 8; in incoming_rs()
307 len -= optlen; in incoming_rs()
437 int optlen; in incoming_ra() local
553 optlen = opt->nd_opt_len * 8; in incoming_ra()
574 len -= optlen; in incoming_ra()
1272 int optlen; in verify_ra_consistency() local
1329 optlen = opt->nd_opt_len * 8; in verify_ra_consistency()
1341 len -= optlen; in verify_ra_consistency()
1494 while (optlen > 0) { in verify_opt_len()
[all …]
/illumos-gate/usr/src/uts/common/ktli/
H A Dt_koptmgmt.c73 t_scalar_t optlen; in t_koptmgmt() local
81 optlen = req->opt.len; in t_koptmgmt()
82 if (optlen > 0) { in t_koptmgmt()
85 if (optlen < (t_scalar_t)sizeof (struct T_opthdr)) { in t_koptmgmt()
90 if (optlen > 4096) { in t_koptmgmt()
95 ctlsize = sizeof (*opt_req) + optlen; in t_koptmgmt()
102 opt_req->OPT_length = optlen; in t_koptmgmt()
104 if (optlen > 0) { in t_koptmgmt()
106 bcopy(req->opt.buf, opt_data, optlen); in t_koptmgmt()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/
H A Dsnoop_tcp.c224 print_tcpoptions(opt, optlen) in print_tcpoptions() argument
226 int optlen;
234 if (optlen <= 0) {
243 while (optlen > 0) {
290 end_opt = opt + optlen;
330 optlen -= len;
347 if (optlen <= 0) { in print_tcpoptions_summary()
352 while (optlen > 0) { in print_tcpoptions_summary()
397 end_opt = opt + optlen; in print_tcpoptions_summary()
429 optlen -= len; in print_tcpoptions_summary()
[all …]
H A Dsnoop_dhcpv6.c71 uint_t optlen; in interpret_dhcpv6() local
128 DHCPV6_OPT_STATUS_CODE, &optlen); in interpret_dhcpv6()
129 optlen -= sizeof (*d6o); in interpret_dhcpv6()
130 if (d6o != NULL && optlen >= sizeof (statuscode)) { in interpret_dhcpv6()
135 optlen -= sizeof (statuscode); in interpret_dhcpv6()
136 if (optlen > 0) { in interpret_dhcpv6()
139 optlen, (char *)(d6o + 1) + 2); in interpret_dhcpv6()
143 DHCPV6_OPT_RELAY_MSG, &optlen); in interpret_dhcpv6()
144 optlen -= sizeof (*d6o); in interpret_dhcpv6()
145 if (d6o != NULL && optlen >= 1) { in interpret_dhcpv6()
H A Dsnoop_ip.c597 if (optlen <= 0) { in print_ipoptions()
604 "Options: (%d bytes)", optlen); in print_ipoptions()
606 while (optlen > 0) { in print_ipoptions()
610 truncstr = len > optlen ? "?" : ""; in print_ipoptions()
668 optlen -= len; in print_ipoptions()
1419 int optlen, taglen, tagnum; in print_cipso() local
1424 optlen = opt[1]; in print_cipso()
1425 if (optlen < TSOL_CIPSO_MIN_LENGTH || optlen > TSOL_CIPSO_MAX_LENGTH) in print_cipso()
1448 optlen -= TSOL_CIPSO_MIN_LENGTH; in print_cipso()
1455 while (optlen >= TSOL_TT1_MIN_LENGTH) { in print_cipso()
[all …]
/illumos-gate/usr/src/lib/libnsl/nsl/
H A Dt_optmgmt.c76 t_scalar_t optlen; in _tx_optmgmt() local
111 optlen = req->opt.len; in _tx_optmgmt()
113 if (_T_IS_XTI(api_semantics) && (optlen > 0)) { in _tx_optmgmt()
120 optlen < (t_scalar_t)sizeof (struct t_opthdr)) { in _tx_optmgmt()
150 optlen); in _tx_optmgmt()
217 optlen = (t_scalar_t)((uchar_t *) in _tx_optmgmt()
232 optreq->OPT_length = optlen; in _tx_optmgmt()
237 if (optlen) { in _tx_optmgmt()
238 if (_t_aligned_copy(&ctlbuf, optlen, size, in _tx_optmgmt()
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dgetsubopt.c48 size_t optlen; in getsubopt() local
62 optlen = strlen(s); in getsubopt()
65 optlen = p - s; in getsubopt()
69 if ((optlen == strlen(tokens[i])) && in getsubopt()
70 (strncmp(s, tokens[i], optlen) == 0)) in getsubopt()
/illumos-gate/usr/src/uts/common/inet/ip/
H A Dtn_ipopt.c135 uint32_t optlen; in tsol_get_option_v4() local
164 optlen = 1; in tsol_get_option_v4()
170 if (optlen < 2) in tsol_get_option_v4()
189 totallen -= optlen; in tsol_get_option_v4()
190 opt += optlen; in tsol_get_option_v4()
215 size_t optlen; in tsol_get_option_v6() local
1097 uint_t optlen; in tsol_find_secopt_v6() local
1111 optlen--; in tsol_find_secopt_v6()
1114 if (optlen == 1) in tsol_find_secopt_v6()
1146 optlen -= optused; in tsol_find_secopt_v6()
[all …]
/illumos-gate/usr/src/lib/libwrap/
H A Dfix_options.c52 int optlen; local
88 for (cp = optbuf + ADDR_LEN; cp < optbuf + optsize; cp += optlen) {
100 optlen = 1;
102 optlen = cp[IPOPT_OLEN];
103 if (optlen <= 0) /* Do not loop! */
/illumos-gate/usr/src/stand/lib/sock/
H A Dsocket.c197 *optlen = 0; in getsockopt()
206 *optlen = 0; in getsockopt()
215 *optlen = 0; in getsockopt()
223 *optlen = 0; in getsockopt()
231 *optlen = 0; in getsockopt()
240 *optlen = 0; in getsockopt()
254 *optlen = 0; in getsockopt()
323 if (optlen == sizeof (int)) { in setsockopt()
333 if (optlen == sizeof (int)) { in setsockopt()
343 if (optlen == sizeof (int)) { in setsockopt()
[all …]
/illumos-gate/usr/src/uts/common/io/ib/clients/rdsv3/
H A Daf_rds.c493 if (optlen < sizeof (int)) in rdsv3_set_bool_option()
534 ret = rdsv3_get_mr(rs, optval, optlen); in rdsv3_setsockopt()
540 ret = rdsv3_free_mr(rs, optval, optlen); in rdsv3_setsockopt()
544 (char *)optval, optlen); in rdsv3_setsockopt()
577 rs, optname, *optlen); in rdsv3_getsockopt()
583 if (*optlen != 0) { in rdsv3_getsockopt()
585 *optlen = sizeof (uint_t); in rdsv3_getsockopt()
591 if (*optlen != 0) { in rdsv3_getsockopt()
593 *optlen = sizeof (uint_t); in rdsv3_getsockopt()
599 if (*optlen < sizeof (int)) in rdsv3_getsockopt()
[all …]
H A Drdma.c270 rdsv3_get_mr(struct rdsv3_sock *rs, const void *optval, int optlen) in rdsv3_get_mr() argument
274 if (optlen != sizeof (struct rds_get_mr_args)) in rdsv3_get_mr()
281 if (ddi_copyin(optval, &args, optlen, 0)) in rdsv3_get_mr()
290 int optlen) in rdsv3_get_mr_for_dest() argument
295 if (optlen != sizeof (struct rds_get_mr_for_dest_args)) in rdsv3_get_mr_for_dest()
302 if (ddi_copyin(optval, &args, optlen, 0)) in rdsv3_get_mr_for_dest()
322 rdsv3_free_mr(struct rdsv3_sock *rs, const void *optval, int optlen) in rdsv3_free_mr() argument
327 if (optlen != sizeof (struct rds_free_mr_args)) in rdsv3_free_mr()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/traceroute/
H A Dtraceroute_aux.c89 int optlen = 0; in set_buffers() local
99 optlen = 8 + gw_count * sizeof (struct in_addr); in set_buffers()
118 outip->ip_len = htons(plen - optlen); in set_buffers()
137 htons((ushort_t)(plen - (sizeof (struct ip) + optlen))); in set_buffers()
204 int optlen = 0; in send_probe() local
218 optlen = 8 + gw_count * sizeof (struct in_addr); in send_probe()
222 send_size = packlen - optlen; in send_probe()
224 send_size = packlen - optlen - sizeof (struct ip); in send_probe()
226 send_size = packlen - optlen - sizeof (struct ip) - in send_probe()
254 in_cksum((ushort_t *)outip, sizeof (*outip) + optlen); in send_probe()
[all …]
/illumos-gate/usr/src/lib/libproc/common/
H A Dpr_getsockname.c118 int sock, int level, int optname, void *optval, int *optlen) in pr_getsockopt() argument
126 return (_so_getsockopt(sock, level, optname, optval, optlen)); in pr_getsockopt()
154 adp->arg_size = optlen == NULL ? 0 : *optlen; in pr_getsockopt()
158 adp->arg_object = optlen; in pr_getsockopt()
161 adp->arg_size = sizeof (*optlen); in pr_getsockopt()
/illumos-gate/usr/src/uts/common/inet/sockmods/
H A Dsocksctp.c740 int optlen, flags, fflag; in sosctp_sendmsg() local
804 optlen = 0; in sosctp_sendmsg()
971 optlen = 0; in sosctp_seq_sendmsg()
1237 socklen_t optlen; in sosctp_getsockopt() local
1270 optlen = maxlen; in sosctp_getsockopt()
1283 len = optlen; in sosctp_getsockopt()
1289 *optlenp = optlen; in sosctp_getsockopt()
1399 optval, optlen); in sosctp_setsockopt()
1452 uint32_t optlen; in sosctp_ioctl() local
1585 buflen = optlen; in sosctp_ioctl()
[all …]
/illumos-gate/usr/src/lib/libsocket/socket/
H A Dweaks.c170 _getsockopt(int sock, int level, int optname, char *optval, int *optlen) in _getsockopt() argument
174 socklen_t len = *optlen; in _getsockopt()
204 *optlen = sopt.sopt_len; in _getsockopt()
208 return (_so_getsockopt(sock, level, optname, optval, optlen, in _getsockopt()
214 _setsockopt(int sock, int level, int optname, char *optval, socklen_t optlen) in _setsockopt() argument
216 return (_so_setsockopt(sock, level, optname, optval, optlen, in _setsockopt()
/illumos-gate/usr/src/uts/common/inet/
H A Doptcom.c1237 int optlen; in do_opt_current() local
1250 if (optlen >= 0) { in do_opt_current()
1251 topth->len = (t_uscalar_t)(optlen + in do_opt_current()
1256 *resptrp += _TPI_ALIGN_TOPT(optlen); in do_opt_current()
1280 if (optlen >= 0) { in do_opt_current()
1282 topth->len = (t_uscalar_t)(optlen + in do_opt_current()
1331 t_uscalar_t optlen; in do_opt_check_or_negotiate() local
1351 topth->len = (t_uscalar_t)(optlen + in do_opt_check_or_negotiate()
1451 topth->len += optlen; in do_opt_check_or_negotiate()
1889 if (optlen <= optd->opdes_size) in opt_length_ok()
[all …]
/illumos-gate/usr/src/uts/common/sys/ib/clients/rdsv3/
H A Drdma.h87 int rdsv3_get_mr(struct rdsv3_sock *rs, const void *optval, int optlen);
89 int optlen);
90 int rdsv3_free_mr(struct rdsv3_sock *rs, const void *optval, int optlen);
/illumos-gate/usr/src/uts/common/os/
H A Dsubr.c229 size_t optlen; in getsubopt() local
243 optlen = strlen(s); in getsubopt()
246 optlen = p - s; in getsubopt()
250 if ((optlen == strlen(tokens[i])) && in getsubopt()
251 (strncmp(s, tokens[i], optlen) == 0)) in getsubopt()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/
H A Dndp.c843 ndp_set_nce(char *host, char *lladdr, char *opts[], int optlen) in ndp_set_nce() argument
877 for (i = 0; i < optlen; i++) { in ndp_set_nce()
922 int optlen = 0, lineno = 0; in ndp_set_file() local
955 for (optlen = 0; optlen < MAX_OPTS; optlen++) { in ndp_set_file()
959 opts[optlen] = curr; in ndp_set_file()
962 if (ndp_set_nce(host, lladdr, opts, optlen) != 0) { in ndp_set_file()
988 int c, argsleft, optlen = 0, err = 0; in main() local
1028 optlen++; in main()
1103 err = ndp_set_nce(flagarg, lladdr, opts, optlen); in main()
/illumos-gate/usr/src/uts/common/inet/sctp/
H A Dsctp_opt_data.c187 *optlen = sizeof (struct sctp_paddrinfo); in sctp_get_paddrinfo()
797 int buflen = *optlen; in sctp_get_opt()
806 *optlen = sizeof (int32_t); in sctp_get_opt()
833 *optlen = sctp_get_rtoinfo(sctp, ptr); in sctp_get_opt()
839 *optlen = sctp_get_initmsg(sctp, ptr); in sctp_get_opt()
881 *optlen = sctp_get_status(sctp, ptr); in sctp_get_opt()
900 *optlen = addr_cnt * addr_size; in sctp_get_opt()
924 *optlen = addr_cnt * addr_size; in sctp_get_opt()
979 *optlen = sizeof (sctp_assoc_stats_t); in sctp_get_opt()
1020 *optlen = opt_len; in sctp_get_opt()
[all …]
/illumos-gate/usr/src/uts/common/fs/sockfs/
H A Dsockcommon_sops.c776 (void *)optval, &optlen, cr)) >= 0) in so_setsockopt()
808 optlen = sizeof (tl); in so_setsockopt()
1746 t_uscalar_t optlen; in so_recvmsg() local
1762 optlen = tpr->unitdata_ind.OPT_length; in so_recvmsg()
1763 if (optlen != 0) { in so_recvmsg()
1771 optlen, __TPI_ALIGN_SIZE); in so_recvmsg()
1814 error = so_opt2cmsg(mctlp, opt, optlen, in so_recvmsg()
1835 t_uscalar_t optlen; in so_recvmsg() local
1838 optlen = tdr->OPT_length; in so_recvmsg()
1839 if (optlen != 0) { in so_recvmsg()
[all …]
H A Dsocksubr.c1060 t_uscalar_t optlen = 0; in so_optlen() local
1079 optlen += (t_uscalar_t)(_TPI_ALIGN_TOPT(len) + in so_optlen()
1083 controllen, oldflg, optlen)); in so_optlen()
1084 return (optlen); in so_optlen()
1149 tohp = _TPI_TOPT_NEXTHDR(opt, optlen, tohp)) { in so_cmsglen()
1198 optlen, oldflg, cmsglen)); in so_cmsglen()
1229 tohp = _TPI_TOPT_NEXTHDR(opt, optlen, tohp)) { in so_opt2cmsg()
1349 so_getopt_srcaddr(void *opt, t_uscalar_t optlen, void **srcp, in so_getopt_srcaddr() argument
1362 tohp = _TPI_TOPT_NEXTHDR(opt, optlen, tohp)) { in so_getopt_srcaddr()
1377 so_getopt_unix_close(void *opt, t_uscalar_t optlen) in so_getopt_unix_close() argument
[all …]
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/
H A Dtlx.c258 socklen_t optlen) in tlx_setsockopt() argument
266 if (optlen > sizeof (optbuf.data)) { in tlx_setsockopt()
273 optbuf.sockopt.len = optlen; in tlx_setsockopt()
274 (void) memcpy(optbuf.data, optval, optlen); in tlx_setsockopt()
276 request.opt.len = sizeof (struct opthdr) + optlen; in tlx_setsockopt()
280 reply.opt.maxlen = sizeof (struct opthdr) + optlen; in tlx_setsockopt()

1234