qemu-devel@nongnu.org
[Top] [All Lists]

Re: [Qemu-devel] [PATCH] Capture network traffic

Subject: Re: [Qemu-devel] [PATCH] Capture network traffic
From: "andrzej zaborowski"
Date: Sun, 20 Jan 2008 02:30:29 +0100
Hi,

On 18/12/2007, Balazs Attila-Mihaly (Cd-MaN) <x_at_y_or_z@xxxxxxxxx> 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


<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Qemu-devel] [PATCH] Capture network traffic, andrzej zaborowski <=