This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "really raw" sockets


On Mon, Nov 26, 2001 at 12:03:53PM -0000, David Webster wrote:

> I need to write some software to communicate with an Ethernet
> device using a protocol that's not TCP/IP based. The devices
> use their own 802.3 Ethernet Type.

I've done this with my Ethernet driver by having it impliment
the standard IO device API (cyg_io_lookup/read/write/...) in
addition to the API used by the TCP/IP stack.  At the time I
did it, the raw packet interface was unsupported by the TCP/IP
stack, and I wanted my raw-mode to work even if the TCP/IP
stack wasn't installed.

I'm only interested in a single "custom" Ethernet proto number,
so I use cyg_io_set_config to select the proto number for
receive purposes, as well as optionally setting the MAC
address.  Raw frames are then sent/received with
cyg_io_read/write calls.

-- 
Grant Edwards
grante@visi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]