[Linux-disciples] Recognizing a new NIC

Stephen R Laniel steve at laniels.org
Tue May 17 22:52:31 EDT 2005


On Wed, Jan 26, 2005 at 10:11:27AM -0500, Adam Rosi-Kessel wrote:
> They're not devices. They're interfaces.  My handwaving understanding is 
> that there is an additional layer with an interface: bits going in and 
> out of a network interface like eth0 are processed by the linux 
> networking subsystem before they're actually passed on to the real 
> 'device', which is the network card.
> 
> For comparison, you can output bits directly to, e.g., your serial or 
> parallel ports, which are devices.  The kernel just sends the bits out 
> the device as it gets them.

I've been thinking about this today. I guess I still don't
really get it. There's no reason why I couldn't send a
stream of bits directly to my network card. Those bits would
be nonsense, most likely, and the network card would
silently dispose of them. As far as I understand it, most of
the processing that turns raw bits into intelligible
network-interface traffic happens in software: I put
together an HTTP request for bostoncoop.net, which gets
turned through a long sequence of calls into a bunch of
Ethernet packets. The only thing that the NIC sees are
Ethernet packets; it doesn't care that there's TCP inside of
the Ethernet header or HTTP inside of the TCP.

So I don't see why I shouldn't just be able to do

echo foo > /dev/eth0

If 'foo' is meaningless to the Ethernet interface, either
this fails silently or I get some kind of error. But in
principle I see no reason why I shouldn't be able to pump
bits right to the card.

The argument's the same as being able to send raw bits to a
printer. Most raw bits will produce garbage in the printer,
whereas some will contain (for instance) meaningful
PostScript. But there's no reason why I shouldn't be able to
send junk if such is my wont.

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050517/9ff18ab5/attachment.pgp


More information about the Linux-disciples mailing list