FreeRDP
pf_channel.h
1 
19 #ifndef SERVER_PROXY_PF_CHANNEL_H_
20 #define SERVER_PROXY_PF_CHANNEL_H_
21 
22 #include <freerdp/server/proxy/proxy_context.h>
23 
25 typedef enum
26 {
27  CHANNEL_TRACKER_PEEK,
28  CHANNEL_TRACKER_PASS,
29  CHANNEL_TRACKER_DROP
30 } ChannelTrackerMode;
31 
32 typedef struct _ChannelStateTracker ChannelStateTracker;
33 typedef PfChannelResult (*ChannelTrackerPeekFn)(ChannelStateTracker* tracker, BOOL first,
34  BOOL lastPacket);
35 
36 void channelTracker_free(ChannelStateTracker* t);
37 
38 WINPR_ATTR_MALLOC(channelTracker_free, 1)
39 ChannelStateTracker* channelTracker_new(pServerStaticChannelContext* channel,
40  ChannelTrackerPeekFn fn, void* data);
41 
42 BOOL channelTracker_setMode(ChannelStateTracker* tracker, ChannelTrackerMode mode);
43 ChannelTrackerMode channelTracker_getMode(ChannelStateTracker* tracker);
44 
45 BOOL channelTracker_setPData(ChannelStateTracker* tracker, proxyData* pdata);
46 proxyData* channelTracker_getPData(ChannelStateTracker* tracker);
47 
48 BOOL channelTracker_setCustomData(ChannelStateTracker* tracker, void* data);
49 void* channelTracker_getCustomData(ChannelStateTracker* tracker);
50 
51 wStream* channelTracker_getCurrentPacket(ChannelStateTracker* tracker);
52 
53 size_t channelTracker_getCurrentPacketSize(ChannelStateTracker* tracker);
54 BOOL channelTracker_setCurrentPacketSize(ChannelStateTracker* tracker, size_t size);
55 
56 PfChannelResult channelTracker_update(ChannelStateTracker* tracker, const BYTE* xdata, size_t xsize,
57  UINT32 flags, size_t totalSize);
58 
59 PfChannelResult channelTracker_flushCurrent(ChannelStateTracker* t, BOOL first, BOOL last,
60  BOOL toBack);
61 
62 BOOL pf_channel_setup_generic(pServerStaticChannelContext* channel);
63 
64 #endif /* SERVER_PROXY_PF_CHANNEL_H_ */