2.2.2.8 LOOKUP

The LOOKUP message is sent by a Resolver to a Publisher to resolve a PNRP ID.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

FieldID1

Length1

Reserved1

A

0

Precision

ResolveCriteria

ResolveReasonCode

Reserved2

FieldID2

Length2

Target PNRP ID (32 bytes)

...

...

FieldID3

Length3

Validate PNRP ID (32 bytes)

...

...

FieldID4 (optional)

Length4 (optional)

Route Entry (variable)

...

Padding4 (variable)

...

FieldID5

Length5

NumEntries

ArrayLength

ElementFieldType

EntryLength

Flagged Path (variable)

...

FieldID1 (2 bytes): MUST be set to 0x0045 (LOOKUP_CONTROLS).

Length1 (2 bytes): MUST be set to 0x000C.

Reserved1 (14 bits): Reserved. MUST be set to zero when sent and MUST be ignored on receipt.

A (1 bit): If set, indicates that the sender is willing to accept returned nodes that are not closer to the target ID than the Validate PNRP ID.

0 (1 bit): Reserved. MUST be set to zero when sent and MUST be ignored on receipt.

Precision (2 bytes): Number of significant bits to match. When ResolveCriteria is not set to SEARCH_OPCODE_UPPER_BITS, the Precision field MAY be set to any arbitrary value and MUST be ignored upon receipt.

ResolveCriteria (1 byte): The type of PNRP ID matching that the sender is requesting, which is chosen based on higher-layer requirements. MUST be one of the following (for example, although the values are powers of two, they are not bits that can be combined).

Value

Meaning

SEARCH_OPCODE_NONE

0x00

Compare all 256 bits of the PNRP ID.

SEARCH_OPCODE_ANY_PEERNAME

0x01

Compare only the first 128 bits of the PNRP ID.

SEARCH_OPCODE_NEAREST_PEERNAME

0x02

Compare all 256 bits of the PNRP ID and return the closest possible match.

SEARCH_OPCODE_NEAREST64_PEERNAME

0x04

Compare only the first 192 bits of the PNRP ID and return the closest possible match.

SEARCH_OPCODE_UPPER_BITS

0x08

Compare a number of bits equal to the value in the Precision field.

ResolveReasonCode (1 byte): The reason for the LOOKUP request. This value is ignored by the recipient. MUST be one of the following.

Value

Meaning

REASON_APP_REQUEST

0x00

The LOOKUP was sent in response to an application request.

REASON_REGISTRATION

0x01

The LOOKUP was sent in response to a completed registration that is being announced.

REASON_CACHE_MAINTENANCE

0x02

The LOOKUP was sent because the node is performing cache maintenance.

REASON_SPLIT_DETECTION

0x03

The LOOKUP was sent because the node is testing for a split cloud.

Reserved2 (2 bytes): MUST be set to zero when sent and MUST be ignored on receipt.

FieldID2 (2 bytes): MUST be set to 0x0038 (Target PNRP ID).

Length2 (2 bytes): MUST be set to 0x0024 (36 bytes).

Target PNRP ID (32 bytes): The PNRP ID to look up.

FieldID3 (2 bytes): MUST be set to 0x0039 (Validate PNRP ID).

Length3 (2 bytes): MUST be set to 0x0024 (36 bytes).

Validate PNRP ID (32 bytes): A PNRP ID of the destination machine.

FieldID4 (2 bytes): If present, MUST be set to 0x009A (ROUTING_ENTRY).

Length4 (2 bytes): If present, MUST be set to 4 plus the size in bytes of the Route Entry field.

Route Entry (variable): If present, a ROUTE_ENTRY structure for the best match so far.

Padding4 (variable): A number of bytes between 0 and 3, such that the offset from the start of the message to the end of this field is a multiple of 4. MUST be present if and only if FieldID4 is present. MUST be set to zero when sent and MUST be ignored on receipt.

FieldID5 (2 bytes): MUST be set to 0x009E (IPV6_ENDPOINT_ARRAY).

Length5 (2 bytes): MUST be set to 12+(NumEntries*EntryLength).

NumEntries (2 bytes): Number of entries in the Flagged Path field. MUST be in the range 1 to 22.

ArrayLength (2 bytes): MUST be set to 8+(NumEntries*EntryLength).

ElementFieldType (2 bytes): MUST be set to 0x009D (IPV6_ENDPOINT).

EntryLength (2 bytes): MUST be set to 0x0012 (18 bytes).

Flagged Path (variable): A list of IPV6_ENDPOINT structures for PNRP node that have seen this LOOKUP request so far.

Show: