# Command line

Every option of `udpstp client` and `udpstp server`, generated from the binary's own `--help` output when the site was built. `udpstp client --help` and `udpstp server --help` print the same.

```text
$ udpstp --help
Measure IP-Layer Capacity with UDPSTP (RFC 9946): run a Test as the Client, or
serve Tests as the Server

Usage: udpstp [OPTIONS] <COMMAND>

Commands:
  client  Run a Test against one or more Servers
  server  Serve Tests: answer Clients' Setup and Activation Requests and run
          their Test Connections
  help    Print this message or the help of the given subcommand(s)

Options:
      --color <COLOR>  Terminal styling: auto for capable terminals, always for
                       redirected human output too, or never for plain text
                       [default: auto] [possible values: auto, always, never]
  -h, --help           Print help
  -V, --version        Print version
```

## udpstp client

Runs a Test. [Running a Test](../guides/running-a-test.md) shows the options in use.

```text
Usage: udpstp client [OPTIONS] <SERVER>...
```

| Argument | Description |
|---|---|
| <code>&lt;SERVER&gt;...</code> | The Server&#39;s host name or address, optionally with a port (the Standard Port 24601 by default). Several Servers share a Test&#39;s Test Connections in turn; they must all be IPv4 or all IPv6 |

| Option | Description |
|---|---|
| <code>--color &lt;COLOR&gt;</code> | Terminal styling: auto for capable terminals, always for redirected human output too, or never for plain text [default: auto] [possible values: auto, always, never] |
| <code>--test-connections &lt;N&gt;</code> | How many Test Connections the Test runs, 1 to 255 [default: one per SERVER]. OB-UDPST Servers accept at most 24 |
| <code>--min-test-connections &lt;N&gt;</code> | The Minimum Test Connections: how many must succeed for the Test to go on [default: all of them]. With all required, one lost Setup Response aborts the Test |
| <code>--unauthenticated</code> | Run the Test unauthenticated. Not conformant to RFC 9946; the Server must allow it too |
| <code>--key-file &lt;FILE&gt;</code> | The key file: a TOML Key Table if its name ends in .toml, else an OB-UDPST udpst.keys file. Group and others must not be able to read it. Keys are never given on the command line |
| <code>--key-id &lt;KEYID&gt;</code> | Send with this keyId&#39;s key, for a key file with several keys valid now |
| <code>--auth-mode &lt;MODE&gt;</code> | The Authentication Mode with a key file: 2 authenticates the Control Phase and every Status PDU (RFC 9946 §5.3), 1 the Control Phase only, for a Server that doesn&#39;t support mode 2. The Client never falls back to mode 1 by itself [default: 2] |
| <code>--mode-1-server &lt;SERVER&gt;</code> | Use mode 1 with this SERVER, written as among the SERVERs, for one that doesn&#39;t support mode 2. Repeatable |
| <code>--allow-server-address &lt;SERVER=IP&gt;</code> | Authorize an alternate IP address for this SERVER&#39;s authenticated Setup Responses. SERVER must match a positional SERVER; IP must be a literal address of the same family. Repeatable. Without this, only the selected address is accepted |
| <code>--time-limit &lt;SECONDS&gt;</code> | Give up sooner than the Test initiation timer&#39;s 3 s if the Control Phase hasn&#39;t finished after this many seconds [default: 3] |
| <code>--direction &lt;DIRECTION&gt;</code> | The direction of the Test: the Server sends the load (downstream) or the Client does (upstream) [default: downstream] [possible values: downstream, upstream] |
| <code>--test-interval &lt;SECONDS&gt;</code> | The Test Interval to ask the Server for, in seconds (5-60; longer only with an Operator Key that allows it) [default: 10] |
| <code>--fixed-rate &lt;ROW&gt;</code> | Run a Fixed-Rate Test at this Sending Rate Table row. The Server allows it only for an Operator Key |
| <code>--start-row &lt;ROW&gt;</code> | Start the Server&#39;s search at this Sending Rate Table row instead of the first (row N offers N Mbit/s up to 1000) |
| <code>--random-payload</code> | Ask for random payload content instead of zeros, so compression on the path can&#39;t inflate the result |
| <code>--delay-var &lt;DELAY_VAR&gt;</code> | The delay variation the Load Rate Adjustment Algorithm judges by Possible values: - one-way: One-way delay variation (useOwDelVar 1): no clock synchronisation needed, but it follows clock drift - rtt:     Round-trip time variation (useOwDelVar 0): immune to clock drift [default: one-way] |
| <code>--refuse-coercion &lt;PARAMETER&gt;</code> | End the Test if the Server coerces this Activation parameter, named as in RFC 9946 (e.g. testIntTime). Repeatable |
| <code>--checksum[=&lt;BOOL&gt;]</code> | Use the header checksum (RFC 9946 §5.6): fill it in every PDU sent, verify it in every PDU received when populated [default: false] [possible values: true, false] |
| <code>--jumbo[=&lt;BOOL&gt;]</code> | Ask for Jumbo rows above 1 Gbps (CHSR_JUMBO_STATUS); the Server must serve the same [default: true] [possible values: true, false] |
| <code>--traditional-mtu[=&lt;BOOL&gt;]</code> | Ask for 1500-byte packets (CHSR_TRADITIONAL_MTU); the Server must serve the same [default: false] [possible values: true, false] |
| <code>--algorithm &lt;ALGORITHM&gt;</code> | The Load Rate Adjustment Algorithm the Server searches with [default: b] [possible values: b, c] |
| <code>--max-bandwidth &lt;MBPS&gt;</code> | The most the Test is expected to send or receive, in Mbps (maxBandwidth), shared equally between its Test Connections. The Server searches no higher, and a Server with an Admitted Rate Cap may refuse the Test |
| <code>--dscp &lt;DSCP&gt;</code> | The DSCP to mark the Test&#39;s traffic with, 0 to 63, so a specific traffic class is measured. The Server may coerce it to 0 [default: 0] |
| <code>--format &lt;FORMAT&gt;</code> | How to print the results Possible values: - text: Human-readable text - json: JSON compatible with OB-UDPST&#39;s client schema; progress goes to stderr [default: text] |
| <code>--address-privacy &lt;ADDRESS_PRIVACY&gt;</code> | How text and JSON results show this Client&#39;s own address: in full, pseudonymized with a keyed hash, or truncated to the IPv4 /24 or IPv6 /48 Possible values: - full:         The address and port as they are - pseudonymize: `anon-` and the first 8 bytes of HMAC-SHA-256 over the IP address, in hex, keyed with the pseudonym key: one client keeps one pseudonym while the key is kept, and no one without it can reverse it - truncate:     The IPv4 /24 or IPv6 /48 the address is in, without the port [default: full] |
| <code>--address-privacy-key-file &lt;FILE&gt;</code> | The pseudonym key file, hexadecimal digits (16 bytes or more), for --address-privacy pseudonymize |
| <code>--json-extension[=&lt;BOOL&gt;]</code> | With --format json, add udpstp&#39;s own results (the Performance Criterion, the Maximum and Highest IP-Layer Capacity, warnings, how the Test ran) as a last &quot;udpstp&quot; object; false leaves OB-UDPST&#39;s keys only [default: true] [possible values: true, false] |
| <code>--max-loss-ratio &lt;RATIO&gt;</code> | The Performance Criterion: the most a Sub-Interval may lose, as a share of the Load PDUs sent, to count towards the Maximum IP-Layer Capacity (RFC 9097 §6.3). One lost Load PDU always passes; a Sub-Interval in which none arrived never does [default: 0.01] |
| <code>--faster-sub-interval-margin &lt;PERCENT&gt;</code> | Warn when, in a Search Test, a Sub-Interval after the Maximum IP-Layer Capacity&#39;s ran more than this many percent faster and none after it met the Performance Criterion: the Maximum may then be well below the path, as a search through a drop-tail queue gives [default: 5] |
| <code>--first-mode-sub-intervals &lt;N&gt;</code> | Put the first N Sub-Intervals in a Capacity Mode of their own, with its own Maximum IP-Layer Capacity, for a path whose capacity changes on a schedule (RFC 9097 §6.6) |
| <code>--socket-buffer-size &lt;BYTES&gt;</code> | The Data Phase&#39;s receive and send buffer, in bytes; the OS&#39;s limits may hold it lower [default: 2097152] |
| <code>--dont-fragment[=&lt;BOOL&gt;]</code> | Set the Don&#39;t Fragment bit on test traffic; false lets the path fragment it [default: true] [possible values: true, false] |
| <code>--max-hops &lt;HOPS&gt;</code> | MaxHops: the IPv4 TTL or IPv6 hop limit of test traffic, from the expected path length [default: 64] |
| <code>-h, --help</code> | Print help (see a summary with &#39;-h&#39;) |

## udpstp server

Serves Tests. Every option also has a setting in the configuration file ([Server configuration](configuration.md)); an option given on the command line replaces the file's value. [Hosting a Server](../guides/hosting-a-server.md) shows them in use.

```text
Usage: udpstp server [OPTIONS]
```

| Option | Description |
|---|---|
| <code>--color &lt;COLOR&gt;</code> | Terminal styling: auto for capable terminals, always for redirected human output too, or never for plain text [default: auto] [possible values: auto, always, never] |
| <code>--config &lt;FILE&gt;</code> | The Server&#39;s TOML configuration file. Command-line options override its settings |
| <code>--listen &lt;ADDRESS&gt;</code> | An address to listen on for Setup Requests, instead of the IPv4 and IPv6 wildcards. Repeatable |
| <code>--port &lt;PORT&gt;</code> | The UDP port to listen on for Setup Requests (the Standard Port 24601 by default) |
| <code>--allow-unauthenticated[=&lt;BOOL&gt;]</code> | Serve unauthenticated Tests too. Not conformant to RFC 9946; Clients must opt in as well [possible values: true, false] |
| <code>--checksum[=&lt;BOOL&gt;]</code> | Use the header checksum (RFC 9946 §5.6) [possible values: true, false] |
| <code>--jumbo[=&lt;BOOL&gt;]</code> | Serve Jumbo rows above 1 Gbps (CHSR_JUMBO_STATUS) [default: true] [possible values: true, false] |
| <code>--traditional-mtu[=&lt;BOOL&gt;]</code> | Serve 1500-byte packets (CHSR_TRADITIONAL_MTU) [default: false] [possible values: true, false] |
| <code>--server-mtu &lt;BYTES&gt;</code> | The Server MTU: the largest IP packet the Server sends, in bytes [default: 1500] |
| <code>--ephemeral-ports &lt;FIRST-LAST&gt;</code> | The Server&#39;s Ephemeral Ports for Test Connections, as FIRST-LAST, picked at random; its own range, not the OS&#39;s [default: 49152-65535] |
| <code>--delay-var-statistic &lt;STATISTIC&gt;</code> | Which statistic of a Trial Interval&#39;s one-way delay variation classifies it [default: maximum] Possible values: - average: The Trial Interval&#39;s average, as OB-UDPST uses - maximum: The Trial Interval&#39;s maximum: the delay range, which the RFCs judge |
| <code>--tests-per-source &lt;N&gt;</code> | How many Tests may run at once from one Source [default: 1, as RFC 9946 §4.2 requires] |
| <code>--max-test-connections &lt;N&gt;</code> | How many Test Connections activated Tests may reserve at once [default: 256]. The Ephemeral Port range must hold this plus the unactivated share |
| <code>--test-connections-per-test &lt;N&gt;</code> | How many Test Connections one Test may have over its life [default: 24] |
| <code>--max-unactivated-test-connections &lt;N&gt;</code> | How many Test Connections may be admitted but not yet activated at once, separately from the global cap [default: half of --max-test-connections, at least --test-connections-per-test] |
| <code>--admitted-rate-cap &lt;MBPS&gt;</code> | The Admitted Rate Cap: the most maxBandwidth admitted at once in each direction, in Mbps [default: no cap]. A Test over it is refused |
| <code>--max-test-share &lt;PERCENT&gt;</code> | The most of the Admitted Rate Cap, in percent, that one Test without an Operator Key may state [default: 50] |
| <code>--require-max-bandwidth[=&lt;BOOL&gt;]</code> | Refuse Tests that state no maxBandwidth [possible values: true, false] |
| <code>--troubleshooting[=&lt;BOOL&gt;]</code> | Answer authentication failures with the reason instead of silence, to debug Clients; up to 10 a second. Anyone can then learn whether keys are configured, and spoofed requests get replies [possible values: true, false] |
| <code>--unverified-setups-per-second &lt;N&gt;</code> | How many Setup Requests a second may reach authentication; the rest are dropped silently [default: 20000] |
| <code>--source-setup-burst &lt;N&gt;</code> | How many authentic Setup Requests one Source may send at once [default: 48]; at least --test-connections-per-test |
| <code>--source-setups-per-second &lt;N&gt;</code> | How many more a Source may send each second after its burst [default: 5] |
| <code>--key-setup-burst &lt;N&gt;</code> | How many authentic Setup Requests one Key Table row may send at once, Unauthenticated Mode counting as one [default: 1000]; at least --test-connections-per-test |
| <code>--key-setups-per-second &lt;N&gt;</code> | How many more a Key Table row may send each second after its burst [default: 1000] |
| <code>--allowed-dscp &lt;DSCP,...&gt;...</code> | The DSCPs a Test without an Operator Key may mark its traffic with, comma-separated [default: 0]; another is coerced to 0 |
| <code>--operator-allowed-dscp &lt;DSCP,...&gt;...</code> | The DSCPs a Test with an Operator Key may mark its traffic with, comma-separated [default: all but network control, 48 and 56] |
| <code>--max-start-row &lt;ROW&gt;</code> | The highest Sending Rate Table row a Test without an Operator Key may start its search at [default: 100]; Operator Keys are exempt |
| <code>--quota-period &lt;SECONDS&gt;</code> | The Quota Period Quotas are counted over, in seconds [default: 3600] |
| <code>--source-tests-per-quota-period &lt;N&gt;</code> | Each Source&#39;s Quota of Tests per Quota Period [default: none]; Operator Keys are exempt |
| <code>--source-bytes-per-quota-period &lt;BYTES&gt;</code> | Each Source&#39;s Quota of load bytes per Quota Period, both directions [default: none]; Operator Keys are exempt |
| <code>--socket-buffer-size &lt;BYTES&gt;</code> | Each Test Connection&#39;s receive and send buffer in its Data Phase, in bytes [default: 2 MiB]; the OS&#39;s limits may hold it lower |
| <code>--dont-fragment[=&lt;BOOL&gt;]</code> | Set the Don&#39;t Fragment bit on test traffic [default: true]; false lets the path fragment it [possible values: true, false] |
| <code>--max-hops &lt;HOPS&gt;</code> | MaxHops: the IPv4 TTL and IPv6 hop limit of test traffic, from the expected path length (RFC 9946 §10 says the operator MUST set it) [default: 64, with a warning] |
| <code>--log-format &lt;FORMAT&gt;</code> | The log&#39;s format on stdout [default: human]; json writes one object a line Possible values: - human: Readable events, with indented continuation lines when needed - json:  One JSON object a line |
| <code>--log-file &lt;FILE&gt;</code> | Where the log goes instead of stdout, with the startup&#39;s errors and warnings: a new file each day, the date before the extension, the last 14 kept |
| <code>--address-privacy &lt;HOW&gt;</code> | How the log shows client addresses [default: full]: pseudonymize with a keyed hash, or truncate to the IPv4 /24 or IPv6 /48 Possible values: - full:         The address and port as they are - pseudonymize: `anon-` and the first 8 bytes of HMAC-SHA-256 over the IP address, in hex, keyed with the pseudonym key: one client keeps one pseudonym while the key is kept, and no one without it can reverse it - truncate:     The IPv4 /24 or IPv6 /48 the address is in, without the port |
| <code>--address-privacy-key-file &lt;FILE&gt;</code> | The pseudonym key file, hexadecimal digits (16 bytes or more), for --address-privacy pseudonymize |
| <code>--statistics-interval &lt;SECONDS&gt;</code> | How often the log reports the Server&#39;s counters, in seconds [default: 60]; 0 never does |
| <code>--key-file &lt;FILE&gt;</code> | The key file: a TOML Key Table if its name ends in .toml, else an OB-UDPST udpst.keys file. Group and others must not be able to read it |
| <code>--print-config</code> | Validate the settings and key file, print effective TOML, and exit |
| <code>--settings-only</code> | With --print-config, preview settings without opening keys or logs |
| <code>--windows-service</code> | Run as the Windows service the Service Control Manager started, which stops it, logging to log_file (Windows only) |
| <code>-h, --help</code> | Print help (see a summary with &#39;-h&#39;) |

