FreeRDP
tpkt.h
1 
20 #ifndef FREERDP_LIB_CORE_TPKT_H
21 #define FREERDP_LIB_CORE_TPKT_H
22 
23 #include "tpdu.h"
24 #include "transport.h"
25 
26 #include <winpr/stream.h>
27 #include <freerdp/api.h>
28 
29 #define TPKT_HEADER_LENGTH 4
30 
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);
36 
37 #endif /* FREERDP_LIB_CORE_TPKT_H */