Project

General

Profile

StrategyChoice » History » Version 5

Junxiao Shi, 05/17/2014 08:29 PM

1 4 Junxiao Shi
# Strategy Choice Management
2 1 Junxiao Shi
3 4 Junxiao Shi
**Strategy Choice Management** is a module of [[Management|NFD Management protocol]].
4
It provides:
5 1 Junxiao Shi
6 4 Junxiao Shi
* commands to choose the forwarding strategy for a namespace
7 5 Junxiao Shi
* a dataset of strategy choices
8 1 Junxiao Shi
9 5 Junxiao Shi
Strategy Choice Management commands and datasets are published in namespace `ndn:/localhost/nfd/strategy-choice`.
10 1 Junxiao Shi
11
12
13 4 Junxiao Shi
## Strategy
14 1 Junxiao Shi
15 4 Junxiao Shi
A strategy is represented by a Name.
16 1 Junxiao Shi
17 4 Junxiao Shi
NFD currently supports builtin strategies only. The following strategies are available:
18 1 Junxiao Shi
19 4 Junxiao Shi
* ndn:/localhost/nfd/strategy/best-route
20
* ndn:/localhost/nfd/strategy/broadcast
21
* ndn:/localhost/nfd/strategy/client-control
22
* ndn:/localhost/nfd/strategy/ncc
23 1 Junxiao Shi
24
25 4 Junxiao Shi
## Control Commands
26 1 Junxiao Shi
27 4 Junxiao Shi
[[ControlCommand]] **management-module**: `strategy-choice`
28 3 Junxiao Shi
29 4 Junxiao Shi
### Set the strategy for a namespace
30 1 Junxiao Shi
31 4 Junxiao Shi
**command-verb**: `set`
32 1 Junxiao Shi
33 4 Junxiao Shi
ControlParameters fields:
34 1 Junxiao Shi
35 4 Junxiao Shi
* Name (required)
36
* Strategy (required)
37 1 Junxiao Shi
38 4 Junxiao Shi
Strategy must be a `Name` that represents a builtin strategy.  
39
If Strategy does not match any builtin strategy, the command fails with code 504.
40 1 Junxiao Shi
41 4 Junxiao Shi
### Unset the strategy for a namespace
42 1 Junxiao Shi
43 4 Junxiao Shi
**command-verb**: `unset`
44 1 Junxiao Shi
45 4 Junxiao Shi
ControlParameters fields:
46 1 Junxiao Shi
47 4 Junxiao Shi
* Name (required)
48 1 Junxiao Shi
49 4 Junxiao Shi
After this operation, the effective strategy at Name is inherited from the parent.  
50 1 Junxiao Shi
If there is no strategy defined at Name, this command does nothing, but is still considered successful.
51
52
Name must not be `ndn:/`, otherwise the command fails with code 403.
53 5 Junxiao Shi
54
55
## Strategy Choice Dataset
56
57
Strategy choices for namespaces are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/strategy-choice/list`.
58
59
Each face is represented by a **StrategyChoice** block:
60
61
    StrategyChoice := STRATEGY-CHOICE-TYPE TLV-LENGTH
62
                        Name
63
                        Strategy
64
65
* **Name** is the namespace on which a strategy is chosen.
66
* **Strategy** is the strategy chosen for this namespace.
67
68
## TLV-TYPE assignments
69
70
Type                                        | Assigned value    | Assigned value (hex)
71
------------------------------------------- | ----------------- | --------------------
72
StrategyChoice                              | 128               | 0x80