From cee18f9ca839459e3d6c7f77d7db08ae9ab8016d Mon Sep 17 00:00:00 2001 From: yar Date: Mon, 26 Mar 2007 04:39:18 +0000 Subject: 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. --- sys/conf/NOTES | 3 +++ sys/conf/files | 1 + sys/modules/Makefile | 1 + sys/modules/if_edsc/Makefile | 8 ++++++++ 4 files changed, 13 insertions(+) create mode 100644 sys/modules/if_edsc/Makefile (limited to 'sys') 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 -- cgit v1.1