aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h245
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2007-10-17 10:25:21 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2007-10-17 10:25:21 +0000
commit286f231eb9237bd800aa339aff2413f147300552 (patch)
treedc35a85051ba45f75c10bf12071155666b5d1f96 /asn1/h245
parent5fa636334baa7c78115a6626f140c6c386725197 (diff)
new H.323 dissector
- Generic Extensible Framework helper - Annex M1 (QSIG over H.323) - Annex M4 - Annex R H.225/H.245 support for Generic Extensible Framework (GEF) H.235 register MIKEY into new H.225/H.245 GEF tables regenerate H.225,H.245,H.235,H.450,H.450-ROS,T.35 from new makefiles svn path=/trunk/; revision=23216
Diffstat (limited to 'asn1/h245')
-rw-r--r--asn1/h245/h245.cnf141
-rw-r--r--asn1/h245/packet-h245-template.c8
2 files changed, 121 insertions, 28 deletions
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index c3c886421a..5a11e93005 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -533,52 +533,146 @@ if (h245_pi != NULL)
h245_pi->msg_type = H245_OpenLogChnAck;
#.END
#----------------------------------------------------------------------------------------
-#.FN_PARS CapabilityIdentifier/standard
- FN_VARIANT = _str VAL_PTR = &standard_oid_str
-#.FN_FTR CapabilityIdentifier/standard
- gen_par_prefix = ep_strdup(standard_oid_str);
- if(!h245_lc_dissector && strcmp(standard_oid_str,"0.0.8.245.1.1.1") == 0)
- h245_lc_dissector = amr_handle;
+
+#=== Generic Extensible Framework =======================================================
+
+#.FN_HDR GenericMessage
+ void *priv_data = actx->private_data;
+ gef_ctx_t *gefx;
+
+ /* check if not inherited from GenericInformation */
+ gefx = gef_ctx_get(actx->private_data);
+ if (!gefx) {
+ gefx = gef_ctx_alloc(NULL, "GenericMessage");
+ actx->private_data = gefx;
+ }
+#.FN_FTR
+ actx->private_data = priv_data;
#.END
+
+#.FN_BODY GenericMessage/subMessageIdentifier VAL_PTR = &subMessageIdentifer
+ guint32 subMessageIdentifer;
+ gef_ctx_t *gefx;
+
+%(DEFAULT_BODY)s
+ gefx = gef_ctx_get(actx->private_data);
+ if (gefx) gefx->subid = ep_strdup_printf("%%u", subMessageIdentifer);
+#.END
+
+#.FN_HDR GenericMessage/messageContent/_item
+ gef_ctx_t *parent_gefx;
+
+ parent_gefx = gef_ctx_get(actx->private_data);
+ actx->private_data = gef_ctx_alloc(parent_gefx, NULL);
+#.FN_FTR
+ actx->private_data = parent_gefx;
+#.END
+
#----------------------------------------------------------------------------------------
+#.FN_HDR GenericInformation
+ void *priv_data = actx->private_data;
+ actx->private_data = gef_ctx_alloc(NULL, "GenericInformation");
+#.FN_FTR
+ actx->private_data = priv_data;
+#.END
+
+#--- GenericCapability ------------------------------------------------------------------
#.FN_HDR GenericCapability
- gen_par_prefix = "";
+ void *priv_data = actx->private_data;
+ actx->private_data = gef_ctx_alloc(NULL, "GenericCapability");
+#.FN_FTR
+ actx->private_data = priv_data;
#.END
-#----------------------------------------------------------------------------------------
-#.FN_HDR GenericMessage
- gen_par_prefix = "";
+
+#.FN_FTR GenericCapability/capabilityIdentifier
+ gef_ctx_update_key(gef_ctx_get(actx->private_data));
+ /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "***DEBUG capabilityIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/
#.END
-#----------------------------------------------------------------------------------------
-#.FN_HDR GenericMessage/subMessageIdentifier
- guint32 subMessageIdentifer;
-#.FN_PARS GenericMessage/subMessageIdentifier
- VAL_PTR = &subMessageIdentifer
+#.FN_HDR GenericCapability/collapsing/_item
+ gef_ctx_t *parent_gefx;
+
+ parent_gefx = gef_ctx_get(actx->private_data);
+ actx->private_data = gef_ctx_alloc(parent_gefx, "collapsing");
+#.FN_FTR
+ actx->private_data = parent_gefx;
#.END
-#----------------------------------------------------------------------------------------
+
+#.FN_HDR GenericCapability/nonCollapsing/_item
+ gef_ctx_t *parent_gefx;
+
+ parent_gefx = gef_ctx_get(actx->private_data);
+ actx->private_data = gef_ctx_alloc(parent_gefx, "nonCollapsing");
+#.FN_FTR
+ actx->private_data = parent_gefx;
+#.END
+
+#.FN_BODY GenericCapability/nonCollapsingRaw VAL_PTR = &value_tvb
+ tvbuff_t *value_tvb;
+ gef_ctx_t *parent_gefx;
+ gef_ctx_t *gefx;
+
+ parent_gefx = gef_ctx_get(actx->private_data);
+ actx->private_data = gef_ctx_alloc(parent_gefx, "nonCollapsingRaw");
+%(DEFAULT_BODY)s
+ gefx = gef_ctx_get(actx->private_data);
+ if (gefx) {
+ /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ actx->pinfo->private_data = actx;
+ dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s);
+ }
+ actx->private_data = parent_gefx;
+#.END
+
+#--- EncryptionSync ---------------------------------------------------------------------
#.FN_HDR EncryptionSync
- gen_par_prefix = "EncryptionSync";
+ void *priv_data = actx->private_data;
+ actx->private_data = gef_ctx_alloc(NULL, "EncryptionSync");
+#.FN_FTR
+ actx->private_data = priv_data;
+#.END
+#----------------------------------------------------------------------------------------
+
+#.FN_BODY CapabilityIdentifier/standard FN_VARIANT = _str VAL_PTR = &standard_oid_str
+ const gchar *standard_oid_str = NULL;
+ gef_ctx_t *gefx;
+
+%(DEFAULT_BODY)s
+ gefx = gef_ctx_get(actx->private_data);
+ if (gefx) gefx->id = standard_oid_str;
+
+ if(!h245_lc_dissector && strcmp(standard_oid_str,"0.0.8.245.1.1.1") == 0)
+ h245_lc_dissector = amr_handle;
#.END
#----------------------------------------------------------------------------------------
-#.FN_HDR GenericParameter
- gen_par_str = "";
#.FN_FTR GenericParameter/parameterIdentifier
- gen_par_str = ep_strdup_printf("%s-%s", gen_par_prefix, gen_par_str);
+ gef_ctx_update_key(gef_ctx_get(actx->private_data));
+ /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "***DEBUG capabilityIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY ParameterIdentifier/standard VAL_PTR = &value_int
- gint32 value_int;
+ gint32 value_int = -1;
+ gef_ctx_t *gefx;
%(DEFAULT_BODY)s
- gen_par_str = ep_strdup_printf("%%d", value_int);
+ gefx = gef_ctx_get(actx->private_data);
+ if (gefx) gefx->id = ep_strdup_printf("%%d", value_int);
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY ParameterValue/octetString VAL_PTR = &value_tvb
tvbuff_t *value_tvb;
+ gef_ctx_t *gefx;
%(DEFAULT_BODY)s
- dissector_try_string(gen_par_dissector_table, gen_par_str, value_tvb, %(ACTX)s->pinfo, %(TREE)s);
+ gefx = gef_ctx_get(actx->private_data);
+ if (gefx) {
+ /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %%s", gefx->key);*/
+ dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s);
+ }
#.END
+
+#=== end of GEF =========================================================================
+
#----------------------------------------------------------------------------------------
#.FN_BODY UnicastAddress/iPAddress/network VAL_PTR = &value_tvb
@@ -1187,6 +1281,7 @@ RTPPayloadType/payloadDescriptor/rfc-number TYPE = FT_UINT32 DISPLAY = BASE_DEC
NonStandardIdentifier/h221NonStandard/t35CountryCode TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(T35CountryCode_vals)
VendorIdentification/productNumber TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
VendorIdentification/versionNumber TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
+ParameterValue/octetString TYPE = FT_UINT32 DISPLAY = BASE_DEC
#----------------------------------------------------------------------------------------
#.FIELD_ATTR
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index da6ee1a139..ca4d2a4497 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -51,6 +51,7 @@
#include "tap.h"
#include "packet-tpkt.h"
#include "packet-per.h"
+#include "packet-h323.h"
#include "packet-h245.h"
#include "packet-rtp.h"
#include "packet-rtcp.h"
@@ -65,7 +66,7 @@ static dissector_handle_t rtcp_handle=NULL;
static dissector_handle_t t38_handle=NULL;
static dissector_table_t nsp_object_dissector_table;
static dissector_table_t nsp_h221_dissector_table;
-static dissector_table_t gen_par_dissector_table;
+static dissector_table_t gef_content_dissector_table;
static dissector_handle_t nsp_handle;
static dissector_handle_t data_handle;
static dissector_handle_t h245_handle;
@@ -207,15 +208,12 @@ static const value_string h245_AudioCapability_short_vals[] = {
an OLC is read */
const char* codec_type = NULL;
-static const char *standard_oid_str;
static guint32 ipv4_address;
static guint32 ipv4_port;
static guint32 rtcp_ipv4_address;
static guint32 rtcp_ipv4_port;
static gboolean media_channel;
static gboolean media_control_channel;
-static const char *gen_par_prefix;
-static const char *gen_par_str;
/* NonStandardParameter */
static const char *nsiOID;
@@ -391,7 +389,7 @@ void proto_register_h245(void) {
nsp_object_dissector_table = register_dissector_table("h245.nsp.object", "H.245 NonStandardParameter (object)", FT_STRING, BASE_NONE);
nsp_h221_dissector_table = register_dissector_table("h245.nsp.h221", "H.245 NonStandardParameter (h221)", FT_UINT32, BASE_HEX);
- gen_par_dissector_table = register_dissector_table("h245.gen_par", "H.245 GenericParameter", FT_STRING, BASE_NONE);
+ gef_content_dissector_table = register_dissector_table("h245.gef.content", "H.245 Generic Extensible Framework", FT_STRING, BASE_NONE);
h245_tap = register_tap("h245");
h245dg_tap = register_tap("h245dg");