diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-10-17 10:25:21 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-10-17 10:25:21 +0000 |
commit | 286f231eb9237bd800aa339aff2413f147300552 (patch) | |
tree | dc35a85051ba45f75c10bf12071155666b5d1f96 /asn1 | |
parent | 5fa636334baa7c78115a6626f140c6c386725197 (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')
-rw-r--r-- | asn1/Makefile.am | 1 | ||||
-rw-r--r-- | asn1/Makefile.nmake | 9 | ||||
-rw-r--r-- | asn1/h225/h225.cnf | 69 | ||||
-rw-r--r-- | asn1/h225/packet-h225-template.c | 5 | ||||
-rw-r--r-- | asn1/h235/Makefile.common | 8 | ||||
-rw-r--r-- | asn1/h235/h235.cnf | 5 | ||||
-rw-r--r-- | asn1/h235/packet-h235-template.c | 40 | ||||
-rw-r--r-- | asn1/h245/h245.cnf | 141 | ||||
-rw-r--r-- | asn1/h245/packet-h245-template.c | 8 | ||||
-rw-r--r-- | asn1/h323/Makefile.am | 26 | ||||
-rw-r--r-- | asn1/h323/Makefile.common | 53 | ||||
-rw-r--r-- | asn1/h323/Makefile.nmake | 29 | ||||
-rw-r--r-- | asn1/h323/RAS-PROTOCOL-TUNNEL.asn | 27 | ||||
-rw-r--r-- | asn1/h323/ROBUSTNESS-DATA.asn | 89 | ||||
-rw-r--r-- | asn1/h323/h323.cnf | 17 | ||||
-rw-r--r-- | asn1/h323/packet-h323-template.c | 145 |
16 files changed, 624 insertions, 48 deletions
diff --git a/asn1/Makefile.am b/asn1/Makefile.am index ce2f6aed49..74e9198355 100644 --- a/asn1/Makefile.am +++ b/asn1/Makefile.am @@ -43,6 +43,7 @@ SUBDIRS = \ h235 \ h245 \ h248 \ + h323 \ h450 \ h450-ros \ inap \ diff --git a/asn1/Makefile.nmake b/asn1/Makefile.nmake index 2f1bb7092f..82decaf080 100644 --- a/asn1/Makefile.nmake +++ b/asn1/Makefile.nmake @@ -82,6 +82,7 @@ per: \ h225 \ h235 \ h245 \ + h323 \ h450 \ h450-ros \ nbap \ @@ -153,6 +154,9 @@ clean: cd h248 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd .. + cd h323 + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean + cd .. cd h450 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd .. @@ -395,6 +399,11 @@ h248:: $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files cd .. +h323:: + cd h323 + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files + cd .. + h450:: cd h450 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf index 146f7b5742..0f59a08ea3 100644 --- a/asn1/h225/h225.cnf +++ b/asn1/h225/h225.cnf @@ -620,6 +620,75 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode } #.END +#=== Generic Extensible Framework ======================================================= + +#.FN_HDR GenericData + void *priv_data = actx->private_data; + gef_ctx_t *gefx; + + /* check if not inherited from FeatureDescriptor */ + gefx = gef_ctx_get(actx->private_data); + if (!gefx) { + gefx = gef_ctx_alloc(NULL, "GenericData"); + actx->private_data = gefx; + } +#.FN_FTR + actx->private_data = priv_data; +#.END + +#.FN_HDR GenericData/parameters/_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 FeatureDescriptor + void *priv_data = actx->private_data; + actx->private_data = gef_ctx_alloc(NULL, "FeatureDescriptor"); +#.FN_FTR + actx->private_data = priv_data; +#.END +#---------------------------------------------------------------------------------------- + +#.FN_HDR GenericIdentifier + gef_ctx_t *gefx; +#.FN_FTR + gef_ctx_update_key(gef_ctx_get(actx->private_data)); + /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG GenericIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/ + 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_name_dissector_table, gefx->key, tvb_new_subset(tvb, offset>>3, 0, 0), actx->pinfo, tree); + } + actx->private_data = gefx; /* subdissector could overwrite it */ +#.END + +#.FN_BODY GenericIdentifier/standard VAL_PTR = &value_int + gint32 value_int = -1; + gef_ctx_t *gefx; + +%(DEFAULT_BODY)s + gefx = gef_ctx_get(actx->private_data); + if (gefx) gefx->id = ep_strdup_printf("%%d", value_int); +#.END + +#.FN_BODY GenericIdentifier/oid FN_VARIANT = _str VAL_PTR = &oid_str + const gchar *oid_str = NULL; + gef_ctx_t *gefx; + +%(DEFAULT_BODY)s + gefx = gef_ctx_get(actx->private_data); + if (gefx) gefx->id = oid_str; +#.END + + +#=== end of GEF ========================================================================= + #.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 88490d6bd9..e1943fcb70 100644 --- a/asn1/h225/packet-h225-template.c +++ b/asn1/h225/packet-h225-template.c @@ -55,6 +55,7 @@ #include <epan/h225-persistentdata.h> #include "packet-h235.h" #include "packet-h245.h" +#include "packet-h323.h" #include "packet-q931.h" #include "packet-ssl.h" @@ -83,6 +84,8 @@ static dissector_handle_t data_handle; static dissector_table_t nsp_object_dissector_table; static dissector_table_t nsp_h221_dissector_table; static dissector_table_t tp_dissector_table; +static dissector_table_t gef_name_dissector_table; +static dissector_table_t gef_content_dissector_table; static dissector_handle_t h245_handle=NULL; @@ -291,6 +294,8 @@ void proto_register_h225(void) { nsp_object_dissector_table = register_dissector_table("h225.nsp.object", "H.225 NonStandardParameter (object)", FT_STRING, BASE_NONE); nsp_h221_dissector_table = register_dissector_table("h225.nsp.h221", "H.225 NonStandardParameter (h221)", FT_UINT32, BASE_HEX); tp_dissector_table = register_dissector_table("h225.tp", "H.225 TunnelledProtocol", FT_STRING, BASE_NONE); + gef_name_dissector_table = register_dissector_table("h225.gef.name", "H.225 Generic Extensible Framework (names)", FT_STRING, BASE_NONE); + gef_content_dissector_table = register_dissector_table("h225.gef.content", "H.225 Generic Extensible Framework", FT_STRING, BASE_NONE); register_init_routine(&h225_init_routine); h225_tap = register_tap("h225"); diff --git a/asn1/h235/Makefile.common b/asn1/h235/Makefile.common index fe9adec5fc..2ef4bba16f 100644 --- a/asn1/h235/Makefile.common +++ b/asn1/h235/Makefile.common @@ -20,9 +20,10 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -PROTOCOL_NAME=h235 +PROTOCOL_NAME = h235 -DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c \ +DISSECTOR_FILES = \ + packet-$(PROTOCOL_NAME).c \ packet-$(PROTOCOL_NAME).h NEED_PACKET_PROTO_H = 1 @@ -53,5 +54,6 @@ EXTRA_CNF = \ ../h225/h225-exp.cnf ../h225/h225-exp.cnf: - (cd ../h235 && $(MAKE_CNF_EXPORT)) + (cd ../h225 && $(MAKE_CNF_EXPORT)) + diff --git a/asn1/h235/h235.cnf b/asn1/h235/h235.cnf index 5681c06d57..98644aa03f 100644 --- a/asn1/h235/h235.cnf +++ b/asn1/h235/h235.cnf @@ -16,10 +16,13 @@ ClearToken CryptoToken AuthenticationMechanism -SrtpCryptoCapability SrtpKeys #.END +#.PDU_NEW +SrtpCryptoCapability +#.END + #.OMIT_ASSIGNMENT ECGDSASignature H235CertificateSignature diff --git a/asn1/h235/packet-h235-template.c b/asn1/h235/packet-h235-template.c index 82f75869c2..235017b624 100644 --- a/asn1/h235/packet-h235-template.c +++ b/asn1/h235/packet-h235-template.c @@ -111,6 +111,10 @@ void proto_register_h235(void) { add_oid_str_name(OID_TG, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 70 - TG"); /* H.235.7, Chapter 9.5 */ add_oid_str_name(OID_SG, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 71 - SG"); + /* H.235.8, Chapter 4.2, Table 2 */ + add_oid_str_name("0.0.8.235.0.4.91", "itu-t(0) recommendation(0) h(8) 235 version(0) 4 91 - AES_CM_128_HMAC_SHA1_80"); + add_oid_str_name("0.0.8.235.0.4.92", "itu-t(0) recommendation(0) h(8) 235 version(0) 4 92 - AES_CM_128_HMAC_SHA1_32"); + add_oid_str_name("0.0.8.235.0.4.93", "itu-t(0) recommendation(0) h(8) 235 version(0) 4 93 - F8_128_HMAC_SHA1_80"); } @@ -120,23 +124,27 @@ void proto_reg_handoff_h235(void) { mikey_handle = find_dissector("mikey"); /* H.235.7, Chapter 7.1, MIKEY operation at "session level" */ - dissector_add_string("h245.gen_par", OID_MIKEY "-0", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_PS "-0", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_DHHMAC "-0", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_PK_SIGN "-0", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_DH_SIGN "-0", mikey_handle); - dissector_add_string("h245.gen_par", "EncryptionSync-0", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY "/nonCollapsing/0", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PS "/nonCollapsing/0", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DHHMAC "/nonCollapsing/0", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PK_SIGN "/nonCollapsing/0", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DH_SIGN "/nonCollapsing/0", mikey_handle); + dissector_add_string("h245.gef.content", "EncryptionSync/0", mikey_handle); /* H.235.7, Chapter 7.2, MIKEY operation at "media level" */ - dissector_add_string("h245.gen_par", "EncryptionSync-76", mikey_handle); - dissector_add_string("h245.gen_par", "EncryptionSync-72", mikey_handle); - dissector_add_string("h245.gen_par", "EncryptionSync-73", mikey_handle); - dissector_add_string("h245.gen_par", "EncryptionSync-74", mikey_handle); - dissector_add_string("h245.gen_par", "EncryptionSync-75", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY "-76", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_PS "-72", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_DHHMAC "-73", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_PK_SIGN "-74", mikey_handle); - dissector_add_string("h245.gen_par", OID_MIKEY_DH_SIGN "-75", mikey_handle); + dissector_add_string("h245.gef.content", "EncryptionSync/76", mikey_handle); + dissector_add_string("h245.gef.content", "EncryptionSync/72", mikey_handle); + dissector_add_string("h245.gef.content", "EncryptionSync/73", mikey_handle); + dissector_add_string("h245.gef.content", "EncryptionSync/74", mikey_handle); + dissector_add_string("h245.gef.content", "EncryptionSync/75", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY "/nonCollapsing/76", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PS "/nonCollapsing/72", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DHHMAC "/nonCollapsing/73", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_PK_SIGN "/nonCollapsing/74", mikey_handle); + dissector_add_string("h245.gef.content", "GenericCapability/" OID_MIKEY_DH_SIGN "/nonCollapsing/75", mikey_handle); + + /* H.235.8, Chapter 4.1.2, SrtpCryptoCapability transport */ + dissector_add_string("h245.gef.content", "GenericCapability/0.0.8.235.0.4.90/nonCollapsingRaw", + new_create_dissector_handle(dissect_SrtpCryptoCapability_PDU, proto_h235)); } 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"); diff --git a/asn1/h323/Makefile.am b/asn1/h323/Makefile.am new file mode 100644 index 0000000000..0b7ca0ada3 --- /dev/null +++ b/asn1/h323/Makefile.am @@ -0,0 +1,26 @@ +# $Id: Makefile.am 23085 2007-10-07 21:07:33Z jmayer $
+#
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+include ../Makefile.preinc
+include Makefile.common
+include ../Makefile.inc
+
diff --git a/asn1/h323/Makefile.common b/asn1/h323/Makefile.common new file mode 100644 index 0000000000..152abac171 --- /dev/null +++ b/asn1/h323/Makefile.common @@ -0,0 +1,53 @@ +# $Id: Makefile.common 22951 2007-09-25 11:58:35Z kukosa $
+#
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+PROTOCOL_NAME = h323
+
+DISSECTOR_FILES = \
+ packet-$(PROTOCOL_NAME).c \
+ packet-$(PROTOCOL_NAME).h
+
+NEED_PACKET_PROTO_H = 1
+
+EXT_ASN_FILE_LIST =
+
+ASN_FILE_LIST = \
+ RAS-PROTOCOL-TUNNEL.asn \
+ ROBUSTNESS-DATA.asn
+
+EXTRA_DIST = \
+ $(ASN_FILE_LIST) \
+ packet-$(PROTOCOL_NAME)-template.c \
+ $(PROTOCOL_NAME).cnf
+
+SRC_FILES = \
+ $(EXTRA_DIST) \
+ $(EXT_ASN_FILE_LIST)
+
+A2W_FLAGS =
+
+EXTRA_CNF = \
+ ../h225/h225-exp.cnf
+
+../h225/h225-exp.cnf:
+ (cd ../h225 && $(MAKE_CNF_EXPORT))
+
diff --git a/asn1/h323/Makefile.nmake b/asn1/h323/Makefile.nmake new file mode 100644 index 0000000000..d8dc2a43eb --- /dev/null +++ b/asn1/h323/Makefile.nmake @@ -0,0 +1,29 @@ +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id: Makefile.nmake 23085 2007-10-07 21:07:33Z jmayer $
+#
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+include ../../config.nmake
+include ../Makefile.preinc.nmake
+include Makefile.common
+include ../Makefile.inc.nmake
+
diff --git a/asn1/h323/RAS-PROTOCOL-TUNNEL.asn b/asn1/h323/RAS-PROTOCOL-TUNNEL.asn new file mode 100644 index 0000000000..20a7c41902 --- /dev/null +++ b/asn1/h323/RAS-PROTOCOL-TUNNEL.asn @@ -0,0 +1,27 @@ +-- RAS-PROTOCOL-TUNNEL.asn +-- +-- Taken from ITU ASN.1 database +-- http://www.itu.int/ITU-T/asn1/database/itu-t/h/h323/2006/RAS-PROTOCOL-TUNNEL.asn +-- +-- $Id: H235-SECURITY-MESSAGES.asn 18339 2006-06-05 06:52:50Z kukosa $ +-- + +-- Module RAS-PROTOCOL-TUNNEL (H.323:06/2006) +RAS-PROTOCOL-TUNNEL DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS TunnelledProtocol, NonStandardParameter + FROM H323-MESSAGES; + +RasTunnelledSignallingMessage ::= SEQUENCE { + tunnelledProtocolID TunnelledProtocol, -- tunnelled signalling protocol ID + messageContent SEQUENCE OF OCTET STRING, -- sequence of entire message(s) + tunnellingRequired NULL OPTIONAL, + nonStandardData NonStandardParameter OPTIONAL, + ... +} + +END + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/asn1/h323/ROBUSTNESS-DATA.asn b/asn1/h323/ROBUSTNESS-DATA.asn new file mode 100644 index 0000000000..b2fe7aed6c --- /dev/null +++ b/asn1/h323/ROBUSTNESS-DATA.asn @@ -0,0 +1,89 @@ +-- ROBUSTNESS-DATA.asn +-- +-- $Id: H235-SECURITY-MESSAGES.asn 18339 2006-06-05 06:52:50Z kukosa $ +-- +-- ITU-T Rec. H.323 (06/2006) +-- +-- Annex R - Robustness methods for H.323 entities +-- R.11 GenericData usage +-- + +ROBUSTNESS-DATA DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + TransportAddress, AlternateTransportAddresses, + GloballyUniqueID, TimeToLive + FROM H323-MESSAGES; + +RobustnessData ::= SEQUENCE { + versionID INTEGER(1..256), + robustnessData + CHOICE { + rrqData Rrq-RD, + rcfData Rcf-RD, + setupData Setup-RD, + connectData Connect-RD, + statusData Status-RD, + statusInquiryData StatusInquiry-RD, + ... + }, + ... +} + +BackupCallSignalAddresses ::= SEQUENCE OF + CHOICE { + tcp TransportAddress, + alternateTransport AlternateTransportAddresses, + ... + } + +GloballyUniqueIdentifier ::= GloballyUniqueID + +Rrq-RD ::= SEQUENCE { + backupCallSignalAddresses BackupCallSignalAddresses, + hasSharedRepository NULL OPTIONAL, + ... +} + +Rcf-RD ::= SEQUENCE { + hasSharedRepository NULL OPTIONAL, + ..., + irrFrequency INTEGER(1..65535) OPTIONAL -- in seconds; + -- not present + -- if GK does not + -- want IRRs for + -- recovered calls +} + +Setup-RD ::= SEQUENCE { + backupCallSignalAddresses BackupCallSignalAddresses, + hasSharedRepository NULL OPTIONAL, + endpointGuid GloballyUniqueIdentifier OPTIONAL, + ... +} + +Connect-RD ::= SEQUENCE { + backupCallSignalAddresses BackupCallSignalAddresses, + hasSharedRepository NULL OPTIONAL, + endpointGuid GloballyUniqueIdentifier OPTIONAL, + ... +} + +Status-RD ::= SEQUENCE { + h245Address TransportAddress OPTIONAL, + fastStart SEQUENCE OF OCTET STRING OPTIONAL, + ..., + resetH245 NULL OPTIONAL +} + +StatusInquiry-RD ::= SEQUENCE { + h245Address TransportAddress OPTIONAL, + timeToLive TimeToLive OPTIONAL, + includeFastStart NULL OPTIONAL, + ... +} + +robustnessId GenericIdentifier ::= standard:1 + +END diff --git a/asn1/h323/h323.cnf b/asn1/h323/h323.cnf new file mode 100644 index 0000000000..2ca21adaef --- /dev/null +++ b/asn1/h323/h323.cnf @@ -0,0 +1,17 @@ +# h323.cnf
+# H.323 conformation file
+# 2007 Tomas Kukosa
+
+# $Id$
+
+#.IMPORT ../h225/h225-exp.cnf
+
+#.OPT
+PER
+ALIGNED
+#.END
+
+#.PDU_NEW
+RasTunnelledSignallingMessage
+RobustnessData
+#.END
diff --git a/asn1/h323/packet-h323-template.c b/asn1/h323/packet-h323-template.c new file mode 100644 index 0000000000..bb3d268f61 --- /dev/null +++ b/asn1/h323/packet-h323-template.c @@ -0,0 +1,145 @@ +/* packet-h323.c
+ * Routines for H.323 packet dissection
+ * 2007 Tomas Kukosa
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+#include <epan/oids.h>
+#include <epan/asn1.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-per.h"
+#include "packet-h225.h"
+#include "packet-h323.h"
+
+#define PNAME "H.323"
+#define PSNAME "H.323"
+#define PFNAME "h323"
+
+
+/* Generic Extensible Framework */
+gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type) {
+ gef_ctx_t *gefx;
+
+ gefx = ep_alloc0(sizeof(gef_ctx_t));
+ gefx->signature = GEF_CTX_SIGNATURE;
+ gefx->parent = parent;
+ gefx->type = type;
+ return gefx;
+}
+
+gboolean gef_ctx_check_signature(gef_ctx_t *gefx) {
+ return gefx && (gefx->signature == GEF_CTX_SIGNATURE);
+}
+
+gef_ctx_t* gef_ctx_get(void *ptr) {
+ gef_ctx_t *gefx = (gef_ctx_t*)ptr;
+ asn1_ctx_t *actx = (asn1_ctx_t*)ptr;
+
+ if (!asn1_ctx_check_signature(actx))
+ actx = NULL;
+
+ if (actx)
+ gefx = actx->private_data;
+
+ if (!gef_ctx_check_signature(gefx))
+ gefx = NULL;
+
+ return gefx;
+}
+
+void gef_ctx_update_key(gef_ctx_t *gefx) {
+ const gchar *parent_key;
+
+ if (!gefx) return;
+ parent_key = (gefx->parent) ? gefx->parent->key : NULL;
+ gefx->key = ep_strdup_printf(
+ "%s%s" /* parent prefix */
+ "%s%s%s" /* type, id */
+ "%s%s" /* subid */,
+ (parent_key) ? parent_key : "", (parent_key) ? "/" : "",
+ (gefx->type) ? gefx->type : "", (gefx->type && (gefx->id || gefx->subid)) ? "/" : "", (gefx->id) ? gefx->id : "",
+ (gefx->subid) ? "-" : "", (gefx->subid) ? gefx->subid : ""
+ );
+}
+
+/* Subdissectors */
+static dissector_handle_t q931_handle = NULL;
+
+/* Initialize the protocol and registered fields */
+int proto_h323 = -1;
+#include "packet-h323-hf.c"
+
+/* Initialize the subtree pointers */
+#include "packet-h323-ett.c"
+
+#include "packet-h323-fn.c"
+
+/*--- proto_register_h323 ----------------------------------------------*/
+void proto_register_h323(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] = {
+#include "packet-h323-hfarr.c"
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+#include "packet-h323-ettarr.c"
+ };
+
+ /* Register protocol */
+ proto_h323 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_h323, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+}
+
+
+/*--- proto_reg_handoff_h323 -------------------------------------------*/
+void proto_reg_handoff_h323(void)
+{
+ q931_handle = find_dissector("q931");
+
+ /* H.323, Annex M1, Tunnelling of signalling protocols (QSIG) in H.323 */
+ dissector_add_string("h225.tp", "1.3.12.9", q931_handle);
+
+ /* H.323, Annex M4, Tunnelling of narrow-band signalling syntax (NSS) for H.323 */
+ dissector_add_string("h225.gef.content", "GenericData/1000/1",
+ new_create_dissector_handle(dissect_RasTunnelledSignallingMessage_PDU, proto_h323));
+
+ /* H.323, Annex R, Robustness methods for H.323 entities */
+ dissector_add_string("h225.gef.content", "GenericData/1/1",
+ new_create_dissector_handle(dissect_RobustnessData_PDU, proto_h323));
+}
+
|