* [Qemu-devel] [PATCH v3] QMP: Introduce the documentation for query-netdev and info netdev
@ 2010-06-21 20:31 Miguel Di Ciurcio Filho
2010-06-22 13:06 ` [Qemu-devel] " Luiz Capitulino
0 siblings, 1 reply; 3+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-06-21 20:31 UTC (permalink / raw)
To: qemu-devel; +Cc: avi, Miguel Di Ciurcio Filho, armbru, lcapitulino
These commands show the information about active backend network devices.
Changes from v2
---------------
- Got rid of vlans, a separate command for them will be created if needed
- Removed socket as a type (it is used to connect vlans)
- 'script', 'downscript' and 'vhostfd' are now optional when type is 'tap'
- Reworded the explanation of 'peer'
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
qemu-monitor.hx | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 96 insertions(+), 0 deletions(-)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 9f62b94..cffd69e 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -1674,6 +1674,102 @@ show the various VLANs and the associated devices
ETEXI
STEXI
+@item info netdev
+show information about the current backend network devices
+ETEXI
+SQMP
+query-netdev
+------------
+
+Each device is represented by a json-object. The returned value is a json-array
+of all devices.
+
+Each json-object contains the following:
+
+- "id": the device's ID, must be unique (json-string)
+- "type": device type (json-string)
+ - Possible values: "tap", "user", "vde"
+- "peer": ID of the frontend guest device, if not available means that this
+ netdev is not connected to a guest device yet (json-string, optional)
+- "info": json-object containing the configuration information about the device.
+ - When "type" is "tap", the following values might be available:
+ - "fd": available if connected to an already opened TAP interface
+ (json-int, optional)
+ - "script": path to an script used to configure the interface,
+ available only if an script is used. (json-string, optional, only
+ present if "fd" is not present)
+ - "downscript": path to an script used to deconfigure the interface,
+ available only if an script is used. (json-string, optional, only
+ present if "fd" is not present)
+ - "ifname": name of the attached host interface (json-string, only
+ present if "fd" is not present)
+ - "vhost": vhost acceleration status, true if enabled, false
+ otherwise (json-boolean)
+ - "vnet_hdr": true if the IFF_VNET_HDR flag must be set and is in
+ use, false otherwise (json-boolean)
+ - "vhostfd": fd used to connect the device to an already opened
+ vhost net device (json-int, optional)
+ - "sndbuf": send buffer size, in bytes (json-int)
+ - When "type" is "vde", the following values might be available:
+ - "sock": path to the VDE listening socket (json-string)
+ - "port": port number connected to virtual switch (json-int)
+ - "group": group name (json-string)
+ - "mode": permission mode, in octal (json-int)
+ - When "type" is "user", the following values might be available:
+ - "hostname": client hostname reported by the builtin DHCP server,
+ (json-string, optional)
+ - "restrict": true if guest is isolated from the host,
+ false otherwise (json-boolean)
+ - "net": network address (json-string)
+ - "netmask": netmask (json-string)
+ - "host": guest-visible address of the host (json-string)
+ - "tftp": root directory of the built-in TFTP server (json-string,
+ optional)
+ - "bootfile": BOOTP filename (json-string, optional)
+ - "dhcpstart": the first of the 16 IPs the built-in DHCP server can
+ assign (json-string)
+ - "dns": guest-visible address of the virtual nameserver
+ (json-string)
+ - "smb": root directory of the built-in SMB server (json-string,
+ optional)
+ - "smbserver": IP address of the built-in SMB server (json-string,
+ optional)
+ - "hostfwd": guest port number to forward incoming TCP or UDP
+ connections (json-int, optional)
+ - "guestfwd": IP address and port to forward guest TCP connections
+ (json-int, optional)
+
+Example:
+
+-> { "execute": "query-netdev" }
+<- {
+ "return": [
+ {
+ "id": "tap.0",
+ "type": "tap",
+ "peer": "e1000.0",
+ "info": {
+ "script": "/etc/qemu-ifup",
+ "downscript": "/etc/qemu-ifdown",
+ "ifname": "tap0",
+ "vhost": true
+ },
+ },
+ {
+ "id": "user.0",
+ "type": "user",
+ "peer": "e1000.0",
+ "info": {
+ "net": "10.0.2.0",
+ "netmask": "255.255.255.0"
+ },
+ },
+ ]
+ }
+
+EQMP
+
+STEXI
@item info chardev
show the character devices
ETEXI
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH v3] QMP: Introduce the documentation for query-netdev and info netdev
2010-06-21 20:31 [Qemu-devel] [PATCH v3] QMP: Introduce the documentation for query-netdev and info netdev Miguel Di Ciurcio Filho
@ 2010-06-22 13:06 ` Luiz Capitulino
2010-06-22 13:20 ` Miguel Di Ciurcio Filho
0 siblings, 1 reply; 3+ messages in thread
From: Luiz Capitulino @ 2010-06-22 13:06 UTC (permalink / raw)
To: Miguel Di Ciurcio Filho; +Cc: avi, qemu-devel, armbru
On Mon, 21 Jun 2010 17:31:28 -0300
Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:
> These commands show the information about active backend network devices.
>
> Changes from v2
> ---------------
> - Got rid of vlans, a separate command for them will be created if needed
> - Removed socket as a type (it is used to connect vlans)
> - 'script', 'downscript' and 'vhostfd' are now optional when type is 'tap'
> - Reworded the explanation of 'peer'
>
> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
> ---
> qemu-monitor.hx | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 96 insertions(+), 0 deletions(-)
>
> diff --git a/qemu-monitor.hx b/qemu-monitor.hx
> index 9f62b94..cffd69e 100644
> --- a/qemu-monitor.hx
> +++ b/qemu-monitor.hx
> @@ -1674,6 +1674,102 @@ show the various VLANs and the associated devices
> ETEXI
>
> STEXI
> +@item info netdev
> +show information about the current backend network devices
> +ETEXI
> +SQMP
> +query-netdev
> +------------
> +
> +Each device is represented by a json-object. The returned value is a json-array
> +of all devices.
> +
> +Each json-object contains the following:
> +
> +- "id": the device's ID, must be unique (json-string)
> +- "type": device type (json-string)
> + - Possible values: "tap", "user", "vde"
What has happened to socket? Looks good otherwise.
> +- "peer": ID of the frontend guest device, if not available means that this
> + netdev is not connected to a guest device yet (json-string, optional)
> +- "info": json-object containing the configuration information about the device.
> + - When "type" is "tap", the following values might be available:
> + - "fd": available if connected to an already opened TAP interface
> + (json-int, optional)
> + - "script": path to an script used to configure the interface,
> + available only if an script is used. (json-string, optional, only
> + present if "fd" is not present)
> + - "downscript": path to an script used to deconfigure the interface,
> + available only if an script is used. (json-string, optional, only
> + present if "fd" is not present)
> + - "ifname": name of the attached host interface (json-string, only
> + present if "fd" is not present)
> + - "vhost": vhost acceleration status, true if enabled, false
> + otherwise (json-boolean)
> + - "vnet_hdr": true if the IFF_VNET_HDR flag must be set and is in
> + use, false otherwise (json-boolean)
> + - "vhostfd": fd used to connect the device to an already opened
> + vhost net device (json-int, optional)
> + - "sndbuf": send buffer size, in bytes (json-int)
> + - When "type" is "vde", the following values might be available:
> + - "sock": path to the VDE listening socket (json-string)
> + - "port": port number connected to virtual switch (json-int)
> + - "group": group name (json-string)
> + - "mode": permission mode, in octal (json-int)
> + - When "type" is "user", the following values might be available:
> + - "hostname": client hostname reported by the builtin DHCP server,
> + (json-string, optional)
> + - "restrict": true if guest is isolated from the host,
> + false otherwise (json-boolean)
> + - "net": network address (json-string)
> + - "netmask": netmask (json-string)
> + - "host": guest-visible address of the host (json-string)
> + - "tftp": root directory of the built-in TFTP server (json-string,
> + optional)
> + - "bootfile": BOOTP filename (json-string, optional)
> + - "dhcpstart": the first of the 16 IPs the built-in DHCP server can
> + assign (json-string)
> + - "dns": guest-visible address of the virtual nameserver
> + (json-string)
> + - "smb": root directory of the built-in SMB server (json-string,
> + optional)
> + - "smbserver": IP address of the built-in SMB server (json-string,
> + optional)
> + - "hostfwd": guest port number to forward incoming TCP or UDP
> + connections (json-int, optional)
> + - "guestfwd": IP address and port to forward guest TCP connections
> + (json-int, optional)
> +
> +Example:
> +
> +-> { "execute": "query-netdev" }
> +<- {
> + "return": [
> + {
> + "id": "tap.0",
> + "type": "tap",
> + "peer": "e1000.0",
> + "info": {
> + "script": "/etc/qemu-ifup",
> + "downscript": "/etc/qemu-ifdown",
> + "ifname": "tap0",
> + "vhost": true
> + },
> + },
> + {
> + "id": "user.0",
> + "type": "user",
> + "peer": "e1000.0",
> + "info": {
> + "net": "10.0.2.0",
> + "netmask": "255.255.255.0"
> + },
> + },
> + ]
> + }
> +
> +EQMP
> +
> +STEXI
> @item info chardev
> show the character devices
> ETEXI
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH v3] QMP: Introduce the documentation for query-netdev and info netdev
2010-06-22 13:06 ` [Qemu-devel] " Luiz Capitulino
@ 2010-06-22 13:20 ` Miguel Di Ciurcio Filho
0 siblings, 0 replies; 3+ messages in thread
From: Miguel Di Ciurcio Filho @ 2010-06-22 13:20 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: avi, qemu-devel, armbru
On Tue, Jun 22, 2010 at 10:06 AM, Luiz Capitulino
<lcapitulino@redhat.com> wrote:
> On Mon, 21 Jun 2010 17:31:28 -0300
> Miguel Di Ciurcio Filho <miguel.filho@gmail.com> wrote:
>
>> These commands show the information about active backend network devices.
>>
>> Changes from v2
>> ---------------
>> - Got rid of vlans, a separate command for them will be created if needed
>> - Removed socket as a type (it is used to connect vlans)
>> - 'script', 'downscript' and 'vhostfd' are now optional when type is 'tap'
>> - Reworded the explanation of 'peer'
>>
>> Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
>> ---
>> qemu-monitor.hx | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 1 files changed, 96 insertions(+), 0 deletions(-)
>>
>> diff --git a/qemu-monitor.hx b/qemu-monitor.hx
>> index 9f62b94..cffd69e 100644
>> --- a/qemu-monitor.hx
>> +++ b/qemu-monitor.hx
>> @@ -1674,6 +1674,102 @@ show the various VLANs and the associated devices
>> ETEXI
>>
>> STEXI
>> +@item info netdev
>> +show information about the current backend network devices
>> +ETEXI
>> +SQMP
>> +query-netdev
>> +------------
>> +
>> +Each device is represented by a json-object. The returned value is a json-array
>> +of all devices.
>> +
>> +Each json-object contains the following:
>> +
>> +- "id": the device's ID, must be unique (json-string)
>> +- "type": device type (json-string)
>> + - Possible values: "tap", "user", "vde"
>
> What has happened to socket? Looks good otherwise.
>
Socket does not support an 1:1 relationship and it is used just to
connect vlans, as I explained in the changelog.
$ qemu -netdev type=socket,listen=:3000,id=ss -device e1000,netdev=ss
qemu: -device e1000,netdev=ss: Property 'e1000.netdev' can't find value 'ss'
Regards,
Miguel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-22 13:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-21 20:31 [Qemu-devel] [PATCH v3] QMP: Introduce the documentation for query-netdev and info netdev Miguel Di Ciurcio Filho
2010-06-22 13:06 ` [Qemu-devel] " Luiz Capitulino
2010-06-22 13:20 ` Miguel Di Ciurcio Filho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).