Deleted Added
full compact
icmp_var.h (195727) icmp_var.h (196039)
1/*-
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/netinet/icmp_var.h 195727 2009-07-16 21:13:04Z rwatson $
30 * $FreeBSD: head/sys/netinet/icmp_var.h 196039 2009-08-02 19:43:32Z rwatson $
31 */
32
33#ifndef _NETINET_ICMP_VAR_H_
34#define _NETINET_ICMP_VAR_H_
35
36
37/*
38 * Variables related to this implementation

--- 14 unchanged lines hidden (view full) ---

53 u_long icps_inhist[ICMP_MAXTYPE + 1];
54 u_long icps_bmcastecho; /* b/mcast echo requests dropped */
55 u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */
56 u_long icps_badaddr; /* bad return address */
57 u_long icps_noroute; /* no route back */
58};
59
60#ifdef _KERNEL
31 */
32
33#ifndef _NETINET_ICMP_VAR_H_
34#define _NETINET_ICMP_VAR_H_
35
36
37/*
38 * Variables related to this implementation

--- 14 unchanged lines hidden (view full) ---

53 u_long icps_inhist[ICMP_MAXTYPE + 1];
54 u_long icps_bmcastecho; /* b/mcast echo requests dropped */
55 u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */
56 u_long icps_badaddr; /* bad return address */
57 u_long icps_noroute; /* no route back */
58};
59
60#ifdef _KERNEL
61/*
62 * In-kernel consumers can use these accessor macros directly to update
63 * stats.
64 */
61#define ICMPSTAT_ADD(name, val) V_icmpstat.name += (val)
62#define ICMPSTAT_INC(name) ICMPSTAT_ADD(name, 1)
65#define ICMPSTAT_ADD(name, val) V_icmpstat.name += (val)
66#define ICMPSTAT_INC(name) ICMPSTAT_ADD(name, 1)
67
68/*
69 * Kernel module consumers must use this accessor macro.
70 */
71void kmod_icmpstat_inc(int statnum);
72#define KMOD_ICMPSTAT_INC(name) \
73 kmod_icmpstat_inc(offsetof(struct icmpstat, name) / sizeof(u_long))
63#endif
64
65/*
66 * Names for ICMP sysctl objects
67 */
68#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
69#define ICMPCTL_STATS 2 /* statistics (read-only) */
70#define ICMPCTL_ICMPLIM 3

--- 27 unchanged lines hidden ---
74#endif
75
76/*
77 * Names for ICMP sysctl objects
78 */
79#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
80#define ICMPCTL_STATS 2 /* statistics (read-only) */
81#define ICMPCTL_ICMPLIM 3

--- 27 unchanged lines hidden ---