From owner-freebsd-net@FreeBSD.ORG Sat May 21 04:15:48 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86CD816A4CE for ; Sat, 21 May 2005 04:15:48 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00EA843D64 for ; Sat, 21 May 2005 04:15:47 +0000 (GMT) (envelope-from jsimola@gmail.com) Received: by wproxy.gmail.com with SMTP id 55so31717wri for ; Fri, 20 May 2005 21:15:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OmURD4vi0MGOJ95xkEHTpoApZYy2xeMZWJeUxXmsPqLlnycbwxfdyzrfvzyI4HVh46Ft8mJy6imZTPD57M2H10WxXhGHWcioR59StIe5/TvwCr6VbMmnUM0cSEd+CnnBlsIsfV5LkNsHiFhiup8y+GfUxQYEtRexwSo25neoj9g= Received: by 10.54.61.12 with SMTP id j12mr1548163wra; Fri, 20 May 2005 21:15:47 -0700 (PDT) Received: by 10.54.39.65 with HTTP; Fri, 20 May 2005 21:15:47 -0700 (PDT) Message-ID: <8eea040805052021151f0cdce7@mail.gmail.com> Date: Fri, 20 May 2005 21:15:47 -0700 From: Jon Simola To: Daniel Valencia In-Reply-To: <20050521031625.77340.qmail@web53907.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050521031625.77340.qmail@web53907.mail.yahoo.com> cc: freebsd-net@freebsd.org Subject: Re: sending MAC packets --- again, and again X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jon@abccomm.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2005 04:15:48 -0000 On 5/20/05, Daniel Valencia wrote: > my sniffer just stalls and eventually will report a totally unrelated mes= sage. ... > handle =3D pcap_open_live( "xl0", BUFSIZ, 1, 0, errbuf ); Uh, you're asking it to wait forever to see a packet. I don't see a #define in there for BUFSIZ, so you might be asking it to catch zero bytes. And what is the "totally unrelsated message"? I'd try using pcap_loop() or friends so you can catch and examine more than a single packet. And don't forget to call pcap_close() at the end, I'm not sure how polite pcap is about leaving dangling bpf devices. --=20 Jon Simola Systems Administrator ABC Communications