| /netbsd-src/lib/libc/net/ |
| H A D | ip6opt.c | 129 size_t padlen, optlen, off; in inet6_option_append() local 169 optlen = 1; in inet6_option_append() 171 optlen = typep[1] + 2; in inet6_option_append() 172 memcpy(bp, typep, (size_t)optlen); in inet6_option_append() 173 bp += optlen; in inet6_option_append() 174 _DIAGASSERT(__type_fit(socklen_t, optlen + cmsg->cmsg_len)); in inet6_option_append() 175 cmsg->cmsg_len += (socklen_t)optlen; in inet6_option_append() 281 int hdrlen, optlen; in inet6_option_next() local 309 if ((optlen = ip6optlen(*tptrp, lim)) == 0) in inet6_option_next() 312 *tptrp = *tptrp + optlen; in inet6_option_next() [all …]
|
| /netbsd-src/sys/netinet6/ |
| H A D | dest6.c | 59 int off = *offp, erroff, dstoptlen, optlen; in dest6_input() local 77 for (optlen = 0; dstoptlen > 0; dstoptlen -= optlen, opt += optlen) { in dest6_input() 86 optlen = 1; in dest6_input() 89 optlen = *(opt + 1) + 2; in dest6_input() 93 optlen = ip6_unknown_opt(opt, m, erroff); in dest6_input() 94 if (optlen == -1) in dest6_input() 96 optlen += 2; in dest6_input()
|
| H A D | nd6_nbr.c | 547 int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; in nd6_ns_output() local 550 optlen = (optlen + 7) & ~7; in nd6_ns_output() 552 m->m_pkthdr.len += optlen; in nd6_ns_output() 553 m->m_len += optlen; in nd6_ns_output() 554 icmp6len += optlen; in nd6_ns_output() 555 memset((void *)nd_opt, 0, optlen); in nd6_ns_output() 557 nd_opt->nd_opt_len = optlen >> 3; in nd6_ns_output() 564 int optlen = sizeof(struct nd_opt_hdr) + ND_OPT_NONCE_LEN; in nd6_ns_output() local 568 optlen in nd6_ns_output() 1017 int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; nd6_na_output() local [all...] |
| /netbsd-src/external/bsd/nsd/dist/ |
| H A D | edns.c | 82 edns_handle_option(uint16_t optcode, uint16_t optlen, buffer_type* packet, in edns_handle_option() argument 93 buffer_skip(packet, optlen); in edns_handle_option() 98 buffer_skip(packet, optlen); in edns_handle_option() 104 if (optlen == 8) in edns_handle_option() 106 else if (optlen < 16 || optlen > 40) in edns_handle_option() 111 edns->cookie_len = optlen; in edns_handle_option() 112 memcpy(edns->cookie, buffer_current(packet), optlen); in edns_handle_option() 113 buffer_skip(packet, optlen); in edns_handle_option() 116 buffer_skip(packet, optlen); in edns_handle_option() 120 buffer_skip(packet, optlen); in edns_handle_option() [all …]
|
| /netbsd-src/sys/netinet/ |
| H A D | tcp_output.c | 235 int optlen; in tcp_segsize() local 307 optlen = tcp_optlen(tp); in tcp_segsize() 318 optlen += ipsec4_hdrsiz_tcp(tp); in tcp_segsize() 320 optlen += ip_optlen(inp); in tcp_segsize() 328 optlen += ipsec4_hdrsiz_tcp(tp); in tcp_segsize() 335 optlen += ipsec6_hdrsiz_tcp(tp); in tcp_segsize() 337 optlen += ip6_optlen(inp); in tcp_segsize() 340 size -= optlen; in tcp_segsize() 358 *txsegsizep = uimin(tp->t_peermss - optlen, size); in tcp_segsize() 359 *rxsegsizep = uimin(tp->t_ourmss - optlen, siz in tcp_segsize() 520 unsigned optlen, hdrlen, packetlen; tcp_output() local [all...] |
| H A D | dccp_usrreq.c | 200 int len, data_off, extrah_len, optlen; in dccp_input() local 583 optlen = data_off - (sizeof(struct dccplhdr) + extrah_len); in dccp_input() 585 optlen = data_off - (sizeof(struct dccphdr) + extrah_len); in dccp_input() 587 if (optlen < 0) { in dccp_input() 588 …optlen = %i data_off = %i, m_len = %i, iphlen = %i extrah_len = %i !\n", optlen, data_off, m->m_le… in dccp_input() 593 if (optlen > 0) { in dccp_input() 594 if (optlen > DCCP_MAX_OPTIONS) { in dccp_input() 595 DCCP_DEBUG((LOG_INFO, "Error, more options (%i) then DCCP_MAX_OPTIONS options!\n", optlen)); in dccp_input() 600 DCCP_DEBUG((LOG_INFO, "Parsing DCCP options, optlen = %i\n", optlen)); in dccp_input() 601 memcpy(options, optp, optlen); in dccp_input() [all …]
|
| H A D | ip_output.c | 1001 unsigned optlen; in ip_insertoptions() local 1003 optlen = opt->m_len - sizeof(p->ipopt_dst); in ip_insertoptions() 1004 KASSERT(optlen % 4 == 0); in ip_insertoptions() 1005 if (optlen + ntohs(ip->ip_len) > IP_MAXPACKET) in ip_insertoptions() 1009 if (M_READONLY(m) || M_LEADINGSPACE(m) < optlen) { in ip_insertoptions() 1018 n->m_len = optlen + sizeof(struct ip); in ip_insertoptions() 1023 m->m_data -= optlen; in ip_insertoptions() 1024 m->m_len += optlen; in ip_insertoptions() 1027 m->m_pkthdr.len += optlen; in ip_insertoptions() 1029 memcpy(ip + 1, p->ipopt_list, optlen); in ip_insertoptions() [all …]
|
| H A D | tcp_syncache.c | 879 int optlen, struct tcp_opt_info *oi) in syn_cache_add() argument 908 if (tcp_dooptions(&tb, optp, optlen, th, m, toff, oi) < 0) in syn_cache_add() 1082 int optlen, error; in syn_cache_respond() local 1173 optlen = 0; in syn_cache_respond() 1178 optlen += TCPOLEN_MAXSEG; in syn_cache_respond() 1185 optlen += TCPOLEN_WINDOW + TCPOLEN_NOP; in syn_cache_respond() 1192 optlen += TCPOLEN_SACK_PERMITTED; in syn_cache_respond() 1196 while (optlen % 4 != 2) { in syn_cache_respond() 1197 optlen += TCPOLEN_NOP; in syn_cache_respond() 1207 optlen += TCPOLEN_TIMESTAMP; in syn_cache_respond() [all …]
|
| /netbsd-src/external/bsd/openldap/dist/servers/slapd/ |
| H A D | ad.c | 84 static Attr_option *ad_find_option_definition( const char *opt, int optlen ); 228 int optlen; in slap_bv2ad() local 230 next = strchrlen( opt, optn, ';', &optlen ); in slap_bv2ad() 232 if( optlen == 0 ) { in slap_bv2ad() 236 } else if ( optlen == STRLENOF("binary") && in slap_bv2ad() 254 } else if (( aopt = ad_find_option_definition( opt, optlen )) ) { in slap_bv2ad() 257 if( opt[optlen-1] == '-' || in slap_bv2ad() 275 (unsigned) optlen < tags[i].bv_len in slap_bv2ad() 276 ? (unsigned) optlen : tags[i].bv_len ); in slap_bv2ad() 278 if( rc == 0 && (unsigned)optlen == tags[i].bv_len ) { in slap_bv2ad() [all …]
|
| /netbsd-src/lib/libwrap/ |
| H A D | fix_options.c | 54 int optlen; in fix_options() local 104 for (cp = optbuf + ADDR_LEN; cp < optbuf + optsize; cp += optlen) { in fix_options() 116 optlen = 1; in fix_options() 118 optlen = cp[IPOPT_OLEN]; in fix_options() 119 if (optlen < 2 || cp + optlen >= optbuf + optsize) { in fix_options()
|
| /netbsd-src/sys/net/npf/ |
| H A D | npf_inet.c | 281 int cnt, optlen = 0; in npf_fetch_tcpopts() local 306 for (; cnt > 0; cnt -= optlen, cp += optlen) { in npf_fetch_tcpopts() 311 optlen = 1; in npf_fetch_tcpopts() 315 optlen = cp[1]; in npf_fetch_tcpopts() 316 if (optlen < 2 || optlen > cnt) in npf_fetch_tcpopts() 322 if (optlen != TCPOLEN_MAXSEG) in npf_fetch_tcpopts() 329 if (optlen != TCPOLEN_WINDOW) in npf_fetch_tcpopts() 356 int cnt, optlen = 0; in npf_set_mss() local 380 for (cp = base; cnt > 0; cnt -= optlen, cp += optlen) { in npf_set_mss() 385 optlen = 1; in npf_set_mss() [all …]
|
| /netbsd-src/sys/kern/ |
| H A D | uipc_mbufdebug.c | 843 uint8_t *bufp, *op, opt, optlen; in m_examine_tcp() 871 optlen = op[1]; in m_examine_tcp() 872 if (optlen == 0) in m_examine_tcp() 875 if (opt == TCPOPT_MAXSEG && optlen == TCPOLEN_MAXSEG) { in m_examine_tcp() 882 op += optlen; in m_examine_tcp() 883 len -= optlen; in m_examine_tcp() 886 && optlen == TCPOLEN_WINDOW) { in m_examine_tcp() 888 op += optlen; in m_examine_tcp() 889 len -= optlen; in m_examine_tcp() 892 && optlen in m_examine_tcp() 841 uint8_t *bufp, *op, opt, optlen; m_examine_tcp() local [all...] |
| /netbsd-src/crypto/external/bsd/heimdal/dist/lib/roken/ |
| H A D | socket_wrapper.h | 48 int swrap_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen); 49 int swrap_setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen); 94 #define getsockopt(s,level,optname,optval,optlen) swrap_getsockopt(s,level,optname,optval,optlen) argument 99 #define setsockopt(s,level,optname,optval,optlen) swrap_setsockopt(s,level,optname,optval,optlen) argument
|
| /netbsd-src/sys/dist/pf/net/ |
| H A D | pf_osfp.c | 125 int cnt, optlen = 0; in pf_osfp_fingerprint_hdr() local 195 for (; cnt > 0; cnt -= optlen, optp += optlen) { in pf_osfp_fingerprint_hdr() 203 optlen = 1; in pf_osfp_fingerprint_hdr() 207 optlen = optp[1]; in pf_osfp_fingerprint_hdr() 208 if (optlen > cnt || optlen < 2) in pf_osfp_fingerprint_hdr() 212 if (optlen >= TCPOLEN_MAXSEG) in pf_osfp_fingerprint_hdr() 220 if (optlen >= TCPOLEN_WINDOW) in pf_osfp_fingerprint_hdr() 233 if (optlen >= TCPOLEN_TIMESTAMP) { in pf_osfp_fingerprint_hdr() 247 optlen = MAX(optlen, 1); /* paranoia */ in pf_osfp_fingerprint_hdr()
|
| /netbsd-src/external/mpl/dhcp/bind/dist/lib/dns/ |
| H A D | message.c | 3649 uint16_t optcode, optlen; in dns_message_pseudosectiontoyaml() local 3723 optlen = isc_buffer_getuint16(&optbuf); in dns_message_pseudosectiontoyaml() 3724 INSIST(isc_buffer_remaininglength(&optbuf) >= optlen); in dns_message_pseudosectiontoyaml() 3729 if (optlen == 18U) { in dns_message_pseudosectiontoyaml() 3749 optlen); in dns_message_pseudosectiontoyaml() 3750 isc_buffer_add(&ecsbuf, optlen); in dns_message_pseudosectiontoyaml() 3756 isc_buffer_forward(&optbuf, optlen); in dns_message_pseudosectiontoyaml() 3764 if (optlen == 4) { in dns_message_pseudosectiontoyaml() 3779 if (optlen == 2) { in dns_message_pseudosectiontoyaml() 3798 if (optlen > 0U && (optlen % 2U) == 0U) { in dns_message_pseudosectiontoyaml() [all …]
|
| /netbsd-src/usr.bin/radioctl/ |
| H A D | radioctl.c | 365 int slen, optlen; in parse_opt() local 376 optlen = strcspn(s, "="); in parse_opt() 379 if (slen == optlen) { in parse_opt() 384 if (optlen > slen - 2) { in parse_opt() 389 slen -= ++optlen; in parse_opt() 391 if ((topt = (char *)malloc(optlen)) == NULL) { in parse_opt() 395 strlcpy(topt, s, optlen); in parse_opt() 403 topt = &s[optlen]; in parse_opt()
|
| /netbsd-src/external/mpl/bind/dist/lib/dns/ |
| H A D | message.c | 3624 uint16_t optcode, optlen; in render_llq() 3698 optlen = isc_buffer_getuint16(&optbuf); in dns_message_pseudosectiontoyaml() 3699 INSIST(isc_buffer_remaininglength(&optbuf) >= optlen); in dns_message_pseudosectiontoyaml() 3704 if (optlen == 18U) { in dns_message_pseudosectiontoyaml() 3715 if (optlen == 4U || optlen == 8U) { in dns_message_pseudosectiontoyaml() 3720 if (optlen == 8U) { in dns_message_pseudosectiontoyaml() 3733 if (optlen == 8U) { in dns_message_pseudosectiontoyaml() 3757 optlen); in dns_message_pseudosectiontoyaml() 3758 isc_buffer_add(&ecsbuf, optlen); in dns_message_pseudosectiontoyaml() 3666 uint16_t optcode, optlen; dns_message_pseudosectiontoyaml() local 4033 uint16_t optcode, optlen; dns_message_pseudosectiontotext() local [all...] |
| /netbsd-src/lib/libperfuse/ |
| H A D | perfuse.c | 179 uint32_t optlen; in perfuse_open() local 207 optlen = sizeof(opt); in perfuse_open() 208 if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &opt, optlen) != 0) in perfuse_open() 211 if (setsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &opt, optlen) != 0) in perfuse_open() 239 optlen = sizeof(opt); in perfuse_open() 240 if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &opt, optlen) != 0) in perfuse_open() 243 if (setsockopt(sv[0], SOL_SOCKET, SO_RCVBUF, &opt, optlen) != 0) in perfuse_open() 246 if (setsockopt(sv[1], SOL_SOCKET, SO_SNDBUF, &opt, optlen) != 0) in perfuse_open() 249 if (setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &opt, optlen) != 0) in perfuse_open() 257 optlen = sizeof(opt); in perfuse_open() [all …]
|
| /netbsd-src/external/cddl/osnet/lib/libzfs/ |
| H A D | zmount.c | 47 char *dataptr, int datalen, char *optptr, int optlen) in zmount() argument 59 za.optlen = optlen; in zmount()
|
| /netbsd-src/external/gpl2/dtc/dist/ |
| H A D | util.c | 425 int optlen; in util_usage() local 433 optlen = 0; in util_usage() 439 if (optlen < l) in util_usage() 440 optlen = l; in util_usage() 455 fprintf(fp, "--%-*s", optlen, long_opts[i].name); in util_usage() 458 (int)(optlen - strlen(long_opts[i].name) - a_arg_len), ""); in util_usage()
|
| /netbsd-src/external/bsd/unbound/dist/testdata/ |
| H A D | subnet_scopezero.crpl | 147 00 08 00 07 ; OPC, optlen 185 00 08 00 07 ; OPC, optlen 223 00 08 00 04 ; OPC, optlen 261 00 08 00 07 ; OPC, optlen 299 00 08 00 07 ; OPC, optlen 337 00 08 00 04 ; OPC, optlen 374 00 08 00 07 ; OPC, optlen 413 00 08 00 07 ; OPC, optlen
|
| H A D | subnet_prezero.crpl | 41 00 08 00 04 ; OPCODE=subnet, optlen 70 00 08 00 04 ; OPCODE=subnet, optlen 105 00 08 00 04 ; OPCODE=subnet, optlen 133 00 08 00 04 ; OPCODE=subnet, optlen 150 00 08 00 04 ; OPCODE=subnet, optlen
|
| /netbsd-src/external/mpl/bind/dist/lib/ns/ |
| H A D | client.c | 1326 process_cookie(ns_client_t *client, isc_buffer_t *buf, size_t optlen) { in process_cookie() 1340 isc_buffer_forward(buf, (unsigned int)optlen); in process_cookie() 1349 if (optlen != COOKIE_SIZE) { in process_cookie() 1353 INSIST(optlen >= 8U); 1355 isc_buffer_forward(buf, (unsigned int)optlen); in process_ecs() 1357 if (optlen == 8U) { in process_ecs() 1421 process_ecs(ns_client_t *client, isc_buffer_t *buf, size_t optlen) { in process_ecs() 1430 isc_buffer_forward(buf, (unsigned int)optlen); in process_ecs() 1440 if (optlen < 4U) { in process_ecs() 1450 optlen in process_ecs() 1262 process_cookie(ns_client_t * client,isc_buffer_t * buf,size_t optlen) process_cookie() argument 1354 process_ecs(ns_client_t * client,isc_buffer_t * buf,size_t optlen) process_ecs() argument 1473 process_keytag(ns_client_t * client,isc_buffer_t * buf,size_t optlen) process_keytag() argument 1500 uint16_t optlen; process_opt() local [all...] |
| /netbsd-src/sys/netipsec/ |
| H A D | xform_ah.c | 290 int off, optlen; in ah_massage_headers() local 335 optlen = 1; in ah_massage_headers() 337 optlen = ptr[off + 1]; in ah_massage_headers() 338 if (optlen < 2 || off + optlen > skip) { in ah_massage_headers() 369 ptr + off + optlen - in ah_massage_headers() 376 memset(ptr + off, 0, optlen); in ah_massage_headers() 380 off += optlen; in ah_massage_headers() 475 optlen = ptr[count + 1] + 2; in ah_massage_headers() 477 if (count + optlen > noff) { in ah_massage_headers() 482 memset(ptr + count, 0, optlen); in ah_massage_headers() [all …]
|
| /netbsd-src/external/gpl3/gdb/dist/gnulib/import/ |
| H A D | setsockopt.c | 35 rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) in rpl_setsockopt() argument 57 r = setsockopt (sock, level, optname, optval, optlen); in rpl_setsockopt()
|