aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_contract.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-04 00:35:37 -0700
committerDamjan Marion <dmarion@me.com>2019-04-04 10:27:26 +0000
commit1aa35576ec00ba2acc103c444cd8598d7d3b5dbd (patch)
tree5b9dee0044f2c67fb7275d8de278649bf940a3b3 /src/plugins/gbp/gbp_contract.h
parent070fd4b046265e7aabe3f9e226e769441db18d79 (diff)
GBP: Counters per-contract
Change-Id: I28bb9e3d3ea3a99a9e24801ef5241a0099186108 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_contract.h')
-rw-r--r--src/plugins/gbp/gbp_contract.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/gbp/gbp_contract.h b/src/plugins/gbp/gbp_contract.h
index dff1b445061..c6e9721848e 100644
--- a/src/plugins/gbp/gbp_contract.h
+++ b/src/plugins/gbp/gbp_contract.h
@@ -18,6 +18,16 @@
#include <plugins/gbp/gbp_types.h>
+#define foreach_gbp_policy_error \
+ _(ALLOW_NO_SCLASS, "allow-no-sclass") \
+ _(ALLOW_INTRA, "allow-intra-sclass") \
+ _(ALLOW_A_BIT, "allow-a-bit-set") \
+ _(ALLOW_CONTRACT, "allow-contract") \
+ _(DROP_CONTRACT, "drop-contract") \
+ _(DROP_ETHER_TYPE, "drop-ether-type") \
+ _(DROP_NO_CONTRACT, "drop-no-contract") \
+ _(DROP_NO_DCLASS, "drop-no-dclass")
+
/**
* The key for an Contract
*/
@@ -141,7 +151,8 @@ typedef struct gbp_contract_db_t_
extern int gbp_contract_update (sclass_t sclass,
sclass_t dclass,
u32 acl_index,
- index_t * rules, u16 * allowed_ethertypes);
+ index_t * rules,
+ u16 * allowed_ethertypes, u32 * stats_index);
extern int gbp_contract_delete (sclass_t sclass, sclass_t dclass);
extern index_t gbp_rule_alloc (gbp_rule_action_t action,
@@ -189,6 +200,9 @@ gbp_rule_get (index_t gui)
return (pool_elt_at_index (gbp_rule_pool, gui));
}
+extern vlib_combined_counter_main_t gbp_contract_permit_counters;
+extern vlib_combined_counter_main_t gbp_contract_drop_counters;
+
#endif
/*