Project

General

Profile

LocalControlHeader » History » Version 8

Alex Afanasyev, 02/05/2014 04:41 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
39 3 Alex Afanasyev
## LocalControlHeader
40
41
If command to enable LocalControlHeader is authorized by NFD, all subsequent communication from NFD will include LocalControlHeader as defined below.
42 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.
43
44 3 Alex Afanasyev
    LocalControlHeader ::= LOCAL-CONTROL-HEADER-TYPE TLV-LENGTH
45 4 Alex Afanasyev
                             LocalControlInfo
46
                             (Interest | Data)
47 1 Junxiao Shi
48 4 Alex Afanasyev
    LocalControlInfo   ::= LOCAL-CONTROL-INFO-TYPE TLV-LENGTH
49 1 Junxiao Shi
                             (IncomingFaceId |
50 8 Alex Afanasyev
                              NextHopFaceId |
51
                              SnifferInfo)
52 4 Alex Afanasyev
53 1 Junxiao Shi
    IncomingFaceId     ::= INCOMING-FACE-ID-TYPE TLV-LENGTH
54 4 Alex Afanasyev
                              nonNegativeInteger
55
56 8 Alex Afanasyev
    NextHopFaceId      ::= INCOMING-FACE-ID-TYPE TLV-LENGTH
57 4 Alex Afanasyev
                              nonNegativeInteger
58
59 8 Alex Afanasyev
    SnifferInfo        ::= SNIFFER-INFO-TYPE TLV-LENGTH
60 1 Junxiao Shi
                             ...
61 4 Alex Afanasyev
                             (TBD)
62
63
64 3 Alex Afanasyev
## TLV-TYPE assignments
65
66
Type                                        | Assigned value    | Assigned value (hex)
67
------------------------------------------- | ----------------- | --------------------
68 1 Junxiao Shi
LocalControlHeader                          | 109               | 0x6d
69
LocalControlInfo                            | 110               | 0x6e
70 4 Alex Afanasyev
IncomingFaceId                              | 111               | 0x6f
71 8 Alex Afanasyev
NextHopFaceId                               | 112               | 0x70
72
SnifferInfo                                 | 113               | 0x71