tcpdump mailing list archives

pcap_dispatch error on AIX 5.3 ...


From: Mehlam Shakir <mehlam2001 () yahoo com>
Date: Sun, 7 May 2006 18:53:05 -0700 (PDT)

Hi all:
 
We are experiencing a bit of problem on AIX with our app that uses libpcap for packet capture.  It appears to be 
related to multi-threading since neither "tcpdump" nor our single-threaded test programs have any issues.
 
When we run our multi-threaded application we can't capture any packets and instead log the following error, 
 
05/ 7/2006 18:29:21 Debug       : pcap_dispatch error:: read: Bad file number

 
Using "lsof" we verified that /dev/bpf0 was open.
 
However, some majic happens when we run "truss -p <app_pid>".
With our application still running (previously NOT capturing pkts) it suddenly starts capturing packets normally even 
if truss is subsequently stopped.  Once we stop our application and restart we have the same issue until we start truss.
 
It seems truss initializes something (we can't figure out what) and makes our application work. 
 
Any idea what is happening here?  We will be happy to send more information.  
 
Also, we would prefer to use native libpcap (one that comes with AIX), but, tcpdump-workers have documented a list of 
issues on AIX 5.2 (which probably exist on AIX 5.3).  We need to support our app on both AIX 5.2 and 5.3.  What do you 
recommend, native AIX or a BSD release, 0.8.3?
 
Thanks,
 
- mel-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: