Gianluca Varenni wrote:
Can you provide me a small test app showing the bug?
It's strange, it happens only if I place a break point at the line of the function containing the pcap_findalldevs call... I think It's just some dirty pointer in my code coming up in debug mode... however here follows the code: there is a main, some declaration, and the call to getInterface. Placing a break point at d=getInterface(...) and entering into the function while debugging, generate the access violation calling pcap_findalldevs(...). Not placing the break point, causes the program to execute correctly. The ide is VS6 with the last service pack.

regards,
 Andrea



int main(int argc, char **argv){
 pcap_if_t *d=0;
 struct bpf_program fcode;
 bpf_u_int32 netp=0;
 bpf_u_int32 NetMask=0;
 char filterString[256];
 int seldevice=0;                       
 int i=0;

 // Breakpoint at the following line...
 d=getInterface(&seldevice);        

 [...]

}


pcap_if_t *getInterface(int *seldevice){ pcap_if_t *d; int i=0;

 // Access Violation
 if (pcap_findalldevs(&alldevs, errbuf) == -1){
  fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
  exit(1);
 }

 [...]

}


================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/

To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to