From: Paul Durrant Subject: [PATCH v4 4/4] docs: Introduce xenstore paths for guest network address information Date: Mon, 16 Nov 2015 11:22:09 +0000 Message-ID: <1447672929-9053-5-git-send-email-paul.durrant@citrix.com> References: <1447672929-9053-1-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZyHtZ-0008Jg-KY for xen-devel@lists.xenproject.org; Mon, 16 Nov 2015 11:24:25 +0000 In-Reply-To: <1447672929-9053-1-git-send-email-paul.durrant@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com Cc: Tim Deegan , Paul Durrant , Keir Fraser , Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org It is useful for a toolstack to be able to see the network addresses in use by a domain for a particular vif in xenstore for display purposes and, for example, so that a VNC session can be established to the guest GUI. This patch documents paths to allow a domain to advertise an interface name, MAC (unicast and multicast) and IP (version 4 and 6) address information. Signed-off-by: Paul Durrant Cc: Ian Campbell Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- v4: - Add clarification of use and level of trust that should be placed on the various paths v2: - Allow for compression of IPv6 addresses --- docs/misc/xenstore-paths.markdown | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/misc/xenstore-paths.markdown b/docs/misc/xenstore-paths.markdown index 90305e3..22e2436 100644 --- a/docs/misc/xenstore-paths.markdown +++ b/docs/misc/xenstore-paths.markdown @@ -71,6 +71,15 @@ VALUES are strings and can take the following forms: parentheses to denote attributes of the software, e.g. "(debug)" +* MAC_ADDRESS -- 6 integers, in hexadecimal form, separated by ':', + specifying an ethernet MAC address. +* IPV4_ADDRESS -- 4 integers, in decimal form, separated by '.', + specifying an IP version 4 address. +* IPV6_ADDRESS -- Up to 8 integers, in hexadecimal form, separated + by ':', specifying an IP version 6 address. + (Zero compression of addresses, using '::' notation, + is allowed but not required). + Additional TAGS may follow as a comma separated set of the following tags enclosed in square brackets. @@ -416,6 +425,35 @@ definitely unable to respond immediately and hence the toolstack should defer instantiaton to the next VM start. However, if the path is absent then the toolstack may attempt the operation. +#### ~/attr/vif/$DEVID/name = STRING [w] + +A domain may write its internal 'friendly' name for a network device +using this path. A toolstack or UI may use this for display purposes +but, since it is entirely under the control of the guest, no +particular meaning should be inferred from the name. + +#### ~/attr/vif/$DEVID/mac/$INDEX = MAC_ADDRESS [w] + +The guest may override the MAC address written in the vif backend by +the toolstack and hence the guest may write one of the paths of +this form with the unicast MAC address it is currently using. Other +paths may be used by the guest to write multicast addresses which +are in operation. +The values written to these paths are under guest control and, as +such, they are primarily for display purposes and should not be used +for packet filtering or routing purposes. + +#### ~/attr/vif/$DEVID/ipv4/$INDEX = IPV4_ADDRESS [w] +#### ~/attr/vif/$DEVID/ipv6/$INDEX = IPV6_ADDRESS [w] + +A domain may write the set of IP addresses in use by the stack +bound to the network frontend using paths of this form. +The values written to these paths are under guest control and, as such, +should not be used for routing etc. A toolstack may attempt to use an +address written in one of these paths to, for example, establish a VNC +session to the guest (although clearly some level of trust is placed +in the value supplied by the guest in this case). + ### Paths private to the toolstack #### ~/device-model/$DOMID/state [w] -- 2.1.4