Project

General

Profile

LocalControlHeader » History » Version 17

Junxiao Shi, 02/14/2014 11:08 PM

1 1 Junxiao Shi
# 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
This request to enable/disable local control header is in form of [[Command_Interests|Command Interest]] and have the following structure:
12
13 17 Junxiao Shi
    /localhost/nfd/control-header/<control-module>/<command-verb>/<timestamp>/<random-value>/<SignatureInfo>/<SignatureValue>
14 1 Junxiao Shi
    
15 17 Junxiao Shi
    \                            / \                            / \                                                         /
16
     ------------  ------------     ------------  --------------   ---------------------------  ----------------------------
17
                 \/                             \/                                            \/
18
       NFD Control Command          "in-faceid"      "enable" or              Command Interest related information
19 16 Junxiao Shi
                                  "nexthop-faceid"    "disable"
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
                             LocalControlInfo
55 8 Alex Afanasyev
                             (Interest | Data)
56 4 Alex Afanasyev
57 1 Junxiao Shi
    LocalControlInfo   ::= LOCAL-CONTROL-INFO-TYPE TLV-LENGTH
58 4 Alex Afanasyev
                             (IncomingFaceId |
59 1 Junxiao Shi
                              NextHopFaceId)
60
61
    IncomingFaceId     ::= INCOMING-FACE-ID-TYPE TLV-LENGTH
62
                              nonNegativeInteger
63 12 Alex Afanasyev
64
    NextHopFaceId      ::= NEXT-HOP-FACE-ID-TYPE TLV-LENGTH
65 1 Junxiao Shi
                              nonNegativeInteger
66 12 Alex Afanasyev
67 1 Junxiao Shi
68 8 Alex Afanasyev
<!--
69 1 Junxiao Shi
                              SnifferInfo)
70 12 Alex Afanasyev
    SnifferInfo        ::= SNIFFER-INFO-TYPE TLV-LENGTH
71 4 Alex Afanasyev
                             ...
72 3 Alex Afanasyev
                             (TBD)
73
-->
74
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