diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-11-29 12:05:23 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-11-29 12:05:23 +0000 |
commit | e533d6232c30dd5ec22b949006fbcc04b67b572d (patch) | |
tree | dd9bc60bbf94e35280e3cd8fcefc5891be11a0a1 /epan/dissectors/packet-umts_fp.c | |
parent | e0e6ed9ca6c05a7a9d717ede2b86982dbdde17a2 (diff) |
From Tobias Witek:
Add support for UMTS FP over UDP.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4218
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31113 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-umts_fp.c')
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 30 |
1 files changed, 30 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); } |