• 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 UNALIGNED_MEMCPY(&retval, &ip->ip_dst.s_addr, sizeof(u_int32_t)); in ip_finddst()
136 nextproto4_cksum(const struct ip *ip, const u_int8_t *data, in nextproto4_cksum() argument
152 UNALIGNED_MEMCPY(&ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t)); in nextproto4_cksum()
153 if (IP_HL(ip) == 5) in nextproto4_cksum()
154 UNALIGNED_MEMCPY(&ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t)); in nextproto4_cksum()
156 ph.dst = ip_finddst(ip); in nextproto4_cksum()
314 const struct ip *ip; member
344 (const u_char *)ipds->ip, in ip_print_demux()
367 sctp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len); in ip_print_demux()
371 dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len); in ip_print_demux()
376 tcp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
382 udp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
388 icmp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
406 igrp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
422 ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
468 ipaddr_string(&ipds->ip->ip_src), in ip_print_demux()
469 ipaddr_string(&ipds->ip->ip_dst)); in ip_print_demux()
470 carp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl); in ip_print_demux()
474 ipaddr_string(&ipds->ip->ip_src), in ip_print_demux()
475 ipaddr_string(&ipds->ip->ip_dst)); in ip_print_demux()
476 vrrp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl); in ip_print_demux()
481 pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
502 ipd.ip = (const struct ip *)bp2; in ip_print_inner()
529 ipds->ip = (const struct ip *)bp; in ip_print()
530 if (IP_V(ipds->ip) != 4) { /* print version if != 4 */ in ip_print()
531 printf("IP%u ", IP_V(ipds->ip)); in ip_print()
532 if (IP_V(ipds->ip) == 6) in ip_print()
538 if ((u_char *)(ipds->ip + 1) > ndo->ndo_snapend) { in ip_print()
542 if (length < sizeof (struct ip)) { in ip_print()
546 hlen = IP_HL(ipds->ip) * 4; in ip_print()
547 if (hlen < sizeof (struct ip)) { in ip_print()
552 ipds->len = EXTRACT_16BITS(&ipds->ip->ip_len); in ip_print()
581 ipds->off = EXTRACT_16BITS(&ipds->ip->ip_off); in ip_print()
584 (void)printf("(tos 0x%x", (int)ipds->ip->ip_tos); in ip_print()
586 if (ipds->ip->ip_tos & 0x03) { in ip_print()
587 switch (ipds->ip->ip_tos & 0x03) { in ip_print()
599 if (ipds->ip->ip_ttl >= 1) in ip_print()
600 (void)printf(", ttl %u", ipds->ip->ip_ttl); in ip_print()
609 EXTRACT_16BITS(&ipds->ip->ip_id), in ip_print()
612 tok2str(ipproto_values,"unknown",ipds->ip->ip_p), in ip_print()
613 ipds->ip->ip_p); in ip_print()
615 (void)printf(", length %u", EXTRACT_16BITS(&ipds->ip->ip_len)); in ip_print()
617 if ((hlen - sizeof(struct ip)) > 0) { in ip_print()
619 ip_optprint((u_char *)(ipds->ip + 1), hlen - sizeof(struct ip)); in ip_print()
623 if (!Kflag && (u_char *)ipds->ip + hlen <= ndo->ndo_snapend) { in ip_print()
624 vec[0].ptr = (const u_int8_t *)(void *)ipds->ip; in ip_print()
628 ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum); in ip_print()
642 ipds->cp = (const u_char *)ipds->ip + hlen; in ip_print()
643 ipds->nh = ipds->ip->ip_p; in ip_print()
648 ipaddr_string(&ipds->ip->ip_src), in ip_print()
649 ipaddr_string(&ipds->ip->ip_dst)); in ip_print()
662 (void)printf("%s > %s:", ipaddr_string(&ipds->ip->ip_src), in ip_print()
663 ipaddr_string(&ipds->ip->ip_dst)); in ip_print()
664 if (!ndo->ndo_nflag && (proto = getprotobynumber(ipds->ip->ip_p)) != NULL) in ip_print()
667 (void)printf(" ip-proto-%d", ipds->ip->ip_p); in ip_print()
675 struct ip hdr; in ipN_print()