Refactor the session manager using session transformation 2D array & Update test case
This commit is contained in:
@@ -17,11 +17,11 @@ typedef void (*session_free_cb)(struct session *sess, void *arg);
|
||||
void session_table_set_freecb(struct session_table *table, session_free_cb free_cb, void *arg);
|
||||
// return 0: success
|
||||
// return -1: failed
|
||||
int session_table_add_session(struct session_table *table, const struct tuple6 *tuple, struct session *sess);
|
||||
void session_table_del_session(struct session_table *table, const struct tuple6 *tuple);
|
||||
struct session *session_table_find_session(struct session_table *table, const struct tuple6 *tuple);
|
||||
struct session *session_table_find_least_recently_unused_session(struct session_table *table);
|
||||
struct session *session_table_find_least_recently_used_session(struct session_table *table);
|
||||
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_lru(struct session_table *table);
|
||||
struct session *session_table_find_mru(struct session_table *table);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user