tcpdump mailing list archives

Re: pcap_open_live error


From: Bowser Jason S Contr AFRL/IFTA <Jason.Bowser () wpafb af mil>
Date: Thu, 24 Jun 2004 12:56:26 -0400

I have an update to the problem.  i no longer think that it is a irix issue as i have compiled this code on a redhat 
9.0 box as well as a mandrake box.  the problem still exists
 
Please any help is appreciated
 
thank you
jason

-----Original Message-----
From: tcpdump-workers-owner () lists tcpdump org [mailto:tcpdump-workers-owner () lists tcpdump org] On Behalf Of 
Bowser Jason S Contr AFRL/IFTA
Sent: Wednesday, June 23, 2004 3:20 PM
To: 'tcpdump-workers () lists tcpdump org'
Subject: [tcpdump-workers] pcap_open_live error


Hey guys, i posted this problem yesterday and have a few more questions
 
The original problem is this
 
I am writing a program on an IRIX 6.5 machine that uses the libpcap to grab packets.  That usually works fine. However 
i have now decided that this program needs to have multiple child processes.  So i decided to have each child call the 
"pcap_open_live" function.  This is where the problem stems.  IF i comment out the "pcap_loop" line that EACH child 
runs then pcap doesnt return any error.  Remember the pcap_loop call is AFTER the "pcap_open_live" call.  However if 
that line is enabled, so i can use pcap for packet capture, i get an error on the "pcap_open_live" call.  the error is
        
            pcap_open_live snoop bind  Cant assign requested address
 
I have been working on this problem and have some questions.  
 
1)  Why would it work when the pcap_loop is commented out, ie i have tried it with up to 10 children when the pcap_loop 
line is commented out and it works fine.. ie no error.
 
2) Why would a line that is "after" the code that is generating the error cause this.  Basically what i am wondering is 
 when all the code is "enabled"  the pcap_loop line causes the pcap_open_live call BEFORE it to fail
 
3)Could it be that having multiple process call the pcap_open_live not work, but it that is the case then why would 
everything seem to be ok when the pcap_loop line is commented out.
 
I would appreciate any help,  i am already try to get ahold of SGI to see if it is something wierd...per an early 
suggestions  Thank you by the way
 
Jason


Current thread: