From: Michal Privoznik <mprivozn@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-ga: Extend guest-network-get-interfaces
Date: Wed, 02 Jan 2013 09:28:08 +0100 [thread overview]
Message-ID: <50E3EF98.4070300@redhat.com> (raw)
In-Reply-To: <50D4ADEB.3060205@redhat.com>
On 21.12.2012 19:43, Eric Blake wrote:
> On 12/21/2012 05:59 AM, Michal Privoznik wrote:
>> Nowadays only basic information is reported. However, with the
>> current implementation much more can be exposed to users. like
>> broadcast/destination address (the former in case of standard
>> ethernet device, the latter in case of PPP interface), if the
>> interface is up, of type loopback, in promisc mode or capable of
>> sending multicast.
>> ---
>>
>
>> +++ b/qga/qapi-schema.json
>> @@ -480,26 +480,57 @@
>> #
>> # @prefix: Network prefix length of @ip-address
>> #
>> -# Since: 1.1
>> +# @dest-address: The broadcast or peer address.
>> +#
>> +# Since: 1.1, @dest-address since 1.3
>
> Actually, since 1.4 now (1.3 is already out).
>
>> ##
>> { 'type': 'GuestIpAddress',
>> 'data': {'ip-address': 'str',
>> 'ip-address-type': 'GuestIpAddressType',
>> - 'prefix': 'int'} }
>> + 'prefix': 'int',
>> + '*dest-address': 'str'} }
>
> Is this field always going to be present in 1.4? If so, then it doesn't
> need to be marked optional (even though it wasn't present in 1.3).
Not really. This field is gonna be there iff guest agent is able to dig
the info out. For instance, for PPP interfaces, I was unable to get
peer's address via getifaddrs(). Other utilities use netlink for that.
However, if interface has an broadcast address, this can be easily
obtained via getifaddrs(). That's why I am making this optional for now.
>
>> ##
>> +# @GuestNetworkInterfaceType:
>> +#
>> +# @broadcast: Interface has a broadcast address. In which case it is
>> +# contained in @dest-address in @GuestIpAddress.
>> +#
>> +# @ppp: Interface is of point-to-point type. The peer address is then in
>> +# @dest-address in @GuestIpAddress.
>> +#
>> +# Since: 1.3
>
> 1.4
>
>> +##
>> +{ 'enum': 'GuestNetworkInterfaceType',
>> + 'data': ['broadcast', 'ppp'] }
>> +##
>> # @GuestNetworkInterface:
>> #
>> # @name: The name of interface for which info are being delivered
>> #
>> +# @up: If the interface is up
>> +#
>> +# @loopback: If the interface is of loopback type
>> +#
>> +# @promisc: If the interface is in promiscuous mode
>> +#
>> +# @multicast: If the interface is cappable of multicast
>
> s/cappable/capable/
>
>> +#
>> +# @type: If the interface has a broadcast address(-es) assigned, or is a PPP.
>> +#
>> # @hardware-address: Hardware address of @name
>> #
>> # @ip-addresses: List of addresses assigned to @name
>> #
>> -# Since: 1.1
>> +# Since: 1.1, @up, @loopback, @promisc, @multicast and @type since 1.3
>
> 1.4
>
>> ##
>> { 'type': 'GuestNetworkInterface',
>> 'data': {'name': 'str',
>> + 'up': 'bool',
>> + 'loopback': 'bool',
>> + 'promisc': 'bool',
>> + 'multicast': 'bool',
>> + '*type': 'GuestNetworkInterfaceType',
>
> Again, is this field optional?
Yes. Because this actually tells type of 'dest-address' field which is
optional I think this one should be optional as well.
>
>> '*hardware-address': 'str',
>> '*ip-addresses': ['GuestIpAddress'] } }
>>
>>
>
Michal
prev parent reply other threads:[~2013-01-02 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 12:59 [Qemu-devel] [PATCH] qemu-ga: Extend guest-network-get-interfaces Michal Privoznik
2012-12-21 18:43 ` Eric Blake
2013-01-02 8:28 ` Michal Privoznik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50E3EF98.4070300@redhat.com \
--to=mprivozn@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).