summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbp <bp@FreeBSD.org>1999-12-13 16:42:17 +0000
committerbp <bp@FreeBSD.org>1999-12-13 16:42:17 +0000
commit908abcafb033218f7525649a6f62e9f9db365cb2 (patch)
treec3fbde8d1562afe475e77571db83343d9fc6504a /sys
parentbdd5e708abcc1091aa3f80e22667625310028bf0 (diff)
downloadFreeBSD-src-908abcafb033218f7525649a6f62e9f9db365cb2.zip
FreeBSD-src-908abcafb033218f7525649a6f62e9f9db365cb2.tar.gz
Add module for if_ef driver and make it compile.
Diffstat (limited to 'sys')
-rw-r--r--sys/modules/Makefile4
-rw-r--r--sys/modules/if_ef/Makefile52
-rw-r--r--sys/modules/if_ef/ef.4103
3 files changed, 157 insertions, 2 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 9b50ae9..4f73ef8 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -2,8 +2,8 @@
# XXX present but broken: ip_mroute_mod pcic
-SUBDIR= aha amr ccd cd9660 coda dc fdesc fxp if_disc if_ppp if_sl if_tun \
- ipfilter ipfw joy kernfs md mfs mii mlx msdos \
+SUBDIR= aha amr ccd cd9660 coda dc fdesc fxp if_disc if_ef if_ppp if_sl \
+ if_tun ipfilter ipfw joy kernfs md mfs mii mlx msdos \
ncp netgraph nfs ntfs nullfs \
nwfs portal procfs rl sf sis sk ste ti tl \
ugen uhid ukbd ulpt umapfs umass umodem ums union usb vn vr wb xl
diff --git a/sys/modules/if_ef/Makefile b/sys/modules/if_ef/Makefile
new file mode 100644
index 0000000..eb0286c
--- /dev/null
+++ b/sys/modules/if_ef/Makefile
@@ -0,0 +1,52 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../net
+
+KMOD= if_ef
+SRCS= if_ef.c opt_ipx.h opt_inet.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_8023=
+ETHER_8022=
+ETHER_SNAP=
+
+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
+
+opt_inet.h:
+ echo "#define INET 1" > opt_inet.h
+
+opt_ipx.h:
+ echo "#define IPX 1" > opt_ipx.h
+
+load: all
+ /sbin/kldload ./${PROG}
+
+unload:
+ /sbin/kldunload ${PROG}
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/if_ef/ef.4 b/sys/modules/if_ef/ef.4
new file mode 100644
index 0000000..6165e06
--- /dev/null
+++ b/sys/modules/if_ef/ef.4
@@ -0,0 +1,103 @@
+.\"
+.\" Copyright (c) 1999, Boris Popov
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 20, 1999
+.Dt EF 4
+.Os BSD
+.Sh NAME
+.Nm ef
+.Nd
+pseudo-device driver provides support for multiple ethernet frame types.
+.Sh SYNOPSIS
+.Cd "kldload if_ef.ko"
+.Sh DESCRIPTION
+The
+.Nm
+pseudo-device driver clones each ethernet type device with four
+additional interfaces. Each of them capable to send or receive only
+one predefined frame type.
+.Pp
+Names for the new interfaces created by adding
+.Ar fN
+suffix to an existing device name. Where
+.Ar N
+is a device unit which can have one of the following values:
+.Bd -literal -offset indent
+0 interface with an Ethernet_II frame
+1 interface with a Novell Ethernet_802.3 frame
+2 interface with an Ethernet_802.2 frame
+3 interface with an Ethernet_802.2/SNAP frame support.
+.Ed
+.Pp
+For example, device
+.Ar ed0
+will be populated with four devices:
+.Ar ed0f0 ,
+.Ar ed0f1 ,
+.Ar ed0f2
+and
+.Ar ed0f3 .
+.Pp
+After that, each device can be configured as usually:
+.Dl # ifconfig ed0f1 ipx 0x105
+This will configure IPX protocol with network number
+.Ar 0x105
+and
+.Ar Ethernet_802.3
+frame type.
+.Pp
+Please note that it is impossible to configure IPX protocol on the 'raw'
+.Ar ed0
+device after
+.Ar if_ef.ko
+driver loaded.
+.Sh EXAMPLES
+The
+.Nm
+driver can be loaded via
+.Xr loader.conf 5
+file:
+.Dl if_ef_load="YES"
+.Pp
+In this case an ordinary interface configuration commands can be used
+in
+.Xr rc.conf 5
+file:
+.Dl network_interfaces="ed2 lo0 tun0 ed2f0 ed2f1"
+.Dl ifconfig_ed2f0_ipx="ipx 0x101"
+.Dl ifconfig_ed2f1_ipx="ipx 0x102"
+.Sh DIAGNOSTICS
+None.
+.Sh CAVEATS
+Avoid to configuring 'raw' ethernet device for IPX protocol after
+.Nm
+driver is loaded.
+.Sh SEE ALSO
+.Xr ipx 3 ,
+.Xr ifconfig 8
+.Sh AUTHOR
+Boris Popov.
OpenPOWER on IntegriCloud