Lines Matching defs:ip
55 #include <netinet/ip.h>
160 struct iphdr *ip = pay + sizeof(*eth);
171 for (i = 0; i < sizeof(*ip); ++i)
174 ip->ihl = 5;
175 ip->version = 4;
176 ip->protocol = 0x11;
177 ip->frag_off = 0;
178 ip->ttl = 64;
179 ip->tot_len = htons((uint16_t) *len - sizeof(*eth));
181 ip->saddr = htonl(INADDR_LOOPBACK);
182 ip->daddr = htonl(INADDR_LOOPBACK);
184 memset(pay + sizeof(*eth) + sizeof(*ip),