48 epg, sw_if_index, &gpd);
80 return (VNET_API_ERROR_NO_SUCH_FIB);
82 if (is_internal && is_add)
84 else if (!is_internal && is_add)
120 ctx->
cb (table_id, &pfx,
130 ctx->
cb (table_id, &pfx,
155 fib_table_walk(fib_table->ft_index,
157 gbp_subnet_fib_table_walk,
162 fib_table_walk(fib_table->ft_index,
164 gbp_subnet_fib_table_walk,
fib_protocol_t fp_proto
protocol type
static int gbp_internal_subnet_add(u32 fib_index, const fib_prefix_t *pfx)
u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index)
Continue on to the next entry.
void gbp_subnet_walk(gbp_subnet_cb_t cb, void *ctx)
void fib_entry_get_prefix(fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
int(* gbp_subnet_cb_t)(u32 table_id, const fib_prefix_t *pfx, u32 sw_if_index, epg_id_t epg, u8 is_internal, void *ctx)
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
gbp_policy_dpo_t * gbp_policy_dpo_get(index_t index)
static int gbp_external_subnet_add(u32 fib_index, const fib_prefix_t *pfx, u32 sw_if_index, epg_id_t epg)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static fib_table_walk_rc_t gbp_subnet_fib_table_walk(fib_node_index_t fei, void *arg)
A high priority source a plugin can use.
int gbp_subnet_add_del(u32 table_id, const fib_prefix_t *pfx, u32 sw_if_index, epg_id_t epg, u8 is_add, u8 is_internal)
Aggregrate type for a prefix.
u32 gpd_sw_if_index
output sw_if_index
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
dpo_type_t gbp_policy_dpo_get_type(void)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
dpo_type_t dpoi_type
the type
load-balancing over a choice of [un]equal cost paths
const dpo_id_t * load_balance_get_bucket(index_t lbi, u32 bucket)
static int gbp_subnet_del(u32 fib_index, const fib_prefix_t *pfx)
fib_node_index_t fib_table_entry_special_dpo_update(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Update a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the...
dpo_type_t gbp_fwd_dpo_get_type(void)
void gbp_policy_dpo_add_or_lock(dpo_proto_t dproto, epg_id_t epg, u32 sw_if_index, dpo_id_t *dpo)
enum fib_table_walk_rc_t_ fib_table_walk_rc_t
return code controlling how a table walk proceeds
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
void gbp_fwd_dpo_add_or_lock(dpo_proto_t dproto, dpo_id_t *dpo)
u32 fib_node_index_t
A typedef of a node index.
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
struct gbp_subnet_fib_table_walk_ctx_t_ gbp_subnet_fib_table_walk_ctx_t
index_t dpoi_index
the index of objects of that type
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
ip4_main_t ip4_main
Global ip4 main structure.
struct fib_table_t_ * fibs
Vector of FIBs.
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
struct fib_table_t_ * fibs
A protocol Independent FIB table.