<span class="gmail_quote"><br></span>Hello,<br><br>We have had several problems when trying to integrate our device <br>with wireshark on windows. The following are the changes we made<br>to the source tree of Libpcap<br><br>
We have done the following changes to fad-win32<br>int<br>pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)<br>{<br><br>....<br>if (ret != -1) {<br> /*<br> * We haven't had any errors yet; do any platform-specific
<br> * operations to add devices.<br> */<br> if (pcap_platform_finddevs(&devlist, errbuf) < 0)<br> ret = -1;<br> }<br>.....<br>This comes just before.<br>if (ret == -1) {
<br> /*<br> * We had an error; free the list we've been constructing.<br> */<br> if (devlist != NULL) {<br> pcap_freealldevs(devlist);<br> devlist = NULL;<br> }
<br> }<br><br>Then we did the change to pcap-win32 as following..<br>We added a pacp_find_devs() function in to it. As following<br><br>int<br>pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)<br>{<br> <br>
#ifdef HAVE_USB<br> if (muwis_platform_finddevs(alldevsp, errbuf) < 0)<br> return (-1);<br>#endif /* HAVE_USB */<br><br> return (0);<br>}<br><br>and in our pcap-muwis.c file we have a function like below<br>
<br>int<br>muwis_platform_finddevs(pcap_if_t **devlistp, char *errbuf)<br>{<br><br> const char description[512]= "MUWIS";<br> char name[512]="muwis" ;<br> int ret = 0;<br> if (pcap_add_if(devlistp, name, 0, description, errbuf) < 0){
<br> /*<br> * Failure.<br> */<br> ret = -1;<br> }<br> return (ret); <br>}<br><br>and in the pacp_open_live() we added code to accept our device as following<br><br>#ifdef HAVE_USB
<br> if (strstr(device, "muwis")) {<br> return muwis_open_live(device, snaplen, promisc, to_ms, ebuf);<br> }<br>#endif<br><br>This is just after, #ifdef HAVE_REMOTE ..... #endif Block. <br><br>This muwis_open_live() just fills the pcap_t structure and
<br>opens our device. <br><br>When we run wireshark with our own wpcap.dll
when our device is <br>attached to the USB port, and when we try to start our capture,<br>through capture->interfaces, in windows we get an error saying<br>'dumpcap needs to be closed', and there after we cannot see any
<br>device in the interfaces list. <br><br>What is this dumpcap ? Or why this is the problem that we face?
<br>Please tell us of any experiences?<br><br>As I found out dumpcap is a program to get the network packets.<br>But why does it crashes when I have set my device to be opened <br>in muwis_open_live() function. <br><br>Thanks
<br><span class="sg"><br>Varuna<br><br><br><br><br><br>
</span>