summaryrefslogtreecommitdiffstats
path: root/xrdp/parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'xrdp/parse.h')
-rw-r--r--xrdp/parse.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/xrdp/parse.h b/xrdp/parse.h
index 605486b6..05d0e4b3 100644
--- a/xrdp/parse.h
+++ b/xrdp/parse.h
@@ -35,6 +35,7 @@ struct stream
char* sec_hdr;
char* rdp_hdr;
char* channel_hdr;
+ char* next_packet;
};
#define s_check(s) (s->p <= s->end)
@@ -43,6 +44,11 @@ struct stream
#define s_check_end(s) (s->p == s->end)
+#define make_stream(s) \
+{ \
+ s = (struct stream*)g_malloc(sizeof(struct stream), 1); \
+} \
+
#define init_stream(s, v) \
{ \
if (v > s->size) \
@@ -53,8 +59,16 @@ struct stream
s->p = s->data; \
s->end = s->data; \
s->size = v; \
+ s->next_packet = 0; \
}
+#define free_stream(s) \
+{ \
+ if (s != 0) \
+ g_free(s->data); \
+ g_free(s); \
+} \
+
#define s_push_layer(s, h, n) \
{ \
s->h = s->p; \