TSG-18285 TFE的Packet IO模块支持重复流量识别
This commit is contained in:
@@ -10,7 +10,7 @@ extern "C"
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "uthash.h"
|
||||
#include "tfe_addr_tuple4.h"
|
||||
#include "tuple.h"
|
||||
|
||||
// Note: session_addr must be initialized by memset(0) before use !!!
|
||||
|
||||
@@ -19,7 +19,7 @@ typedef void fn_free_cb(void *args);
|
||||
struct session_node
|
||||
{
|
||||
uint64_t session_id; /* first key */
|
||||
struct addr_tuple4 session_addr; /* second key */
|
||||
struct tuple4 session_addr; /* second key */
|
||||
|
||||
void *val_data;
|
||||
fn_free_cb *val_freecb;
|
||||
@@ -39,17 +39,17 @@ uint64_t session_table_count(struct session_table *table);
|
||||
// val_data : shallow copy (malloc by user, free by val_freecb)
|
||||
// return 0 : suceess
|
||||
// return -1 : key exists
|
||||
int session_table_insert(struct session_table *table, uint64_t session_id, const struct addr_tuple4 *session_addr, void *val_data, const fn_free_cb *val_freecb);
|
||||
int session_table_insert(struct session_table *table, uint64_t session_id, const struct tuple4 *session_addr, void *val_data, const fn_free_cb *val_freecb);
|
||||
|
||||
// return 0 : success
|
||||
// return -1 : key not exists
|
||||
int session_table_delete_by_id(struct session_table *table, uint64_t session_id);
|
||||
int session_table_delete_by_addr(struct session_table *table, const struct addr_tuple4 *session_addr);
|
||||
int session_table_delete_by_addr(struct session_table *table, const struct tuple4 *session_addr);
|
||||
|
||||
// return NULL : key not exists
|
||||
// return UnNULL : success
|
||||
struct session_node *session_table_search_by_id(struct session_table *table, uint64_t session_id);
|
||||
struct session_node *session_table_search_by_addr(struct session_table *table, const struct addr_tuple4 *session_addr);
|
||||
struct session_node *session_table_search_by_addr(struct session_table *table, const struct tuple4 *session_addr);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user