16 #ifndef __GBP_CONTRACT_H__ 17 #define __GBP_CONTRACT_H__ 53 #define foreach_gbp_hash_mode \ 56 _(SYMMETRIC, "symmetric") 60 #define _(v,s) GBP_HASH_MODE_##v, 65 #define foreach_gbp_rule_action \ 68 _(REDIRECT, "redirect") 72 #define _(v,s) GBP_RULE_##v, 77 #define foreach_gbp_policy_node \ 84 #define _(v,s) GBP_POLICY_NODE_##v, 88 #define GBP_POLICY_N_NODES (GBP_POLICY_NODE_IP6+1) 90 #define FOR_EACH_GBP_POLICY_NODE(pnode) \ 91 for (pnode = GBP_POLICY_NODE_L2; pnode < GBP_POLICY_N_NODES; pnode++) u16 * gc_allowed_ethertypes
An ethertype whitelist.
gbp_contract_key_t gc_key
source and destination EPGs
struct gbp_next_hop_t_ gbp_next_hop_t
struct gbp_rule_t_ gbp_rule_t
struct gbp_contract_key_t_ gbp_contract_key_t
The key for an Contract.
#define FIB_PROTOCOL_IP_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements...
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
EPG src,dst pair to ACL mapping table, aka contract DB.
static gbp_rule_t * gbp_rule_get(index_t gui)
struct gbp_contract_db_t_ gbp_contract_db_t
EPG src,dst pair to ACL mapping table, aka contract DB.
void gbp_contract_walk(gbp_contract_cb_t bgpe, void *ctx)
gbp_contract_db_t gbp_contract_db
DP functions and databases.
u16 allowed_ethertypes[n_ether_types]
int gbp_contract_delete(epg_id_t src_epg, epg_id_t dst_epg)
uword * gc_hash
We can form a u64 key from the pair, so use a simple hash table.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
gbp_rule_t * gbp_rule_pool
#define foreach_gbp_policy_node
index_t * gc_rules
The ACL to apply for packets from the source to the destination EPG.
gbp_rule_action_t gu_action
#define GBP_POLICY_N_NODES
vl_api_gbp_next_hop_t nhs[8]
An node in the FIB graph.
u8 * format_gbp_contract(u8 *s, va_list *args)
enum gbp_hash_mode_t_ gbp_hash_mode_t
index_t gbp_next_hop_alloc(const ip46_address_t *ip, index_t grd, const mac_address_t *mac, index_t gbd)
epg_id_t gck_src
source and destination EPGs for which the ACL applies
vl_api_gbp_rule_t rules[n_rules]
struct gbp_contract_t_ gbp_contract_t
A Group Based Policy Contract.
static gbp_contract_t * gbp_contract_get(index_t gci)
index_t gbp_rule_alloc(gbp_rule_action_t action, gbp_hash_mode_t hash_mode, index_t *nhs)
enum gbp_rule_action_t_ gbp_rule_action_t
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
#define foreach_gbp_rule_action
#define foreach_gbp_hash_mode
enum gbp_policy_node_t_ gbp_policy_node_t
gbp_hash_mode_t gu_hash_mode
gbp_contract_t * gbp_contract_pool
static index_t gbp_contract_find(gbp_contract_key_t *key)
A Group Based Policy Contract.
int gbp_contract_update(epg_id_t src_epg, epg_id_t dst_epg, u32 acl_index, index_t *rules, u16 *allowed_ethertypes)
int(* gbp_contract_cb_t)(gbp_contract_t *gbpe, void *ctx)