summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asn1/h248/h248.cnf43
-rw-r--r--asn1/h248/h248v1support.asn2
-rw-r--r--asn1/h248/packet-h248-template.c2
-rw-r--r--epan/dissectors/packet-h248.c55
4 files changed, 6 insertions, 96 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf
index b69de9f854..f2bef14fa5 100644
--- a/asn1/h248/h248.cnf
+++ b/asn1/h248/h248.cnf
@@ -367,18 +367,6 @@ AuditReplyV1/auditResult audit_result
}
#.END
-#.FN_BODY SCreasonValue
-/* H248 v1 support */
- if ( h248_version > 1 ) {
- /* Not V1, so call "standard" function */
-%(DEFAULT_BODY)s
-} else {
- /* V1 so Value == octet string */
- offset = dissect_h248_ValueV1( implicit_tag, tvb, offset, actx, tree, hf_index);
-};
-
-#.END
-
#.FN_BODY SCreasonValueOctetStr VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb;
%(DEFAULT_BODY)s
@@ -389,37 +377,6 @@ AuditReplyV1/auditResult audit_result
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_reported_length_remaining(tvb, offset);
- if ( curr_info.par && curr_info.par->dissector) {
- curr_info.par->dissector(tree, /*next_*/tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
- } else {
- /* if no registered dissector create output */
- for( i=0;i<len;i++) {
- if(!g_ascii_isprint(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(wmem_packet_scope(), 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) {
diff --git a/asn1/h248/h248v1support.asn b/asn1/h248/h248v1support.asn
index c0eb59118e..093b3549e0 100644
--- a/asn1/h248/h248v1support.asn
+++ b/asn1/h248/h248v1support.asn
@@ -38,7 +38,7 @@ BEGIN
}
- ValueV1 ::= OCTET STRING
+-- ValueV1 ::= OCTET STRING
EventParamValueV1 ::= OCTET STRING
SigParamValueV1 ::= OCTET STRING
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index 45c00c03cd..b67bdb32f3 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -124,7 +124,7 @@ static int dissect_h248_AuditReplyV1(gboolean implicit_tag, tvbuff_t *tvb, int o
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_SigParameterV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
static int dissect_h248_SigParamValueV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
-static int dissect_h248_ValueV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
+
#if 0
static const value_string context_id_type[] = {
{NULL_CONTEXT,"0 (Null Context)"},
diff --git a/epan/dissectors/packet-h248.c b/epan/dissectors/packet-h248.c
index bc129f8859..a65f56666e 100644
--- a/epan/dissectors/packet-h248.c
+++ b/epan/dissectors/packet-h248.c
@@ -599,7 +599,7 @@ static int dissect_h248_AuditReplyV1(gboolean implicit_tag, tvbuff_t *tvb, int o
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_SigParameterV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
static int dissect_h248_SigParamValueV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
-static int dissect_h248_ValueV1(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
+
#if 0
static const value_string context_id_type[] = {
{NULL_CONTEXT,"0 (Null Context)"},
@@ -3251,7 +3251,7 @@ static const ber_sequence_t SigParameter_sequence[] = {
static int
dissect_h248_SigParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 433 "../../asn1/h248/h248.cnf"
+#line 390 "../../asn1/h248/h248.cnf"
/* H248 v1 support */
if (h248_version > 1) {
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
@@ -3487,7 +3487,7 @@ static const ber_sequence_t EventParameter_sequence[] = {
static int
dissect_h248_EventParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 424 "../../asn1/h248/h248.cnf"
+#line 381 "../../asn1/h248/h248.cnf"
/* H248 v1 support */
if (h248_version > 1) {
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
@@ -4386,7 +4386,7 @@ dissect_h248_ServiceChangeProfile(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_h248_SCreasonValueOctetStr(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 383 "../../asn1/h248/h248.cnf"
+#line 371 "../../asn1/h248/h248.cnf"
tvbuff_t *parameter_tvb;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
&parameter_tvb);
@@ -4408,20 +4408,9 @@ static const ber_sequence_t SCreasonValue_sequence_of[1] = {
static int
dissect_h248_SCreasonValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 371 "../../asn1/h248/h248.cnf"
-/* H248 v1 support */
- if ( h248_version > 1 ) {
- /* Not V1, so call "standard" function */
offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
SCreasonValue_sequence_of, hf_index, ett_h248_SCreasonValue);
-} else {
- /* V1 so Value == octet string */
- offset = dissect_h248_ValueV1( implicit_tag, tvb, offset, actx, tree, hf_index);
-};
-
-
-
return offset;
}
@@ -5349,42 +5338,6 @@ dissect_h248_SigParameterV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
}
-
-static int
-dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 393 "../../asn1/h248/h248.cnf"
- guint8 i;
- guint32 len;
-
-#line 398 "../../asn1/h248/h248.cnf"
-/* check tvb to verify all values ascii or not. If so, output string, else hex */
- len=tvb_reported_length_remaining(tvb, offset);
- if ( curr_info.par && curr_info.par->dissector) {
- curr_info.par->dissector(tree, /*next_*/tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
- } else {
- /* if no registered dissector create output */
- for( i=0;i<len;i++) {
- if(!g_ascii_isprint(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(wmem_packet_scope(), 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;
-
-
-
- return offset;
-}
-
-
/*--- End of included file: packet-h248-fn.c ---*/
#line 1417 "../../asn1/h248/packet-h248-template.c"