LocalControlHeader » History » Version 24
Junxiao Shi, 03/22/2014 03:29 PM
| 1 | 18 | Alex Afanasyev | # NFD Local Control Header |
|---|---|---|---|
| 2 | 3 | Alex Afanasyev | |
| 3 | 24 | Junxiao Shi | NFD LocalControlHeader 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, LocalControlHeader allows applications to specify FaceId to which the Interest should be forwarded. |
||
| 5 | 1 | Junxiao Shi | |
| 6 | 24 | Junxiao Shi | ## Enabling and disabling LocalControlHeader |
| 7 | 1 | Junxiao Shi | |
| 8 | 24 | Junxiao Shi | LocalControlHeader is not enabled initially. |
| 9 | Application can invoke [[FaceMgmt#Enable a LocalControlHeader feature|faces/enable-local-control]] command to enable a LocalControlHeader feature, |
||
| 10 | and invoke [[FaceMgmt#Disable a LocalControlHeader feature|faces/disable-local-control]] command to disable a LocalControlHeader feature, |
||
| 11 | 1 | Junxiao Shi | |
| 12 | 24 | Junxiao Shi | NFD MUST NOT deliver packets with LocalControlHeader to an application unless the application has enabled at least one LocalControlHeader feature. |
| 13 | NFD SHOULD ignore a LocalControlHeader field if the corresponding feature is not enabled. |
||
| 14 | An enable or disable command MAY NOT take effect immediately. |
||
| 15 | Packets scheduled for transmission before processing the enable or disable command could be delivered or processed in the old state. |
||
| 16 | 16 | Junxiao Shi | |
| 17 | 24 | Junxiao Shi | ## LocalControlHeader structure |
| 18 | 16 | Junxiao Shi | |
| 19 | 8 | Alex Afanasyev | LocalControlHeader ::= LOCAL-CONTROL-HEADER-TYPE TLV-LENGTH |
| 20 | 16 | Junxiao Shi | IncomingFaceId? |
| 21 | 8 | Alex Afanasyev | NextHopFaceId? |
| 22 | 1 | Junxiao Shi | ...? |
| 23 | 12 | Alex Afanasyev | (Interest | Data) |
| 24 | 3 | Alex Afanasyev | |
| 25 | IncomingFaceId ::= INCOMING-FACE-ID-TYPE TLV-LENGTH |
||
| 26 | nonNegativeInteger |
||
| 27 | 15 | Alex Afanasyev | |
| 28 | 1 | Junxiao Shi | NextHopFaceId ::= NEXT-HOP-FACE-ID-TYPE TLV-LENGTH |
| 29 | 3 | Alex Afanasyev | nonNegativeInteger |
| 30 | 1 | Junxiao Shi | |
| 31 | 24 | Junxiao Shi | Although all fields before `(Interest | Data)` in LocalControlHeader are marked optional, at least one of them must be present. |
| 32 | 1 | Junxiao Shi | |
| 33 | 24 | Junxiao Shi | ## IncomingFaceId feature |
| 34 | |||
| 35 | This feature allows application to learn the incoming face of each Interest and Data packet. |
||
| 36 | |||
| 37 | If this feature is enabled, |
||
| 38 | when an incoming Interest or Data is delivered to application, |
||
| 39 | the packet is encapsulated in LocalControlHeader, with IncomingFaceId field is set to the incoming FaceId. |
||
| 40 | However, Datas from the ContentStore won't have a IncomingFaceId field. |
||
| 41 | |||
| 42 | ## NextHopFaceId feature |
||
| 43 | |||
| 44 | This feature allows application to pick a nexthop for its Interest. |
||
| 45 | |||
| 46 | If this feature is enabled, |
||
| 47 | application can encapsulate an Interest in LocalControlHeader, and set NextHopFaceId field to the desired nexthop. |
||
| 48 | |||
| 49 | **ClientControl strategy** SHOULD be [[StrategyChoice|chosen]] as the effective strategy on the Interest's namespace. |
||
| 50 | It will honor NextHopFaceId field, and forward Interest to the desired nexthop. |
||
| 51 | If other strategy is being used, NextHopFaceId has no effect. |
||
| 52 | 21 | Alex Afanasyev | |
| 53 | 1 | Junxiao Shi | ## TLV-TYPE assignments |
| 54 | |||
| 55 | Type | Assigned value | Assigned value (hex) |
||
| 56 | ------------------------------------------- | ----------------- | -------------------- |
||
| 57 | 23 | Alex Afanasyev | LocalControlHeader | 80 | 0x50 |
| 58 | IncomingFaceId | 81 | 0x51 |
||
| 59 | NextHopFaceId | 82 | 0x52 |