Skip to main content

build_cli

Function build_cli 

Source
pub fn build_cli() -> Command
Expand description

Builds the command-line interface (CLI) for robctl.

This function sets up the main CLI structure using clap, including global options and all subcommands.

§Global Options

  • --meshif, -m : Specify the batman-adv mesh interface to operate on (default: bat0).
  • --version, -v : Print the robctl version and the batman-adv kernel module version (if loaded).

§Subcommands

  • neighbors (n) : Display the neighbor table.
  • gateways (gwl) : Display the list of gateways.
  • gw_mode (gw) : Display or modify the gateway mode.
  • originators (o) : Display the originator table.
  • translocal (tl) : Display local translation table.
  • transglobal (tg) : Display global translation table.
  • interface (if) : Display or modify batman-adv interface settings.
  • ap_isolation (ap) : Display or modify AP isolation setting.
  • aggregation (ag) : Display or modify aggregation setting.
  • bridge_loop_avoidance (bl) : Display or modify bridge loop avoidance setting.
  • routing_algo (ra) : Display or modify the routing algorithm.

§Returns

A clap::Command ready to parse command-line arguments.

§Example

use batman_robin::cli::app::build_cli;

let cli = build_cli();
let matches = cli.get_matches();