Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/igmp_var.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
/* | /* | ||||
* IGMPv3 protocol statistics. | * IGMPv3 protocol statistics. | ||||
*/ | */ | ||||
struct igmpstat { | struct igmpstat { | ||||
/* | /* | ||||
* Structure header (to insulate ABI changes). | * Structure header (to insulate ABI changes). | ||||
* XXX: unset inside the kernel, exported via sysctl_igmp_stat(). | |||||
*/ | */ | ||||
uint32_t igps_version; /* version of this structure */ | uint32_t igps_version; /* version of this structure */ | ||||
uint32_t igps_len; /* length of this structure */ | uint32_t igps_len; /* length of this structure */ | ||||
/* | /* | ||||
* Message statistics. | * Message statistics. | ||||
*/ | */ | ||||
uint64_t igps_rcv_total; /* total IGMP messages received */ | uint64_t igps_rcv_total; /* total IGMP messages received */ | ||||
uint64_t igps_rcv_tooshort; /* received with too few bytes */ | uint64_t igps_rcv_tooshort; /* received with too few bytes */ | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | |||||
#define IGIF_LOOPBACK 0x00000002 /* Send IGMP reports to loopback */ | #define IGIF_LOOPBACK 0x00000002 /* Send IGMP reports to loopback */ | ||||
uint32_t igi_rv; /* IGMPv3 Robustness Variable */ | uint32_t igi_rv; /* IGMPv3 Robustness Variable */ | ||||
uint32_t igi_qi; /* IGMPv3 Query Interval (s) */ | uint32_t igi_qi; /* IGMPv3 Query Interval (s) */ | ||||
uint32_t igi_qri; /* IGMPv3 Query Response Interval (s) */ | uint32_t igi_qri; /* IGMPv3 Query Response Interval (s) */ | ||||
uint32_t igi_uri; /* IGMPv3 Unsolicited Report Interval (s) */ | uint32_t igi_uri; /* IGMPv3 Unsolicited Report Interval (s) */ | ||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#define IGMPSTAT_ADD(name, val) V_igmpstat.name += (val) | #include <sys/counter.h> | ||||
VNET_PCPUSTAT_DECLARE(struct igmpstat, igmpstat); | |||||
#define IGMPSTAT_ADD(name, val) \ | |||||
VNET_PCPUSTAT_ADD(struct igmpstat, igmpstat, name, (val)) | |||||
#define IGMPSTAT_INC(name) IGMPSTAT_ADD(name, 1) | #define IGMPSTAT_INC(name) IGMPSTAT_ADD(name, 1) | ||||
/* | /* | ||||
* Subsystem lock macros. | * Subsystem lock macros. | ||||
* The IGMP lock is only taken with IGMP. Currently it is system-wide. | * The IGMP lock is only taken with IGMP. Currently it is system-wide. | ||||
* VIMAGE: The lock could be pushed to per-VIMAGE granularity in future. | * VIMAGE: The lock could be pushed to per-VIMAGE granularity in future. | ||||
*/ | */ | ||||
#define IGMP_LOCK_INIT() mtx_init(&igmp_mtx, "igmp_mtx", NULL, MTX_DEF) | #define IGMP_LOCK_INIT() mtx_init(&igmp_mtx, "igmp_mtx", NULL, MTX_DEF) | ||||
#define IGMP_LOCK_DESTROY() mtx_destroy(&igmp_mtx) | #define IGMP_LOCK_DESTROY() mtx_destroy(&igmp_mtx) | ||||
Show All 36 Lines |