FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
wireguard_cli.c File Reference
+ Include dependency graph for wireguard_cli.c:

Go to the source code of this file.

Functions

static clib_error_twg_if_create_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_twg_if_delete_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_twg_peer_add_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_twg_peer_remove_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static walk_rc_t wg_peer_show_one (index_t peeri, void *arg)
 
static clib_error_twg_show_peer_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static walk_rc_t wg_if_show_one (index_t itfi, void *arg)
 
static clib_error_twg_show_if_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static vlib_cli_command_t wg_if_create_command
 (constructor) VLIB_CLI_COMMAND (wg_if_create_command) More...
 
static vlib_cli_command_t wg_if_delete_command
 (constructor) VLIB_CLI_COMMAND (wg_if_delete_command) More...
 
static vlib_cli_command_t wg_peer_add_command
 (constructor) VLIB_CLI_COMMAND (wg_peer_add_command) More...
 
static vlib_cli_command_t wg_peer_remove_command
 (constructor) VLIB_CLI_COMMAND (wg_peer_remove_command) More...
 
static vlib_cli_command_t wg_show_peers_command
 (constructor) VLIB_CLI_COMMAND (wg_show_peers_command) More...
 
static vlib_cli_command_t wg_show_itfs_command
 (constructor) VLIB_CLI_COMMAND (wg_show_itfs_command) More...
 

Function Documentation

◆ wg_if_create_cli()

static clib_error_t* wg_if_create_cli ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 22 of file wireguard_cli.c.

+ Here is the call graph for this function:

◆ wg_if_delete_cli()

static clib_error_t* wg_if_delete_cli ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 103 of file wireguard_cli.c.

+ Here is the call graph for this function:

◆ wg_if_show_one()

static walk_rc_t wg_if_show_one ( index_t  itfi,
void *  arg 
)
static

Definition at line 327 of file wireguard_cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wg_peer_add_command_fn()

static clib_error_t* wg_peer_add_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 149 of file wireguard_cli.c.

+ Here is the call graph for this function:

◆ wg_peer_remove_command_fn()

static clib_error_t* wg_peer_remove_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 258 of file wireguard_cli.c.

+ Here is the call graph for this function:

◆ wg_peer_show_one()

static walk_rc_t wg_peer_show_one ( index_t  peeri,
void *  arg 
)
static

Definition at line 301 of file wireguard_cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wg_show_if_command_fn()

static clib_error_t* wg_show_if_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 335 of file wireguard_cli.c.

+ Here is the call graph for this function:

◆ wg_show_peer_command_fn()

static clib_error_t* wg_show_peer_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 309 of file wireguard_cli.c.

+ Here is the call graph for this function:

Variable Documentation

◆ wg_if_create_command

vlib_cli_command_t wg_if_create_command
static
Initial value:
= {
.path = "wireguard create",
.short_help = "wireguard create listen-port <port> "
"private-key <key> src <IP> [generate-key]",
.function = wg_if_create_cli,
}
static clib_error_t * wg_if_create_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: wireguard_cli.c:22

(constructor) VLIB_CLI_COMMAND (wg_if_create_command)

Definition at line 94 of file wireguard_cli.c.

◆ wg_if_delete_command

vlib_cli_command_t wg_if_delete_command
static
Initial value:
= {
.path = "wireguard delete",
.short_help = "wireguard delete <interface>",
.function = wg_if_delete_cli,
}
static clib_error_t * wg_if_delete_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (wg_if_delete_command)

Definition at line 140 of file wireguard_cli.c.

◆ wg_peer_add_command

vlib_cli_command_t wg_peer_add_command
static
Initial value:
=
{
.path = "wireguard peer add",
.short_help = "wireguard peer add <wg_int> public-key <pub_key_other>"
"endpoint <ip4_dst> allowed-ip <prefix>"
"dst-port [port_dst] persistent-keepalive [keepalive_interval]",
}
static clib_error_t * wg_peer_add_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (wg_peer_add_command)

Definition at line 247 of file wireguard_cli.c.

◆ wg_peer_remove_command

vlib_cli_command_t wg_peer_remove_command
static
Initial value:
=
{
.path = "wireguard peer remove",
.short_help = "wireguard peer remove <index>",
}
static clib_error_t * wg_peer_remove_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (wg_peer_remove_command)

Definition at line 292 of file wireguard_cli.c.

◆ wg_show_itfs_command

vlib_cli_command_t wg_show_itfs_command
static
Initial value:
=
{
.path = "show wireguard interface",
.short_help = "show wireguard",
.function = wg_show_if_command_fn,
}
static clib_error_t * wg_show_if_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (wg_show_itfs_command)

Definition at line 344 of file wireguard_cli.c.

◆ wg_show_peers_command

vlib_cli_command_t wg_show_peers_command
static
Initial value:
=
{
.path = "show wireguard peer",
.short_help = "show wireguard peer",
}
static clib_error_t * wg_show_peer_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (wg_show_peers_command)

Definition at line 318 of file wireguard_cli.c.