spirosmastorakis | 988e741 | 2016-10-27 14:01:59 -0700 | [diff] [blame] | 1 | .. _link: |
| 2 | |
| 3 | Link Object |
| 4 | ----------- |
| 5 | |
| 6 | The Link Object is a specialized form of a :ref:`Data packet <data>` packet, defined as follows:: |
| 7 | |
Junxiao Shi | 78ce295 | 2019-05-07 15:34:00 -0400 | [diff] [blame] | 8 | LinkObject = DATA-TYPE TLV-LENGTH |
| 9 | Name |
| 10 | MetaInfo ; ContentType == LINK |
| 11 | LinkContent |
| 12 | Signature |
spirosmastorakis | 988e741 | 2016-10-27 14:01:59 -0700 | [diff] [blame] | 13 | |
Junxiao Shi | 78ce295 | 2019-05-07 15:34:00 -0400 | [diff] [blame] | 14 | LinkContent = CONTENT-TYPE TLV-LENGTH 1*Delegation |
spirosmastorakis | 988e741 | 2016-10-27 14:01:59 -0700 | [diff] [blame] | 15 | |
Junxiao Shi | 78ce295 | 2019-05-07 15:34:00 -0400 | [diff] [blame] | 16 | Delegation = LINK-DELEGATION-TYPE TLV-LENGTH Preference Name |
spirosmastorakis | 988e741 | 2016-10-27 14:01:59 -0700 | [diff] [blame] | 17 | |
Davide Pesavento | f9353df | 2020-06-21 19:19:56 -0400 | [diff] [blame] | 18 | Preference = LINK-PREFERENCE-TYPE TLV-LENGTH NonNegativeInteger |
spirosmastorakis | 988e741 | 2016-10-27 14:01:59 -0700 | [diff] [blame] | 19 | |
| 20 | |
| 21 | Link 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 Shi | cfc5d21 | 2017-06-02 17:48:51 +0000 | [diff] [blame] | 22 | The LinkObject can be used to derive the ``ForwardingHint`` guider of an Interest packet. |
spirosmastorakis | 988e741 | 2016-10-27 14:01:59 -0700 | [diff] [blame] | 23 | |
| 24 | The list of delegations in ``LinkContent`` SHOULD be ordered by preference value in ascending order (i.e., the lowest value first). |
| 25 | |
| 26 | In a LinkContent, each Delegation SHOULD have a distinct Name. |
| 27 | |
| 28 | |
| 29 | .. |
| 30 | Let’s 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 | +-----------------+---------------------------------------------+--------------------------------------------------------------+ |