16 #ifndef __CNAT_TRANSLATION_H__ 17 #define __CNAT_TRANSLATION_H__ 185 key = (proto << 16) | port;
186 key = key << 32 | (
u32) cti;
walk_rc_t(* cnat_translation_walk_cb_t)(index_t index, void *ctx)
Callback function invoked during a walk of all translations.
vl_api_wireguard_peer_flags_t flags
static_always_inline cnat_translation_t * cnat_translation_get(index_t cti)
cnat_translation_t * cnat_translation_pool
ip_protocol_t ct_proto
The ip protocol for the translation.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
int cnat_translation_purge(void)
Purge all the trahslations.
A Translation represents the translation of a VEP to one of a set of real server addresses.
vlib_combined_counter_main_t cnat_translation_counters
Counters for each translation.
int cnat_translation_delete(u32 id)
Delete a translation.
enum walk_rc_t_ walk_rc_t
Walk return code.
#define static_always_inline
cnat_endpoint_t ct_vip
The Virtual end point.
static_always_inline cnat_translation_t * cnat_find_translation(index_t cti, u16 port, ip_protocol_t proto)
enum cnat_translation_flag_t_ cnat_translation_flag_t
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
enum ip_protocol ip_protocol_t
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
index_t ct_cci
The client object this translation belongs on.
struct cnat_ep_trk_t_ cnat_ep_trk_t
Data used to track an EP in the FIB.
dpo_id_t ct_dpo
The forwarding contributed by the entry.
An node in the FIB graph.
cnat_ep_trk_t * ct_paths
The vector of tracked back-ends.
fib_node_t ct_node
Linkage into the FIB graph.
u32 fib_node_index_t
A typedef of a node index.
cnat_endpoint_t ct_ep[VLIB_N_DIR]
The EP being tracked.
8 octet key, 8 octet key value pair
dpo_id_t ct_lb
The LB used to forward to the backends.
clib_bihash_8_8_t cnat_translation_db
u32 cnat_translation_update(const cnat_endpoint_t *vip, ip_protocol_t ip_proto, const cnat_endpoint_tuple_t *backends, u8 flags)
create or update a translation
void cnat_translation_walk(cnat_translation_walk_cb_t cb, void *ctx)
Walk/visit each of the translations.
fib_node_index_t ct_fei
The FIB entry for the EP.
A collection of combined counters.
void cnat_remove_translation_from_db(index_t cci, u16 port, ip_protocol_t proto)
Remove a translation from the bihash.
Data used to track an EP in the FIB.
void cnat_add_translation_to_db(index_t cci, u16 port, ip_protocol_t proto, index_t cti)
Add a translation to the bihash.
u8 * format_cnat_translation(u8 *s, va_list *args)
struct cnat_translation_t_ cnat_translation_t
A Translation represents the translation of a VEP to one of a set of real server addresses.
index_t index
Own index (if copied for trace)
u8 flags
Translation flags.
u32 ct_sibling
The sibling on the entry's child list.