if_loop.c (15117) | if_loop.c (15885) |
---|---|
1/* 2 * Copyright (c) 1982, 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 --- 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_loop.c 8.1 (Berkeley) 6/10/93 | 1/* 2 * Copyright (c) 1982, 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 --- 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_loop.c 8.1 (Berkeley) 6/10/93 |
34 * $Id: if_loop.c,v 1.18 1996/02/06 18:51:11 wollman Exp $ | 34 * $Id: if_loop.c,v 1.19 1996/04/07 17:39:06 bde Exp $ |
35 */ 36 37/* 38 * Loopback interface driver for protocol testing and timing. 39 */ 40#include "loop.h" 41#if NLOOP > 0 42 --- 29 unchanged lines hidden (view full) --- 72#include <netns/ns_if.h> 73#endif 74 75#ifdef ISO 76#include <netiso/iso.h> 77#include <netiso/iso_var.h> 78#endif 79 | 35 */ 36 37/* 38 * Loopback interface driver for protocol testing and timing. 39 */ 40#include "loop.h" 41#if NLOOP > 0 42 --- 29 unchanged lines hidden (view full) --- 72#include <netns/ns_if.h> 73#endif 74 75#ifdef ISO 76#include <netiso/iso.h> 77#include <netiso/iso_var.h> 78#endif 79 |
80#ifdef NETATALK 81#include <netinet/if_ether.h> 82#include <netatalk/at.h> 83#include <netatalk/at_var.h> 84#endif NETATALK 85 |
|
80#include "bpfilter.h" 81 82static int loioctl __P((struct ifnet *, int, caddr_t)); 83static void lortrequest __P((int, struct rtentry *, struct sockaddr *)); 84 85static void loopattach __P((void *)); 86PSEUDO_SET(loopattach, if_loop); 87 --- 101 unchanged lines hidden (view full) --- 189 break; 190#endif 191#ifdef ISO 192 case AF_ISO: 193 ifq = &clnlintrq; 194 isr = NETISR_ISO; 195 break; 196#endif | 86#include "bpfilter.h" 87 88static int loioctl __P((struct ifnet *, int, caddr_t)); 89static void lortrequest __P((int, struct rtentry *, struct sockaddr *)); 90 91static void loopattach __P((void *)); 92PSEUDO_SET(loopattach, if_loop); 93 --- 101 unchanged lines hidden (view full) --- 195 break; 196#endif 197#ifdef ISO 198 case AF_ISO: 199 ifq = &clnlintrq; 200 isr = NETISR_ISO; 201 break; 202#endif |
203#ifdef NETATALK 204 case AF_APPLETALK: 205 ifq = &atintrq2; 206 isr = NETISR_ATALK; 207 break; 208#endif NETATALK |
|
197 default: 198 printf("lo%d: can't handle af%d\n", ifp->if_unit, 199 dst->sa_family); 200 m_freem(m); 201 return (EAFNOSUPPORT); 202 } 203 s = splimp(); 204 if (IF_QFULL(ifq)) { --- 86 unchanged lines hidden --- | 209 default: 210 printf("lo%d: can't handle af%d\n", ifp->if_unit, 211 dst->sa_family); 212 m_freem(m); 213 return (EAFNOSUPPORT); 214 } 215 s = splimp(); 216 if (IF_QFULL(ifq)) { --- 86 unchanged lines hidden --- |