|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
55 return clib_net_to_host_u32 (a1->
data_u32) -
66 clib_net_to_host_u16 (a1->as_u16[
i]) -
67 clib_net_to_host_u16 (a2->as_u16[
i]);
76 .path =
"set interface ip",
77 .short_help =
"IP4/IP6 commands",
88 ip6_address_t *ip6_addrs = 0;
97 ip4_address_t * x = (ip4_address_t *)
98 ip_interface_address_get_address (&im4->lookup_main, ia);
99 vec_add1 (ip4_addrs, x[0]);
100 vec_add1 (ip4_masks, ia->address_length);
108 ip6_address_t * x = (ip6_address_t *)
109 ip_interface_address_get_address (&im6->lookup_main, ia);
110 vec_add1 (ip6_addrs, x[0]);
111 vec_add1 (ip6_masks, ia->address_length);
168 if (is_del &&
unformat (input,
"all"))
217 .path =
"set interface ip address",
219 .short_help =
"set interface ip address [del] <interface> <ip-addr>/<mask> | [all]",
250 else if (
unformat (line_input,
"off"))
255 else if (
unformat (line_input,
"ip4"))
260 else if (
unformat (line_input,
"ip6"))
277 "`ip4_full_reass_enable_disable' API call failed, rv=%d:%U, "
278 "`ip6_full_reass_enable_disable' API call failed, rv=%d:%U",
285 "`ip4_full_reass_enable_disable' API call failed, rv=%d:%U",
291 "`ip6_full_reass_enable_disable' API call failed, rv=%d:%U",
299 .path =
"set interface reassembly",
300 .short_help =
"set interface reassembly <interface-name> [on|off|ip4|ip6]",
#define foreach_ip_interface_address(lm, a, sw_if_index, loop, body)
ip_lookup_main_t lookup_main
ip4_main_t ip4_main
Global ip4 main structure.
int ip6_address_compare(ip6_address_t *a1, ip6_address_t *a2)
#define clib_error_return(e, args...)
static clib_error_t * set_reassembly_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t set_interface_ip_address_command
(constructor) VLIB_CLI_COMMAND (set_interface_ip_address_command)
int ip4_address_compare(ip4_address_t *a1, ip4_address_t *a2)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static u8 * format_vnet_api_errno(u8 *s, va_list *args)
vnet_api_error_t ip6_full_reass_enable_disable(u32 sw_if_index, u8 enable_disable)
clib_error_t * ip6_add_del_interface_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 is_del)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
clib_error_t * ip4_add_del_interface_address(vlib_main_t *vm, u32 sw_if_index, ip4_address_t *address, u32 address_length, u32 is_del)
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
vnet_main_t * vnet_get_main(void)
#define VLIB_CLI_COMMAND(x,...)
vnet_api_error_t ip4_full_reass_enable_disable(u32 sw_if_index, u8 enable_disable)
VNET_HW_INTERFACE_ADD_DEL_FUNCTION(ip_address_delete_cleanup)
#define vec_free(V)
Free vector's memory (no header).
unformat_function_t unformat_vnet_sw_interface
#define VLIB_INIT_FUNCTION(x)
ip_lookup_main_t lookup_main
static clib_error_t * ip4_cli_init(vlib_main_t *vm)
static vlib_main_t * vlib_get_main(void)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static vlib_cli_command_t set_interface_ip_command
(constructor) VLIB_CLI_COMMAND (set_interface_ip_command)
static vlib_cli_command_t set_reassembly_command
(constructor) VLIB_CLI_COMMAND (set_reassembly_command)
static clib_error_t * ip_address_delete_cleanup(vnet_main_t *vnm, u32 hw_if_index, u32 is_create)
vl_api_interface_index_t sw_if_index
void ip_del_all_interface_addresses(vlib_main_t *vm, u32 sw_if_index)
static clib_error_t * add_del_ip_address(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)