if_ether.c (92723) | if_ether.c (92802) |
---|---|
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 92723 2002-03-19 21:25:46Z alfred $ | 34 * $FreeBSD: head/sys/netinet/if_ether.c 92802 2002-03-20 15:56:36Z orion $ |
35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 379 unchanged lines hidden (view full) --- 422 } 423 sdl = SDL(rt->rt_gateway); 424 /* 425 * Check the address family and length is valid, the address 426 * is resolved; otherwise, try to resolve. 427 */ 428 if ((rt->rt_expire == 0 || rt->rt_expire > time_second) && 429 sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0) { | 35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 379 unchanged lines hidden (view full) --- 422 } 423 sdl = SDL(rt->rt_gateway); 424 /* 425 * Check the address family and length is valid, the address 426 * is resolved; otherwise, try to resolve. 427 */ 428 if ((rt->rt_expire == 0 || rt->rt_expire > time_second) && 429 sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0) { |
430 /* 431 * If entry has an expiry time and it is approaching, 432 * see if we need to send an ARP request within this 433 * arpt_down interval. 434 */ 435 if ((rt->rt_expire != 0) && 436 (time_second + (arp_maxtries - la->la_asked) * arpt_down > 437 rt->rt_expire)) { 438 arprequest(ifp, 439 &SIN(rt->rt_ifa->ifa_addr)->sin_addr, 440 &SIN(dst)->sin_addr, 441 IF_LLADDR(ifp)); 442 la->la_asked++; 443 } 444 |
|
430 bcopy(LLADDR(sdl), desten, sdl->sdl_alen); 431 return 1; 432 } 433 /* 434 * If ARP is disabled on this interface, stop. 435 * XXX 436 * Probably should not allocate empty llinfo struct if we are 437 * not going to be sending out an arp request. --- 496 unchanged lines hidden --- | 445 bcopy(LLADDR(sdl), desten, sdl->sdl_alen); 446 return 1; 447 } 448 /* 449 * If ARP is disabled on this interface, stop. 450 * XXX 451 * Probably should not allocate empty llinfo struct if we are 452 * not going to be sending out an arp request. --- 496 unchanged lines hidden --- |