45 #define vl_api_bridge_domain_details_t_endian vl_noop_handler 46 #define vl_api_bridge_domain_details_t_print vl_noop_handler 49 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 56 #define foreach_vpe_api_msg \ 57 _(L2_XCONNECT_DUMP, l2_xconnect_dump) \ 58 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \ 59 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \ 60 _(L2FIB_FLUSH_ALL, l2fib_flush_all) \ 61 _(L2FIB_FLUSH_INT, l2fib_flush_int) \ 62 _(L2FIB_FLUSH_BD, l2fib_flush_bd) \ 63 _(L2FIB_ADD_DEL, l2fib_add_del) \ 64 _(WANT_L2_MACS_EVENTS, want_l2_macs_events) \ 65 _(L2_FLAGS, l2_flags) \ 66 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \ 67 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \ 68 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \ 69 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \ 70 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \ 71 _(BD_IP_MAC_FLUSH, bd_ip_mac_flush) \ 72 _(BD_IP_MAC_DUMP, bd_ip_mac_dump) \ 73 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \ 74 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \ 75 _(BRIDGE_FLAGS, bridge_flags) \ 76 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \ 77 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \ 78 _(BRIDGE_DOMAIN_SET_MAC_AGE, bridge_domain_set_mac_age) \ 79 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \ 80 _(BVI_CREATE, bvi_create) \ 81 _(BVI_DELETE, bvi_delete) \ 82 _(WANT_L2_ARP_TERM_EVENTS, want_l2_arp_term_events) 92 mp->_vl_msg_id =
ntohs (VL_API_L2_XCONNECT_DETAILS);
117 config = vec_elt_at_index (l2im->configs, swif->sw_if_index);
118 if (config->xconnect)
119 send_l2_xconnect_details (reg, mp->context, swif->sw_if_index,
120 config->output_sw_if_index);
129 vl_api_l2_fib_clear_table_reply_t *rmp;
147 mp->_vl_msg_id =
ntohs (VL_API_L2_FIB_TABLE_DETAILS);
154 mp->
static_mac = (l2fib_entry_result_is_set_STATIC (l2fe_res) ? 1 : 0);
155 mp->
filter_mac = (l2fib_entry_result_is_set_FILTER (l2fe_res) ? 1 : 0);
156 mp->
bvi_mac = (l2fib_entry_result_is_set_BVI (l2fe_res) ? 1 : 0);
206 vl_api_l2fib_add_del_reply_t *rmp;
213 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
214 goto bad_sw_if_index;
232 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
233 goto bad_sw_if_index;
241 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
242 goto bad_sw_if_index;
246 flags |= L2FIB_ENTRY_RESULT_FLAG_STATIC;
248 flags |= L2FIB_ENTRY_RESULT_FLAG_BVI;
256 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
268 vl_api_want_l2_macs_events_reply_t *rmp;
285 rv = VNET_API_ERROR_INVALID_VALUE;
293 rv = VNET_API_ERROR_INVALID_VALUE;
302 rv = VNET_API_ERROR_INVALID_VALUE;
310 rv = VNET_API_ERROR_L2_MACS_EVENT_CLINET_PRESENT;
314 else if (lm->client_pid)
317 lm->client_index = 0;
319 lm->global_learn_limit = learn_limit;
333 vl_api_l2fib_flush_int_reply_t *rmp;
348 vl_api_l2fib_flush_all_reply_t *rmp;
360 vl_api_l2fib_flush_bd_reply_t *rmp;
366 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
388 bitmap |= L2INPUT_FEAT_LEARN;
391 bitmap |= L2INPUT_FEAT_FWD;
394 bitmap |= L2INPUT_FEAT_FLOOD;
397 bitmap |= L2INPUT_FEAT_UU_FLOOD;
400 bitmap |= L2INPUT_FEAT_ARP_TERM;
420 vl_api_bridge_domain_set_mac_age_reply_t *rmp;
427 rv = VNET_API_ERROR_BD_NOT_MODIFIABLE;
434 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
439 REPLY_MACRO (VL_API_BRIDGE_DOMAIN_SET_MAC_AGE_REPLY);
454 .bd_id = ntohl (mp->
bd_id),
460 vl_api_bridge_domain_add_del_reply_t *rmp;
468 u32 n_sw_ifs,
u32 context)
472 vl_api_bridge_domain_sw_if_t *sw_ifs;
476 (n_sw_ifs *
sizeof (vl_api_bridge_domain_sw_if_t)));
478 mp->_vl_msg_id =
ntohs (VL_API_BRIDGE_DOMAIN_DETAILS);
491 strncpy ((
char *) mp->
bd_tag, (
char *) bd_config->
bd_tag,
503 sw_ifs->shg = input_cfg->
shg;
525 if (filter_sw_if_index != ~0)
528 bd_id = ntohl (mp->
bd_id);
543 for (; bd_index <
end; bd_index++)
548 if (bd_config && (bd_config->
bd_id > 0))
591 rv = VNET_API_ERROR_BD_NOT_MODIFIABLE;
598 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
618 vl_api_l2_interface_vlan_tag_rewrite_reply_t *rmp;
625 vtr_op = ntohl (mp->
vtr_op);
642 rv = VNET_API_ERROR_INVALID_VALUE;
643 goto bad_sw_if_index;
652 REPLY_MACRO (VL_API_L2_INTERFACE_VLAN_TAG_REWRITE_REPLY);
659 vl_api_l2_interface_pbb_tag_rewrite_reply_t *rmp;
668 vtr_op = ntohl (mp->
vtr_op);
679 rv = VNET_API_ERROR_INVALID_VALUE;
680 goto bad_sw_if_index;
692 REPLY_MACRO (VL_API_L2_INTERFACE_PBB_TAG_REWRITE_REPLY);
699 vl_api_sw_interface_set_l2_xconnect_reply_t *rmp;
724 rv = VNET_API_ERROR_NON_ETHERNET;
727 rv = VNET_API_ERROR_BD_ALREADY_HAS_BVI;
734 REPLY_MACRO (VL_API_SW_INTERFACE_SET_L2_XCONNECT_REPLY);
740 v = clib_net_to_host_u32 (v);
755 return (VNET_API_ERROR_INVALID_VALUE);
763 vl_api_sw_interface_set_l2_bridge_reply_t *rmp;
782 rx_sw_if_index, bd_index, pt, mp->
shg, 0);
792 rv = VNET_API_ERROR_NON_ETHERNET;
795 rv = VNET_API_ERROR_BD_ALREADY_HAS_BVI;
802 REPLY_MACRO (VL_API_SW_INTERFACE_SET_L2_BRIDGE_REPLY);
809 const ip46_address_t *
ip,
817 mp->_vl_msg_id =
ntohs (VL_API_BD_IP_MAC_DETAILS);
820 mp->
entry.bd_id = ntohl (bd_id);
861 for (bd_index = start; bd_index <
end; bd_index++)
867 ip6_address_t *ip6_addr;
870 bd_id = bd_config->
bd_id;
875 ip46_address_t ip = {
886 ip46_address_t ip = {
903 vl_api_bd_ip_mac_add_del_reply_t *rmp;
911 bd_id = ntohl (mp->
entry.bd_id);
915 rv = VNET_API_ERROR_BD_NOT_MODIFIABLE;
922 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
931 rv = VNET_API_ERROR_UNSPECIFIED;
940 vl_api_bd_ip_mac_flush_reply_t *rmp;
946 bd_id = ntohl (mp->
bd_id);
950 rv = VNET_API_ERROR_BD_NOT_MODIFIABLE;
957 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
976 vl_api_l2_interface_efp_filter_reply_t *rmp;
986 REPLY_MACRO (VL_API_L2_INTERFACE_EFP_FILTER_REPLY);
994 vl_api_l2_patch_add_del_reply_t *rmp;
1004 (
int) (mp->
is_add != 0));
1015 vl_api_sw_interface_set_vpath_reply_t *rmp;
1023 sw_if_index, mp->
enable, 0, 0);
1025 sw_if_index, mp->
enable, 0, 0);
1027 sw_if_index, mp->
enable, 0, 0);
1029 sw_if_index, mp->
enable, 0, 0);
1033 REPLY_MACRO (VL_API_SW_INTERFACE_SET_VPATH_REPLY);
1059 vl_api_bvi_delete_reply_t *rmp;
1071 if (e1 == NULL || e2 == NULL)
1110 (now - last) < 10.0)
1114 last_event = *event;
1120 vl_api_registration_t *vl_reg;
1121 vl_reg = vl_api_client_index_to_registration (reg->client_index);
1122 ALWAYS_ASSERT (vl_reg != NULL);
1124 if (reg && vl_api_can_send_msg (vl_reg))
1126 vl_api_l2_arp_term_event_t * vevent;
1127 vevent = vl_msg_api_alloc (sizeof *vevent);
1128 clib_memset (vevent, 0, sizeof *vevent);
1129 vevent->_vl_msg_id = htons (VL_API_L2_ARP_TERM_EVENT);
1130 vevent->client_index = reg->client_index;
1131 vevent->pid = reg->client_pid;
1132 ip_address_encode(&event->ip,
1135 vevent->sw_if_index = htonl(event->sw_if_index);
1136 mac_address_encode(&event->mac, vevent->mac);
1137 vl_api_send_msg (vl_reg, (u8 *) vevent);
1153 .name =
"l2-arp-term-publisher",
1161 vl_api_want_l2_arp_term_events_reply_t *rmp;
1174 rv = VNET_API_ERROR_INVALID_REGISTRATION;
1180 pool_put (am->l2_arp_term_events_registrations, rp);
1181 hash_unset (am->l2_arp_term_events_registration_hash,
1183 if (
pool_elts (am->l2_arp_term_events_registrations) == 0)
1191 rv = VNET_API_ERROR_INVALID_REGISTRATION;
1194 pool_get (am->l2_arp_term_events_registrations, rp);
1198 rp - am->l2_arp_term_events_registrations);
1202 REPLY_MACRO (VL_API_WANT_L2_ARP_TERM_EVENTS_REPLY);
1215 p =
hash_get (am->l2_arp_term_events_registration_hash, client_index);
1220 pool_put (am->l2_arp_term_events_registrations, rp);
1221 hash_unset (am->l2_arp_term_events_registration_hash, client_index);
1222 if (
pool_elts (am->l2_arp_term_events_registrations) == 0)
1237 #define vl_msg_name_crc_list 1239 #undef vl_msg_name_crc_list 1244 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 1245 foreach_vl_msg_name_crc_l2;
1255 vl_msg_api_set_handlers(VL_API_##N, #n, \ 1256 vl_api_##n##_t_handler, \ 1258 vl_api_##n##_t_endian, \ 1259 vl_api_##n##_t_print, \ 1260 sizeof(vl_api_##n##_t), 1); 1265 am->
is_mp_safe[VL_API_BRIDGE_DOMAIN_DUMP] = 1;
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static void vl_api_want_l2_arp_term_events_t_handler(vl_api_want_l2_arp_term_events_t *mp)
static void vl_api_l2_fib_table_dump_t_handler(vl_api_l2_fib_table_dump_t *mp)
#define BAD_RX_SW_IF_INDEX_LABEL
static bd_flags_t bd_flags_decode(vl_api_bd_flags_t v)
#define vec_foreach_index(var, v)
Iterate over vector indices.
vl_api_mac_address_t b_smac
L2 FIB add entry request.
#define hash_set(h, key, value)
l2_input_config_t * configs
Set bridge flags response.
#define VALIDATE_TX_SW_IF_INDEX(mp)
l2 fib table details structure
static void vl_api_bvi_delete_t_handler(vl_api_bvi_delete_t *mp)
vlib_node_registration_t l2_arp_term_process_node
(constructor) VLIB_REGISTER_NODE (l2_arp_term_process_node)
#define hash_unset(h, key)
vl_api_wireguard_peer_flags_t flags
u32 user_instance[default=0xffffffff]
u32 l2vtr_configure(vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 vtr_op, u32 push_dot1q, u32 vtr_tag1, u32 vtr_tag2)
Configure vtag tag rewrite on the given interface.
static uword * vlib_process_wait_for_event(vlib_main_t *vm)
vl_api_l2_port_type_t port_type
l2_arp_term_publish_event_t * publish_events
u32 bd_add_del_ip_mac(u32 bd_index, ip46_type_t type, const ip46_address_t *ip, const mac_address_t *mac, u8 is_add)
Add/delete IP address to MAC address mapping.
vl_api_interface_index_t sw_if_index
vnet_main_t * vnet_get_main(void)
static void vl_api_sw_interface_set_l2_bridge_t_handler(vl_api_sw_interface_set_l2_bridge_t *mp)
Create BVI interface instance request.
void mac_address_encode(const mac_address_t *in, u8 *out)
static void vl_api_l2_patch_add_del_t_handler(vl_api_l2_patch_add_del_t *mp)
static void vl_api_l2_flags_t_handler(vl_api_l2_flags_t *mp)
vnet_interface_main_t interface_main
bool is_add[default=true]
u32 resulting_feature_bitmap
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vl_api_interface_index_t sw_if_index
static f64 vlib_time_now(vlib_main_t *vm)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
VLIB_API_INIT_FUNCTION(l2_api_hookup)
bool is_add[default=true]
static heap_elt_t * last(heap_header_t *h)
L2 bridge domain set mac age.
bool is_add[default=true]
vl_api_interface_index_t rx_sw_if_index
l2_flood_member_t * members
static void vl_api_bridge_domain_add_del_t_handler(vl_api_bridge_domain_add_del_t *mp)
vl_api_interface_index_t sw_if_index
vl_api_interface_index_t rx_sw_if_index
void l2_arp_term_set_publisher_node(bool on)
static void send_l2_xconnect_details(vl_api_registration_t *reg, u32 context, u32 rx_sw_if_index, u32 tx_sw_if_index)
static void vl_api_bd_ip_mac_dump_t_handler(vl_api_bd_ip_mac_dump_t *mp)
enum l2fib_entry_result_flags_t_ l2fib_entry_result_flags_t
u32 bd_id[default=0xffffffff]
L2 bridge domain request operational state details.
int bd_add_del(l2_bridge_domain_add_del_args_t *a)
bridge domain IP to MAC entry details structure
static void vl_api_l2fib_add_del_t_handler(vl_api_l2fib_add_del_t *mp)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
void * vl_msg_api_alloc(int nbytes)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
Reply to l2_xconnect_dump.
u8 max_macs_in_event[default=10]
vl_api_interface_index_t sw_if_index[default=0xffffffff]
L2 bridge domain operational state response.
l2learn_main_t l2learn_main
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static void vl_api_bd_ip_mac_flush_t_handler(vl_api_bd_ip_mac_flush_t *mp)
bool enable[default=true]
#define hash_foreach(key_var, value_var, h, body)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static void vl_api_l2_fib_clear_table_t_handler(vl_api_l2_fib_clear_table_t *mp)
L2 FIB flush bridge domain entries.
void l2fib_add_entry(const u8 *mac, u32 bd_index, u32 sw_if_index, l2fib_entry_result_flags_t flags)
Add an entry to the l2fib.
vl_api_interface_index_t tx_sw_if_index
uword * bd_index_by_bd_id
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
Dump l2 fib (aka bridge domain) table.
vl_api_fib_path_type_t type
bool enable_disable[default=true]
vnet_api_error_t api_errno
vl_api_interface_index_t sw_if_index
Set interface L2 flags (such as L2_LEARN, L2_FWD, L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits)...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
L2 FIB flush all entries.
L2 fib clear table request, clear all mac entries in the l2 fib.
vl_api_interface_index_t uu_fwd_sw_if_index
vl_api_interface_index_t sw_if_index
bool enable_disable[default=true]
Set interface L2 flags response.
#define pool_put(P, E)
Free an object E in pool P.
void l2fib_flush_bd_mac(vlib_main_t *vm, u32 bd_index)
Flush all non static MACs in a bridge domain.
enum l2_bd_port_type_t_ l2_bd_port_type_t
static void vl_api_bd_ip_mac_add_del_t_handler(vl_api_bd_ip_mac_add_del_t *mp)
#define BAD_TX_SW_IF_INDEX_LABEL
void l2fib_flush_all_mac(vlib_main_t *vm)
Flush all non static MACs - flushes all valid BDs.
static_always_inline void mac_address_from_u64(mac_address_t *mac, u64 u)
bool enable[default=true]
vl_api_interface_index_t sw_if_index
VL_MSG_API_REAPER_FUNCTION(want_l2_arp_term_events_reaper)
static_always_inline int mac_address_equal(const mac_address_t *a, const mac_address_t *b)
vl_api_interface_index_t tx_sw_if_index
Create BVI interface instance response.
#define hash_foreach_mem(key_var, value_var, h, body)
static clib_error_t * l2_api_hookup(vlib_main_t *vm)
static u32 bd_is_valid(l2_bridge_domain_t *bd_config)
static u8 ip46_address_is_equal(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
vl_api_interface_index_t sw_if_index
API main structure, used by both vpp and binary API clients.
vl_api_interface_index_t sw_if_index
u32 l2pbb_configure(vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 vtr_op, u8 *b_dmac, u8 *b_smac, u16 b_vlanid, u32 i_sid, u16 vlan_outer_tag)
struct l2fib_entry_result_t_::@458::@460 fields
void bd_set_mac_age(vlib_main_t *vm, u32 bd_index, u8 age)
Set the mac age for the bridge domain.
An API client registration, only in vpp/vlib.
#define BAD_SW_IF_INDEX_LABEL
struct l2fib_entry_key_t::@450::@452 fields
static void send_bridge_domain_details(l2input_main_t *l2im, vl_api_registration_t *reg, l2_bridge_domain_t *bd_config, u32 n_sw_ifs, u32 context)
#define VLIB_REGISTER_NODE(x,...)
u32 l2fib_del_entry(const u8 *mac, u32 bd_index, u32 sw_if_index)
Delete an entry from the l2fib.
int l2_bvi_delete(u32 sw_if_index)
vl_api_interface_index_t sw_if_index
static void send_bd_ip_mac_entry(vpe_api_main_t *am, vl_api_registration_t *reg, u32 bd_id, const ip46_address_t *ip, ip46_type_t itype, const mac_address_t *mac, u32 context)
static void vl_api_l2_xconnect_dump_t_handler(vl_api_l2_xconnect_dump_t *mp)
#define vec_free(V)
Free vector's memory (no header).
#define foreach_vpe_api_msg
u32 bd_set_flags(vlib_main_t *vm, u32 bd_index, bd_flags_t flags, u32 enable)
Set the learn/forward/flood flags for the bridge domain.
#define clib_warning(format, args...)
static void setup_message_id_table(api_main_t *am)
vl_api_interface_index_t bvi_sw_if_index
vl_api_interface_index_t tx_sw_if_index
void l2fib_clear_table(void)
static clib_error_t * want_l2_arp_term_events_reaper(u32 client_index)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
u8 scan_delay[default=10]
static bool l2_arp_term_publish_event_is_equal(const l2_arp_term_publish_event_t *e1, const l2_arp_term_publish_event_t *e2)
#define VALIDATE_RX_SW_IF_INDEX(mp)
vl_api_interface_index_t rx_sw_if_index
Dump bridge domain IP to MAC entries.
bool enable[default=0xffffffff]
void bd_flush_ip_mac(u32 bd_index)
Flush IP address to MAC address mapping tables in a BD.
Set L2 XConnect between two interfaces request.
vl_api_interface_index_t rx_sw_if_index
vl_api_interface_index_t tx_sw_if_index
static u32 bd_find_or_add_bd_index(bd_main_t *bdm, u32 bd_id)
Get or create a bridge domain.
bool is_add[default=true]
Register to receive L2 MAC events for learned and aged MAC.
#define VALIDATE_BD_ID(mp)
static vlib_main_t * vlib_get_main(void)
u32 resulting_feature_bitmap
static void vl_api_l2_interface_vlan_tag_rewrite_t_handler(vl_api_l2_interface_vlan_tag_rewrite_t *mp)
Interface bridge mode request.
vl_api_interface_index_t sw_if_index
static void vl_api_sw_interface_set_l2_xconnect_t_handler(vl_api_sw_interface_set_l2_xconnect_t *mp)
static void vl_api_bvi_create_t_handler(vl_api_bvi_create_t *mp)
L2 FIB flush interface entries.
static void * vlib_process_get_event_data(vlib_main_t *vm, uword *return_event_type_opaque)
static void vl_api_l2fib_flush_bd_t_handler(vl_api_l2fib_flush_bd_t *mp)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static void vl_api_want_l2_macs_events_t_handler(vl_api_want_l2_macs_events_t *mp)
Register for IP4 ARP resolution event on receiving ARP reply or MAC/IP info from ARP requests in L2 B...
L2 interface ethernet flow point filtering enable/disable request.
static void vl_api_bridge_flags_t_handler(vl_api_bridge_flags_t *mp)
int vnet_l2_patch_add_del(u32 rx_sw_if_index, u32 tx_sw_if_index, int is_add)
vnet_sw_interface_t * sw_interfaces
static void vl_api_l2_interface_efp_filter_t_handler(vl_api_l2_interface_efp_filter_t *mp)
vl_api_mac_address_t b_dmac
L2 interface vlan tag rewrite configure request.
static void vl_api_l2fib_flush_all_t_handler(vl_api_l2fib_flush_all_t *mp)
l2_bridge_domain_t * bd_configs
static void l2fib_add_filter_entry(const u8 *mac, u32 bd_index)
static void vl_api_bridge_domain_set_mac_age_t_handler(vl_api_bridge_domain_set_mac_age_t *mp)
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
L2 interface patch add / del request.
void l2fib_table_dump(u32 bd_index, l2fib_entry_key_t **l2fe_key, l2fib_entry_result_t **l2fe_res)
static void send_l2fib_table_entry(vpe_api_main_t *am, vl_api_registration_t *reg, l2fib_entry_key_t *l2fe_key, l2fib_entry_result_t *l2fe_res, u32 context)
static api_main_t * vlibapi_get_main(void)
Interface set vpath request.
static int l2_bd_port_type_decode(vl_api_l2_port_type_t v, l2_bd_port_type_t *l)
u8 * is_mp_safe
Message is mp safe vector.
L2 interface pbb tag rewrite configure request.
u32 learn_limit[default=1000]
#define vec_foreach(var, vec)
Vector iterator.
Set bridge flags request.
f64 end
end of the time range
Delete BVI interface request.
vl_api_bridge_domain_sw_if_t sw_if_details[n_sw_ifs]
u32 bd_find_index(bd_main_t *bdm, u32 bd_id)
Get a bridge domain.
vpe_api_main_t vpe_api_main
void l2_efp_filter_configure(vnet_main_t *vnet_main, u32 sw_if_index, u8 enable)
Enable/disable the EFP Filter check on the subinterface.
l2_arp_term_main_t l2_arp_term_main
void mac_address_decode(const u8 *in, mac_address_t *out)
Conversion functions to/from (decode/encode) API types to VPP internal types.
void l2fib_flush_int_mac(vlib_main_t *vm, u32 sw_if_index)
Flush all non static MACs from an interface.
static void vl_api_l2fib_flush_int_t_handler(vl_api_l2fib_flush_int_t *mp)
Flush bridge domain IP to MAC entries.
#define ip46_address_initializer
static uword l2_arp_term_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
vl_api_interface_index_t sw_if_index
static void vl_api_l2_interface_pbb_tag_rewrite_t_handler(vl_api_l2_interface_pbb_tag_rewrite_t *mp)
#define L2LEARN_DEFAULT_LIMIT
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)
int l2_bvi_create(u32 user_instance, const mac_address_t *mac_in, u32 *sw_if_indexp)
#define VALIDATE_SW_IF_INDEX(mp)
enum bd_flags_t_ bd_flags_t
static void vl_api_bridge_domain_dump_t_handler(vl_api_bridge_domain_dump_t *mp)
L2 bridge domain add or delete request.
static void vl_api_sw_interface_set_vpath_t_handler(vl_api_sw_interface_set_vpath_t *mp)
static uword pool_elts(void *v)
Number of active elements in a pool.