Add eviction filter

This commit is contained in:
luwenpeng
2024-01-11 16:46:33 +08:00
parent 76d5fb36bb
commit 02f8d40c1e
23 changed files with 666 additions and 44 deletions

View File

@@ -190,9 +190,32 @@ uint64_t session_get_last_time(const struct session *sess)
}
/******************************************************************************
* session current packet
* session packet
******************************************************************************/
const struct packet *session_get0_c2s_1st_pkt(const struct session *sess)
{
return (const struct packet *)session_get0_ex_data(sess, c2s_1st_pkt_ex);
}
const struct packet *session_get0_s2c_1st_pkt(const struct session *sess)
{
return (const struct packet *)session_get0_ex_data(sess, s2c_1st_pkt_ex);
}
const struct packet *session_get0_1st_pkt(const struct session *sess)
{
const struct packet *c2s_1st_pkt = session_get0_c2s_1st_pkt(sess);
if (c2s_1st_pkt)
{
return c2s_1st_pkt;
}
else
{
return session_get0_s2c_1st_pkt(sess);
}
}
// session current packet
void session_set0_cur_pkt(struct session *sess, const struct packet *pkt)
{