All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sebastian Herbszt" <herbszt@gmx.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] networking using libpcap
Date: Thu, 3 Jul 2008 01:39:27 +0200	[thread overview]
Message-ID: <01df01c8dc9d$32ab4340$0201a8c0@zeug> (raw)
In-Reply-To: 200807021702.50752.uli@suse.de

> I just discovered this patch
> 
> http://lists.freebsd.org/pipermail/freebsd-emulation/2007-February/003107.html
> 
> that implements network access using libpcap. 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.

> +ifdef CONFIG_PCAP
> +LIBS+=-lpcap
> +endif

On Windows it should be -lwpcap.

+    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().

- Sebastian

  parent reply	other threads:[~2008-07-02 23:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02 15:02 [Qemu-devel] [PATCH] networking using libpcap Ulrich Hecht
2008-07-02 15:20 ` Anthony Liguori
2008-07-02 16:03   ` Ulrich Hecht
2008-07-02 15:25 ` Laurent Vivier
2008-07-02 15:34   ` Laurent Vivier
2008-07-02 23:39 ` Sebastian Herbszt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-07-17 22:12 [Qemu-devel] " Jung-uk Kim
2008-07-18 16:12 ` 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

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='01df01c8dc9d$32ab4340$0201a8c0@zeug' \
    --to=herbszt@gmx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.