From: Jung-uk Kim <jkim@FreeBSD.org>
To: herbszt@gmx.de
Cc: Juergen Lock <nox@jelal.kn-bremen.de>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] networking using libpcap
Date: Thu, 17 Jul 2008 18:12:38 -0400 [thread overview]
Message-ID: <200807171812.41200.jkim@FreeBSD.org> (raw)
> I just discovered this patch
>
http://lists.freebsd.org/pipermail/freebsd-emulation/2007-February/003107.html
>
> that implements network access using libpcap.
Since someone showed interest, I updated my patches against trunk. :-)
http://people.freebsd.org/~jkim/qemu-pcap-20080717.diff
I turned it off by default for now. If you want to enable it, do:
configure --enable-pcap
> 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
next reply other threads:[~2008-07-17 22:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 22:12 Jung-uk Kim [this message]
2008-07-18 16:12 ` [Qemu-devel] Re: [PATCH] networking using libpcap Sebastian Herbszt
2008-07-18 20:39 ` Jung-uk Kim
2008-07-18 23:07 ` Jung-uk Kim
2008-07-21 15:35 ` Sebastian Herbszt
2008-07-25 20:51 ` Anthony Liguori
2008-07-26 17:30 ` Sebastian Herbszt
2008-07-27 0:28 ` Anthony Liguori
2008-07-27 12:55 ` Paul Brook
2008-07-23 1:55 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2008-07-02 15:02 [Qemu-devel] " Ulrich Hecht
2008-07-02 23:39 ` [Qemu-devel] " Sebastian Herbszt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200807171812.41200.jkim@FreeBSD.org \
--to=jkim@freebsd.org \
--cc=herbszt@gmx.de \
--cc=nox@jelal.kn-bremen.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).