Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Mar 2005 08:40:16 -0500
From:      "Don Bowman" <don@SANDVINE.com>
To:        "Patrik Arlos" <Patrik.Arlos@bth.se>, <freebsd-net@freebsd.org>
Subject:   RE: Sending Ethernet frames
Message-ID:  <2BCEB9A37A4D354AA276774EE13FB8C23A6720@mailserver.sandvine.com>

next in thread | raw e-mail | index | archive | help

From: owner-freebsd-net@freebsd.org On Behalf Of Patrik Arlos
> 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? 

You can chmod +w on /dev/bpf* and then open & write to a bpf
device.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2BCEB9A37A4D354AA276774EE13FB8C23A6720>