From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 29 08:24:49 2003 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 6B2CF16A4D1 for ; Wed, 29 Oct 2003 08:24:49 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id B61B143FDD for ; Wed, 29 Oct 2003 08:24:48 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h9TGOlcN031248; Wed, 29 Oct 2003 10:24:47 -0600 (CST) (envelope-from dan) Date: Wed, 29 Oct 2003 10:24:47 -0600 From: Dan Nelson To: Isaac Gelado Message-ID: <20031029162447.GE2284@dan.emsphone.com> References: <3F9FAE4D.3020500@tid.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F9FAE4D.3020500@tid.es> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org Subject: Re: POSIX Threads 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: Wed, 29 Oct 2003 16:24:49 -0000 In the last episode (Oct 29), Isaac Gelado said: > I am developing a distributed application based on MICO (mico-2.3.9), > which uses Packet Capture Library (PCapLib). > > In the code, I create a posix thread to execute the pcap_loop > function (this function waits until certain number of packets have > been captured or infinite if the number is 0). When PCapLib captures > a packet and pcap_loop is running it calls to a handle function > inside the same thread. > > This schema is working correctly in a linux machine, so when a packet > is captured an CORBA event is sent to clients. But, when the server > is running under FreeBSD 5.0, the handle function isn't executed when > a packet is received. In FreeBSD the handle function is executed, for > each packet, after certain time (maybe when the buffer of PCapLib is > full), which is a problem because it sends events too fast to clients > so the CORBA event service fails. When you called pcap_open_live, what timeout did you set? -- Dan Nelson dnelson@allantgroup.com