summaryrefslogtreecommitdiffstats
path: root/src/plugins/acl
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/acl')
-rw-r--r--src/plugins/acl/acl_types.api4
-rw-r--r--src/plugins/acl/manual_fns.h55
2 files changed, 2 insertions, 57 deletions
diff --git a/src/plugins/acl/acl_types.api b/src/plugins/acl/acl_types.api
index a47c9b3668c..fb58f8851c8 100644
--- a/src/plugins/acl/acl_types.api
+++ b/src/plugins/acl/acl_types.api
@@ -32,7 +32,7 @@
@param tcp_flags_value - if proto==6, mask to AND the TCP flags in the packet with
*/
-typeonly manual_print define acl_rule
+typedef acl_rule
{
u8 is_permit;
u8 is_ipv6;
@@ -77,7 +77,7 @@ typeonly manual_print define acl_rule
@param src_ip_prefix_len - Source prefix length
*/
-typeonly manual_print define macip_acl_rule
+typedef macip_acl_rule
{
u8 is_permit;
u8 is_ipv6;
diff --git a/src/plugins/acl/manual_fns.h b/src/plugins/acl/manual_fns.h
index c592f892272..bc0ad92f3f1 100644
--- a/src/plugins/acl/manual_fns.h
+++ b/src/plugins/acl/manual_fns.h
@@ -121,61 +121,6 @@ format_acl_action(u8 *s, u8 action)
}
static inline void *
-vl_api_acl_rule_t_print (vl_api_acl_rule_t * a, void *handle)
-{
- u8 *s;
-
- s = format (0, " %s ", a->is_ipv6 ? "ipv6" : "ipv4");
- s = format_acl_action (s, a->is_permit);
- s = format (s, " \\\n");
-
- if (a->is_ipv6)
- s = format (s, " src %U/%d dst %U/%d \\\n",
- format_ip6_address, a->src_ip_addr, a->src_ip_prefix_len,
- format_ip6_address, a->dst_ip_addr, a->dst_ip_prefix_len);
- else
- s = format (s, " src %U/%d dst %U/%d \\\n",
- format_ip4_address, a->src_ip_addr, a->src_ip_prefix_len,
- format_ip4_address, a->dst_ip_addr, a->dst_ip_prefix_len);
- s = format (s, " proto %d \\\n", a->proto);
- s = format (s, " sport %d-%d dport %d-%d \\\n",
- clib_net_to_host_u16 (a->srcport_or_icmptype_first),
- clib_net_to_host_u16 (a->srcport_or_icmptype_last),
- clib_net_to_host_u16 (a->dstport_or_icmpcode_first),
- clib_net_to_host_u16 (a->dstport_or_icmpcode_last));
-
- s = format (s, " tcpflags %u mask %u, \\",
- a->tcp_flags_value, a->tcp_flags_mask);
- PRINT_S;
- return handle;
-}
-
-
-
-static inline void *
-vl_api_macip_acl_rule_t_print (vl_api_macip_acl_rule_t * a, void *handle)
-{
- u8 *s;
-
- s = format (0, " %s %s \\\n", a->is_ipv6 ? "ipv6" : "ipv4",
- a->is_permit ? "permit" : "deny");
-
- s = format (s, " src mac %U mask %U \\\n",
- format_ethernet_address, a->src_mac,
- format_ethernet_address, a->src_mac_mask);
-
- if (a->is_ipv6)
- s = format (s, " src ip %U/%d, \\",
- format_ip6_address, a->src_ip_addr, a->src_ip_prefix_len);
- else
- s = format (s, " src ip %U/%d, \\",
- format_ip4_address, a->src_ip_addr, a->src_ip_prefix_len);
-
- PRINT_S;
- return handle;
-}
-
-static inline void *
vl_api_acl_add_replace_t_print (vl_api_acl_add_replace_t * a, void *handle)
{
u8 *s = 0;