Partager via


Peer Names and Clouds (Windows CE 5.0)

Send Feedback

A peer name is a string that contains a stable name for a resource such as a computer, a user, a group, or a service. The Peer Name Resolution Protocol (PNRP) uses peer names to identify nodes in a peer network.

Note   An endpoint used by the peer-to-peer networking functionality is a tuple. A tuple consists of an IPv4 or IPv6 address, a port, and a protocol, such as TCP or UDP. A peer name can have more than one tuple.

Peer names can be categorized into secure peer names and unsecure peer names. Peer names are case-sensitive and the format of a peer name is: Authority.Classifier. The value of Authority depends on whether or not the name is a secure peer name or an unsecure peer name. The Classifier part of the name can be set to any string that contains 15 or fewer Unicode characters, including the NULL terminator.

There can be more than one instance of a peer name. When a peer uses PNRP to resolve a peer name, the nearest peer name instance refers to the name that has a service location closest to the supplied hint. If no hint is supplied, then the nearest peer name instance is the closest to one of the local IP addresses.

Secure Peer Names

A secure peer name is a peer name that contains the Secure Hash Algorithm (SHA) hash of the public key of the peer name. The value of Authority contains the public key as a 40 character hexadecimal string such as, 6520c005f63fc1864b7d8f3cabebd4916ae7f33d. Only the owner, or delegate of the peer name owner, can register a secure peer name with PNRP. To create a secure peer name, call the PeerCreatePeerName function.

Note   Using a secure peer name does not ensure the overall security of your networking application. Security of the application depends on your implementation.

Unsecured Peer Names

An unsecured peer name is a peer name without an associated identity. For an unsecured name Authority is zero (0) and Classifier is the only significant part of the peer name. Anyone can register an unsecured peer name with PNRP. Unsecured peer names provide a useful way to register and resolve resources that do not require secure name resolution. However, any node can publish any unsecured name. The following list identifies some examples of unsecured peer names:

  • 0.MyUnsecuredPeerName
  • 0.JohnDoe.Games

Note   If you are concerned for security in applications that use unsecure peer names, ensure that you include security mechanisms in your implementation.

Clouds

A cloud is identified by PNRP and is defined as a set of peers that communicate within the same IPv6 scope. The following list identifies some of the unique cloud characteristics:

  • A cloud is identified by a name, and available clouds can be enumerated by using the WSALookupServiceBegin (Windows Sockets) function.
  • If a computer is connected to the Internet, it is part of a global cloud. The string "Global_" identifies the global cloud.
  • If a computer is connected to one or more local area networks (LAN), individual clouds are available for each link.
  • One computer can be connected to many networks by having multiple network adapters or by using a virtual private network (VPN). This means that a computer with one interface can be visible in many clouds.
  • You can use PNRP to register and resolve peer names in a specific cloud.

See Also

Peer-to-Peer Application Development | Internet Protocol Version 6

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.