Lines Matching defs:ip
49 #include "ip.h"
140 u_int *ip = (u_int *)hdr;
147 ip += 2;
165 ip += 1;
181 i2 = ip[0];
187 ip += optlen;
193 i2 = ip[0];
199 ip += extlen;
202 printf(" 0x%04x", ip[0] >> 16);
287 static int udp_cksum(register const struct ip *ip,
307 memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
308 if (IP_HL(ip) == 5)
309 memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));
311 phu.ph.dst = ip_finddst(ip);
364 udpipaddr_print(const struct ip *ip, int sport, int dport)
369 if (IP_V(ip) == 6)
370 ip6 = (const struct ip6_hdr *)ip;
397 if (ip->ip_p == IPPROTO_UDP) {
400 ipaddr_string(&ip->ip_src),
401 ipaddr_string(&ip->ip_dst));
404 ipaddr_string(&ip->ip_src),
406 ipaddr_string(&ip->ip_dst),
424 register const struct ip *ip;
435 ip = (struct ip *)bp2;
437 if (IP_V(ip) == 6)
444 udpipaddr_print(ip, -1, -1);
453 udpipaddr_print(ip, sport, dport);
460 udpipaddr_print(ip, sport, dport);
467 udpipaddr_print(ip, sport, dport);
478 udpipaddr_print(ip, sport, dport);
483 udpipaddr_print(ip, sport, dport);
492 (u_char *)ip);
495 (u_char *)ip); /*XXX*/
499 udpipaddr_print(ip, sport, dport);
504 udpipaddr_print(ip, sport, dport);
510 udpipaddr_print(ip, sport, dport);
515 udpipaddr_print(ip, sport, dport);
516 cnfp_print(cp, (const u_char *)ip);
520 udpipaddr_print(ip, sport, dport);
525 udpipaddr_print(ip, sport, dport);
546 (u_char *)ip);
551 (u_char *)ip);
556 sunrpcrequest_print((u_char *)rp, length, (u_char *)ip);
570 udpipaddr_print(ip, sport, dport);
572 if (IP_V(ip) == 4 && (vflag > 1) && !fragmented) {
577 sum = udp_cksum(ip, up, length + sizeof(struct udphdr));
585 if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !fragmented) {
652 (u_char *) ip);