Re: User-space controlled raw ethernet - Is this the way to go?



phil-news-nospam@xxxxxxxx schrieb:

I've said this years ago. It applies here, too. All network interfaces
should have been device nodes. Then you could let a process open one of
them in the normal I/O way (as long as it is not busy from being an active
network interface). An ethernet port is really not much more than a fancy
serial port.

With Linux, such a function is both easy to implement and relatively
useless. From kernel's point of view, the actual port could be exposed at
most the way you'll described: if the Linux kernel does not "claim" the
interface, a userspace program may do.

The network code is one of the biggest in-kernel applications Linux have.
All the address handling, filtering, routing is done within this kernel
application -- mostly for speed reasons, Linux' networking is really fast
because of it.

In a microkernel, one certainly *would* go the way you described, exposing
the raw interface to the userspace and let a demon do all the work, but
within Linux, passing all the ethernet data to a device node is just a
function without too many use cases.

Kind regards

Jan


.



Relevant Pages