blob: f0c2199485313bddd5045eab2e5511575810cefa [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.
26The semantical meaning of the delegations depends on the specific use. For example, when LinkObject is used as part of Interest packet, each delegation implies that the requested Data packet can be retrieved by forwarding the interest along the delegation path. Specifics of the forwarding logic for Interests with ``LinkObject`` will be defined in a separated document.
27
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 +-----------------+---------------------------------------------+--------------------------------------------------------------+