Deleted Added
full compact
if_disc.c (53115) if_disc.c (54263)
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 * $FreeBSD: head/sys/net/if_disc.c 53115 1999-11-12 19:30:08Z phk $
34 * $FreeBSD: head/sys/net/if_disc.c 54263 1999-12-07 17:39:16Z shin $
35 */
36
37/*
38 * Discard interface driver for protocol testing and timing.
39 * (Based on the loopback.)
40 */
41
42#include <sys/param.h>

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

47#include <sys/sockio.h>
48
49#include <net/if.h>
50#include <net/if_types.h>
51#include <net/route.h>
52#include <net/bpf.h>
53
54#include "opt_inet.h"
35 */
36
37/*
38 * Discard interface driver for protocol testing and timing.
39 * (Based on the loopback.)
40 */
41
42#include <sys/param.h>

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

47#include <sys/sockio.h>
48
49#include <net/if.h>
50#include <net/if_types.h>
51#include <net/route.h>
52#include <net/bpf.h>
53
54#include "opt_inet.h"
55#include "opt_inet6.h"
55
56#ifdef TINY_DSMTU
57#define DSMTU (1024+512)
58#else
59#define DSMTU 65532
60#endif
61
62static void discattach __P((void *dummy));

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

175 break;
176 }
177 switch (ifr->ifr_addr.sa_family) {
178
179#ifdef INET
180 case AF_INET:
181 break;
182#endif
56
57#ifdef TINY_DSMTU
58#define DSMTU (1024+512)
59#else
60#define DSMTU 65532
61#endif
62
63static void discattach __P((void *dummy));

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

176 break;
177 }
178 switch (ifr->ifr_addr.sa_family) {
179
180#ifdef INET
181 case AF_INET:
182 break;
183#endif
184#ifdef INET6
185 case AF_INET6:
186 break;
187#endif
183
184 default:
185 error = EAFNOSUPPORT;
186 break;
187 }
188 break;
189
190 case SIOCSIFMTU:
191 ifp->if_mtu = ifr->ifr_mtu;
192 break;
193
194 default:
195 error = EINVAL;
196 }
197 return (error);
198}
188
189 default:
190 error = EAFNOSUPPORT;
191 break;
192 }
193 break;
194
195 case SIOCSIFMTU:
196 ifp->if_mtu = ifr->ifr_mtu;
197 break;
198
199 default:
200 error = EINVAL;
201 }
202 return (error);
203}