Lines Matching defs:ip
86 #include <netinet/ip.h>
198 struct ip *ip;
205 ip = mtod(m, struct ip *);
208 (u_int32_t)ntohl(ip->ip_src.s_addr),
209 (u_int32_t)ntohl(ip->ip_dst.s_addr),
242 ip = mtod(m, struct ip *);
244 hlen = IP_VHL_HL(ip->ip_vhl) << 2;
246 hlen = ip->ip_hl << 2;
272 ip = mtod(m, struct ip *); /*just to be sure*/
283 ahdr->ah_nxt = ip->ip_p;
293 ahdr->ah_nxt = ip->ip_p;
321 ip->ip_p = IPPROTO_AH;
322 if (ahlen < (IP_MAXPACKET - ntohs(ip->ip_len)))
323 ip->ip_len = htons(ntohs(ip->ip_len) + ahlen);
340 dst.s_addr = ip->ip_dst.s_addr;
341 ip->ip_dst.s_addr = finaldst->s_addr;
359 ip = mtod(m, struct ip *); /*just to make sure*/
360 ip->ip_dst.s_addr = dst.s_addr;
553 * The mbuf must be pulled up toward, at least, ip option part.
559 struct ip *ip;
567 ip = mtod(m, struct ip *);
569 hlen = IP_VHL_HL(ip->ip_vhl) << 2;
571 hlen = ip->ip_hl << 2;
580 if (hlen == sizeof(struct ip))
583 optlen = hlen - sizeof(struct ip);
590 q = (u_char *)(ip + 1);