Sending Ethernet frames

Patrik Arlos Patrik.Arlos at bth.se
Mon Mar 21 05:06:08 PST 2005


Hi,

 

I'm trying to send 'raw' Ethernet frames. I have however not found any
examples of how to do this in BSD. 

Is it possible to open a 'ethernet' socket, similar to a AF_INET?  I need to
be able to control the destination address and type/len field in the
Ethernet header. 

In Linux it is possible open a SOCK_RAW and bind it to a particular
interface, I've tried to use the sockadd_dl but in this case bind dies with
error 22, any way to do this? 

 

 

/Patrik

 



More information about the freebsd-net mailing list