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


Hi Dave

To do this you need bpf. Thats not currently part of the stack. I
think you have to properly integrate your protocol stack by adding in
support in ether_input and ether_output. 

As for documentation i suggest "TCP/IP Illustrated, Volume 2. The
Implementation." by Gary T Wright and W. R Stevens. This is The book
about the insides of the BSD network stack.

      Andrew


On Mon, Nov 26, 2001 at 12:03:53PM -0000, David Webster wrote:
> Hi,
> 	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. Can I use the sockets api to send/receive
> Ethernet frames with the required Ethernet type and the (known)
> destiniation MAC address of the device? I know there's a RAW socket type
> but am I right in thinking this is raw IP frames rather than raw
> Ethernet frames?
> 	If I can't use sockets I'll have to modify the Ethernet driver
> (if_ethersubr.c ether_output() and ether_input()) to handle the new
> Ethernet type and then call into my own protocol driver? I assume there
> is no generic way to add support for additional Ethernet types?  If I
> can do this it would obviously be preferable for me to integrate my new
> protocol into the sockets api - so my application can use the standard
> sockets api to send / receive the protocol - in effect defining a new
> sockets protocol family. Can this be done? Can anybody point me at
> documentation/information on how to do this?
> 
> 	Many thanks
> 		Dave Webster
> 


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