Lines Matching defs:ihdr
27 struct iphdr *ihdr;
50 ihdr = skb_put(skb, sizeof(*ihdr));
78 (sizeof(*ihdr) + sizeof(*ehdr)));
82 ihdr->ihl = 5;
83 ihdr->ttl = 32;
84 ihdr->version = 4;
86 ihdr->protocol = IPPROTO_TCP;
88 ihdr->protocol = IPPROTO_UDP;
89 iplen = sizeof(*ihdr) + sizeof(*shdr) + attr->size;
98 ihdr->tot_len = htons(iplen);
99 ihdr->frag_off = 0;
100 ihdr->saddr = htonl(attr->ip_src);
101 ihdr->daddr = htonl(attr->ip_dst);
102 ihdr->tos = 0;
103 ihdr->id = 0;
104 ip_send_check(ihdr);
130 thdr->check = ~tcp_v4_check(l4len, ihdr->saddr, ihdr->daddr, 0);
148 udp4_hwcsum(skb, ihdr->saddr, ihdr->daddr);
171 struct iphdr *ihdr;
193 ihdr = ip_hdr(skb);
195 ihdr = (struct iphdr *)(skb_network_header(skb) + 4);
198 if (ihdr->protocol != IPPROTO_TCP)
201 thdr = (struct tcphdr *)((u8 *)ihdr + 4 * ihdr->ihl);
207 if (ihdr->protocol != IPPROTO_UDP)
210 uhdr = (struct udphdr *)((u8 *)ihdr + 4 * ihdr->ihl);