Deleted Added
full compact
if_arp.h (253081) if_arp.h (253084)
1/*-
2 * Copyright (c) 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 * @(#)if_arp.h 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 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 * @(#)if_arp.h 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/net/if_arp.h 253081 2013-07-09 09:32:06Z ae $
30 * $FreeBSD: head/sys/net/if_arp.h 253084 2013-07-09 09:50:15Z ae $
31 */
32
33#ifndef _NET_IF_ARP_H_
34#define _NET_IF_ARP_H_
35
36/*
37 * Address Resolution Protocol.
38 *

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

122 uint64_t arp_spares[4]; /* For either the upper or lower half. */
123 /* Abnormal event and error counting: */
124 uint64_t dropped; /* # of packets dropped waiting for a reply. */
125 uint64_t timeouts; /* # of times with entries removed */
126 /* due to timeout. */
127 uint64_t dupips; /* # of duplicate IPs detected. */
128};
129
31 */
32
33#ifndef _NET_IF_ARP_H_
34#define _NET_IF_ARP_H_
35
36/*
37 * Address Resolution Protocol.
38 *

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

122 uint64_t arp_spares[4]; /* For either the upper or lower half. */
123 /* Abnormal event and error counting: */
124 uint64_t dropped; /* # of packets dropped waiting for a reply. */
125 uint64_t timeouts; /* # of times with entries removed */
126 /* due to timeout. */
127 uint64_t dupips; /* # of duplicate IPs detected. */
128};
129
130#ifdef _KERNEL
131#include <sys/counter.h>
132#include <net/vnet.h>
133
134VNET_PCPUSTAT_DECLARE(struct arpstat, arpstat);
130/*
131 * In-kernel consumers can use these accessor macros directly to update
132 * stats.
133 */
135/*
136 * In-kernel consumers can use these accessor macros directly to update
137 * stats.
138 */
134#define ARPSTAT_ADD(name, val) V_arpstat.name += (val)
135#define ARPSTAT_SUB(name, val) V_arpstat.name -= (val)
139#define ARPSTAT_ADD(name, val) \
140 VNET_PCPUSTAT_ADD(struct arpstat, arpstat, name, (val))
141#define ARPSTAT_SUB(name, val) ARPSTAT_ADD(name, -(val))
136#define ARPSTAT_INC(name) ARPSTAT_ADD(name, 1)
137#define ARPSTAT_DEC(name) ARPSTAT_SUB(name, 1)
138
142#define ARPSTAT_INC(name) ARPSTAT_ADD(name, 1)
143#define ARPSTAT_DEC(name) ARPSTAT_SUB(name, 1)
144
145#endif /* _KERNEL */
146
139#endif /* !_NET_IF_ARP_H_ */
147#endif /* !_NET_IF_ARP_H_ */