From owner-freebsd-net@FreeBSD.ORG Fri Oct 5 13:59:41 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 A182216A417 for ; Fri, 5 Oct 2007 13:59:41 +0000 (UTC) (envelope-from vinuvm@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.239]) by mx1.freebsd.org (Postfix) with ESMTP id 5368813C459 for ; Fri, 5 Oct 2007 13:59:41 +0000 (UTC) (envelope-from vinuvm@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so395964nzf for ; Fri, 05 Oct 2007 06:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ok2z0C7xIcp0j0G1yaWdxwRBxBj425/CDsdurOk2p74=; b=GWK87yvfVNIQauuAfB1zLoaGEk0q1bOVOcl1jxUWLXNdfMX5u0k2CFz24uIyfqQkMVvhiI8PY12JpeDgSCbz0DG1BGvpia03n7P1dJk3ZY5QHicGjw84EOD4ZosFkoJKK2WJdhylInDjJePpXeZHa2n1wQOvajJxCmId4OtiEyM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pPgvE5zO2Q2dD+zQsfWBvpzR7cXCFk2LnxKsT2yF64kSiz+lr2rmrbMPWJh46o0KJ8UBbxSVU4DoV2CCuE42I5jeFo60VsRtr7+wNaT3Lk1gD+vOWjdFn+LpF5PRKsTCdYKk+H9bAEucgs5L8aY9pbS/YNqQuzvT/T8vZEAny1U= Received: by 10.65.40.16 with SMTP id s16mr18230252qbj.1191592775933; Fri, 05 Oct 2007 06:59:35 -0700 (PDT) Received: by 10.65.203.1 with HTTP; Fri, 5 Oct 2007 06:59:35 -0700 (PDT) Message-ID: <8de278a20710050659y55cbc312le303f1b44452b605@mail.gmail.com> Date: Fri, 5 Oct 2007 19:29:35 +0530 From: "Vinod VM" To: "Eygene Ryabinkin" In-Reply-To: <20071005120406.GQ971@void.codelabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8de278a20710050424t68cf95eap99cd34a13e8ce594@mail.gmail.com> <20071005120406.GQ971@void.codelabs.ru> 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 13:59:41 -0000 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? vinod