Documentation > Userspace Clients > General usage

Userspace Clients General Usage

Index

  1. Syntax
  2. Arguments
  3. Quirks

Syntax

All userspace client command line requests adhere to the following syntax:

(jool_siit | jool) [-i <instance-name>] <mode> <operation> [<args>]

Arguments

jool and jool_siit are the names of the two available userspace client binaries. The jool client speaks to the jool kernel module, and the jool_siit client speaks to the jool_siit kernel module.

<instance name> is the name of the instance (defined in instance add) you want to interact with. It defaults to “default.”

<mode> is (usually) one of the following keywords:

<operation> is (usually) one of the following keywords:

  • display
  • add
  • update
  • remove
  • flush

And finally, <args> is an traditional argp-parsed payload of arguments that depend on the <mode> <operation> context. For example, list the instance add flags by running

user@T:~$ jool instance add --help

The only exception is global update, where the value key acts as a third keyword level:

user@T:~$ jool global update <key> --help

Quirks

As long as you don’t reach ambiguity, you can abbreviate keywords:

user@T:~# jool_siit i a    # instance add
user@T:~# jool      g u    # global update
user@T:~# jool_siit s d    # stats display
user@T:~# jool      s d    # Error: stats or session? display

Of course, do not rely on these shorthands during scripts. There is no guarantee that future new keywords will not induce ambiguity.