if_ether.c (84931) | if_ether.c (85074) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 |
34 * $FreeBSD: head/sys/netinet/if_ether.c 84931 2001-10-14 20:17:53Z fjoe $ | 34 * $FreeBSD: head/sys/netinet/if_ether.c 85074 2001-10-17 18:07:05Z ru $ |
35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 68 unchanged lines hidden (view full) --- 111SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, 112 &arp_maxtries, 0, ""); 113SYSCTL_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW, 114 &useloopback, 0, ""); 115SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, 116 &arp_proxyall, 0, ""); 117 118static void arp_init __P((void)); | 35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 68 unchanged lines hidden (view full) --- 111SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, 112 &arp_maxtries, 0, ""); 113SYSCTL_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW, 114 &useloopback, 0, ""); 115SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, 116 &arp_proxyall, 0, ""); 117 118static void arp_init __P((void)); |
119static void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *)); | 119static void arp_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *)); |
120static void arprequest __P((struct ifnet *, 121 struct in_addr *, struct in_addr *, u_char *)); 122static void arpintr __P((void)); 123static void arptfree __P((struct llinfo_arp *)); 124static void arptimer __P((void *)); 125static struct llinfo_arp 126 *arplookup __P((u_long, int, int)); 127#ifdef INET --- 21 unchanged lines hidden (view full) --- 149 } 150 splx(s); 151} 152 153/* 154 * Parallel to llc_rtrequest. 155 */ 156static void | 120static void arprequest __P((struct ifnet *, 121 struct in_addr *, struct in_addr *, u_char *)); 122static void arpintr __P((void)); 123static void arptfree __P((struct llinfo_arp *)); 124static void arptimer __P((void *)); 125static struct llinfo_arp 126 *arplookup __P((u_long, int, int)); 127#ifdef INET --- 21 unchanged lines hidden (view full) --- 149 } 150 splx(s); 151} 152 153/* 154 * Parallel to llc_rtrequest. 155 */ 156static void |
157arp_rtrequest(req, rt, sa) | 157arp_rtrequest(req, rt, info) |
158 int req; 159 register struct rtentry *rt; | 158 int req; 159 register struct rtentry *rt; |
160 struct sockaddr *sa; | 160 struct rt_addrinfo *info; |
161{ 162 register struct sockaddr *gate = rt->rt_gateway; 163 register struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo; 164 static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; 165 static int arpinit_done; 166 167 if (!arpinit_done) { 168 arpinit_done = 1; --- 756 unchanged lines hidden --- | 161{ 162 register struct sockaddr *gate = rt->rt_gateway; 163 register struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo; 164 static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; 165 static int arpinit_done; 166 167 if (!arpinit_done) { 168 arpinit_done = 1; --- 756 unchanged lines hidden --- |