Lines Matching refs:ip
55 #include <netinet/ip.h>
78 #define L3HDR(T, ip) ((T *)((u_int32_t *)(ip) + (ip)->ip_hl))
103 u_short offset, uint32_t tablearg, struct ip *ip)
116 if (ip->ip_v == 4)
119 else if (ip->ip_v == 6)
284 if (hlen == 0) { /* non-ip */
315 ip6 = (struct ip6_hdr *)ip;
316 tcp = (struct tcphdr *)(((char *)ip) + hlen);
317 udp = (struct udphdr *)(((char *)ip) + hlen);
321 tcp = L3HDR(struct tcphdr, ip);
322 udp = L3HDR(struct udphdr, ip);
324 inet_ntop(AF_INET, &ip->ip_src, src, sizeof(src));
325 inet_ntop(AF_INET, &ip->ip_dst, dst, sizeof(dst));
355 icmp = L3HDR(struct icmphdr, ip);
367 icmp6 = (struct icmp6_hdr *)(((char *)ip) + hlen);
397 ipoff = ntohs(ip->ip_off);
398 iplen = ntohs(ip->ip_len);
402 ntohs(ip->ip_id), iplen - (ip->ip_hl << 2),