Searched refs:iphdr (Results 1 – 6 of 6) sorted by relevance
| /xnu-8019.80.24/bsd/netinet/ |
| H A D | in_gif.c | 108 struct ip iphdr; /* capsule IP header, host byte ordered */ in in_gif_output() local 169 bzero(&iphdr, sizeof(iphdr)); in in_gif_output() 170 iphdr.ip_src = sin_src->sin_addr; in in_gif_output() 173 iphdr.ip_dst = sin_dst->sin_addr; in in_gif_output() 178 iphdr.ip_p = proto; in in_gif_output() 180 iphdr.ip_ttl = ip_gif_ttl; in in_gif_output() 181 iphdr.ip_len = m->m_pkthdr.len + sizeof(struct ip); in in_gif_output() 183 ip_ecn_ingress(ECN_NORMAL, &iphdr.ip_tos, &tos); in in_gif_output() 185 ip_ecn_ingress(ECN_NOCARE, &iphdr.ip_tos, &tos); in in_gif_output() 197 bcopy(&iphdr, mtod(m, struct ip *), sizeof(struct ip)); in in_gif_output()
|
| /xnu-8019.80.24/bsd/netinet6/ |
| H A D | ah_core.c | 1263 struct ip iphdr; in ah4_calccksum() local 1266 m_copydata(m, off, sizeof(iphdr), (caddr_t)&iphdr); in ah4_calccksum() 1268 hlen = IP_VHL_HL(iphdr.ip_vhl) << 2; in ah4_calccksum() 1270 hlen = iphdr.ip_hl << 2; in ah4_calccksum() 1272 iphdr.ip_ttl = 0; in ah4_calccksum() 1273 iphdr.ip_sum = htons(0); in ah4_calccksum() 1275 iphdr.ip_tos = 0; in ah4_calccksum() 1277 iphdr.ip_off = htons(ntohs(iphdr.ip_off) & ip4_ah_offsetmask); in ah4_calccksum() 1278 (algo->update)(&algos, (caddr_t)&iphdr, sizeof(struct ip)); in ah4_calccksum() 1381 hdrtype = (iphdr.ip_p) & 0xff; in ah4_calccksum()
|
| /xnu-8019.80.24/bsd/net/ |
| H A D | if_ports_used.c | 1235 struct ip iphdr = {}; in if_ports_used_match_mbuf() local 1239 error = mbuf_copydata(m, 0, sizeof(struct ip), &iphdr); in if_ports_used_match_mbuf() 1246 npi.npi_local_addr_in = iphdr.ip_dst; in if_ports_used_match_mbuf() 1247 npi.npi_foreign_addr_in = iphdr.ip_src; in if_ports_used_match_mbuf() 1252 if ((ntohs(iphdr.ip_off) & ~(IP_DF | IP_RF)) && in if_ports_used_match_mbuf() 1253 (ntohs(iphdr.ip_off) & IP_OFFMASK) != 0) { in if_ports_used_match_mbuf() 1258 switch (iphdr.ip_p) { in if_ports_used_match_mbuf() 1268 error = mbuf_copydata(m, iphdr.ip_hl << 2, sizeof(struct tcphdr), &th); in if_ports_used_match_mbuf() 1286 size_t udp_offset = iphdr.ip_hl << 2; in if_ports_used_match_mbuf() 1325 __func__, iphdr.ip_p, ifp->if_xname); in if_ports_used_match_mbuf()
|
| H A D | if_bridge.c | 563 union iphdr { union 575 union iphdr ip_hdr; /* pointer to IP header */ 7239 struct ip iphdr; 7250 error = mbuf_copydata(m, offset, sizeof(struct ip), &iphdr); 7258 if (iphdr.ip_p == IPPROTO_UDP) { 7271 if (iphdr.ip_src.s_addr != bif->bif_hf_ipsrc.s_addr && 7272 iphdr.ip_src.s_addr != INADDR_ANY) { 7278 (IP_VHL_HL(iphdr.ip_vhl) << 2); 7303 } else if (iphdr.ip_src.s_addr == INADDR_ANY) { 7308 } else if (iphdr.ip_src.s_addr != bif->bif_hf_ipsrc.s_addr || [all …]
|
| H A D | bpf.c | 3205 struct ip iphdr; in get_ip_trunc_len() local 3206 err = bpf_copydata(pkt, off, sizeof(struct ip), &iphdr); in get_ip_trunc_len() 3213 iplen = (uint16_t)(iphdr.ip_hl << 2); in get_ip_trunc_len() 3218 proto = iphdr.ip_p; in get_ip_trunc_len()
|
| H A D | pf.c | 6324 struct ip *iphdr = pbuf->pb_data; in pf_test_dummynet() local 6325 NTOHS(iphdr->ip_len); in pf_test_dummynet() 6326 NTOHS(iphdr->ip_off); in pf_test_dummynet()
|