[Winpcap-users] [ANNOUNCE] WinPcap 3.1 has been released

Le anh Dung dungbkhn at yahoo.com
Mon Aug 8 04:10:05 GMT 2005


Thanks for your new release.
But it still have old error of beta version:
Error is: not free memory in function pcap_findalldevs???

The source test is demo program: iflist project in developer pack. My enviroment: Win2kPro sp4, Visual C++6...
I change this source, replace the main function as following: 
(put a for loop to check function: pcap_findalldevs)

int i;
int main()
{
 pcap_if_t *alldevs;
 pcap_if_t *d;
 char errbuf[PCAP_ERRBUF_SIZE+1];

 for(i=0;i<10000;i++)
 {
 
  /* Retrieve the device list */
  if(pcap_findalldevs(&alldevs, errbuf) == -1)
  {
   fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
   exit(1);
  }
  
  /* Scan the list printing every entry */
  for(d=alldevs;d;d=d->next)
  {
 //  ifprint(d);
  }

  /* Free the device list */
  pcap_freealldevs(alldevs);

  printf("\ni=%d",i);
  printf("\nPress any key and see Windows Task Manager\nyou will see memory of this process is increased");
  getch();
 
 }

 return 1;
}


Please check this problem!
Thanks!

		
---------------------------------
 Start your day with Yahoo! - make it your home page 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20050807/c0d532a9/attachment.html


More information about the Winpcap-users mailing list