diff options
| author | luwenpeng <[email protected]> | 2024-08-01 15:14:47 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-08-01 15:48:27 +0800 |
| commit | 12975e2da7b068acbfd5c43edf673b2ceaa164ac (patch) | |
| tree | 7ff0b9d239b6f7f318b98a09306df1f80d49e008 /include | |
| parent | 776090331eed63788fcf8a16b71cc614ae7bf1a3 (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/stellar/packet.h | 4 | ||||
| -rw-r--r-- | include/stellar/session.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/stellar/packet.h b/include/stellar/packet.h index f3e5713..a540046 100644 --- a/include/stellar/packet.h +++ b/include/stellar/packet.h @@ -47,6 +47,10 @@ struct packet *craft_tcp_packet(const struct packet *origin_pkt, uint32_t tcp_se struct packet *craft_udp_packet(const struct packet *origin_pkt, const char *udp_payload, uint16_t udp_payload_len); struct packet *craft_packet_from_scratch(const struct layer larers[], uint16_t layer_count, const char *payload, uint16_t payload_len); +struct tcp_segment; +const char *tcp_segment_get_data(const struct tcp_segment *seg); +uint16_t tcp_segment_get_len(const struct tcp_segment *seg); + #ifdef __cplusplus } #endif diff --git a/include/stellar/session.h b/include/stellar/session.h index 3a74029..5a2567a 100644 --- a/include/stellar/session.h +++ b/include/stellar/session.h @@ -132,7 +132,6 @@ enum session_type session_get_type(const struct session *sess); enum session_state session_get_current_state(const struct session *sess); const struct packet *session_get0_current_packet(const struct session *sess); -const char *session_get0_current_payload(const struct session *sess, uint16_t *payload_len); enum closing_reason session_get_closing_reason(const struct session *sess); enum session_direction session_get_direction(const struct session *sess); |
