gbp: refactor policy nodes
[vpp.git] / src / plugins / gbp / gbp.h
index 8672fd3..50039b3 100644 (file)
 #ifndef __GBP_H__
 #define __GBP_H__
 
+#include <plugins/acl/exports.h>
+
 #include <plugins/gbp/gbp_types.h>
 #include <plugins/gbp/gbp_endpoint.h>
 #include <plugins/gbp/gbp_endpoint_group.h>
-#include <plugins/gbp/gbp_contract.h>
 #include <plugins/gbp/gbp_subnet.h>
 #include <plugins/gbp/gbp_recirc.h>
 
+typedef struct
+{
+  u32 gbp_acl_user_id;
+  acl_plugin_methods_t acl_plugin;
+} gbp_main_t;
+
+extern gbp_main_t gbp_main;
+
+typedef enum gbp_policy_type_t_
+{
+  GBP_POLICY_PORT,
+  GBP_POLICY_MAC,
+  GBP_POLICY_LPM,
+  GBP_N_POLICY
+#define GBP_N_POLICY GBP_N_POLICY
+} gbp_policy_type_t;
+
+/**
+ * Grouping of global data for the GBP source EPG classification feature
+ */
+typedef struct gbp_policy_main_t_
+{
+  /**
+   * Next nodes for L2 output features
+   */
+  u32 l2_output_feat_next[GBP_N_POLICY][32];
+} gbp_policy_main_t;
+
+extern gbp_policy_main_t gbp_policy_main;
+
 #endif
 
 /*