Home
last modified time | relevance | path

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

1234

/freebsd/sys/netinet/
H A Dip_reass.c243 ((ip->ip_off & htons(IP_MF)) && (ntohs(ip->ip_len) & 0x7) != 0)) { in ip_reass()
249 if (ip->ip_off & htons(IP_MF)) in ip_reass()
253 ip->ip_off = htons(ntohs(ip->ip_off) << 3); in ip_reass()
258 if (ntohs(ip->ip_len) + ntohs(ip->ip_off) > IP_MAXPACKET) { in ip_reass()
337 fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
353 i = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
361 fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
391 if (ntohs(GETIP(q)->ip_off) > ntohs(ip->ip_off)) in ip_reass()
404 i = ntohs(GETIP(p)->ip_off) + ntohs(GETIP(p)->ip_len) - in ip_reass()
405 ntohs(ip->ip_off); in ip_reass()
[all …]
H A Dip_output.c332 uint16_t ip_len, ip_off; in ip_output() local
365 ip_off = ntohs(ip->ip_off); in ip_output()
821 if ((ip_off & IP_DF) || in ip_output()
888 uint16_t ip_len, ip_off; in ip_fragment() local
891 ip_off = ntohs(ip->ip_off); in ip_fragment()
897 if (__predict_false((ip_off & IP_DF) || len < 8)) { in ip_fragment()
1000 mhip->ip_off = ((off - hlen) >> 3) + ip_off; in ip_fragment()
1004 mhip->ip_off |= IP_MF; in ip_fragment()
1017 mhip->ip_off = htons(mhip->ip_off); in ip_fragment()
1035 ip->ip_off = htons(ip_off | IP_MF); in ip_fragment()
H A Dip_fastfwd.c245 uint16_t ip_len, ip_off; in ip_tryforward() local
459 ip_off = ntohs(ip->ip_off); in ip_tryforward()
521 if (ip_off & IP_DF) { in ip_tryforward()
H A Dip.h61 u_short ip_off; /* fragment offset field */ member
/freebsd/tests/sys/netinet/
H A Dip_reass_test.c98 ip->ip_off = 0; in alloc_lopacket()
215 ip->ip_off = htons(0x10); in ATF_TC_BODY()
221 ip->ip_off = htons(0x20); in ATF_TC_BODY()
227 ip->ip_off = htons(0x8); in ATF_TC_BODY()
233 ip->ip_off = htons(0x10); in ATF_TC_BODY()
245 packet2->hdr.ip_off = htons(IP_MF | 0x20); in ATF_TC_BODY()
298 ip->ip_off = htons(IP_MF | 0x10); in ATF_TC_BODY()
304 ip->ip_off = htons(0x10); in ATF_TC_BODY()
350 ip->ip_off = htons(IP_MF | 0x1fff); in ATF_TC_BODY()
356 ip->ip_off = htons(0x1fff); in ATF_TC_BODY()
/freebsd/sbin/ipf/ipsend/
H A Diptests.c106 ip->ip_off = 0; in ip_test1()
257 ip->ip_off = htons(IP_MF); in ip_test1()
265 ip->ip_off = htons(IP_MF); in ip_test1()
273 ip->ip_off = htons(0xa000); in ip_test1()
281 ip->ip_off = htons(0x0100); in ip_test1()
299 ip->ip_off = htons(IP_MF); in ip_test1()
310 ip->ip_off = htons(IP_MF | (i >> 3)); in ip_test1()
317 ip->ip_off = htons(i >> 3); in ip_test1()
330 ip->ip_off = htons(IP_MF); in ip_test1()
344 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 ((__tcp_get_flags(t2) == 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.c153 off_q = ntohs(p->ipq_hdr->ip_off) & IP_OFFMASK; in ip_reasm_add()
154 off_ip = ntohs(ip->ip_off) & IP_OFFMASK; in ip_reasm_add()
181 off_q = ntohs(next->ipq_hdr->ip_off) & IP_OFFMASK; in ip_reasm_add()
232 fragoffset = (ntohs(ip->ip_off) & IP_OFFMASK) * 8; in readipv4()
233 morefrag = (ntohs(ip->ip_off) & IP_MF) == 0 ? false : true; in readipv4()
313 fragoffset = (ntohs(ipq->ipq_hdr->ip_off) & IP_OFFMASK) * 8; in readipv4()
321 (ntohs(ipq->ipq_hdr->ip_off) & IP_MF) != 0)); in readipv4()
331 if ((ntohs(last->ipq_hdr->ip_off) & IP_MF) != 0) { in readipv4()
337 (ntohs(last->ipq_hdr->ip_off) & IP_OFFMASK) * 8, in readipv4()
338 (ntohs(last->ipq_hdr->ip_off) & IP_MF) != 0)); in readipv4()
/freebsd/sys/netpfil/pf/
H A Dpf_norm.c831 frent->fe_off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3; in pf_reassemble()
832 frent->fe_mff = ntohs(ip->ip_off) & IP_MF; in pf_reassemble()
885 ip->ip_sum = pf_cksum_fixup(ip->ip_sum, ip->ip_off, in pf_reassemble()
886 ip->ip_off & ~(IP_MF|IP_OFFMASK), 0); in pf_reassemble()
887 ip->ip_off &= ~(IP_MF|IP_OFFMASK); in pf_reassemble()
1157 int mff = (ntohs(h->ip_off) & IP_MF); in pf_normalize_ip()
1159 u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3; in pf_normalize_ip()
1232 (h->ip_off & htons(IP_DF)) in pf_normalize_ip()
1234 u_int16_t ip_off = h->ip_off; in pf_normalize_ip() local
1236 h->ip_off &= htons(~IP_DF); in pf_normalize_ip()
[all …]
/freebsd/sys/netpfil/ipfilter/netinet/
H A Dip_fil_freebsd.c441 ip->ip_off = htons(V_path_mtu_discovery ? IP_DF : 0); in ipf_send_ip()
674 u_short ip_off; in ipf_fastroute() local
815 ip_off = ntohs(ip->ip_off); in ipf_fastroute()
816 if (ip_off & IP_DF) { in ipf_fastroute()
855 mhip->ip_off = ((off - hlen) >> 3) + ip_off; in ipf_fastroute()
859 mhip->ip_off |= IP_MF; in ipf_fastroute()
869 mhip->ip_off = htons((u_short)mhip->ip_off); in ipf_fastroute()
880 ip->ip_off = htons((u_short)IP_MF); in ipf_fastroute()
1278 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.c173 ip->ip_off = ntohs(ip->ip_off); in debugnet_handle_ip()
194 if ((ip->ip_off & (IP_MF | IP_OFFMASK)) != 0) { in debugnet_handle_ip()
494 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.c1398 uint32_t ip_off, poff; in sge_encap() local
1410 ip_off = sizeof(struct ether_header); in sge_encap()
1411 m = m_pullup(*m_head, ip_off); in sge_encap()
1419 ip_off = sizeof(struct ether_vlan_header); in sge_encap()
1420 m = m_pullup(m, ip_off); in sge_encap()
1426 m = m_pullup(m, ip_off + sizeof(struct ip)); in sge_encap()
1431 ip = (struct ip *)(mtod(m, char *) + ip_off); in sge_encap()
1432 poff = ip_off + (ip->ip_hl << 2); in sge_encap()
1448 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.c1423 uint32_t ip_off, poff; in fxp_encap() local
1435 ip_off = sizeof(struct ether_header); in fxp_encap()
1436 m = m_pullup(*m_head, ip_off); in fxp_encap()
1444 ip_off = sizeof(struct ether_vlan_header); in fxp_encap()
1445 m = m_pullup(m, ip_off); in fxp_encap()
1451 m = m_pullup(m, ip_off + sizeof(struct ip)); in fxp_encap()
1456 ip = (struct ip *)(mtod(m, char *) + ip_off); in fxp_encap()
1457 poff = ip_off + (ip->ip_hl << 2); in fxp_encap()
1474 ip = (struct ip *)(mtod(m, char *) + ip_off); in fxp_encap()
1483 tcp_payload = m->m_pkthdr.len - ip_off - (ip->ip_hl << 2); in fxp_encap()
[all …]
/freebsd/sys/dev/dpaa/
H A Dfman.h126 uint8_t ip_off[2]; member

1234