session table can search session by tuple6 or tuple4 or id

This commit is contained in:
luwenpeng
2024-04-24 11:39:15 +08:00
parent 74f0504d3d
commit 476c5bac56
5 changed files with 233 additions and 105 deletions

View File

@@ -19,7 +19,9 @@ void session_table_set_freecb(struct session_table *table, session_free_cb free_
// return -1: failed
int session_table_add(struct session_table *table, const struct tuple6 *tuple, struct session *sess);
void session_table_del(struct session_table *table, const struct tuple6 *tuple);
struct session *session_table_find_tuple(struct session_table *table, const struct tuple6 *tuple);
struct session *session_table_find_sessid(struct session_table *table, uint64_t id);
struct session *session_table_find_tuple6(struct session_table *table, const struct tuple6 *tuple);
struct session *session_table_find_tuple4(struct session_table *table, const struct tuple4 *tuple);
struct session *session_table_find_lru(struct session_table *table);
#ifdef __cplusplus