• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/tcpdump-4.4.0/

Lines Matching refs:ipds

323 	       struct ip_print_demux_state *ipds)
329 switch (ipds->nh) {
332 ipds->nh = *ipds->cp;
333 ipds->advance = ah_print(ipds->cp);
334 if (ipds->advance <= 0)
336 ipds->cp += ipds->advance;
337 ipds->len -= ipds->advance;
343 ipds->advance = esp_print(ndo, ipds->cp, ipds->len,
344 (const u_char *)ipds->ip,
346 if (ipds->advance <= 0)
348 ipds->cp += ipds->advance;
349 ipds->len -= ipds->advance + padlen;
350 ipds->nh = enh & 0xff;
357 ipds->advance = ipcomp_print(ipds->cp, &enh);
358 if (ipds->advance <= 0)
360 ipds->cp += ipds->advance;
361 ipds->len -= ipds->advance;
362 ipds->nh = enh & 0xff;
367 sctp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
371 dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
376 tcp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
377 ipds->off & (IP_MF|IP_OFFMASK));
382 udp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
383 ipds->off & (IP_MF|IP_OFFMASK));
388 icmp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
389 ipds->off & (IP_MF|IP_OFFMASK));
406 igrp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
410 eigrp_print(ipds->cp, ipds->len);
414 ND_PRINT((ndo, " nd %d", ipds->len));
418 egp_print(ipds->cp, ipds->len);
422 ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
426 igmp_print(ipds->cp, ipds->len);
431 ip_print(ndo, ipds->cp, ipds->len);
441 ip6_print(ndo, ipds->cp, ipds->len);
446 rsvp_print(ipds->cp, ipds->len);
451 gre_print(ipds->cp, ipds->len);
455 mobile_print(ipds->cp, ipds->len);
459 vec[0].ptr = ipds->cp;
460 vec[0].len = ipds->len;
461 pim_print(ipds->cp, ipds->len, in_cksum(vec, 1));
468 ipaddr_string(&ipds->ip->ip_src),
469 ipaddr_string(&ipds->ip->ip_dst));
470 carp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
474 ipaddr_string(&ipds->ip->ip_src),
475 ipaddr_string(&ipds->ip->ip_dst));
476 vrrp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
481 pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
485 if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) != NULL)
488 ND_PRINT((ndo, " ip-proto-%d", ipds->nh));
489 ND_PRINT((ndo, " %d", ipds->len));
522 struct ip_print_demux_state *ipds=&ipd;
529 ipds->ip = (const struct ip *)bp;
530 if (IP_V(ipds->ip) != 4) { /* print version if != 4 */
531 printf("IP%u ", IP_V(ipds->ip));
532 if (IP_V(ipds->ip) == 6)
538 if ((u_char *)(ipds->ip + 1) > ndo->ndo_snapend) {
546 hlen = IP_HL(ipds->ip) * 4;
552 ipds->len = EXTRACT_16BITS(&ipds->ip->ip_len);
553 if (length < ipds->len)
555 ipds->len - length);
556 if (ipds->len < hlen) {
558 if (ipds->len) {
559 (void)printf("bad-len %u", ipds->len);
564 ipds->len = length;
567 (void)printf("bad-len %u", ipds->len);
575 ipend = bp + ipds->len;
579 ipds->len -= hlen;
581 ipds->off = EXTRACT_16BITS(&ipds->ip->ip_off);
584 (void)printf("(tos 0x%x", (int)ipds->ip->ip_tos);
586 if (ipds->ip->ip_tos & 0x03) {
587 switch (ipds->ip->ip_tos & 0x03) {
599 if (ipds->ip->ip_ttl >= 1)
600 (void)printf(", ttl %u", ipds->ip->ip_ttl);
609 EXTRACT_16BITS(&ipds->ip->ip_id),
610 (ipds->off & 0x1fff) * 8,
611 bittok2str(ip_frag_values, "none", ipds->off&0xe000),
612 tok2str(ipproto_values,"unknown",ipds->ip->ip_p),
613 ipds->ip->ip_p);
615 (void)printf(", length %u", EXTRACT_16BITS(&ipds->ip->ip_len));
619 ip_optprint((u_char *)(ipds->ip + 1), hlen - sizeof(struct ip));
623 if (!Kflag && (u_char *)ipds->ip + hlen <= ndo->ndo_snapend) {
624 vec[0].ptr = (const u_int8_t *)(void *)ipds->ip;
628 ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum);
641 if ((ipds->off & 0x1fff) == 0) {
642 ipds->cp = (const u_char *)ipds->ip + hlen;
643 ipds->nh = ipds->ip->ip_p;
645 if (ipds->nh != IPPROTO_TCP && ipds->nh != IPPROTO_UDP &&
646 ipds->nh != IPPROTO_SCTP && ipds->nh != IPPROTO_DCCP) {
648 ipaddr_string(&ipds->ip->ip_src),
649 ipaddr_string(&ipds->ip->ip_dst));
651 ip_print_demux(ndo, ipds);
661 if (ipds->off & 0x1fff) {
662 (void)printf("%s > %s:", ipaddr_string(&ipds->ip->ip_src),
663 ipaddr_string(&ipds->ip->ip_dst));
664 if (!ndo->ndo_nflag && (proto = getprotobynumber(ipds->ip->ip_p)) != NULL)
667 (void)printf(" ip-proto-%d", ipds->ip->ip_p);