3.1.4.1 Opening a Cloud

When a higher-layer application or protocol asks PNRP to open a given cloud (optionally specifying one or more seed servers for the cloud), the node MUST first check whether the cloud already exists in the Cloud Table. If the cloud exists, the node MUST increment the Open Count. Otherwise, the node MUST attempt to create a new entry in the Cloud Table, and if it cannot, it MUST return a failure to the application or higher-layer protocol.

If a new entry is created, the node MUST carry out the following procedures when initializing.

  1. Choose a port and a set of four IPv6 Addresses, or as many as the local system has, not exceeding four, which the node will use for PNRP communication. The addresses MUST all be of the same scope and scope zone (as specified in [RFC4007] section 5). The same port number MUST be used for all addresses. Each address/port combination MUST NOT be in the Local Endpoint List of any other entry in the Cloud Table. If no addresses are available, the open attempt MUST report a failure. Otherwise, store the chosen addresses in the Local Endpoint List.

  2. Begin listening for incoming messages on the UDP port and IPv6 Addresses chosen.

  3. Set CurrentSeedServerAddressIndex to 0, set CloudDiscoveryMode to LocalOOB and initiate the cloud discovery process as specified in section 3.1.4.2.

  4. Start the Maintenance Timer for the cloud.