Lines Matching defs:ip
63 #include <netinet/ip.h>
100 static void pr_iph(struct iphdr *ip);
709 * Compose and transmit an ICMP ECHO REQUEST packet. The IP packet
785 struct iphdr *ip;
793 /* Check the IP header */
794 ip = (struct iphdr *)buf;
796 hlen = ip->ihl*4;
797 if (cc < hlen + 8 || ip->ihl < 5) {
803 ttl = ip->ttl;
1281 * Print an IP header with options.
1283 void pr_iph(struct iphdr *ip)
1288 hlen = ip->ihl << 2;
1289 cp = (u_char *)ip + 20; /* point to options */
1293 ip->version, ip->ihl, ip->tos, ip->tot_len, ip->id);
1294 printf(" %1x %04x", ((ip->frag_off) & 0xe000) >> 13,
1295 (ip->frag_off) & 0x1fff);
1296 printf(" %02x %02x %04x", ip->ttl, ip->protocol, ip->check);
1297 printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->saddr));
1298 ip->daddr));
1373 BPF_STMT(BPF_LDX|BPF_B|BPF_MSH, 0), /* Skip IP header. F..g BSD... Look into ping6. */