aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h225
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2005-01-20 12:02:08 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2005-01-20 12:02:08 +0000
commitf73394ab99c4385f86e839b63c78599def95747b (patch)
treef05aa7461279eafea3c40e1c02e48bc9c5dfea5d /asn1/h225
parent1d2249b2c532c125eb61be9a4fe5d6e41e5fe688 (diff)
NonStandardData and TunnelledProtocol reimplemented and tested
svn path=/trunk/; revision=13138
Diffstat (limited to 'asn1/h225')
-rw-r--r--asn1/h225/h225.cnf132
-rw-r--r--asn1/h225/packet-h225-template.c36
2 files changed, 89 insertions, 79 deletions
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index 611dc05518..0f4d281df6 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -43,7 +43,6 @@ RasUsageSpecification/callStartingPoint RasUsageSpecificationcallStartingPoint
CapacityReportingSpecification/when CapacityReportingSpecification_when
RasUsageSpecification/when RasUsageSpecification_when
TransportAddress/ipAddress/ip IpV4
-NonStandardIdentifier NonStandardIdentifier
#----------------------------------------------------------------------------------------
#.FIELD_RENAME
RasUsageSpecification/callStartingPoint/alerting alerting_flg
@@ -54,7 +53,8 @@ UUIEsRequested/callProceeding callProceeding_flg
CicInfo/cic cic_2_4
UUIEsRequested/connect connect_bool
-NonStandardParameter/data data_oct_str
+NonStandardIdentifier/object nsiOID
+NonStandardParameter/data nsp_data
H323-UU-PDU/h323-message-body/empty empty_flg
RasUsageInfoTypes/endTime endTime_flg
UUIEsRequested/facility facility_bool
@@ -132,6 +132,7 @@ GatekeeperRejectReason/securityError gkRej_securityError
RegistrationRejectReason/securityError reg_securityError
CallIdentifier/guid guid
+
#----------------------------------------------------------------------------------------
#.FN_BODY H323-UU-PDU/h323-message-body
guint32 message_body_val;
@@ -206,32 +207,6 @@ CallIdentifier/guid guid
offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_index, 1, 128, "#,*0123456789", 13);
#.END
#----------------------------------------------------------------------------------------
-#.FN_BODY H221NonStandard/t35CountryCode
- guint32 value;
-
- offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
- 0U, 255U, &value, NULL, FALSE);
- T38_manufacturer_code = value << 24;
-#.END
-#----------------------------------------------------------------------------------------
-#.FN_BODY H221NonStandard/t35Extension
- guint32 value;
-
- offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
- 0U, 255U, &value, NULL, FALSE);
- T38_manufacturer_code = T38_manufacturer_code ^ (value << 16);
-#.END
-#----------------------------------------------------------------------------------------
-#.FN_BODY H221NonStandard/manufacturerCode
- guint32 value;
-
- offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
- 0U, 65535U, &value, NULL, FALSE);
- T38_manufacturer_code = T38_manufacturer_code ^ value;
- proto_tree_add_uint(tree, hf_h221Manufacturer, tvb, (offset)-4,4,T38_manufacturer_code);
-
-#.END
-#----------------------------------------------------------------------------------------
#.FN_BODY H245TransportAddress/h245ipAddress/h245ipv4
guint32 value_offset;
@@ -454,49 +429,96 @@ guint32 value_len;
}
#.END
#----------------------------------------------------------------------------------------
-#.FN_BODY NonStandardIdentifier/object
- offset = dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_index,
- object);
+#--- TunnelledProtocol ------------------------------------------------------------------
+#.FN_HDR TunnelledProtocol
+ tpOID[0] = '\0';
+#.FN_FTR TunnelledProtocol
+ tp_handle = dissector_get_string_handle(tp_dissector_table, tpOID);
+#.FN_BODY TunnelledProtocol/id/tunnelledProtocolObjectID
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h225_tunnelledProtocolObjectID, tpOID);
+#.END
+#.FN_HDR H323-UU-PDU/tunnelledSignallingMessage
+ tp_handle = NULL;
+#.FN_BODY H323-UU-PDU/tunnelledSignallingMessage/messageContent/_item
+ guint32 value_offset, value_len;
+ tvbuff_t *next_tvb;
+
+ offset = dissect_per_octet_string(tvb, offset, pinfo, tree,
+ hf_h225_messageContent_item, -1, -1,
+ &value_offset, &value_len);
+
+ if (value_len > 0) {
+ next_tvb = tvb_new_subset(tvb, value_offset, value_len, value_len);
+ call_dissector((tp_handle)?tp_handle:data_handle, next_tvb, pinfo, tree);
+ }
#.END
-#----------------------------------------------------------------------------------------
+
+#--- NonStandardParameter ---------------------------------------------------------------
+
#.FN_BODY NonStandardIdentifier
guint32 value;
- *object = '\0';
- T38_manufacturer_code = 0;
+ nsiOID[0] = '\0';
+ h221NonStandard = 0;
+
+ offset = dissect_per_choice(tvb, offset, pinfo, tree,
+ hf_h225_nonStandardIdentifier,
+ ett_h225_NonStandardIdentifier, NonStandardIdentifier_choice, "NonStandardIdentifier",
+ &value);
- offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
- ett_h225_NonStandardIdentifier, NonStandardIdentifier_choice, "NonStandardIdentifier",
- &value);
switch (value) {
case 0 : /* object */
- nsp_handle = dissector_get_string_handle(nsp_object_dissector_table, object);
+ nsp_handle = dissector_get_string_handle(nsp_object_dissector_table, nsiOID);
break;
case 1 : /* h221NonStandard */
- nsp_handle = dissector_get_port_handle(nsp_h221_dissector_table, T38_manufacturer_code);
+ nsp_handle = dissector_get_port_handle(nsp_h221_dissector_table, h221NonStandard);
break;
default :
nsp_handle = NULL;
}
-
+#.FN_BODY NonStandardIdentifier/object
+ offset = dissect_per_object_identifier(tvb, offset, pinfo, tree,
+ hf_h225_nsiOID,
+ nsiOID);
+#.END
+
+#.FN_HDR H221NonStandard
+ t35CountryCode = 0;
+ t35Extension = 0;
+ manufacturerCode = 0;
+#.FN_FTR H221NonStandard
+ h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode;
+ proto_tree_add_uint(tree, hf_h221Manufacturer, tvb, (offset>>3)-4, 4, h221NonStandard);
+#.FN_BODY H221NonStandard/t35CountryCode
+ offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
+ 0U, 255U, &t35CountryCode, NULL, FALSE);
+#.FN_BODY H221NonStandard/t35Extension
+ offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
+ 0U, 255U, &t35Extension, NULL, FALSE);
+#.FN_BODY H221NonStandard/manufacturerCode
+ offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
+ 0U, 65535U, &manufacturerCode, NULL, FALSE);
#.END
-#----------------------------------------------------------------------------------------
-#.FN_BODY TunnelledProtocol/id/tunnelledProtocolObjectID
- offset = dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_index,
- tpID);
+#.FN_HDR NonStandardParameter
+ nsp_handle = NULL;
+
+#.FN_BODY NonStandardParameter/data
+ guint32 value_offset, value_len;
+ tvbuff_t *next_tvb;
+
+ offset = dissect_per_octet_string(tvb, offset, pinfo, tree,
+ hf_h225_nsp_data, -1, -1,
+ &value_offset, &value_len);
+
+ if (value_len > 0) {
+ next_tvb = tvb_new_subset(tvb, value_offset, value_len, value_len);
+ call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, pinfo, tree);
+ }
#.END
-#----------------------------------------------------------------------------------------
-#.FN_HDR TunnelledProtocol
- tpID[0] = '\0';
-#.END
-#----------------------------------------------------------------------------------------
-#.FN_FTR TunnelledProtocol
- tp_handle = dissector_get_string_handle(tp_dissector_table, tpID);
-#.END
-#----------------------------------------------------------------------------------------
+
#.TYPE_ATTR
H221NonStandard/t35CountryCode TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(T35CountryCode_vals)
TransportAddress/ipAddress/ip TYPE = FT_IPv4 DISPLAY = BASE_NONE STRINGS = NULL
@@ -505,4 +527,6 @@ H245TransportAddress/h245ipAddress/h245ipv4 TYPE = FT_IPv4 DISPLAY = BASE_NONE
H245TransportAddress/h245ip6Address/h245ipv6 TYPE = FT_IPv6 DISPLAY = BASE_NONE STRINGS = NULL
VendorIdentifier/productId TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
VendorIdentifier/versionId TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
-H323-UserInformation/user-data/protocol-discriminator TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q931_protocol_discriminator_vals) \ No newline at end of file
+H323-UserInformation/user-data/protocol-discriminator TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q931_protocol_discriminator_vals)
+H323-UU-PDU/tunnelledSignallingMessage/messageContent/_item TYPE = FT_UINT32 DISPLAY = BASE_DEC
+NonStandardParameter/data TYPE = FT_UINT32 DISPLAY = BASE_DEC
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c
index cc8734ae2d..c774f95b5c 100644
--- a/asn1/h225/packet-h225-template.c
+++ b/asn1/h225/packet-h225-template.c
@@ -97,7 +97,6 @@ static int hf_h225_ras_rsp_frame = -1;
static int hf_h225_ras_dup = -1;
static int hf_h225_ras_deltatime = -1;
static int hf_h225_fastStart_item_length = -1;
-static int hf_h225_nsp_data = -1;
#include "packet-h225-hf.c"
@@ -108,12 +107,21 @@ static gint ett_h225 = -1;
/* Global variables */
static guint32 ipv4_address;
static guint32 ipv4_port;
-static char object[256];
guint32 T38_manufacturer_code;
-static char tpID[256];
static gboolean h225_reassembly = TRUE;
+guint32 value;
static gboolean contains_faststart = FALSE;
+/* NonStandardParameter */
+static char nsiOID[256];
+static guint32 h221NonStandard;
+static guint32 t35CountryCode;
+static guint32 t35Extension;
+static guint32 manufacturerCode;
+
+/* TunnelledProtocol */
+static char tpOID[256];
+
#include "packet-h225-fn.c"
@@ -169,25 +177,6 @@ dissect_h225_h225_RasMessage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
return offset;
}
-
-static int
-dissect_h225_nsp_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
-{
- guint32 value_offset, value_len;
- tvbuff_t *next_tvb;
-
- offset = dissect_per_octet_string(tvb, offset, pinfo, tree,
- hf_h225_nsp_data, -1, -1,
- &value_offset, &value_len);
-
- if (value_len > 0) {
- next_tvb = tvb_new_subset(tvb, value_offset, value_len, value_len);
- call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, pinfo, tree);
- }
-
- return offset;
-}
-
/*--- proto_register_h225 -------------------------------------------*/
void proto_register_h225(void) {
@@ -217,9 +206,6 @@ void proto_register_h225(void) {
{ &hf_h225_fastStart_item_length,
{ "fastStart item length", "h225.fastStart_item_length", FT_UINT32, BASE_DEC,
NULL, 0, "fastStart item length", HFILL }},
- { &hf_h225_nsp_data,
- { "data", "h225.nsp_data", FT_BYTES, BASE_HEX,
- NULL, 0, "OCTET STRING", HFILL }},
#include "packet-h225-hfarr.c"
};