Home
last modified time | relevance | path

Searched refs:iphlen (Results 1 – 19 of 19) sorted by relevance

/freebsd/sys/dev/netmap/
H A Dnetmap_offloadings.c73 gso_fix_segment(uint8_t *pkt, size_t len, u_int ipv4, u_int iphlen, u_int tcp, in gso_fix_segment() argument
96 ip6h->payload_len = htobe16(len-iphlen); in gso_fix_segment()
100 struct nm_tcphdr *tcph = (struct nm_tcphdr *)(pkt + iphlen); in gso_fix_segment()
115 struct nm_udphdr *udph = (struct nm_udphdr *)(pkt + iphlen); in gso_fix_segment()
118 udph->len = htobe16(len-iphlen); in gso_fix_segment()
127 nm_os_csum_tcpudp_ipv4(iph, check_data, len-iphlen, check); in gso_fix_segment()
129 nm_os_csum_tcpudp_ipv6(ip6h, check_data, len-iphlen, check); in gso_fix_segment()
254 u_int iphlen = 0; in bdg_mismatch_datapath() local
304 iphlen = 4 * (iph->version_ihl & 0x0F); in bdg_mismatch_datapath()
309 iphlen = 40; in bdg_mismatch_datapath()
[all …]
/freebsd/sys/netgraph/
H A Dng_tcpmss.c277 int iphlen, tcphlen, pktlen; in ng_tcpmss_rcvdata() local
314 iphlen = ip->ip_hl << 2; in ng_tcpmss_rcvdata()
315 if (iphlen < sizeof(struct ip) || iphlen > pktlen ) in ng_tcpmss_rcvdata()
323 M_CHECK(iphlen - sizeof(struct ip) + sizeof(struct tcphdr)); in ng_tcpmss_rcvdata()
325 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata()
329 if (tcphlen < sizeof(struct tcphdr) || tcphlen > pktlen - iphlen) in ng_tcpmss_rcvdata()
341 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata()
H A Dng_pptpgre.c754 int iphlen, grelen, extralen; in ng_pptpgre_rcvdata_lower() local
788 iphlen = ip->ip_hl << 2; in ng_pptpgre_rcvdata_lower()
789 if (m->m_len < iphlen + sizeof(*gre)) { in ng_pptpgre_rcvdata_lower()
790 if ((m = m_pullup(m, iphlen + sizeof(*gre))) == NULL) { in ng_pptpgre_rcvdata_lower()
798 gre = (const struct greheader *)((const u_char *)ip + iphlen); in ng_pptpgre_rcvdata_lower()
800 if (m->m_pkthdr.len < iphlen + grelen) { in ng_pptpgre_rcvdata_lower()
804 if (m->m_len < iphlen + grelen) { in ng_pptpgre_rcvdata_lower()
805 if ((m = m_pullup(m, iphlen + grelen)) == NULL) { in ng_pptpgre_rcvdata_lower()
812 gre = (const struct greheader *)((const u_char *)ip + iphlen); in ng_pptpgre_rcvdata_lower()
817 - (iphlen + grelen + gre->hasSeq * be16dec(&gre->length)); in ng_pptpgre_rcvdata_lower()
[all …]
/freebsd/sys/netinet/
H A Din_rss.c212 int iphlen; in rss_mbuf_software_hash_v4() local
239 iphlen = ip->ip_hl << 2; in rss_mbuf_software_hash_v4()
314 if (m->m_len < iphlen + sizeof(struct tcphdr)) { in rss_mbuf_software_hash_v4()
318 th = (const struct tcphdr *)((c_caddr_t)ip + iphlen); in rss_mbuf_software_hash_v4()
328 uh = (const struct udphdr *)((c_caddr_t)ip + iphlen); in rss_mbuf_software_hash_v4()
329 if (m->m_len < iphlen + sizeof(struct udphdr)) { in rss_mbuf_software_hash_v4()
H A Dsctp_input.c83 sctp_handle_init(struct mbuf *m, int iphlen, int offset, in sctp_handle_init() argument
108 sctp_send_abort(m, iphlen, src, dst, sh, init->initiate_tag, op_err, in sctp_handle_init()
118 sctp_send_abort(m, iphlen, src, dst, sh, init->initiate_tag, op_err, in sctp_handle_init()
143 sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, in sctp_handle_init()
156 sctp_send_initiate_ack(inp, stcb, net, m, iphlen, offset, in sctp_handle_init()
389 sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, in sctp_process_init_ack() argument
412 sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, in sctp_process_init_ack()
440 sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, in sctp_process_init_ack()
456 sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, in sctp_process_init_ack()
476 sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, in sctp_process_init_ack()
[all …]
H A Dudp_usrreq.c471 int cscov_partial, iphlen, lookupflags; in udp_input() local
474 iphlen = *offp; in udp_input()
484 if (iphlen > sizeof (struct ip)) { in udp_input()
486 iphlen = sizeof(struct ip); in udp_input()
492 if (m->m_len < iphlen + sizeof(struct udphdr)) { in udp_input()
493 if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == NULL) { in udp_input()
499 uh = (struct udphdr *)((caddr_t)ip + iphlen); in udp_input()
527 ip_len = ntohs(ip->ip_len) - iphlen; in udp_input()
687 if (udp_append(inp, ip, m, iphlen, udp_in) == 0) in udp_input()
H A Dip_mroute.c2517 int iphlen = off; in pim_input() local
2519 int datalen = ntohs(ip->ip_len) - iphlen; in pim_input()
2545 minlen = iphlen + (datalen >= PIM_REG_MINLEN ? PIM_REG_MINLEN : PIM_MINLEN); in pim_input()
2560 m->m_data += iphlen; in pim_input()
2561 m->m_len -= iphlen; in pim_input()
2590 m->m_data -= iphlen; in pim_input()
2591 m->m_len += iphlen; in pim_input()
2665 m->m_data += (iphlen + PIM_MINLEN); in pim_input()
2666 m->m_len -= (iphlen + PIM_MINLEN); in pim_input()
2672 m->m_data -= (iphlen + PIM_MINLEN); in pim_input()
[all …]
H A Digmp.c1460 int iphlen; in igmp_input() local
1479 iphlen = *offp; in igmp_input()
1480 igmplen = ntohs(ip->ip_len) - iphlen; in igmp_input()
1495 minlen = iphlen; in igmp_input()
1510 m->m_data += iphlen; in igmp_input()
1511 m->m_len -= iphlen; in igmp_input()
1518 m->m_data -= iphlen; in igmp_input()
1519 m->m_len += iphlen; in igmp_input()
1580 UINT16_MAX - iphlen - IGMP_V3_QUERY_MINLEN) { in igmp_input()
1589 igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + in igmp_input()
[all …]
H A Dsctp_output.c5498 int iphlen, int offset, in sctp_send_initiate_ack() argument
5550 sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, in sctp_send_initiate_ack()
5566 sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, in sctp_send_initiate_ack()
5587 sctp_send_abort(init_pkt, iphlen, src, dst, sh, in sctp_send_initiate_ack()
11542 struct mbuf *m, int len, int iphlen, int bad_crc) in sctp_send_packet_dropped() argument
11577 len -= iphlen; in sctp_send_packet_dropped()
11580 offset = iphlen + sizeof(struct sctphdr); in sctp_send_packet_dropped()
11684 m_copydata(m, iphlen, len, (caddr_t)datap); in sctp_send_packet_dropped()
12363 sctp_send_abort(struct mbuf *m, int iphlen, struct sockaddr *src, struct sockaddr *dst, in sctp_send_abort() argument
12369 if (sctp_is_there_an_abort_here(m, iphlen, &vtag)) { in sctp_send_abort()
H A Dsctputil.c4396 struct mbuf *m, int iphlen, in sctp_abort_association() argument
4419 sctp_send_abort(m, iphlen, src, dst, sh, vtag, op_err, in sctp_abort_association()
4542 sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, in sctp_handle_ootb() argument
4601 sctp_send_abort(m, iphlen, src, dst, sh, 0, cause, in sctp_handle_ootb()
4612 sctp_is_there_an_abort_here(struct mbuf *m, int iphlen, uint32_t *vtag) in sctp_is_there_an_abort_here() argument
4619 offset = iphlen + sizeof(struct sctphdr); in sctp_is_there_an_abort_here()
H A Dsctp_indata.c2637 sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, in sctp_process_data() argument
2901 sctp_send_packet_dropped(stcb, net, *mm, length, iphlen, 0); in sctp_process_data()
/freebsd/sys/kern/
H A Duipc_mbufhash.c108 int iphlen; in m_tcpip_hash() local
114 iphlen = ip->ip_hl << 2; in m_tcpip_hash()
115 if (iphlen < sizeof(*ip)) in m_tcpip_hash()
117 off += iphlen; in m_tcpip_hash()
/freebsd/sys/dev/ena/
H A Dena_datapath.c720 int iphlen; in ena_tx_csum() local
765 iphlen = ip->ip_hl << 2; in ena_tx_csum()
773 iphlen = ip6_lasthdr(mbuf, ehdrlen, IPPROTO_IPV6, &ipproto); in ena_tx_csum()
774 iphlen -= ehdrlen; in ena_tx_csum()
778 iphlen = 0; in ena_tx_csum()
783 mbuf_next = m_getptr(mbuf, iphlen + ehdrlen, &offset); in ena_tx_csum()
814 ena_meta->l3_hdr_len = iphlen; in ena_tx_csum()
/freebsd/sys/netinet6/
H A Dsctp6_usrreq.c61 int iphlen; in sctp6_input_with_port() local
74 iphlen = *offp; in sctp6_input_with_port()
102 offset = iphlen + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); in sctp6_input_with_port()
111 sh = (struct sctphdr *)(mtod(m, caddr_t)+iphlen); in sctp6_input_with_port()
130 length = ntohs(ip6->ip6_plen) + iphlen; in sctp6_input_with_port()
149 sctp_common_input_processing(&m, iphlen, offset, length, in sctp6_input_with_port()
/freebsd/sys/dev/irdma/
H A Dirdma_utils.c1388 u16 iphlen; in irdma_gen1_ieq_update_tcpip_info() local
1392 iphlen = (buf->ipv4) ? 20 : 40; in irdma_gen1_ieq_update_tcpip_info()
1394 tcph = (struct tcphdr *)(addr + buf->maclen + iphlen); in irdma_gen1_ieq_update_tcpip_info()
1395 pktsize = len + buf->tcphlen + iphlen; in irdma_gen1_ieq_update_tcpip_info()
1434 u16 iphlen; in irdma_gen1_puda_get_tcpip_info() local
1446 iphlen = (info->l3proto) ? 40 : 20; in irdma_gen1_puda_get_tcpip_info()
1450 buf->tcph = buf->iph + iphlen; in irdma_gen1_puda_get_tcpip_info()
1457 pkt_len = ntohs(ip6h->ip6_plen) + iphlen; in irdma_gen1_puda_get_tcpip_info()
1470 buf->datalen = pkt_len - iphlen - buf->tcphlen; in irdma_gen1_puda_get_tcpip_info()
1472 buf->hdrlen = buf->maclen + iphlen + buf->tcphlen; in irdma_gen1_puda_get_tcpip_info()
/freebsd/sys/dev/hyperv/netvsc/
H A Dif_hn.c776 int iphlen; in hn_tso_fixup() local
780 iphlen = ip->ip_hl << 2; in hn_tso_fixup()
781 m_head->m_pkthdr.l3hlen = iphlen; in hn_tso_fixup()
783 PULLUP_HDR(m_head, ehlen + iphlen + sizeof(*th)); in hn_tso_fixup()
784 th = mtodo(m_head, ehlen + iphlen); in hn_tso_fixup()
837 int iphlen; in hn_set_hlen() local
841 iphlen = ip->ip_hl << 2; in hn_set_hlen()
842 m_head->m_pkthdr.l3hlen = iphlen; in hn_set_hlen()
855 uint16_t off = ehlen + iphlen; in hn_set_hlen()
893 int ehlen, iphlen; in hn_check_tcpsyn() local
[all …]
/freebsd/sys/dev/mana/
H A Dmana_en.c714 int iphlen; in mana_tso_fixup() local
718 iphlen = ip->ip_hl << 2; in mana_tso_fixup()
719 mbuf->m_pkthdr.l3hlen = ehlen + iphlen; in mana_tso_fixup()
721 PULLUP_HDR(mbuf, ehlen + iphlen + sizeof(*th)); in mana_tso_fixup()
722 th = mtodo(mbuf, ehlen + iphlen); in mana_tso_fixup()
782 int iphlen; in mana_mbuf_csum_check() local
785 iphlen = ip->ip_hl << 2; in mana_mbuf_csum_check()
786 mbuf->m_pkthdr.l3hlen = ehlen + iphlen; in mana_mbuf_csum_check()
/freebsd/sys/dev/vnic/
H A Dnicvf_queues.c1757 int iphlen; in nicvf_sq_add_hdr_subdesc() local
1812 iphlen = ip->ip_hl << 2; in nicvf_sq_add_hdr_subdesc()
1813 poff = ehdrlen + iphlen; in nicvf_sq_add_hdr_subdesc()
/freebsd/sys/dev/oce/
H A Doce_if.c990 int iphlen = ip->ip_hl << 2; in oce_is_pkt_dest_bmc()
991 struct udphdr *uh = (struct udphdr *)((caddr_t)ip + iphlen); in oce_is_pkt_dest_bmc()
992 int iphlen = ip->ip_hl << 2; oce_is_pkt_dest_bmc() local