On Wed, Apr 12, 2000 at 10:44:49AM -0400, [EMAIL PROTECTED] wrote:
> Anyone (especially simulation types) have any examples of using raw ethernet? I
> am trying to connect a Evans & Sutherland ESIG 5350 Image generator and they use
> raw ethernet. I am running Redhat 6.0/6.1 SMP.
> 
> I read the network newsgroups and cobbled up some code but it doesn't compile.
> Man 4 packet refers to using a sockaddr_ll struct to pass the MAC address but
> bind, sendto, and recvfrom all complain about type errors because they want a
> sockaddr, not a sockaddr_ll.


You generally may freely cast struct sockaddr_* to struct sockaddr, which is
appropriate here.


> Also, what is a sll_ifindex?

ifindex is the network interface index.  Each interface has an index, such as
lo=0, eth0=1, eth1=2, etc.  This is necessary in order for the kernel to send
your packet out the correct interface.  You can match interface names to
indices using the SIOCGIFINDEX ioctl.



dave...

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to