From owner-freebsd-net Fri Dec 7 2:39:19 2001 Delivered-To: freebsd-net@freebsd.org Received: from sj-msg-core-4.cisco.com (sj-msg-core-4.cisco.com [171.71.163.10]) by hub.freebsd.org (Postfix) with ESMTP id 056AF37B41B for ; Fri, 7 Dec 2001 02:39:16 -0800 (PST) Received: from europe.cisco.com (europe.cisco.com [144.254.52.73]) by sj-msg-core-4.cisco.com (8.11.3/8.9.1) with ESMTP id fB7AdE920438 for ; Fri, 7 Dec 2001 02:39:14 -0800 (PST) Received: from cobweb.example.org (dhcp-nic-val-26-117.cisco.com [64.103.26.117]) by europe.cisco.com (8.8.8+Sun/8.8.8) with SMTP id LAA15199 for ; Fri, 7 Dec 2001 11:39:10 +0100 (MET) Received: (qmail 21684 invoked by uid 1000); 7 Dec 2001 10:39:20 -0000 Date: Fri, 7 Dec 2001 11:39:20 +0100 From: Marco Molteni To: freebsd-net@FreeBSD.ORG Cc: Doug Ambrisko Subject: Re: pcap_open_live() takes 1 sec to complete? Message-ID: <20011207113920.B21525@cobweb.example.org> References: <20011206141330.A17077@cobweb.example.org> <200112061823.fB6INsP49553@ambrisko.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200112061823.fB6INsP49553@ambrisko.com>; from ambrisko@ambrisko.com on Thu, Dec 06, 2001 at 10:23:52AM -0800 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2001-12-06, Doug Ambrisko wrote: > Marco Molteni writes: > | I am writing a small program that does a pcap_open_live() on the > | Aironet an device, PCMCIA mode. System is a recent -stable on a > | Toshiba Portege 7200 laptop. > | > | Now, pcap_open_live() takes more than 1 sec to return. Is this long > | time expected? > > Hmm, don't seem to recall that. My system is busy doing a make world > and stuff. I just tried it and on my busy machine it was less then > a second. Note I was not in RFMON mode. It might take longer when > I have to switch into RFMON mode. I can try that later. You might > try to compare it without RFMON if you are using RFMON. Actually I am in RFMON mode. Also, I found something strange: the first time that pcap_open_live() is called, it is fast (50 ms), but subsequent calls are slow (1000 ms). If I remove and reinsert the card, first call is once more fast. # ./airomon an0 set monitor mode: 23 ms pcap_open_live: 52 ms ^C # ./airomon an0 set monitor mode: 24 ms pcap_open_live: 1089 ms ^C > FYI, I put a sample BPF packet dumper up at: > http://www.ambrisko.com/doug/an/dump_packet/ > I used it to debug the 802.11 packet problem and to look at the raw > Aironet Header packets. > > You'll see it has some test code to check gap length. > > This is on -stable with my 802.11 aligment fix. thanks a lot for this, I will try it out. marco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message