Date: Fri, 5 Oct 2007 18:41:28 +0400 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: Vinod VM <vinuvm@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: cant compile - undefined reference to `bpfattach' Message-ID: <20071005144128.GU971@void.codelabs.ru> In-Reply-To: <8de278a20710050659y55cbc312le303f1b44452b605@mail.gmail.com> References: <8de278a20710050424t68cf95eap99cd34a13e8ce594@mail.gmail.com> <20071005120406.GQ971@void.codelabs.ru> <8de278a20710050659y55cbc312le303f1b44452b605@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Fri, Oct 05, 2007 at 07:29:35PM +0530, Vinod VM wrote: > Yes. I am trying to write a program to capture from an interface and > inject them to another, kind of like bcrelay functionality in poptop > [http://www.poptop.org/] You can examine the divert sockets in FreeBSD: seems like that this will suite you too. 'man 4 divert' will give you some clues. The example of divert sockets usage is the natd program. > > If you're trying to capture packets, you'll probably want to > > consult the pcap(3) manual page. > > Thanks! Does it support injecting packets into an interface? Yes, pcap_inject and pcap_sendpacket. But this can be done via the raw sockets too. Again, 'man 3 pcap' is your friend ;)) -- Eygene
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071005144128.GU971>