summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2007-03-26 04:39:18 +0000
committeryar <yar@FreeBSD.org>2007-03-26 04:39:18 +0000
commitcee18f9ca839459e3d6c7f77d7db08ae9ab8016d (patch)
tree8dd31b5dd3495e12e5f83dbc0f3c9f43c7638dee /sys
parentec89d3911e8cb32331c03c0c913e18254361beb8 (diff)
downloadFreeBSD-src-cee18f9ca839459e3d6c7f77d7db08ae9ab8016d.zip
FreeBSD-src-cee18f9ca839459e3d6c7f77d7db08ae9ab8016d.tar.gz
Introduce a new toy interface, edsc(4). It's a discard interface
imitating an Ethernet device, so vlan(4) and if_bridge(4) can be attached to it for testing and benchmarking purposes. Its source can be an introduction to the anatomy of a network interface driver due to its simplicity as well as to a bunch of comments in it.
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/NOTES3
-rw-r--r--sys/conf/files1
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/if_edsc/Makefile8
4 files changed, 13 insertions, 0 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 88086cb..5bd3493 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -737,6 +737,8 @@ device mn # Munich32x/Falc54 Nx64kbit/sec cards.
# The `disc' device implements a minimal network interface,
# which throws away all packets sent and never receives any. It is
# included for testing purposes. This shows up as the `ds' interface.
+# The `edsc' device implements a minimal Ethernet interface,
+# which discards all packets sent and receives none.
# The `tap' device is a pty-like virtual Ethernet interface
# The `tun' device implements (user-)ppp and nos-tun
# The `gif' device implements IPv6 over IP4 tunneling,
@@ -782,6 +784,7 @@ device sppp #Generic Synchronous PPP
device loop #Network loopback device
device bpf #Berkeley packet filter
device disc #Discard device (ds0, ds1, etc)
+device edsc #Ethernet discard device
device tap #Virtual Ethernet driver
device tun #Tunnel driver (ppp(8), nos-tun(8))
device sl #Serial Line IP
diff --git a/sys/conf/files b/sys/conf/files
index 9bc7efb..6c7069e 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1532,6 +1532,7 @@ net/if_atmsubr.c optional atm
net/if_bridge.c optional if_bridge
net/if_clone.c standard
net/if_disc.c optional disc
+net/if_edsc.c optional edsc
net/if_ef.c optional ef
net/if_enc.c optional enc
net/if_ethersubr.c optional ether
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index dff387d..53daa78 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -103,6 +103,7 @@ SUBDIR= ${_3dfx} \
${_ie} \
if_bridge \
if_disc \
+ if_edsc \
if_ef \
if_faith \
if_gif \
diff --git a/sys/modules/if_edsc/Makefile b/sys/modules/if_edsc/Makefile
new file mode 100644
index 0000000..af2704b
--- /dev/null
+++ b/sys/modules/if_edsc/Makefile
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../net
+
+KMOD= if_edsc
+SRCS= if_edsc.c
+
+.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud