LISP - Bug fix, can`t remove static remote mapping
[vpp.git] / vpp-api-test / vat / api_format.c
index fa37989..0b6cf7f 100644 (file)
@@ -34,6 +34,7 @@
 #include <vnet/l2/l2_classify.h>
 #include <vnet/l2/l2_vtr.h>
 #include <vnet/classify/input_acl.h>
+#include <vnet/classify/policer_classify.h>
 #include <vnet/mpls-gre/mpls.h>
 #if DPDK > 0
 #include <vnet/ipsec/ipsec.h>
@@ -46,6 +47,7 @@
 #include <vnet/ip/ip6_hop_by_hop.h>
 #include <vnet/policer/xlate.h>
 #include <vnet/policer/policer.h>
+#include <vnet/policer/police.h>
 
 #include "vat/json_format.h"
 
@@ -450,6 +452,25 @@ unformat_policer_action_type (unformat_input_t * input, va_list * va)
   return 1;
 }
 
+uword
+unformat_classify_table_type (unformat_input_t * input, va_list * va)
+{
+  u32 * r = va_arg (*va, u32 *);
+  u32 tid;
+
+  if (unformat (input, "ip4"))
+    tid = POLICER_CLASSIFY_TABLE_IP4;
+  else if (unformat (input, "ip6"))
+    tid = POLICER_CLASSIFY_TABLE_IP6;
+  else if (unformat (input, "l2"))
+    tid = POLICER_CLASSIFY_TABLE_L2;
+  else
+    return 0;
+
+  *r = tid;
+  return 1;
+}
+
 u8 * format_ip4_address (u8 * s, va_list * args)
 {
   u8 * a = va_arg (*args, u8 *);
@@ -1197,6 +1218,46 @@ static void vl_api_control_ping_reply_t_handler_json
     vam->result_ready = 1;
 }
 
+static void vl_api_noprint_control_ping_reply_t_handler
+(vl_api_noprint_control_ping_reply_t * mp)
+{
+    vat_main_t * vam = &vat_main;
+    i32 retval = ntohl(mp->retval);
+    if (vam->async_mode) {
+        vam->async_errors += (retval < 0);
+    } else {
+        vam->retval = retval;
+        vam->result_ready = 1;
+    }
+}
+
+static void vl_api_noprint_control_ping_reply_t_handler_json
+(vl_api_noprint_control_ping_reply_t * mp)
+{
+    vat_main_t * vam = &vat_main;
+    i32 retval = ntohl(mp->retval);
+
+    if (vam->noprint_msg) {
+      vam->retval = retval;
+      vam->result_ready = 1;
+      return;
+    }
+
+    if (VAT_JSON_NONE != vam->json_tree.type) {
+        vat_json_print(vam->ofp, &vam->json_tree);
+        vat_json_free(&vam->json_tree);
+        vam->json_tree.type = VAT_JSON_NONE;
+    } else {
+        /* just print [] */
+        vat_json_init_array(&vam->json_tree);
+        vat_json_print(vam->ofp, &vam->json_tree);
+        vam->json_tree.type = VAT_JSON_NONE;
+    }
+
+    vam->retval = retval;
+    vam->result_ready = 1;
+}
+
 static void vl_api_l2_flags_reply_t_handler
 (vl_api_l2_flags_reply_t * mp)
 {
@@ -1993,42 +2054,71 @@ static void vl_api_get_node_graph_reply_t_handler_json
 }
 
 static void
-vl_api_lisp_locator_set_details_t_handler (
-    vl_api_lisp_locator_set_details_t *mp)
+vl_api_lisp_locator_details_t_handler (
+    vl_api_lisp_locator_details_t *mp)
 {
     vat_main_t *vam = &vat_main;
-    u8 * tmp_str = NULL;
-
-    if (mp->local) {
-      fformat(vam->ofp, "%=20s%=16d%=16d%=16d\n",
-              mp->locator_set_name,
-              ntohl(mp->sw_if_index),
-              mp->priority,
-              mp->weight);
+    locator_msg_t loc;
+    u8 * tmp_str = 0;
+
+    memset(&loc, 0, sizeof(loc));
+    if (vam->noprint_msg) {
+      loc.local = mp->local;
+      loc.priority = mp->priority;
+      loc.weight = mp->weight;
+      if (loc.local) {
+        loc.sw_if_index = ntohl(mp->sw_if_index);
+      } else {
+        loc.is_ipv6 = mp->is_ipv6;
+        clib_memcpy(loc.ip_address, mp->ip_address, sizeof(loc.ip_address));
+      }
+      vec_add1(vam->locator_msg, loc);
     } else {
-      tmp_str = format(0,"%U/%d",
-              mp->is_ipv6 ? format_ip6_address : format_ip4_address,
-              mp->ip_address,
-              mp->prefix_len);
-
-      fformat(vam->ofp, "%=20s%=16s%=16d%=16d\n",
-              mp->locator_set_name,
-              tmp_str,
-              mp->priority,
-              mp->weight);
+      if (mp->local) {
+        tmp_str = format(tmp_str, "%=16d%=16d%=16d\n",
+                         ntohl(mp->sw_if_index),
+                         mp->priority,
+                         mp->weight);
+      } else {
+        tmp_str = format(tmp_str, "%=16U%=16d%=16d\n",
+                         mp->is_ipv6 ? format_ip6_address :
+                         format_ip4_address,
+                         mp->ip_address,
+                         mp->priority,
+                         mp->weight);
+      }
+
+      fformat(vam->ofp, "%s", tmp_str);
+
       vec_free(tmp_str);
     }
 }
 
 static void
-vl_api_lisp_locator_set_details_t_handler_json (
-    vl_api_lisp_locator_set_details_t *mp)
+vl_api_lisp_locator_details_t_handler_json (
+    vl_api_lisp_locator_details_t *mp)
 {
     vat_main_t *vam = &vat_main;
     vat_json_node_t *node = NULL;
+    locator_msg_t loc;
     struct in6_addr ip6;
     struct in_addr ip4;
 
+    memset(&loc, 0, sizeof(loc));
+    if (vam->noprint_msg) {
+        loc.local = mp->local;
+        loc.priority = mp->priority;
+        loc.weight = mp->weight;
+        if (loc.local) {
+            loc.sw_if_index = ntohl(mp->sw_if_index);
+        } else {
+            loc.is_ipv6 = mp->is_ipv6;
+            clib_memcpy(loc.ip_address, mp->ip_address, sizeof(loc.ip_address));
+        }
+        vec_add1(vam->locator_msg, loc);
+        return;
+    }
+
     if (VAT_JSON_ARRAY != vam->json_tree.type) {
         ASSERT(VAT_JSON_NONE == vam->json_tree.type);
         vat_json_init_array(&vam->json_tree);
@@ -2036,23 +2126,46 @@ vl_api_lisp_locator_set_details_t_handler_json (
     node = vat_json_array_add(&vam->json_tree);
 
     vat_json_init_object(node);
-    vat_json_object_add_string_copy(node, "locator-set", mp->locator_set_name);
+
     if (mp->local) {
-        vat_json_object_add_uint(node, "locator", ntohl(mp->sw_if_index));
+        vat_json_object_add_uint(node, "locator_index", ntohl(mp->sw_if_index));
     } else {
-        if (mp->is_ipv6) {
-            clib_memcpy(&ip6, mp->ip_address, sizeof(ip6));
-            vat_json_object_add_ip6(node, "locator", ip6);
-        } else {
-            clib_memcpy(&ip4, mp->ip_address, sizeof(ip4));
-            vat_json_object_add_ip4(node, "locator", ip4);
-        }
-        vat_json_object_add_uint(node, "prefix-length", mp->prefix_len);
+      if (mp->is_ipv6) {
+        clib_memcpy(&ip6, mp->ip_address, sizeof(ip6));
+        vat_json_object_add_ip6(node, "locator", ip6);
+      } else {
+        clib_memcpy(&ip4, mp->ip_address, sizeof(ip4));
+        vat_json_object_add_ip4(node, "locator", ip4);
+      }
     }
     vat_json_object_add_uint(node, "priority", mp->priority);
     vat_json_object_add_uint(node, "weight", mp->weight);
 }
 
+static void
+vl_api_lisp_locator_set_details_t_handler (
+    vl_api_lisp_locator_set_details_t *mp)
+{
+    vat_main_t *vam = &vat_main;
+    locator_set_msg_t ls;
+
+    ls.locator_set_index = ntohl(mp->locator_set_index);
+    ls.locator_set_name = format(0, "%s", mp->locator_set_name);
+    vec_add1(vam->locator_set_msg, ls);
+}
+
+static void
+vl_api_lisp_locator_set_details_t_handler_json (
+    vl_api_lisp_locator_set_details_t *mp)
+{
+    vat_main_t *vam = &vat_main;
+    locator_set_msg_t ls;
+
+    ls.locator_set_index = ntohl(mp->locator_set_index);
+    ls.locator_set_name = format(0, "%s", mp->locator_set_name);
+    vec_add1(vam->locator_set_msg, ls);
+}
+
 static void
 vl_api_lisp_local_eid_table_details_t_handler (
     vl_api_lisp_local_eid_table_details_t *mp)
@@ -2133,16 +2246,18 @@ vl_api_lisp_local_eid_table_details_t_handler_json (
       {
       case 0:
         clib_memcpy(&ip4, mp->eid, sizeof(ip4));
-        vat_json_object_add_ip4(node, "eid-address", ip4);
+        vat_json_object_add_ip4(node, "eid", ip4);
+        vat_json_object_add_uint(node, "eid-prefix-len", mp->eid_prefix_len);
         break;
       case 1:
         clib_memcpy(&ip6, mp->eid, sizeof(ip6));
-        vat_json_object_add_ip6(node, "eid-address", ip6);
+        vat_json_object_add_ip6(node, "eid", ip6);
+        vat_json_object_add_uint(node, "eid-prefix-len", mp->eid_prefix_len);
         break;
       case 2:
         s = format (0, "%U", format_ethernet_address, mp->eid);
         vec_add1(s, 0);
-        vat_json_object_add_string_copy(node, "eid-address", s);
+        vat_json_object_add_string_copy(node, "eid", s);
         vec_free(s);
         break;
       default:
@@ -2150,7 +2265,6 @@ vl_api_lisp_local_eid_table_details_t_handler_json (
         return;
       }
     vat_json_object_add_uint(node, "vni", clib_net_to_host_u32 (mp->vni));
-    vat_json_object_add_uint(node, "eid-prefix-len", mp->eid_prefix_len);
 }
 
 static u8 *
@@ -2286,22 +2400,28 @@ vl_api_lisp_map_resolver_details_t_handler_json (
 }
 
 static void
-vl_api_lisp_enable_disable_status_details_t_handler
-(vl_api_lisp_enable_disable_status_details_t *mp)
+vl_api_show_lisp_status_reply_t_handler
+(vl_api_show_lisp_status_reply_t * mp)
 {
     vat_main_t *vam = &vat_main;
+    i32 retval = ntohl(mp->retval);
 
-    fformat(vam->ofp, "feature: %s\ngpe: %s\n",
-            mp->feature_status ? "enabled" : "disabled",
-            mp->gpe_status ? "enabled" : "disabled");
+    if (0 <= retval) {
+      fformat(vam->ofp, "feature: %s\ngpe: %s\n",
+              mp->feature_status ? "enabled" : "disabled",
+              mp->gpe_status ? "enabled" : "disabled");
+    }
+
+    vam->retval = retval;
+    vam->result_ready = 1;
 }
 
 static void
-vl_api_lisp_enable_disable_status_details_t_handler_json
-(vl_api_lisp_enable_disable_status_details_t *mp)
+vl_api_show_lisp_status_reply_t_handler_json
+(vl_api_show_lisp_status_reply_t *mp)
 {
     vat_main_t *vam = &vat_main;
-    vat_json_node_t *node = NULL;
+    vat_json_node_t node;
     u8 * gpe_status = NULL;
     u8 * feature_status = NULL;
 
@@ -2311,18 +2431,18 @@ vl_api_lisp_enable_disable_status_details_t_handler_json
     vec_add1 (gpe_status, 0);
     vec_add1 (feature_status, 0);
 
-    if (VAT_JSON_ARRAY != vam->json_tree.type) {
-        ASSERT(VAT_JSON_NONE == vam->json_tree.type);
-        vat_json_init_array(&vam->json_tree);
-    }
-    node = vat_json_array_add(&vam->json_tree);
-
-    vat_json_init_object(node);
-    vat_json_object_add_string_copy(node, "gpe_status", gpe_status);
-    vat_json_object_add_string_copy(node, "feature_status", feature_status);
+    vat_json_init_object(&node);
+    vat_json_object_add_string_copy(&node, "gpe_status", gpe_status);
+    vat_json_object_add_string_copy(&node, "feature_status", feature_status);
 
     vec_free (gpe_status);
     vec_free (feature_status);
+
+    vat_json_print(vam->ofp, &node);
+    vat_json_free(&node);
+
+    vam->retval = ntohl(mp->retval);
+    vam->result_ready = 1;
 }
 
 static void
@@ -2513,8 +2633,8 @@ static void vl_api_policer_details_t_handler
              format_policer_type, mp->type,
              ntohl(mp->cir),
              ntohl(mp->eir),
-             ntohl(mp->cb),
-             ntohl(mp->eb),
+             clib_net_to_host_u64(mp->cb),
+             clib_net_to_host_u64(mp->eb),
              format_policer_rate_type, mp->rate_type,
              format_policer_round_type, mp->round_type,
              mp->single_rate ? "single" : "dual",
@@ -2691,6 +2811,42 @@ static void vl_api_classify_table_by_interface_reply_t_handler_json (vl_api_clas
     vam->result_ready = 1;
 }
 
+static void vl_api_policer_add_del_reply_t_handler
+(vl_api_policer_add_del_reply_t * mp)
+{
+    vat_main_t * vam = &vat_main;
+    i32 retval = ntohl(mp->retval);
+    if (vam->async_mode) {
+        vam->async_errors += (retval < 0);
+    } else {
+        vam->retval = retval;
+        vam->result_ready = 1;
+        if (retval == 0 && mp->policer_index != 0xFFFFFFFF)
+            /*
+             * Note: this is just barely thread-safe, depends on
+             * the main thread spinning waiting for an answer...
+             */
+            errmsg ("policer index %d\n", ntohl(mp->policer_index));
+    }
+}
+
+static void vl_api_policer_add_del_reply_t_handler_json
+(vl_api_policer_add_del_reply_t * mp)
+{
+    vat_main_t * vam = &vat_main;
+    vat_json_node_t node;
+
+    vat_json_init_object(&node);
+    vat_json_object_add_int(&node, "retval", ntohl(mp->retval));
+    vat_json_object_add_uint(&node, "policer_index", ntohl(mp->policer_index));
+
+    vat_json_print(vam->ofp, &node);
+    vat_json_free(&node);
+
+    vam->retval = ntohl(mp->retval);
+    vam->result_ready = 1;
+}
+
 /* Format hex dump. */
 u8 * format_hex_bytes (u8 * s, va_list * va)
 {
@@ -2811,6 +2967,33 @@ static void vl_api_pg_create_interface_reply_t_handler_json
     vam->result_ready = 1;
 }
 
+static void vl_api_policer_classify_details_t_handler
+(vl_api_policer_classify_details_t * mp)
+{
+    vat_main_t * vam = &vat_main;
+
+    fformat (vam->ofp, "%10d%20d\n", ntohl(mp->sw_if_index),
+             ntohl(mp->table_index));
+}
+
+static void vl_api_policer_classify_details_t_handler_json
+(vl_api_policer_classify_details_t * mp)
+{
+    vat_main_t * vam = &vat_main;
+    vat_json_node_t * node;
+
+    if (VAT_JSON_ARRAY != vam->json_tree.type) {
+        ASSERT(VAT_JSON_NONE == vam->json_tree.type);
+        vat_json_init_array(&vam->json_tree);
+    }
+    node = vat_json_array_add(&vam->json_tree);
+
+    vat_json_init_object(node);
+    vat_json_object_add_uint(node, "sw_if_index", ntohl(mp->sw_if_index));
+    vat_json_object_add_uint(node, "table_index", ntohl(mp->table_index));
+}
+
+
 #define vl_api_vnet_ip4_fib_counters_t_endian vl_noop_handler
 #define vl_api_vnet_ip4_fib_counters_t_print vl_noop_handler
 #define vl_api_vnet_ip6_fib_counters_t_endian vl_noop_handler
@@ -2909,7 +3092,7 @@ _(lisp_add_del_map_request_itr_rlocs_reply)             \
 _(lisp_eid_table_add_del_map_reply)                     \
 _(vxlan_gpe_add_del_tunnel_reply)                      \
 _(af_packet_delete_reply)                               \
-_(policer_add_del_reply)                                \
+_(policer_classify_set_interface_reply)                 \
 _(netmap_create_reply)                                  \
 _(netmap_delete_reply)                                  \
 _(ipfix_enable_reply)                                   \
@@ -2958,6 +3141,7 @@ _(SW_INTERFACE_DETAILS, sw_interface_details)                           \
 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags)                       \
 _(SW_INTERFACE_SET_FLAGS_REPLY, sw_interface_set_flags_reply)           \
 _(CONTROL_PING_REPLY, control_ping_reply)                               \
+_(NOPRINT_CONTROL_PING_REPLY, noprint_control_ping_reply)               \
 _(CLI_REPLY, cli_reply)                                                 \
 _(SW_INTERFACE_ADD_DEL_ADDRESS_REPLY,                                   \
   sw_interface_add_del_address_reply)                                   \
@@ -3093,12 +3277,12 @@ _(LISP_PITR_SET_LOCATOR_SET_REPLY, lisp_pitr_set_locator_set_reply)     \
 _(LISP_EID_TABLE_ADD_DEL_MAP_REPLY, lisp_eid_table_add_del_map_reply)   \
 _(LISP_GPE_ADD_DEL_IFACE_REPLY, lisp_gpe_add_del_iface_reply)           \
 _(LISP_LOCATOR_SET_DETAILS, lisp_locator_set_details)                   \
+_(LISP_LOCATOR_DETAILS, lisp_locator_details)                           \
 _(LISP_LOCAL_EID_TABLE_DETAILS, lisp_local_eid_table_details)           \
 _(LISP_EID_TABLE_MAP_DETAILS, lisp_eid_table_map_details)               \
 _(LISP_GPE_TUNNEL_DETAILS, lisp_gpe_tunnel_details)                     \
 _(LISP_MAP_RESOLVER_DETAILS, lisp_map_resolver_details)                 \
-_(LISP_ENABLE_DISABLE_STATUS_DETAILS,                                   \
-  lisp_enable_disable_status_details)                                   \
+_(SHOW_LISP_STATUS_REPLY, show_lisp_status_reply)                       \
 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY,                             \
   lisp_add_del_map_request_itr_rlocs_reply)                             \
 _(LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY,                                 \
@@ -3108,6 +3292,8 @@ _(AF_PACKET_CREATE_REPLY, af_packet_create_reply)                       \
 _(AF_PACKET_DELETE_REPLY, af_packet_delete_reply)                       \
 _(POLICER_ADD_DEL_REPLY, policer_add_del_reply)                         \
 _(POLICER_DETAILS, policer_details)                                     \
+_(POLICER_CLASSIFY_SET_INTERFACE_REPLY, policer_classify_set_interface_reply) \
+_(POLICER_CLASSIFY_DETAILS, policer_classify_details)                   \
 _(NETMAP_CREATE_REPLY, netmap_create_reply)                             \
 _(NETMAP_DELETE_REPLY, netmap_delete_reply)                             \
 _(MPLS_GRE_TUNNEL_DETAILS, mpls_gre_tunnel_details)                     \
@@ -3176,6 +3362,21 @@ do {                                            \
     return -99;                                 \
 } while(0);
 
+/* W_L: wait for results, with timeout */
+#define W_L(body)                               \
+do {                                            \
+    timeout = vat_time_now (vam) + 1.0;         \
+                                                \
+    while (vat_time_now (vam) < timeout) {      \
+        if (vam->result_ready == 1) {           \
+          (body);                               \
+          return (vam->retval);                 \
+        }                                       \
+    }                                           \
+    vam->noprint_msg = 0;     \
+    return -99;                                 \
+} while(0);
+
 typedef struct {
     u8 * name;
     u32 value;
@@ -7060,6 +7261,20 @@ uword unformat_acl_next_index (unformat_input_t * input, va_list * args)
   return 1;
 }
 
+uword unformat_policer_precolor (unformat_input_t * input, va_list * args)
+{
+  u32 * r = va_arg (*args, u32 *);
+
+  if (unformat (input, "conform-color"))
+    *r = POLICE_CONFORM;
+  else if (unformat (input, "exceed-color"))
+    *r = POLICE_EXCEED;
+  else
+    return 0;
+
+  return 1;
+}
+
 static int api_classify_add_del_table (vat_main_t * vam)
 {
   unformat_input_t * i = vam->input;
@@ -7553,6 +7768,10 @@ static int api_classify_add_del_session (vat_main_t * vam)
         else if (unformat (i, "acl-hit-next %U", unformat_acl_next_index,
                            &hit_next_index))
             ;
+        else if (unformat (i, "policer-hit-next %d", &hit_next_index))
+            ;
+        else if (unformat (i, "%U", unformat_policer_precolor, &opaque_index))
+            ;
         else if (unformat (i, "opaque-index %d", &opaque_index))
             ;
         else if (unformat (i, "skip_n %d", &skip_n_vectors))
@@ -9557,7 +9776,7 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
     vl_api_ipsec_sad_add_del_entry_t *mp;
     f64 timeout;
     u32 sad_id, spi;
-    u8 * ck, * ik;
+    u8 * ck = 0, * ik = 0;
     u8 is_add = 1;
 
     u8 protocol = IPSEC_PROTOCOL_AH;
@@ -9669,7 +9888,7 @@ api_ipsec_sa_set_key (vat_main_t * vam)
     vl_api_ipsec_sa_set_key_t *mp;
     f64 timeout;
     u32 sa_id;
-    u8 * ck, * ik;
+    u8 * ck = 0, * ik = 0;
 
     while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
         if (unformat (i, "sa_id %d", &sa_id))
@@ -10384,6 +10603,14 @@ static int api_get_node_graph (vat_main_t * vam)
     W;
 }
 
+/** Used for transferring locators via VPP API */
+typedef CLIB_PACKED(struct
+{
+    u32 sw_if_index; /**< locator sw_if_index */
+    u8 priority; /**< locator priority */
+    u8 weight;   /**< locator weight */
+}) ls_locator_t;
+
 static int
 api_lisp_add_del_locator_set(vat_main_t * vam)
 {
@@ -10393,6 +10620,8 @@ api_lisp_add_del_locator_set(vat_main_t * vam)
     u8  is_add = 1;
     u8 *locator_set_name = NULL;
     u8  locator_set_name_set = 0;
+    ls_locator_t locator, * locators = 0;
+    u32 sw_if_index, priority, weight;
 
     /* Parse args required to build the message */
     while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
@@ -10400,18 +10629,32 @@ api_lisp_add_del_locator_set(vat_main_t * vam)
             is_add = 0;
         } else if (unformat(input, "locator-set %s", &locator_set_name)) {
             locator_set_name_set = 1;
+        } else if (unformat(input, "sw_if_index %u p %u w %u",
+                            &sw_if_index, &priority, &weight)) {
+            locator.sw_if_index = htonl(sw_if_index);
+            locator.priority = priority;
+            locator.weight = weight;
+            vec_add1(locators, locator);
+        } else if (unformat(input, "iface %U p %u w %u", unformat_sw_if_index,
+                            vam, &sw_if_index, &priority, &weight)) {
+            locator.sw_if_index = htonl(sw_if_index);
+            locator.priority = priority;
+            locator.weight = weight;
+            vec_add1(locators, locator);
         } else
             break;
     }
 
     if (locator_set_name_set == 0) {
         errmsg ("missing locator-set name");
+        vec_free(locators);
         return -99;
     }
 
     if (vec_len(locator_set_name) > 64) {
         errmsg ("locator-set name too long\n");
         vec_free(locator_set_name);
+        vec_free(locators);
         return -99;
     }
     vec_add1(locator_set_name, 0);
@@ -10424,6 +10667,11 @@ api_lisp_add_del_locator_set(vat_main_t * vam)
            vec_len(locator_set_name));
     vec_free(locator_set_name);
 
+    mp->locator_num = vec_len (locators);
+    clib_memcpy (mp->locators, locators,
+                 (sizeof (ls_locator_t) * vec_len (locators)));
+    vec_free (locators);
+
     /* send it... */
     S;
 
@@ -11032,17 +11280,18 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
     vl_api_lisp_add_del_remote_mapping_t *mp;
     f64 timeout = ~0;
     u32 vni = 0;
-    ip4_address_t seid4, deid4, rloc4;
-    ip6_address_t seid6, deid6, rloc6;
-    u8 deid_mac[6] = {0};
+    //TODO: seid need remove
+    ip4_address_t seid4, eid4, rloc4;
+    ip6_address_t seid6, eid6, rloc6;
+    u8 eid_mac[6] = {0};
     u8 seid_mac[6] = {0};
-    u8 deid_type, seid_type;
-    u32 seid_len = 0, deid_len = 0, len;
+    u8 eid_type;
+    u32 eid_len = 0, len;
     u8 is_add = 1, del_all = 0;
     u32 action = ~0, p, w;
     rloc_t * rlocs = 0, rloc, * curr_rloc = 0;
 
-    seid_type = deid_type =  (u8)~0;
+    eid_type = (u8)~0;
 
     /* Parse args required to build the message */
     while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
@@ -11053,27 +11302,33 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
         } else if (unformat(input, "add")) {
             is_add = 1;
         } else if (unformat(input, "deid %U/%d", unformat_ip4_address,
-                            &deid4, &len)) {
-            deid_type = 0; /* ipv4 */
-            deid_len = len;
+                            &eid4, &len)) {
+            eid_type = 0; /* ipv4 */
+            if (32 < len) {
+              clib_warning ("Deid prefix length to big, %d!", len);
+              return -99;
+            }
+            eid_len = len;
         } else if (unformat(input, "deid %U/%d", unformat_ip6_address,
-                            &deid6, &len)) {
-            deid_type = 1; /* ipv6 */
-            deid_len = len;
+                            &eid6, &len)) {
+            eid_type = 1; /* ipv6 */
+            if (128 < len) {
+              clib_warning ("Deid prefix length to big, %d!", len);
+              return -99;
+            }
+            eid_len = len;
         } else if (unformat(input, "deid %U", unformat_ethernet_address,
-                            deid_mac)) {
-            deid_type = 2; /* mac */
+                            eid_mac)) {
+            eid_type = 2; /* mac */
+            //TODO: Need remove, but first must be remove from CSIT test
         } else if (unformat(input, "seid %U/%d", unformat_ip4_address,
                             &seid4, &len)) {
-            seid_type = 0; /* ipv4 */
-            seid_len = len;
         } else if (unformat(input, "seid %U/%d", unformat_ip6_address,
                             &seid6, &len)) {
-            seid_type = 1; /* ipv6 */
-            seid_len = len;
+          ;
         } else if (unformat(input, "seid %U", unformat_ethernet_address,
                             seid_mac)) {
-            seid_type = 2; /* mac */
+          ;
         } else if (unformat(input, "vni %d", &vni)) {
             ;
         } else if (unformat(input, "p %d w %d", &p, &w)) {
@@ -11101,16 +11356,11 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
         }
     }
 
-    if ((u8)~0 == deid_type) {
+    if ((u8)~0 == eid_type) {
         errmsg ("missing params!");
         return -99;
     }
 
-    if (seid_type != deid_type) {
-        errmsg ("source and destination EIDs are of different types!");
-        return -99;
-    }
-
     if (is_add && (~0 == action)
         && 0 == vec_len (rlocs)) {
           errmsg ("no action set for negative map-reply!");
@@ -11120,24 +11370,20 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
     M(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping);
     mp->is_add = is_add;
     mp->vni = htonl (vni);
-    mp->seid_len = seid_len;
     mp->action = (u8) action;
-    mp->deid_len = deid_len;
+    mp->eid_len = eid_len;
     mp->del_all = del_all;
-    mp->eid_type = deid_type;
+    mp->eid_type = eid_type;
 
     switch (mp->eid_type) {
     case 0:
-        clib_memcpy (mp->seid, &seid4, sizeof (seid4));
-        clib_memcpy (mp->deid, &deid4, sizeof (deid4));
+        clib_memcpy (mp->eid, &eid4, sizeof (eid4));
         break;
     case 1:
-        clib_memcpy (mp->seid, &seid6, sizeof (seid6));
-        clib_memcpy (mp->deid, &deid6, sizeof (deid6));
+        clib_memcpy (mp->eid, &eid6, sizeof (eid6));
         break;
     case 2:
-        clib_memcpy (mp->seid, seid_mac, 6);
-        clib_memcpy (mp->deid, deid_mac, 6);
+        clib_memcpy (mp->eid, eid_mac, 6);
         break;
     default:
         errmsg ("unknown EID type %d!", mp->eid_type);
@@ -11371,33 +11617,326 @@ api_lisp_add_del_map_request_itr_rlocs(vat_main_t * vam)
 }
 
 static int
-api_lisp_locator_set_dump(vat_main_t *vam)
+lisp_locator_dump_send_msg(vat_main_t * vam, u32 locator_set_index, u8 filter)
 {
-    vl_api_lisp_locator_set_dump_t *mp;
+    vl_api_lisp_locator_dump_t *mp;
     f64 timeout = ~0;
 
-    if (!vam->json_output) {
-        fformat(vam->ofp, "%=20s%=16s%=16s%=16s\n",
-                "Locator-set", "Locator", "Priority", "Weight");
-    }
+    M(LISP_LOCATOR_DUMP, lisp_locator_dump);
+
+    mp->locator_set_index = htonl(locator_set_index);
+    mp->filter = filter;
 
-    M(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump);
     /* send it... */
     S;
 
     /* Use a control ping for synchronization */
     {
-        vl_api_control_ping_t * mp;
-        M(CONTROL_PING, control_ping);
-        S;
+      vl_api_noprint_control_ping_t * mp;
+      M(NOPRINT_CONTROL_PING, noprint_control_ping);
+      S;
     }
     /* Wait for a reply... */
     W;
+}
+
+static int
+print_locator_in_locator_set(vat_main_t * vam, u8 filter)
+{
+    locator_set_msg_t * ls;
+    locator_msg_t * loc;
+    u8 * tmp_str = 0;
+    int i = 0, ret = 0;
+
+    vec_foreach(ls, vam->locator_set_msg) {
+        ret = lisp_locator_dump_send_msg(vam, ls->locator_set_index, filter);
+        if (ret) {
+            vec_free(ls->locator_set_name);
+            vec_free(vam->locator_msg);
+            vec_free(vam->locator_set_msg);
+            return ret;
+        }
+
+        tmp_str = format(0, "%=20s%=16d%s", ls->locator_set_name,
+                         ls->locator_set_index,
+                         vec_len(vam->locator_msg) ? "" : "\n");
+        i = 0;
+        vec_foreach(loc, vam->locator_msg) {
+            if (i) {
+                tmp_str = format(tmp_str, "%=37s", " ");
+            }
+            if (loc->local) {
+                tmp_str = format(tmp_str, "%=16d%=16d%=16d\n",
+                                 loc->sw_if_index,
+                                 loc->priority,
+                                 loc->weight);
+            } else {
+                tmp_str = format(tmp_str, "%=16U%=16d%=16d\n",
+                                 loc->is_ipv6 ? format_ip6_address :
+                                 format_ip4_address,
+                                 loc->ip_address,
+                                 loc->priority,
+                                 loc->weight);
+            }
+            i++;
+        }
+
+        fformat(vam->ofp, "%s", tmp_str);
+        vec_free(tmp_str);
+        vec_free(ls->locator_set_name);
+        vec_free(vam->locator_msg);
+    }
+
+    vec_free(vam->locator_set_msg);
+
+    return ret;
+}
+
+static int
+json_locator_in_locator_set(vat_main_t * vam, u8 filter)
+{
+    locator_set_msg_t * ls;
+    locator_msg_t * loc;
+    vat_json_node_t * node = NULL;
+    vat_json_node_t * locator_array;
+    vat_json_node_t * locator;
+    struct in6_addr ip6;
+    struct in_addr ip4;
+    int ret = 0;
+
+    if (!vec_len(vam->locator_set_msg)) {
+        /* just print [] */
+        vat_json_init_array(&vam->json_tree);
+        vat_json_print(vam->ofp, &vam->json_tree);
+        vam->json_tree.type = VAT_JSON_NONE;
+        return ret;
+    }
+
+    if (VAT_JSON_ARRAY != vam->json_tree.type) {
+      ASSERT(VAT_JSON_NONE == vam->json_tree.type);
+      vat_json_init_array(&vam->json_tree);
+    }
+
+    vec_foreach(ls, vam->locator_set_msg) {
+        ret = lisp_locator_dump_send_msg(vam, ls->locator_set_index, filter);
+        if (ret) {
+            vec_free(ls->locator_set_name);
+            vec_free(vam->locator_msg);
+            vec_free(vam->locator_set_msg);
+            vat_json_free(&vam->json_tree);
+            vam->json_tree.type = VAT_JSON_NONE;
+            return ret;
+        }
+
+        node = vat_json_array_add(&vam->json_tree);
+        vat_json_init_object(node);
+
+        vat_json_object_add_uint(node, "locator-set-index",
+                                 ls->locator_set_index);
+        vat_json_object_add_string_copy(node, "locator-set",
+                                        ls->locator_set_name);
+        locator_array = vat_json_object_add_list(node, "locator");
+        vec_foreach(loc, vam->locator_msg) {
+            locator = vat_json_array_add(locator_array);
+            vat_json_init_object(locator);
+            if (loc->local) {
+                vat_json_object_add_uint(locator, "locator-index",
+                                         loc->sw_if_index);
+            } else {
+                if (loc->is_ipv6) {
+                    clib_memcpy(&ip6, loc->ip_address, sizeof(ip6));
+                    vat_json_object_add_ip6(locator, "locator", ip6);
+                } else {
+                    clib_memcpy(&ip4, loc->ip_address, sizeof(ip4));
+                    vat_json_object_add_ip4(locator, "locator", ip4);
+                }
+            }
+            vat_json_object_add_uint(locator, "priority", loc->priority);
+            vat_json_object_add_uint(locator, "weight", loc->weight);
+        }
+
+        vec_free(ls->locator_set_name);
+        vec_free(vam->locator_msg);
+    }
+
+    vat_json_print(vam->ofp, &vam->json_tree);
+    vat_json_free(&vam->json_tree);
+    vam->json_tree.type = VAT_JSON_NONE;
+
+    vec_free(vam->locator_set_msg);
+
+    return ret;
+}
+
+static int
+get_locator_set_index_from_msg(vat_main_t * vam, u8 * locator_set,
+                               u32 * locator_set_index)
+{
+    locator_set_msg_t * ls;
+    int ret = 0;
+
+    * locator_set_index = ~0;
+
+    if (!vec_len(vam->locator_set_msg)) {
+      return ret;
+    }
+
+    vec_foreach(ls, vam->locator_set_msg) {
+        if (!strcmp((char *) locator_set, (char *) ls->locator_set_name)) {
+            * locator_set_index = ls->locator_set_index;
+            vec_free(vam->locator_set_msg);
+            return ret;
+        }
+    }
+
+    vec_free(vam->locator_set_msg);
+
+    return ret;
+}
+
+static int
+get_locator_set_index(vat_main_t * vam, u8 * locator_set,
+                      u32 * locator_set_index)
+{
+    vl_api_lisp_locator_set_dump_t *mp;
+    f64 timeout = ~0;
+
+    M(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump);
+    /* send it... */
+    S;
+
+   /* Use a control ping for synchronization */
+   {
+     vl_api_noprint_control_ping_t * mp;
+     M(NOPRINT_CONTROL_PING, noprint_control_ping);
+     S;
+   }
+
+   vam->noprint_msg = 1;
+    /* Wait for a reply... */
+    W_L({
+      get_locator_set_index_from_msg(vam, locator_set, locator_set_index);
+      vam->noprint_msg = 0;
+    })
+
+    /* NOTREACHED */
+    return 0;
+}
+
+static inline int
+lisp_locator_dump(vat_main_t * vam, u32 locator_set_index, u8 * locator_set,
+                  u8 filter)
+{
+    int ret = 0;
+
+    ASSERT(vam);
+
+    if (!vam->json_output) {
+      fformat(vam->ofp, "%=20s%=16s%=16s\n",
+              "locator", "priority", "weight");
+    }
+
+    if (locator_set) {
+      ret = get_locator_set_index(vam, locator_set, &locator_set_index);
+    }
+
+    if (!ret && ~0 == locator_set_index) {
+      return -99;
+    }
+
+    ret = lisp_locator_dump_send_msg(vam, locator_set_index, filter);
+
+    return ret;
+}
+
+static int
+lisp_locator_set_dump(vat_main_t * vam, u8 filter)
+{
+    vl_api_lisp_locator_set_dump_t *mp;
+    f64 timeout = ~0;
+
+    if (!vam->json_output) {
+        fformat(vam->ofp, "%=20s%=16s%=16s%=16s%=16s\n",
+                "locator-set", "locator-set-index", "locator", "priority",
+                "weight");
+    }
+
+    vam->noprint_msg = 1;
+
+    M(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump);
+
+    mp->filter = filter;
+
+    /* send it... */
+    S;
+
+   /* Use a control ping for synchronization */
+   {
+     vl_api_noprint_control_ping_t * mp;
+     M(NOPRINT_CONTROL_PING, noprint_control_ping);
+     S;
+   }
+
+    /* Wait for a reply... */
+    W_L({
+      if (vam->noprint_msg) {
+          if (!vam->json_output) {
+              print_locator_in_locator_set(vam, filter);
+          } else {
+              json_locator_in_locator_set(vam, filter);
+          }
+      }
+
+      vam->noprint_msg = 0;
+    });
 
     /* NOTREACHED */
     return 0;
 }
 
+static int
+api_lisp_locator_set_dump(vat_main_t *vam)
+{
+    unformat_input_t * input = vam->input;
+    vam->noprint_msg = 0;
+    u32 locator_set_index = ~0;
+    u8 locator_set_index_set = 0;
+    u8 * locator_set = 0;
+    u8 locator_set_set = 0;
+    u8 filter = 0;
+    int ret = 0;
+
+    /* Parse args required to build the message */
+    while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
+        if (unformat(input, "locator-set-index %u", &locator_set_index)) {
+            locator_set_index_set = 1;
+        } else if (unformat(input, "locator-set %s", &locator_set)) {
+            locator_set_set = 1;
+        } else if (unformat(input, "local")) {
+            filter = 1;
+        } else if (unformat(input, "remote")) {
+            filter = 2;
+        } else {
+            break;
+        }
+    }
+
+    if (locator_set_index_set && locator_set_set) {
+        errmsg ("use only input parameter!\n");
+        return -99;
+    }
+
+    if (locator_set_index_set || locator_set_set) {
+        ret = lisp_locator_dump(vam, locator_set_index, locator_set, filter);
+    } else {
+        ret = lisp_locator_set_dump(vam, filter);
+    }
+
+    vec_free(locator_set);
+
+    return ret;
+}
+
 static int
 api_lisp_eid_table_map_dump(vat_main_t *vam)
 {
@@ -11435,7 +11974,7 @@ api_lisp_local_eid_table_dump(vat_main_t *vam)
     struct in_addr ip4;
     struct in6_addr ip6;
     u8 mac[6];
-    u8 eid_type = ~0, eid_set;
+    u8 eid_type = ~0, eid_set = 0;
     u32 prefix_length = ~0, t, vni = 0;
 
     while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
@@ -11563,9 +12102,9 @@ api_lisp_map_resolver_dump(vat_main_t *vam)
 }
 
 static int
-api_lisp_enable_disable_status_dump(vat_main_t *vam)
+api_show_lisp_status(vat_main_t *vam)
 {
-    vl_api_lisp_enable_disable_status_dump_t *mp;
+    vl_api_show_lisp_status_t *mp;
     f64 timeout = ~0;
 
     if (!vam->json_output) {
@@ -11573,17 +12112,9 @@ api_lisp_enable_disable_status_dump(vat_main_t *vam)
                 "lisp status", "locator-set");
     }
 
-    M(LISP_ENABLE_DISABLE_STATUS_DUMP,
-      lisp_enable_disable_status_dump);
+    M(SHOW_LISP_STATUS, show_lisp_status);
     /* send it... */
     S;
-
-    /* Use a control ping for synchronization */
-    {
-        vl_api_control_ping_t * mp;
-        M(CONTROL_PING, control_ping);
-        S;
-    }
     /* Wait for a reply... */
     W;
 
@@ -11705,6 +12236,7 @@ api_policer_add_del (vat_main_t * vam)
     u8 rate_type = 0;
     u8 round_type = 0;
     u8 type = 0;
+    u8 color_aware = 0;
     sse2_qos_pol_action_params_st conform_action, exceed_action, violate_action;
 
     while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
@@ -11737,6 +12269,8 @@ api_policer_add_del (vat_main_t * vam)
         else if (unformat (i, "violate_action %U", unformat_policer_action_type,
                            &violate_action))
             ;
+        else if (unformat (i, "color-aware"))
+            color_aware = 1;
         else
           break;
     }
@@ -11769,6 +12303,7 @@ api_policer_add_del (vat_main_t * vam)
     mp->exceed_dscp = exceed_action.dscp;
     mp->violate_action_type = violate_action.action_type;
     mp->violate_dscp = violate_action.dscp;
+    mp->color_aware = color_aware;
 
     S; W;
     /* NOTREACHED */
@@ -11812,6 +12347,93 @@ api_policer_dump(vat_main_t *vam)
     return 0;
 }
 
+static int
+api_policer_classify_set_interface (vat_main_t * vam)
+{
+    unformat_input_t * i = vam->input;
+    vl_api_policer_classify_set_interface_t *mp;
+    f64 timeout;
+    u32 sw_if_index;
+    int sw_if_index_set;
+    u32 ip4_table_index = ~0;
+    u32 ip6_table_index = ~0;
+    u32 l2_table_index = ~0;
+    u8 is_add = 1;
+
+    while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) {
+       if (unformat (i, "%U", unformat_sw_if_index, vam, &sw_if_index))
+            sw_if_index_set = 1;
+       else if (unformat (i, "sw_if_index %d", &sw_if_index))
+           sw_if_index_set = 1;
+        else if (unformat (i, "del"))
+            is_add = 0;
+       else if (unformat (i, "ip4-table %d", &ip4_table_index))
+           ;
+       else if (unformat (i, "ip6-table %d", &ip6_table_index))
+           ;
+       else if (unformat (i, "l2-table %d", &l2_table_index))
+           ;
+        else {
+            clib_warning ("parse error '%U'", format_unformat_error, i);
+            return -99;
+        }
+    }
+
+    if (sw_if_index_set == 0) {
+        errmsg ("missing interface name or sw_if_index\n");
+        return -99;
+    }
+
+    M(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface);
+
+    mp->sw_if_index = ntohl(sw_if_index);
+    mp->ip4_table_index = ntohl(ip4_table_index);
+    mp->ip6_table_index = ntohl(ip6_table_index);
+    mp->l2_table_index = ntohl(l2_table_index);
+    mp->is_add = is_add;
+
+    S; W;
+    /* NOTREACHED */
+    return 0;
+}
+
+static int
+api_policer_classify_dump(vat_main_t *vam)
+{
+    unformat_input_t * i = vam->input;
+    vl_api_policer_classify_dump_t *mp;
+    f64 timeout = ~0;
+    u8 type = POLICER_CLASSIFY_N_TABLES;
+
+    if (unformat (i, "type %U", unformat_classify_table_type, &type))
+        ;
+    else {
+        errmsg ("classify table type must be specified\n");
+        return -99;
+    }
+
+    if (!vam->json_output) {
+        fformat(vam->ofp, "%10s%20s\n", "Intfc idx", "Classify table");
+    }
+
+    M(POLICER_CLASSIFY_DUMP, policer_classify_dump);
+    mp->type = type;
+    /* send it... */
+    S;
+
+    /* Use a control ping for synchronization */
+    {
+        vl_api_control_ping_t * mp;
+        M(CONTROL_PING, control_ping);
+        S;
+    }
+    /* Wait for a reply... */
+    W;
+
+    /* NOTREACHED */
+    return 0;
+}
+
 static int
 api_netmap_create (vat_main_t * vam)
 {
@@ -12849,8 +13471,9 @@ _(classify_add_del_table,                                               \
   "[del] mask <mask-value>\n"                                          \
   " [l2-miss-next | miss-next | acl-miss-next] <name|nn>")             \
 _(classify_add_del_session,                                             \
-  "[hit-next|l2-hit-next|acl-hit-next] <name|nn> table-index <nn>\n"    \
-  "skip_n <nn> match_n <nn> match [hex] [l2] [l3 [ip4|ip6]]")          \
+  "[hit-next|l2-hit-next|acl-hit-next|policer-hit-next] <name|nn>\n"    \
+  "  table-index <nn> skip_n <nn> match_n <nn> match [hex] [l2]\n"      \
+  "  [l3 [ip4|ip6]]")                                                  \
 _(classify_set_interface_ip_table,                                      \
   "<intfc> | sw_if_index <nn> table <nn>")                             \
 _(classify_set_interface_l2_tables,                                     \
@@ -12951,11 +13574,14 @@ _(trace_profile_add, "id <nn> trace-type <0x1f|0x3|0x9|0x11|0x19> "     \
 _(trace_profile_apply, "id <nn> <ip6-address>/<width>"                  \
   " vrf_id <nn>  add | pop | none")                                     \
 _(trace_profile_del, "")                                                \
-_(lisp_add_del_locator_set, "locator-set <locator_name> [del]")         \
+_(lisp_add_del_locator_set, "locator-set <locator_name> [iface <intf> |"\
+                            " sw_if_index <sw_if_index> p <priority> "  \
+                            "w <weight>] [del]")                        \
 _(lisp_add_del_locator, "locator-set <locator_name> "                   \
                         "iface <intf> | sw_if_index <sw_if_index> "     \
                         "p <priority> w <weight> [del]")                \
-_(lisp_add_del_local_eid, "<ipv4|ipv6>/<prefix> "                       \
+_(lisp_add_del_local_eid,"vni <vni> eid "                               \
+                         "<ipv4|ipv6>/<prefix> | <L2 address> "         \
                           "locator-set <locator_name> [del]")           \
 _(lisp_gpe_add_del_fwd_entry, "eid <ip4|6-addr>/<prefix> "              \
     "sloc <ip4/6-addr> dloc <ip4|6-addr> [del]")                        \
@@ -12963,28 +13589,33 @@ _(lisp_add_del_map_resolver, "<ip4|6-addr> [del]")                      \
 _(lisp_gpe_enable_disable, "enable|disable")                            \
 _(lisp_enable_disable, "enable|disable")                                \
 _(lisp_gpe_add_del_iface, "up|down")                                    \
-_(lisp_add_del_remote_mapping, "add|del vni <vni> deid <dest-eid> seid" \
-                               " <src-eid> rloc <locator> p <prio> "    \
+_(lisp_add_del_remote_mapping, "add|del vni <vni> deid <dest-eid> "     \
+                               "rloc <locator> p <prio> "               \
                                "w <weight> [rloc <loc> ... ] "          \
-                               "action <action>")                       \
+                               "action <action> [del-all]")             \
 _(lisp_add_del_adjacency, "add|del vni <vni> deid <dest-eid> seid "     \
                           "<src-eid> rloc <locator> p <prio> w <weight>"\
                           "[rloc <loc> ... ] action <action>")          \
 _(lisp_pitr_set_locator_set, "locator-set <loc-set-name> | del")        \
 _(lisp_add_del_map_request_itr_rlocs, "<loc-set-name> [del]")           \
 _(lisp_eid_table_add_del_map, "[del] vni <vni> vrf <vrf>")              \
-_(lisp_locator_set_dump, "")                                            \
+_(lisp_locator_set_dump, "[locator-set-index <ls-index> | "             \
+                         "locator-set <loc-set-name>] [local | remote]")\
 _(lisp_local_eid_table_dump, "")                                        \
 _(lisp_eid_table_map_dump, "")                                          \
 _(lisp_gpe_tunnel_dump, "")                                             \
 _(lisp_map_resolver_dump, "")                                           \
-_(lisp_enable_disable_status_dump, "")                                  \
+_(show_lisp_status, "")                                                 \
 _(lisp_get_map_request_itr_rlocs, "")                                   \
 _(show_lisp_pitr, "")                                                   \
 _(af_packet_create, "name <host interface name> [hw_addr <mac>]")       \
 _(af_packet_delete, "name <host interface name>")                       \
 _(policer_add_del, "name <policer name> <params> [del]")                \
 _(policer_dump, "[name <policer name>]")                                \
+_(policer_classify_set_interface,                                       \
+  "<intfc> | sw_if_index <nn> [ip4-table <nn>] [ip6-table <nn>]\n"      \
+  "  [l2-table <nn>] [del]")                                            \
+_(policer_classify_dump, "type [ip4|ip6|l2]")                           \
 _(netmap_create, "name <interface name> [hw-addr <mac>] [pipe] "        \
     "[master|slave]")                                                   \
 _(netmap_delete, "name <interface name>")                               \