From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JGP19-0001Iu-9O for qemu-devel@nongnu.org; Sat, 19 Jan 2008 20:30:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JGP15-0001Cp-6m for qemu-devel@nongnu.org; Sat, 19 Jan 2008 20:30:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JGP14-0001CR-W6 for qemu-devel@nongnu.org; Sat, 19 Jan 2008 20:30:31 -0500 Received: from ug-out-1314.google.com ([66.249.92.168]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JGP14-0007hj-MH for qemu-devel@nongnu.org; Sat, 19 Jan 2008 20:30:30 -0500 Received: by ug-out-1314.google.com with SMTP id m2so669190uge.4 for ; Sat, 19 Jan 2008 17:30:29 -0800 (PST) Message-ID: Date: Sun, 20 Jan 2008 02:30:29 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH] Capture network traffic In-Reply-To: <803877.27585.qm@web57007.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <803877.27585.qm@web57007.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 Hi, On 18/12/2007, Balazs Attila-Mihaly (Cd-MaN) wrote: > Here goes version 0.3 of my packet capture patch. I rewritten it to be a custom VLANClient which implements the capturing part in its fd_read proceudre, rather than adding additional properties to the VLAN structure. Monitor support is also present. You can't cast the result of get_param_value() to char * because (as expected) you get this: [balrog@borg qemu-cvs]$ x86_64-softmmu/qemu-system-x86_64 -net capture,file=out a Segmentation fault Also I'm sure the use of asprintf() will upset the non-Linux-or-BSD users. I don't think you need to check for memory allocation failures (the message will not display anyway in such case, because monitor allocates memory for that). It will be nice if you can remove stray spaces on end of lines/empty lines. The PCAPHeader struct probably should have a __packed__ attribute. Thanks, Andrew