icmp6.h (4f96be33fe7676c69c5abb476bb09bba0c63a3f4) | icmp6.h (60d8dbbef075d3b39891ed35e124d0f7ef8e5fb9) |
---|---|
1/* $KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $ */ 2 3/*- 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 7 * All rights reserved. 8 * --- 558 unchanged lines hidden (view full) --- 567 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) 568#define ICMP6_FILTER_WILLBLOCK(type, filterp) \ 569 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) 570 571/* 572 * Variables related to this implementation 573 * of the internet control message protocol version 6. 574 */ | 1/* $KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $ */ 2 3/*- 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 7 * All rights reserved. 8 * --- 558 unchanged lines hidden (view full) --- 567 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) 568#define ICMP6_FILTER_WILLBLOCK(type, filterp) \ 569 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) 570 571/* 572 * Variables related to this implementation 573 * of the internet control message protocol version 6. 574 */ |
575struct icmp6errstat { 576 uint64_t icp6errs_dst_unreach_noroute; 577 uint64_t icp6errs_dst_unreach_admin; 578 uint64_t icp6errs_dst_unreach_beyondscope; 579 uint64_t icp6errs_dst_unreach_addr; 580 uint64_t icp6errs_dst_unreach_noport; 581 uint64_t icp6errs_packet_too_big; 582 uint64_t icp6errs_time_exceed_transit; 583 uint64_t icp6errs_time_exceed_reassembly; 584 uint64_t icp6errs_paramprob_header; 585 uint64_t icp6errs_paramprob_nextheader; 586 uint64_t icp6errs_paramprob_option; 587 uint64_t icp6errs_redirect; /* we regard redirect as an error here */ 588 uint64_t icp6errs_unknown; 589}; 590 | |
591struct icmp6stat { 592/* statistics related to icmp6 packets generated */ 593 uint64_t icp6s_error; /* # of calls to icmp6_error */ 594 uint64_t icp6s_canterror; /* no error 'cuz old was icmp */ 595 uint64_t icp6s_toofreq; /* no error 'cuz rate limitation */ 596 uint64_t icp6s_outhist[256]; 597/* statistics related to input message processed */ 598 uint64_t icp6s_badcode; /* icmp6_code out of range */ 599 uint64_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */ 600 uint64_t icp6s_checksum; /* bad checksum */ 601 uint64_t icp6s_badlen; /* calculated bound mismatch */ 602 uint64_t icp6s_dropped; /* # of packets dropped waiting for a resolution */ 603 /* 604 * number of responses: this member is inherited from netinet code, but 605 * for netinet6 code, it is already available in icp6s_outhist[]. 606 */ 607 uint64_t icp6s_reflect; 608 uint64_t icp6s_inhist[256]; 609 uint64_t icp6s_nd_toomanyopt; /* too many ND options */ | 575struct icmp6stat { 576/* statistics related to icmp6 packets generated */ 577 uint64_t icp6s_error; /* # of calls to icmp6_error */ 578 uint64_t icp6s_canterror; /* no error 'cuz old was icmp */ 579 uint64_t icp6s_toofreq; /* no error 'cuz rate limitation */ 580 uint64_t icp6s_outhist[256]; 581/* statistics related to input message processed */ 582 uint64_t icp6s_badcode; /* icmp6_code out of range */ 583 uint64_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */ 584 uint64_t icp6s_checksum; /* bad checksum */ 585 uint64_t icp6s_badlen; /* calculated bound mismatch */ 586 uint64_t icp6s_dropped; /* # of packets dropped waiting for a resolution */ 587 /* 588 * number of responses: this member is inherited from netinet code, but 589 * for netinet6 code, it is already available in icp6s_outhist[]. 590 */ 591 uint64_t icp6s_reflect; 592 uint64_t icp6s_inhist[256]; 593 uint64_t icp6s_nd_toomanyopt; /* too many ND options */ |
610 struct icmp6errstat icp6s_outerrhist; 611#define icp6s_odst_unreach_noroute \ 612 icp6s_outerrhist.icp6errs_dst_unreach_noroute 613#define icp6s_odst_unreach_admin icp6s_outerrhist.icp6errs_dst_unreach_admin 614#define icp6s_odst_unreach_beyondscope \ 615 icp6s_outerrhist.icp6errs_dst_unreach_beyondscope 616#define icp6s_odst_unreach_addr icp6s_outerrhist.icp6errs_dst_unreach_addr 617#define icp6s_odst_unreach_noport icp6s_outerrhist.icp6errs_dst_unreach_noport 618#define icp6s_opacket_too_big icp6s_outerrhist.icp6errs_packet_too_big 619#define icp6s_otime_exceed_transit \ 620 icp6s_outerrhist.icp6errs_time_exceed_transit 621#define icp6s_otime_exceed_reassembly \ 622 icp6s_outerrhist.icp6errs_time_exceed_reassembly 623#define icp6s_oparamprob_header icp6s_outerrhist.icp6errs_paramprob_header 624#define icp6s_oparamprob_nextheader \ 625 icp6s_outerrhist.icp6errs_paramprob_nextheader 626#define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option 627#define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect 628#define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown | 594 uint64_t icp6s_odst_unreach_noroute; 595 uint64_t icp6s_odst_unreach_admin; 596 uint64_t icp6s_odst_unreach_beyondscope; 597 uint64_t icp6s_odst_unreach_addr; 598 uint64_t icp6s_odst_unreach_noport; 599 uint64_t icp6s_opacket_too_big; 600 uint64_t icp6s_otime_exceed_transit; 601 uint64_t icp6s_otime_exceed_reassembly; 602 uint64_t icp6s_oparamprob_header; 603 uint64_t icp6s_oparamprob_nextheader; 604 uint64_t icp6s_oparamprob_option; 605 uint64_t icp6s_oredirect; 606 uint64_t icp6s_ounknown; |
629 uint64_t icp6s_pmtuchg; /* path MTU changes */ 630 uint64_t icp6s_nd_badopt; /* bad ND options */ 631 uint64_t icp6s_badns; /* bad neighbor solicitation */ 632 uint64_t icp6s_badna; /* bad neighbor advertisement */ 633 uint64_t icp6s_badrs; /* bad router solicitation */ 634 uint64_t icp6s_badra; /* bad router advertisement */ 635 uint64_t icp6s_badredirect; /* bad redirect message */ 636 uint64_t icp6s_overflowdefrtr; /* Too many default routers. */ 637 uint64_t icp6s_overflowprfx; /* Too many prefixes. */ 638 uint64_t icp6s_overflownndp; /* Too many neighbour entries. */ 639 uint64_t icp6s_overflowredirect;/* Too many redirects. */ 640 uint64_t icp6s_invlhlim; /* Invalid hop limit. */ 641 uint64_t icp6s_spare[32]; 642}; 643 644#ifdef _KERNEL 645#include <sys/counter.h> | 607 uint64_t icp6s_pmtuchg; /* path MTU changes */ 608 uint64_t icp6s_nd_badopt; /* bad ND options */ 609 uint64_t icp6s_badns; /* bad neighbor solicitation */ 610 uint64_t icp6s_badna; /* bad neighbor advertisement */ 611 uint64_t icp6s_badrs; /* bad router solicitation */ 612 uint64_t icp6s_badra; /* bad router advertisement */ 613 uint64_t icp6s_badredirect; /* bad redirect message */ 614 uint64_t icp6s_overflowdefrtr; /* Too many default routers. */ 615 uint64_t icp6s_overflowprfx; /* Too many prefixes. */ 616 uint64_t icp6s_overflownndp; /* Too many neighbour entries. */ 617 uint64_t icp6s_overflowredirect;/* Too many redirects. */ 618 uint64_t icp6s_invlhlim; /* Invalid hop limit. */ 619 uint64_t icp6s_spare[32]; 620}; 621 622#ifdef _KERNEL 623#include <sys/counter.h> |
624#include <netinet/in_kdtrace.h> |
|
646 647#ifdef SYSCTL_DECL 648SYSCTL_DECL(_net_inet6_icmp6); 649#endif 650 651VNET_PCPUSTAT_DECLARE(struct icmp6stat, icmp6stat); 652/* 653 * In-kernel consumers can use these accessor macros directly to update 654 * stats. 655 */ | 625 626#ifdef SYSCTL_DECL 627SYSCTL_DECL(_net_inet6_icmp6); 628#endif 629 630VNET_PCPUSTAT_DECLARE(struct icmp6stat, icmp6stat); 631/* 632 * In-kernel consumers can use these accessor macros directly to update 633 * stats. 634 */ |
656#define ICMP6STAT_ADD(name, val) \ 657 VNET_PCPUSTAT_ADD(struct icmp6stat, icmp6stat, name, (val)) 658#define ICMP6STAT_INC(name) ICMP6STAT_ADD(name, 1) | 635#define ICMP6STAT_ADD(name, val) \ 636 do { \ 637 MIB_SDT_PROBE1(icmp6, count, name, (val)); \ 638 VNET_PCPUSTAT_ADD(struct icmp6stat, icmp6stat, name, (val)); \ 639 } while (0) 640#define ICMP6STAT_INC(name) ICMP6STAT_ADD(name, 1) 641#define ICMP6STAT_INC2(name, type) \ 642 do { \ 643 MIB_SDT_PROBE2(icmp6, count, name, 1, type); \ 644 VNET_PCPUSTAT_ADD(struct icmp6stat, icmp6stat, name, 1); \ 645 } while (0) |
659 660/* 661 * Kernel module consumers must use this accessor macro. 662 */ 663void kmod_icmp6stat_inc(int statnum); | 646 647/* 648 * Kernel module consumers must use this accessor macro. 649 */ 650void kmod_icmp6stat_inc(int statnum); |
664#define KMOD_ICMP6STAT_INC(name) \ 665 kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(uint64_t)) | 651#define KMOD_ICMP6STAT_INC(name) \ 652 do { \ 653 MIB_SDT_PROBE1(icmp6, count, name, 1); \ 654 kmod_icmp6stat_inc( \ 655 offsetof(struct icmp6stat, name) / sizeof(uint64_t)); \ 656 } while (0) |
666#endif 667 668/* 669 * Names for ICMP sysctl objects 670 */ 671#define ICMPV6CTL_STATS 1 672#define ICMPV6CTL_REDIRACCEPT 2 /* accept/process redirects */ 673#define ICMPV6CTL_REDIRTIMEOUT 3 /* redirect cache time */ --- 112 unchanged lines hidden --- | 657#endif 658 659/* 660 * Names for ICMP sysctl objects 661 */ 662#define ICMPV6CTL_STATS 1 663#define ICMPV6CTL_REDIRACCEPT 2 /* accept/process redirects */ 664#define ICMPV6CTL_REDIRTIMEOUT 3 /* redirect cache time */ --- 112 unchanged lines hidden --- |