icmp_var.h (29363fb446372cb3f10bc98664e9767c53fbb457) | icmp_var.h (60d8dbbef075d3b39891ed35e124d0f7ef8e5fb9) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1982, 1986, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 43 unchanged lines hidden (view full) --- 52 u_long icps_bmcastecho; /* b/mcast echo requests dropped */ 53 u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */ 54 u_long icps_badaddr; /* bad return address */ 55 u_long icps_noroute; /* no route back */ 56}; 57 58#ifdef _KERNEL 59#include <sys/counter.h> | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1982, 1986, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 43 unchanged lines hidden (view full) --- 52 u_long icps_bmcastecho; /* b/mcast echo requests dropped */ 53 u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */ 54 u_long icps_badaddr; /* bad return address */ 55 u_long icps_noroute; /* no route back */ 56}; 57 58#ifdef _KERNEL 59#include <sys/counter.h> |
60#include <netinet/in_kdtrace.h> |
|
60 61VNET_PCPUSTAT_DECLARE(struct icmpstat, icmpstat); 62/* 63 * In-kernel consumers can use these accessor macros directly to update 64 * stats. 65 */ | 61 62VNET_PCPUSTAT_DECLARE(struct icmpstat, icmpstat); 63/* 64 * In-kernel consumers can use these accessor macros directly to update 65 * stats. 66 */ |
66#define ICMPSTAT_ADD(name, val) \ 67 VNET_PCPUSTAT_ADD(struct icmpstat, icmpstat, name, (val)) | 67#define ICMPSTAT_ADD(name, val) \ 68 do { \ 69 MIB_SDT_PROBE1(icmp, count, name, (val)); \ 70 VNET_PCPUSTAT_ADD(struct icmpstat, icmpstat, name, (val)); \ 71 } while (0) 72 |
68#define ICMPSTAT_INC(name) ICMPSTAT_ADD(name, 1) | 73#define ICMPSTAT_INC(name) ICMPSTAT_ADD(name, 1) |
74#define ICMPSTAT_INC2(name, type) \ 75 do { \ 76 MIB_SDT_PROBE2(icmp, count, name, 1, type); \ 77 VNET_PCPUSTAT_ADD(struct icmpstat, icmpstat, name[type], 1); \ 78 } while (0) |
|
69 70/* 71 * Kernel module consumers must use this accessor macro. 72 */ 73void kmod_icmpstat_inc(int statnum); | 79 80/* 81 * Kernel module consumers must use this accessor macro. 82 */ 83void kmod_icmpstat_inc(int statnum); |
74#define KMOD_ICMPSTAT_INC(name) \ 75 kmod_icmpstat_inc(offsetof(struct icmpstat, name) / sizeof(uint64_t)) | 84#define KMOD_ICMPSTAT_INC(name) \ 85 do { \ 86 MIB_SDT_PROBE1(icmp, count, name, 1); \ 87 kmod_icmpstat_inc( \ 88 offsetof(struct icmpstat, name) / sizeof(uint64_t)); \ 89 } while (0) |
76#endif 77 78/* 79 * Identifiers for ICMP sysctl nodes 80 */ 81#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */ 82#define ICMPCTL_STATS 2 /* statistics (read-only) */ 83#define ICMPCTL_ICMPLIM 3 --- 17 unchanged lines hidden --- | 90#endif 91 92/* 93 * Identifiers for ICMP sysctl nodes 94 */ 95#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */ 96#define ICMPCTL_STATS 2 /* statistics (read-only) */ 97#define ICMPCTL_ICMPLIM 3 --- 17 unchanged lines hidden --- |