aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-01-19 22:43:15 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-01-19 22:43:15 +0000
commit3fc09d6c18ac0f36534ad95ed51d6edca8c4ec99 (patch)
tree7b34489050d0f6393843b601f4f2af55d75e03a2 /asn1
parent561fbc8b2580515702c5b491a83f8ca7e7cfe635 (diff)
Attempt to reimplement "non standard data/parameter" and "tunnelled
protocol" svn path=/trunk/; revision=13122
Diffstat (limited to 'asn1')
-rw-r--r--asn1/h225/h225-exp.cnf1
-rw-r--r--asn1/h225/h225.cnf49
-rw-r--r--asn1/h225/packet-h225-template.c29
3 files changed, 77 insertions, 2 deletions
diff --git a/asn1/h225/h225-exp.cnf b/asn1/h225/h225-exp.cnf
index 23700e3bcd..f4b09bcc51 100644
--- a/asn1/h225/h225-exp.cnf
+++ b/asn1/h225/h225-exp.cnf
@@ -4,6 +4,7 @@ ScreeningIndicator TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(h
NonStandardParameter TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
AliasAddress TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(AliasAddress_vals) BITMASK = 0
PartyNumber TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(h225_PartyNumber_vals) BITMASK = 0
+CallIdentifier TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
RasMessage TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(RasMessage_vals) BITMASK = 0
#.END
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index 9bf120a43a..611dc05518 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -33,6 +33,7 @@ AliasAddress NO_PROT_PREFIX
PartyNumber
PresentationIndicator
ScreeningIndicator
+CallIdentifier
#----------------------------------------------------------------------------------------
#.TYPE_RENAME
CallCreditServiceControl/callStartingPoint CallCreditServiceControl_callStartingPoint
@@ -42,6 +43,7 @@ RasUsageSpecification/callStartingPoint RasUsageSpecificationcallStartingPoint
CapacityReportingSpecification/when CapacityReportingSpecification_when
RasUsageSpecification/when RasUsageSpecification_when
TransportAddress/ipAddress/ip IpV4
+NonStandardIdentifier NonStandardIdentifier
#----------------------------------------------------------------------------------------
#.FIELD_RENAME
RasUsageSpecification/callStartingPoint/alerting alerting_flg
@@ -130,7 +132,6 @@ GatekeeperRejectReason/securityError gkRej_securityError
RegistrationRejectReason/securityError reg_securityError
CallIdentifier/guid guid
-
#----------------------------------------------------------------------------------------
#.FN_BODY H323-UU-PDU/h323-message-body
guint32 message_body_val;
@@ -206,6 +207,7 @@ CallIdentifier/guid guid
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY H221NonStandard/t35CountryCode
+ guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
0U, 255U, &value, NULL, FALSE);
@@ -213,6 +215,7 @@ CallIdentifier/guid guid
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY H221NonStandard/t35Extension
+ guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
0U, 255U, &value, NULL, FALSE);
@@ -220,6 +223,7 @@ CallIdentifier/guid guid
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY H221NonStandard/manufacturerCode
+ guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
0U, 65535U, &value, NULL, FALSE);
@@ -450,6 +454,49 @@ guint32 value_len;
}
#.END
#----------------------------------------------------------------------------------------
+#.FN_BODY NonStandardIdentifier/object
+
+ offset = dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_index,
+ object);
+
+#.END
+#----------------------------------------------------------------------------------------
+#.FN_BODY NonStandardIdentifier
+ guint32 value;
+
+ *object = '\0';
+ T38_manufacturer_code = 0;
+
+ 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);
+ break;
+ case 1 : /* h221NonStandard */
+ nsp_handle = dissector_get_port_handle(nsp_h221_dissector_table, T38_manufacturer_code);
+ break;
+ default :
+ nsp_handle = NULL;
+ }
+
+#.END
+#----------------------------------------------------------------------------------------
+#.FN_BODY TunnelledProtocol/id/tunnelledProtocolObjectID
+ offset = dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_index,
+ tpID);
+
+#.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
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c
index d43b6d97a6..cc8734ae2d 100644
--- a/asn1/h225/packet-h225-template.c
+++ b/asn1/h225/packet-h225-template.c
@@ -82,6 +82,9 @@ static dissector_handle_t h245_handle=NULL;
static dissector_handle_t h245dg_handle=NULL;
static dissector_handle_t h4501_handle=NULL;
+static dissector_handle_t nsp_handle;
+static dissector_handle_t tp_handle;
+
/* Initialize the protocol and registered fields */
static int h225_tap = -1;
static int proto_h225 = -1;
@@ -94,6 +97,7 @@ 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"
@@ -104,9 +108,10 @@ 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;
#include "packet-h225-fn.c"
@@ -164,6 +169,25 @@ 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) {
@@ -193,6 +217,9 @@ 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"
};