2.2.2.1 PeerNodeAddress Structure

The PeerNodeAddress structure MUST contain a URI and one or more IPAddresses. It is intended to be used to describe a Peer Channel protocol endpoint. While in use by this protocol, a PeerNodeAddress structure SHOULD only refer to the local endpoint. The example here shows the use of the PeerNodeAddress structure.

 <xs:schema 
   xmlns:tns="http://schemas.datacontract.org/2004/07/System.Net" 
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   targetNamespace=
    "http://schemas.datacontract.org/2004/07/System.Net" 
   xmlns:a="http://www.w3.org/2005/08/addressing/"
   xmlns:d5p1="http://schemas.datacontract.org/2004/07/System.Net"  
   attributeFormDefault="unqualified" 
   elementFormDefault="qualified" >
   <xs:import namespace=
       "http://schemas.microsoft.com/2003/10/Serialization/Arrays"
   />
   <xs:import namespace="http://www.w3.org/2005/08/addressing/" />
     <xs:complexType name="IPAddress">
       <xs:sequence>
         <xs:element name="m_Address" type="xs:unsignedInt" />
         <xs:element name="m_Family" type="xs:string" />
         <xs:element name="m_HashCode" type="xs:unsignedInt" />
         <xs:element name="m_Numbers">
           <xs:complexType>
             <xs:sequence>
               <xs:element 
                 maxOccurs="unbounded" 
                 xmlns:q1=
       "http://schemas.microsoft.com/2003/10/Serialization/Arrays" 
                 ref="q1:unsignedShort" 
               />
             </xs:sequence>
           </xs:complexType>
         </xs:element>
         <xs:element name="m_ScopeId" type="xs:unsignedInt" />
       </xs:sequence>
     </xs:complexType>
     <xs:complexType name="PeerNodeAddress">
       <xs:sequence>
         <xs:element name="EndpointAddress">
           <xs:complexType>
             <xs:sequence>
               <xs:element ref="a:Address" />
             </xs:sequence>
           </xs:complexType>
         </xs:element>
         <xs:element name="IPAddresses">
           <xs:complexType>
             <xs:sequence>
               <xs:element maxOccurs="unbounded" ref="d5p1:IPAddress" />
             </xs:sequence>
           </xs:complexType>
         </xs:element>
       </xs:sequence>
     </xs:complexType>
 </xs:schema>

The following table provides information about the different values of PeerNodeAddress attributes.

Value

Description

EndpointAddress

MUST contain a reference to the Address of the node.

Address

A reference to the endpoint (URI) of the node.

IPAddresses

This MUST contain one or more IPAddress structures.

IPAddress

Describes a complete IPAddress.

IPAddress/m_Address

"0" indicates an IPv6 address. Otherwise, the address as an unsigned 32-bit number.

IPAddress/m_Family

The address family of the IPAddress. Acceptable strings are "Internetwork" if the address is an IPv4 address; or "InternetworkV6" if the address is an IPv6 address.

IPAddress/m_HashCode

This value MUST be set to "0". Upon parsing this field from a received message, this element MUST be ignored.

IPAddress/m_Numbers

This element contains the serialized version of the address bytes that are grouped as 16-bit numbers in big-endian format. For IPv4 addresses, this element MAY contain 0 instances. For IPv6 addresses, this element MUST contain exactly 8 "unsignedShort" subelements.

IPAddress/m_Numbers/unsignedShort

MUST contain a 16-bit number.

IPAddress/m_ScopeId

For an IPv6 address, this element MUST contain the Scope ID of the address. For IPv4 addresses, this element MUST be ignored. All IPAddresses in a single PeerNodeAddress MUST have the same ScopeId.