/drivers/staging/r8188eu/core/ |
D | rtw_br_ext.c | 414 struct iphdr *iph = (struct iphdr *)(skb->data + ETH_HLEN); in nat25_db_handle() local 416 if (((unsigned char *)(iph) + (iph->ihl<<2)) >= (skb->data + ETH_HLEN + skb->len)) { in nat25_db_handle() 427 if (iph->saddr == 0) in nat25_db_handle() 429 tmp = be32_to_cpu(iph->saddr); in nat25_db_handle() 430 DEBUG_INFO("NAT25: Insert IP, SA =%08x, DA =%08x\n", tmp, iph->daddr); in nat25_db_handle() 586 struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + ETH_HLEN); in nat25_db_handle() local 588 if (sizeof(*iph) >= (skb->len - ETH_HLEN)) { in nat25_db_handle() 601 …iph->saddr.s6_addr16[0], iph->saddr.s6_addr16[1], iph->saddr.s6_addr16[2], iph->saddr.s6_addr16[3], in nat25_db_handle() 602 …iph->saddr.s6_addr16[4], iph->saddr.s6_addr16[5], iph->saddr.s6_addr16[6], iph->saddr.s6_addr16[7], in nat25_db_handle() 603 …iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16[2], iph->daddr.s6_addr16[3], in nat25_db_handle() [all …]
|
/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_selftest.c | 108 struct iphdr *iph; in mlx5e_test_get_udp_skb() local 125 iph = skb_put(skb, sizeof(struct iphdr)); in mlx5e_test_get_udp_skb() 142 iph->ihl = 5; in mlx5e_test_get_udp_skb() 143 iph->ttl = 32; in mlx5e_test_get_udp_skb() 144 iph->version = 4; in mlx5e_test_get_udp_skb() 145 iph->protocol = IPPROTO_UDP; in mlx5e_test_get_udp_skb() 148 iph->tot_len = htons(iplen); in mlx5e_test_get_udp_skb() 149 iph->frag_off = 0; in mlx5e_test_get_udp_skb() 150 iph->saddr = 0; in mlx5e_test_get_udp_skb() 151 iph->daddr = 0; in mlx5e_test_get_udp_skb() [all …]
|
/drivers/net/netdevsim/ |
D | psample.c | 44 struct iphdr *iph; in nsim_dev_psample_skb_build() local 59 iph = skb_put(skb, sizeof(struct iphdr)); in nsim_dev_psample_skb_build() 60 iph->protocol = IPPROTO_UDP; in nsim_dev_psample_skb_build() 61 iph->saddr = in_aton("192.0.2.1"); in nsim_dev_psample_skb_build() 62 iph->daddr = in_aton("198.51.100.1"); in nsim_dev_psample_skb_build() 63 iph->version = 0x4; in nsim_dev_psample_skb_build() 64 iph->frag_off = 0; in nsim_dev_psample_skb_build() 65 iph->ihl = 0x5; in nsim_dev_psample_skb_build() 66 iph->tot_len = htons(tot_len); in nsim_dev_psample_skb_build() 67 iph->id = 0; in nsim_dev_psample_skb_build() [all …]
|
D | dev.c | 662 struct iphdr *iph; in nsim_dev_trap_skb_build() local 677 iph = skb_put(skb, sizeof(struct iphdr)); in nsim_dev_trap_skb_build() 678 iph->protocol = IPPROTO_UDP; in nsim_dev_trap_skb_build() 679 iph->saddr = in_aton("192.0.2.1"); in nsim_dev_trap_skb_build() 680 iph->daddr = in_aton("198.51.100.1"); in nsim_dev_trap_skb_build() 681 iph->version = 0x4; in nsim_dev_trap_skb_build() 682 iph->frag_off = 0; in nsim_dev_trap_skb_build() 683 iph->ihl = 0x5; in nsim_dev_trap_skb_build() 684 iph->tot_len = htons(tot_len); in nsim_dev_trap_skb_build() 685 iph->ttl = 100; in nsim_dev_trap_skb_build() [all …]
|
/drivers/infiniband/core/ |
D | lag.c | 18 struct iphdr *iph; in rdma_build_skb() local 45 iph = ip_hdr(skb); in rdma_build_skb() 46 iph->frag_off = 0; in rdma_build_skb() 47 iph->version = 4; in rdma_build_skb() 48 iph->protocol = IPPROTO_UDP; in rdma_build_skb() 49 iph->ihl = 0x5; in rdma_build_skb() 50 iph->tot_len = htons(sizeof(struct udphdr) + sizeof(struct in rdma_build_skb() 52 memcpy(&iph->saddr, ah_attr->grh.sgid_attr->gid.raw + 12, in rdma_build_skb() 54 memcpy(&iph->daddr, ah_attr->grh.dgid.raw + 12, in rdma_build_skb()
|
D | ud_header.c | 285 struct iphdr iph; in ib_ud_ip4_csum() local 287 iph.ihl = 5; in ib_ud_ip4_csum() 288 iph.version = 4; in ib_ud_ip4_csum() 289 iph.tos = header->ip4.tos; in ib_ud_ip4_csum() 290 iph.tot_len = header->ip4.tot_len; in ib_ud_ip4_csum() 291 iph.id = header->ip4.id; in ib_ud_ip4_csum() 292 iph.frag_off = header->ip4.frag_off; in ib_ud_ip4_csum() 293 iph.ttl = header->ip4.ttl; in ib_ud_ip4_csum() 294 iph.protocol = header->ip4.protocol; in ib_ud_ip4_csum() 295 iph.check = 0; in ib_ud_ip4_csum() [all …]
|
/drivers/net/ppp/ |
D | pptp.c | 166 struct iphdr *iph; in pptp_xmit() local 178 max_headroom = LL_RESERVED_SPACE(tdev) + sizeof(*iph) + sizeof(*hdr) + 2; in pptp_xmit() 233 skb_push(skb, sizeof(*iph)); in pptp_xmit() 238 iph = ip_hdr(skb); in pptp_xmit() 239 iph->version = 4; in pptp_xmit() 240 iph->ihl = sizeof(struct iphdr) >> 2; in pptp_xmit() 242 iph->frag_off = htons(IP_DF); in pptp_xmit() 244 iph->frag_off = 0; in pptp_xmit() 245 iph->protocol = IPPROTO_GRE; in pptp_xmit() 246 iph->tos = 0; in pptp_xmit() [all …]
|
/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | tls_rxtx.c | 149 struct iphdr *iph; in mlx5e_tls_complete_sync_skb() local 160 iph = ip_hdr(nskb); in mlx5e_tls_complete_sync_skb() 161 iph->tot_len = htons(nskb->len - skb_network_offset(nskb)); in mlx5e_tls_complete_sync_skb() 306 struct iphdr *iph; in tls_update_resync_sn() local 313 iph = (struct iphdr *)(mdata + 1); in tls_update_resync_sn() 315 th = ((void *)iph) + iph->ihl * 4; in tls_update_resync_sn() 317 if (iph->version == 4) { in tls_update_resync_sn() 319 iph->saddr, th->source, iph->daddr, in tls_update_resync_sn() 323 struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph; in tls_update_resync_sn()
|
D | ktls_rx.c | 466 struct iphdr *iph; in resync_update_sn() local 472 iph = (struct iphdr *)(skb->data + depth); in resync_update_sn() 474 if (iph->version == 4) { in resync_update_sn() 476 th = (void *)iph + sizeof(struct iphdr); in resync_update_sn() 479 iph->saddr, th->source, iph->daddr, in resync_update_sn() 483 struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph; in resync_update_sn()
|
/drivers/infiniband/sw/rxe/ |
D | rxe_net.c | 250 struct iphdr *iph; in prepare_ipv4_hdr() local 261 iph = ip_hdr(skb); in prepare_ipv4_hdr() 263 iph->version = IPVERSION; in prepare_ipv4_hdr() 264 iph->ihl = sizeof(struct iphdr) >> 2; in prepare_ipv4_hdr() 265 iph->tot_len = htons(skb->len); in prepare_ipv4_hdr() 266 iph->frag_off = df; in prepare_ipv4_hdr() 267 iph->protocol = proto; in prepare_ipv4_hdr() 268 iph->tos = tos; in prepare_ipv4_hdr() 269 iph->daddr = daddr; in prepare_ipv4_hdr() 270 iph->saddr = saddr; in prepare_ipv4_hdr() [all …]
|
/drivers/net/ |
D | gtp.c | 156 struct iphdr *iph; in gtp_check_ms_ipv4() local 161 iph = (struct iphdr *)(skb->data + hdrlen); in gtp_check_ms_ipv4() 164 return iph->daddr == pctx->ms_addr_ip4.s_addr; in gtp_check_ms_ipv4() 166 return iph->saddr == pctx->ms_addr_ip4.s_addr; in gtp_check_ms_ipv4() 449 struct iphdr *iph; member 472 struct sock *sk, struct iphdr *iph, in gtp_set_pktinfo_ipv4() argument 478 pktinfo->iph = iph; in gtp_set_pktinfo_ipv4() 492 struct iphdr *iph; in gtp_build_skb_ip4() local 499 iph = ip_hdr(skb); in gtp_build_skb_ip4() 501 pctx = ipv4_pdp_find(gtp, iph->saddr); in gtp_build_skb_ip4() [all …]
|
D | vrf.c | 460 const struct ipv6hdr *iph; in vrf_process_v6_outbound() local 470 iph = ipv6_hdr(skb); in vrf_process_v6_outbound() 476 fl6.daddr = iph->daddr; in vrf_process_v6_outbound() 477 fl6.saddr = iph->saddr; in vrf_process_v6_outbound() 478 fl6.flowlabel = ip6_flowinfo(iph); in vrf_process_v6_outbound() 480 fl6.flowi6_proto = iph->nexthdr; in vrf_process_v6_outbound() 1314 const struct ipv6hdr *iph = ipv6_hdr(skb); in ipv6_ndisc_frame() local 1317 if (iph->nexthdr == NEXTHDR_ICMP) { in ipv6_ndisc_frame() 1321 icmph = skb_header_pointer(skb, sizeof(*iph), in ipv6_ndisc_frame() 1356 const struct ipv6hdr *iph = ipv6_hdr(skb); in vrf_ip6_input_dst() local [all …]
|
/drivers/net/ethernet/intel/iavf/ |
D | iavf_fdir.c | 315 struct iphdr *iph = (struct iphdr *)hdr->buffer; in iavf_fill_fdir_ip4_hdr() local 320 iph->tos = fltr->ip_data.tos; in iavf_fill_fdir_ip4_hdr() 325 iph->protocol = fltr->ip_data.proto; in iavf_fill_fdir_ip4_hdr() 330 iph->saddr = fltr->ip_data.v4_addrs.src_ip; in iavf_fill_fdir_ip4_hdr() 335 iph->daddr = fltr->ip_data.v4_addrs.dst_ip; in iavf_fill_fdir_ip4_hdr() 354 struct ipv6hdr *iph = (struct ipv6hdr *)hdr->buffer; in iavf_fill_fdir_ip6_hdr() local 359 iph->priority = (fltr->ip_data.tclass >> 4) & 0xF; in iavf_fill_fdir_ip6_hdr() 360 iph->flow_lbl[0] = (fltr->ip_data.tclass << 4) & 0xF0; in iavf_fill_fdir_ip6_hdr() 365 iph->nexthdr = fltr->ip_data.proto; in iavf_fill_fdir_ip6_hdr() 371 memcpy(&iph->saddr, &fltr->ip_data.v6_addrs.src_ip, in iavf_fill_fdir_ip6_hdr() [all …]
|
/drivers/net/usb/ |
D | cdc_mbim.c | 310 struct ipv6hdr *iph = (void *)buf; in do_neigh_solicit() local 311 struct nd_msg *msg = (void *)(iph + 1); in do_neigh_solicit() 319 if (!ipv6_addr_is_solict_mult(&iph->daddr) || in do_neigh_solicit() 320 !(ipv6_addr_type(&iph->saddr) & IPV6_ADDR_UNICAST)) in do_neigh_solicit() 345 ipv6_stub->ndisc_send_na(netdev, &iph->saddr, &msg->target, in do_neigh_solicit() 356 struct ipv6hdr *iph = (void *)buf; in is_neigh_solicit() local 357 struct nd_msg *msg = (void *)(iph + 1); in is_neigh_solicit() 360 iph->nexthdr == IPPROTO_ICMPV6 && in is_neigh_solicit()
|
/drivers/net/ethernet/qualcomm/rmnet/ |
D | rmnet_map_data.c | 255 void *iph = ip_hdr(skb); in rmnet_map_v5_checksum_uplink_packet() local 261 u16 ip_len = ((struct iphdr *)iph)->ihl * 4; in rmnet_map_v5_checksum_uplink_packet() 263 proto = ((struct iphdr *)iph)->protocol; in rmnet_map_v5_checksum_uplink_packet() 264 trans = iph + ip_len; in rmnet_map_v5_checksum_uplink_packet() 269 proto = ((struct ipv6hdr *)iph)->nexthdr; in rmnet_map_v5_checksum_uplink_packet() 270 trans = iph + ip_len; in rmnet_map_v5_checksum_uplink_packet()
|
/drivers/net/ethernet/sun/ |
D | sunvnet_common.c | 309 struct iphdr *iph = ip_hdr(skb); in vnet_fullcsum_ipv4() local 314 if (iph->protocol != IPPROTO_TCP && in vnet_fullcsum_ipv4() 315 iph->protocol != IPPROTO_UDP) in vnet_fullcsum_ipv4() 320 if (iph->protocol == IPPROTO_TCP) { in vnet_fullcsum_ipv4() 325 ptcp->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in vnet_fullcsum_ipv4() 328 } else if (iph->protocol == IPPROTO_UDP) { in vnet_fullcsum_ipv4() 333 pudp->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in vnet_fullcsum_ipv4() 420 struct iphdr *iph = ip_hdr(skb); in vnet_rx_one() local 422 iph->check = 0; in vnet_rx_one() 423 ip_send_check(iph); in vnet_rx_one() [all …]
|
/drivers/infiniband/hw/irdma/ |
D | utils.c | 1413 struct iphdr *iph = (struct iphdr *)buf->iph; in irdma_ieq_get_qp() local 1416 if (iph->version == 4) { in irdma_ieq_get_qp() 1417 loc_addr[0] = ntohl(iph->daddr); in irdma_ieq_get_qp() 1418 rem_addr[0] = ntohl(iph->saddr); in irdma_ieq_get_qp() 1420 ip6h = (struct ipv6hdr *)buf->iph; in irdma_ieq_get_qp() 1462 struct iphdr *iph; in irdma_puda_ieq_get_ah_info() local 1477 iph = (struct iphdr *)buf->iph; in irdma_puda_ieq_get_ah_info() 1478 ah_info->hop_ttl = iph->ttl; in irdma_puda_ieq_get_ah_info() 1479 ah_info->tc_tos = iph->tos; in irdma_puda_ieq_get_ah_info() 1480 ah_info->dest_ip_addr[0] = ntohl(iph->daddr); in irdma_puda_ieq_get_ah_info() [all …]
|
D | cm.c | 421 struct iphdr *iph; in irdma_form_uda_cm_frame() local 451 pktsize = sizeof(*iph) + sizeof(*tcph); in irdma_form_uda_cm_frame() 472 iph = (struct iphdr *)buf; in irdma_form_uda_cm_frame() 473 buf += sizeof(*iph); in irdma_form_uda_cm_frame() 492 iph->version = IPVERSION; in irdma_form_uda_cm_frame() 493 iph->ihl = 5; /* 5 * 4Byte words, IP headr len */ in irdma_form_uda_cm_frame() 494 iph->tos = cm_node->tos; in irdma_form_uda_cm_frame() 495 iph->tot_len = htons(pktsize); in irdma_form_uda_cm_frame() 496 iph->id = htons(++cm_node->tcp_cntxt.loc_id); in irdma_form_uda_cm_frame() 498 iph->frag_off = htons(0x4000); in irdma_form_uda_cm_frame() [all …]
|
/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_ipip.c | 52 return (union mlxsw_sp_l3addr) { .addr4 = parms.iph.saddr }; in mlxsw_sp_ipip_parms4_saddr() 64 return (union mlxsw_sp_l3addr) { .addr4 = parms.iph.daddr }; in mlxsw_sp_ipip_parms4_daddr() 205 bool inherit_ttl = tunnel->parms.iph.ttl == 0; in mlxsw_sp_ipip_can_offload_gre4() 206 bool inherit_tos = tunnel->parms.iph.tos & 0x1; in mlxsw_sp_ipip_can_offload_gre4()
|
/drivers/net/ethernet/ibm/ |
D | ibmveth.c | 1217 struct iphdr *iph = (struct iphdr *)skb->data; in ibmveth_rx_mss_helper() local 1219 if (iph->protocol == IPPROTO_TCP) { in ibmveth_rx_mss_helper() 1220 offset = iph->ihl * 4; in ibmveth_rx_mss_helper() 1259 struct iphdr *iph = NULL; in ibmveth_rx_csum_helper() local 1269 iph = (struct iphdr *)skb->data; in ibmveth_rx_csum_helper() 1274 if (iph->check == 0xffff) { in ibmveth_rx_csum_helper() 1275 iph->check = 0; in ibmveth_rx_csum_helper() 1276 iph->check = ip_fast_csum((unsigned char *)iph, in ibmveth_rx_csum_helper() 1277 iph->ihl); in ibmveth_rx_csum_helper() 1280 iphlen = iph->ihl * 4; in ibmveth_rx_csum_helper() [all …]
|
/drivers/infiniband/hw/qib/ |
D | qib_user_sdma.c | 453 hdr->iph.pkt_flags = in qib_user_sdma_page_to_frags() 454 cpu_to_le16(le16_to_cpu(hdr->iph.pkt_flags)|0x2); in qib_user_sdma_page_to_frags() 465 vcto = le32_to_cpu(hdr->iph.ver_ctxt_tid_offset); in qib_user_sdma_page_to_frags() 466 hdr->iph.chksum = cpu_to_le16(QIB_LRH_BTH + in qib_user_sdma_page_to_frags() 469 le16_to_cpu(hdr->iph.pkt_flags)); in qib_user_sdma_page_to_frags() 499 hdr->iph.ver_ctxt_tid_offset = cpu_to_le32( in qib_user_sdma_page_to_frags() 500 (le32_to_cpu(hdr->iph.ver_ctxt_tid_offset)&0xFF000000) + in qib_user_sdma_page_to_frags() 509 vcto = le32_to_cpu(hdr->iph.ver_ctxt_tid_offset); in qib_user_sdma_page_to_frags() 510 hdr->iph.chksum = cpu_to_le16(QIB_LRH_BTH + in qib_user_sdma_page_to_frags() 513 le16_to_cpu(hdr->iph.pkt_flags)); in qib_user_sdma_page_to_frags()
|
/drivers/net/ethernet/netronome/nfp/crypto/ |
D | tls.c | 479 struct iphdr *iph; in nfp_net_tls_rx_resync_req() local 484 iph = pkt + req->l3_offset; in nfp_net_tls_rx_resync_req() 498 iph->saddr, th->source, iph->daddr, in nfp_net_tls_rx_resync_req() 511 req->l3_offset, req->l4_offset, iph->version); in nfp_net_tls_rx_resync_req()
|
/drivers/net/ethernet/chelsio/inline_crypto/chtls/ |
D | chtls_cm.c | 1118 const struct iphdr *iph; in chtls_recv_sock() local 1130 iph = (const struct iphdr *)network_hdr; in chtls_recv_sock() 1140 n = dst_neigh_lookup(dst, &iph->saddr); in chtls_recv_sock() 1190 if (iph->version == 0x4) { in chtls_recv_sock() 1191 newinet->inet_daddr = iph->saddr; in chtls_recv_sock() 1192 newinet->inet_rcv_saddr = iph->daddr; in chtls_recv_sock() 1193 newinet->inet_saddr = iph->daddr; in chtls_recv_sock() 1303 struct iphdr *iph; in chtls_pass_accept_request() local 1344 iph = (struct iphdr *)(eh + 1); in chtls_pass_accept_request() 1349 iph = (struct iphdr *)(vlan_eh + 1); in chtls_pass_accept_request() [all …]
|
/drivers/net/ethernet/qlogic/qlcnic/ |
D | qlcnic_io.c | 1269 struct iphdr *iph; in qlcnic_process_lro() local 1327 iph = (struct iphdr *)skb->data; in qlcnic_process_lro() 1328 th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in qlcnic_process_lro() 1329 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in qlcnic_process_lro() 1330 csum_replace2(&iph->check, iph->tot_len, htons(length)); in qlcnic_process_lro() 1331 iph->tot_len = htons(length); in qlcnic_process_lro() 1792 struct iphdr *iph; in qlcnic_83xx_process_lro() local 1851 iph = (struct iphdr *)skb->data; in qlcnic_83xx_process_lro() 1852 th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in qlcnic_83xx_process_lro() 1853 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in qlcnic_83xx_process_lro() [all …]
|
/drivers/net/bonding/ |
D | bond_alb.c | 1402 const struct iphdr *iph; in bond_xmit_alb_slave_get() local 1405 !pskb_network_may_pull(skb, sizeof(*iph))) { in bond_xmit_alb_slave_get() 1409 iph = ip_hdr(skb); in bond_xmit_alb_slave_get() 1410 if (iph->daddr == ip_bcast || iph->protocol == IPPROTO_IGMP) { in bond_xmit_alb_slave_get() 1414 hash_start = (char *)&(iph->daddr); in bond_xmit_alb_slave_get() 1415 hash_size = sizeof(iph->daddr); in bond_xmit_alb_slave_get()
|