Jeff Ward wrote:
> I am looking for a way to put an ethernet device in a sort of
> "character device" mode where I can simply read and write to it
> without going through the TCP/IP stack. I am trying to test some
> network hardware and right now I only care that what comes out of it
> is identical to what went in to it. Does anyone have any ideas?
>
> -Jeff Ward
There is no single character mode in Ethernet - there is a minimum
packet length needed to make the collision detection to work.
The lowest-level access to the Ethernet interface is to
use the raw sockets, where you can specify each byte to
transfer separately. To make the other end of the connection
to respond, you need to provide the 14 byte Ethernet header
in the proper format (6 bytes destination MAC, 6 bytes source
MAC and 2 bytes type / length).
HTH
Tauno Voipio
tauno voipio (at) iki fi
|