[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Regarding pcap_next and Thread
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Regarding pcap_next and Thread
- From: durga prasad <hidurga_(_at_)_postmark_(_dot_)_net>
- Date: Sun, 17 Oct 2004 08:24:26 +0000
I am implementing a Wireless Sniffer.
In main am dumping the packets using pcap_next() and in separate
Thread am opening the dumped file , reading ( using pcap_next() )and
analysing one packet at a time simultaneously.
The problem here is initially upto 100 or 150 packets the dumping and
analysing the packets are going in pararell. I mean whatever packets
its dumped ( main process ) the Thread is reading and analysing them.
after some time the main Thread is dumping more packets and
simultaneously the Child Thread is reading those packets..
but in child Thread pcap_next is returning NULL eventhough there are
so many packets in the dumped file.
After returning NULL for some packets its reading the packets and
again for some time its returning NULL and reading the packets.
Immediately after killing the dumping process the Thread is not
reading the remaining packets but it is continously returning NULL
eventhough there are so many packets in the file..
anything wrong with my code or problem with pcap_next()..
How can i come out of this problem...
So i request you plz.. give me a solution for this...
Thanking you ,
Visit your host, monkey.org