LocalControlHeader » History » Version 21
Alex Afanasyev, 02/17/2014 08:40 PM
1 | 18 | Alex Afanasyev | # NFD Local Control Header |
---|---|---|---|
2 | 3 | Alex Afanasyev | |
3 | 16 | Junxiao Shi | NFD local control header is used between application and local forwarding daemon to exchange various NFD-specific local information that is not part of Interest and Data packet. |
4 | For example, local control header allows applications to specify FaceId to which the Interest should be forwarded. |
||
5 | 1 | Junxiao Shi | |
6 | 16 | Junxiao Shi | ## Enabling and disabling local control header |
7 | 1 | Junxiao Shi | |
8 | 16 | Junxiao Shi | NFD local control header is not enabled by default and requires explicit request from the client to enable. |
9 | NFD MUST NOT deliver packets with LocalControlHeader to an application unless the application has enabled at least one control module. |
||
10 | |||
11 | 19 | Alex Afanasyev | This request to enable/disable local control header is in form of [[Command_Interests|Signed Command Interest]] and have the following structure: |
12 | 16 | Junxiao Shi | |
13 | 19 | Alex Afanasyev | /localhost/nfd/control-header/<control-module>/<command-verb>/................... |
14 | 1 | Junxiao Shi | |
15 | 19 | Alex Afanasyev | \ / \ / \ / |
16 | ------------ ------------ ------------ -------------- ------- -------- |
||
17 | \/ \/ \/ |
||
18 | NFD Control Command "in-faceid" "enable" or Command Interest |
||
19 | "nexthop-faceid" "disable" related information |
||
20 | 1 | Junxiao Shi | |
21 | 16 | Junxiao Shi | An enable/disable command MAY NOT take effect immediately. |
22 | Packets scheduled for transmission before processing the enable/disable command successfully could be delivered or processed in the old state. |
||
23 | 1 | Junxiao Shi | |
24 | 16 | Junxiao Shi | ## Control modules |
25 | 1 | Junxiao Shi | |
26 | 16 | Junxiao Shi | ### in-faceid |
27 | 8 | Alex Afanasyev | |
28 | 16 | Junxiao Shi | This control module allows application to receive information about incoming FaceId for each received Interest and Data packet. |
29 | 8 | Alex Afanasyev | |
30 | 16 | Junxiao Shi | When enabled, packets will be encapsulated in LocalControlHeader, as defined below. |
31 | 8 | Alex Afanasyev | |
32 | 16 | Junxiao Shi | ### nexthop-faceid |
33 | 8 | Alex Afanasyev | |
34 | 16 | Junxiao Shi | This control module allows application to specify nexthop FaceId in outgoing Interests. |
35 | 8 | Alex Afanasyev | |
36 | 16 | Junxiao Shi | When enabled, NFD will accept incoming Interests encapsulated in LocalControlHeader that specifies nexthop FaceId to forward this Interest. |
37 | |||
38 | The specified `NextHopFaceId` is effective only if the Interest is under a namespace managed by `ClientControl` strategy. |
||
39 | If the namespace uses any other strategy, `NextHopFaceId` will be ignored. |
||
40 | |||
41 | 8 | Alex Afanasyev | <!-- |
42 | * ``sniffer`` Enable/disable sniffing on all or specific Faces. The format of this command is actually is a little bit different and requires one more option: ``<face-id>``: |
||
43 | 1 | Junxiao Shi | |
44 | 12 | Alex Afanasyev | /localhost/nfd/control-header/sniffer/(enable|disable)/<face-id>/<timestamp>/<SignatureInfo>/<SignatureValue> |
45 | 3 | Alex Afanasyev | |
46 | To snif on all faces, ``<face-id>`` should be 0. |
||
47 | --> |
||
48 | 15 | Alex Afanasyev | |
49 | 1 | Junxiao Shi | ## LocalControlHeader |
50 | 3 | Alex Afanasyev | |
51 | 1 | Junxiao Shi | The LocalControlHeader is defined as follows: |
52 | 4 | Alex Afanasyev | |
53 | 1 | Junxiao Shi | LocalControlHeader ::= LOCAL-CONTROL-HEADER-TYPE TLV-LENGTH |
54 | 20 | Alex Afanasyev | IncomingFaceId? |
55 | NextHopFaceId? |
||
56 | 21 | Alex Afanasyev | ...? |
57 | 1 | Junxiao Shi | (Interest | Data) |
58 | |||
59 | IncomingFaceId ::= INCOMING-FACE-ID-TYPE TLV-LENGTH |
||
60 | nonNegativeInteger |
||
61 | 12 | Alex Afanasyev | |
62 | 1 | Junxiao Shi | NextHopFaceId ::= NEXT-HOP-FACE-ID-TYPE TLV-LENGTH |
63 | 12 | Alex Afanasyev | nonNegativeInteger |
64 | 1 | Junxiao Shi | |
65 | 8 | Alex Afanasyev | <!-- |
66 | 1 | Junxiao Shi | SnifferInfo) |
67 | 12 | Alex Afanasyev | SnifferInfo ::= SNIFFER-INFO-TYPE TLV-LENGTH |
68 | 4 | Alex Afanasyev | ... |
69 | 3 | Alex Afanasyev | (TBD) |
70 | --> |
||
71 | 21 | Alex Afanasyev | |
72 | Note that although that all items before ``(Interest | Data)`` in LocalControlHeader are marked optional, at least one of the items must be present. |
||
73 | |||
74 | 3 | Alex Afanasyev | |
75 | 1 | Junxiao Shi | ## TLV-TYPE assignments |
76 | |||
77 | Type | Assigned value | Assigned value (hex) |
||
78 | 4 | Alex Afanasyev | ------------------------------------------- | ----------------- | -------------------- |
79 | 8 | Alex Afanasyev | LocalControlHeader | 109 | 0x6d |
80 | 12 | Alex Afanasyev | LocalControlInfo | 110 | 0x6e |
81 | 1 | Junxiao Shi | IncomingFaceId | 111 | 0x6f |
82 | NextHopFaceId | 112 | 0x70 |
||
83 | 16 | Junxiao Shi | (reserved) | 113 | 0x71 |