blob: 2a6c41aa21194dd9660fae21c46a1d906c4f1701 [file] [log] [blame]
Junxiao Shi6c135622016-11-21 14:30:33 +00001nfdc-strategy
2=============
3
4SYNOPSIS
5--------
6| nfdc strategy [list]
Junxiao Shi5d3e4812017-04-05 16:52:59 +00007| nfdc strategy show [prefix] <PREFIX>
Junxiao Shib283f522017-04-06 20:46:15 +00008| nfdc strategy set [prefix] <PREFIX> [strategy] <STRATEGY>
9| nfdc strategy unset [prefix] <PREFIX>
Junxiao Shi6c135622016-11-21 14:30:33 +000010
11DESCRIPTION
12-----------
13In NFD, packet forwarding behavior is determined by forwarding pipelines and forwarding strategies.
14The forwarding pipelines define general steps of packet processing.
15Forwarding strategies provide the intelligence to make decision on whether, when, and where
16to forward Interests.
17
18NFD contains multiple forwarding strategy implementations.
19The strategy choice table determines which strategy is used in forwarding an Interest.
20
Junxiao Shi5d3e4812017-04-05 16:52:59 +000021The **nfdc strategy list** command shows a list of strategy choices.
22
23The **nfdc strategy show** command shows the effective strategy choice for a specific name.
Junxiao Shi6c135622016-11-21 14:30:33 +000024
Junxiao Shib283f522017-04-06 20:46:15 +000025The **nfdc strategy set** command sets the strategy for a name prefix.
susmit3f94ec32018-02-13 12:21:01 -070026The strategy for ``"/"`` prefix is the default strategy.
Junxiao Shi6c135622016-11-21 14:30:33 +000027
Junxiao Shib283f522017-04-06 20:46:15 +000028The **nfdc strategy unset** command clears the strategy choice at a name prefix,
Junxiao Shi6c135622016-11-21 14:30:33 +000029so that a strategy choice at a shorter prefix or the default strategy will be used.
Junxiao Shib283f522017-04-06 20:46:15 +000030It undoes a prior **nfdc strategy set** command on the same name prefix.
susmit3f94ec32018-02-13 12:21:01 -070031It is prohibited to unset the strategy choice for ``"/"`` prefix because there must always be a
Junxiao Shib283f522017-04-06 20:46:15 +000032default strategy.
Junxiao Shi6c135622016-11-21 14:30:33 +000033
34OPTIONS
35-------
Junxiao Shif0dfb332017-02-02 05:32:25 +000036<PREFIX>
Junxiao Shi6c135622016-11-21 14:30:33 +000037 The name prefix of a strategy choice.
38 The strategy choice is effective for all Interests under the name prefix,
Junxiao Shib283f522017-04-06 20:46:15 +000039 unless overridden by another strategy choice at a longer prefix.
Junxiao Shi6c135622016-11-21 14:30:33 +000040
Junxiao Shif0dfb332017-02-02 05:32:25 +000041<STRATEGY>
Junxiao Shi6c135622016-11-21 14:30:33 +000042 A name that identifies the forwarding strategy.
43 Consult NFD Developer's Guide for a complete list of all implemented strategies.
44
Junxiao Shi5d3e4812017-04-05 16:52:59 +000045EXIT CODES
46----------
Junxiao Shi5d3e4812017-04-05 16:52:59 +0000470: Success
48
491: An unspecified error occurred
50
512: Malformed command line
52
Junxiao Shib283f522017-04-06 20:46:15 +0000537: Strategy not found (**nfdc strategy set** only)
54
Junxiao Shi0e13e1e2018-01-22 08:29:12 +000055EXAMPLES
56--------
57nfdc strategy list
58 List all configured strategy choices.
59
60nfdc strategy show prefix /localhost/ping/1
61 Identify which strategy will handle Interests named "/localhost/ping/1".
62
63nfdc strategy set prefix / strategy /localhost/nfd/strategy/best-route
64 Set the default strategy to best-route, latest version.
65
66nfdc strategy set prefix /ndn strategy /localhost/nfd/strategy/multicast/%FD%01
67 Set the strategy of the "/ndn" prefix to multicast, version 1.
68
69nfdc strategy unset prefix /ndn
70 Clear the strategy choice for the "/ndn" prefix.
71
Junxiao Shi6c135622016-11-21 14:30:33 +000072SEE ALSO
73--------
Ashlesh Gawande92e4ea52017-07-19 11:38:12 -050074nfd(1), nfdc(1), nfd-asf-strategy(7)