Hello, <br> It seems that getting the device's IP from pcap_findalldevs changed from XP to VISTA.<br> <b><span style="color: rgb(204, 0, 0);">((struct sockaddr_in *)(d->addresses->addr))->sin_addr.S_un.S_addr;</span></b><br>
is returning 0 in Vista. Did this struct change in Vista because of IPv6 or something?<br><br><br> pcap_findalldevs(&alldevs, errbuf)<br> /* Print the list */<br> for(d=alldevs; d; d=d->next)<br> {<br>
i++;<br> if (d->description) {<br> printf(" (%s)\n", d->description);<br> <b><span style="color: rgb(204, 0, 0);">srcIP = ((struct sockaddr_in *)(d->addresses->addr))->sin_addr.S_un.S_addr;</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> srcNetMask = ((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr;</span></b><br> }<br> }<br>