summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/conf/NOTES8
-rw-r--r--sys/conf/files1
-rw-r--r--sys/conf/options4
-rw-r--r--sys/i386/conf/LINT8
-rw-r--r--sys/i386/conf/NOTES8
-rw-r--r--sys/modules/if_ef/Makefile27
-rw-r--r--sys/net/if_ef.c1
7 files changed, 39 insertions, 18 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index cfff2c1..0b7e6c8 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -446,6 +446,8 @@ device mn0 # Munich32x/Falc54 Nx64kbit/sec cards.
# IPv6 over IPv6 tunneling.
# The `faith' pseudo-device captures packets sent to it and diverts them
# to the IPv4/IPv6 translation daemon.
+# The `ef' pseudo-device provides support for multiple ethernet frame types
+# specified via ETHER_* options. See ef(4) for details.
#
# The PPP_BSDCOMP option enables support for compress(1) style entire
# packet compression, the PPP_DEFLATE is for zlib/gzip style compression.
@@ -467,6 +469,12 @@ options PPP_BSDCOMP #PPP BSD-compress support
options PPP_DEFLATE #PPP zlib/deflate/gzip support
options PPP_FILTER #enable bpf filtering (needs bpf)
+pseudo-device ef # Multiple ethernet frames support
+options ETHER_II # enable Ethernet_II frame
+options ETHER_8023 # enable Ethernet_802.3 (Novell) frame
+options ETHER_8022 # enable Ethernet_802.2 frame
+options ETHER_SNAP # enable Ethernet_802.2/SNAP frame
+
# for IPv6
pseudo-device gif 4 #IPv6 and IPv4 tunneling
pseudo-device faith 1 #for IPv6 and IPv4 translation
diff --git a/sys/conf/files b/sys/conf/files
index ec266fd..38a45a6 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -529,6 +529,7 @@ net/bsd_comp.c optional ppp_bsdcomp
net/if.c standard
net/if_atmsubr.c optional atm
net/if_disc.c optional disc
+net/if_ef.c optional ef
net/if_ethersubr.c optional ether
net/if_iso88025subr.c optional token
net/if_faith.c optional faith
diff --git a/sys/conf/options b/sys/conf/options
index 8f0b03a..4dff579 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -231,6 +231,10 @@ BOOTP_NFSROOT opt_bootp.h
BOOTP_NFSV3 opt_bootp.h
BOOTP_WIRED_TO opt_bootp.h
BRIDGE opt_bdg.h
+ETHER_II opt_ef.h
+ETHER_8023 opt_ef.h
+ETHER_8022 opt_ef.h
+ETHER_SNAP opt_ef.h
MROUTING opt_mrouting.h
INET opt_inet.h
INET6 opt_inet6.h
diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT
index cfff2c1..0b7e6c8 100644
--- a/sys/i386/conf/LINT
+++ b/sys/i386/conf/LINT
@@ -446,6 +446,8 @@ device mn0 # Munich32x/Falc54 Nx64kbit/sec cards.
# IPv6 over IPv6 tunneling.
# The `faith' pseudo-device captures packets sent to it and diverts them
# to the IPv4/IPv6 translation daemon.
+# The `ef' pseudo-device provides support for multiple ethernet frame types
+# specified via ETHER_* options. See ef(4) for details.
#
# The PPP_BSDCOMP option enables support for compress(1) style entire
# packet compression, the PPP_DEFLATE is for zlib/gzip style compression.
@@ -467,6 +469,12 @@ options PPP_BSDCOMP #PPP BSD-compress support
options PPP_DEFLATE #PPP zlib/deflate/gzip support
options PPP_FILTER #enable bpf filtering (needs bpf)
+pseudo-device ef # Multiple ethernet frames support
+options ETHER_II # enable Ethernet_II frame
+options ETHER_8023 # enable Ethernet_802.3 (Novell) frame
+options ETHER_8022 # enable Ethernet_802.2 frame
+options ETHER_SNAP # enable Ethernet_802.2/SNAP frame
+
# for IPv6
pseudo-device gif 4 #IPv6 and IPv4 tunneling
pseudo-device faith 1 #for IPv6 and IPv4 translation
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index cfff2c1..0b7e6c8 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -446,6 +446,8 @@ device mn0 # Munich32x/Falc54 Nx64kbit/sec cards.
# IPv6 over IPv6 tunneling.
# The `faith' pseudo-device captures packets sent to it and diverts them
# to the IPv4/IPv6 translation daemon.
+# The `ef' pseudo-device provides support for multiple ethernet frame types
+# specified via ETHER_* options. See ef(4) for details.
#
# The PPP_BSDCOMP option enables support for compress(1) style entire
# packet compression, the PPP_DEFLATE is for zlib/gzip style compression.
@@ -467,6 +469,12 @@ options PPP_BSDCOMP #PPP BSD-compress support
options PPP_DEFLATE #PPP zlib/deflate/gzip support
options PPP_FILTER #enable bpf filtering (needs bpf)
+pseudo-device ef # Multiple ethernet frames support
+options ETHER_II # enable Ethernet_II frame
+options ETHER_8023 # enable Ethernet_802.3 (Novell) frame
+options ETHER_8022 # enable Ethernet_802.2 frame
+options ETHER_SNAP # enable Ethernet_802.2/SNAP frame
+
# for IPv6
pseudo-device gif 4 #IPv6 and IPv4 tunneling
pseudo-device faith 1 #for IPv6 and IPv4 translation
diff --git a/sys/modules/if_ef/Makefile b/sys/modules/if_ef/Makefile
index eb0286c..d009c2a 100644
--- a/sys/modules/if_ef/Makefile
+++ b/sys/modules/if_ef/Makefile
@@ -3,12 +3,12 @@
.PATH: ${.CURDIR}/../../net
KMOD= if_ef
-SRCS= if_ef.c opt_ipx.h opt_inet.h
+SRCS= if_ef.c opt_ipx.h opt_inet.h opt_ef.h
MAN4= ef.4
# If you need only limited number of frames comment out unneeded ones
# this will reduce number of visible devices
-ETHER_II=
+#ETHER_II=
ETHER_8023=
ETHER_8022=
ETHER_SNAP=
@@ -17,22 +17,6 @@ NBPF?= 1
CFLAGS+= ${PROTOS}
-.if defined(ETHER_II)
-CFLAGS+= -DETHER_II
-.endif
-
-.if defined(ETHER_8023)
-CFLAGS+= -DETHER_8023
-.endif
-
-.if defined(ETHER_8022)
-CFLAGS+= -DETHER_8022
-.endif
-
-.if defined(ETHER_SNAP)
-CFLAGS+= -DETHER_SNAP
-.endif
-
.if defined(EFDEBUG)
CFLAGS+= -DEF_DEBUG
.endif
@@ -43,6 +27,13 @@ opt_inet.h:
opt_ipx.h:
echo "#define IPX 1" > opt_ipx.h
+opt_ef.h:
+.for frame in ETHER_II ETHER_8023 ETHER_8022 ETHER_SNAP
+.if defined(${frame})
+ echo "#define ${frame} 1" >> opt_ef.h
+.endif
+.endfor
+
load: all
/sbin/kldload ./${PROG}
diff --git a/sys/net/if_ef.c b/sys/net/if_ef.c
index d726d18..d5a1304 100644
--- a/sys/net/if_ef.c
+++ b/sys/net/if_ef.c
@@ -28,6 +28,7 @@
#include "opt_inet.h"
#include "opt_ipx.h"
+#include "opt_ef.h"
#include <sys/param.h>
#include <sys/systm.h>
OpenPOWER on IntegriCloud