session manager add packet_tag: (PKT_TAG_KEY_SESS, PKT_TAG_VAL_SESS_NEW/FREE/CTRL_MSG/TCP_STREAM)
This commit is contained in:
@@ -17,6 +17,7 @@ struct tcp_segment_internal
|
||||
struct interval_tree_node node;
|
||||
TAILQ_ENTRY(tcp_segment_internal) lru;
|
||||
struct tcp_segment seg;
|
||||
void *user_data;
|
||||
void *data; // flexible array member
|
||||
};
|
||||
|
||||
@@ -66,6 +67,18 @@ void tcp_segment_free(struct tcp_segment *seg)
|
||||
}
|
||||
}
|
||||
|
||||
void tcp_segment_set_user_data(struct tcp_segment *seg, void *user_data)
|
||||
{
|
||||
struct tcp_segment_internal *p = container_of(seg, struct tcp_segment_internal, seg);
|
||||
p->user_data = user_data;
|
||||
}
|
||||
|
||||
void *tcp_segment_get_user_data(const struct tcp_segment *seg)
|
||||
{
|
||||
struct tcp_segment_internal *p = container_of(seg, struct tcp_segment_internal, seg);
|
||||
return p->user_data;
|
||||
}
|
||||
|
||||
struct tcp_reassembly *tcp_reassembly_new(uint64_t max_timeout, uint64_t max_seg_num)
|
||||
{
|
||||
struct tcp_reassembly *tcp_reass = (struct tcp_reassembly *)malloc(sizeof(struct tcp_reassembly));
|
||||
|
||||
Reference in New Issue
Block a user