diff options
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 30 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_fp.h | 2 |
2 files changed, 32 insertions, 0 deletions
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index a13c0069f6..81b6e9d2d9 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -2939,6 +2939,34 @@ void dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto } } +static gboolean heur_dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + struct fp_info *p_fp_info; + + p_fp_info = p_get_proto_data(pinfo->fd, proto_fp); + + /* if no FP info is present, assume this is not FP over UDP */ + if (!p_fp_info) return FALSE; + + /* if FP info is present, check that it really is an ethernet link */ + if (p_fp_info->link_type != FP_Link_Ethernet) return FALSE; + + /* remember 'lower' UDP layer port information */ + if (!p_fp_info->srcport || !p_fp_info->destport) { + p_fp_info->srcport = pinfo->srcport; + p_fp_info->destport = pinfo->destport; + } + + /* discriminate 'lower' UDP layer from 'user data' UDP layer + * (i.e. if an FP over UDP packet contains a user UDP packet */ + if (p_fp_info->srcport != pinfo->srcport || + p_fp_info->destport != pinfo->destport) + return FALSE; + + /* assume this is FP */ + dissect_fp(tvb, pinfo, tree); + return TRUE; +} /*****************************/ @@ -3927,5 +3955,7 @@ void proto_reg_handoff_fp(void) mac_fdd_dch_handle = find_dissector("mac.fdd.dch"); mac_fdd_edch_handle = find_dissector("mac.fdd.edch"); mac_fdd_hsdsch_handle = find_dissector("mac.fdd.hsdsch"); + + heur_dissector_add("udp", heur_dissect_fp, proto_fp); } diff --git a/epan/dissectors/packet-umts_fp.h b/epan/dissectors/packet-umts_fp.h index 4c2fa4ba0c..c3c2c93ed5 100644 --- a/epan/dissectors/packet-umts_fp.h +++ b/epan/dissectors/packet-umts_fp.h @@ -95,6 +95,8 @@ typedef struct fp_info gint cur_tb; /* current transport block (required for dissecting of single TBs */ gint cur_chan; /* current channel, required to retrieve the correct channel configuration for UMTS MAC */ + guint16 srcport, destport; + enum fp_hsdsch_entity hsdsch_entity; enum fp_link_type link_type; } fp_info; |