|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
17 #include <vpp/app/version.h>
61 static char *start_nodes[] = {
"adl-input" };
62 static char *feature_nodes[] = {
69 feature_nodes,
ARRAY_LEN (feature_nodes));
74 static char *start_nodes[] = {
"adl-input" };
75 static char *feature_nodes[] = {
81 feature_nodes,
ARRAY_LEN (feature_nodes));
87 static char *start_nodes[] = {
"adl-input" };
88 static char *feature_nodes[] = {
94 feature_nodes,
ARRAY_LEN (feature_nodes));
118 ci, default_next,
data, sizeof (*
data));
125 ci, default_next,
data,
156 .runs_after =
VLIB_INITS (
"ip4_allowlist_init",
"ip6_allowlist_init"),
163 .arc_name =
"device-input",
164 .node_name =
"adl-input",
186 int enable_disable = 1;
209 case VNET_API_ERROR_INVALID_SW_IF_INDEX:
211 (0,
"Invalid interface, only works on physical ports");
214 case VNET_API_ERROR_UNIMPLEMENTED:
226 .path =
"adl interface",
228 "adl interface <interface-name> [disable]",
242 u32 next_to_add_del = 0;
260 is_add = (
a->ip4 != 0);
269 return VNET_API_ERROR_NO_SUCH_FIB;
276 is_add = (
a->ip6 != 0);
284 return VNET_API_ERROR_NO_SUCH_FIB;
291 is_add = (
a->default_adl != 0);
300 data->fib_index = fib_index;
344 else if (
unformat (input,
"default"))
349 else if (
unformat (input,
"fib-id %d", &fib_id))
361 a->default_adl = default_adl;
370 case VNET_API_ERROR_INVALID_SW_IF_INDEX:
372 (0,
"Invalid interface, only works on physical ports");
375 case VNET_API_ERROR_NO_SUCH_FIB:
380 case VNET_API_ERROR_UNIMPLEMENTED:
395 .path =
"adl allowlist",
397 "adl allowlist <interface-name> [ip4][ip6][default][fib-id <NN>][disable]",
405 .version = VPP_BUILD_VER,
406 .description =
"Allow/deny list plugin",
u32 * config_index_by_sw_if_index
static clib_error_t * adl_allowlist_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_node_registration_t adl_input_node
(constructor) VLIB_REGISTER_NODE (adl_input_node)
static clib_error_t * adl_sw_interface_add_del(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
@ DEFAULT_RX_ADL_ALLOWLIST
u32 * node_index_by_feature_index
u32 vnet_config_add_feature(vlib_main_t *vm, vnet_config_main_t *cm, u32 config_string_heap_index, u32 feature_index, void *feature_config, u32 n_feature_config_bytes)
ip4_main_t ip4_main
Global ip4 main structure.
static void ethernet_setup_node(vlib_main_t *vm, u32 node_index)
#define clib_error_return(e, args...)
uword * fib_index_by_table_id
Hash table mapping table id to fib index.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void vnet_config_init(vlib_main_t *vm, vnet_config_main_t *cm, char *start_node_names[], int n_start_node_names, char *feature_node_names[], int n_feature_node_names)
vnet_main_t * vnet_get_main(void)
static vlib_cli_command_t adl_allowlist_command
(constructor) VLIB_CLI_COMMAND (adl_allowlist_command)
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(adl_sw_interface_add_del)
vnet_device_class_t vnet_local_interface_device_class
vnet_feature_config_main_t * cm
#define VLIB_CLI_COMMAND(x,...)
int adl_allowlist_enable_disable(adl_allowlist_enable_disable_args_t *a)
int adl_interface_enable_disable(u32 sw_if_index, int enable_disable)
unformat_function_t unformat_vnet_sw_interface
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
#define VLIB_INIT_FUNCTION(x)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
VNET_FEATURE_INIT(adl, static)
static clib_error_t * adl_init(vlib_main_t *vm)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u32 vnet_config_del_feature(vlib_main_t *vm, vnet_config_main_t *cm, u32 config_string_heap_index, u32 feature_index, void *feature_config, u32 n_feature_config_bytes)
#define VNET_FEATURES(...)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
#define clib_warning(format, args...)
static clib_error_t * adl_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vl_api_interface_index_t sw_if_index
static vlib_cli_command_t adl_interface_command
(constructor) VLIB_CLI_COMMAND (adl_interface_command)
vnet_config_main_t config_main
uword * fib_index_by_table_id