blob: ca64b56b234e6a75ae1806f60965d738b963521f [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
8 LinkObject ::= DATA-TLV TLV-LENGTH
9 Name
10 MetaInfo (.ContentType = LINK)
11 LinkContent
12 Signature
13
14 LinkContent ::= CONTENT-TYPE TLV-LENGTH
15 Delegation+
16
17 Delegation ::= LINK-DELEGATION-TYPE TLV-LENGTH
18 Preference
19 Name
20
21 Preference ::= LINK-PREFERENCE-TYPE TLV-LENGTH
22 nonNegativeInteger
23
24
25Link 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 +000026The LinkObject can be used to derive the ``ForwardingHint`` guider of an Interest packet.
spirosmastorakis988e7412016-10-27 14:01:59 -070027
28The list of delegations in ``LinkContent`` SHOULD be ordered by preference value in ascending order (i.e., the lowest value first).
29
30In a LinkContent, each Delegation SHOULD have a distinct Name.
31
32
33..
34 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:
35
36
37 +-----------------+---------------------------------------------+--------------------------------------------------------------+
38 | Link Field | Value | Description of the value |
39 +=================+=============================================+==============================================================+
40 | Name | /net/ndnsim/LINK | Name of the link (as a convention, the last NameComponent |
41 | | | MAY be "LINK") |
42 +-----------------+---------------------------------------------+--------------------------------------------------------------+
43 | MetaInfo | ContentType = LINK | Field that identifies the actual data content |
44 +-----------------+---------------------------------------------+--------------------------------------------------------------+
45 | Content | (/verizon/user/alex/net/ndnsim, 10) | Content in the form of (alias, preference) pairs |
46 | | (/att/user/alex/net/ndnsim, 100) | |
47 +-----------------+---------------------------------------------+--------------------------------------------------------------+
48 | Signature | Varying | Signed by the publisher of the Link |
49 +-----------------+---------------------------------------------+--------------------------------------------------------------+