qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 6/7] net: Add support for capturing VLANs


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH 6/7] net: Add support for capturing VLANs
Date: Wed, 15 Apr 2009 16:09:35 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Mark McLoughlin wrote:
> On Tue, 2009-04-14 at 19:29 +0200, Jan Kiszka wrote:
>> This patch is derived from Tristan Gingold's patch. It adds a new VLAN
>> client type that writes all traffic on the VLAN it is attached to into a
>> pcap file. Such a file can then be analyzed offline with Wireshark or
>> tcpdump.
> 
> Personally, I'd use a tap device and 'tcpdump -w' to do this.
> 
> Any particular reason to add support to qemu itself other than
> convenience?

You have to have the right privileges (for me the key argument) + you
have to add the tap device in the right order, see below. If we were
talking about thousands of LoC, I would say, let's stick with these
limitations. But the capturing features is really small and
self-contained (you may also consider it as a feature extension of
slirp, which you could basically also replace with a tap device +
iptables rules).

> 
>> Besides rebasing and some minor cleanups, the major differences to the
>> original version are:
>>  - support for enabling/disabling via the monitor (host_net_add/remove)
>>  - always register dump client at the head of a VLAN queue
>>    (instead of special handling for slirp)
> 
> Could you explain why you need this? 
> 
> I'd prefer if we didn't have to add qemu_new_vlan_head_client()

Packet ordering: If you are sniffing from behind a vlan client in the
queue, you may see its immediate reply to a certain packet before the
triggering packet. Tristan solved this by pushing slirp (the only source
for reordering so far) at the end of the queue, but I think it's rather
the sniffer which has special requirements, so I pushed that one to the top.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux




reply via email to

[Prev in Thread] Current Thread [Next in Thread]