aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-gsmtap.c10
-rw-r--r--epan/dissectors/packet-lapdm.c7
2 files changed, 14 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gsmtap.c b/epan/dissectors/packet-gsmtap.c
index 6cc9ba1d49..a75810d8e7 100644
--- a/epan/dissectors/packet-gsmtap.c
+++ b/epan/dissectors/packet-gsmtap.c
@@ -332,15 +332,17 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *gsmtap_tree = NULL;
tvbuff_t *payload_tvb, *l1h_tvb = NULL;
- guint8 hdr_len, type, sub_type;
+ guint8 hdr_len, type, sub_type, timeslot, subslot;
guint16 arfcn;
len = tvb_length(tvb);
hdr_len = tvb_get_guint8(tvb, offset + 1) <<2;
type = tvb_get_guint8(tvb, offset + 2);
- sub_type = tvb_get_guint8(tvb, offset + 12);
+ timeslot = tvb_get_guint8(tvb, offset + 3);
arfcn = tvb_get_ntohs(tvb, offset + 4);
+ sub_type = tvb_get_guint8(tvb, offset + 12);
+ subslot = tvb_get_guint8(tvb, offset + 14);
/* In case of a SACCH, there is a two-byte L1 header in front
* of the packet (see TS 04.04) */
@@ -384,6 +386,10 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->p2p_dir = P2P_DIR_RECV;
}
+ /* Try to build an identifier of different 'streams' */
+ /* (AFCN _cant_ be used because of hopping */
+ pinfo->circuit_id = (timeslot << 3) | subslot;
+
if (tree) {
guint8 channel;
const char *channel_str;
diff --git a/epan/dissectors/packet-lapdm.c b/epan/dissectors/packet-lapdm.c
index 29cad29480..e114f152b5 100644
--- a/epan/dissectors/packet-lapdm.c
+++ b/epan/dissectors/packet-lapdm.c
@@ -289,15 +289,20 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
fragment_data *fd_m = NULL;
tvbuff_t *reassembled = NULL;
+ guint32 fragment_id;
gboolean save_fragmented = pinfo->fragmented;
pinfo->fragmented = m;
+
+ /* Rely on caller to provide a way to group fragments */
+ fragment_id = (pinfo->circuit_id << 4) | (sapi << 1) | pinfo->p2p_dir;
+
/* This doesn't seem the best way of doing it as doesn't
take N(S) into account, but N(S) isn't always 0 for
the first fragment!
*/
fd_m = fragment_add_seq_next (payload, 0, pinfo,
- 0, /* guint32 ID for fragments belonging together */
+ fragment_id, /* guint32 ID for fragments belonging together */
lapdm_fragment_table, /* list of message fragments */
lapdm_reassembled_table, /* list of reassembled messages */
/*n_s guint32 fragment sequence number */