View topic - trouble of libpcap

trouble of libpcap

anything that doesn't fit to other groups.

trouble of libpcap

Postby xuyong » Sat Feb 12, 2011 12:59 am

I use libpcap to catch the data from network,there are 6 port on my target,wm0-wm5,I use pcap_loop(pd, -1, capture_packet1, pcap_userdata) to bind the wm0-wm5, capture_packet1 to wm0, capture_packet2 to wm1 etc,but I have some problem below:
1)sometimes I can't get data when the programme runs,but at the same time if I run another process or I kill the process and let it run again,I will get the data.
2)the physical connection is wm0,it means I put the netline on wm0,but the programme shows that I get data from other port,like wm2,sometimes shows get data from 2 port,like wm2 and wm5
Could you help me?
Senior Member
Posts: 431
Joined: Sun Mar 02, 2003 7:52 am

RE: trouble of libpcap

Postby maschoen » Sat Feb 12, 2011 8:09 pm

This sounds like a libpcap problem. I know nothing about it, but I think your best bet would be to post the code in case someone else here does.
QNX Master
Posts: 2677
Joined: Wed Jun 25, 2003 5:18 pm

Return to General Programming

Who is online

Users browsing this forum: No registered users and 4 guests