UT: Repaired broken C unit tests (--enable-tests)
[vpp.git] / src / vpp / api / test_client.c
index ceafc35..52833eb 100644 (file)
@@ -161,10 +161,8 @@ vl_api_sw_interface_details_t_handler (vl_api_sw_interface_details_t * mp)
 static void
 vl_api_sw_interface_set_flags_t_handler (vl_api_sw_interface_set_flags_t * mp)
 {
-  fformat (stdout, "set flags: sw_if_index %d, admin %s link %s\n",
-          ntohl (mp->sw_if_index),
-          mp->admin_up_down ? "up" : "down",
-          mp->link_up_down ? "up" : "down");
+  fformat (stdout, "set flags: sw_if_index %d, admin %s\n",
+          ntohl (mp->sw_if_index), mp->admin_up_down ? "up" : "down");
 }
 
 static void
@@ -245,6 +243,7 @@ static void vl_api_ip_neighbor_add_del_reply_t_handler
   fformat (stdout, "ip neighbor add del reply %d\n", ntohl (mp->retval));
 }
 
+#if 0
 static void
 vl_api_vnet_interface_counters_t_handler (vl_api_vnet_interface_counters_t *
                                          mp)
@@ -332,6 +331,7 @@ vl_api_vnet_interface_counters_t_handler (vl_api_vnet_interface_counters_t *
        }
     }
 }
+#endif
 
 /* Format an IP4 address. */
 u8 *
@@ -534,11 +534,11 @@ static void vl_api_create_loopback_reply_t_handler
           ntohl (mp->retval), ntohl (mp->sw_if_index));
 }
 
-static void
-vl_api_sr_tunnel_add_del_reply_t_handler (vl_api_sr_tunnel_add_del_reply_t *
-                                         mp)
+static void vl_api_create_loopback_instance_reply_t_handler
+  (vl_api_create_loopback_instance_reply_t * mp)
 {
-  fformat (stdout, "sr tunnel add/del reply %d\n", ntohl (mp->retval));
+  fformat (stdout, "create loopback status %d, sw_if_index %d\n",
+          ntohl (mp->retval), ntohl (mp->sw_if_index));
 }
 
 static void vl_api_l2_patch_add_del_reply_t_handler
@@ -578,7 +578,6 @@ _(WANT_STATS_REPLY, want_stats_reply)                                   \
 _(WANT_OAM_EVENTS_REPLY, want_oam_events_reply)                         \
 _(OAM_EVENT, oam_event)                                                 \
 _(OAM_ADD_DEL_REPLY, oam_add_del_reply)                                        \
-_(VNET_INTERFACE_COUNTERS, vnet_interface_counters)                     \
 _(VNET_IP4_FIB_COUNTERS, vnet_ip4_fib_counters)                         \
 _(VNET_IP6_FIB_COUNTERS, vnet_ip6_fib_counters)                         \
 _(IP_ADD_DEL_ROUTE_REPLY, ip_add_del_route_reply)                       \
@@ -598,8 +597,8 @@ _(SW_INTERFACE_IP6ND_RA_PREFIX_REPLY, sw_interface_ip6nd_ra_prefix_reply) \
 _(SW_INTERFACE_IP6_ENABLE_DISABLE_REPLY, sw_interface_ip6_enable_disable_reply) \
 _(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS_REPLY, sw_interface_ip6_set_link_local_address_reply) \
  _(CREATE_LOOPBACK_REPLY, create_loopback_reply)                       \
+ _(CREATE_LOOPBACK_INSTANCE_REPLY, create_loopback_instance_reply)     \
 _(L2_PATCH_ADD_DEL_REPLY, l2_patch_add_del_reply)                      \
-_(SR_TUNNEL_ADD_DEL_REPLY,sr_tunnel_add_del_reply)          \
 _(SW_INTERFACE_SET_L2_XCONNECT_REPLY, sw_interface_set_l2_xconnect_reply) \
 _(SW_INTERFACE_SET_L2_BRIDGE_REPLY, sw_interface_set_l2_bridge_reply)
 
@@ -942,7 +941,6 @@ add_ip4_neighbor (test_main_t * tm, int add_del)
   mp->_vl_msg_id = ntohs (VL_API_IP_NEIGHBOR_ADD_DEL);
   mp->client_index = tm->my_client_index;
   mp->context = 0xdeadbeef;
-  mp->vrf_id = ntohl (11);
   mp->sw_if_index = ntohl (6);
   mp->is_add = add_del;
 
@@ -965,7 +963,6 @@ add_ip6_neighbor (test_main_t * tm, int add_del)
   mp->_vl_msg_id = ntohs (VL_API_IP_NEIGHBOR_ADD_DEL);
   mp->client_index = tm->my_client_index;
   mp->context = 0xdeadbeef;
-  mp->vrf_id = ntohl (11);
   mp->sw_if_index = ntohl (6);
   mp->is_add = add_del;
   mp->is_ipv6 = 1;
@@ -1008,7 +1005,7 @@ dhcpv6_set_vss (test_main_t * tm)
   mp->client_index = tm->my_client_index;
   mp->context = 0xdeadbeef;
   mp->oui = ntohl (6);
-  mp->fib_id = ntohl (60);
+  mp->tbl_id = ntohl (60);
   mp->is_add = 1;
   mp->is_ipv6 = 1;
   vl_msg_api_send_shmem (tm->vl_input_queue, (u8 *) & mp);
@@ -1025,7 +1022,7 @@ dhcpv4_set_vss (test_main_t * tm)
   mp->client_index = tm->my_client_index;
   mp->context = 0xdeadbeef;
   mp->oui = ntohl (4);
-  mp->fib_id = ntohl (40);
+  mp->tbl_id = ntohl (40);
   mp->is_add = 1;
   mp->is_ipv6 = 0;
   vl_msg_api_send_shmem (tm->vl_input_queue, (u8 *) & mp);
@@ -1048,9 +1045,7 @@ dhcp_set_proxy (test_main_t * tm, int ipv6)
   mp->_vl_msg_id = ntohs (VL_API_DHCP_PROXY_CONFIG);
   mp->client_index = tm->my_client_index;
   mp->context = 0xdeadbeef;
-  mp->vrf_id = ntohl (0);
   mp->is_ipv6 = ipv6;
-  mp->insert_circuit_id = 1;
   mp->is_add = 1;
   mp->dhcp_server[0] = 0x20;
   mp->dhcp_server[1] = 0x01;