aboutsummaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>1998-01-08 23:42:31 +0000
committerEivind Eklund <eivind@FreeBSD.org>1998-01-08 23:42:31 +0000
commit1d5e9e2255b72657dba67926ac2c254fd2156698 (patch)
tree13ea282d9bdb0c5cac926cf5b20b310b41db6e81 /sys/net
parent89d224d4156fa88b8c9b8e1d88a679756b0fdd99 (diff)
downloadsrc-1d5e9e2255b72657dba67926ac2c254fd2156698.tar.gz
src-1d5e9e2255b72657dba67926ac2c254fd2156698.zip
Make INET a proper option.
This will not make any of object files that LINT create change; there might be differences with INET disabled, but hardly anything compiled before without INET anyway. Now the 'obvious' things will give a proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The only thing that _should_ work (but can't be made to compile reasonably easily) is sppp :-( This commit move struct arpcom from <netinet/if_ether.h> to <net/if_arp.h>.
Notes
Notes: svn path=/head/; revision=32350
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_arp.h20
-rw-r--r--sys/net/if_atmsubr.c2
-rw-r--r--sys/net/if_disc.c3
-rw-r--r--sys/net/if_ethersubr.c8
-rw-r--r--sys/net/if_fddisubr.c7
-rw-r--r--sys/net/if_loop.c3
-rw-r--r--sys/net/if_ppp.c7
-rw-r--r--sys/net/if_sl.c5
-rw-r--r--sys/net/if_spppsubr.c5
-rw-r--r--sys/net/if_tun.c10
-rw-r--r--sys/net/route.c3
11 files changed, 58 insertions, 15 deletions
diff --git a/sys/net/if_arp.h b/sys/net/if_arp.h
index dd726bf85611..cbf6cac44842 100644
--- a/sys/net/if_arp.h
+++ b/sys/net/if_arp.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_arp.h 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: if_arp.h,v 1.8 1997/02/22 09:40:59 peter Exp $
*/
#ifndef _NET_IF_ARP_H_
@@ -88,4 +88,22 @@ struct arpreq {
#define ATF_PUBL 0x08 /* publish entry (respond for other host) */
#define ATF_USETRAILERS 0x10 /* has requested trailers */
+/*
+ * Structure shared between the ethernet driver modules and
+ * the address resolution code. For example, each ec_softc or il_softc
+ * begins with this structure.
+ */
+struct arpcom {
+ /*
+ * The ifnet struct _must_ be at the head of this structure.
+ */
+ struct ifnet ac_if; /* network-visible interface */
+ u_char ac_enaddr[ETHER_ADDR_LEN]; /* ethernet hardware address */
+ int ac_multicnt; /* length of ac_multiaddrs list */
+};
+
+#ifdef KERNEL
+extern u_char etherbroadcastaddr[ETHER_ADDR_LEN];
+#endif
+
#endif /* !_NET_IF_ARP_H_ */
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c
index d97a0865b885..fe56c90f5fdc 100644
--- a/sys/net/if_atmsubr.c
+++ b/sys/net/if_atmsubr.c
@@ -36,6 +36,8 @@
* if_atmsubr.c
*/
+#include "opt_inet.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c
index 574bc080d288..483ed7766c03 100644
--- a/sys/net/if_disc.c
+++ b/sys/net/if_disc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id: if_disc.c,v 1.17 1997/03/24 11:33:10 bde Exp $
+ * $Id: if_disc.c,v 1.18 1997/08/02 14:32:36 bde Exp $
*/
/*
@@ -52,6 +52,7 @@
#include <net/bpf.h>
#include "bpfilter.h"
+#include "opt_inet.h"
#ifdef TINY_DSMTU
#define DSMTU (1024+512)
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index e6fc61771e57..eef535761f2c 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -31,9 +31,10 @@
* SUCH DAMAGE.
*
* @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
- * $Id: if_ethersubr.c,v 1.40 1997/12/15 20:30:59 eivind Exp $
+ * $Id: if_ethersubr.c,v 1.41 1997/12/20 00:07:02 bde Exp $
*/
+#include "opt_inet.h"
#include "opt_ipx.h"
#include <sys/param.h>
@@ -52,11 +53,14 @@
#include <net/if_dl.h>
#include <net/if_types.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_var.h>
-#endif
#include <netinet/if_ether.h>
+#endif
#ifdef IPX
#include <netipx/ipx.h>
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index a5e3809eae11..dca0ad042b4a 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -33,9 +33,10 @@
* SUCH DAMAGE.
*
* from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
- * $Id: if_fddisubr.c,v 1.22 1997/11/18 13:37:56 bde Exp $
+ * $Id: if_fddisubr.c,v 1.23 1997/12/15 20:31:01 eivind Exp $
*/
+#include "opt_inet.h"
#include "opt_ipx.h"
#include <sys/param.h>
@@ -54,8 +55,10 @@
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_var.h>
-#endif
#include <netinet/if_ether.h>
+#endif
+#include <net/ethernet.h> /* XXX We probably should be able to drop this */
+#include <net/if_arp.h>
#if defined(__FreeBSD__)
#include <netinet/if_fddi.h>
#else
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 524b443d2d20..1e203beadaa5 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id: if_loop.c,v 1.27 1997/08/02 14:32:37 bde Exp $
+ * $Id: if_loop.c,v 1.28 1997/12/15 20:31:02 eivind Exp $
*/
/*
@@ -40,6 +40,7 @@
#include "loop.h"
#if NLOOP > 0
+#include "opt_inet.h"
#include "opt_ipx.h"
#include <sys/param.h>
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 0af8caac9d13..548480c582dc 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,17 +69,20 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.51 1997/12/06 13:24:25 bde Exp $ */
+/* $Id: if_ppp.c,v 1.52 1997/12/15 20:31:04 eivind Exp $ */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
#include "ppp.h"
#if NPPP > 0
-#include "opt_ppp.h"
+#include "opt_inet.h"
#include "opt_ipx.h"
+#include "opt_ppp.h"
+#ifdef INET
#define VJC
+#endif
#define PPP_COMPRESS
#include <sys/param.h>
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index a2939700009e..695627c9f2e4 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.62 1997/12/06 13:24:31 bde Exp $
+ * $Id: if_sl.c,v 1.64 1997/12/19 19:39:01 ache Exp $
*/
/*
@@ -69,6 +69,7 @@
#if NSL > 0
#include "bpfilter.h"
+#include "opt_inet.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,7 +96,7 @@
#include <netinet/in_var.h>
#include <netinet/ip.h>
#else
-Huh? Slip without inet?
+#error "Huh? Slip without inet?"
#endif
#include <net/slcompress.h>
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index cd266a760680..d5f449f69be9 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -17,9 +17,10 @@
*
* From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997
*
- * $Id: if_spppsubr.c,v 1.29 1997/12/15 20:31:08 eivind Exp $
+ * $Id: if_spppsubr.c,v 1.30 1998/01/01 21:27:18 gj Exp $
*/
+#include "opt_inet.h"
#include "opt_ipx.h"
#include <sys/param.h>
@@ -45,6 +46,8 @@
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netinet/if_ether.h>
+#else
+#error Huh? sppp without INET?
#endif
#ifdef IPX
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index c263d84f86b3..6d9318e1c3d4 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -17,6 +17,8 @@
#include "tun.h"
#if NTUN > 0
+#include "opt_inet.h"
+
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/systm.h>
@@ -233,7 +235,8 @@ tuninit(unit)
microtime(&ifp->if_lastchange);
for (ifa = ifp->if_addrhead.tqh_first; ifa;
- ifa = ifa->ifa_link.tqe_next)
+ ifa = ifa->ifa_link.tqe_next) {
+#ifdef INET
if (ifa->ifa_addr->sa_family == AF_INET) {
struct sockaddr_in *si;
@@ -245,7 +248,8 @@ tuninit(unit)
if (si && si->sin_addr.s_addr)
tp->tun_flags |= TUN_DSTADDR;
}
-
+#endif
+ }
return 0;
}
@@ -574,6 +578,7 @@ tunwrite(dev, uio, flag)
}
#endif
+#ifdef INET
s = splimp();
if (IF_QFULL (&ipintrq)) {
IF_DROP(&ipintrq);
@@ -587,6 +592,7 @@ tunwrite(dev, uio, flag)
ifp->if_ibytes += tlen;
ifp->if_ipackets++;
schednetisr(NETISR_IP);
+#endif
return error;
}
diff --git a/sys/net/route.c b/sys/net/route.c
index 85cf677e46d7..f24b5001ffd1 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -31,9 +31,10 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.2 (Berkeley) 11/15/93
- * $Id: route.c,v 1.44 1997/09/16 11:43:46 bde Exp $
+ * $Id: route.c,v 1.45 1997/10/28 15:58:35 bde Exp $
*/
+#include "opt_inet.h"
#include "opt_mrouting.h"
#include <sys/param.h>