From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I1Sdn-0007Ls-SY for qemu-devel@nongnu.org; Thu, 21 Jun 2007 15:48:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I1Sdl-0007Lf-FU for qemu-devel@nongnu.org; Thu, 21 Jun 2007 15:48:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1Sdl-0007Lc-AM for qemu-devel@nongnu.org; Thu, 21 Jun 2007 15:48:25 -0400 Received: from wr-out-0506.google.com ([64.233.184.225]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I1Sdk-0001yz-9Z for qemu-devel@nongnu.org; Thu, 21 Jun 2007 15:48:24 -0400 Received: by wr-out-0506.google.com with SMTP id i22so580464wra for ; Thu, 21 Jun 2007 12:48:22 -0700 (PDT) Message-ID: Date: Thu, 21 Jun 2007 22:48:22 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH] Dump traffic on virtual network to pcap file In-Reply-To: <876510.59735.qm@web57005.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <876510.59735.qm@web57005.mail.re3.yahoo.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, x_at_y_or_z@yahoo.com On 6/21/07, Balazs Attila-Mihaly (Cd-MaN) wrote: > As promised I'll start to provide patches for modifications I've made to the Qemu source code as part of the project. Attached you find the first of these patches - an option to dump the traffic on a virtual interface to a tcpdump compatible file. I welcome any feedback since this is the first time I contributed actual code to an open source project. My main concern is that the code performing the actual dump is bound to the vlan not to the interface (it does the saving in the "qemu_send_packet" procedure). While this is generally speaking ok (since there is usually one vlan per interface per virtual computer), I welcome any suggestion where the code should be put. To avoid problems in 64-bit hosts, please use uint32_t etc. instead of int/short. Otherwise the patch looks fine.