PrefixAnnouncement » History » Version 9
Davide Pesavento, 02/10/2020 08:21 PM
1 | 8 | Junxiao Shi | |
---|---|---|---|
2 | 1 | Junxiao Shi | # Prefix Announcement Protocol |
3 | |||
4 | The **prefix announcement protocol** allows registering prefixes using a *prefix announcement object*. It is an alternative to NFD [[RibMgmt|RIB Management protocol]]'s `rib/register` verb. |
||
5 | |||
6 | ## Prefix Announcement object |
||
7 | |||
8 | 2 | Davide Pesavento | The **prefix announcement object** is a Data packet that represents an application's intent of registering a prefix toward itself. A Data packet that satisfies the following requirements is a prefix announcement object: |
9 | 1 | Junxiao Shi | |
10 | 7 | Davide Pesavento | * Name starts with the announced prefix, followed by a fixed `32=PA` keyword name component, followed by a version component and a segment component as defined by the [NDN Naming Conventions](https://named-data.net/publications/techreports/ndn-tr-22-ndn-memo-naming-conventions/). In the current revision of this specification, the segment number MUST be zero. |
11 | * ContentType MUST be 5 (prefix announcement). |
||
12 | * Content contains a sequence of TLV elements, including at least an ExpirationPeriod element. Ordering of these TLV elements is insignificant. Unrecognized non-critical TLV elements are permitted and MUST be ignored. |
||
13 | 1 | Junxiao Shi | |
14 | 3 | Junxiao Shi | **Validity period** of a prefix announcement object is given in ExpirationPeriod and ValidityPeriod elements in its Content. |
15 | 1 | Junxiao Shi | |
16 | 3 | Junxiao Shi | * ExpirationPeriod gives the duration for which the prefix announcement remains valid. The duration begins when a node or program receives the prefix announcement. This element is required. |
17 | * ValidityPeriod gives the absolute time range in which the prefix announcement remains valid. It is ignored if the receiving node does not have a UnixTime clock. This element is optional. |
||
18 | 7 | Davide Pesavento | * When both ExpirationPeriod and ValidityPeriod are present, the most restrictive constraint applies. |
19 | 1 | Junxiao Shi | |
20 | 9 | Davide Pesavento | The trust model of a prefix announcement is to be defined by the application. |
21 | 3 | Junxiao Shi | |
22 | ### Example |
||
23 | |||
24 | ``` |
||
25 | Data |
||
26 | 4 | Junxiao Shi | Name /net/example/32=PA/%FD%01/%00%00 |
27 | 3 | Junxiao Shi | MetaInfo |
28 | 4 | Junxiao Shi | ContentType 5 (prefix announcement) |
29 | 1 | Junxiao Shi | Content |
30 | 3 | Junxiao Shi | ExpirationPeriod 3600000 |
31 | 5 | Junxiao Shi | ValidityPeriod |
32 | NotBefore 20181030T000000 |
||
33 | NotAfter 20181124T235959 |
||
34 | 3 | Junxiao Shi | SignatureInfo |
35 | SignatureValue |
||
36 | ``` |
||
37 | 1 | Junxiao Shi | |
38 | 9 | Davide Pesavento | This prefix announcement object announces the prefix `/net/example`. It is valid for one hour from its receipt, between the dates 2018-10-30 and 2018-11-24 (included). |
39 | 1 | Junxiao Shi | |
40 | ## Command Verb: 'announce' |
||
41 | |||
42 | 9 | Davide Pesavento | This command announces a prefix using a prefix announcement object. NFD-RIB accepts this command as a *signed Interest* with the following name: |
43 | 1 | Junxiao Shi | |
44 | ``` |
||
45 | /localhost/nfd/rib/announce/<params-sha256> |
||
46 | 8 | Junxiao Shi | /localhop/nfd/rib/announce/<params-sha256> |
47 | 1 | Junxiao Shi | ``` |
48 | |||
49 | 8 | Junxiao Shi | The Interest's ApplicationParameters element carries the prefix announcement object. |
50 | 9 | Davide Pesavento | NFD-RIB converts this command into an equivalent `rib/register` command. The route's *origin* is set to "prefix announcement" (=129). |
51 | 1 | Junxiao Shi | |
52 | 9 | Davide Pesavento | The response is the same as the `rib/register` command. |
53 | 1 | Junxiao Shi | |
54 | 8 | Junxiao Shi | Note: There is no 'unannounce' command. Instead, use `rib/unregister` command. |
55 | 1 | Junxiao Shi | |
56 | 8 | Junxiao Shi | ### Example |
57 | |||
58 | ``` |
||
59 | Interest |
||
60 | Name /localhop/nfd/rib/announce/params-sha256=607a2bc7653eea18b47e92b84edc58bab5aaa321d4efb39ceeccc6cafbcbb3d1 |
||
61 | MustBeFresh |
||
62 | ApplicationParameters |
||
63 | PrefixAnnouncement |
||
64 | InterestSignatureInfo |
||
65 | 1 | Junxiao Shi | InterestSignatureValue |
66 | 8 | Junxiao Shi | ``` |
67 | |||
68 | Assuming the enclosed PrefixAnnouncement is the one shown in the previous example, NFD-RIB should interpret this command same as `rib/register` command with the following ControlParameters: |
||
69 | |||
70 | * Name: `/net/example` |
||
71 | * Origin: 129 |
||
72 | 9 | Davide Pesavento | * ExpirationPeriod: 3600000; optionally, constrained by the ValidityPeriod of the PrefixAnnouncement |