Lines Matching defs:iph
266 struct iphdr *iph = (struct iphdr *)buf;
268 iph->ihl = 5;
269 iph->version = 4;
270 iph->ttl = 8;
271 iph->tot_len =
272 htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len);
273 iph->id = htons(1337);
274 iph->protocol = IPPROTO_UDP;
275 iph->saddr = htonl((172 << 24) | (17 << 16) | 2);
276 iph->daddr = htonl((172 << 24) | (17 << 16) | 1);
277 iph->check = build_ip_csum(buf, iph->ihl << 2, 0);
279 return iph->ihl << 2;