| /netbsd-src/sys/netinet/ |
| H A D | in_offload.c | 52 int iphlen, thlen; in tcp4_segment() local 79 iphlen = ip->ip_hl * 4; in tcp4_segment() 81 KASSERT(iphlen >= sizeof(*ip)); in tcp4_segment() 85 hlen = off + iphlen + sizeof(*th); in tcp4_segment() 91 th = (void *)(mtod(m, char *) + off + iphlen); in tcp4_segment() 94 hlen = off + iphlen + thlen; in tcp4_segment() 110 ip->ip_len = htons(iphlen + thlen + mss); in tcp4_segment() 148 ip->ip_sum = in4_cksum(n, 0, off, iphlen); in tcp4_segment() 150 th = (void *)(mtod(n, char *) + off + iphlen); in tcp4_segment() 153 th->th_sum = in4_cksum(n, 0, off + iphlen, thlen + mss); in tcp4_segment()
|
| H A D | sctp_input.c | 97 sctp_handle_init(struct mbuf *m, int iphlen, int offset, in sctp_handle_init() argument 113 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err); in sctp_handle_init() 119 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err); in sctp_handle_init() 126 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err); in sctp_handle_init() 132 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err); in sctp_handle_init() 138 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err); in sctp_handle_init() 144 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err); in sctp_handle_init() 155 sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, sh, cp); in sctp_handle_init() 294 sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, in sctp_process_init_ack() argument 312 sctp_send_operr_to(m, iphlen, op_err, cp->init.initiate_tag); in sctp_process_init_ack() [all …]
|
| H A D | igmp.c | 193 int ip_len, iphlen; in igmp_input() local 196 iphlen = off; in igmp_input() 203 minlen = iphlen + IGMP_MINLEN; in igmp_input() 222 m->m_data += iphlen; in igmp_input() 223 m->m_len -= iphlen; in igmp_input() 226 if (in_cksum(m, ip_len - iphlen)) { in igmp_input() 231 m->m_data -= iphlen; in igmp_input() 232 m->m_len += iphlen; in igmp_input() 478 rip_input(m, iphlen, proto); in igmp_input()
|
| H A D | udp_usrreq.c | 221 int iphlen, int len) in udp_input_checksum() argument 227 return udp4_input_checksum(m, uh, iphlen, len); in udp_input_checksum() 231 return udp6_input_checksum(m, uh, iphlen, len); in udp_input_checksum() 248 int iphlen, int len) in udp4_input_checksum() argument 297 if (in4_cksum(m, IPPROTO_UDP, iphlen, len) != 0) in udp4_input_checksum() 316 int iphlen = off; in udp_input() local 328 M_REGION_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr)); in udp_input() 339 m = m_copyup(m, iphlen + sizeof(struct udphdr), 0); in udp_input() 345 uh = (struct udphdr *)(mtod(m, char *) + iphlen); in udp_input() 363 if (ip_len != iphlen in udp_input() [all...] |
| H A D | ip_mroute.c | 2954 int iphlen; in pim_input() local 2956 iphlen = off; in pim_input() 2957 datalen = ntohs(ip->ip_len) - iphlen; in pim_input() 2982 minlen = iphlen + (datalen >= PIM_REG_MINLEN ? PIM_REG_MINLEN : PIM_MINLEN); in pim_input() 2997 m->m_data += iphlen; in pim_input() 2998 m->m_len -= iphlen; in pim_input() 3028 m->m_data -= iphlen; in pim_input() 3029 m->m_len += iphlen; in pim_input() 3127 m->m_data += (iphlen + PIM_MINLEN); in pim_input() 3128 m->m_len -= (iphlen + PIM_MINLEN); in pim_input() [all …]
|
| H A D | tcp_input.c | 1207 int thlen, iphlen; in tcp_input() 1276 iphlen = sizeof(struct ip); in tcp_input() 1289 iphlen = sizeof(struct ip6_hdr); in tcp_input() 1508 if (iphlen + sizeof(struct tcphdr) > MHLEN) in tcp_input() 1511 if (m->m_len > iphlen && (m->m_flags & M_EXT) == 0) { in tcp_input() 1512 tcp_saveti = m_copym(m, 0, iphlen, M_DONTWAIT); in tcp_input() 1520 tcp_saveti->m_len = iphlen; in tcp_input() 1521 m_copydata(m, 0, iphlen, in tcp_input() 1530 memcpy(mtod(tcp_saveti, char *) + iphlen, th, in tcp_input() 1198 int thlen, iphlen; tcp_input() local
|
| H A D | dccp_usrreq.c | 186 int iphlen; in dccp_input() local 212 iphlen = off; in dccp_input() 225 DCCP_DEBUG((LOG_INFO, "Got DCCP ipv6 packet, iphlen = %u!\n", iphlen)); in dccp_input() 227 M_REGION_GET(dh, struct dccphdr *, m, iphlen, sizeof(*dh)); in dccp_input() 241 if (iphlen > sizeof (struct ip)) { in dccp_input() 246 iphlen = sizeof(struct ip); in dccp_input() 253 M_REGION_GET(dh, struct dccphdr *, m, iphlen, sizeof(*dh)); in dccp_input() 580 dp->len_rcv = m->m_len - data_off - iphlen; /* Correct length ? */ in dccp_input() 588 …%i, m_len = %i, iphlen = %i extrah_len = %i !\n", optlen, data_off, m->m_len, iphlen, extrah_len)); in dccp_input() 888 m_adj(m, (iphlen + data_off)); in dccp_input()
|
| H A D | sctputil.c | 2660 struct mbuf *m, int iphlen, struct sctphdr *sh, struct mbuf *op_err) in sctp_abort_association() argument 2670 sctp_send_abort(m, iphlen, sh, vtag, op_err); in sctp_abort_association() 2707 sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, in sctp_handle_ootb() argument 2741 sctp_send_shutdown_complete2(m, iphlen, sh); in sctp_handle_ootb() 2750 sctp_send_abort(m, iphlen, sh, 0, op_err); in sctp_handle_ootb() 2758 sctp_is_there_an_abort_here(struct mbuf *m, int iphlen, int *vtagfill) in sctp_is_there_an_abort_here() argument 2765 offset = iphlen + sizeof(struct sctphdr); in sctp_is_there_an_abort_here()
|
| H A D | sctp_output.c | 2898 * beginning of the params i.e. (iphlen + sizeof(struct sctp_init_msg) in sctp_arethere_unrecognized_parameters() 3098 struct mbuf *in_initpkt, int iphlen, int offset) in sctp_are_there_new_addresses() argument 3246 struct mbuf *init_pkt, int iphlen, int offset, struct sctphdr *sh, in sctp_send_initiate_ack() argument 3278 (sctp_are_there_new_addresses(asoc, init_pkt, iphlen, offset))) { in sctp_send_initiate_ack() 3285 sctp_send_abort(init_pkt, iphlen, sh, 0, NULL); in sctp_send_initiate_ack() 3293 sctp_send_abort(init_pkt, iphlen, sh, init_chk->init.initiate_tag, op_err); in sctp_send_initiate_ack() 3339 sctp_send_abort(init_pkt, iphlen, sh, 0, NULL); in sctp_send_initiate_ack() 8037 sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh) argument 8478 struct mbuf *m, int iphlen, int bad_crc) argument 8512 len = chk->send_size = (iph->ip_len - iphlen); 8947 sctp_send_abort(struct mbuf * m,int iphlen,struct sctphdr * sh,uint32_t vtag,struct mbuf * err_cause) global() argument 9088 sctp_send_operr_to(struct mbuf * m,int iphlen,struct mbuf * scm,uint32_t vtag) global() argument [all...] |
| H A D | sctp_pcb.c | 375 sctp_findassociation_ep_asconf(struct mbuf *m, int iphlen, int offset, in sctp_findassociation_ep_asconf() argument 974 sctp_findassociation_special_addr(struct mbuf *m, int iphlen, int offset, in sctp_findassociation_special_addr() argument 1123 sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset, in sctp_findassociation_addr() argument 1254 retval = sctp_findassociation_special_addr(m, iphlen, in sctp_findassociation_addr() 3894 int iphlen, int offset, int limit, struct sctphdr *sh, in sctp_load_addresses_from_init() argument
|
| H A D | sctp_indata.c | 2499 sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, in sctp_process_data() argument 2578 printf("In process data off:%d length:%d iphlen:%d ch->type:%d\n", in sctp_process_data() 2579 *offset, length, iphlen, (int)ch->ch.chunk_type); in sctp_process_data() 2609 sctp_abort_association(inp, stcb, m, iphlen, sh, in sctp_process_data() 2666 sctp_send_packet_dropped(stcb, net, *mm, iphlen, 0); in sctp_process_data()
|
| /netbsd-src/sys/net/ |
| H A D | ether_sw_offload.c | 170 int flags, enabled, len, ehlen, iphlen, l4offset; in ether_sw_offload_rx() local 227 iphlen = sizeof(*ip6); in ether_sw_offload_rx() 229 len -= iphlen; in ether_sw_offload_rx() 255 iphlen = ip->ip_hl << 2; in ether_sw_offload_rx() 256 KASSERT(iphlen >= sizeof(*ip)); in ether_sw_offload_rx() 258 len -= iphlen; in ether_sw_offload_rx() 261 if (in4_cksum(m, 0, ehlen, iphlen) != 0) { in ether_sw_offload_rx() 290 l4offset = ehlen + iphlen; in ether_sw_offload_rx()
|
| H A D | if_mpls.c | 536 int iphlen; in mpls_unlabel_inet() local 553 iphlen = iph->ip_hl << 2; in mpls_unlabel_inet() 556 if (m->m_len < iphlen) { in mpls_unlabel_inet() 557 if ((m = m_pullup(m, iphlen)) == NULL) { in mpls_unlabel_inet() 565 if (in_cksum(m, iphlen) != 0) { in mpls_unlabel_inet() 583 iph->ip_sum = in_cksum(m, iphlen); in mpls_unlabel_inet()
|
| /netbsd-src/sys/netinet6/ |
| H A D | in6_offload.c | 54 int iphlen; in tcp6_segment() local 83 iphlen = sizeof(*iph); in tcp6_segment() 87 hlen = off + iphlen + sizeof(*th); in tcp6_segment() 93 th = (void *)(mtod(m, char *) + off + iphlen); in tcp6_segment() 96 hlen = off + iphlen + thlen; in tcp6_segment() 147 th = (void *)(mtod(n, char *) + off + iphlen); in tcp6_segment() 150 th->th_sum = in6_cksum(n, 0, off + iphlen, thlen + mss); in tcp6_segment()
|
| H A D | sctp6_usrreq.c | 123 int length, mlen, offset, iphlen; in sctp6_input() local 138 iphlen = off; in sctp6_input() 139 offset = iphlen + sizeof(*sh) + sizeof(*ch); in sctp6_input() 148 printf("V6 input gets a packet iphlen:%d pktlen:%d\n", iphlen, m->m_pkthdr.len); in sctp6_input() 174 calc_check = sctp_calculate_sum(m, &mlen, iphlen); in sctp6_input() 180 mlen, iphlen); in sctp6_input() 183 stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch), in sctp6_input() 187 sctp_send_packet_dropped(stcb, net, m, iphlen, 1); in sctp6_input() 210 stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch), in sctp6_input() 223 iphlen + sizeof(*sh), sizeof(*init_chk), in sctp6_input() [all …]
|
| /netbsd-src/sys/arch/xen/xen/ |
| H A D | xennet_checksum.c | 83 int iphlen; in xennet_checksum_fill() local 118 iphlen = iph->ip_hl << 2; in xennet_checksum_fill() 133 iphlen = sizeof(*ip6h); in xennet_checksum_fill() 156 m->m_pkthdr.csum_data |= iphlen << 16; in xennet_checksum_fill() 166 m->m_pkthdr.csum_data |= iphlen << 16; in xennet_checksum_fill()
|
| /netbsd-src/sys/netipsec/ |
| H A D | xform_ipip.c | 118 _ipip_input(struct mbuf *m, int iphlen) in _ipip_input() argument 183 m_adj(m, iphlen); in _ipip_input() 325 int error, iphlen; in ipip_output() local 365 iphlen = sizeof(struct ip); in ipip_output() 449 iphlen = sizeof(struct ip6_hdr); in ipip_output() 506 IPIP_STATADD(IPIP_STAT_OBYTES, m->m_pkthdr.len - iphlen); in ipip_output()
|
| H A D | ipsec_output.c | 154 int hlen, roff, iphlen; in ipsec_process_done() local 170 iphlen = ip->ip_hl << 2; in ipsec_process_done() 177 iphlen = sizeof(*ip6); in ipsec_process_done() 201 udp->uh_ulen = htons(m->m_pkthdr.len - iphlen); in ipsec_process_done()
|
| /netbsd-src/sys/dev/pci/igc/ |
| H A D | if_igc.c | 3185 uint32_t ehlen, iphlen; in igc_tx_ctx_setup() 3250 iphlen = M_CSUM_DATA_IPv4_IPHL(mp->m_pkthdr.csum_data); in igc_tx_ctx_setup() 3261 KASSERT(iphlen == ip->ip_hl << 2); in igc_tx_ctx_setup() 3267 iphlen = M_CSUM_DATA_IPv6_IPHL(mp->m_pkthdr.csum_data); in igc_tx_ctx_setup() 3273 KASSERT(iphlen == sizeof(struct ip6_hdr)); in igc_tx_ctx_setup() 3281 iphlen = 0; in igc_tx_ctx_setup() 3289 vlan_macip_lens |= iphlen; in igc_tx_ctx_setup() 3356 uint32_t ehlen, iphlen, tcphlen, paylen; in igc_tso_setup() 3386 iphlen = M_CSUM_DATA_IPv4_IPHL(mp->m_pkthdr.csum_data); in igc_tso_setup() 3393 KASSERT(iphlen in igc_tso_setup() 3184 uint32_t ehlen, iphlen; igc_tx_ctx_setup() local [all...] |
| /netbsd-src/sys/dev/pci/ |
| H A D | if_ena.c | 2678 int iphlen; in ena_tx_csum() local 2715 iphlen = ip->ip_hl << 2; in ena_tx_csum() 2716 th = (struct tcphdr *)((vaddr_t)ip + iphlen); in ena_tx_csum() 2759 ena_meta->l3_hdr_len = iphlen; in ena_tx_csum()
|