Ethernet (Raw)
Joel Sherrill
joel.sherrill at OARcorp.com
Tue Mar 25 19:46:08 UTC 2003
"Smith, Gene" wrote:
>
> > > > If not, then can the tap design/interface be used as a model to
> > > > provide the write side?
> > >
> > > I don't know to both questions. if_tap operates at the very bottom
> > > layer of the ip stack, just after the driver submits the ethernet
> > > frame to it. The sending side looks fairly involved with a
> > > per-interface send queue. I would be suprised if there
> > wasn't a hook
> > > in there someplace.
>
> So it looks like I can use the 'tap' thing to receive frames via its
> callback function but sending eth frames may or may not contain a hook?
>
> > > Do you know if SOCK_RAW is supported by the
> > > stack?
>
> I don't think raw sockets are what I am looking for since I need to send eth
> frames based on destination mac address and don't want any ip header stuff
> in front. (But you may already know this.)
This reference makes me think that SOCK_RAW might work for you.
http://www.sunmanagers.org/archives/1991/0162.html
It points to an example which may or may not be current. I found a
Linux page which said that ping responses are generated by a user land
program using SOCK_RAW so you might be able to get by.
> -gene
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list