FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
session_lookup.c File Reference
+ 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
 

Functions

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];};})
 
static void make_v4_ss_kv (session_kv4_t *kv, ip4_address_t *lcl, ip4_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
static void make_v4_listener_kv (session_kv4_t *kv, ip4_address_t *lcl, u16 lcl_port, u8 proto)
 
static void make_v4_proxy_kv (session_kv4_t *kv, ip4_address_t *lcl, u8 proto)
 
static void make_v4_ss_kv_from_tc (session_kv4_t *kv, transport_connection_t *tc)
 
static void make_v6_ss_kv (session_kv6_t *kv, ip6_address_t *lcl, ip6_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
static void make_v6_listener_kv (session_kv6_t *kv, ip6_address_t *lcl, u16 lcl_port, u8 proto)
 
static void make_v6_proxy_kv (session_kv6_t *kv, ip6_address_t *lcl, u8 proto)
 
static void make_v6_ss_kv_from_tc (session_kv6_t *kv, transport_connection_t *tc)
 
static session_table_tsession_table_get_or_alloc (u8 fib_proto, u32 fib_index)
 
static session_table_tsession_table_get_or_alloc_for_connection (transport_connection_t *tc)
 
static session_table_tsession_table_get_for_connection (transport_connection_t *tc)
 
static session_table_tsession_table_get_for_fib_index (u32 fib_proto, u32 fib_index)
 
u32 session_lookup_get_index_for_fib (u32 fib_proto, u32 fib_index)
 
int session_lookup_add_connection (transport_connection_t *tc, u64 value)
 Add transport connection to a session table. More...
 
int session_lookup_add_session_endpoint (u32 table_index, session_endpoint_t *sep, u64 value)
 
int session_lookup_del_session_endpoint (u32 table_index, session_endpoint_t *sep)
 
int session_lookup_del_connection (transport_connection_t *tc)
 Delete transport connection from session table. More...
 
int session_lookup_del_session (session_t *s)
 
static u8 session_lookup_action_index_is_valid (u32 action_index)
 
static u64 session_lookup_action_to_handle (u32 action_index)
 
static session_tsession_lookup_app_listen_session (u32 app_index, u8 fib_proto, u8 transport_proto)
 
static session_tsession_lookup_action_to_session (u32 action_index, u8 fib_proto, u8 transport_proto)
 
session_tsession_lookup_rules_table_session4 (session_table_t *st, u8 proto, ip4_address_t *lcl, u16 lcl_port, ip4_address_t *rmt, u16 rmt_port)
 UNUSED. More...
 
session_tsession_lookup_rules_table_session6 (session_table_t *st, u8 proto, ip6_address_t *lcl, u16 lcl_port, ip6_address_t *rmt, u16 rmt_port)
 UNUSED. More...
 
u64 session_lookup_endpoint_listener (u32 table_index, session_endpoint_t *sep, u8 use_rules)
 Lookup listener for session endpoint in table. More...
 
u64 session_lookup_local_endpoint (u32 table_index, session_endpoint_t *sep)
 Look up endpoint in local session table. More...
 
static session_tsession_lookup_listener4_i (session_table_t *st, ip4_address_t *lcl, u16 lcl_port, u8 proto, u8 use_wildcard)
 
session_tsession_lookup_listener4 (u32 fib_index, ip4_address_t *lcl, u16 lcl_port, u8 proto)
 
static session_tsession_lookup_listener6_i (session_table_t *st, ip6_address_t *lcl, u16 lcl_port, u8 proto, u8 ip_wildcard)
 
session_tsession_lookup_listener6 (u32 fib_index, ip6_address_t *lcl, u16 lcl_port, u8 proto)
 
session_tsession_lookup_listener (u32 table_index, session_endpoint_t *sep)
 Lookup listener, exact or proxy (inaddr_any:0) match. More...
 
session_tsession_lookup_listener_wildcard (u32 table_index, session_endpoint_t *sep)
 Lookup listener wildcard match. More...
 
int session_lookup_add_half_open (transport_connection_t *tc, u64 value)
 
int session_lookup_del_half_open (transport_connection_t *tc)
 
u64 session_lookup_half_open_handle (transport_connection_t *tc)
 
transport_connection_tsession_lookup_half_open_connection (u64 handle, u8 proto, u8 is_ip4)
 
transport_connection_tsession_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. More...
 
transport_connection_tsession_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. More...
 
session_tsession_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. More...
 
transport_connection_tsession_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. More...
 
transport_connection_tsession_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. More...
 
session_tsession_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. More...
 
int vnet_session_rule_add_del (session_rule_add_del_args_t *args)
 
void session_lookup_set_tables_appns (app_namespace_t *app_ns)
 Mark (global) tables as pertaining to app ns. More...
 
u8format_ip4_session_lookup_kvp (u8 *s, va_list *args)
 
static int ip4_session_table_show (clib_bihash_kv_16_8_t *kvp, void *arg)
 
void session_lookup_show_table_entries (vlib_main_t *vm, session_table_t *table, u8 type, u8 is_local)
 
static clib_error_tsession_rule_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void session_lookup_dump_rules_table (u32 fib_index, u8 fib_proto, u8 transport_proto)
 
void session_lookup_dump_local_rules_table (u32 table_index, u8 fib_proto, u8 transport_proto)
 
static clib_error_tshow_session_rules_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void session_lookup_init (void)
 

Variables

static u32fib_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 Documentation

◆ ip4_session_table_show_ctx_t

typedef struct _ip4_session_table_show_ctx_t ip4_session_table_show_ctx_t

◆ session_kv4_t

Definition at line 77 of file session_lookup.c.

◆ session_kv6_t

Definition at line 78 of file session_lookup.c.

Function Documentation

◆ CLIB_PACKED()

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.

◆ format_ip4_session_lookup_kvp()

u8* format_ip4_session_lookup_kvp ( u8 s,
va_list *  args 
)

Definition at line 1330 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ip4_session_table_show()

static int ip4_session_table_show ( clib_bihash_kv_16_8_t kvp,
void *  arg 
)
static

Definition at line 1371 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_v4_listener_kv()

static void make_v4_listener_kv ( session_kv4_t kv,
ip4_address_t lcl,
u16  lcl_port,
u8  proto 
)
inlinestatic

Definition at line 90 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ make_v4_proxy_kv()

static void make_v4_proxy_kv ( session_kv4_t kv,
ip4_address_t lcl,
u8  proto 
)
inlinestatic

Definition at line 99 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ make_v4_ss_kv()

static void make_v4_ss_kv ( session_kv4_t kv,
ip4_address_t lcl,
ip4_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)
inlinestatic

Definition at line 81 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ make_v4_ss_kv_from_tc()

static void make_v4_ss_kv_from_tc ( session_kv4_t kv,
transport_connection_t tc 
)
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:

◆ make_v6_listener_kv()

static void make_v6_listener_kv ( session_kv6_t kv,
ip6_address_t lcl,
u16  lcl_port,
u8  proto 
)
inlinestatic

Definition at line 127 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ make_v6_proxy_kv()

static void make_v6_proxy_kv ( session_kv6_t kv,
ip6_address_t lcl,
u8  proto 
)
inlinestatic

Definition at line 140 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ make_v6_ss_kv()

static void make_v6_ss_kv ( session_kv6_t kv,
ip6_address_t lcl,
ip6_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)
inlinestatic

Definition at line 114 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ make_v6_ss_kv_from_tc()

static void make_v6_ss_kv_from_tc ( session_kv6_t kv,
transport_connection_t tc 
)
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:

◆ session_lookup_action_index_is_valid()

static u8 session_lookup_action_index_is_valid ( u32  action_index)
static

Definition at line 350 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ session_lookup_action_to_handle()

static u64 session_lookup_action_to_handle ( u32  action_index)
static

Definition at line 359 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ session_lookup_action_to_session()

static session_t* session_lookup_action_to_session ( u32  action_index,
u8  fib_proto,
u8  transport_proto 
)
static

Definition at line 388 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_add_connection()

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.

Parameters
tctransport connection to be added
valuevalue to be stored
Returns
non-zero if failure

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:

◆ session_lookup_add_half_open()

int session_lookup_add_half_open ( transport_connection_t tc,
u64  value 
)

Definition at line 753 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_add_session_endpoint()

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:

◆ session_lookup_app_listen_session()

static session_t* session_lookup_app_listen_session ( u32  app_index,
u8  fib_proto,
u8  transport_proto 
)
static

Definition at line 375 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_connection4()

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

Parameters
fib_indexindex of the fib wherein the connection was received
lcllocal ip4 address
rmtremote ip4 address
lcl_portlocal port
rmt_portremote port
prototransport protocol (e.g., tcp, udp)
Returns
pointer to transport connection, if one is found, 0 otherwise

Definition at line 954 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_connection6()

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

Parameters
fib_indexindex of the fib wherein the connection was received
lcllocal ip6 address
rmtremote ip6 address
lcl_portlocal port
rmt_portremote port
prototransport protocol (e.g., tcp, udp)
Returns
pointer to transport connection, if one is found, 0 otherwise

Definition at line 1171 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_connection_wt4()

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:

  • Try to find an established session
  • Try to find a half-open connection
  • Try session rules table
  • Try to find a fully-formed or local source wildcarded (listener bound to all interfaces) listener session
  • return 0
Parameters
fib_indexindex of fib wherein the connection was received
lcllocal ip4 address
rmtremote ip4 address
lcl_portlocal port
rmt_portremote port
prototransport protocol (e.g., tcp, udp)
thread_indexthread index for request
is_filteredreturn flag that indicates if connection was filtered.
Returns
pointer to transport connection, if one is found, 0 otherwise

Definition at line 871 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_connection_wt6()

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:

  • Try to find an established session
  • Try to find a half-open connection
  • Try session rules table
  • Try to find a fully-formed or local source wildcarded (listener bound to all interfaces) listener session
  • return 0
Parameters
fib_indexindex of the fib wherein the connection was received
lcllocal ip6 address
rmtremote ip6 address
lcl_portlocal port
rmt_portremote port
prototransport protocol (e.g., tcp, udp)
thread_indexthread index for request
Returns
pointer to transport connection, if one is found, 0 otherwise

Definition at line 1095 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_del_connection()

int session_lookup_del_connection ( transport_connection_t tc)

Delete transport connection from session table.

Parameters
table_indexsession table index
tctransport connection to be removed
Returns
non-zero if failure

Definition at line 315 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_del_half_open()

int session_lookup_del_half_open ( transport_connection_t tc)

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:

◆ session_lookup_del_session()

int session_lookup_del_session ( session_t s)

Definition at line 339 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_del_session_endpoint()

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:

◆ session_lookup_dump_local_rules_table()

void session_lookup_dump_local_rules_table ( u32  table_index,
u8  fib_proto,
u8  transport_proto 
)

Definition at line 1544 of file session_lookup.c.

+ Here is the call graph for this function:

◆ session_lookup_dump_rules_table()

void session_lookup_dump_rules_table ( u32  fib_index,
u8  fib_proto,
u8  transport_proto 
)

Definition at line 1532 of file session_lookup.c.

+ Here is the call graph for this function:

◆ session_lookup_endpoint_listener()

u64 session_lookup_endpoint_listener ( u32  table_index,
session_endpoint_t sep,
u8  use_rules 
)

Lookup listener for session endpoint in table.

Parameters
table_indextable where the endpoint should be looked up
sepsession endpoint to be looked up
use_rulesflag that indicates if the session rules of the table should be used
Returns
invalid handle if nothing is found, the handle of a valid listener or an action derived handle if a rule is hit

Definition at line 440 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_get_index_for_fib()

u32 session_lookup_get_index_for_fib ( u32  fib_proto,
u32  fib_index 
)

Definition at line 210 of file session_lookup.c.

+ Here is the caller graph for this function:

◆ session_lookup_half_open_connection()

transport_connection_t* session_lookup_half_open_connection ( u64  handle,
u8  proto,
u8  is_ip4 
)

Definition at line 834 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_half_open_handle()

u64 session_lookup_half_open_handle ( transport_connection_t tc)

Definition at line 803 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_init()

void session_lookup_init ( void  )

Definition at line 1663 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_listener()

session_t* session_lookup_listener ( u32  table_index,
session_endpoint_t sep 
)

Lookup listener, exact or proxy (inaddr_any:0) match.

Definition at line 716 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_listener4()

session_t* session_lookup_listener4 ( u32  fib_index,
ip4_address_t lcl,
u16  lcl_port,
u8  proto 
)

Definition at line 659 of file session_lookup.c.

+ Here is the call graph for this function:

◆ session_lookup_listener4_i()

static session_t* session_lookup_listener4_i ( session_table_t st,
ip4_address_t lcl,
u16  lcl_port,
u8  proto,
u8  use_wildcard 
)
inlinestatic

Definition at line 618 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_listener6()

session_t* session_lookup_listener6 ( u32  fib_index,
ip6_address_t lcl,
u16  lcl_port,
u8  proto 
)

Definition at line 702 of file session_lookup.c.

+ Here is the call graph for this function:

◆ session_lookup_listener6_i()

static session_t* session_lookup_listener6_i ( session_table_t st,
ip6_address_t lcl,
u16  lcl_port,
u8  proto,
u8  ip_wildcard 
)
static

Definition at line 670 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_listener_wildcard()

session_t* session_lookup_listener_wildcard ( u32  table_index,
session_endpoint_t sep 
)

Lookup listener wildcard match.

Definition at line 735 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_local_endpoint()

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:

  • the rules in the table (connect acls)
  • session sub-table for a listener
  • session sub-table for a local listener (zeroed addr)
Parameters
table_indextable where the lookup should be done
sepsession endpoint to be looked up
Returns
session handle that can be interpreted as an adjacency

Definition at line 512 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_rules_table_session4()

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 
)

UNUSED.

Definition at line 400 of file session_lookup.c.

+ Here is the call graph for this function:

◆ session_lookup_rules_table_session6()

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 
)

UNUSED.

Definition at line 416 of file session_lookup.c.

+ Here is the call graph for this function:

◆ session_lookup_safe4()

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 1026 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_safe6()

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 1234 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_set_tables_appns()

void session_lookup_set_tables_appns ( app_namespace_t app_ns)

Mark (global) tables as pertaining to app ns.

Definition at line 1314 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_lookup_show_table_entries()

void session_lookup_show_table_entries ( vlib_main_t vm,
session_table_t table,
u8  type,
u8  is_local 
)

Definition at line 1380 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_rule_command_fn()

static clib_error_t* session_rule_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1404 of file session_lookup.c.

+ Here is the call graph for this function:

◆ session_table_get_for_connection()

static session_table_t* session_table_get_for_connection ( transport_connection_t tc)
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:

◆ session_table_get_for_fib_index()

static session_table_t* session_table_get_for_fib_index ( u32  fib_proto,
u32  fib_index 
)
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:

◆ session_table_get_or_alloc()

static session_table_t* session_table_get_or_alloc ( u8  fib_proto,
u32  fib_index 
)
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:

◆ session_table_get_or_alloc_for_connection()

static session_table_t* session_table_get_or_alloc_for_connection ( transport_connection_t tc)
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:

◆ show_session_rules_command_fn()

static clib_error_t* show_session_rules_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1556 of file session_lookup.c.

+ Here is the call graph for this function:

◆ vnet_session_rule_add_del()

int vnet_session_rule_add_del ( session_rule_add_del_args_t args)

Definition at line 1270 of file session_lookup.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ fib_index_to_table_index

u32* fib_index_to_table_index[2]
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.

◆ session_rule_command

vlib_cli_command_t session_rule_command
static
Initial value:
=
{
.path = "session rule",
.short_help = "session rule [add|del] appns <ns_id> proto <proto> "
"<lcl-ip/plen> <lcl-port> <rmt-ip/plen> <rmt-port> action <action>",
}
static clib_error_t * session_rule_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (session_rule_command)

Definition at line 1522 of file session_lookup.c.

◆ show_session_rules_command

vlib_cli_command_t show_session_rules_command
static
Initial value:
=
{
.path = "show session rules",
.short_help = "show session rules [<proto> appns <id> <lcl-ip/plen> "
"<lcl-port> <rmt-ip/plen> <rmt-port> scope <scope>]",
}
static clib_error_t * show_session_rules_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_session_rules_command)

Definition at line 1653 of file session_lookup.c.

◆ v6_connection_key_t

v6_connection_key_t

Definition at line 74 of file session_lookup.c.