From patchwork Mon Jul 13 07:39:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 494259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 32659140281 for ; Mon, 13 Jul 2015 17:43:41 +1000 (AEST) Received: from localhost ([::1]:53363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYOp-0008W1-Ep for incoming@patchwork.ozlabs.org; Mon, 13 Jul 2015 03:43:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYKz-0003Zm-1b for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:39:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEYKx-00046F-40 for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:39:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYKw-00045k-TX for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:39:39 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 8973EB7A8A for ; Mon, 13 Jul 2015 07:39:38 +0000 (UTC) Received: from thh440s.redhat.com (vpn1-4-235.ams2.redhat.com [10.36.4.235]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6D7dQ8E007406; Mon, 13 Jul 2015 03:39:36 -0400 From: Thomas Huth To: qemu-devel@nongnu.org, Stefan Hajnoczi , Jason Wang Date: Mon, 13 Jul 2015 09:39:26 +0200 Message-Id: <1436773166-12113-6-git-send-email-thuth@redhat.com> In-Reply-To: <1436773166-12113-1-git-send-email-thuth@redhat.com> References: <1436773166-12113-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Markus Armbruster Subject: [Qemu-devel] [PATCH v2 5/5] qemu options: Add information about dumpfile to help text X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Describe the new dumpfile and dumplen options in the help text. Signed-off-by: Thomas Huth --- qemu-options.hx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 7b8efbf..58cf53f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1461,20 +1461,21 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, #ifdef CONFIG_SLIRP "-netdev user,id=str[,net=addr[/mask]][,host=addr][,restrict=on|off]\n" " [,hostname=host][,dhcpstart=addr][,dns=addr][,dnssearch=domain][,tftp=dir]\n" - " [,bootfile=f][,hostfwd=rule][,guestfwd=rule]" + " [,bootfile=f][,hostfwd=rule][,guestfwd=rule][,dumpfile=file[,dumplen=len]]\n" #ifndef _WIN32 - "[,smb=dir[,smbserver=addr]]\n" + " [,smb=dir[,smbserver=addr]]\n" #endif " configure a user mode network backend with ID 'str',\n" " its DHCP server and optional services\n" #endif #ifdef _WIN32 - "-netdev tap,id=str,ifname=name\n" + "-netdev tap,id=str,ifname=name[,dumpfile=file[,dumplen=len]]\n" " configure a host TAP network backend with ID 'str'\n" #else "-netdev tap,id=str[,fd=h][,fds=x:y:...:z][,ifname=name][,script=file][,downscript=dfile]\n" " [,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off]\n" " [,vhostfd=h][,vhostfds=x:y:...:z][,vhostforce=on|off][,queues=n]\n" + " [,dumpfile=file[,dumplen=len]]\n" " configure a host TAP network backend with ID 'str'\n" " use network scripts 'file' (default=" DEFAULT_NETWORK_SCRIPT ")\n" " to configure it and 'dfile' (default=" DEFAULT_NETWORK_DOWN_SCRIPT ")\n" @@ -1494,7 +1495,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, " use 'vhostfd=h' to connect to an already opened vhost net device\n" " use 'vhostfds=x:y:...:z to connect to multiple already opened vhost net devices\n" " use 'queues=n' to specify the number of queues to be created for multiqueue TAP\n" - "-netdev bridge,id=str[,br=bridge][,helper=helper]\n" + "-netdev bridge,id=str[,br=bridge][,helper=helper][,dumpfile=file[,dumplen=len]]\n" " configure a host TAP network backend with ID 'str' that is\n" " connected to a bridge (default=" DEFAULT_BRIDGE_INTERFACE ")\n" " using the program 'helper (default=" DEFAULT_BRIDGE_HELPER ")\n" @@ -1503,7 +1504,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, "-netdev l2tpv3,id=str,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport]\n" " [,rxsession=rxsession],txsession=txsession[,ipv6=on/off][,udp=on/off]\n" " [,cookie64=on/off][,counter][,pincounter][,txcookie=txcookie]\n" - " [,rxcookie=rxcookie][,offset=offset]\n" + " [,rxcookie=rxcookie][,offset=offset][,dumpfile=file[,dumplen=len]]\n" " configure a network backend with ID 'str' connected to\n" " an Ethernet over L2TPv3 pseudowire.\n" " Linux kernel 3.3+ as well as most routers can talk\n" @@ -1527,30 +1528,34 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, " use 'offset=X' to add an extra offset between header and data\n" #endif "-netdev socket,id=str[,fd=h][,listen=[host]:port][,connect=host:port]\n" + " [,dumpfile=file[,dumplen=len]]\n" " configure a network backend to connect to another network\n" " using a socket connection\n" "-netdev socket,id=str[,fd=h][,mcast=maddr:port[,localaddr=addr]]\n" + " [,dumpfile=file[,dumplen=len]]\n" " configure a network backend to connect to a multicast maddr and port\n" " use 'localaddr=addr' to specify the host address to send packets from\n" "-netdev socket,id=str[,fd=h][,udp=host:port][,localaddr=host:port]\n" + " [,dumpfile=file[,dumplen=len]]\n" " configure a network backend to connect to another network\n" " using an UDP tunnel\n" #ifdef CONFIG_VDE "-netdev vde,id=str[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n" + " [,dumpfile=file[,dumplen=len]]\n" " configure a network backend to connect to port 'n' of a vde switch\n" " running on host and listening for incoming connections on 'socketpath'.\n" " Use group 'groupname' and mode 'octalmode' to change default\n" " ownership and permissions for communication port.\n" #endif #ifdef CONFIG_NETMAP - "-netdev netmap,id=str,ifname=name[,devname=nmname]\n" + "-netdev netmap,id=str,ifname=name[,devname=nmname][,dumpfile=file[,dumplen=len]]\n" " attach to the existing netmap-enabled network interface 'name', or to a\n" " VALE port (created on the fly) called 'name' ('nmname' is name of the \n" " netmap device, defaults to '/dev/netmap')\n" #endif "-netdev vhost-user,id=str,chardev=dev[,vhostforce=on|off]\n" " configure a vhost-user network, backed by a chardev 'dev'\n" - "-netdev hubport,id=str,hubid=n\n" + "-netdev hubport,id=str,hubid=n[,dumpfile=file[,dumplen=len]]\n" " configure a hub port on QEMU VLAN 'n'\n", QEMU_ARCH_ALL) DEF("net", HAS_ARG, QEMU_OPTION_net, "-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\n" @@ -1981,10 +1986,15 @@ qemu -m 512 -object memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,sha -device virtio-net-pci,netdev=net0 @end example +@item -netdev ...,dumpfile=@var{file}[,dumplen=@var{len}] @item -net dump[,vlan=@var{n}][,file=@var{file}][,len=@var{len}] -Dump network traffic on VLAN @var{n} to file @var{file} (@file{qemu-vlan0.pcap} by default). +Dump network traffic to file @var{file} (@file{qemu-vlan0.pcap} by default). At most @var{len} bytes (64k by default) per packet are stored. The file format is libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. +When dumping is wanted for -netdev devices, simply add the 'dumpfile=file' +option as additional parameter. When dumping is wanted for a legacy -net +network, specify an additional "-net dump,..." to dump the traffic on +VLAN @var{n} (0 by default). @item -net none Indicate that no network devices should be configured. It is used to