|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __CNAT_TRANSLATION_H__
17 #define __CNAT_TRANSLATION_H__
79 typedef enum __attribute__ ((__packed__))
@ CNAT_RESOLV_ADDR_BACKEND
u32 sw_if_index
The interface index to resolve.
ip_protocol_t ct_proto
The ip protocol for the translation.
cnat_endpoint_t ct_ep[VLIB_N_DIR]
The EP being tracked.
@ CNAT_TRANSLATION_STACKED
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vlib_combined_counter_main_t cnat_translation_counters
Counters for each translation.
enum cnat_translation_flag_t_ cnat_translation_flag_t
struct cnat_ep_trk_t_ cnat_ep_trk_t
Data used to track an EP in the FIB.
fib_node_index_t ct_fei
The FIB entry for the EP.
struct addr_resolution_t_ addr_resolution_t
Entry used to account for a translation's backend waiting for address resolution.
cnat_endpoint_t ct_vip
The Virtual end point.
cnat_ep_trk_t * ct_paths
The vector of tracked back-ends.
cnat_lb_type_t lb_type
Type of load balancing.
u8 ct_flags
Allows to disable if not resolved yet.
vl_api_cnat_lb_type_t lb_type
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define static_always_inline
u32 fib_node_index_t
A typedef of a node index.
u32 ct_sibling
The sibling on the entry's child list.
index_t ct_cci
The client object this translation belongs on INDEX_INVALID if vip is unresolved.
manual_print typedef address
@ CNAT_TRANSLATION_FLAG_ALLOCATE_PORT
u32 cnat_translation_update(cnat_endpoint_t *vip, ip_protocol_t ip_proto, cnat_endpoint_tuple_t *backends, u8 flags, cnat_lb_type_t lb_type)
create or update a translation
@ CNAT_ADDR_N_RESOLUTIONS
void cnat_translation_register_addr_add_cb(cnat_addr_resol_type_t typ, cnat_if_addr_add_cb_t fn)
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.
void(* cnat_if_addr_add_cb_t)(addr_resolution_t *ar, ip_address_t *address, u8 is_del)
Register a call back for endpoint->address resolution.
walk_rc_t(* cnat_translation_walk_cb_t)(index_t index, void *ctx)
Callback function invoked during a walk of all translations.
void cnat_translation_unwatch_addr(u32 cti, cnat_addr_resol_type_t type)
Cleanup matching addr resolution requests.
u8 * format_cnat_translation(u8 *s, va_list *args)
cnat_addr_resol_type_t type
The cnat_addr_resolution_t.
struct cnat_translation_t_ cnat_translation_t
A Translation represents the translation of a VEP to one of a set of real server addresses.
A collection of combined counters.
fib_node_t ct_node
Linkage into the FIB graph.
cnat_translation_t * cnat_translation_pool
cnat_ep_trk_t * ct_active_paths
The vector of active tracked back-ends.
8 octet key, 8 octet key value pair
void cnat_translation_walk(cnat_translation_walk_cb_t cb, void *ctx)
Walk/visit each of the translations.
ip_address_family_t af
ip4 or ip6 resolution
An node in the FIB graph.
enum ip_protocol ip_protocol_t
index_t index
Own index (if copied for trace)
int cnat_translation_delete(u32 id)
Delete a translation.
clib_bihash_8_8_t cnat_translation_db
@ CNAT_RESOLV_ADDR_TRANSLATION
dpo_id_t ct_lb
The LB used to forward to the backends.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
index_t cti
Translation index.
u8 flags
Translation flags.
enum walk_rc_t_ walk_rc_t
Walk return code.
dpo_id_t ct_dpo
The forwarding contributed by the entry.
vl_api_fib_path_type_t type
static_always_inline cnat_translation_t * cnat_translation_get(index_t cti)
Entry used to account for a translation's backend waiting for address resolution.
A Translation represents the translation of a VEP to one of a set of real server addresses.
Data used to track an EP in the FIB.
enum ip_address_family_t_ ip_address_family_t
static_always_inline cnat_translation_t * cnat_find_translation(index_t cti, u16 port, ip_protocol_t proto)
int cnat_translation_purge(void)
Purge all the trahslations.
vl_api_wireguard_peer_flags_t flags