Lines Matching refs:ihdr
67 struct iphdr *ihdr; in stmmac_test_get_udp_skb() local
102 ihdr = skb_put(skb, sizeof(*ihdr)); in stmmac_test_get_udp_skb()
160 (sizeof(*ihdr) + sizeof(*ehdr))); in stmmac_test_get_udp_skb()
164 ihdr->ihl = 5; in stmmac_test_get_udp_skb()
165 ihdr->ttl = 32; in stmmac_test_get_udp_skb()
166 ihdr->version = 4; in stmmac_test_get_udp_skb()
168 ihdr->protocol = IPPROTO_TCP; in stmmac_test_get_udp_skb()
170 ihdr->protocol = IPPROTO_UDP; in stmmac_test_get_udp_skb()
171 iplen = sizeof(*ihdr) + sizeof(*shdr) + attr->size; in stmmac_test_get_udp_skb()
180 ihdr->tot_len = htons(iplen); in stmmac_test_get_udp_skb()
181 ihdr->frag_off = 0; in stmmac_test_get_udp_skb()
182 ihdr->saddr = htonl(attr->ip_src); in stmmac_test_get_udp_skb()
183 ihdr->daddr = htonl(attr->ip_dst); in stmmac_test_get_udp_skb()
184 ihdr->tos = 0; in stmmac_test_get_udp_skb()
185 ihdr->id = 0; in stmmac_test_get_udp_skb()
186 ip_send_check(ihdr); in stmmac_test_get_udp_skb()
202 thdr->check = ~tcp_v4_check(skb->len, ihdr->saddr, ihdr->daddr, 0); in stmmac_test_get_udp_skb()
206 udp4_hwcsum(skb, ihdr->saddr, ihdr->daddr); in stmmac_test_get_udp_skb()
258 struct iphdr *ihdr; in stmmac_test_loopback_validate() local
282 ihdr = ip_hdr(skb); in stmmac_test_loopback_validate()
284 ihdr = (struct iphdr *)(skb_network_header(skb) + 4); in stmmac_test_loopback_validate()
287 if (ihdr->protocol != IPPROTO_TCP) in stmmac_test_loopback_validate()
290 thdr = (struct tcphdr *)((u8 *)ihdr + 4 * ihdr->ihl); in stmmac_test_loopback_validate()
296 if (ihdr->protocol != IPPROTO_UDP) in stmmac_test_loopback_validate()
299 uhdr = (struct udphdr *)((u8 *)ihdr + 4 * ihdr->ihl); in stmmac_test_loopback_validate()
844 struct iphdr *ihdr; in stmmac_test_vlan_validate() local
872 ihdr = ip_hdr(skb); in stmmac_test_vlan_validate()
874 ihdr = (struct iphdr *)(skb_network_header(skb) + 4); in stmmac_test_vlan_validate()
875 if (ihdr->protocol != IPPROTO_UDP) in stmmac_test_vlan_validate()
878 uhdr = (struct udphdr *)((u8 *)ihdr + 4 * ihdr->ihl); in stmmac_test_vlan_validate()