Works perfect for me and allows access to the local Ethernet right
out of the box, very much unlike tap and bridging. The attached
version applies to trunk.
I have modified (e.g. got rid of threads) the original patch from
the forum and am using it here on Windows. It works fine but
performance is pretty low.
*After* applying the new patch:
cp -p vl.c vl.c.orig
sed -e 's/#ifdef PCAP_SET_FILTER/#if 1/g' vl.c > vl.c.tmp
mv vl.c.tmp vl.c
and try again? BTW, I have no real experience with WinPcap, so don't
kill me if it does not work for you. ;-)
+ifdef CONFIG_PCAP
+LIBS+=-lpcap
+endif
On Windows it should be -lwpcap.
Thanks for the tip!
+ if ((fd = pcap_get_selectable_fd(s->handle)) < 0) {
+ fprintf(stderr, "qemu: pcap_get_selectable_fd failed\n");
+ goto fail;
+ }
+ qemu_set_fd_handler(fd, pcap_send, NULL, s);
pcap_get_selectable_fd() is not available on Windows. I just put
pcap_send() in main_loop_wait().
I added WinPcap API support from WinPcap manual pages but I have no
way of checking. Can you try the patch and letting me know?
Juergen,
I made FreeBSD ports patch for emulators/qemu-devel:
http://people.freebsd.org/~jkim/qemu-devel-20080620-pcap.diff
FYI...
Thanks,
Jung-uk Kim