20 #ifndef FREERDP_LIB_CORE_TPKT_H
21 #define FREERDP_LIB_CORE_TPKT_H
24 #include "transport.h"
26 #include <winpr/stream.h>
27 #include <freerdp/api.h>
29 #define TPKT_HEADER_LENGTH 4
31 FREERDP_LOCAL
int tpkt_verify_header(
wStream* s);
32 FREERDP_LOCAL BOOL tpkt_read_header(
wStream* s, UINT16* length);
33 FREERDP_LOCAL BOOL tpkt_write_header(
wStream* s,
size_t length);
34 #define tpkt_ensure_stream_consumed(s, length) tpkt_ensure_stream_consumed_((s), (length), __func__)
35 FREERDP_LOCAL BOOL tpkt_ensure_stream_consumed_(
wStream* s,
size_t length,
const char* fkt);