Subject: CVS commit: src/sys/lkm/net/ethfoo/ethfoo
To: None <source-changes@NetBSD.org>
From: Quentin Garnier <cube@netbsd.org>
List: source-changes
Date: 12/12/2004 21:46:58
Module Name:	src
Committed By:	cube
Date:		Sun Dec 12 21:46:58 UTC 2004

Modified Files:
	src/sys/lkm/net/ethfoo/ethfoo: Makefile ethfoo_lkm.c
Added Files:
	src/sys/lkm/net/ethfoo/ethfoo: ethfoo.h

Log Message:
Turn ethfoo(4) into a cloning device, following the MOVEFD semantics (like
bpf(4)).

While doing that, still keep around the full cdevsw interface, so that the
ethfoo interfaces can be accessed either through /dev/ethfooN or through
the cloning device /dev/ethfoo (whose minor number is 0xfffff).  Interfaces
created through the cloning device are destroyed at close() time.

Also add an ioctl() to be used by the cloning interface user to know the
minor number of the created interface, so it can be manipulated later to
get an address set and turned up (otherwise EHOSTDOWN is returned on read
and write).

Document some of the new functions, but read, write, ioctl and kqfilter
still has to be commented.


To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 src/sys/lkm/net/ethfoo/ethfoo/Makefile
cvs rdiff -r0 -r1.1 src/sys/lkm/net/ethfoo/ethfoo/ethfoo.h
cvs rdiff -r1.8 -r1.9 src/sys/lkm/net/ethfoo/ethfoo/ethfoo_lkm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.