summaryrefslogtreecommitdiff
path: root/asn1/h248
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-01-21 06:39:25 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-01-21 06:39:25 +0000
commiteb136e00d856c868407becff8c0382990df7b5de (patch)
tree9332cd876f1ec5148b40d0a7fdc5a6e2ae2afb18 /asn1/h248
parent90765a3c3eb3ed401c4f837f0629621ad8c95def (diff)
downloadwireshark-eb136e00d856c868407becff8c0382990df7b5de.tar.gz
From Alex Lindberg:
resolves all h248V1 differences and provides dissection of V1 instances of Packets, Events, Signals, and Properties. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3999 svn path=/trunk/; revision=31597
Diffstat (limited to 'asn1/h248')
-rw-r--r--asn1/h248/h248.cnf34
-rw-r--r--asn1/h248/h248v1support.asn7
-rw-r--r--asn1/h248/packet-h248-template.c2
3 files changed, 43 insertions, 0 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf
index 711ea4ec12..348929f4b1 100644
--- a/asn1/h248/h248.cnf
+++ b/asn1/h248/h248.cnf
@@ -369,6 +369,30 @@ TransactionPending/transactionId tpend_transactionId
dissect_h248_ServiceChangeReasonStr(FALSE, parameter_tvb, 0, actx, tree, hf_h248_serviceChangeReasonStr);
#.END
+#.FN_HDR ValueV1
+ guint8 i;
+ guint32 len;
+#.END
+
+#.FN_BODY ValueV1
+/* check tvb to verify all values ascii or not. If so, output string, else hex */
+ len=tvb_length_remaining(tvb, offset);
+ for( i=0;i<len;i++) {
+ if(!isascii(tvb_get_guint8(tvb, offset+i)) || tvb_get_guint8(tvb, offset+i) == 0) {
+ /* not ascii or NULL character so do string as hex string */
+ proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s",
+ (proto_registrar_get_nth(hf_index))->name,
+ tvb_bytes_to_str(tvb, 0, len));
+ return len;
+ };
+ };
+ /* if here, then string is ascii */
+ proto_tree_add_text(tree, tvb, offset, len,"%s: %s",
+ (proto_registrar_get_nth(hf_index))->name,
+ tvb_format_text(tvb, 0, len));
+ offset = len;
+#.END
+
#.FN_BODY EventParameter
/* H248 v1 support */
if (h248_version >1) {
@@ -378,6 +402,16 @@ TransactionPending/transactionId tpend_transactionId
}
#.END
+#.FN_BODY SigParameter
+/* H248 v1 support */
+ if (h248_version >1) {
+ %(DEFAULT_BODY)s
+} else {
+ offset = dissect_h248_SigParameterV1( implicit_tag, tvb, offset, actx, tree, hf_index);
+}
+#.END
+
+
#.FN_BODY PropertyParm
/* H248 v1 support */
if (h248_version >1) {
diff --git a/asn1/h248/h248v1support.asn b/asn1/h248/h248v1support.asn
index ac38fc0aa7..2ab54f000d 100644
--- a/asn1/h248/h248v1support.asn
+++ b/asn1/h248/h248v1support.asn
@@ -44,6 +44,13 @@ BEGIN
...
}
+ -- V1
+ SigParameterV1 ::= SEQUENCE
+ {
+ sigParameterName [0] Name,
+ value [1] ValueV1
+ }
+
ValueV1 ::= OCTET STRING
END \ No newline at end of file
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index 112862d98d..2fb250c945 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -32,6 +32,7 @@
#include "packet-h248.h"
#include <epan/tap.h>
#include "packet-tpkt.h"
+#include <ctype.h>
#define PNAME "H.248 MEGACO"
#define PSNAME "H248"
@@ -118,6 +119,7 @@ static int dissect_h248_AuditReplyV1(gboolean implicit_tag, tvbuff_t *tvb, int o
static int dissect_h248_ValueV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
static int dissect_h248_EventParameterV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
static int dissect_h248_PropertyParmV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
+static int dissect_h248_SigParameterV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
/* http://www.iana.org/assignments/megaco-h248 last updated 2007-11-28*/
static const value_string package_name_vals[] = {