Project

General

Profile

LocalControlHeader » History » Version 9

Alex Afanasyev, 02/05/2014 08:59 PM

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
                                    "out-faceid"    "disable"
16
                                    "sniffer"
17 1 Junxiao Shi
18 8 Alex Afanasyev
Control modules:
19 1 Junxiao Shi
20 8 Alex Afanasyev
* ``in-faceid``  Enable/disable ability to receive information about incoming FaceId for each received Interest and Data packet
21
22
    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.
23
24
    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.
25
26
* ``out-faceid`` Enable/disable ability to specify outgoing FaceId.
27
28
    After this command, NFD will accept incoming Interests encapsulated in LocalControlHeader that specifies outgoing FaceId to forward this Interest.
29
30
    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.
31
32
* ``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
    To snif on all faces, ``<face-id>`` should be 0.
37
38 3 Alex Afanasyev
## LocalControlHeader
39
40
If command to enable LocalControlHeader is authorized by NFD, all subsequent communication from NFD will include LocalControlHeader as defined below.
41 1 Junxiao Shi
The authorized application will also be able to include LocalControlHeader in communication to NFD---until specifically enabled, all specified LocalControlHeaders should be ignored by NFD.
42
43 3 Alex Afanasyev
    LocalControlHeader ::= LOCAL-CONTROL-HEADER-TYPE TLV-LENGTH
44 4 Alex Afanasyev
                             LocalControlInfo
45
                             (Interest | Data)
46 1 Junxiao Shi
47 4 Alex Afanasyev
    LocalControlInfo   ::= LOCAL-CONTROL-INFO-TYPE TLV-LENGTH
48 1 Junxiao Shi
                             (IncomingFaceId |
49 8 Alex Afanasyev
                              NextHopFaceId |
50
                              SnifferInfo)
51 4 Alex Afanasyev
52 1 Junxiao Shi
    IncomingFaceId     ::= INCOMING-FACE-ID-TYPE TLV-LENGTH
53 4 Alex Afanasyev
                              nonNegativeInteger
54 1 Junxiao Shi
55 9 Alex Afanasyev
    NextHopFaceId      ::= NEXT-HOP-FACE-ID-TYPE TLV-LENGTH
56 4 Alex Afanasyev
                              nonNegativeInteger
57
58 8 Alex Afanasyev
    SnifferInfo        ::= SNIFFER-INFO-TYPE TLV-LENGTH
59 1 Junxiao Shi
                             ...
60 4 Alex Afanasyev
                             (TBD)
61
62 3 Alex Afanasyev
## TLV-TYPE assignments
63
64
Type                                        | Assigned value    | Assigned value (hex)
65
------------------------------------------- | ----------------- | --------------------
66 1 Junxiao Shi
LocalControlHeader                          | 109               | 0x6d
67
LocalControlInfo                            | 110               | 0x6e
68 4 Alex Afanasyev
IncomingFaceId                              | 111               | 0x6f
69 8 Alex Afanasyev
NextHopFaceId                               | 112               | 0x70
70
SnifferInfo                                 | 113               | 0x71