Project

General

Profile

LocalControlHeader » History » Version 15

Alex Afanasyev, 02/10/2014 10:52 AM

1 1 Junxiao Shi
# NFD local control header
2 3 Alex Afanasyev
3
NFD local control header can be 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, the control header allows applications to request bypassing the Interest forwarding strategy by directly specify FaceId to which the Interest should be forwarded.
5
6
NFD local control header is not enabled by default and requires explicit request from the client to enable.
7
This request is in form of [[Signed_Interests|Signed Interest]] and have the following structure:
8
9 8 Alex Afanasyev
    /localhost/nfd/control-header/<control-module>/command-verb>/<timestamp>/<SignatureInfo>/<SignatureValue>
10 1 Junxiao Shi
    
11 8 Alex Afanasyev
    \                            / \                           / \                                          /
12
     ------------  ------------     ------------  -------------   --------------------  --------------------
13
                 \/                             \/                                    \/
14
       NFD Control Command          "in-faceid"     "enable" or       Signed Interest related information
15 15 Alex Afanasyev
                                  "nexthop-faceid"   "disable"
16 1 Junxiao Shi
17 8 Alex Afanasyev
Control modules:
18 1 Junxiao Shi
19 8 Alex Afanasyev
* ``in-faceid``  Enable/disable ability to receive information about incoming FaceId for each received Interest and Data packet
20
21
    After successful enable, subsequent packets will be encapsulated in within LocalControlHeader, as defined below.  And vice versa, after successful disable, subsequent packets will not be encapsulated.
22
23
    Note that the command may not be immediate.  Packets that were scheduled for transmission before the command arrival will be received without (or with) LocalControlHeader present.
24
25 15 Alex Afanasyev
* ``nexthop-faceid`` Enable/disable ability to specify nexthop FaceId.
26 8 Alex Afanasyev
27 15 Alex Afanasyev
    After this command, NFD will accept incoming Interests encapsulated in LocalControlHeader that specifies nexthop FaceId to forward this Interest.
28 8 Alex Afanasyev
29
    Note that this will affect only Interest for namespaces that is managed by special ``ClientControl`` strategy.  If FIB entry for the Interest uses any other strategy, information specified in LocalControlHeader will be ignored.
30 1 Junxiao Shi
31 12 Alex Afanasyev
<!--
32 8 Alex Afanasyev
* ``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>``:
33
34
        /localhost/nfd/control-header/sniffer/(enable|disable)/<face-id>/<timestamp>/<SignatureInfo>/<SignatureValue>
35
    
36 1 Junxiao Shi
    To snif on all faces, ``<face-id>`` should be 0.
37 12 Alex Afanasyev
-->
38 3 Alex Afanasyev
39
## LocalControlHeader
40
41 15 Alex Afanasyev
The LocalControlHeader is defined as follows:
42 1 Junxiao Shi
43 3 Alex Afanasyev
    LocalControlHeader ::= LOCAL-CONTROL-HEADER-TYPE TLV-LENGTH
44 1 Junxiao Shi
                             LocalControlInfo
45 4 Alex Afanasyev
                             (Interest | Data)
46 1 Junxiao Shi
47
    LocalControlInfo   ::= LOCAL-CONTROL-INFO-TYPE TLV-LENGTH
48 8 Alex Afanasyev
                             (IncomingFaceId |
49 15 Alex Afanasyev
                              NextHopFaceId)
50 4 Alex Afanasyev
51 1 Junxiao Shi
    IncomingFaceId     ::= INCOMING-FACE-ID-TYPE TLV-LENGTH
52 4 Alex Afanasyev
                              nonNegativeInteger
53 1 Junxiao Shi
54
    NextHopFaceId      ::= NEXT-HOP-FACE-ID-TYPE TLV-LENGTH
55
                              nonNegativeInteger
56
57 12 Alex Afanasyev
58
<!--
59
                              SnifferInfo)
60 1 Junxiao Shi
    SnifferInfo        ::= SNIFFER-INFO-TYPE TLV-LENGTH
61 8 Alex Afanasyev
                             ...
62 1 Junxiao Shi
                             (TBD)
63 12 Alex Afanasyev
-->
64 4 Alex Afanasyev
65 3 Alex Afanasyev
## TLV-TYPE assignments
66
67
Type                                        | Assigned value    | Assigned value (hex)
68 1 Junxiao Shi
------------------------------------------- | ----------------- | --------------------
69
LocalControlHeader                          | 109               | 0x6d
70
LocalControlInfo                            | 110               | 0x6e
71 4 Alex Afanasyev
IncomingFaceId                              | 111               | 0x6f
72 8 Alex Afanasyev
NextHopFaceId                               | 112               | 0x70
73 12 Alex Afanasyev
Reserved                                    | 113               | 0x71