diff options
author | eivind <eivind@FreeBSD.org> | 1998-01-08 23:42:31 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1998-01-08 23:42:31 +0000 |
commit | bcae2312afcaa3b4fd34daac5baa64dbb82f57c5 (patch) | |
tree | fea007e0b2375970df63c0905adfbd464aaa0f74 /sys/netinet | |
parent | c40850d5f4e14c6f1d76a0a345e6ba081a4ebd21 (diff) | |
download | FreeBSD-src-bcae2312afcaa3b4fd34daac5baa64dbb82f57c5.zip FreeBSD-src-bcae2312afcaa3b4fd34daac5baa64dbb82f57c5.tar.gz |
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>.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_atm.c | 2 | ||||
-rw-r--r-- | sys/netinet/if_ether.c | 13 | ||||
-rw-r--r-- | sys/netinet/if_ether.h | 18 | ||||
-rw-r--r-- | sys/netinet/ip_divert.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_fw.c | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_debug.c | 7 |
6 files changed, 33 insertions, 21 deletions
diff --git a/sys/netinet/if_atm.c b/sys/netinet/if_atm.c index 81a955b..c5dfd3b 100644 --- a/sys/netinet/if_atm.c +++ b/sys/netinet/if_atm.c @@ -36,6 +36,8 @@ * IP <=> ATM address resolution. */ +#include "opt_inet.h" + #ifdef INET #include <sys/param.h> diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 7ffa7cb..5906864 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 - * $Id: if_ether.c,v 1.41 1997/10/28 15:58:40 bde Exp $ + * $Id: if_ether.c,v 1.42 1997/12/20 00:07:11 bde Exp $ */ /* @@ -40,6 +40,8 @@ * add "inuse/lock" bit (or ref. count) along with valid bit */ +#include "opt_inet.h" + #include <sys/param.h> #include <sys/kernel.h> #include <sys/sysctl.h> @@ -108,7 +110,9 @@ static void arptfree __P((struct llinfo_arp *)); static void arptimer __P((void *)); static struct llinfo_arp *arplookup __P((u_long, int, int)); +#ifdef INET static void in_arpinput __P((struct mbuf *)); +#endif /* * Timeout routine. Age arp_tab entries periodically. @@ -209,6 +213,7 @@ arp_rtrequest(req, rt, sa) rt->rt_flags |= RTF_LLINFO; LIST_INSERT_HEAD(&llinfo_arp, la, la_le); +#ifdef INET /* * This keeps the multicast addresses from showing up * in `arp -a' listings as unresolved. It's not actually @@ -225,6 +230,7 @@ arp_rtrequest(req, rt, sa) SDL(gate)->sdl_alen = 6; rt->rt_expire = 0; } +#endif if (SIN(rt_key(rt))->sin_addr.s_addr == (IA_SIN(rt->rt_ifa))->sin_addr.s_addr) { @@ -406,9 +412,11 @@ arpintr() switch (ntohs(ar->ar_pro)) { +#ifdef INET case ETHERTYPE_IP: in_arpinput(m); continue; +#endif } m_freem(m); } @@ -416,6 +424,8 @@ arpintr() NETISR_SET(NETISR_ARP, arpintr); + +#ifdef INET /* * ARP for Internet protocols on 10 Mb/s Ethernet. * Algorithm is that given in RFC 826. @@ -566,6 +576,7 @@ reply: (*ac->ac_if.if_output)(&ac->ac_if, m, &sa, (struct rtentry *)0); return; } +#endif /* * Free an arp entry. diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index 3a989e7..3540119 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 - * $Id$ + * $Id: if_ether.h,v 1.20 1997/02/22 09:41:25 peter Exp $ */ #ifndef _NETINET_IF_ETHER_H_ @@ -77,21 +77,6 @@ struct ether_arp { #define arp_pln ea_hdr.ar_pln #define arp_op ea_hdr.ar_op - -/* - * 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 */ -}; - struct sockaddr_inarp { u_char sin_len; u_char sin_family; @@ -109,7 +94,6 @@ struct sockaddr_inarp { #define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */ #ifdef KERNEL -extern u_char etherbroadcastaddr[ETHER_ADDR_LEN]; extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN]; extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN]; extern struct ifqueue arpintrq; diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 4e05b4f..7834c0a 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -30,9 +30,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ip_divert.c,v 1.15 1997/09/14 03:10:39 peter Exp $ + * $Id: ip_divert.c,v 1.16 1997/12/18 09:13:34 davidg Exp $ */ +#include "opt_inet.h" + +#ifndef INET +#error IPDIVERT requires INET. +#endif + #include <sys/param.h> #include <sys/malloc.h> #include <sys/mbuf.h> diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index c5174ab..a2295a8 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -12,7 +12,7 @@ * * This software is provided ``AS IS'' without any warranties of any kind. * - * $Id: ip_fw.c,v 1.71 1998/01/05 00:57:15 alex Exp $ + * $Id: ip_fw.c,v 1.72 1998/01/08 03:03:53 alex Exp $ */ /* @@ -22,6 +22,10 @@ #ifndef IPFIREWALL_MODULE #include "opt_ipfw.h" #include "opt_ipdivert.h" +#include "opt_inet.h" +#ifndef INET +#error IPFIREWALL requires INET. +#endif /* INET */ #endif #include <sys/param.h> diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c index 3b0edd8..d7a1d4e 100644 --- a/sys/netinet/tcp_debug.c +++ b/sys/netinet/tcp_debug.c @@ -31,11 +31,16 @@ * SUCH DAMAGE. * * @(#)tcp_debug.c 8.1 (Berkeley) 6/10/93 - * $Id: tcp_debug.c,v 1.10 1997/08/02 14:32:55 bde Exp $ + * $Id: tcp_debug.c,v 1.11 1997/09/16 18:36:04 joerg Exp $ */ +#include "opt_inet.h" #include "opt_tcpdebug.h" +#ifndef INET +#error The option TCPDEBUG requires option INET. +#endif + #ifdef TCPDEBUG /* load symbolic names */ #define PRUREQUESTS |