• Home
  • Raw
  • Download

Lines Matching refs:ip

91 ip_finddst(const struct ip *ip)  in ip_finddst()  argument
98 cp = (const u_char *)(ip + 1); in ip_finddst()
99 length = (IP_HL(ip) << 2) - sizeof(struct ip); in ip_finddst()
128 memcpy(&retval, &ip->ip_dst.s_addr, sizeof(u_int32_t)); in ip_finddst()
367 const struct ip *ip; member
396 (const u_char *)ipds->ip, in ip_print_demux()
419 sctp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len); in ip_print_demux()
423 dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len); in ip_print_demux()
428 tcp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
434 udp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
440 icmp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
458 igrp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
474 ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
515 vrrp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl); in ip_print_demux()
519 pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
540 ipd.ip = (const struct ip *)bp2; in ip_print_inner()
566 ipds->ip = (const struct ip *)bp; in ip_print()
567 if (IP_V(ipds->ip) != 4) { /* print version if != 4 */ in ip_print()
568 printf("IP%u ", IP_V(ipds->ip)); in ip_print()
569 if (IP_V(ipds->ip) == 6) in ip_print()
575 if ((u_char *)(ipds->ip + 1) > snapend) { in ip_print()
579 if (length < sizeof (struct ip)) { in ip_print()
583 hlen = IP_HL(ipds->ip) * 4; in ip_print()
584 if (hlen < sizeof (struct ip)) { in ip_print()
589 ipds->len = EXTRACT_16BITS(&ipds->ip->ip_len); in ip_print()
618 ipds->off = EXTRACT_16BITS(&ipds->ip->ip_off); in ip_print()
621 (void)printf("(tos 0x%x", (int)ipds->ip->ip_tos); in ip_print()
623 if (ipds->ip->ip_tos & 0x03) { in ip_print()
624 switch (ipds->ip->ip_tos & 0x03) { in ip_print()
636 if (ipds->ip->ip_ttl >= 1) in ip_print()
637 (void)printf(", ttl %u", ipds->ip->ip_ttl); in ip_print()
646 EXTRACT_16BITS(&ipds->ip->ip_id), in ip_print()
649 tok2str(ipproto_values,"unknown",ipds->ip->ip_p), in ip_print()
650 ipds->ip->ip_p); in ip_print()
652 (void)printf(", length %u", EXTRACT_16BITS(&ipds->ip->ip_len)); in ip_print()
654 if ((hlen - sizeof(struct ip)) > 0) { in ip_print()
656 ip_optprint((u_char *)(ipds->ip + 1), hlen - sizeof(struct ip)); in ip_print()
660 if ((u_char *)ipds->ip + hlen <= snapend) { in ip_print()
661 sum = in_cksum((const u_short *)ipds->ip, hlen, 0); in ip_print()
663 ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum); in ip_print()
677 ipds->cp = (const u_char *)ipds->ip + hlen; in ip_print()
678 ipds->nh = ipds->ip->ip_p; in ip_print()
683 ipaddr_string(&ipds->ip->ip_src), in ip_print()
684 ipaddr_string(&ipds->ip->ip_dst)); in ip_print()
697 (void)printf("%s > %s:", ipaddr_string(&ipds->ip->ip_src), in ip_print()
698 ipaddr_string(&ipds->ip->ip_dst)); in ip_print()
699 if ((proto = getprotobynumber(ipds->ip->ip_p)) != NULL) in ip_print()
702 (void)printf(" ip-proto-%d", ipds->ip->ip_p); in ip_print()
710 struct ip *ip, hdr; in ipN_print() local
712 ip = (struct ip *)bp; in ipN_print()
717 memcpy (&hdr, (char *)ip, 4); in ipN_print()