/* reassemble.h
* Declarations of outines for {fragment,segment} reassembly
*
- * $Id: reassemble.h,v 1.17 2003/04/20 08:06:01 guy Exp $
+ * $Id: reassemble.h,v 1.21 2003/12/20 03:21:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* "fragment_data" structure is allocated to refer to the reassembled,
* packet, and:
*
- * if "more_frags" is false, the structure is not added to
- * the hash table, and not given any fragments to refer to,
- * but is just returned;
+ * in "fragment_add_seq_802_11()", if "more_frags" is false,
+ * the structure is not added to the hash table, and not given
+ * any fragments to refer to, but is just returned;
*
- * if "more_frags" is true, this fragment is added to the linked
- * list of fragments for this packet, and the "fragment_data"
- * structure is put into the hash table.
+ * otherwise, this fragment is added to the linked list of fragments
+ * for this packet, and the "fragment_data" structure is put into
+ * the hash table.
*
* Otherwise, this fragment is just added to the linked list of fragments
* for this packet.
*
- * They return a pointer to the head of the fragment data list, and removes
- * that from the fragment hash table if necessary and adds it to the
- * table of reassembled fragments, if we have all the fragments or if
- * this is the only fragment and "more_frags" is false, returns NULL
- * otherwise.
+ * If, after processing this fragment, we have all the fragments, they
+ * remove that from the fragment hash table if necessary and add it
+ * to the table of reassembled fragments, and return a pointer to the
+ * head of the fragment list.
*
- * They assumes frag_number is a block sequence number.
+ * If this is the first fragment we've seen, and "more_frags" is false,
+ * "fragment_add_seq_802_11()" does nothing to the fragment data list,
+ * and returns a pointer to the head of that (empty) list. The other
+ * routines return NULL.
+ *
+ * Otherwise, they return NULL.
+ *
+ * "fragment_add_seq_check()" and "fragment_add_seq_802_11()" assume
+ * frag_number is a block sequence number.
* The bsn for the first block is 0.
*
- * "fragment_add_seq_check()" takes the sequence number as an argument;
* "fragment_add_seq_next()" is for protocols with no sequence number,
* and assumes fragments always appear in sequence.
*/
GHashTable *reassembled_table, guint32 frag_number,
guint32 frag_data_len, gboolean more_frags);
+extern fragment_data *
+fragment_add_seq_802_11(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ guint32 id, GHashTable *fragment_table,
+ GHashTable *reassembled_table, guint32 frag_number,
+ guint32 frag_data_len, gboolean more_frags);
+
extern fragment_data *
fragment_add_seq_next(tvbuff_t *tvb, int offset, packet_info *pinfo, guint32 id,
GHashTable *fragment_table, GHashTable *reassembled_table,
extern unsigned char *
fragment_delete(packet_info *pinfo, guint32 id, GHashTable *fragment_table);
-/*
- * This function adds fragment_data structure to a reassembled-packet
- * hash table, using the frame data structure as the key.
- */
-extern void
-fragment_reassembled(fragment_data *fd_head, packet_info *pinfo,
- GHashTable *reassembled_table);
-
-/* hf_fragment and hf_fragment_error should be FT_FRAMENUM,
- the others should be FT_BOOLEAN
+/* hf_fragment, hf_fragment_error, and hf_reassembled_in should be
+ FT_FRAMENUM, the others should be FT_BOOLEAN
*/
typedef struct _fragment_items {
gint *ett_fragment;
int *hf_fragment_multiple_tails;
int *hf_fragment_too_long_fragment;
int *hf_fragment_error;
+ int *hf_reassembled_in;
char *tag;
} fragment_items;
extern tvbuff_t *
-process_reassembled_data(tvbuff_t *tvb, packet_info *pinfo, char *name,
- fragment_data *fd_head, const fragment_items *frag_items,
- int hf_reassembled_in, gboolean *update_col_infop, proto_tree *tree);
+process_reassembled_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ char *name, fragment_data *fd_head, const fragment_items *fit,
+ gboolean *update_col_infop, proto_tree *tree);
extern gboolean
show_fragment_tree(fragment_data *ipfd_head, const fragment_items *fit,