if_ether.c (127277) | if_ether.c (127828) |
---|---|
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 127277 2004-03-21 18:51:26Z mdodd $ | 34 * $FreeBSD: head/sys/netinet/if_ether.c 127828 2004-04-04 06:14:55Z luigi $ |
35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 299 unchanged lines hidden (view full) --- 342 * set one up and broadcast a request for the IP address. 343 * Hold onto this mbuf and resend it once the address 344 * is finally resolved. A return value of 1 indicates 345 * that desten has been filled in and the packet should be sent 346 * normally; a 0 return indicates that the packet has been 347 * taken over here, either now or for later transmission. 348 */ 349int | 35 */ 36 37/* 38 * Ethernet address resolution protocol. 39 * TODO: 40 * add "inuse/lock" bit (or ref. count) along with valid bit 41 */ 42 --- 299 unchanged lines hidden (view full) --- 342 * set one up and broadcast a request for the IP address. 343 * Hold onto this mbuf and resend it once the address 344 * is finally resolved. A return value of 1 indicates 345 * that desten has been filled in and the packet should be sent 346 * normally; a 0 return indicates that the packet has been 347 * taken over here, either now or for later transmission. 348 */ 349int |
350arpresolve(ifp, rt, m, dst, desten, rt0) 351 struct ifnet *ifp; 352 struct rtentry *rt; 353 struct mbuf *m; 354 struct sockaddr *dst; 355 u_char *desten; 356 struct rtentry *rt0; | 350arpresolve(struct ifnet *ifp, struct rtentry *rt, struct mbuf *m, 351 struct sockaddr *dst, u_char *desten) |
357{ 358 struct llinfo_arp *la = 0; 359 struct sockaddr_dl *sdl; 360 361 if (m->m_flags & M_BCAST) { /* broadcast */ 362 (void)memcpy(desten, ifp->if_broadcastaddr, ifp->if_addrlen); 363 return (1); 364 } --- 530 unchanged lines hidden --- | 352{ 353 struct llinfo_arp *la = 0; 354 struct sockaddr_dl *sdl; 355 356 if (m->m_flags & M_BCAST) { /* broadcast */ 357 (void)memcpy(desten, ifp->if_broadcastaddr, ifp->if_addrlen); 358 return (1); 359 } --- 530 unchanged lines hidden --- |