if_fddisubr.c (83130) | if_fddisubr.c (84931) |
---|---|
1/* 2 * Copyright (c) 1995, 1996 3 * Matt Thomas <matt@3am-software.com>. All rights reserved. 4 * Copyright (c) 1982, 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp | 1/* 2 * Copyright (c) 1995, 1996 3 * Matt Thomas <matt@3am-software.com>. All rights reserved. 4 * Copyright (c) 1982, 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp |
36 * $FreeBSD: head/sys/net/if_fddisubr.c 83130 2001-09-06 02:40:43Z jlemon $ | 36 * $FreeBSD: head/sys/net/if_fddisubr.c 84931 2001-10-14 20:17:53Z fjoe $ |
37 */ 38 39#include "opt_atalk.h" 40#include "opt_inet.h" 41#include "opt_inet6.h" 42#include "opt_ipx.h" 43 44#include <sys/param.h> --- 116 unchanged lines hidden (view full) --- 161 senderr(rt == rt0 ? EHOSTDOWN : EHOSTUNREACH); 162 } 163#endif 164 switch (dst->sa_family) { 165 166#ifdef INET 167 case AF_INET: { 168#if !defined(__bsdi__) || _BSDI_VERSION >= 199401 | 37 */ 38 39#include "opt_atalk.h" 40#include "opt_inet.h" 41#include "opt_inet6.h" 42#include "opt_ipx.h" 43 44#include <sys/param.h> --- 116 unchanged lines hidden (view full) --- 161 senderr(rt == rt0 ? EHOSTDOWN : EHOSTUNREACH); 162 } 163#endif 164 switch (dst->sa_family) { 165 166#ifdef INET 167 case AF_INET: { 168#if !defined(__bsdi__) || _BSDI_VERSION >= 199401 |
169 if (!ARPRESOLVE(ac, rt, m, dst, edst, rt0)) | 169 if (!ARPRESOLVE(ifp, rt, m, dst, edst, rt0)) |
170 return (0); /* if not yet resolved */ 171#else 172 int usetrailers; 173 if (!arpresolve(ac, m, &((struct sockaddr_in *)dst)->sin_addr, edst, &usetrailers)) 174 return (0); /* if not yet resolved */ 175#endif 176 type = htons(ETHERTYPE_IP); 177 break; --- 342 unchanged lines hidden (view full) --- 520 ifp->if_addrlen = 6; 521 ifp->if_hdrlen = 21; 522 ifp->if_mtu = FDDIMTU; 523 ifp->if_resolvemulti = fddi_resolvemulti; 524 ifp->if_baudrate = 100000000; 525#ifdef IFF_NOTRAILERS 526 ifp->if_flags |= IFF_NOTRAILERS; 527#endif | 170 return (0); /* if not yet resolved */ 171#else 172 int usetrailers; 173 if (!arpresolve(ac, m, &((struct sockaddr_in *)dst)->sin_addr, edst, &usetrailers)) 174 return (0); /* if not yet resolved */ 175#endif 176 type = htons(ETHERTYPE_IP); 177 break; --- 342 unchanged lines hidden (view full) --- 520 ifp->if_addrlen = 6; 521 ifp->if_hdrlen = 21; 522 ifp->if_mtu = FDDIMTU; 523 ifp->if_resolvemulti = fddi_resolvemulti; 524 ifp->if_baudrate = 100000000; 525#ifdef IFF_NOTRAILERS 526 ifp->if_flags |= IFF_NOTRAILERS; 527#endif |
528 ifp->if_broadcastaddr = fddibroadcastaddr; |
|
528#if defined(__FreeBSD__) 529 ifa = ifaddr_byindex(ifp->if_index); 530 sdl = (struct sockaddr_dl *)ifa->ifa_addr; 531 sdl->sdl_type = IFT_FDDI; 532 sdl->sdl_alen = ifp->if_addrlen; 533 bcopy(((struct arpcom *)ifp)->ac_enaddr, LLADDR(sdl), ifp->if_addrlen); 534#elif defined(__NetBSD__) 535 LIST_INIT(&((struct arpcom *)ifp)->ac_multiaddrs); --- 98 unchanged lines hidden --- | 529#if defined(__FreeBSD__) 530 ifa = ifaddr_byindex(ifp->if_index); 531 sdl = (struct sockaddr_dl *)ifa->ifa_addr; 532 sdl->sdl_type = IFT_FDDI; 533 sdl->sdl_alen = ifp->if_addrlen; 534 bcopy(((struct arpcom *)ifp)->ac_enaddr, LLADDR(sdl), ifp->if_addrlen); 535#elif defined(__NetBSD__) 536 LIST_INIT(&((struct arpcom *)ifp)->ac_multiaddrs); --- 98 unchanged lines hidden --- |