Lines Matching refs:ip

23  * traceroute host  - trace the route ip packets follow going to "host".
25 * Attempt to trace the route an ip packet would follow to some
31 * defaults to net.inet.ip.ttl hops & can be changed with the -m flag).
146 * system available from Berkeley: A raw ip socket using proto
147 * IPPROTO_RAW must interpret the data sent as an ip datagram (as
148 * opposed to data to be wrapped in an ip datagram). See the README
159 * udp header (the ip id could be used but there's no way to
160 * interlock with the kernel's assignment of ip id's and, anyway,
162 * code to set the ip id). So, to allow two or more users to
210 #include <netinet/ip.h>
307 struct ip *outip; /* last output ip packet */
310 struct ip *hip = NULL; /* Quoted IP header */
323 int minpacket; /* min ip packet size */
324 int maxpacket = 32 * 1024; /* max ip packet size */
348 int doipcksum = 0; /* don't calculate ip checksums by default */
350 int doipcksum = 1; /* calculate ip checksums by default */
352 int optlen; /* length of ip options */
374 u_short p_cksum(struct ip *, u_short *, int, int);
571 perror("sysctl(net.inet.ip.ttl)");
675 * set the ip source address of the outbound
726 Fprintf(stderr, "%s: Warning: ip checksums disabled\n", prog);
772 outip = (struct ip *)malloc((unsigned)packlen);
1042 register struct ip *ip;
1121 ip = (struct ip *)packet;
1122 if (ip->ip_ttl <= 1)
1136 ip = (struct ip *)packet;
1137 if (ip->ip_ttl <= 1)
1397 register struct ip *ip;
1399 ip = (struct ip *) buf;
1400 hlen = ip->ip_hl << 2;
1444 inet_ntoa(ip->ip_dst), type, pr_type(type), icp->icmp_code);
1693 register struct ip *ip;
1697 ip = (struct ip *) buf;
1698 hlen = ip->ip_hl << 2;
1712 Printf(" %d bytes to %s", cc, inet_ntoa(ip->ip_dst));
1719 p_cksum(struct ip *ip, u_short *data, int len, int cov)
1724 ipo.ih_pr = ip->ip_p;
1726 ipo.ih_src = ip->ip_src;
1727 ipo.ih_dst = ip->ip_dst;
1729 sum[1] = in_cksum((u_short *)&ipo, sizeof(ipo)); /* pseudo ip hdr cksum */