l2: arp termination dump
[vpp.git] / src / vpp / api / custom_dump.c
index ba55150..b4fa221 100644 (file)
@@ -486,6 +486,16 @@ static void *vl_api_bd_ip_mac_add_del_t_print
   FINISH;
 }
 
+static void *vl_api_bd_ip_mac_dump_t_print
+  (vl_api_bd_ip_mac_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: bd_ip_mac_dump ");
+
+  FINISH;
+}
+
 static void *vl_api_tap_connect_t_print
   (vl_api_tap_connect_t * mp, void *handle)
 {
@@ -561,7 +571,7 @@ static void *vl_api_tap_create_v2_t_print
   memset (null_mac, 0, sizeof (null_mac));
 
   s = format (0, "SCRIPT: tap_create_v2 ");
-  s = format (s, "id %u ", mp->id);
+  s = format (s, "id %u ", ntohl (mp->id));
   if (memcmp (mp->mac_address, null_mac, 6))
     s = format (s, "mac-address %U ",
                format_ethernet_address, mp->mac_address);
@@ -585,9 +595,9 @@ static void *vl_api_tap_create_v2_t_print
   if (mp->host_ip6_gw_set)
     s = format (s, "host-ip6-gw %U ", format_ip6_address, mp->host_ip6_addr);
   if (mp->tx_ring_sz)
-    s = format (s, "tx-ring-size %d ", mp->tx_ring_sz);
+    s = format (s, "tx-ring-size %u ", ntohs (mp->tx_ring_sz));
   if (mp->rx_ring_sz)
-    s = format (s, "rx-ring-size %d ", mp->rx_ring_sz);
+    s = format (s, "rx-ring-size %u ", ntohs (mp->rx_ring_sz));
   FINISH;
 }
 
@@ -747,11 +757,12 @@ static void *vl_api_proxy_arp_add_del_t_print
 
   s = format (0, "SCRIPT: proxy_arp_add_del ");
 
-  s = format (s, "%U - %U ", format_ip4_address, mp->low_address,
-             format_ip4_address, mp->hi_address);
+  s = format (s, "%U - %U ",
+             format_ip4_address, mp->proxy.low_address,
+             format_ip4_address, mp->proxy.hi_address);
 
-  if (mp->vrf_id)
-    s = format (s, "vrf %d ", ntohl (mp->vrf_id));
+  if (mp->proxy.vrf_id)
+    s = format (s, "vrf %d ", ntohl (mp->proxy.vrf_id));
 
   if (mp->is_add == 0)
     s = format (s, "del ");
@@ -1010,13 +1021,13 @@ static void *vl_api_dhcp_client_config_t_print
 
   s = format (0, "SCRIPT: dhcp_client_config ");
 
-  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
+  s = format (s, "sw_if_index %d ", ntohl (mp->client.sw_if_index));
 
-  s = format (s, "hostname %s ", mp->hostname);
+  s = format (s, "hostname %s ", mp->client.hostname);
 
-  s = format (s, "want_dhcp_event %d ", mp->want_dhcp_event);
+  s = format (s, "want_dhcp_event %d ", mp->client.want_dhcp_event);
 
-  s = format (s, "pid %d ", ntohl (mp->pid));
+  s = format (s, "pid %d ", ntohl (mp->client.pid));
 
   if (mp->is_add == 0)
     s = format (s, "del ");
@@ -1199,7 +1210,7 @@ static void *vl_api_sr_localsid_add_del_t_print
     {
     case SR_BEHAVIOR_END:
       s = format (s, "Address: %U\nBehavior: End",
-                 format_ip6_address, (ip6_address_t *) mp->localsid_addr);
+                 format_ip6_address, (ip6_address_t *) mp->localsid.addr);
       s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
       break;
     case SR_BEHAVIOR_X:
@@ -1207,9 +1218,9 @@ static void *vl_api_sr_localsid_add_del_t_print
        format (s,
                "Address: %U\nBehavior: X (Endpoint with Layer-3 cross-connect)"
                "\nIface: %U\nNext hop: %U", format_ip6_address,
-               (ip6_address_t *) mp->localsid_addr,
+               (ip6_address_t *) mp->localsid.addr,
                format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index),
-               format_ip6_address, (ip6_address_t *) mp->nh_addr);
+               format_ip6_address, (ip6_address_t *) mp->nh_addr6);
       s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
       break;
     case SR_BEHAVIOR_DX4:
@@ -1217,25 +1228,25 @@ static void *vl_api_sr_localsid_add_del_t_print
        format (s,
                "Address: %U\nBehavior: DX4 (Endpoint with decapsulation with IPv4 cross-connect)"
                "\nIface: %U\nNext hop: %U", format_ip6_address,
-               (ip6_address_t *) mp->localsid_addr,
+               (ip6_address_t *) mp->localsid.addr,
                format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index),
-               format_ip4_address, (ip4_address_t *) mp->nh_addr);
+               format_ip4_address, (ip4_address_t *) mp->nh_addr4);
       break;
     case SR_BEHAVIOR_DX6:
       s =
        format (s,
                "Address: %U\nBehavior: DX6 (Endpoint with decapsulation with IPv6 cross-connect)"
                "\nIface: %UNext hop: %U", format_ip6_address,
-               (ip6_address_t *) mp->localsid_addr,
+               (ip6_address_t *) mp->localsid.addr,
                format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index),
-               format_ip6_address, (ip6_address_t *) mp->nh_addr);
+               format_ip6_address, (ip6_address_t *) mp->nh_addr6);
       break;
     case SR_BEHAVIOR_DX2:
       s =
        format (s,
                "Address: %U\nBehavior: DX2 (Endpoint with decapulation and Layer-2 cross-connect)"
                "\nIface: %U", format_ip6_address,
-               (ip6_address_t *) mp->localsid_addr,
+               (ip6_address_t *) mp->localsid.addr,
                format_vnet_sw_if_index_name, vnm, ntohl (mp->sw_if_index));
       break;
     case SR_BEHAVIOR_DT6:
@@ -1243,20 +1254,20 @@ static void *vl_api_sr_localsid_add_del_t_print
        format (s,
                "Address: %U\nBehavior: DT6 (Endpoint with decapsulation and specific IPv6 table lookup)"
                "\nTable: %u", format_ip6_address,
-               (ip6_address_t *) mp->localsid_addr, ntohl (mp->fib_table));
+               (ip6_address_t *) mp->localsid.addr, ntohl (mp->fib_table));
       break;
     case SR_BEHAVIOR_DT4:
       s =
        format (s,
                "Address: %U\nBehavior: DT4 (Endpoint with decapsulation and specific IPv4 table lookup)"
                "\nTable: %u", format_ip6_address,
-               (ip6_address_t *) mp->localsid_addr, ntohl (mp->fib_table));
+               (ip6_address_t *) mp->localsid.addr, ntohl (mp->fib_table));
       break;
     default:
       if (mp->behavior >= SR_BEHAVIOR_LAST)
        {
          s = format (s, "Address: %U\n Behavior: %u",
-                     format_ip6_address, (ip6_address_t *) mp->localsid_addr,
+                     format_ip6_address, (ip6_address_t *) mp->localsid.addr,
                      mp->behavior);
        }
       else
@@ -1309,10 +1320,10 @@ static void *vl_api_sr_policy_add_t_print
   u8 *s;
 
   ip6_address_t *segments = 0, *seg;
-  ip6_address_t *this_address = (ip6_address_t *) mp->segments;
+  ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
 
   int i;
-  for (i = 0; i < mp->n_segments; i++)
+  for (i = 0; i < mp->sids.num_sids; i++)
     {
       vec_add2 (segments, seg, 1);
       clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
@@ -1351,10 +1362,10 @@ static void *vl_api_sr_policy_mod_t_print
   u8 *s;
 
   ip6_address_t *segments = 0, *seg;
-  ip6_address_t *this_address = (ip6_address_t *) mp->segments;
+  ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
 
   int i;
-  for (i = 0; i < mp->n_segments; i++)
+  for (i = 0; i < mp->sids.num_sids; i++)
     {
       vec_add2 (segments, seg, 1);
       clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
@@ -1633,6 +1644,20 @@ static void *vl_api_vxlan_add_del_tunnel_t_print
   FINISH;
 }
 
+static void *vl_api_vxlan_offload_rx_t_print
+  (vl_api_vxlan_offload_rx_t * mp, void *handle)
+{
+  u8 *s;
+  s = format (0, "SCRIPT: vxlan_offload_rx ");
+
+  s = format (s, "hw hw_if_index %d ", ntohl (mp->hw_if_index));
+  s = format (s, "rx sw_if_index %d ", ntohl (mp->sw_if_index));
+  if (!mp->enable)
+    s = format (s, "del ");
+
+  FINISH;
+}
+
 static void *vl_api_vxlan_tunnel_dump_t_print
   (vl_api_vxlan_tunnel_dump_t * mp, void *handle)
 {
@@ -2204,6 +2229,16 @@ static void *vl_api_af_packet_delete_t_print
   FINISH;
 }
 
+static void *vl_api_af_packet_dump_t_print
+  (vl_api_af_packet_dump_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: af_packet_dump ");
+
+  FINISH;
+}
+
 static u8 *
 format_policer_action (u8 * s, va_list * va)
 {
@@ -3245,8 +3280,8 @@ static void *vl_api_sw_interface_tag_add_del_t_print
   FINISH;
 }
 
-static void *vl_api_sw_interface_set_mtu_t_print
-  (vl_api_sw_interface_set_mtu_t * mp, void *handle)
+static void *vl_api_hw_interface_set_mtu_t_print
+  (vl_api_hw_interface_set_mtu_t * mp, void *handle)
 {
   u8 *s;
 
@@ -3553,6 +3588,7 @@ _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key)                         \
 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump)                   \
 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel)                           \
 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump)                                 \
+_(VXLAN_OFFLOAD_RX, vxlan_offload_rx)                                   \
 _(GENEVE_ADD_DEL_TUNNEL, geneve_add_del_tunnel)                         \
 _(GENEVE_TUNNEL_DUMP, geneve_tunnel_dump)                               \
 _(GRE_ADD_DEL_TUNNEL, gre_add_del_tunnel)                               \
@@ -3590,6 +3626,7 @@ _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable)             \
 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable)           \
 _(AF_PACKET_CREATE, af_packet_create)                                  \
 _(AF_PACKET_DELETE, af_packet_delete)                                  \
+_(AF_PACKET_DUMP, af_packet_dump)                                       \
 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats)                   \
 _(MPLS_FIB_DUMP, mpls_fib_dump)                                         \
 _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump)                                   \
@@ -3659,7 +3696,7 @@ _(IP_FIB_DUMP, ip_fib_dump)                                             \
 _(IP6_FIB_DUMP, ip6_fib_dump)                                           \
 _(FEATURE_ENABLE_DISABLE, feature_enable_disable)                      \
 _(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del)                  \
-_(SW_INTERFACE_SET_MTU, sw_interface_set_mtu)                           \
+_(HW_INTERFACE_SET_MTU, hw_interface_set_mtu)                           \
 _(P2P_ETHERNET_ADD, p2p_ethernet_add)                                   \
 _(P2P_ETHERNET_DEL, p2p_ethernet_del)                                  \
 _(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses)            \