NLSR Management » History » Version 6
Muktadir Chowdhury, 02/27/2015 06:44 AM
1 | 1 | Muktadir Chowdhury | NLSR Management |
---|---|---|---|
2 | =============== |
||
3 | 2 | Muktadir Chowdhury | |
4 | NLSR Management provides: |
||
5 | |||
6 | - command to add(advertise) routes to name prefix list |
||
7 | - command to remove(withdraw) routes to name prefix list |
||
8 | |||
9 | 3 | Muktadir Chowdhury | ## 1. Control Commands |
10 | 2 | Muktadir Chowdhury | |
11 | 3 | Muktadir Chowdhury | ### Add a name prefix |
12 | ### command-verb: advertise |
||
13 | 2 | Muktadir Chowdhury | This command adds a name prefix to the name prefix list. This command can be accepted on ```ndn:/localhost/nlsr/routeUpdate``` prefix. |
14 | |||
15 | 3 | Muktadir Chowdhury | ### Control Parameters |
16 | 2 | Muktadir Chowdhury | - Name (required) |
17 | |||
18 | ## Remove a name prefix |
||
19 | 3 | Muktadir Chowdhury | ### command-verb: withdraw |
20 | 2 | Muktadir Chowdhury | This command removes a name prefix from the name prefix list. This command can be accepted on ```ndn:/localhost/nlsr/routeUpdate``` prefix. |
21 | 3 | Muktadir Chowdhury | ### Control Parameters |
22 | 2 | Muktadir Chowdhury | - Name (required) |
23 | |||
24 | 3 | Muktadir Chowdhury | ## 2. Request format |
25 | 2 | Muktadir Chowdhury | NLSR control commands are signed interests, whose name has the following form: ```/<prefix>/<management-module>/<command-verb>/<control-parameters>/<signed-interests-components>``` |
26 | |||
27 | - ```<prefix>``` is ```/localhost/nlsr ```. Each individual command may specify additional prefixes under which that command could be accepted. |
||
28 | - ```<management-module> ```is the name of management module to which the command needs to be dispatched. For example, the name of the management module of the task I’m doing now would be ```routeUpdate```. |
||
29 | - ```<command-verb>``` is the command to be executed. For this task this would be either ```withdraw``` or ```advertise```. |
||
30 | - <control-parameters> is a ControlParameters TLV block wrapped in a NameComponent. |
||
31 | - <signed-interest-components> are four additional components defined by [ndn-cxx:SignedInterest|Signed Interest] spec. |
||
32 | So, putting everything together, the complete name of a command interest would be ```localhost/nlsr/routeUpdate/advertise``` or ```localhost/nlsr/routeUpdate/withdraw``` |
||
33 | |||
34 | 6 | Muktadir Chowdhury | ## 3. Response Format |
35 | 1 | Muktadir Chowdhury | |
36 | 2 | Muktadir Chowdhury | A response from the command interface is a Data that matches the request Interest. The payload of this Data is a ControlResponse block. |
37 | |||
38 | 1 | Muktadir Chowdhury | |
39 | 6 | Muktadir Chowdhury | ##StatusCode: |
40 | |||
41 | 3 | Muktadir Chowdhury | StatusCode | Description |
42 | ------------|------------------------------------ |
||
43 | 2 | Muktadir Chowdhury | 200 | OK |
44 | 400 | ControlParameters is incorrect |
||
45 | 403 | Command Interest is not authorized |
||
46 | 501 | Module or verb is not supported |