From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 25 20:26:37 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E4F616A4CE for ; Fri, 25 Jun 2004 20:26:37 +0000 (GMT) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BA4343D3F for ; Fri, 25 Jun 2004 20:26:37 +0000 (GMT) (envelope-from vlm@netli.com) Received: (qmail 11460 invoked by uid 84); 25 Jun 2004 20:24:30 -0000 Received: from vlm@netli.com by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.178351 secs); 25 Jun 2004 20:24:30 -0000 Received: from unknown (HELO netli.com) (172.17.1.12) by mx01-pal-lan.netli.lan with SMTP; 25 Jun 2004 20:24:30 -0000 Message-ID: <40DC8A15.7080700@netli.com> Date: Fri, 25 Jun 2004 13:24:53 -0700 From: Lev Walkin Organization: Netli, Inc. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040307 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Ivan Voras References: <40DC83A0.3060509@fer.hr> <40DC8742.5000100@netli.com> <40DC8948.9090406@fer.hr> In-Reply-To: <40DC8948.9090406@fer.hr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: PF_PACKET X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2004 20:26:37 -0000 Ivan Voras wrote: > Lev Walkin wrote: > >> Ivan Voras wrote: >> >>> I'm trying to port open1x xsupplicant, and it uses PF_PACKET to get >>> relevant packets (of appropriate ethernet type). I looked around in >>> /usr/include and can't find the support, at least not under that and >>> similar names. Is there support for it in FreeBSD? >>> >>> (I only need to catch & send a few packets now and then, not anything >>> complex or bandwidth demanding). >> >> >> >> man bpf > > > > I've no experience with bpf, but It looks way too complex. And besides, > the program is relaying on using sendto/recvfrom all over the place. it is actually pretty simple. man pcap. this is a wrapper around bpf which lets you do it in a couple lines of C code. -- Lev Walkin vlm@netli.com