![]() |
FD.io VPP
v21.01.1
Vector Packet Processing
|
Include dependency graph for session_lookup.c:Go to the source code of this file.
Typedefs | |
| typedef clib_bihash_kv_16_8_t | session_kv4_t |
| typedef clib_bihash_kv_48_8_t | session_kv6_t |
| typedef struct _ip4_session_table_show_ctx_t | ip4_session_table_show_ctx_t |
Variables | |
| static u32 * | fib_index_to_table_index [2] |
| Generate typed init functions for multiple hash table styles... More... | |
| v6_connection_key_t | |
| static vlib_cli_command_t | session_rule_command |
| (constructor) VLIB_CLI_COMMAND (session_rule_command) More... | |
| static vlib_cli_command_t | show_session_rules_command |
| (constructor) VLIB_CLI_COMMAND (show_session_rules_command) More... | |
| typedef struct _ip4_session_table_show_ctx_t ip4_session_table_show_ctx_t |
| typedef clib_bihash_kv_16_8_t session_kv4_t |
Definition at line 77 of file session_lookup.c.
| typedef clib_bihash_kv_48_8_t session_kv6_t |
Definition at line 78 of file session_lookup.c.
| typedef CLIB_PACKED | ( | struct { union { struct { ip4_address_t src;ip4_address_t dst;u16 src_port;u16 dst_port;u32 proto;};u64 as_u64[2];};} | ) |
Definition at line 40 of file session_lookup.c.
Definition at line 1369 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1410 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 107 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 152 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 414 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_add_connection | ( | transport_connection_t * | tc, |
| u64 | value | ||
| ) |
Add transport connection to a session table.
Session lookup 5-tuple (src-ip, dst-ip, src-port, dst-port, session-type) is added to requested session table.
| tc | transport connection to be added |
| value | value to be stored |
Definition at line 229 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_add_half_open | ( | transport_connection_t * | tc, |
| u64 | value | ||
| ) |
Definition at line 779 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_add_session_endpoint | ( | u32 | table_index, |
| session_endpoint_t * | sep, | ||
| u64 | value | ||
| ) |
Definition at line 255 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 401 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| transport_connection_t* session_lookup_connection | ( | u32 | fib_index, |
| ip46_address_t * | lcl, | ||
| ip46_address_t * | rmt, | ||
| u16 | lcl_port, | ||
| u16 | rmt_port, | ||
| u8 | proto, | ||
| u8 | is_ip4 | ||
| ) |
Definition at line 1296 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| transport_connection_t* session_lookup_connection4 | ( | u32 | fib_index, |
| ip4_address_t * | lcl, | ||
| ip4_address_t * | rmt, | ||
| u16 | lcl_port, | ||
| u16 | rmt_port, | ||
| u8 | proto | ||
| ) |
Lookup connection with ip4 and transport layer information.
Not optimized. Lookup logic is identical to that of session_lookup_connection_wt4
| fib_index | index of the fib wherein the connection was received |
| lcl | local ip4 address |
| rmt | remote ip4 address |
| lcl_port | local port |
| rmt_port | remote port |
| proto | transport protocol (e.g., tcp, udp) |
Definition at line 980 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| transport_connection_t* session_lookup_connection6 | ( | u32 | fib_index, |
| ip6_address_t * | lcl, | ||
| ip6_address_t * | rmt, | ||
| u16 | lcl_port, | ||
| u16 | rmt_port, | ||
| u8 | proto | ||
| ) |
Lookup connection with ip6 and transport layer information.
Not optimized. This is used on the fast path so it needs to be fast. Thereby, duplication of code and 'hacks' allowed. Lookup logic is identical to that of session_lookup_connection_wt4
| fib_index | index of the fib wherein the connection was received |
| lcl | local ip6 address |
| rmt | remote ip6 address |
| lcl_port | local port |
| rmt_port | remote port |
| proto | transport protocol (e.g., tcp, udp) |
Definition at line 1197 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| transport_connection_t* session_lookup_connection_wt4 | ( | u32 | fib_index, |
| ip4_address_t * | lcl, | ||
| ip4_address_t * | rmt, | ||
| u16 | lcl_port, | ||
| u16 | rmt_port, | ||
| u8 | proto, | ||
| u32 | thread_index, | ||
| u8 * | result | ||
| ) |
Lookup connection with ip4 and transport layer information.
This is used on the fast path so it needs to be fast. Thereby, duplication of code and 'hacks' allowed.
The lookup is incremental and returns whenever something is matched. The steps are:
| fib_index | index of fib wherein the connection was received |
| lcl | local ip4 address |
| rmt | remote ip4 address |
| lcl_port | local port |
| rmt_port | remote port |
| proto | transport protocol (e.g., tcp, udp) |
| thread_index | thread index for request |
| is_filtered | return flag that indicates if connection was filtered. |
Definition at line 897 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| transport_connection_t* session_lookup_connection_wt6 | ( | u32 | fib_index, |
| ip6_address_t * | lcl, | ||
| ip6_address_t * | rmt, | ||
| u16 | lcl_port, | ||
| u16 | rmt_port, | ||
| u8 | proto, | ||
| u32 | thread_index, | ||
| u8 * | result | ||
| ) |
Lookup connection with ip6 and transport layer information.
This is used on the fast path so it needs to be fast. Thereby, duplication of code and 'hacks' allowed.
The lookup is incremental and returns whenever something is matched. The steps are:
| fib_index | index of the fib wherein the connection was received |
| lcl | local ip6 address |
| rmt | remote ip6 address |
| lcl_port | local port |
| rmt_port | remote port |
| proto | transport protocol (e.g., tcp, udp) |
| thread_index | thread index for request |
Definition at line 1121 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_del_connection | ( | transport_connection_t * | tc | ) |
Delete transport connection from session table.
| table_index | session table index |
| tc | transport connection to be removed |
Definition at line 341 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_del_half_open | ( | transport_connection_t * | tc | ) |
Definition at line 805 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_del_session | ( | session_t * | s | ) |
Definition at line 365 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_del_session_endpoint | ( | u32 | table_index, |
| session_endpoint_t * | sep | ||
| ) |
Definition at line 282 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int session_lookup_del_session_endpoint2 | ( | session_endpoint_t * | sep | ) |
Definition at line 307 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u64 session_lookup_endpoint_listener | ( | u32 | table_index, |
| session_endpoint_t * | sep, | ||
| u8 | use_rules | ||
| ) |
Lookup listener for session endpoint in table.
| table_index | table where the endpoint should be looked up |
| sep | session endpoint to be looked up |
| use_rules | flag that indicates if the session rules of the table should be used |
Definition at line 466 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| transport_connection_t* session_lookup_half_open_connection | ( | u64 | handle, |
| u8 | proto, | ||
| u8 | is_ip4 | ||
| ) |
Definition at line 860 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u64 session_lookup_half_open_handle | ( | transport_connection_t * | tc | ) |
Definition at line 829 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void session_lookup_init | ( | void | ) |
Definition at line 1702 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| session_t* session_lookup_listener | ( | u32 | table_index, |
| session_endpoint_t * | sep | ||
| ) |
Lookup listener, exact or proxy (inaddr_any:0) match.
Definition at line 742 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| session_t* session_lookup_listener4 | ( | u32 | fib_index, |
| ip4_address_t * | lcl, | ||
| u16 | lcl_port, | ||
| u8 | proto, | ||
| u8 | use_wildcard | ||
| ) |
Definition at line 685 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 644 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| session_t* session_lookup_listener6 | ( | u32 | fib_index, |
| ip6_address_t * | lcl, | ||
| u16 | lcl_port, | ||
| u8 | proto, | ||
| u8 | use_wildcard | ||
| ) |
Definition at line 728 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 696 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| session_t* session_lookup_listener_wildcard | ( | u32 | table_index, |
| session_endpoint_t * | sep | ||
| ) |
Lookup listener wildcard match.
Definition at line 761 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u64 session_lookup_local_endpoint | ( | u32 | table_index, |
| session_endpoint_t * | sep | ||
| ) |
Look up endpoint in local session table.
The result, for now, is an application index and it may in the future be extended to a more complicated "action object". The only action we emulate now is "drop" and for that we return a special app index.
Lookup logic is to check in order:
| table_index | table where the lookup should be done |
| sep | session endpoint to be looked up |
Definition at line 538 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| session_t* session_lookup_rules_table_session4 | ( | session_table_t * | st, |
| u8 | proto, | ||
| ip4_address_t * | lcl, | ||
| u16 | lcl_port, | ||
| ip4_address_t * | rmt, | ||
| u16 | rmt_port | ||
| ) |
| session_t* session_lookup_rules_table_session6 | ( | session_table_t * | st, |
| u8 | proto, | ||
| ip6_address_t * | lcl, | ||
| u16 | lcl_port, | ||
| ip6_address_t * | rmt, | ||
| u16 | rmt_port | ||
| ) |
| session_t* session_lookup_safe4 | ( | u32 | fib_index, |
| ip4_address_t * | lcl, | ||
| ip4_address_t * | rmt, | ||
| u16 | lcl_port, | ||
| u16 | rmt_port, | ||
| u8 | proto | ||
| ) |
Lookup session with ip4 and transport layer information.
Important note: this may look into another thread's pool table and register as 'peeker'. Caller should call session_pool_remove_peeker as if needed as soon as possible.
Lookup logic is similar to that of session_lookup_connection_wt4 but this returns a session as opposed to a transport connection and it does not try to lookup half-open sessions.
Typically used by dgram connections
Definition at line 1052 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| session_t* session_lookup_safe6 | ( | u32 | fib_index, |
| ip6_address_t * | lcl, | ||
| ip6_address_t * | rmt, | ||
| u16 | lcl_port, | ||
| u16 | rmt_port, | ||
| u8 | proto | ||
| ) |
Lookup session with ip6 and transport layer information.
Important note: this may look into another thread's pool table and register as 'peeker'. Caller should call session_pool_remove_peeker as if needed as soon as possible.
Lookup logic is similar to that of session_lookup_connection_wt6 but this returns a session as opposed to a transport connection and it does not try to lookup half-open sessions.
Typically used by dgram connections
Definition at line 1260 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void session_lookup_set_tables_appns | ( | app_namespace_t * | app_ns | ) |
Mark (global) tables as pertaining to app ns.
Definition at line 1353 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void session_lookup_show_table_entries | ( | vlib_main_t * | vm, |
| session_table_t * | table, | ||
| u8 | type, | ||
| u8 | is_local | ||
| ) |
Definition at line 1419 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 192 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 202 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 159 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 184 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| int vnet_session_rule_add_del | ( | session_rule_add_del_args_t * | args | ) |
Definition at line 1309 of file session_lookup.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Generate typed init functions for multiple hash table styles...
Network namespace index (i.e., fib index) to session lookup table. We should have one per network protocol type but for now we only support IP4/6
Definition at line 36 of file session_lookup.c.
|
static |
(constructor) VLIB_CLI_COMMAND (session_rule_command)
Definition at line 1561 of file session_lookup.c.
|
static |
(constructor) VLIB_CLI_COMMAND (show_session_rules_command)
Definition at line 1692 of file session_lookup.c.
| v6_connection_key_t |
Definition at line 74 of file session_lookup.c.