From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 29 23:38:28 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 556EF16A4CE for ; Wed, 29 Oct 2003 23:38:28 -0800 (PST) Received: from correo.tid.es (tidos.tid.es [193.145.240.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3966643F93 for ; Wed, 29 Oct 2003 23:38:27 -0800 (PST) (envelope-from igf@tid.es) Received: from conversion-daemon.tid.hi.inet by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) id <0HNK00H01753R9@tid.hi.inet> for freebsd-hackers@freebsd.org; Thu, 30 Oct 2003 08:38:26 +0100 (MET) Received: from tid.es (sophia.hi.inet [10.95.43.243]) by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HNK001D57W1DU@tid.hi.inet>; Thu, 30 Oct 2003 08:38:26 +0100 (MET) Date: Thu, 30 Oct 2003 08:40:20 +0100 From: Isaac Gelado To: Dan Nelson Message-id: <3FA0C064.102@tid.es> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 8BIT X-Accept-Language: es-es, es, en-us User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0 References: <3F9FAE4D.3020500@tid.es> <20031029162447.GE2284@dan.emsphone.com> 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: Thu, 30 Oct 2003 07:38:28 -0000 Dan Nelson escribió: > 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? > I set it to 0, so PCapLib should return the packet inmediatly. Can the problem be in the PCapLib implementation? -- __________________________________________________________ | Isaac Gelado | | | Telefónica I+D | Tlf 983367649 | | Paq. Tec. de Boecillo | | | Valladolid | igf@tid.es | |_______________________________|__________________________| | As gold which he cannot spend will make no man rich | | so knowledge which he cannot apply will make no man wise | |__________________________________________________________|