From owner-freebsd-net@FreeBSD.ORG Fri Oct 5 17:57:47 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9537616A417 for ; Fri, 5 Oct 2007 17:57:47 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outZ.internet-mail-service.net (outZ.internet-mail-service.net [216.240.47.249]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD5513C480 for ; Fri, 5 Oct 2007 17:57:47 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 05 Oct 2007 10:57:46 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 82DEE1265C7; Fri, 5 Oct 2007 10:57:45 -0700 (PDT) Message-ID: <47067B16.4020907@elischer.org> Date: Fri, 05 Oct 2007 10:57:42 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Vinod VM References: <8de278a20710050424t68cf95eap99cd34a13e8ce594@mail.gmail.com> <20071005120406.GQ971@void.codelabs.ru> <8de278a20710050659y55cbc312le303f1b44452b605@mail.gmail.com> In-Reply-To: <8de278a20710050659y55cbc312le303f1b44452b605@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: cant compile - undefined reference to `bpfattach' X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2007 17:57:47 -0000 Vinod VM wrote: > Thanks for the reply! > > On 10/5/07, Eygene Ryabinkin wrote: >> Fri, Oct 05, 2007 at 04:54:27PM +0530, Vinod VM wrote: >>> /var/tmp//ccphxfRO.o(.text+0x3c): In function `main': >>> : undefined reference to `bpfattach' >> If I am correct, bpfattach is the kernel-level function. And you're >> trying to write some user-space utility, aren't you? > > 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/] > >> 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? hmmm have a look at netgraph at least some of the following node types may be useful to you, and writing new ones is easy. ng_async(4), ng_atm(4), ng_atmllc(4), ng_atmpif(4), ng_bluetooth(4), ng_bpf(4), ng_bridge(4), ng_bt3c(4), ng_btsocket(4), ng_cisco(4), ng_device(4), ng_echo(4), ng_eiface(4), ng_etf(4), ng_ether(4), ng_fec(4), ng_frame_relay(4), ng_gif(4), ng_gif_demux(4), ng_h4(4), ng_hci(4), ng_hole(4), ng_hub(4), ng_iface(4), ng_ip_input(4), ng_ksocket(4), ng_l2cap(4), ng_l2tp(4), ng_lmi(4), ng_mppc(4), ng_netflow(4), ng_one2many(4), ng_ppp(4), ng_pppoe(4), ng_pptpgre(4), ng_rfc1490(4), ng_socket(4), ng_split(4), ng_sppp(4), ng_sscfu(4), ng_sscop(4), ng_tee(4), ng_tty(4), ng_ubt(4), ng_UI(4), ng_uni(4), ng_vjc(4), ng_vlan(4), ngctl(8), nghook(8) > > vinod > _______________________________________________ > 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"