FaceMgmt » History » Version 4
Alex Afanasyev, 01/30/2014 05:37 PM
1 | 1 | Junxiao Shi | # NFD Face Management protocol |
---|---|---|---|
2 | |||
3 | 2 | Alex Afanasyev | The **Face Management protocol** allows an entity to request NFD daemon create and destroy the faces. |
4 | |||
5 | The ace Management protocol uses [[Signed Interests]]-Data exchange. |
||
6 | The command request and response follows the [[ControlCommand|NFD Control Command specification]] |
||
7 | |||
8 | ## Command format |
||
9 | |||
10 | ### Request |
||
11 | |||
12 | Request is a signed Interest with the following name: |
||
13 | |||
14 | /localhost/nfd/faces/<command-verb>/<command-options>/<timestamp>/<SignatureInfo>/<SignatureValue> |
||
15 | |||
16 | \ / \ / \ / |
||
17 | -------- -------- ------------- --------------- -------------------- -------------------- |
||
18 | \/ \/ \/ |
||
19 | NFD Control Command FaceManager command Signed Interest related information |
||
20 | to FaceManager and command options |
||
21 | |||
22 | |||
23 | Command options is defined as a TLV-encoded ``FaceManagementOptions`` block. |
||
24 | Each individual command defines a subset of required and optional elements in the ``FaceManagementOptions`` block. |
||
25 | |||
26 | FaceManagementOptions ::= FACE-MANAGEMENT-OPTIONS-TYPE TLV-LENGTH |
||
27 | FaceId? |
||
28 | ... TBD |
||
29 | |||
30 | // Name defined in NDN-TLV spec |
||
31 | |||
32 | FaceId ::= FACEID-TYPE TLV-LENGTH |
||
33 | nonNegativeInteger |
||
34 | |||
35 | ### Response |
||
36 | |||
37 | Command response is a Data packet that contains TLV-encoded ``ControlResponse`` block, defined in [[ControlCommand|NFD Control Command specification]]. |
||
38 | |||
39 | The response has StatusCode 200 if the command succeeds. |
||
40 | |||
41 | <!-- Alex: Should positive responses contain TLV-Encoded ``FaceManagementOptions`` block related to the command (after StatusText)? --> |
||
42 | |||
43 | Any other status code (4xx, 5xx, [?]) mean error. |
||
44 | Description of the error can be present in ``StatusText`` field of ``ControlResponse`` command. |
||
45 | |||
46 | ### Operations |
||
47 | |||
48 | **Face management protocol** protocol supports five operations: |
||
49 | |||
50 | * create a face (command-verb: ``create``) |
||
51 | * destroy a face (command-verb: ``destroy``) |
||
52 | |||
53 | ## Create a face |
||
54 | |||
55 | **command-verb:** ``create`` |
||
56 | |||
57 | Required fields in ``FaceManagementOptions`` block: |
||
58 | |||
59 | ## Destroy a face |
||
60 | |||
61 | **command-verb:** ``destroy`` |
||
62 | |||
63 | Required fields in ``FaceManagementOptions`` block: |
||
64 | |||
65 | |||
66 | ## TLV-TYPE assignments |
||
67 | |||
68 | Type | Assigned value | Assigned value (hex) |
||
69 | ------------------------------------------- | ----------------- | -------------------- |
||
70 | 4 | Alex Afanasyev | FaceManagementOptions | 108 | 0x6c |
71 | 2 | Alex Afanasyev | FaceId | 105 | 0x69 |