Home
last modified time | relevance | path

Searched refs:ip_off (Results 1 – 25 of 95) sorted by relevance

1234

/freebsd/sys/netinet/
H A Dip_reass.c250 if (ip->ip_off & htons(IP_MF)) in ip_reass()
254 ip->ip_off = htons(ntohs(ip->ip_off) << 3); in ip_reass()
354 i = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
392 if (ntohs(GETIP(q)->ip_off) > ntohs(ip->ip_off)) in ip_reass()
406 ntohs(ip->ip_off); in ip_reass()
412 ip->ip_off = htons(ntohs(ip->ip_off) + i); in ip_reass()
427 ntohs(GETIP(q)->ip_off); q = nq) { in ip_reass()
428 i = (ntohs(ip->ip_off) + ntohs(ip->ip_len)) - in ip_reass()
429 ntohs(GETIP(q)->ip_off); in ip_reass()
432 GETIP(q)->ip_off = htons(ntohs(GETIP(q)->ip_off) + i); in ip_reass()
[all …]
H A Dip_output.c327 uint16_t ip_len, ip_off; in ip_output() local
360 ip_off = ntohs(ip->ip_off); in ip_output()
802 if ((ip_off & IP_DF) || in ip_output()
869 uint16_t ip_len, ip_off; in ip_fragment() local
872 ip_off = ntohs(ip->ip_off); in ip_fragment()
878 if (__predict_false((ip_off & IP_DF) || len < 8)) { in ip_fragment()
981 mhip->ip_off = ((off - hlen) >> 3) + ip_off; in ip_fragment()
985 mhip->ip_off |= IP_MF; in ip_fragment()
998 mhip->ip_off = htons(mhip->ip_off); in ip_fragment()
1016 ip->ip_off = htons(ip_off | IP_MF); in ip_fragment()
H A Dip_fastfwd.c241 uint16_t ip_len, ip_off; in ip_tryforward() local
452 ip_off = ntohs(ip->ip_off); in ip_tryforward()
488 if (ip_off & IP_DF) { in ip_tryforward()
H A Dip.h60 u_short ip_off; /* fragment offset field */ member
/freebsd/tests/sys/netinet/
H A Dip_reass_test.c94 ip->ip_off = 0; in alloc_lopacket()
211 ip->ip_off = htons(0x10); in ATF_TC_BODY()
217 ip->ip_off = htons(0x20); in ATF_TC_BODY()
223 ip->ip_off = htons(0x8); in ATF_TC_BODY()
229 ip->ip_off = htons(0x10); in ATF_TC_BODY()
241 packet2->hdr.ip_off = htons(IP_MF | 0x20); in ATF_TC_BODY()
294 ip->ip_off = htons(IP_MF | 0x10); in ATF_TC_BODY()
300 ip->ip_off = htons(0x10); in ATF_TC_BODY()
346 ip->ip_off = htons(IP_MF | 0x1fff); in ATF_TC_BODY()
352 ip->ip_off = htons(0x1fff); in ATF_TC_BODY()
/freebsd/sbin/ipf/ipsend/
H A Diptests.c107 ip->ip_off = 0; in ip_test1()
258 ip->ip_off = htons(IP_MF); in ip_test1()
266 ip->ip_off = htons(IP_MF); in ip_test1()
300 ip->ip_off = htons(IP_MF); in ip_test1()
331 ip->ip_off = htons(IP_MF); in ip_test1()
371 ip->ip_off = htons(IP_MF); in ip_test1()
397 ip->ip_off = 0; in ip_test1()
410 ip->ip_off = 0; in ip_test1()
552 ip->ip_off = 0; in ip_test3()
748 ip->ip_off = 0; in ip_test4()
[all …]
H A Dip.c192 ip->ip_off |= htons(IP_MF); in send_ip()
198 ip->ip_off ^= htons(IP_MF); in send_ip()
203 ip->ip_off &= htons(0xe000); in send_ip()
204 ip->ip_off |= htons(sent >> 3); in send_ip()
215 if (!(ntohs(ip->ip_off) & IP_MF)) in send_ip()
217 else if (!(ip->ip_off & htons(0x1fff))) in send_ip()
264 if ((t2->th_flags == TH_SYN) && !ntohs(ip->ip_off) && in send_tcp()
H A Dresend.c40 if (ip->ip_off & 0x3fff) in dumppacket()
41 printf("frag @%#x ", (ip->ip_off & 0x1fff) << 3); in dumppacket()
/freebsd/stand/libsa/
H A Dip.c159 if ((ntohs(p->ipq_hdr->ip_off) & IP_OFFMASK) < in ip_reasm_add()
160 (ntohs(ip->ip_off) & IP_OFFMASK)) { in ip_reasm_add()
271 if ((ntohs(ip->ip_off) & IP_MF) == 0 && in readipv4()
272 (ntohs(ip->ip_off) & IP_OFFMASK) == 0) { in readipv4()
319 if ((ntohs(ip->ip_off) & IP_MF) == 0) { in readipv4()
320 ipr->ip_total_size = (8 * (ntohs(ip->ip_off) & IP_OFFMASK)); in readipv4()
348 if ((ntohs(ipq->ipq_hdr->ip_off) & IP_OFFMASK) != n / 8) { in readipv4()
357 if ((ntohs(last->ipq_hdr->ip_off) & IP_MF) != 0) { in readipv4()
/freebsd/sys/netpfil/pf/
H A Dpf_norm.c1129 (h->ip_off & htons(IP_DF)) in pf_normalize_ip()
1131 u_int16_t ip_off = h->ip_off; in pf_normalize_ip() local
1133 h->ip_off &= htons(~IP_DF); in pf_normalize_ip()
1134 h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_off, h->ip_off, 0); in pf_normalize_ip()
1145 if (h->ip_off & htons(IP_DF)) { in pf_normalize_ip()
1188 u_int16_t ip_off = h->ip_off; in pf_normalize_ip() local
1190 h->ip_off &= htons(IP_DF); in pf_normalize_ip()
1191 h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_off, h->ip_off, 0); in pf_normalize_ip()
2284 u_int16_t ip_off = h->ip_off; in pf_scrub_ip() local
2286 h->ip_off &= htons(~IP_DF); in pf_scrub_ip()
[all …]
/freebsd/sys/netpfil/ipfilter/netinet/
H A Dip_fil_freebsd.c451 ip->ip_off = htons(V_path_mtu_discovery ? IP_DF : 0); in ipf_send_ip()
683 u_short ip_off; in ipf_fastroute() local
824 ip_off = ntohs(ip->ip_off); in ipf_fastroute()
825 if (ip_off & IP_DF) { in ipf_fastroute()
864 mhip->ip_off = ((off - hlen) >> 3) + ip_off; in ipf_fastroute()
868 mhip->ip_off |= IP_MF; in ipf_fastroute()
878 mhip->ip_off = htons((u_short)mhip->ip_off); in ipf_fastroute()
889 ip->ip_off = htons((u_short)IP_MF); in ipf_fastroute()
1287 fin->fin_ip->ip_off = ntohs(fin->fin_ip->ip_off); in ipf_inject()
/freebsd/sys/netpfil/ipfw/nat64/
H A Dnat64_translate.c527 ip->ip_off |= htons(IP_MF); in nat64_init_ip4hdr()
529 ip->ip_off = htons(IP_DF); in nat64_init_ip4hdr()
538 uint16_t ip_off) in nat64_fragment6() argument
549 if (ip_off == 0 && plen <= mtu - hlen) { in nat64_fragment6()
569 if (ip_off != 0) { in nat64_fragment6()
575 offset = (ntohs(ip_off) & IP_OFFMASK) << 3; in nat64_fragment6()
799 if (ip->ip_off & ~ntohs(IP_MF|IP_DF)) { in nat64_icmp_reflect()
849 oip->ip_off = htons(IP_DF); in nat64_icmp_reflect()
1232 uint16_t ip_id, ip_off; in nat64_do_handle_ip4() local
1254 ip_off = ip->ip_off & htons(IP_OFFMASK | IP_MF); in nat64_do_handle_ip4()
[all …]
/freebsd/sys/net/
H A Ddebugnet_inet.c174 ip->ip_off = ntohs(ip->ip_off); in debugnet_handle_ip()
195 if ((ip->ip_off & (IP_MF | IP_OFFMASK)) != 0) { in debugnet_handle_ip()
495 ip->ip_off = htons(IP_DF); in debugnet_ip_output()
/freebsd/contrib/netbsd-tests/net/icmp/
H A Dt_ping.c407 ip->ip_off = tot >> 3; in ATF_TC_BODY()
408 assert((size_t)ip->ip_off << 3 == tot); in ATF_TC_BODY()
412 ip->ip_off |= IP_MF; in ATF_TC_BODY()
/freebsd/sbin/ipf/libipf/
H A Dprintiphdr.c17 ntohs(ip->ip_off), ntohs(ip->ip_sum), ntohl(ip->ip_src.s_addr), in printiphdr()
H A Dprintpacket.c70 off = ntohs(ip->ip_off); in printpacket()
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dip.h48 uint16_t ip_off; /* (u) */ member
/freebsd/contrib/tcpdump/
H A Dip.h59 nd_uint16_t ip_off; /* fragment offset field */ member
/freebsd/sbin/natd/
H A Dicmp.c51 if (ntohs (failedDgram->ip_off) & ~(IP_MF | IP_DF)) in SendNeedFragIcmp()
/freebsd/sys/dev/sge/
H A Dif_sge.c1405 uint32_t ip_off, poff; in sge_encap() local
1417 ip_off = sizeof(struct ether_header); in sge_encap()
1418 m = m_pullup(*m_head, ip_off); in sge_encap()
1426 ip_off = sizeof(struct ether_vlan_header); in sge_encap()
1427 m = m_pullup(m, ip_off); in sge_encap()
1433 m = m_pullup(m, ip_off + sizeof(struct ip)); in sge_encap()
1438 ip = (struct ip *)(mtod(m, char *) + ip_off); in sge_encap()
1439 poff = ip_off + (ip->ip_hl << 2); in sge_encap()
1455 ip = (struct ip *)(mtod(m, char *) + ip_off); in sge_encap()
/freebsd/sys/dev/mxge/
H A Dif_mxge.c1729 pi->ip_off = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; in mxge_parse_tx()
1732 pi->ip_off = ETHER_HDR_LEN; in mxge_parse_tx()
1741 pi->ip = (struct ip *)(m->m_data + pi->ip_off); in mxge_parse_tx()
1744 m_copydata(m, 0, pi->ip_off + sizeof(*pi->ip), in mxge_parse_tx()
1746 pi->ip = (struct ip *)(ss->scratch + pi->ip_off); in mxge_parse_tx()
1754 m_copydata(m, 0, pi->ip_off + pi->ip_hlen + in mxge_parse_tx()
1764 m_copydata(m, 0, pi->ip_off + sizeof(*pi->ip6), in mxge_parse_tx()
1770 pi->ip_hlen -= pi->ip_off; in mxge_parse_tx()
1782 m_copydata(m, 0, pi->ip_off + pi->ip_hlen + in mxge_parse_tx()
1818 cksum_offset = pi->ip_off + pi->ip_hlen; in mxge_encap_tso()
[all …]
/freebsd/cddl/lib/libdtrace/
H A Dip.d277 ipv4_flags = p == NULL ? 0 : (ntohs(p->ip_off) & 0xe000) >> 8;
278 ipv4_offset = p == NULL ? 0 : ntohs(p->ip_off) & 0x1fff;
/freebsd/sys/dev/fxp/
H A Dif_fxp.c1444 uint32_t ip_off, poff; in fxp_encap() local
1456 ip_off = sizeof(struct ether_header); in fxp_encap()
1457 m = m_pullup(*m_head, ip_off); in fxp_encap()
1465 ip_off = sizeof(struct ether_vlan_header); in fxp_encap()
1466 m = m_pullup(m, ip_off); in fxp_encap()
1472 m = m_pullup(m, ip_off + sizeof(struct ip)); in fxp_encap()
1477 ip = (struct ip *)(mtod(m, char *) + ip_off); in fxp_encap()
1478 poff = ip_off + (ip->ip_hl << 2); in fxp_encap()
1495 ip = (struct ip *)(mtod(m, char *) + ip_off); in fxp_encap()
1504 tcp_payload = m->m_pkthdr.len - ip_off - (ip->ip_hl << 2); in fxp_encap()
[all …]
/freebsd/sys/net/altq/
H A Daltq_subr.c1120 u_short ip_off; local
1128 ip_off = ntohs(ip->ip_off);
1130 if (ip_off & IP_OFFMASK) {
1204 if (ip_off & IP_MF)
1874 if ((ntohs(ip->ip_off) & IP_MF) == 0)
/freebsd/sys/dev/ale/
H A Dif_ale.c1602 uint32_t cflags, hdrlen, ip_off, poff, vtag; in ale_encap() local
1613 ip_off = poff = 0; in ale_encap()
1654 ip_off = sizeof(struct ether_header); in ale_encap()
1655 m = m_pullup(m, ip_off); in ale_encap()
1666 ip_off = sizeof(struct ether_vlan_header); in ale_encap()
1667 m = m_pullup(m, ip_off); in ale_encap()
1673 m = m_pullup(m, ip_off + sizeof(struct ip)); in ale_encap()
1678 ip = (struct ip *)(mtod(m, char *) + ip_off); in ale_encap()
1679 poff = ip_off + (ip->ip_hl << 2); in ale_encap()
1695 ip = (struct ip *)(mtod(m, char *) + ip_off); in ale_encap()
[all …]

1234