4 Protocol Examples

This section describes example operations that are used in common scenarios to illustrate the function of the Proximity Service Discovery Protocol.

Examples showing computation of format identifiers from namespace URIs:

 String:  "http://schemas.xmlsoaps.org/ws/2004/10/discovery"

First (leftmost) 4 octets of HMAC–SHA256 (format id) of the previous string: 0xF8 0xCB 0x35 0x15.

 String:  "http://schemas.microsoft.com/networking/discoveryformat/v2"

First (leftmost) 4 octets of HMAC–SHA256 (format id) of the previous string: 0xCF 0xF1 0x64 0x17.

Note The transmission order is: The first (leftmost) octet is transmitted first.

If the "shatest" program as specified in [RFC4634] is used to produce the format identifier from a string, the procedure is as follows:

  1. Create a testfile containing the string in UTF-16 little endian format.

  2. Call shatest: shatest -h 2 -f testfile -k ""

The following is an example of the vendor extension IE conveyed in a Beacon or Probe Response frame for the format identifier string "test" (without quotes) and 8 octets data in the payload.

Example of the vendor extension IE

Figure 7: Example of the vendor extension IE