Removed the ambiguous session_get0_current_payload() API. It is unclear whether the original packet payload or TCP reassembled payload is obtained.
It is recommended to: * Use packet_get_payload() to obtain the original packet payload * Use tcp_segment_get_data() to obtain the reassembled data
This commit is contained in:
@@ -251,4 +251,28 @@ uint32_t tcp_reassembly_get_recv_next(struct tcp_reassembly *assembler)
|
||||
}
|
||||
|
||||
return assembler->recv_next;
|
||||
}
|
||||
|
||||
const char *tcp_segment_get_data(const struct tcp_segment *seg)
|
||||
{
|
||||
if (seg == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (const char *)seg->data;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t tcp_segment_get_len(const struct tcp_segment *seg)
|
||||
{
|
||||
if (seg == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return seg->len;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user