summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-megaco.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-05-16 16:34:23 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-05-16 16:34:23 +0000
commitd03fa8ee26318a23683d6b014a4e81ffeeb4e85b (patch)
treef29fa50dffd67da2363bac6c1029bdc2b6e14178 /epan/dissectors/packet-megaco.c
parentb202c984e3cbd38a0369e37a0adec34f2b0d9841 (diff)
downloadwireshark-d03fa8ee26318a23683d6b014a4e81ffeeb4e85b.tar.gz
If H.248 is in otp internal format call the h248_otp dissector, work in progress.
svn path=/trunk/; revision=25310
Diffstat (limited to 'epan/dissectors/packet-megaco.c')
-rw-r--r--epan/dissectors/packet-megaco.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c
index 123bb3b75b..6a86ba6bce 100644
--- a/epan/dissectors/packet-megaco.c
+++ b/epan/dissectors/packet-megaco.c
@@ -232,6 +232,7 @@ static dissector_handle_t data_handle;
static dissector_handle_t sdp_handle;
static dissector_handle_t h245_handle;
static dissector_handle_t h248_handle;
+static dissector_handle_t h248_otp_handle;
static gboolean keep_persistent_data = FALSE;
@@ -321,6 +322,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 tempchar;
gint tvb_RBRKT, tvb_LBRKT, RBRKT_counter, LBRKT_counter;
guint token_index=0;
+ guint32 dword;
gcp_msg_t* msg = NULL;
gcp_trx_t* trx = NULL;
@@ -350,6 +352,19 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
RBRKT_counter = 0;
LBRKT_counter = 0;
+ /* Check if H.248 in otp(Erlang) internal format
+ * XXX Needs improvment?
+ * Ref:
+ * http://www.erlang.org/doc/apps/megaco/part_frame.html
+ * 4.1 Internal form of messages
+ * 4.2 The different encodings
+ */
+ dword = tvb_get_ntoh24(tvb,0);
+ if ((dword == 0x836803)&&(h248_otp_handle)){
+ call_dissector(h248_otp_handle, tvb, pinfo, tree);
+ return;
+ }
+
msg = gcp_msg(pinfo, TVB_RAW_OFFSET(tvb), keep_persistent_data);
/*
@@ -3288,6 +3303,7 @@ proto_reg_handoff_megaco(void)
sdp_handle = find_dissector("sdp");
h245_handle = find_dissector("h245dg");
h248_handle = find_dissector("h248");
+ h248_otp_handle = find_dissector("h248_otp");
data_handle = find_dissector("data");
if (!megaco_prefs_initialized) {