Home
last modified time | relevance | path

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

1234

/freebsd/sys/netinet/
H A Dip_reass.c244 ((ip->ip_off & htons(IP_MF)) && (ntohs(ip->ip_len) & 0x7) != 0)) { in ip_reass()
250 if (ip->ip_off & htons(IP_MF)) in ip_reass()
254 ip->ip_off = htons(ntohs(ip->ip_off) << 3); in ip_reass()
259 if (ntohs(ip->ip_len) + ntohs(ip->ip_off) > IP_MAXPACKET) { in ip_reass()
338 fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
354 i = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
362 fp->ipq_maxoff = 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()
405 i = ntohs(GETIP(p)->ip_off) + ntohs(GETIP(p)->ip_len) - in ip_reass()
406 ntohs(ip->ip_off); 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()
980 /* XXX do we need to add ip_off below ? */ in ip_fragment()
981 mhip->ip_off in ip_fragment()
[all...]
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()
274 ip->ip_off = htons(0xa000); in ip_test1()
282 ip->ip_off = htons(0x0100); in ip_test1()
300 ip->ip_off = htons(IP_MF); in ip_test1()
311 ip->ip_off = htons(IP_MF | (i >> 3)); in ip_test1()
318 ip->ip_off = htons(i >> 3); in ip_test1()
331 ip->ip_off = htons(IP_MF); in ip_test1()
345 ip->ip_off = htons(IP_MF | (i >> 3)); in ip_test1()
[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.c761 frent->fe_off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3; in pf_reassemble()
762 frent->fe_mff = ntohs(ip->ip_off) & IP_MF; in pf_reassemble()
799 ip->ip_sum = pf_cksum_fixup(ip->ip_sum, ip->ip_off, in pf_reassemble()
800 ip->ip_off & ~(IP_MF|IP_OFFMASK), 0); in pf_reassemble()
801 ip->ip_off &= ~(IP_MF|IP_OFFMASK); in pf_reassemble()
1055 int mff = (ntohs(h->ip_off) & IP_MF); in pf_normalize_ip()
1057 u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3; in pf_normalize_ip()
1132 (h->ip_off & htons(IP_DF)) in pf_normalize_ip()
1134 u_int16_t ip_off = h->ip_off; in pf_normalize_ip() local
1136 h->ip_off &= htons(~IP_DF); in pf_normalize_ip()
[all …]
/freebsd/sys/netpfil/ipfilter/netinet/
H A Dip_fil_freebsd.c424 ip->ip_off = htons(V_path_mtu_discovery ? IP_DF : 0); in ipf_send_ip()
656 u_short ip_off; in ipf_fastroute() local
797 ip_off = ntohs(ip->ip_off); in ipf_fastroute()
798 if (ip_off & IP_DF) { in ipf_fastroute()
837 mhip->ip_off = ((off - hlen) >> 3) + ip_off; in ipf_fastroute()
841 mhip->ip_off |= IP_MF; in ipf_fastroute()
851 mhip->ip_off = htons((u_short)mhip->ip_off); in ipf_fastroute()
862 ip->ip_off = htons((u_short)IP_MF); in ipf_fastroute()
1260 fin->fin_ip->ip_off = ntohs(fin->fin_ip->ip_off); in ipf_inject()
/freebsd/sys/netpfil/ipfw/nat64/
H A Dnat64_translate.c525 ip->ip_off = htons(ntohs(frag->ip6f_offlg) >> 3); in nat64_init_ip4hdr()
527 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()
589 if (len < plen || (ip_off & htons(IP_MF)) != 0) 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()
[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.c1400 uint32_t ip_off, poff; in sge_encap() local
1412 ip_off = sizeof(struct ether_header); in sge_encap()
1413 m = m_pullup(*m_head, ip_off); in sge_encap()
1421 ip_off = sizeof(struct ether_vlan_header); in sge_encap()
1422 m = m_pullup(m, ip_off); in sge_encap()
1428 m = m_pullup(m, ip_off + sizeof(struct ip)); in sge_encap()
1433 ip = (struct ip *)(mtod(m, char *) + ip_off); in sge_encap()
1434 poff = ip_off + (ip->ip_hl << 2); in sge_encap()
1450 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()
1743 if (__predict_false(m->m_len < pi->ip_off + sizeof(*pi->ip))) { 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()
1752 if (__predict_false(m->m_len < pi->ip_off + pi->ip_hlen + in mxge_parse_tx()
1754 m_copydata(m, 0, pi->ip_off + pi->ip_hlen + in mxge_parse_tx()
1756 pi->ip = (struct ip *)(ss->scratch + pi->ip_off); in mxge_parse_tx()
1762 pi->ip6 = (struct ip6_hdr *)(m->m_data + pi->ip_off); in mxge_parse_tx()
[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/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)
1869 if ((ntohs(ip->ip_off) & IP_MF) == 0)
/freebsd/sys/dev/fxp/
H A Dif_fxp.c1439 uint32_t ip_off, poff; in fxp_encap() local
1451 ip_off = sizeof(struct ether_header); in fxp_encap()
1452 m = m_pullup(*m_head, ip_off); in fxp_encap()
1460 ip_off = sizeof(struct ether_vlan_header); in fxp_encap()
1461 m = m_pullup(m, ip_off); in fxp_encap()
1467 m = m_pullup(m, ip_off + sizeof(struct ip)); in fxp_encap()
1472 ip = (struct ip *)(mtod(m, char *) + ip_off); in fxp_encap()
1473 poff = ip_off + (ip->ip_hl << 2); in fxp_encap()
1490 ip = (struct ip *)(mtod(m, char *) + ip_off); in fxp_encap()
1499 tcp_payload = m->m_pkthdr.len - ip_off - (ip->ip_hl << 2); in fxp_encap()
[all …]
/freebsd/sys/dev/ale/
H A Dif_ale.c1590 uint32_t cflags, hdrlen, ip_off, poff, vtag; in ale_encap() local
1601 ip_off = poff = 0; in ale_encap()
1642 ip_off = sizeof(struct ether_header); in ale_encap()
1643 m = m_pullup(m, ip_off); in ale_encap()
1654 ip_off = sizeof(struct ether_vlan_header); in ale_encap()
1655 m = m_pullup(m, ip_off); in ale_encap()
1661 m = m_pullup(m, ip_off + sizeof(struct ip)); in ale_encap()
1666 ip = (struct ip *)(mtod(m, char *) + ip_off); in ale_encap()
1667 poff = ip_off + (ip->ip_hl << 2); in ale_encap()
1683 ip = (struct ip *)(mtod(m, char *) + ip_off); in ale_encap()
[all …]

1234