if_arp.h (219819) | if_arp.h (253081) |
---|---|
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 219819 2011-03-21 09:40:01Z jeff $ | 30 * $FreeBSD: head/sys/net/if_arp.h 253081 2013-07-09 09:32:06Z ae $ |
31 */ 32 33#ifndef _NET_IF_ARP_H_ 34#define _NET_IF_ARP_H_ 35 36/* 37 * Address Resolution Protocol. 38 * --- 69 unchanged lines hidden (view full) --- 108}; 109#define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com)) 110#define AC2IFP(ac) ((ac)->ac_ifp) 111 112#endif /* _KERNEL */ 113 114struct arpstat { 115 /* Normal things that happen: */ | 31 */ 32 33#ifndef _NET_IF_ARP_H_ 34#define _NET_IF_ARP_H_ 35 36/* 37 * Address Resolution Protocol. 38 * --- 69 unchanged lines hidden (view full) --- 108}; 109#define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com)) 110#define AC2IFP(ac) ((ac)->ac_ifp) 111 112#endif /* _KERNEL */ 113 114struct arpstat { 115 /* Normal things that happen: */ |
116 u_long txrequests; /* # of ARP requests sent by this host. */ 117 u_long txreplies; /* # of ARP replies sent by this host. */ 118 u_long rxrequests; /* # of ARP requests received by this host. */ 119 u_long rxreplies; /* # of ARP replies received by this host. */ 120 u_long received; /* # of ARP packets received by this host. */ | 116 uint64_t txrequests; /* # of ARP requests sent by this host. */ 117 uint64_t txreplies; /* # of ARP replies sent by this host. */ 118 uint64_t rxrequests; /* # of ARP requests received by this host. */ 119 uint64_t rxreplies; /* # of ARP replies received by this host. */ 120 uint64_t received; /* # of ARP packets received by this host. */ |
121 | 121 |
122 u_long arp_spares[4]; /* For either the upper or lower half. */ | 122 uint64_t arp_spares[4]; /* For either the upper or lower half. */ |
123 /* Abnormal event and error counting: */ | 123 /* Abnormal event and error counting: */ |
124 u_long dropped; /* # of packets dropped waiting for a reply. */ 125 u_long timeouts; /* # of times with entries removed */ | 124 uint64_t dropped; /* # of packets dropped waiting for a reply. */ 125 uint64_t timeouts; /* # of times with entries removed */ |
126 /* due to timeout. */ | 126 /* due to timeout. */ |
127 u_long dupips; /* # of duplicate IPs detected. */ | 127 uint64_t dupips; /* # of duplicate IPs detected. */ |
128}; 129 130/* 131 * In-kernel consumers can use these accessor macros directly to update 132 * stats. 133 */ 134#define ARPSTAT_ADD(name, val) V_arpstat.name += (val) 135#define ARPSTAT_SUB(name, val) V_arpstat.name -= (val) 136#define ARPSTAT_INC(name) ARPSTAT_ADD(name, 1) 137#define ARPSTAT_DEC(name) ARPSTAT_SUB(name, 1) 138 139#endif /* !_NET_IF_ARP_H_ */ | 128}; 129 130/* 131 * In-kernel consumers can use these accessor macros directly to update 132 * stats. 133 */ 134#define ARPSTAT_ADD(name, val) V_arpstat.name += (val) 135#define ARPSTAT_SUB(name, val) V_arpstat.name -= (val) 136#define ARPSTAT_INC(name) ARPSTAT_ADD(name, 1) 137#define ARPSTAT_DEC(name) ARPSTAT_SUB(name, 1) 138 139#endif /* !_NET_IF_ARP_H_ */ |