Home | History | Annotate | Download | only in libnpftest

Lines Matching defs:iphdr

171 	struct ip *iphdr;
176 iphdr = mtod(m, struct ip *);
178 iphdr->ip_v = IPVERSION;
179 iphdr->ip_hl = sizeof(struct ip) >> 2;
180 iphdr->ip_off = 0;
181 iphdr->ip_ttl = 64;
182 iphdr->ip_p = proto;
185 l4data = (void *)(iphdr + 1);
187 iphdr->ip_len = htons(size);
224 struct ip *iphdr;
228 iphdr = mtod(mn, struct ip *);
230 iphdr = mtod(m, struct ip *);
232 *ip = iphdr;
233 return (void *)(iphdr + 1);
248 struct ip *iphdr = mtod(m, struct ip *);
249 const size_t hlen = iphdr->ip_hl << 2;
250 void *p = (uint8_t *)iphdr + hlen;
254 iphdr->ip_len = htons(ntohs(iphdr->ip_len) + addlen);