• Home
  • Raw
  • Download

Lines Matching refs:ip

90            const struct ip *ip)  in ip_finddst()  argument
97 cp = (const u_char *)(ip + 1); in ip_finddst()
98 length = (IP_HL(ip) << 2) - sizeof(struct ip); in ip_finddst()
127 UNALIGNED_MEMCPY(&retval, &ip->ip_dst, sizeof(uint32_t)); in ip_finddst()
136 const struct ip *ip, const uint8_t *data, in nextproto4_cksum() argument
152 UNALIGNED_MEMCPY(&ph.src, &ip->ip_src, sizeof(uint32_t)); in nextproto4_cksum()
153 if (IP_HL(ip) == 5) in nextproto4_cksum()
154 UNALIGNED_MEMCPY(&ph.dst, &ip->ip_dst, sizeof(uint32_t)); in nextproto4_cksum()
156 ph.dst = ip_finddst(ndo, ip); in nextproto4_cksum()
316 const struct ip *ip; member
349 (const u_char *)ipds->ip, in ip_print_demux()
372 sctp_print(ndo, ipds->cp, (const u_char *)ipds->ip, ipds->len); in ip_print_demux()
376 dccp_print(ndo, ipds->cp, (const u_char *)ipds->ip, ipds->len); in ip_print_demux()
381 tcp_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
387 udp_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
393 icmp_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip, in ip_print_demux()
427 ospf_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
462 pim_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
469 ipaddr_string(ndo, &ipds->ip->ip_src), in ip_print_demux()
470 ipaddr_string(ndo, &ipds->ip->ip_dst))); in ip_print_demux()
471 carp_print(ndo, ipds->cp, ipds->len, ipds->ip->ip_ttl); in ip_print_demux()
475 ipaddr_string(ndo, &ipds->ip->ip_src), in ip_print_demux()
476 ipaddr_string(ndo, &ipds->ip->ip_dst))); in ip_print_demux()
478 (const u_char *)ipds->ip, ipds->ip->ip_ttl); in ip_print_demux()
483 pgm_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); in ip_print_demux()
504 ipd.ip = (const struct ip *)bp2; in ip_print_inner()
531 ipds->ip = (const struct ip *)bp; in ip_print()
532 ND_TCHECK(ipds->ip->ip_vhl); in ip_print()
533 if (IP_V(ipds->ip) != 4) { /* print version and fail if != 4 */ in ip_print()
534 if (IP_V(ipds->ip) == 6) in ip_print()
537 ND_PRINT((ndo, "IP%u ", IP_V(ipds->ip))); in ip_print()
543 ND_TCHECK(*ipds->ip); in ip_print()
544 if (length < sizeof (struct ip)) { in ip_print()
548 hlen = IP_HL(ipds->ip) * 4; in ip_print()
549 if (hlen < sizeof (struct ip)) { in ip_print()
554 ipds->len = EXTRACT_16BITS(&ipds->ip->ip_len); in ip_print()
583 ipds->off = EXTRACT_16BITS(&ipds->ip->ip_off); in ip_print()
586 ND_PRINT((ndo, "(tos 0x%x", (int)ipds->ip->ip_tos)); in ip_print()
588 switch (ipds->ip->ip_tos & 0x03) { in ip_print()
606 if (ipds->ip->ip_ttl >= 1) in ip_print()
607 ND_PRINT((ndo, ", ttl %u", ipds->ip->ip_ttl)); in ip_print()
616 EXTRACT_16BITS(&ipds->ip->ip_id), in ip_print()
619 tok2str(ipproto_values,"unknown",ipds->ip->ip_p), in ip_print()
620 ipds->ip->ip_p)); in ip_print()
622 ND_PRINT((ndo, ", length %u", EXTRACT_16BITS(&ipds->ip->ip_len))); in ip_print()
624 if ((hlen - sizeof(struct ip)) > 0) { in ip_print()
626 ip_optprint(ndo, (const u_char *)(ipds->ip + 1), hlen - sizeof(struct ip)); in ip_print()
630 if (!ndo->ndo_Kflag && (const u_char *)ipds->ip + hlen <= ndo->ndo_snapend) { in ip_print()
631 vec[0].ptr = (const uint8_t *)(const void *)ipds->ip; in ip_print()
635 ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum); in ip_print()
649 ipds->cp = (const u_char *)ipds->ip + hlen; in ip_print()
650 ipds->nh = ipds->ip->ip_p; in ip_print()
655 ipaddr_string(ndo, &ipds->ip->ip_src), in ip_print()
656 ipaddr_string(ndo, &ipds->ip->ip_dst))); in ip_print()
672 ND_PRINT((ndo, "%s > %s:", ipaddr_string(ndo, &ipds->ip->ip_src), in ip_print()
673 ipaddr_string(ndo, &ipds->ip->ip_dst))); in ip_print()
674 if (!ndo->ndo_nflag && (proto = getprotobynumber(ipds->ip->ip_p)) != NULL) in ip_print()
677 ND_PRINT((ndo, " ip-proto-%d", ipds->ip->ip_p)); in ip_print()