+ l2_bridge_domain_t *bd_config;
+ u32 bd_id = ntohl (mp->bd_id);
+ u32 bd_index, start, end;
+ vl_api_registration_t *reg;
+ uword *p;
+
+ reg = vl_api_client_index_to_registration (mp->client_index);
+ if (!reg)
+ return;
+
+ /* see bd_id: ~0 means "any" */
+ if (bd_id == ~0)
+ {
+ start = 1;
+ end = vec_len (l2input_main.bd_configs);
+ }
+ else
+ {
+ p = hash_get (bdm->bd_index_by_bd_id, bd_id);
+ if (p == 0)
+ return;
+
+ bd_index = p[0];
+ vec_validate (l2input_main.bd_configs, bd_index);
+ start = bd_index;
+ end = start + 1;
+ }
+
+ for (bd_index = start; bd_index < end; bd_index++)
+ {
+ bd_config = vec_elt_at_index (l2input_main.bd_configs, bd_index);
+ if (bd_is_valid (bd_config))
+ {
+ ip4_address_t ip4_addr;
+ ip6_address_t *ip6_addr;
+ u64 mac_addr;
+ bd_id = bd_config->bd_id;
+
+ /* *INDENT-OFF* */
+ hash_foreach (ip4_addr.as_u32, mac_addr, bd_config->mac_by_ip4,
+ ({
+ send_bd_ip_mac_entry (am, reg, bd_id, 0, (u8 *) &(ip4_addr.as_u8), (u8 *) &mac_addr, mp->context);
+ }));
+
+ hash_foreach_mem (ip6_addr, mac_addr, bd_config->mac_by_ip6,
+ ({
+ send_bd_ip_mac_entry (am, reg, bd_id, 1, (u8 *) &(ip6_addr->as_u8), (u8 *) &mac_addr, mp->context);
+ }));
+ /* *INDENT-ON* */
+ }
+ }
+}
+
+static void
+vl_api_bd_ip_mac_add_del_t_handler (vl_api_bd_ip_mac_add_del_t * mp)
+{
+ ip46_address_t ip_addr = ip46_address_initializer;