|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __CNAT_CLIENT_H__
17 #define __CNAT_CLIENT_H__
88 #define CC_INDEX_INVALID ((u32)(~0))
static_always_inline cnat_client_t * cnat_client_ip6_find(const ip6_address_t *ip)
Find a client from an IP6 address.
int cnat_client_purge(void)
Check all the clients were purged by translation & session purge.
void cnat_client_translation_deleted(index_t cci)
A translation that references this VIP was deleted.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static_always_inline u32 cnat_client_ip4_find_index(const ip4_address_t *ip)
#define clib_atomic_add_fetch(a, b)
static_always_inline u32 cnat_client_cnt_session(cnat_client_t *cc)
Add a session refcnt to this client.
static_always_inline cnat_client_t * cnat_client_ip4_find(const ip4_address_t *ip)
Find a client from an IP4 address.
index_t cnat_client_add(const ip_address_t *ip, u8 flags)
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
struct cnat_client_t_ cnat_client_t
A client is a representation of an IP address behind the NAT.
ip_address_t cc_ip
the client's IP address
dpo_id_t cc_parent
How to send packets to this client post translation.
u32 cc_locks
number of DPO locks
cnat_entry_flag_t
CNat Client (dpo) flags.
void cnat_client_throttle_pool_process()
index_t parent_cci
Parent cnat_client index if cloned via interpose or own index if vanilla client.
u32 session_refcnt
Session refcount for cleanup.
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
void cnat_client_translation_added(index_t cci)
A translation that references this VIP was added.
u32 fib_node_index_t
A typedef of a node index.
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type()
sll srl srl sll sra u16x4 i
#define clib_atomic_sub_fetch(a, b)
void cnat_client_learn(const ip_address_t *addr)
Called in the main thread by RPC from the workers to learn a new client.
cnat_client_t * cnat_client_pool
void cnat_client_free_by_ip(ip46_address_t *addr, u8 af)
#define hash_get_mem(h, key)
u32 tr_refcnt
Translations refcount for cleanup.
static_always_inline u32 cnat_client_uncnt_session(cnat_client_t *cc)
Del a session refcnt to this client.
u8 * format_cnat_client(u8 *s, va_list *args)
fib_node_index_t cc_fei
the FIB entry this client sources
dpo_type_t cnat_client_dpo
static_always_inline cnat_client_t * cnat_client_get(index_t i)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
struct cnat_client_db_t_ cnat_client_db_t
DB of clients.
cnat_client_db_t cnat_client_db
A client is a representation of an IP address behind the NAT.
clib_spinlock_t throttle_lock
vl_api_wireguard_peer_flags_t flags