Lines Matching refs:iph
119 struct iphdr *iph = header; in build_ipv4_header() local
121 iph->ihl = 5; in build_ipv4_header()
122 iph->version = 4; in build_ipv4_header()
123 iph->ttl = 8; in build_ipv4_header()
124 iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len); in build_ipv4_header()
125 iph->id = htons(1337); in build_ipv4_header()
126 iph->protocol = IPPROTO_UDP; in build_ipv4_header()
127 iph->saddr = htonl((172 << 24) | (17 << 16) | 2); in build_ipv4_header()
128 iph->daddr = htonl((172 << 24) | (17 << 16) | 1); in build_ipv4_header()
129 iph->check = build_ip_csum((void *) iph, iph->ihl << 1, 0); in build_ipv4_header()
131 return iph->ihl << 2; in build_ipv4_header()