[Winpcap-users] Problems With Newly compiled Winpcap/Libpcap

Gianluca Varenni gianluca.varenni at cacetech.com
Mon Oct 8 18:40:43 GMT 2007


Does windump capture with your modified wpcap.dll?

I think that debugging your new version of wpcap.dll with a simpler application like windump or any of the samples in the winpcap developer's pack will ease your development.

Also, I would use a debug version of wpcap.dll and attach a debugger when dumpcap.exe crashes capturing. Finally, I would probably use dumpcap.exe directly from the command line and debug from there (I don't know which parameters need to be used with dumpcap, the folks on the wireshark-users mailing list can certainly help you for that).

Have a nice day
GV


  ----- Original Message ----- 
  From: Varuna De Silva 
  To: winpcap-users at winpcap.org ; tcpdump-workers at lists.tcpdump.org 
  Sent: Monday, October 08, 2007 5:17 AM
  Subject: [Winpcap-users] Problems With Newly compiled Winpcap/Libpcap



  Hello,

  We have had several problems when trying to integrate our device 
  with wireshark on windows. The following are the changes we made
  to the source tree of Libpcap

  We have done the following changes to fad-win32
  int
  pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
  {

  ....
  if (ret != -1) {
             /*
              * We haven't had any errors yet; do any platform-specific 
              * operations to add devices.
              */
             if (pcap_platform_finddevs(&devlist, errbuf) < 0)
                     ret = -1;
     }
  .....
  This comes just before.
  if (ret == -1) { 
          /*
           * We had an error; free the list we've been constructing.
           */
          if (devlist != NULL) {
              pcap_freealldevs(devlist);
              devlist = NULL;
          } 
      }

  Then we did the change to pcap-win32 as following..
  We added a pacp_find_devs() function in to it. As following

  int
  pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
  {
      
  #ifdef HAVE_USB
      if (muwis_platform_finddevs(alldevsp, errbuf) < 0)
          return (-1);
  #endif /* HAVE_USB */

      return (0);
  }

  and in our pcap-muwis.c file we have a function like below

  int
  muwis_platform_finddevs(pcap_if_t **devlistp, char *errbuf)
  {

    const char description[512]= "MUWIS";
    char name[512]="muwis" ;
    int ret = 0;
    if (pcap_add_if(devlistp, name, 0, description, errbuf) < 0){ 
              /*
               * Failure.
               */
              ret = -1;
          }
     return (ret); 
  }

  and in the pacp_open_live() we added code to accept our device as following

  #ifdef HAVE_USB      
      if (strstr(device, "muwis")) {
          return muwis_open_live(device, snaplen, promisc, to_ms, ebuf);
      }
  #endif

  This is just after, #ifdef HAVE_REMOTE ..... #endif Block. 

  This muwis_open_live() just fills the pcap_t structure and 
  opens our device. 

  When we run wireshark with our own wpcap.dll when our device is 
  attached to the USB port, and when we try to start our capture,
  through capture->interfaces, in windows we get an error saying
  'dumpcap needs to be closed', and there after we cannot see any 
  device in the interfaces list. 

  What is this dumpcap ? Or why this is the problem that we face? 
  Please tell us of any experiences?

  As I found out dumpcap is a program to get the network packets.
  But why does it crashes when I have set my device to be opened 
  in muwis_open_live() function. 

  Thanks 

  Varuna








------------------------------------------------------------------------------


  _______________________________________________
  Winpcap-users mailing list
  Winpcap-users at winpcap.org
  https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20071008/7ba8aed4/attachment-0001.htm


More information about the Winpcap-users mailing list