|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
18 #include <sys/socket.h>
26 #include <vpp/app/version.h>
47 host_if_name = ns = NULL;
57 else if (
unformat (line_input,
"host-if %s", &host_if_name))
59 else if (
unformat (line_input,
"netns %s", &ns))
61 else if (
unformat (line_input,
"tun"))
93 0,
"Namespace name should be fewer than %d characters",
LCP_NS_LEN);
108 .path =
"lcp create",
109 .short_help =
"lcp create <sw_if_index>|<if-name> host-if <host-if-name> "
110 "netns <namespace> [tun]",
129 if (
unformat (line_input,
"netns %s", &ns))
131 else if (
unformat (line_input,
"clear netns"))
148 .path =
"lcp default",
149 .short_help =
"lcp default netns [<namespace>]",
192 .path =
"lcp delete",
193 .short_help =
"lcp delete <sw_if_index>|<if-name>",
204 phy_sw_if_index = ~0;
224 .short_help =
"show lcp [phy <interface>]",
static clib_error_t * lcp_default_netns_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vnet_hw_if_output_node_runtime_t * r
clib_error_t * lcp_cli_init(vlib_main_t *vm)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
int lcp_itf_pair_create(u32 phy_sw_if_index, u8 *host_if_name, lip_host_type_t host_if_type, u8 *ns, u32 *host_sw_if_indexp)
Create an interface-pair from PHY sw_if_index and tap name.
static clib_error_t * lcp_itf_pair_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vnet_main_t * vnet_get_main(void)
static vlib_cli_command_t lcp_itf_pair_delete_command
(constructor) VLIB_CLI_COMMAND (lcp_itf_pair_delete_command)
static vlib_cli_command_t lcp_default_netns_command
(constructor) VLIB_CLI_COMMAND (lcp_default_netns_command)
static vlib_cli_command_t lcp_itf_pair_create_command
(constructor) VLIB_CLI_COMMAND (lcp_itf_pair_create_command)
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
int lcp_itf_pair_delete(u32 phy_sw_if_index)
Delete a LCP_ITF_PAIR.
#define vec_free(V)
Free vector's memory (no header).
unformat_function_t unformat_vnet_sw_interface
#define VLIB_INIT_FUNCTION(x)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static vlib_cli_command_t lcp_itf_pair_show_cmd_node
(constructor) VLIB_CLI_COMMAND (lcp_itf_pair_show_cmd_node)
static clib_error_t * lcp_itf_pair_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void lcp_itf_pair_show(u32 phy_sw_if_index)
vl_api_interface_index_t sw_if_index
static clib_error_t * lcp_itf_pair_show_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int lcp_set_default_ns(u8 *ns)
Get/Set the default namespace for LCP host taps.