16 #ifndef __CNAT_TRANSLATION_H__ 17 #define __CNAT_TRANSLATION_H__ 95 cnat_addr_resol_type_t
type;
199 cnat_addr_resol_type_t
type);
205 cnat_addr_resol_type_t
type);
225 key = ((
u64) proto << 24) |
port;
226 key = key << 32 | (
u32) cti;
229 rv = clib_bihash_search_inline_2_8_8 (&cnat_translation_db, &bkey, &bvalue);
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.
u32 sw_if_index
The interface index to resolve.
enum walk_rc_t_ walk_rc_t
Walk return code.
u32 cnat_translation_update(cnat_endpoint_t *vip, ip_protocol_t ip_proto, cnat_endpoint_tuple_t *backends, u8 flags)
create or update a translation
#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
vl_api_fib_path_type_t type
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 INDEX_INVALID if vip is unresolved. ...
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.
cnat_addr_resol_type_t type
The cnat_addr_resolution_t.
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.
Entry used to account for a translation's backend waiting for address resolution. ...
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
ip_address_family_t af
ip4 or ip6 resolution
dpo_id_t ct_lb
The LB used to forward to the backends.
clib_bihash_8_8_t cnat_translation_db
void cnat_translation_watch_addr(index_t cti, u64 opaque, cnat_endpoint_t *ep, cnat_addr_resol_type_t type)
Add an address resolution request.
u8 is_active
Allows to disable if not resolved yet.
index_t cti
Translation index.
void cnat_translation_walk(cnat_translation_walk_cb_t cb, void *ctx)
Walk/visit each of the translations.
enum ip_address_family_t_ ip_address_family_t
void cnat_translation_unwatch_addr(u32 cti, cnat_addr_resol_type_t type)
Cleanup matching addr resolution requests.
struct addr_resolution_t_ addr_resolution_t
Entry used to account for a translation's backend waiting for address resolution. ...
fib_node_index_t ct_fei
The FIB entry for the EP.
A collection of combined counters.
Data used to track an EP in the FIB.
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.