refactor: change session key from address list to six tuple

This commit is contained in:
luwenpeng
2023-12-14 15:23:13 +08:00
parent 5620ac211b
commit a232045764
14 changed files with 773 additions and 563 deletions

View File

@@ -13,7 +13,6 @@ extern "C"
#include "timeout.h"
#include "uthash.h"
#include "session.h"
#include "session_address.h"
#define EX_DATA_MAX_COUNT 128
#define SESSION_EVENT_QUEUE_SIZE 256
@@ -27,6 +26,9 @@ struct event_queue
struct session
{
// session id
uint64_t id;
// session state
enum session_state state;
@@ -81,15 +83,13 @@ struct session
******************************/
// session table key
uint64_t id;
struct session_address addr;
struct session_key key;
struct session *next_ptr;
struct session *prev_ptr;
// session table handle
UT_hash_handle hh1; /* handle for root_id hash table */
UT_hash_handle hh2; /* handle for root_addr hash table */
UT_hash_handle hh;
/******************************
* Session Manager Zone