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

@@ -12,7 +12,7 @@ extern "C"
* session manager = session pool + session table + session timer
*
* session pool : alloc and free session
* session table : find session by session id or session addr
* session table : find session by session key
* session timer : session timeout
* session manager: manage session pool, session table and session timer
*/
@@ -23,10 +23,7 @@ void session_manager_destroy(struct session_manager *mgr);
typedef void (*session_event_cb)(struct session *sess, uint32_t event, void *arg);
void session_manager_set_session_eventcb(struct session_manager *mgr, session_event_cb cb, void *arg);
struct session *session_manager_find_session_by_id(struct session_manager *mgr, uint64_t id);
struct session *session_manager_find_session_by_packet(struct session_manager *mgr, const struct packet *pkt);
struct session *session_manager_find_session(struct session_manager *mgr, const struct packet *pkt);
void session_manager_dispatch(struct session_manager *mgr);
#ifdef __cpluscplus