blob: 6a1e592d7896adba0dc7b0d5dfdff26b3d2b48a4 [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.
26The 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.
31It is prohibited to unset the strategy choice for ``/'' prefix because there must always be a
32default 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----------
47
480: Success
49
501: An unspecified error occurred
51
522: Malformed command line
53
Junxiao Shib283f522017-04-06 20:46:15 +0000547: Strategy not found (**nfdc strategy set** only)
55
Junxiao Shi6c135622016-11-21 14:30:33 +000056SEE ALSO
57--------
58nfd(1), nfdc(1)