Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 1 | nfdc-strategy |
| 2 | ============= |
| 3 | |
| 4 | SYNOPSIS |
| 5 | -------- |
| 6 | | nfdc strategy [list] |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 7 | | nfdc strategy show [prefix] <PREFIX> |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 8 | | nfdc strategy set [prefix] <PREFIX> [strategy] <STRATEGY> |
| 9 | | nfdc strategy unset [prefix] <PREFIX> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 10 | |
| 11 | DESCRIPTION |
| 12 | ----------- |
| 13 | In NFD, packet forwarding behavior is determined by forwarding pipelines and forwarding strategies. |
| 14 | The forwarding pipelines define general steps of packet processing. |
| 15 | Forwarding strategies provide the intelligence to make decision on whether, when, and where |
| 16 | to forward Interests. |
| 17 | |
| 18 | NFD contains multiple forwarding strategy implementations. |
| 19 | The strategy choice table determines which strategy is used in forwarding an Interest. |
| 20 | |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 21 | The **nfdc strategy list** command shows a list of strategy choices. |
| 22 | |
| 23 | The **nfdc strategy show** command shows the effective strategy choice for a specific name. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 24 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 25 | The **nfdc strategy set** command sets the strategy for a name prefix. |
susmit | 3f94ec3 | 2018-02-13 12:21:01 -0700 | [diff] [blame] | 26 | The strategy for ``"/"`` prefix is the default strategy. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 27 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 28 | The **nfdc strategy unset** command clears the strategy choice at a name prefix, |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 29 | so that a strategy choice at a shorter prefix or the default strategy will be used. |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 30 | It undoes a prior **nfdc strategy set** command on the same name prefix. |
susmit | 3f94ec3 | 2018-02-13 12:21:01 -0700 | [diff] [blame] | 31 | It is prohibited to unset the strategy choice for ``"/"`` prefix because there must always be a |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 32 | default strategy. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 33 | |
| 34 | OPTIONS |
| 35 | ------- |
Junxiao Shi | f0dfb33 | 2017-02-02 05:32:25 +0000 | [diff] [blame] | 36 | <PREFIX> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 37 | The name prefix of a strategy choice. |
| 38 | The strategy choice is effective for all Interests under the name prefix, |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 39 | unless overridden by another strategy choice at a longer prefix. |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 40 | |
Junxiao Shi | f0dfb33 | 2017-02-02 05:32:25 +0000 | [diff] [blame] | 41 | <STRATEGY> |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 42 | A name that identifies the forwarding strategy. |
| 43 | Consult NFD Developer's Guide for a complete list of all implemented strategies. |
| 44 | |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 45 | EXIT CODES |
| 46 | ---------- |
Junxiao Shi | 5d3e481 | 2017-04-05 16:52:59 +0000 | [diff] [blame] | 47 | 0: Success |
| 48 | |
| 49 | 1: An unspecified error occurred |
| 50 | |
| 51 | 2: Malformed command line |
| 52 | |
Junxiao Shi | b283f52 | 2017-04-06 20:46:15 +0000 | [diff] [blame] | 53 | 7: Strategy not found (**nfdc strategy set** only) |
| 54 | |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 55 | EXAMPLES |
| 56 | -------- |
| 57 | nfdc strategy list |
| 58 | List all configured strategy choices. |
| 59 | |
| 60 | nfdc strategy show prefix /localhost/ping/1 |
| 61 | Identify which strategy will handle Interests named "/localhost/ping/1". |
| 62 | |
| 63 | nfdc strategy set prefix / strategy /localhost/nfd/strategy/best-route |
| 64 | Set the default strategy to best-route, latest version. |
| 65 | |
Alexander Afanasyev | 4400e42 | 2021-02-17 11:17:33 -0500 | [diff] [blame^] | 66 | nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/%FD%04 |
| 67 | Set the strategy of the "/ndn" prefix to multicast, version 4. |
Junxiao Shi | 0e13e1e | 2018-01-22 08:29:12 +0000 | [diff] [blame] | 68 | |
| 69 | nfdc strategy unset prefix /ndn |
| 70 | Clear the strategy choice for the "/ndn" prefix. |
| 71 | |
Junxiao Shi | 6c13562 | 2016-11-21 14:30:33 +0000 | [diff] [blame] | 72 | SEE ALSO |
| 73 | -------- |
Ashlesh Gawande | 92e4ea5 | 2017-07-19 11:38:12 -0500 | [diff] [blame] | 74 | nfd(1), nfdc(1), nfd-asf-strategy(7) |