acl: revert acl: api cleanup
[vpp.git] / src / plugins / acl / manual_fns.h
index e00f1ab..f9f42c5 100644 (file)
 #include <vnet/ip/format.h>
 #include <vnet/ethernet/ethernet.h>
 
+#define vl_endianfun            /* define message structures */
+#include <acl/acl_types.api.h>
+#undef vl_endianfun
+
 /* Macro to finish up custom dump fns */
 #define PRINT_S \
     vec_add1 (s, 0);                            \
@@ -150,8 +154,6 @@ vl_api_acl_rule_t_print (vl_api_acl_rule_t * a, void *handle)
   return handle;
 }
 
-
-
 static inline void *
 vl_api_macip_acl_rule_t_print (vl_api_macip_acl_rule_t * a, void *handle)
 {
@@ -227,7 +229,7 @@ vl_api_acl_details_t_print (vl_api_acl_details_t * a, void *handle)
   u32 count = clib_net_to_host_u32 (a->count);
   if (count > 0x100000)
     {
-      s = format (s, "WARN: acl_defails count endianness wrong? Fixup to avoid long loop.\n");
+      s = format (s, "WARN: acl_details count endianness wrong? Fixup to avoid long loop.\n");
       count = a->count;
     }
 
@@ -256,7 +258,7 @@ vl_api_macip_acl_details_t_print (vl_api_macip_acl_details_t * a,
   u32 count = clib_net_to_host_u32 (a->count);
   if (count > 0x100000)
     {
-      s = format (s, "WARN: macip_acl_defails count endianness wrong? Fixup to avoid long loop.\n");
+      s = format (s, "WARN: macip_acl_details count endianness wrong? Fixup to avoid long loop.\n");
       count = a->count;
     }
 
@@ -359,6 +361,30 @@ vl_api_acl_interface_set_acl_list_t_print (vl_api_acl_interface_set_acl_list_t
   return handle;
 }
 
+static inline void *
+vl_api_acl_interface_set_etype_whitelist_t_print (vl_api_acl_interface_set_etype_whitelist_t
+                                          * a, void *handle)
+{
+  u8 *s;
+  int i;
+
+  s = format
+    (0, "SCRIPT: acl_interface_set_etype_whitelist sw_if_index %d count %d\n",
+     clib_net_to_host_u32 (a->sw_if_index), (u32) a->count);
+
+  s = format (s, "    input ");
+
+  for (i = 0; i < a->count; i++)
+    {
+      if (i == a->n_input)
+        s = format (s, "output ");
+      s = format (s, "%x ", clib_net_to_host_u16 (a->whitelist[i]));
+    }
+
+  PRINT_S;
+  return handle;
+}
+
 static inline void *
 vl_api_acl_interface_add_del_t_print (vl_api_acl_interface_add_del_t * a,
                                      void *handle)