remove session_manager_subscribe_xxx() API; convert session closing events to pseudo packets

when a session is closed, use the packet manager to create a pseudo packet,
    set the session to be closed as packet Exdata, and schedule it to the packet forwarding stage.
    when the pseudo packet free, the session will be free.
This commit is contained in:
luwenpeng
2024-11-18 18:33:19 +08:00
parent 746d7fca06
commit c2e9275a9e
25 changed files with 210 additions and 378 deletions

View File

@@ -48,7 +48,6 @@ struct session
uint64_t timestamps[MAX_TIMESTAMP]; // realtime msec
struct tcp_half tcp_halfs[MAX_FLOW_TYPE];
struct timeout timeout;
struct tcp_segment empty_seg;
TAILQ_ENTRY(session) lru_tqe;
TAILQ_ENTRY(session) free_tqe;
TAILQ_ENTRY(session) evc_tqe;
@@ -120,7 +119,7 @@ void session_set_first_packet(struct session *sess, enum flow_type type, const s
// const struct packet *session_get_first_packet(const struct session *sess, enum flow_type type);
void session_set_current_packet(struct session *sess, const struct packet *pkt);
// const struct packet *session_get_current_packet(const struct session *sess);
const struct packet *session_get_current_packet(const struct session *sess);
// int session_is_symmetric(const struct session *sess, unsigned char *flag);