TSG-13837 支持decrypted traffic steering/mirroring,并重构packet_io
This commit is contained in:
@@ -21,8 +21,8 @@ struct session_node
|
||||
uint64_t session_id; /* first key */
|
||||
struct addr_tuple4 session_addr; /* second key */
|
||||
|
||||
void *val_data;
|
||||
fn_free_cb *val_freecb;
|
||||
void *value;
|
||||
fn_free_cb *value_free_cb;
|
||||
|
||||
UT_hash_handle hh1; /* handle for first hash table */
|
||||
UT_hash_handle hh2; /* handle for second hash table */
|
||||
@@ -36,10 +36,10 @@ void session_table_reset(struct session_table *table);
|
||||
uint64_t session_table_count(struct session_table *table);
|
||||
|
||||
// session_addr : deep copy
|
||||
// val_data : shallow copy (malloc by user, free by val_freecb)
|
||||
// value : shallow copy (malloc by user, free by value_free_cb)
|
||||
// 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 addr_tuple4 *session_addr, void *value, const fn_free_cb *value_free_cb);
|
||||
|
||||
// return 0 : success
|
||||
// return -1 : key not exists
|
||||
|
||||
Reference in New Issue
Block a user