From owner-freebsd-net@FreeBSD.ORG Mon Mar 21 23:26:36 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AB3F16A4CE; Mon, 21 Mar 2005 23:26:36 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09A2B43D2F; Mon, 21 Mar 2005 23:26:36 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 7CB187A41E; Mon, 21 Mar 2005 15:26:35 -0800 (PST) Message-ID: <423F582B.4090207@elischer.org> Date: Mon, 21 Mar 2005 15:26:35 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en, hu MIME-Version: 1.0 To: Giorgos Keramidas References: <001001c52e16$b3e8bde0$73942fc2@Trantor> <20050321134214.GB94380@orion.daedalusnetworks.priv> In-Reply-To: <20050321134214.GB94380@orion.daedalusnetworks.priv> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-net@freebsd.org cc: Patrik Arlos Subject: Re: Sending Ethernet frames X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2005 23:26:36 -0000 Giorgos Keramidas wrote: >On 2005-03-21 14:05, 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. >> >>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 "freebsd-net-unsubscribe@freebsd.org" > >