blob: f031d04441b25c263fead53c31d0c940f7ba77a5 [file] [log] [blame]
spirosmastorakis988e7412016-10-27 14:01:59 -07001.. _link:
2
3Link Object
4-----------
5
6The Link Object is a specialized form of a :ref:`Data packet <data>` packet, defined as follows::
7
Junxiao Shi78ce2952019-05-07 15:34:00 -04008 LinkObject = DATA-TYPE TLV-LENGTH
9 Name
10 MetaInfo ; ContentType == LINK
11 LinkContent
12 Signature
spirosmastorakis988e7412016-10-27 14:01:59 -070013
Junxiao Shi78ce2952019-05-07 15:34:00 -040014 LinkContent = CONTENT-TYPE TLV-LENGTH 1*Delegation
spirosmastorakis988e7412016-10-27 14:01:59 -070015
Junxiao Shi78ce2952019-05-07 15:34:00 -040016 Delegation = LINK-DELEGATION-TYPE TLV-LENGTH Preference Name
spirosmastorakis988e7412016-10-27 14:01:59 -070017
Davide Pesaventof9353df2020-06-21 19:19:56 -040018 Preference = LINK-PREFERENCE-TYPE TLV-LENGTH NonNegativeInteger
spirosmastorakis988e7412016-10-27 14:01:59 -070019
20
21Link Object is a data packet, whose content contains a list of one or more name delegations: a pair of name and the associate priority.
Junxiao Shicfc5d212017-06-02 17:48:51 +000022The LinkObject can be used to derive the ``ForwardingHint`` guider of an Interest packet.
spirosmastorakis988e7412016-10-27 14:01:59 -070023
24The list of delegations in ``LinkContent`` SHOULD be ordered by preference value in ascending order (i.e., the lowest value first).
25
26In a LinkContent, each Delegation SHOULD have a distinct Name.
27
28
29..
30 Lets assume that we have files that are published under /net/ndnsim, but are hosted under /att/user/alex/net/ndnsim and /verizon/user/alex/net/ndnsim. The structure of the Link would be the following:
31
32
33 +-----------------+---------------------------------------------+--------------------------------------------------------------+
34 | Link Field | Value | Description of the value |
35 +=================+=============================================+==============================================================+
36 | Name | /net/ndnsim/LINK | Name of the link (as a convention, the last NameComponent |
37 | | | MAY be "LINK") |
38 +-----------------+---------------------------------------------+--------------------------------------------------------------+
39 | MetaInfo | ContentType = LINK | Field that identifies the actual data content |
40 +-----------------+---------------------------------------------+--------------------------------------------------------------+
41 | Content | (/verizon/user/alex/net/ndnsim, 10) | Content in the form of (alias, preference) pairs |
42 | | (/att/user/alex/net/ndnsim, 100) | |
43 +-----------------+---------------------------------------------+--------------------------------------------------------------+
44 | Signature | Varying | Signed by the publisher of the Link |
45 +-----------------+---------------------------------------------+--------------------------------------------------------------+