Home
last modified time | relevance | path

Searched refs:iph (Results 1 – 25 of 41) sorted by relevance

12

/drivers/net/ppp/
Dpptp.c186 struct iphdr *iph; in pptp_xmit() local
202 max_headroom = LL_RESERVED_SPACE(tdev) + sizeof(*iph) + sizeof(*hdr) + 2; in pptp_xmit()
259 skb_push(skb, sizeof(*iph)); in pptp_xmit()
264 iph = ip_hdr(skb); in pptp_xmit()
265 iph->version = 4; in pptp_xmit()
266 iph->ihl = sizeof(struct iphdr) >> 2; in pptp_xmit()
268 iph->frag_off = htons(IP_DF); in pptp_xmit()
270 iph->frag_off = 0; in pptp_xmit()
271 iph->protocol = IPPROTO_GRE; in pptp_xmit()
272 iph->tos = 0; in pptp_xmit()
[all …]
/drivers/infiniband/hw/nes/
Dnes_mgt.c177 struct iphdr *iph = (struct iphdr *)(cb->data_start + ETH_HLEN); in nes_get_seq() local
178 struct tcphdr *tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in nes_get_seq()
245 struct iphdr *iph; in get_fpdu_info() local
337 iph = (struct iphdr *)(cb->data_start + ETH_HLEN); in get_fpdu_info()
338 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info()
357 iph = (struct iphdr *)(fpdu_info->hdr_vbase + ETH_HLEN); in get_fpdu_info()
358 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info()
361 iph->tot_len = cpu_to_be16(tot_len); in get_fpdu_info()
362 iph->saddr = cpu_to_be32(0x7f000001); in get_fpdu_info()
386 iph = (struct iphdr *)(cb->data_start + ETH_HLEN); in get_fpdu_info()
[all …]
Dnes_cm.c408 struct iphdr *iph; in form_cm_frame() local
411 u16 packetsize = sizeof(*iph); in form_cm_frame()
417 memset(skb->data, 0x00, ETH_HLEN + sizeof(*iph) + sizeof(*tcph)); in form_cm_frame()
424 iph = (struct iphdr *)buf; in form_cm_frame()
425 buf += sizeof(*iph); in form_cm_frame()
429 skb_set_transport_header(skb, ETH_HLEN + sizeof(*iph)); in form_cm_frame()
443 iph->version = IPVERSION; in form_cm_frame()
444 iph->ihl = 5; /* 5 * 4Byte words, IP headr len */ in form_cm_frame()
445 iph->tos = 0; in form_cm_frame()
446 iph->tot_len = htons(packetsize); in form_cm_frame()
[all …]
/drivers/staging/gdm72xx/
Dgdm_qos.c191 static u32 get_qos_index(struct nic *nic, u8 *iph, u8 *tcpudph) in get_qos_index() argument
196 if (iph == NULL || tcpudph == NULL) in get_qos_index()
199 IP_Ver = (iph[0]>>4)&0xf; in get_qos_index()
200 Header_Len = iph[0]&0xf; in get_qos_index()
206 if (chk_ipv4_rule(&qcb->csr[i], iph, in get_qos_index()
265 struct iphdr *iph = (struct iphdr *) ((char *) ethh + ETH_HLEN); in gdm_qos_send_hci_pkt() local
271 tcph = (struct tcphdr *) iph + iph->ihl*4; in gdm_qos_send_hci_pkt()
284 index = get_qos_index(nic, (u8 *)iph, (u8 *) tcph); in gdm_qos_send_hci_pkt()
/drivers/net/ethernet/qlogic/qlcnic/
Dqlcnic_io.c1074 struct iphdr *iph; in qlcnic_process_lro() local
1133 iph = (struct iphdr *)skb->data; in qlcnic_process_lro()
1134 th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in qlcnic_process_lro()
1135 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in qlcnic_process_lro()
1136 csum_replace2(&iph->check, iph->tot_len, htons(length)); in qlcnic_process_lro()
1137 iph->tot_len = htons(length); in qlcnic_process_lro()
1536 struct iphdr *iph; in qlcnic_83xx_process_lro() local
1593 iph = (struct iphdr *)skb->data; in qlcnic_83xx_process_lro()
1594 th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in qlcnic_83xx_process_lro()
1595 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in qlcnic_83xx_process_lro()
[all …]
/drivers/net/xen-netback/
Dnetback.c1327 struct iphdr *iph; in checksum_setup() local
1350 iph = (void *)skb->data; in checksum_setup()
1351 switch (iph->protocol) { in checksum_setup()
1353 if (!skb_partial_csum_set(skb, 4 * iph->ihl, in checksum_setup()
1359 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in checksum_setup()
1360 skb->len - iph->ihl*4, in checksum_setup()
1365 if (!skb_partial_csum_set(skb, 4 * iph->ihl, in checksum_setup()
1371 udph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in checksum_setup()
1372 skb->len - iph->ihl*4, in checksum_setup()
1380 iph->protocol); in checksum_setup()
/drivers/net/
Dvxlan.c985 struct iphdr *iph; in vxlan_xmit_one() local
1082 __skb_push(skb, sizeof(*iph)); in vxlan_xmit_one()
1084 iph = ip_hdr(skb); in vxlan_xmit_one()
1085 iph->version = 4; in vxlan_xmit_one()
1086 iph->ihl = sizeof(struct iphdr) >> 2; in vxlan_xmit_one()
1087 iph->frag_off = df; in vxlan_xmit_one()
1088 iph->protocol = IPPROTO_UDP; in vxlan_xmit_one()
1089 iph->tos = ip_tunnel_ecn_encap(tos, old_iph, skb); in vxlan_xmit_one()
1090 iph->daddr = dst; in vxlan_xmit_one()
1091 iph->saddr = fl4.saddr; in vxlan_xmit_one()
[all …]
Dxen-netfront.c852 struct iphdr *iph; in checksum_setup() local
877 iph = (void *)skb->data; in checksum_setup()
878 th = skb->data + 4 * iph->ihl; in checksum_setup()
883 switch (iph->protocol) { in checksum_setup()
889 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in checksum_setup()
890 skb->len - iph->ihl*4, in checksum_setup()
899 udph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in checksum_setup()
900 skb->len - iph->ihl*4, in checksum_setup()
908 " %d packet", iph->protocol); in checksum_setup()
/drivers/infiniband/hw/ipath/
Dipath_common.h746 struct ipath_header iph; member
754 struct ipath_header iph; member
/drivers/net/bonding/
Dbond_main.c3340 const struct iphdr *iph; in bond_xmit_hash_policy_l23() local
3346 pskb_network_may_pull(skb, sizeof(*iph))) { in bond_xmit_hash_policy_l23()
3347 iph = ip_hdr(skb); in bond_xmit_hash_policy_l23()
3349 return ((ntohl(iph->saddr ^ iph->daddr) & 0xffff) ^ in bond_xmit_hash_policy_l23()
3373 const struct iphdr *iph; in bond_xmit_hash_policy_l34() local
3382 pskb_may_pull(skb, noff + sizeof(*iph))) { in bond_xmit_hash_policy_l34()
3383 iph = ip_hdr(skb); in bond_xmit_hash_policy_l34()
3384 poff = proto_ports_offset(iph->protocol); in bond_xmit_hash_policy_l34()
3386 if (!ip_is_fragment(iph) && poff >= 0) { in bond_xmit_hash_policy_l34()
3387 l4 = skb_header_pointer(skb, noff + (iph->ihl << 2) + poff, in bond_xmit_hash_policy_l34()
[all …]
Dbond_alb.c1379 const struct iphdr *iph = ip_hdr(skb); in bond_alb_xmit() local
1382 (iph->daddr == ip_bcast) || in bond_alb_xmit()
1383 (iph->protocol == IPPROTO_IGMP)) { in bond_alb_xmit()
1387 hash_start = (char *)&(iph->daddr); in bond_alb_xmit()
1388 hash_size = sizeof(iph->daddr); in bond_alb_xmit()
/drivers/infiniband/hw/cxgb4/
Dcm.c3017 struct iphdr *iph; in rx_pkt() local
3063 iph = (struct iphdr *)(eh + 1); in rx_pkt()
3066 iph = (struct iphdr *)(vlan_eh + 1); in rx_pkt()
3070 if (iph->version != 0x4) in rx_pkt()
3073 tcph = (struct tcphdr *)(iph + 1); in rx_pkt()
3074 skb_set_network_header(skb, (void *)iph - (void *)rss); in rx_pkt()
3079 ntohl(iph->daddr), ntohs(tcph->dest), ntohl(iph->saddr), in rx_pkt()
3080 ntohs(tcph->source), iph->tos); in rx_pkt()
3082 rt = find_route(dev, iph->daddr, iph->saddr, tcph->dest, tcph->source, in rx_pkt()
3083 iph->tos); in rx_pkt()
[all …]
/drivers/net/ethernet/qlogic/netxen/
Dnetxen_nic_init.c1598 struct iphdr *iph; in netxen_process_lro() local
1641 iph = (struct iphdr *)(skb->data + vhdr_len); in netxen_process_lro()
1642 th = (struct tcphdr *)((skb->data + vhdr_len) + (iph->ihl << 2)); in netxen_process_lro()
1644 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in netxen_process_lro()
1645 csum_replace2(&iph->check, iph->tot_len, htons(length)); in netxen_process_lro()
1646 iph->tot_len = htons(length); in netxen_process_lro()
/drivers/net/ethernet/atheros/atlx/
Datl1.c2128 struct iphdr *iph = ip_hdr(skb); in atl1_tso() local
2130 real_len = (((unsigned char *)iph - skb->data) + in atl1_tso()
2131 ntohs(iph->tot_len)); in atl1_tso()
2136 iph->check = 0; in atl1_tso()
2138 ~csum_tcpudp_magic(iph->saddr, in atl1_tso()
2139 iph->daddr, tcp_hdrlen(skb), in atl1_tso()
2141 ptpd->word3 |= (iph->ihl & TPD_IPHL_MASK) << in atl1_tso()
2151 iph->check = 0; in atl1_tso()
2152 tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, in atl1_tso()
2153 iph->daddr, 0, IPPROTO_TCP, 0); in atl1_tso()
[all …]
/drivers/net/ethernet/qlogic/qlge/
Dqlge_main.c1578 struct iphdr *iph = in ql_process_mac_rx_page() local
1580 if (!(iph->frag_off & in ql_process_mac_rx_page()
1682 struct iphdr *iph = (struct iphdr *) skb->data; in ql_process_mac_rx_skb() local
1683 if (!(iph->frag_off & in ql_process_mac_rx_skb()
1993 struct iphdr *iph = (struct iphdr *) skb->data; in ql_process_mac_split_rx_intr() local
1994 if (!(iph->frag_off & in ql_process_mac_split_rx_intr()
2518 struct iphdr *iph = ip_hdr(skb); in ql_tso() local
2519 iph->check = 0; in ql_tso()
2521 tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, in ql_tso()
2522 iph->daddr, 0, in ql_tso()
[all …]
/drivers/net/ethernet/intel/ixgb/
Dixgb_main.c1233 struct iphdr *iph; in ixgb_tso() local
1243 iph = ip_hdr(skb); in ixgb_tso()
1244 iph->tot_len = 0; in ixgb_tso()
1245 iph->check = 0; in ixgb_tso()
1246 tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, in ixgb_tso()
1247 iph->daddr, 0, in ixgb_tso()
1250 ipcso = (void *)&(iph->check) - (void *)skb->data; in ixgb_tso()
/drivers/net/vmxnet3/
Dvmxnet3_drv.c825 const struct iphdr *iph = ip_hdr(skb); in vmxnet3_parse_and_copy_hdr() local
827 if (iph->protocol == IPPROTO_TCP) in vmxnet3_parse_and_copy_hdr()
829 else if (iph->protocol == IPPROTO_UDP) in vmxnet3_parse_and_copy_hdr()
878 struct iphdr *iph = ip_hdr(skb); in vmxnet3_prepare_tso() local
880 iph->check = 0; in vmxnet3_prepare_tso()
881 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, 0, in vmxnet3_prepare_tso()
884 struct ipv6hdr *iph = ipv6_hdr(skb); in vmxnet3_prepare_tso() local
886 tcph->check = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, 0, in vmxnet3_prepare_tso()
/drivers/net/ethernet/oki-semi/pch_gbe/
Dpch_gbe_main.c1163 struct iphdr *iph = ip_hdr(skb); in pch_gbe_tx_queue() local
1166 if (iph->protocol == IPPROTO_TCP) { in pch_gbe_tx_queue()
1172 csum_tcpudp_magic(iph->saddr, in pch_gbe_tx_queue()
1173 iph->daddr, in pch_gbe_tx_queue()
1177 } else if (iph->protocol == IPPROTO_UDP) { in pch_gbe_tx_queue()
1184 csum_tcpudp_magic(iph->saddr, in pch_gbe_tx_queue()
1185 iph->daddr, in pch_gbe_tx_queue()
/drivers/net/ethernet/chelsio/cxgb4vf/
Dsge.c1007 const struct iphdr *iph = ip_hdr(skb); in hwcsum() local
1009 if (iph->version == 4) { in hwcsum()
1010 if (iph->protocol == IPPROTO_TCP) in hwcsum()
1012 else if (iph->protocol == IPPROTO_UDP) in hwcsum()
1026 const struct ipv6hdr *ip6h = (const struct ipv6hdr *)iph; in hwcsum()
/drivers/net/ethernet/pasemi/
Dpasemi_mac.c266 struct iphdr *iph; in get_skb_hdr() local
274 iph = ip_hdr(skb); in get_skb_hdr()
275 if (iph->protocol != IPPROTO_TCP) in get_skb_hdr()
283 if (ntohs(iph->tot_len) < ip_len + tcp_hdrlen(skb)) in get_skb_hdr()
287 *iphdr = iph; in get_skb_hdr()
/drivers/net/ethernet/broadcom/bnx2x/
Dbnx2x_cmn.c624 const struct iphdr *iph = ip_hdr(skb); in bnx2x_gro_ip_csum() local
631 iph->saddr, iph->daddr, 0); in bnx2x_gro_ip_csum()
636 struct ipv6hdr *iph = ipv6_hdr(skb); in bnx2x_gro_ipv6_csum() local
643 &iph->saddr, &iph->daddr, 0); in bnx2x_gro_ipv6_csum()
3498 struct iphdr *iph = ip_hdr(skb); in bnx2x_update_pbds_gso_enc() local
3500 bswab16(csum_fold((~iph->check) - in bnx2x_update_pbds_gso_enc()
3501 iph->tot_len - iph->frag_off)); in bnx2x_update_pbds_gso_enc()
/drivers/s390/net/
Dqeth_l3_main.c2856 struct iphdr *iph = ip_hdr(skb); in qeth_l3_hdr_csum() local
2861 if (iph->protocol == IPPROTO_UDP) in qeth_l3_hdr_csum()
2865 iph->check = 0; in qeth_l3_hdr_csum()
2875 struct iphdr *iph = ip_hdr(skb); in qeth_tso_fill_header() local
2889 hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4); in qeth_tso_fill_header()
2899 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in qeth_tso_fill_header()
2901 iph->tot_len = 0; in qeth_tso_fill_header()
2902 iph->check = 0; in qeth_tso_fill_header()
/drivers/infiniband/hw/qib/
Dqib_common.h703 struct qib_header iph; member
/drivers/net/ethernet/intel/igbvf/
Dnetdev.c1933 struct iphdr *iph = ip_hdr(skb); in igbvf_tso() local
1934 iph->tot_len = 0; in igbvf_tso()
1935 iph->check = 0; in igbvf_tso()
1936 tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, in igbvf_tso()
1937 iph->daddr, 0, in igbvf_tso()
/drivers/net/ethernet/chelsio/cxgb4/
Dsge.c911 const struct iphdr *iph = ip_hdr(skb); in hwcsum() local
913 if (iph->version == 4) { in hwcsum()
914 if (iph->protocol == IPPROTO_TCP) in hwcsum()
916 else if (iph->protocol == IPPROTO_UDP) in hwcsum()
929 const struct ipv6hdr *ip6h = (const struct ipv6hdr *)iph; in hwcsum()

12