38 ip_address_t lloc, rloc;
41 u8 reid_set = 0, leid_set = 0, is_negative = 0, vrf_set = 0, vni_set = 0;
42 u32 vni, vrf, action = ~0, p, w;
54 else if (
unformat (line_input,
"add"))
64 else if (
unformat (line_input,
"vni %u", &vni))
70 else if (
unformat (line_input,
"vrf %u", &vrf))
74 else if (
unformat (line_input,
"bd %u", &vrf))
78 else if (
unformat (line_input,
"negative action %U",
83 else if (
unformat (line_input,
"loc-pair %U %U p %d w %d",
101 if (!vni_set || !vrf_set)
140 memset (a, 0,
sizeof (a[0]));
154 is_add ?
"add" :
"delete");
164 .path =
"lisp gpe entry",
165 .short_help =
"lisp gpe entry add/del vni <vni> vrf <vrf> [leid <leid>]" 166 "reid <reid> [loc-pair <lloc> <rloc> p <priority> w <weight>] " 167 "[negative action <action>]",
221 if (
unformat (line_input,
"enable"))
223 else if (
unformat (line_input,
"disable"))
238 .short_help =
"lisp gpe [enable|disable]",
256 vlib_cli_output (vm,
"%=10d%=10d", p->key, p->value[0]);
265 vlib_cli_output (vm,
"%=10d%=10d", p->key, p->value[0]);
274 .path =
"show lisp gpe interface",
275 .short_help =
"show lisp gpe interface",
285 return format (s,
"%s", lgm->
is_en ?
"enabled" :
"disabled");
#define gid_address_ip_version(_a)
vlib_node_registration_t lisp_gpe_ip4_input_node
(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node)
#define gid_address_type(_a)
u8 vnet_lisp_gpe_enable_disable_status(void)
Check if LISP-GPE is enabled.
void vnet_lisp_gpe_fwd_entry_flush(void)
Flush all the forwrding entries.
clib_error_t * vnet_lisp_gpe_enable_disable(vnet_lisp_gpe_enable_disable_args_t *a)
Enable/disable LISP-GPE.
uword unformat_ip_address(unformat_input_t *input, va_list *args)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
ip_lookup_main_t lookup_main
vlib_main_t * vlib_main
convenience
uword unformat_negative_mapping_action(unformat_input_t *input, va_list *args)
vnet_main_t * vnet_get_main(void)
#define VLIB_INIT_FUNCTION(x)
uword * lisp_gpe_fwd_entries
DB of all forwarding entries.
#define vlib_call_init_function(vm, x)
Common utility functions for IPv4, IPv6 and L2 LISP-GPE adjacencys.
vlib_node_registration_t lisp_gpe_ip6_input_node
(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node)
#define hash_create_mem(elts, key_bytes, value_bytes)
u32 table_id
table (vrf) id
uword unformat_gid_address(unformat_input_t *input, va_list *args)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
u8 is_negative
type of mapping
u32 vni
VNI/tenant id in HOST byte order.
clib_error_t * ip_main_init(vlib_main_t *vm)
#define vec_free(V)
Free vector's memory (no header).
static clib_error_t * lisp_show_iface_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
CLI command to show LISP-GPE interfaces.
tunnel_lookup_t l2_ifaces
void lisp_gpe_tenant_flush(void)
Flush/delete ALL the tenants.
lisp_gpe_main_t lisp_gpe_main
LISP-GPE global state.
#define VLIB_CLI_COMMAND(x,...)
int vnet_lisp_gpe_add_del_fwd_entry(vnet_lisp_gpe_add_del_fwd_entry_args_t *a, u32 *hw_if_indexp)
Forwarding entry create/remove dispatcher.
struct _gid_address_t gid_address_t
u8 * format_vnet_lisp_gpe_status(u8 *s, va_list *args)
Format LISP-GPE status.
ip_lookup_main_t lookup_main
clib_error_t * lisp_gpe_init(vlib_main_t *vm)
LISP-GPE init function.
uword * hw_if_index_by_dp_table
Lookup lisp-gpe interfaces by dp table (eg.
gid_address_t rmt_eid
remote eid
clib_error_t * ip4_lookup_init(vlib_main_t *vm)
#define gid_address_vni(_a)
static clib_error_t * lisp_gpe_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
CLI command to enable/disable LISP-GPE.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
tunnel_lookup_t l3_ifaces
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
locator_pair_t * locator_pairs
vector of locator pairs
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
ip4_main_t ip4_main
Global ip4 main structure.
void udp_register_dst_port(vlib_main_t *vm, udp_dst_port_t dst_port, u32 node_index, u8 is_ip4)
#define clib_error_return(e, args...)
gid_address_t lcl_eid
local eid
static clib_error_t * lisp_gpe_add_del_fwd_entry_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
CLI command to add/del forwarding entry.