if_arp.h (4a0d6638b3bb3b7ed39b852f722e904ac9a6e603) | if_arp.h (54fc657d59324e260dd5cde0d6e7f60d43a41c60) |
---|---|
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 --- 94 unchanged lines hidden (view full) --- 103 */ 104struct arpcom { 105 struct ifnet *ac_ifp; /* network-visible interface */ 106 void *ac_netgraph; /* ng_ether(4) netgraph node info */ 107}; 108#define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com)) 109#define AC2IFP(ac) ((ac)->ac_ifp) 110 | 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 --- 94 unchanged lines hidden (view full) --- 103 */ 104struct arpcom { 105 struct ifnet *ac_ifp; /* network-visible interface */ 106 void *ac_netgraph; /* ng_ether(4) netgraph node info */ 107}; 108#define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com)) 109#define AC2IFP(ac) ((ac)->ac_ifp) 110 |
111#endif | 111#endif /* _KERNEL */ |
112 | 112 |
113struct arpstat { 114 /* Normal things that happen: */ 115 u_long txrequests; /* # of ARP requests sent by this host. */ 116 u_long txreplies; /* # of ARP replies sent by this host. */ 117 u_long rxrequests; /* # of ARP requests received by this host. */ 118 u_long rxreplies; /* # of ARP replies received by this host. */ 119 u_long received; /* # of ARP packets received by this host. */ 120 121 u_long arp_spares[4]; /* For either the upper or lower half. */ 122 /* Abnormal event and error counting: */ 123 u_long dropped; /* # of packets dropped waiting for a reply. */ 124 u_long timeouts; /* # of times with entries removed */ 125 /* due to timeout. */ 126 u_long dupips; /* # of duplicate IPs detected. */ 127}; 128 129/* 130 * In-kernel consumers can use these accessor macros directly to update 131 * stats. 132 */ 133#define ARPSTAT_ADD(name, val) V_arpstat.name += (val) 134#define ARPSTAT_SUB(name, val) V_arpstat.name -= (val) 135#define ARPSTAT_INC(name) ARPSTAT_ADD(name, 1) 136#define ARPSTAT_DEC(name) ARPSTAT_SUB(name, 1) 137 |
|
113#endif /* !_NET_IF_ARP_H_ */ | 138#endif /* !_NET_IF_ARP_H_ */ |