How to receive IP and RAW frames on the same ethernet device ?

Wolfgang Denk wd at denx.de
Tue Sep 10 05:34:32 EST 2002


Dear Gérard,

in message <000001c25825$a572e5c0$3101a8c0 at DOMAIN> you wrote:
>
> I work on a custom 860 board with Linux 2.2.14.

What a day is this? Seems everybody using this old  stuff  is  active
today ;-)

> I want to receive and send IP and RAW frames simultaneously on the same
> ethernet device.

Use a raw socket; something like

	socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));

should be all that's needed; get yourself a copy  of  libnet,  and/or
libpcap.


However, I have no idea if this ever worked in 2.2.14; you might want
to use a more recent kernel version.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
As far as we know, our computer has never had an undetected error.
		                                           -- Weisert

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list