Date: Fri, 5 Oct 2007 16:04:07 +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: <20071005120406.GQ971@void.codelabs.ru> In-Reply-To: <8de278a20710050424t68cf95eap99cd34a13e8ce594@mail.gmail.com> References: <8de278a20710050424t68cf95eap99cd34a13e8ce594@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Good day. Fri, Oct 05, 2007 at 04:54:27PM +0530, Vinod VM wrote: > I'm having trouble in compiling my code with gcc on release 6.2 > > I've included the following headers, > > stdlib.h > sys/types.h > sys/socket.h > net/if.h > net/if_var.h > net/if_types.h > net/bpf.h > > When compiling the code, i'm getting the following error message > > /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? If you're trying to capture packets, you'll probably want to consult the pcap(3) manual page. -- Eygene
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071005120406.GQ971>