FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
session_rules_table.h File Reference
+ Include dependency graph for session_rules_table.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SESSION_RULE_TAG_MAX_LEN   64
 
#define SESSION_RULES_TABLE_INVALID_INDEX   MMA_TABLE_INVALID_INDEX
 
#define SESSION_RULES_TABLE_ACTION_DROP   (MMA_TABLE_INVALID_INDEX - 1)
 
#define SESSION_RULES_TABLE_ACTION_ALLOW   (MMA_TABLE_INVALID_INDEX - 2)
 

Typedefs

typedef struct _session_rules_table_add_del_args session_rule_table_add_del_args_t
 
typedef struct _rule_tag session_rule_tag_t
 
typedef struct _session_rules_table_t session_rules_table_t
 

Functions

typedef CLIB_PACKED (struct { union { struct { ip4_address_t rmt_ip;ip4_address_t lcl_ip;u16 rmt_port;u16 lcl_port;};u64 as_u64[2];};}) session_mask_or_match_4_t
 
typedef CLIB_PACKED (struct { union { struct { ip6_address_t rmt_ip;ip6_address_t lcl_ip;u16 rmt_port;u16 lcl_port;};u64 as_u64[5];};}) session_mask_or_match_6_t
 
u32 session_rules_table_lookup4 (session_rules_table_t *srt, ip4_address_t *lcl_ip, ip4_address_t *rmt_ip, u16 lcl_port, u16 rmt_port)
 
u32 session_rules_table_lookup6 (session_rules_table_t *srt, ip6_address_t *lcl_ip, ip6_address_t *rmt_ip, u16 lcl_port, u16 rmt_port)
 
void session_rules_table_cli_dump (vlib_main_t *vm, session_rules_table_t *srt, u8 fib_proto)
 
void session_rules_table_show_rule (vlib_main_t *vm, session_rules_table_t *srt, ip46_address_t *lcl_ip, u16 lcl_port, ip46_address_t *rmt_ip, u16 rmt_port, u8 is_ip4)
 
int session_rules_table_add_del (session_rules_table_t *srt, session_rule_table_add_del_args_t *args)
 Add/delete session rule. More...
 
u8session_rules_table_rule_tag (session_rules_table_t *srt, u32 ri, u8 is_ip4)
 
void session_rules_table_init (session_rules_table_t *srt)
 

Macro Definition Documentation

◆ SESSION_RULE_TAG_MAX_LEN

#define SESSION_RULE_TAG_MAX_LEN   64

Definition at line 57 of file session_rules_table.h.

◆ SESSION_RULES_TABLE_ACTION_ALLOW

#define SESSION_RULES_TABLE_ACTION_ALLOW   (MMA_TABLE_INVALID_INDEX - 2)

Definition at line 60 of file session_rules_table.h.

◆ SESSION_RULES_TABLE_ACTION_DROP

#define SESSION_RULES_TABLE_ACTION_DROP   (MMA_TABLE_INVALID_INDEX - 1)

Definition at line 59 of file session_rules_table.h.

◆ SESSION_RULES_TABLE_INVALID_INDEX

#define SESSION_RULES_TABLE_INVALID_INDEX   MMA_TABLE_INVALID_INDEX

Definition at line 58 of file session_rules_table.h.

Typedef Documentation

◆ session_rule_table_add_del_args_t

typedef struct _session_rules_table_add_del_args session_rule_table_add_del_args_t

◆ session_rule_tag_t

typedef struct _rule_tag session_rule_tag_t

◆ session_rules_table_t

typedef struct _session_rules_table_t session_rules_table_t

Function Documentation

◆ CLIB_PACKED() [1/2]

typedef CLIB_PACKED ( struct { union { struct { ip4_address_t rmt_ip;ip4_address_t lcl_ip;u16 rmt_port;u16 lcl_port;};u64 as_u64[2];};}  )

◆ CLIB_PACKED() [2/2]

typedef CLIB_PACKED ( struct { union { struct { ip6_address_t rmt_ip;ip6_address_t lcl_ip;u16 rmt_port;u16 lcl_port;};u64 as_u64[5];};}  )

◆ session_rules_table_add_del()

int session_rules_table_add_del ( session_rules_table_t srt,
session_rule_table_add_del_args_t args 
)

Add/delete session rule.

Parameters
srttable where rule should be added
argsrule arguments
Returns
0 if success, clib_error_t error otherwise

Definition at line 392 of file session_rules_table.c.

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

◆ session_rules_table_cli_dump()

void session_rules_table_cli_dump ( vlib_main_t vm,
session_rules_table_t srt,
u8  fib_proto 
)

Definition at line 591 of file session_rules_table.c.

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

◆ session_rules_table_init()

void session_rules_table_init ( session_rules_table_t srt)

Definition at line 517 of file session_rules_table.c.

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

◆ session_rules_table_lookup4()

u32 session_rules_table_lookup4 ( session_rules_table_t srt,
ip4_address_t lcl_ip,
ip4_address_t rmt_ip,
u16  lcl_port,
u16  rmt_port 
)

Definition at line 334 of file session_rules_table.c.

+ Here is the caller graph for this function:

◆ session_rules_table_lookup6()

u32 session_rules_table_lookup6 ( session_rules_table_t srt,
ip6_address_t *  lcl_ip,
ip6_address_t *  rmt_ip,
u16  lcl_port,
u16  rmt_port 
)

Definition at line 368 of file session_rules_table.c.

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

◆ session_rules_table_rule_tag()

u8* session_rules_table_rule_tag ( session_rules_table_t srt,
u32  ri,
u8  is_ip4 
)

Definition at line 37 of file session_rules_table.c.

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

◆ session_rules_table_show_rule()

void session_rules_table_show_rule ( vlib_main_t vm,
session_rules_table_t srt,
ip46_address_t *  lcl_ip,
u16  lcl_port,
ip46_address_t *  rmt_ip,
u16  rmt_port,
u8  is_ip4 
)

Definition at line 546 of file session_rules_table.c.

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