NLSR Management » History » Version 19
Muktadir Chowdhury, 05/13/2015 12:26 PM
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 | 19 | Muktadir Chowdhury | ### 1.1 Add a name prefix |
12 | 10 | Muktadir Chowdhury | |
13 | 19 | Muktadir Chowdhury | #### command-verb: advertise |
14 | 10 | Muktadir Chowdhury | This command adds a name prefix to the name prefix list. This command can be accepted on ```ndn:/localhost/nlsr/prefix-update``` prefix. |
15 | 2 | Muktadir Chowdhury | |
16 | 19 | Muktadir Chowdhury | #### Control Parameters |
17 | 2 | Muktadir Chowdhury | - Name (required) |
18 | |||
19 | 19 | Muktadir Chowdhury | ### 1.2 Remove a name prefix |
20 | 11 | Muktadir Chowdhury | |
21 | 19 | Muktadir Chowdhury | #### command-verb: withdraw |
22 | 11 | Muktadir Chowdhury | This command removes a name prefix from the name prefix list. This command can be accepted on ```ndn:/localhost/nlsr/prefix-update``` prefix. |
23 | |||
24 | 19 | Muktadir Chowdhury | #### Control Parameters |
25 | 2 | Muktadir Chowdhury | - Name (required) |
26 | |||
27 | 3 | Muktadir Chowdhury | ## 2. Request format |
28 | 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>``` |
29 | |||
30 | - ```<prefix>``` is ```/localhost/nlsr ```. Each individual command may specify additional prefixes under which that command could be accepted. |
||
31 | 13 | Muktadir Chowdhury | - ```<management-module> ```is the name of management module to which the command needs to be dispatched. For example, the name of the management module in this case would be ```prefix-update```. |
32 | - ```<command-verb>``` is the command to be executed. For this case this would be either ```withdraw``` or ```advertise```. |
||
33 | 14 | Muktadir Chowdhury | - ```<control-parameters>``` is a ControlParameters TLV block wrapped in a NameComponent. |
34 | - ```<signed-interest-components>``` are four additional components defined by [ndn-cxx:SignedInterest|Signed Interest] spec. |
||
35 | 13 | Muktadir Chowdhury | So, putting everything together, the complete name of a command interest would be ```localhost/nlsr/prefix-update/advertise``` or ```localhost/nlsr/prefix-update/withdraw``` |
36 | 2 | Muktadir Chowdhury | |
37 | 6 | Muktadir Chowdhury | ## 3. Response Format |
38 | 1 | Muktadir Chowdhury | |
39 | 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. |
40 | |||
41 | 1 | Muktadir Chowdhury | |
42 | 7 | Muktadir Chowdhury | ### StatusCode |
43 | 6 | Muktadir Chowdhury | |
44 | 3 | Muktadir Chowdhury | StatusCode | Description |
45 | ------------|------------------------------------ |
||
46 | 2 | Muktadir Chowdhury | 200 | OK |
47 | 400 | ControlParameters is incorrect |
||
48 | 403 | Command Interest is not authorized |
||
49 | 501 | Module or verb is not supported |