RE: Sending Ethernet frames
From: [EMAIL PROTECTED] 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. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Sending Ethernet frames
On 2005-03-21 14:05, Patrik Arlos [EMAIL PROTECTED] wrote: 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? It may be a good idea to investigate if libnet does your job. The ports version (net/libnet-devel) is based on libnet-1.1.2.1. Mike Schiffman, who writes libnet may have a newer version on his site: http://www.packetfactory.net/projects/libnet/ If you do decide to use libnet, I also have a few local patches that may be interesting; mostly updates lto ibnet's build tree that use the latest automake and autoconf or changes to libtoolize libnet; these are local hacks though. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Sending Ethernet frames
On Mon, Mar 21, 2005 at 02:05:48PM +0100, Patrik Arlos wrote: I'm trying to send 'raw' Ethernet frames. I have however not found any examples of how to do this in BSD. Consider using bpf(4) in read/write mode. BMS ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Sending Ethernet frames
Giorgos Keramidas wrote: On 2005-03-21 14:05, Patrik Arlos [EMAIL PROTECTED] wrote: 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? It may be a good idea to investigate if libnet does your job. The ports version (net/libnet-devel) is based on libnet-1.1.2.1. Mike Schiffman, who writes libnet may have a newer version on his site: http://www.packetfactory.net/projects/libnet/ If you do decide to use libnet, I also have a few local patches that may be interesting; mostly updates lto ibnet's build tree that use the latest automake and autoconf or changes to libtoolize libnet; these are local hacks though. you can also do it via netgraph(4) ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to [EMAIL PROTECTED]