![]() |
FD.io VPP
v17.07.01-10-g3be13f0
Vector Packet Processing
|
NAT64 DB. More...
Include dependency graph for nat64_db.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | nat64_db_bib_entry_key_t |
| struct | nat64_db_bib_t |
| struct | nat64_db_st_entry_key_t |
| struct | nat64_db_st_t |
| struct | nat64_db_t |
Typedefs | |
| typedef int(* | nat64_db_bib_walk_fn_t) (nat64_db_bib_entry_t *bibe, void *ctx) |
| Call back function when walking NAT64 BIB, non-zero return value stop walk. More... | |
| typedef int(* | nat64_db_st_walk_fn_t) (nat64_db_st_entry_t *ste, void *ctx) |
| Call back function when walking NAT64 session table, non-zero return value stop walk. More... | |
Functions | |
| typedef | CLIB_PACKED (struct{ip6_address_t in_addr;u16 in_port;ip4_address_t out_addr;u16 out_port;u32 fib_index;u32 ses_num;u8 proto;u8 is_static;}) nat64_db_bib_entry_t |
| typedef | CLIB_PACKED (struct{ip6_address_t in_r_addr;ip4_address_t out_r_addr;u16 r_port;u32 bibe_index;u32 expire;u8 proto;u8 tcp_state;}) nat64_db_st_entry_t |
| int | nat64_db_init (nat64_db_t *db) |
| Initialize NAT64 DB. More... | |
| nat64_db_bib_entry_t * | nat64_db_bib_entry_create (nat64_db_t *db, ip6_address_t *in_addr, ip4_address_t *out_addr, u16 in_port, u16 out_port, u32 fib_index, snat_protocol_t proto, u8 is_static) |
| Create new NAT64 BIB entry. More... | |
| void | nat64_db_bib_entry_free (nat64_db_t *db, nat64_db_bib_entry_t *bibe) |
| Free NAT64 BIB entry. More... | |
| void | nat64_db_bib_walk (nat64_db_t *db, snat_protocol_t proto, nat64_db_bib_walk_fn_t fn, void *ctx) |
| Walk NAT64 BIB. More... | |
| nat64_db_bib_entry_t * | nat64_db_bib_entry_find (nat64_db_t *db, ip46_address_t *addr, u16 port, snat_protocol_t proto, u32 fib_index, u8 is_ip6) |
| Find NAT64 BIB entry. More... | |
| nat64_db_bib_entry_t * | nat64_db_bib_entry_by_index (nat64_db_t *db, snat_protocol_t proto, u32 bibe_index) |
| Get BIB entry by index and protocol. More... | |
| nat64_db_st_entry_t * | nat64_db_st_entry_create (nat64_db_t *db, nat64_db_bib_entry_t *bibe, ip6_address_t *in_r_addr, ip4_address_t *out_r_addr, u16 r_port) |
| Create new NAT64 session table entry. More... | |
| void | nat64_db_st_entry_free (nat64_db_t *db, nat64_db_st_entry_t *ste) |
| Free NAT64 session table entry. More... | |
| nat64_db_st_entry_t * | nat64_db_st_entry_find (nat64_db_t *db, ip46_address_t *l_addr, ip46_address_t *r_addr, u16 l_port, u16 r_port, snat_protocol_t proto, u32 fib_index, u8 is_ip6) |
| Find NAT64 session table entry. More... | |
| void | nat64_db_st_walk (nat64_db_t *db, snat_protocol_t proto, nat64_db_st_walk_fn_t fn, void *ctx) |
| Walk NAT64 session table. More... | |
| void | nad64_db_st_free_expired (nat64_db_t *db, u32 now) |
| Free expired session entries in session tables. More... | |
NAT64 DB.
Definition in file nat64_db.h.
| typedef int(* nat64_db_bib_walk_fn_t) (nat64_db_bib_entry_t *bibe, void *ctx) |
Call back function when walking NAT64 BIB, non-zero return value stop walk.
Definition at line 167 of file nat64_db.h.
| typedef int(* nat64_db_st_walk_fn_t) (nat64_db_st_entry_t *ste, void *ctx) |
Call back function when walking NAT64 session table, non-zero return value stop walk.
Definition at line 260 of file nat64_db.h.
| typedef CLIB_PACKED | ( | struct{ip6_address_t in_addr;u16 in_port;ip4_address_t out_addr;u16 out_port;u32 fib_index;u32 ses_num;u8 proto;u8 is_static;} | ) |
| typedef CLIB_PACKED | ( | struct{ip6_address_t in_r_addr;ip4_address_t out_r_addr;u16 r_port;u32 bibe_index;u32 expire;u8 proto;u8 tcp_state;} | ) |
| void nad64_db_st_free_expired | ( | nat64_db_t * | db, |
| u32 | now | ||
| ) |
Free expired session entries in session tables.
| db | NAT64 DB. |
| now | Current time. |
Definition at line 487 of file nat64_db.c.
Here is the caller graph for this function:| nat64_db_bib_entry_t* nat64_db_bib_entry_by_index | ( | nat64_db_t * | db, |
| snat_protocol_t | proto, | ||
| u32 | bibe_index | ||
| ) |
Get BIB entry by index and protocol.
| db | NAT64 DB. |
| proto | L4 protocol. |
| bibe_index | BIB entry index. |
Definition at line 243 of file nat64_db.c.
Here is the caller graph for this function:| nat64_db_bib_entry_t* nat64_db_bib_entry_create | ( | nat64_db_t * | db, |
| ip6_address_t * | in_addr, | ||
| ip4_address_t * | out_addr, | ||
| u16 | in_port, | ||
| u16 | out_port, | ||
| u32 | fib_index, | ||
| snat_protocol_t | proto, | ||
| u8 | is_static | ||
| ) |
Create new NAT64 BIB entry.
| db | NAT64 DB. |
| in_addr | Inside IPv6 address. |
| out_addr | Outside IPv4 address. |
| in_port | Inside port number. |
| out_port | Outside port number. |
| fib_index | FIB index. |
| proto | L4 protocol. |
| is_static | 1 if static, 0 if dynamic. |
Definition at line 45 of file nat64_db.c.
Here is the caller graph for this function:| nat64_db_bib_entry_t* nat64_db_bib_entry_find | ( | nat64_db_t * | db, |
| ip46_address_t * | addr, | ||
| u16 | port, | ||
| snat_protocol_t | proto, | ||
| u32 | fib_index, | ||
| u8 | is_ip6 | ||
| ) |
Find NAT64 BIB entry.
| db | NAT64 DB. |
| addr | IP address. |
| port | Port number. |
| proto | L4 protocol. |
| fib_index | FIB index. |
| is_ip6 | 1 if find by IPv6 (inside) address, 0 by IPv4 (outside). |
Definition at line 171 of file nat64_db.c.
Here is the caller graph for this function:| void nat64_db_bib_entry_free | ( | nat64_db_t * | db, |
| nat64_db_bib_entry_t * | bibe | ||
| ) |
Free NAT64 BIB entry.
| db | NAT64 DB. |
| bibe | BIB entry. |
Definition at line 105 of file nat64_db.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void nat64_db_bib_walk | ( | nat64_db_t * | db, |
| snat_protocol_t | proto, | ||
| nat64_db_bib_walk_fn_t | fn, | ||
| void * | ctx | ||
| ) |
Walk NAT64 BIB.
| db | NAT64 DB. |
| proto | BIB protocol (TCP/UDP/ICMP). |
| fn | The function to invoke on each entry visited. |
| ctx | A context passed in the visit function. |
Definition at line 213 of file nat64_db.c.
Here is the caller graph for this function:| int nat64_db_init | ( | nat64_db_t * | db | ) |
Initialize NAT64 DB.
| db | NAT64 DB. |
Definition at line 22 of file nat64_db.c.
Here is the caller graph for this function:| nat64_db_st_entry_t* nat64_db_st_entry_create | ( | nat64_db_t * | db, |
| nat64_db_bib_entry_t * | bibe, | ||
| ip6_address_t * | in_r_addr, | ||
| ip4_address_t * | out_r_addr, | ||
| u16 | r_port | ||
| ) |
Create new NAT64 session table entry.
| db | NAT64 DB. |
| bibe | Corresponding BIB entry. |
| in_r_addr | Inside IPv6 address of the remote host. |
| out_r_addr | Outside IPv4 address of the remote host. |
| r_port | Remote host port number. |
Definition at line 297 of file nat64_db.c.
Here is the caller graph for this function:| nat64_db_st_entry_t* nat64_db_st_entry_find | ( | nat64_db_t * | db, |
| ip46_address_t * | l_addr, | ||
| ip46_address_t * | r_addr, | ||
| u16 | l_port, | ||
| u16 | r_port, | ||
| snat_protocol_t | proto, | ||
| u32 | fib_index, | ||
| u8 | is_ip6 | ||
| ) |
Find NAT64 session table entry.
| db | NAT64 DB. |
| l_addr | Local host address. |
| r_addr | Remote host address. |
| l_port | Local host port number. |
| r_port | Remote host port number. |
| proto | L4 protocol. |
| fib_index | FIB index. |
| is_ip6 | 1 if find by IPv6 (inside) address, 0 by IPv4 (outside). |
Definition at line 439 of file nat64_db.c.
Here is the caller graph for this function:| void nat64_db_st_entry_free | ( | nat64_db_t * | db, |
| nat64_db_st_entry_t * | ste | ||
| ) |
Free NAT64 session table entry.
| db | NAT64 DB. |
| ste | Session table entry. |
Definition at line 370 of file nat64_db.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void nat64_db_st_walk | ( | nat64_db_t * | db, |
| snat_protocol_t | proto, | ||
| nat64_db_st_walk_fn_t | fn, | ||
| void * | ctx | ||
| ) |
Walk NAT64 session table.
| db | NAT64 DB. |
| proto | Session table protocol (TCP/UDP/ICMP). |
| fn | The function to invoke on each entry visited. |
| ctx | A context passed in the visit function. |
Definition at line 267 of file nat64_db.c.
Here is the caller graph for this function: