| /xnu-8019.80.24/bsd/netinet/ |
| H A D | ip_output.c | 574 ip->ip_p, ip->ip_off, ip->ip_len); in ip_output_list() 978 HTONS(ip->ip_len); in ip_output_list() 1010 NTOHS(ip->ip_len); in ip_output_list() 1061 if ((u_short)ip->ip_len > ifp->if_mtu) { in ip_output_list() 1144 HTONS(ip->ip_len); in ip_output_list() 1171 NTOHS(ip->ip_len); in ip_output_list() 1348 HTONS(ip->ip_len); in ip_output_list() 1465 NTOHS(ip->ip_len); in ip_output_list() 1495 HTONS(ip->ip_len); in ip_output_list() 1517 NTOHS(ip->ip_len); in ip_output_list() [all …]
|
| H A D | ip_input.c | 650 ip->ip_len = htons(ip->ip_len + (uint16_t)hlen); in ip_proto_dispatch_in() 678 ip->ip_len = ntohs(ip->ip_len) - (u_short)hlen; in ip_proto_dispatch_in() 834 ip->ip_len -= hlen; in ip_input_dispatch_chain() 855 ASSERT(m_pktlen(m) > ip->ip_len); in ip_input_adjust() 884 (ip->ip_len - m->m_pkthdr.csum_rx_start), in ip_input_adjust() 912 m->m_len = ip->ip_len; in ip_input_adjust() 913 m->m_pkthdr.len = ip->ip_len; in ip_input_adjust() 915 m_adj(m, ip->ip_len - m->m_pkthdr.len); in ip_input_adjust() 1016 ip->ip_len = ntohs(ip->ip_len) - (u_short)hlen; in ip_input_first_pass() 1044 ip->ip_p, ip->ip_off, ip->ip_len); in ip_input_first_pass() [all …]
|
| H A D | ip_icmp.c | 310 if (oip->ip_len < (oiphlen + tcphlen)) { in icmp_error() 329 (oip->ip_len - oiphlen))); in icmp_error() 332 (oip->ip_len - oiphlen))); in icmp_error() 398 HTONS(nip->ip_len); in icmp_error() 411 nip->ip_len = (uint16_t)m->m_len; in icmp_error() 440 icmplen = ip->ip_len; in icmp_input() 582 NTOHS(icp->icmp_ip.ip_len); in icmp_input() 732 ip->ip_len += hlen; /* since ip_input deducts this */ in icmp_input() 964 ip->ip_len -= optlen; in icmp_reflect() 1011 icp->icmp_cksum = in_cksum(m, ip->ip_len - hlen); in icmp_send() [all …]
|
| H A D | ip.h | 104 u_short ip_len; /* total length */ member
|
| H A D | udp_usrreq.c | 354 if (ip->ip_len != len) { in udp_input() 355 if (len > ip->ip_len || len < sizeof(struct udphdr)) { in udp_input() 360 m_adj(m, len - ip->ip_len); in udp_input() 692 ip->ip_len += iphlen; in udp_input() 780 ip6->ip6_plen = ip->ip_len; in ip_2_ip6_hdr() 1844 ((struct ip *)ui)->ip_len = (uint16_t)(sizeof(struct udpiphdr) + len); in udp_output() 2748 ip->ip_len += sizeof(*ip); in udp_input_checksum() 2750 HTONS(ip->ip_len); in udp_input_checksum() 2765 NTOHS(ip->ip_len); in udp_input_checksum() 2767 ip->ip_len -= sizeof(*ip); in udp_input_checksum() [all …]
|
| H A D | tcp_debug.c | 198 len = isipv6 ? ((struct ip6_hdr *)ipgen)->ip6_plen : ((struct ip *)ipgen)->ip_len;
|
| H A D | ip_compat.h | 106 #define IPMINLEN(i, h) ((i)->ip_len >= ((i)->ip_hl * 4 + sizeof(struct h))) 570 __u16 ip_len;
|
| H A D | raw_ip.c | 507 ip->ip_len = (uint16_t)m->m_pkthdr.len; in rip_output() 521 || (ip->ip_len > m->m_pkthdr.len) in rip_output() 522 || (ip->ip_len < (IP_VHL_HL(ip->ip_vhl) << 2))) { in rip_output()
|
| H A D | in_gif.c | 181 iphdr.ip_len = m->m_pkthdr.len + sizeof(struct ip); in in_gif_output()
|
| /xnu-8019.80.24/bsd/net/ |
| H A D | pf_norm.c | 511 u_int16_t ip_len = ntohs(ip->ip_len) - ip->ip_hl * 4; in pf_reassemble() local 512 u_int16_t fr_max = ip_len + off; in pf_reassemble() 534 int32_t trailer = (m_pktlen(m) - ntohs(ip->ip_len)); in pf_reassemble() 543 HTONS(ip->ip_len); in pf_reassemble() 549 (ip->ip_len - hlen), csum); in pf_reassemble() 558 NTOHS(ip->ip_len); in pf_reassemble() 640 FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl * in pf_reassemble() 644 precut = FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - in pf_reassemble() 646 if (precut >= ip_len) { in pf_reassemble() 654 ip_len -= precut; in pf_reassemble() [all …]
|
| H A D | nat464_utils.c | 318 ptr = PTR_IP(ip_len); in nat464_translate_icmp() 428 } else if (ptr == PTR_IP(ip_len) || in nat464_translate_icmp() 429 ptr == PTR_IP(ip_len) + 1) { in nat464_translate_icmp() 514 ip4->ip_len = htons((uint16_t)(sizeof(*ip4) + tot_len2 - olen)); in nat464_translate_icmp_ip() 531 __func__, ntohs(ip4->ip_len), ip4->ip_p, ntohs(ip4->ip_sum), in nat464_translate_icmp_ip() 671 ip4->ip_len = htons((uint16_t)(sizeof(*ip4) + (tot_len - off))); in nat464_translate_64() 707 ntohs(ip4->ip_len), ip4->ip_p, ntohs(ip4->ip_sum), in nat464_translate_64() 803 plen = ntohs(iph->ip_len) - hlen; in nat464_translate_proto() 804 tot_len = ntohs(iph->ip_len); in nat464_translate_proto() 956 tot_len2 = ntohs(iph2->ip_len); in nat464_translate_proto() [all …]
|
| H A D | sixxlowpan.c | 678 uint16_t ip_len, long *hdroffset, size_t *hdrlen, u_int8_t *hdrbuf) in uncompress_hdr_hc1() argument 754 if (ip_len == 0) { in uncompress_hdr_hc1() 761 SET16(&ip6->ip6_plen, ip_len - UIP_IPH_LEN); in uncompress_hdr_hc1()
|
| H A D | packet_mangler.c | 889 ip_pld_len = ntohs(ip.ip_len) - (ip.ip_hl << 2); in pktmnglr_ipfilter_input() 1109 ntohs(ip->ip_len) - (ip->ip_hl << 2), &tsum); in chksm_update()
|
| /xnu-8019.80.24/bsd/netinet6/ |
| H A D | ah_input.c | 287 if ((ip->ip_len + hlen) > UINT16_MAX) { in ah4_input() 290 ip->ip_len, hlen)); in ah4_input() 295 ip->ip_len = htons((u_int16_t)(ip->ip_len + hlen)); in ah4_input() 306 ip->ip_len = ntohs(ip->ip_len) - hlen; in ah4_input() 508 ip->ip_len = (u_short)(ip->ip_len - stripsiz); in ah4_input() 510 ip->ip_len = htons(ntohs(ip->ip_len) - stripsiz); in ah4_input() 535 ip->ip_len = htons(ip->ip_len + hlen); in ah4_input()
|
| H A D | esp_output.c | 548 if (esphlen < (IP_MAXPACKET - ntohs(ip->ip_len))) { in esp_output() 549 ip->ip_len = htons(ntohs(ip->ip_len) + (u_short)esphlen); in esp_output() 738 if (extendsiz < (IP_MAXPACKET - ntohs(ip->ip_len))) { in esp_output() 739 ip->ip_len = htons(ntohs(ip->ip_len) + (u_short)extendsiz); in esp_output() 870 if (siz < (IP_MAXPACKET - ntohs(ip->ip_len))) { in esp_output() 871 ip->ip_len = htons(ntohs(ip->ip_len) + (u_short)siz); in esp_output() 894 udp->uh_ulen = htons((u_int16_t)(ntohs(ip->ip_len) - (IP_VHL_HL(ip->ip_vhl) << 2))); in esp_output()
|
| H A D | esp_input.c | 147 ip->ip_len = ip->ip_len - stripsiz; in esp4_input_strip_udp_encap() 408 ip->ip_len = ip->ip_len - (u_short)siz; in esp4_input_extended() 410 ip->ip_len = htons(ntohs(ip->ip_len) - siz); in esp4_input_extended() 518 ip->ip_len = ip->ip_len - (u_short)taillen; in esp4_input_extended() 520 ip->ip_len = htons(ntohs(ip->ip_len) - taillen); in esp4_input_extended() 745 ip->ip_len = ip->ip_len - (u_short)stripsiz; in esp4_input_extended() 747 ip->ip_len = htons(ntohs(ip->ip_len) - stripsiz); in esp4_input_extended() 833 ip->ip_len = htons(ip->ip_len + hlen); in esp4_input_extended()
|
| H A D | ah_output.c | 323 if (ahlen < (IP_MAXPACKET - ntohs(ip->ip_len))) { in ah4_output() 324 ip->ip_len = htons(ntohs(ip->ip_len) + (u_int16_t)ahlen); in ah4_output()
|
| H A D | frag6.c | 403 uint32_t ip_len = (sizeof(*ip6) + ntohs(ip6->ip6_plen)); in frag6_input() local 404 int32_t trailer = (m_pktlen(m) - ip_len); in frag6_input() 424 (ip_len - offset), csum); in frag6_input()
|
| /xnu-8019.80.24/bsd/dev/dtrace/scripts/ |
| H A D | ip.d | 81 (ntohs(ip->ip_len) - (((*(uint8_t *) ip) & 0x0f) << 2)) : 0; 103 ntohs(((struct ip *)i)->ip_len) - 162 ipv4_length = (ip != NULL) ? ntohs(ip->ip_len) : 0;
|
| /xnu-8019.80.24/tests/ |
| H A D | icmp_fragmented_payload.c | 251 pcb->inner_ip_hdr->ip_len = pcb->inner_tcp_hdr_len + pcb->inner_ip_hdr_len; in icmp4_pcb_set_payload() 340 .ip_len = sizeof(struct ip) + sizeof(struct tcphdr),
|
| H A D | net_bridge.c | 810 u_int ip_len; in ip_frame_validate() local 815 ip_len = ntohs(ip_udp->ip.ip_len); in ip_frame_validate() 822 buf_src, buf_dst, ip_len, in ip_frame_validate() 826 T_ASSERT_GE(buf_len, ip_len, NULL); in ip_frame_validate() 1038 ip_udp->ip.ip_len = htons(sizeof(*ip_udp) + data_len); in ethernet_udp4_frame_populate() 1217 u_int ip_len; in ethernet_frame_get_udp4_payload() local 1232 ip_len = ntohs(ip_udp->ip.ip_len); in ethernet_frame_get_udp4_payload() 1234 T_ASSERT_GE(left, ip_len, NULL); in ethernet_frame_get_udp4_payload()
|
| /xnu-8019.80.24/bsd/skywalk/nexus/flowswitch/flow/ |
| H A D | flow_agg.c | 103 .ip_len = 0, 1018 sl3tlen = ntohs(siph->ip_len); in can_agg_slowpath() 1236 old_l3len = ntohs(siph->ip_len); in flow_agg_merge_hdr() 1237 uint16_t l3tlen = ntohs(siph->ip_len) + pkt->pkt_flow_ulen; in flow_agg_merge_hdr() 1238 siph->ip_len = htons(l3tlen); in flow_agg_merge_hdr() 1242 SK_DF(logflags, "Agg IP len %u", ntohs(siph->ip_len)); in flow_agg_merge_hdr()
|
| H A D | flow_classifier.c | 211 l3tlen = ntohs(iph->ip_len); in flow_pkt_classify()
|
| /xnu-8019.80.24/osfmk/kdp/ |
| H A D | kdp_udp.c | 171 #define ip_len ip_vhltl.ip_x.ip_xlen macro 586 ip->ip_len = htons((ushort_t)(sizeof(struct kdp_udpiphdr) + pkt.len)); in kdp_reply() 663 ip->ip_len = htons((ushort_t)(sizeof(struct kdp_udpiphdr) + pkt.len)); in kdp_send() 1553 ip->ip_len = htons((ushort_t)(sizeof(struct kdp_udpiphdr) + pkt.len)); in create_panic_header()
|
| /xnu-8019.80.24/bsd/skywalk/nexus/flowswitch/ |
| H A D | fsw_ip_frag.c | 296 fragpartlen = ntohs(ip4->ip_len) - (uint16_t)(ip4->ip_hl << 2); in fsw_ip_frag_reass_v4() 309 p->pkt_flow_ulen = ntohs(iph->ip_len) - in fsw_ip_frag_reass_v4()
|