PrefixAnnouncement » History » Version 8
Junxiao Shi, 02/07/2020 06:06 AM
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 | 7 | Davide Pesavento | The trust model of 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 | |||
38 | 1 | Junxiao Shi | This prefix announcement object announces the prefix `/net/example`. |
39 | 8 | Junxiao Shi | It is valid for one hour since receipt, within the date range 2018-10-30 and 2018-11-24. |
40 | 1 | Junxiao Shi | |
41 | 8 | Junxiao Shi | ## Command Verb: 'announce' |
42 | 1 | Junxiao Shi | |
43 | This command announces a prefix using a prefix announcement object. |
||
44 | 8 | Junxiao Shi | NFD-RIB accepts this command as a *signed Interest* with the following name: |
45 | 1 | Junxiao Shi | |
46 | ``` |
||
47 | 8 | Junxiao Shi | /localhost/nfd/rib/announce/<params-sha256> |
48 | /localhop/nfd/rib/announce/<params-sha256> |
||
49 | 1 | Junxiao Shi | ``` |
50 | |||
51 | 8 | Junxiao Shi | The Interest's ApplicationParameters element carries the prefix announcement object. |
52 | 1 | Junxiao Shi | |
53 | NFD-RIB converts this command into an equivalent `rib/register` command. Route *origin* is set to "prefix announcement" (number 129). |
||
54 | Response is the same as `rib/register` command. |
||
55 | |||
56 | 8 | Junxiao Shi | Note: There is no 'unannounce' command. Instead, use `rib/unregister` command. |
57 | 1 | Junxiao Shi | |
58 | 8 | Junxiao Shi | ### Example |
59 | |||
60 | ``` |
||
61 | Interest |
||
62 | Name /localhop/nfd/rib/announce/params-sha256=607a2bc7653eea18b47e92b84edc58bab5aaa321d4efb39ceeccc6cafbcbb3d1 |
||
63 | MustBeFresh |
||
64 | ApplicationParameters |
||
65 | PrefixAnnouncement |
||
66 | InterestSignatureInfo |
||
67 | InterestSignatureValue |
||
68 | ``` |
||
69 | |||
70 | 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: |
||
71 | |||
72 | * Name: `/net/example` |
||
73 | * Origin: 129 |
||
74 | * ExpirationPeriod: 3600000; optionally, constrained by ValidityPeriod of the PrefixAnnouncement |