aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/classify/classify.api
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-02-07 11:37:02 +0100
committerJohn Lo <loj@cisco.com>2018-02-07 18:01:09 +0000
commit815d7d5637fbffd20bf81c74fd59dac8e4fe4d94 (patch)
tree2e7fef7406a2df664b8d3e16d9336e6d59a255ab /src/vnet/classify/classify.api
parentdac03527f64216e132953a1a1d47b414e6841c68 (diff)
classifier-based ACL: refactor + add output ACL
For implementation of MACIP ACLs enhancement (VPP-1088), an outbound classifier-based ACL would be needed. There was an existing incomplete code for outbound ACLs, it looked almost exact copy of input ACLs, minus the various enhancements, trying to sync that code seemed error-prone and cumbersome to maintain in the longer run. This change refactors the input+output ACLs processing into a unified routine (thus any changes will have effect on both), and also adds the API to set the output interface ACL, with the same format and semantics as the existing input one (except working on output ACL of course). WARNING: IP outbound ACL in L3 mode clobbers the ip.* fields in the vnet_buffer_opaque_t, since the code is using l2_classify.* The net_buffer (p0)->ip.save_rewrite_length is rescued into l2_classify.pad.l2_len, and used to rewind the header in case of drop, so that ipX_drop prints something sensible. Change-Id: I62f814f1e3650e504474a3a5359edb8a0a8836ed Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/vnet/classify/classify.api')
-rw-r--r--src/vnet/classify/classify.api22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/vnet/classify/classify.api b/src/vnet/classify/classify.api
index c22d6104704..7320d5ffa90 100644
--- a/src/vnet/classify/classify.api
+++ b/src/vnet/classify/classify.api
@@ -384,6 +384,28 @@ autoreply define input_acl_set_interface
u8 is_add;
};
+/** \brief Set/unset output ACL interface
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param sw_if_index - interface to set/unset output ACL
+ @param ip4_table_index - ip4 classify table index (~0 for skip)
+ @param ip6_table_index - ip6 classify table index (~0 for skip)
+ @param l2_table_index - l2 classify table index (~0 for skip)
+ @param is_add - Set output ACL if non-zero, else unset
+ Note: User is recommeneded to use just one valid table_index per call.
+ (ip4_table_index, ip6_table_index, or l2_table_index)
+*/
+autoreply define output_acl_set_interface
+{
+ u32 client_index;
+ u32 context;
+ u32 sw_if_index;
+ u32 ip4_table_index;
+ u32 ip6_table_index;
+ u32 l2_table_index;
+ u8 is_add;
+};
+
/*
* Local Variables:
* eval: (c-set-style "gnu")