Lines Matching refs:ihdr
62 struct iphdr *ihdr;
85 ihdr = skb_put(skb, sizeof(*ihdr));
113 (sizeof(*ihdr) + sizeof(*ehdr)));
117 ihdr->ihl = 5;
118 ihdr->ttl = 32;
119 ihdr->version = 4;
121 ihdr->protocol = IPPROTO_TCP;
123 ihdr->protocol = IPPROTO_UDP;
124 iplen = sizeof(*ihdr) + sizeof(*shdr) + attr->size;
133 ihdr->tot_len = htons(iplen);
134 ihdr->frag_off = 0;
135 ihdr->saddr = htonl(attr->ip_src);
136 ihdr->daddr = htonl(attr->ip_dst);
137 ihdr->tos = 0;
138 ihdr->id = 0;
139 ip_send_check(ihdr);
155 thdr->check = ~tcp_v4_check(skb->len, ihdr->saddr,
156 ihdr->daddr, 0);
160 udp4_hwcsum(skb, ihdr->saddr, ihdr->daddr);
182 struct iphdr *ihdr;
204 ihdr = ip_hdr(skb);
206 ihdr = (struct iphdr *)(skb_network_header(skb) + 4);
209 if (ihdr->protocol != IPPROTO_TCP)
212 thdr = (struct tcphdr *)((u8 *)ihdr + 4 * ihdr->ihl);
218 if (ihdr->protocol != IPPROTO_UDP)
221 uhdr = (struct udphdr *)((u8 *)ihdr + 4 * ihdr->ihl);