5 Other Features
Name
Description
--capture
Used by Wireshark; ignored by host tool.
--strip-frames
Strip preamble, SFD, and FCS from ethernet frames. (Changes
pcapng output to LINKTYPE_ETHERNET.)
--cmd commands
Run commands on opening. (Must be a single string, separate
commands with ; ) (Since v1.3.)
--run commands
Run commands after opening. (Syntax like --cmd.) (Since v1.3.)
--exit-on
Control when exactly the tool should exit automatically. (Since v1.3.)
--exit-timeout
Always exit after the given time of seconds has expired. (Since v1.3.)
--capture-speed-test
Test how much USB bandwidth capture needs (discards capture
data). (Since v1.5.)
5.4 Interactive Command Line
The host tool has an interactive command line interface. When starting the host tool without commands,
it will wait for commands from the terminal. You can use the ”help” command to list available commands
and their parameters. Many advanced features (such as listed below) are accessible only through this
interface.
By default, the host tool will read from stdin and accept commands. It will terminate if stdin is closed or
returns EOF. If run on the terminal, it offers an interactive command line using libreadline. (If the host tool
was built without libreadline, or you can use the rlwrap
3rd party tool to get comfortable line editing and
history:
rlwrap nose <arguments for nose>
5.5 Scripting
The host tool can be used for scripting. The
--run
and
--exit-on
options (available since host tool v1.3)
can be used to run individual host tool commands.
Example
nose --run 'inject A --file mypacket.dat' --exit-on always
(The
--exit-on
is needed to make the tool exit after running the command.)
For more complicated use cases, the IPC interface offers and out-of-process API. (See IPC Interface sec-
tion.)
5.6 Supported Commands
Name
Description
blink_led
Flash main LED
block_ports
Block or unblock all packets
capture_start
Start capturing to a file or FIFO
capture_stop
Stop current capture
cfg_packet
Send internal command to device
5
https://github.com/hanslub42/rlwrap
16