aboutsummaryrefslogtreecommitdiffstats
path: root/epan/reassemble.h
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-14 14:42:05 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-14 14:42:05 +0000
commitc766e78cfa1527ed242580b808635b0b5966cf3e (patch)
tree7a4318d94e33c292936eb8cffca5e5ff31e73c55 /epan/reassemble.h
parentd924325d37c8724a447f76f8789063580bd86876 (diff)
Rewrite reassemble API to use TVBs instead of raw data.
(it seems to be working for TCP ^^) svn path=/trunk/; revision=50580
Diffstat (limited to 'epan/reassemble.h')
-rw-r--r--epan/reassemble.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/epan/reassemble.h b/epan/reassemble.h
index 833b545a64..62efa3fc79 100644
--- a/epan/reassemble.h
+++ b/epan/reassemble.h
@@ -47,8 +47,8 @@
past the end of the datagram */
#define FD_TOOLONGFRAGMENT 0x0010
-/* fragment data not alloc'ed, fd->data pointing to fd_head->data+fd->offset */
-#define FD_NOT_MALLOCED 0x0020
+/* fragment tvb is subset, don't tvb_free() it */
+#define FD_SUBSET_TVB 0x0020
/* this flag is used to request fragment_add to continue the reassembly process */
#define FD_PARTIAL_REASSEMBLY 0x0040
@@ -89,7 +89,7 @@ typedef struct _fragment_data {
guint32 flags; /* XXX - do some of these apply only to reassembly
heads and others only to fragments within
a reassembly? */
- guint8 *data;
+ tvbuff_t *tvb_data;
/*
* Null if the reassembly had no error; non-null if it had
@@ -336,13 +336,12 @@ fragment_get_reassembled_id(reassembly_table *table, const packet_info *pinfo,
/* This will free up all resources and delete reassembly state for this PDU.
* Except if the PDU is completely reassembled, then it would NOT deallocate the
- * buffer holding the reassembled data but instead return the pointer to that
- * buffer.
+ * buffer holding the reassembled data but instead return the TVB
*
* So, if you call fragment_delete and it returns non-NULL, YOU are responsible to
- * g_free() that buffer.
+ * tvb_free() .
*/
-WS_DLL_PUBLIC unsigned char *
+WS_DLL_PUBLIC tvbuff_t *
fragment_delete(reassembly_table *table, const packet_info *pinfo,
const guint32 id, const void *data);