if_disc.c (b6f5c0b8243365a1b5bfad4b1f3edd40e2cadd20) if_disc.c (4590fd3a2a5539b8a1ce2ad488707123c8b7c8c8)
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 * From: @(#)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 * From: @(#)if_loop.c 8.1 (Berkeley) 6/10/93
34 * $Id: if_disc.c,v 1.4 1995/05/30 08:08:01 rgrimes Exp $
34 * $Id: if_disc.c,v 1.5 1995/08/30 00:33:17 bde Exp $
35 */
36
37/*
38 * Discard interface driver for protocol testing and timing.
39 * (Based on the loopback.)
40 */
41
42#include <sys/param.h>

--- 32 unchanged lines hidden (view full) ---

75#include "bpfilter.h"
76
77#ifdef TINY_DSMTU
78#define DSMTU (1024+512)
79#else
80#define DSMTU 65532
81#endif
82
35 */
36
37/*
38 * Discard interface driver for protocol testing and timing.
39 * (Based on the loopback.)
40 */
41
42#include <sys/param.h>

--- 32 unchanged lines hidden (view full) ---

75#include "bpfilter.h"
76
77#ifdef TINY_DSMTU
78#define DSMTU (1024+512)
79#else
80#define DSMTU 65532
81#endif
82
83static void discattach __P((caddr_t udata));
83static void discattach __P((void *udata));
84PSEUDO_SET(discattach, if_disc);
85
86static struct ifnet dsif;
87static int dsoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
88 struct rtentry *);
89static int dsioctl(struct ifnet *, int, caddr_t);
90
91/* ARGSUSED */
92static void
93discattach(udata)
84PSEUDO_SET(discattach, if_disc);
85
86static struct ifnet dsif;
87static int dsoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
88 struct rtentry *);
89static int dsioctl(struct ifnet *, int, caddr_t);
90
91/* ARGSUSED */
92static void
93discattach(udata)
94 caddr_t udata;
94 void *udata;
95{
96 register struct ifnet *ifp = &dsif;
97
98 ifp->if_name = "ds";
99 ifp->if_mtu = DSMTU;
100 ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST;
101 ifp->if_ioctl = dsioctl;
102 ifp->if_output = dsoutput;

--- 120 unchanged lines hidden ---
95{
96 register struct ifnet *ifp = &dsif;
97
98 ifp->if_name = "ds";
99 ifp->if_mtu = DSMTU;
100 ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST;
101 ifp->if_ioctl = dsioctl;
102 ifp->if_output = dsoutput;

--- 120 unchanged lines hidden ---