diff --git a/asn1/h235/packet-h235-template.c b/asn1/h235/packet-h235-template.c index 690d1d26f6..abb3b80003 100644 --- a/asn1/h235/packet-h235-template.c +++ b/asn1/h235/packet-h235-template.c @@ -43,6 +43,14 @@ #define PSNAME "H.235" #define PFNAME "h235" +#define OID_MIKEY "0.0.8.235.0.3.76" +#define OID_MIKEY_PS "0.0.8.235.0.3.72" +#define OID_MIKEY_DHHMAC "0.0.8.235.0.3.73" +#define OID_MIKEY_PK_SIGN "0.0.8.235.0.3.74" +#define OID_MIKEY_DH_SIGN "0.0.8.235.0.3.75" +#define OID_TG "0.0.8.235.0.3.70" +#define OID_SG "0.0.8.235.0.3.71" + /* Initialize the protocol and registered fields */ int proto_h235 = -1; #include "packet-h235-hf.c" @@ -50,6 +58,8 @@ int proto_h235 = -1; /* Initialize the subtree pointers */ #include "packet-h235-ett.c" +static dissector_handle_t mikey_handle=NULL; + static int dissect_xxx_ToBeSigned(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { PER_NOT_DECODED_YET("ToBeSigned"); @@ -82,18 +92,50 @@ void proto_register_h235(void) { /* OID names */ /* H.235.1, Chapter 15, Table 3 */ /* A */ - add_oid_str_name("0.0.8.235.0.1.1","itu-t(0) recommendation(0) h(8) 235 version(0) 1 1 - all fields in RAS/CS"); - add_oid_str_name("0.0.8.235.0.2.1","itu-t(0) recommendation(0) h(8) 235 version(0) 2 1 - all fields in RAS/CS"); + add_oid_str_name("0.0.8.235.0.1.1", "itu-t(0) recommendation(0) h(8) 235 version(0) 1 1 - all fields in RAS/CS"); + add_oid_str_name("0.0.8.235.0.2.1", "itu-t(0) recommendation(0) h(8) 235 version(0) 2 1 - all fields in RAS/CS"); /* T */ - add_oid_str_name("0.0.8.235.0.1.5","itu-t(0) recommendation(0) h(8) 235 version(0) 1 5 - ClearToken"); - add_oid_str_name("0.0.8.235.0.2.5","itu-t(0) recommendation(0) h(8) 235 version(0) 2 5 - ClearToken"); + add_oid_str_name("0.0.8.235.0.1.5", "itu-t(0) recommendation(0) h(8) 235 version(0) 1 5 - ClearToken"); + add_oid_str_name("0.0.8.235.0.2.5", "itu-t(0) recommendation(0) h(8) 235 version(0) 2 5 - ClearToken"); /* U */ - add_oid_str_name("0.0.8.235.0.1.6","itu-t(0) recommendation(0) h(8) 235 version(0) 1 6 - HMAC-SHA1-96"); - add_oid_str_name("0.0.8.235.0.2.6","itu-t(0) recommendation(0) h(8) 235 version(0) 2 6 - HMAC-SHA1-96"); + add_oid_str_name("0.0.8.235.0.1.6", "itu-t(0) recommendation(0) h(8) 235 version(0) 1 6 - HMAC-SHA1-96"); + add_oid_str_name("0.0.8.235.0.2.6", "itu-t(0) recommendation(0) h(8) 235 version(0) 2 6 - HMAC-SHA1-96"); + /* H.235.7, Chapter 5, Table 1 */ + add_oid_str_name(OID_MIKEY, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 76 - MIKEY"); + add_oid_str_name(OID_MIKEY_PS, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 72 - MIKEY-PS"); + add_oid_str_name(OID_MIKEY_DHHMAC, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 73 - MIKEY-DHHMAC"); + add_oid_str_name(OID_MIKEY_PK_SIGN, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 74 - MIKEY-PK-SIGN"); + add_oid_str_name(OID_MIKEY_DH_SIGN, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 75 - MIKEY-DH-SIGN"); + /* H.235.7, Chapter 8.5 */ + 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"); } /*--- proto_reg_handoff_h235 -------------------------------------------*/ 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); + /* 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); + } diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf index 733f3e8ee9..353049f2b7 100644 --- a/asn1/h245/h245.cnf +++ b/asn1/h245/h245.cnf @@ -503,10 +503,19 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.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; #.END #---------------------------------------------------------------------------------------- +#.FN_HDR GenericCapability + gen_par_prefix = ""; +#.END +#---------------------------------------------------------------------------------------- +#.FN_HDR GenericMessage + gen_par_prefix = ""; +#.END +#---------------------------------------------------------------------------------------- #.FN_HDR GenericMessage/subMessageIdentifier guint32 subMessageIdentifer; @@ -514,6 +523,30 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format VAL_PTR = &subMessageIdentifer #.END #---------------------------------------------------------------------------------------- +#.FN_HDR EncryptionSync + gen_par_prefix = "EncryptionSync"; +#.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); +#.END +#---------------------------------------------------------------------------------------- +#.FN_BODY ParameterIdentifier/standard VAL_PTR = &value_int + gint32 value_int; + +%(DEFAULT_BODY)s + gen_par_str = ep_strdup_printf("%%d", value_int); +#.END +#---------------------------------------------------------------------------------------- +#.FN_BODY ParameterValue/octetString VAL_PTR = &value_tvb + tvbuff_t *value_tvb; + +%(DEFAULT_BODY)s + dissector_try_string(gen_par_dissector_table, gen_par_str, value_tvb, %(ACTX)s->pinfo, %(TREE)s); +#.END +#---------------------------------------------------------------------------------------- #.FN_BODY UnicastAddress/iPAddress/network VAL_PTR = &value_tvb tvbuff_t *value_tvb; diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c index aae2943720..042e483124 100644 --- a/asn1/h245/packet-h245-template.c +++ b/asn1/h245/packet-h245-template.c @@ -64,6 +64,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_handle_t nsp_handle; static dissector_handle_t data_handle; static dissector_handle_t h245_handle; @@ -211,6 +212,8 @@ 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; @@ -381,6 +384,8 @@ 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); + h245_tap = register_tap("h245"); h245dg_tap = register_tap("h245dg"); diff --git a/epan/dissectors/packet-h235.c b/epan/dissectors/packet-h235.c index 7cc2320e1b..db019016f7 100644 --- a/epan/dissectors/packet-h235.c +++ b/epan/dissectors/packet-h235.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-h235.c */ -/* ../../tools/asn2wrs.py -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn */ +/* .\packet-h235.c */ +/* ../../tools/asn2wrs.py -e -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn H235-SRTP.asn */ /* Input file: packet-h235-template.c */ @@ -51,6 +51,14 @@ #define PSNAME "H.235" #define PFNAME "h235" +#define OID_MIKEY "0.0.8.235.0.3.76" +#define OID_MIKEY_PS "0.0.8.235.0.3.72" +#define OID_MIKEY_DHHMAC "0.0.8.235.0.3.73" +#define OID_MIKEY_PK_SIGN "0.0.8.235.0.3.74" +#define OID_MIKEY_DH_SIGN "0.0.8.235.0.3.75" +#define OID_TG "0.0.8.235.0.3.70" +#define OID_SG "0.0.8.235.0.3.71" + /* Initialize the protocol and registered fields */ int proto_h235 = -1; @@ -140,9 +148,32 @@ static int hf_h235_clearSaltingKey = -1; /* OCTET_STRING */ static int hf_h235_paramSsalt = -1; /* Params */ static int hf_h235_keyDerivationOID = -1; /* OBJECT_IDENTIFIER */ static int hf_h235_genericKeyMaterial = -1; /* OCTET_STRING */ +static int hf_h235_SrtpCryptoCapability_item = -1; /* SrtpCryptoInfo */ +static int hf_h235_cryptoSuite = -1; /* OBJECT_IDENTIFIER */ +static int hf_h235_sessionParams = -1; /* SrtpSessionParameters */ +static int hf_h235_allowMKI = -1; /* BOOLEAN */ +static int hf_h235_SrtpKeys_item = -1; /* SrtpKeyParameters */ +static int hf_h235_masterKey = -1; /* OCTET_STRING */ +static int hf_h235_masterSalt = -1; /* OCTET_STRING */ +static int hf_h235_lifetime = -1; /* T_lifetime */ +static int hf_h235_powerOfTwo = -1; /* INTEGER */ +static int hf_h235_specific = -1; /* INTEGER */ +static int hf_h235_mki = -1; /* T_mki */ +static int hf_h235_length = -1; /* INTEGER_1_128 */ +static int hf_h235_value = -1; /* OCTET_STRING */ +static int hf_h235_kdr = -1; /* INTEGER_0_24 */ +static int hf_h235_unencryptedSrtp = -1; /* BOOLEAN */ +static int hf_h235_unencryptedSrtcp = -1; /* BOOLEAN */ +static int hf_h235_unauthenticatedSrtp = -1; /* BOOLEAN */ +static int hf_h235_fecOrder = -1; /* FecOrder */ +static int hf_h235_windowSizeHint = -1; /* INTEGER_64_65535 */ +static int hf_h235_newParameter = -1; /* SEQUENCE_OF_GenericData */ +static int hf_h235_newParameter_item = -1; /* GenericData */ +static int hf_h235_fecBeforeSrtp = -1; /* NULL */ +static int hf_h235_fecAfterSrtp = -1; /* NULL */ /*--- End of included file: packet-h235-hf.c ---*/ -#line 49 "packet-h235-template.c" +#line 57 "packet-h235-template.c" /* Initialize the subtree pointers */ @@ -174,9 +205,20 @@ static gint ett_h235_KeySignedMaterial = -1; static gint ett_h235_ReturnSig = -1; static gint ett_h235_KeySyncMaterial = -1; static gint ett_h235_V3KeySyncMaterial = -1; +static gint ett_h235_SrtpCryptoCapability = -1; +static gint ett_h235_SrtpCryptoInfo = -1; +static gint ett_h235_SrtpKeys = -1; +static gint ett_h235_SrtpKeyParameters = -1; +static gint ett_h235_T_lifetime = -1; +static gint ett_h235_T_mki = -1; +static gint ett_h235_SrtpSessionParameters = -1; +static gint ett_h235_SEQUENCE_OF_GenericData = -1; +static gint ett_h235_FecOrder = -1; /*--- End of included file: packet-h235-ett.c ---*/ -#line 52 "packet-h235-template.c" +#line 60 "packet-h235-template.c" + +static dissector_handle_t mikey_handle=NULL; static int dissect_xxx_ToBeSigned(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { @@ -929,8 +971,182 @@ dissect_h235_EncodedKeySyncMaterial(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ } + +static int +dissect_h235_INTEGER_0_24(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, + 0U, 24U, NULL, FALSE); + + return offset; +} + + +static const per_sequence_t FecOrder_sequence[] = { + { &hf_h235_fecBeforeSrtp , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_NULL }, + { &hf_h235_fecAfterSrtp , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_NULL }, + { NULL, 0, 0, NULL } +}; + +static int +dissect_h235_FecOrder(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, + ett_h235_FecOrder, FecOrder_sequence); + + return offset; +} + + + +static int +dissect_h235_INTEGER_64_65535(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, + 64U, 65535U, NULL, FALSE); + + return offset; +} + + +static const per_sequence_t SEQUENCE_OF_GenericData_sequence_of[1] = { + { &hf_h235_newParameter_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h225_GenericData }, +}; + +static int +dissect_h235_SEQUENCE_OF_GenericData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, + ett_h235_SEQUENCE_OF_GenericData, SEQUENCE_OF_GenericData_sequence_of); + + return offset; +} + + +static const per_sequence_t SrtpSessionParameters_sequence[] = { + { &hf_h235_kdr , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_INTEGER_0_24 }, + { &hf_h235_unencryptedSrtp, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_BOOLEAN }, + { &hf_h235_unencryptedSrtcp, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_BOOLEAN }, + { &hf_h235_unauthenticatedSrtp, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_BOOLEAN }, + { &hf_h235_fecOrder , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_FecOrder }, + { &hf_h235_windowSizeHint , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_INTEGER_64_65535 }, + { &hf_h235_newParameter , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_SEQUENCE_OF_GenericData }, + { NULL, 0, 0, NULL } +}; + +static int +dissect_h235_SrtpSessionParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, + ett_h235_SrtpSessionParameters, SrtpSessionParameters_sequence); + + return offset; +} + + +static const per_sequence_t SrtpCryptoInfo_sequence[] = { + { &hf_h235_cryptoSuite , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_OBJECT_IDENTIFIER }, + { &hf_h235_sessionParams , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_SrtpSessionParameters }, + { &hf_h235_allowMKI , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_BOOLEAN }, + { NULL, 0, 0, NULL } +}; + +static int +dissect_h235_SrtpCryptoInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, + ett_h235_SrtpCryptoInfo, SrtpCryptoInfo_sequence); + + return offset; +} + + +static const per_sequence_t SrtpCryptoCapability_sequence_of[1] = { + { &hf_h235_SrtpCryptoCapability_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h235_SrtpCryptoInfo }, +}; + +int +dissect_h235_SrtpCryptoCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, + ett_h235_SrtpCryptoCapability, SrtpCryptoCapability_sequence_of); + + return offset; +} + + +static const value_string h235_T_lifetime_vals[] = { + { 0, "powerOfTwo" }, + { 1, "specific" }, + { 0, NULL } +}; + +static const per_choice_t T_lifetime_choice[] = { + { 0, &hf_h235_powerOfTwo , ASN1_EXTENSION_ROOT , dissect_h235_INTEGER }, + { 1, &hf_h235_specific , ASN1_EXTENSION_ROOT , dissect_h235_INTEGER }, + { 0, NULL, 0, NULL } +}; + +static int +dissect_h235_T_lifetime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, + ett_h235_T_lifetime, T_lifetime_choice, + NULL); + + return offset; +} + + + +static int +dissect_h235_INTEGER_1_128(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, + 1U, 128U, NULL, FALSE); + + return offset; +} + + +static const per_sequence_t T_mki_sequence[] = { + { &hf_h235_length , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h235_INTEGER_1_128 }, + { &hf_h235_value , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING }, + { NULL, 0, 0, NULL } +}; + +static int +dissect_h235_T_mki(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, + ett_h235_T_mki, T_mki_sequence); + + return offset; +} + + +static const per_sequence_t SrtpKeyParameters_sequence[] = { + { &hf_h235_masterKey , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING }, + { &hf_h235_masterSalt , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h235_OCTET_STRING }, + { &hf_h235_lifetime , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_T_lifetime }, + { &hf_h235_mki , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h235_T_mki }, + { NULL, 0, 0, NULL } +}; + +static int +dissect_h235_SrtpKeyParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, + ett_h235_SrtpKeyParameters, SrtpKeyParameters_sequence); + + return offset; +} + + +static const per_sequence_t SrtpKeys_sequence_of[1] = { + { &hf_h235_SrtpKeys_item , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h235_SrtpKeyParameters }, +}; + +int +dissect_h235_SrtpKeys(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, + ett_h235_SrtpKeys, SrtpKeys_sequence_of); + + return offset; +} + + /*--- End of included file: packet-h235-fn.c ---*/ -#line 60 "packet-h235-template.c" +#line 70 "packet-h235-template.c" /*--- proto_register_h235 ----------------------------------------------*/ @@ -1277,9 +1493,101 @@ void proto_register_h235(void) { { "genericKeyMaterial", "h235.genericKeyMaterial", FT_BYTES, BASE_HEX, NULL, 0, "h235.OCTET_STRING", HFILL }}, + { &hf_h235_SrtpCryptoCapability_item, + { "Item", "h235.SrtpCryptoCapability_item", + FT_NONE, BASE_NONE, NULL, 0, + "h235.SrtpCryptoInfo", HFILL }}, + { &hf_h235_cryptoSuite, + { "cryptoSuite", "h235.cryptoSuite", + FT_OID, BASE_NONE, NULL, 0, + "h235.OBJECT_IDENTIFIER", HFILL }}, + { &hf_h235_sessionParams, + { "sessionParams", "h235.sessionParams", + FT_NONE, BASE_NONE, NULL, 0, + "h235.SrtpSessionParameters", HFILL }}, + { &hf_h235_allowMKI, + { "allowMKI", "h235.allowMKI", + FT_BOOLEAN, 8, NULL, 0, + "h235.BOOLEAN", HFILL }}, + { &hf_h235_SrtpKeys_item, + { "Item", "h235.SrtpKeys_item", + FT_NONE, BASE_NONE, NULL, 0, + "h235.SrtpKeyParameters", HFILL }}, + { &hf_h235_masterKey, + { "masterKey", "h235.masterKey", + FT_BYTES, BASE_HEX, NULL, 0, + "h235.OCTET_STRING", HFILL }}, + { &hf_h235_masterSalt, + { "masterSalt", "h235.masterSalt", + FT_BYTES, BASE_HEX, NULL, 0, + "h235.OCTET_STRING", HFILL }}, + { &hf_h235_lifetime, + { "lifetime", "h235.lifetime", + FT_UINT32, BASE_DEC, VALS(h235_T_lifetime_vals), 0, + "h235.T_lifetime", HFILL }}, + { &hf_h235_powerOfTwo, + { "powerOfTwo", "h235.powerOfTwo", + FT_INT32, BASE_DEC, NULL, 0, + "h235.INTEGER", HFILL }}, + { &hf_h235_specific, + { "specific", "h235.specific", + FT_INT32, BASE_DEC, NULL, 0, + "h235.INTEGER", HFILL }}, + { &hf_h235_mki, + { "mki", "h235.mki", + FT_NONE, BASE_NONE, NULL, 0, + "h235.T_mki", HFILL }}, + { &hf_h235_length, + { "length", "h235.length", + FT_UINT32, BASE_DEC, NULL, 0, + "h235.INTEGER_1_128", HFILL }}, + { &hf_h235_value, + { "value", "h235.value", + FT_BYTES, BASE_HEX, NULL, 0, + "h235.OCTET_STRING", HFILL }}, + { &hf_h235_kdr, + { "kdr", "h235.kdr", + FT_UINT32, BASE_DEC, NULL, 0, + "h235.INTEGER_0_24", HFILL }}, + { &hf_h235_unencryptedSrtp, + { "unencryptedSrtp", "h235.unencryptedSrtp", + FT_BOOLEAN, 8, NULL, 0, + "h235.BOOLEAN", HFILL }}, + { &hf_h235_unencryptedSrtcp, + { "unencryptedSrtcp", "h235.unencryptedSrtcp", + FT_BOOLEAN, 8, NULL, 0, + "h235.BOOLEAN", HFILL }}, + { &hf_h235_unauthenticatedSrtp, + { "unauthenticatedSrtp", "h235.unauthenticatedSrtp", + FT_BOOLEAN, 8, NULL, 0, + "h235.BOOLEAN", HFILL }}, + { &hf_h235_fecOrder, + { "fecOrder", "h235.fecOrder", + FT_NONE, BASE_NONE, NULL, 0, + "h235.FecOrder", HFILL }}, + { &hf_h235_windowSizeHint, + { "windowSizeHint", "h235.windowSizeHint", + FT_UINT32, BASE_DEC, NULL, 0, + "h235.INTEGER_64_65535", HFILL }}, + { &hf_h235_newParameter, + { "newParameter", "h235.newParameter", + FT_UINT32, BASE_DEC, NULL, 0, + "h235.SEQUENCE_OF_GenericData", HFILL }}, + { &hf_h235_newParameter_item, + { "Item", "h235.newParameter_item", + FT_NONE, BASE_NONE, NULL, 0, + "h225.GenericData", HFILL }}, + { &hf_h235_fecBeforeSrtp, + { "fecBeforeSrtp", "h235.fecBeforeSrtp", + FT_NONE, BASE_NONE, NULL, 0, + "h235.NULL", HFILL }}, + { &hf_h235_fecAfterSrtp, + { "fecAfterSrtp", "h235.fecAfterSrtp", + FT_NONE, BASE_NONE, NULL, 0, + "h235.NULL", HFILL }}, /*--- End of included file: packet-h235-hfarr.c ---*/ -#line 68 "packet-h235-template.c" +#line 78 "packet-h235-template.c" }; /* List of subtrees */ @@ -1313,9 +1621,18 @@ void proto_register_h235(void) { &ett_h235_ReturnSig, &ett_h235_KeySyncMaterial, &ett_h235_V3KeySyncMaterial, + &ett_h235_SrtpCryptoCapability, + &ett_h235_SrtpCryptoInfo, + &ett_h235_SrtpKeys, + &ett_h235_SrtpKeyParameters, + &ett_h235_T_lifetime, + &ett_h235_T_mki, + &ett_h235_SrtpSessionParameters, + &ett_h235_SEQUENCE_OF_GenericData, + &ett_h235_FecOrder, /*--- End of included file: packet-h235-ettarr.c ---*/ -#line 73 "packet-h235-template.c" +#line 83 "packet-h235-template.c" }; /* Register protocol */ @@ -1328,18 +1645,50 @@ void proto_register_h235(void) { /* OID names */ /* H.235.1, Chapter 15, Table 3 */ /* A */ - add_oid_str_name("0.0.8.235.0.1.1","itu-t(0) recommendation(0) h(8) 235 version(0) 1 1 - all fields in RAS/CS"); - add_oid_str_name("0.0.8.235.0.2.1","itu-t(0) recommendation(0) h(8) 235 version(0) 2 1 - all fields in RAS/CS"); + add_oid_str_name("0.0.8.235.0.1.1", "itu-t(0) recommendation(0) h(8) 235 version(0) 1 1 - all fields in RAS/CS"); + add_oid_str_name("0.0.8.235.0.2.1", "itu-t(0) recommendation(0) h(8) 235 version(0) 2 1 - all fields in RAS/CS"); /* T */ - add_oid_str_name("0.0.8.235.0.1.5","itu-t(0) recommendation(0) h(8) 235 version(0) 1 5 - ClearToken"); - add_oid_str_name("0.0.8.235.0.2.5","itu-t(0) recommendation(0) h(8) 235 version(0) 2 5 - ClearToken"); + add_oid_str_name("0.0.8.235.0.1.5", "itu-t(0) recommendation(0) h(8) 235 version(0) 1 5 - ClearToken"); + add_oid_str_name("0.0.8.235.0.2.5", "itu-t(0) recommendation(0) h(8) 235 version(0) 2 5 - ClearToken"); /* U */ - add_oid_str_name("0.0.8.235.0.1.6","itu-t(0) recommendation(0) h(8) 235 version(0) 1 6 - HMAC-SHA1-96"); - add_oid_str_name("0.0.8.235.0.2.6","itu-t(0) recommendation(0) h(8) 235 version(0) 2 6 - HMAC-SHA1-96"); + add_oid_str_name("0.0.8.235.0.1.6", "itu-t(0) recommendation(0) h(8) 235 version(0) 1 6 - HMAC-SHA1-96"); + add_oid_str_name("0.0.8.235.0.2.6", "itu-t(0) recommendation(0) h(8) 235 version(0) 2 6 - HMAC-SHA1-96"); + /* H.235.7, Chapter 5, Table 1 */ + add_oid_str_name(OID_MIKEY, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 76 - MIKEY"); + add_oid_str_name(OID_MIKEY_PS, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 72 - MIKEY-PS"); + add_oid_str_name(OID_MIKEY_DHHMAC, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 73 - MIKEY-DHHMAC"); + add_oid_str_name(OID_MIKEY_PK_SIGN, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 74 - MIKEY-PK-SIGN"); + add_oid_str_name(OID_MIKEY_DH_SIGN, "itu-t(0) recommendation(0) h(8) 235 version(0) 3 75 - MIKEY-DH-SIGN"); + /* H.235.7, Chapter 8.5 */ + 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"); } /*--- proto_reg_handoff_h235 -------------------------------------------*/ 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); + /* 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); + } diff --git a/epan/dissectors/packet-h235.h b/epan/dissectors/packet-h235.h index 4c01325fee..ee901d3aa5 100644 --- a/epan/dissectors/packet-h235.h +++ b/epan/dissectors/packet-h235.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-h235.h */ -/* ../../tools/asn2wrs.py -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn */ +/* .\packet-h235.h */ +/* ../../tools/asn2wrs.py -e -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn H235-SRTP.asn */ /* Input file: packet-h235-template.h */ @@ -46,6 +46,8 @@ int dissect_h235_SIGNEDxxx(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ int dissect_h235_ENCRYPTEDxxx(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h235_HASHEDxxx(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h235_CryptoToken(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +int dissect_h235_SrtpCryptoCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +int dissect_h235_SrtpKeys(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); /*--- End of included file: packet-h235-exp.h ---*/ #line 30 "packet-h235-template.h" diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index ae86b5045d..ba7b683e34 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-h245.c */ +/* .\packet-h245.c */ /* ../../tools/asn2wrs.py -e -p h245 -c h245.cnf -s packet-h245-template MULTIMEDIA-SYSTEM-CONTROL.asn */ /* Input file: packet-h245-template.c */ @@ -72,6 +72,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_handle_t nsp_handle; static dissector_handle_t data_handle; static dissector_handle_t h245_handle; @@ -219,6 +220,8 @@ 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; @@ -967,18 +970,18 @@ static int hf_h245_standardOid = -1; /* T_standardOid */ static int hf_h245_h221NonStandard = -1; /* NonStandardParameter */ static int hf_h245_uuid = -1; /* OCTET_STRING_SIZE_16 */ static int hf_h245_domainBased = -1; /* IA5String_SIZE_1_64 */ -static int hf_h245_parameterIdentifier = -1; /* ParameterIdentifier */ +static int hf_h245_parameterIdentifier = -1; /* T_parameterIdentifier */ static int hf_h245_parameterValue = -1; /* ParameterValue */ static int hf_h245_supersedes = -1; /* SEQUENCE_OF_ParameterIdentifier */ static int hf_h245_supersedes_item = -1; /* ParameterIdentifier */ -static int hf_h245_standard = -1; /* INTEGER_0_127 */ +static int hf_h245_standard = -1; /* T_standard */ static int hf_h245_logical = -1; /* NULL */ static int hf_h245_booleanArray = -1; /* INTEGER_0_255 */ static int hf_h245_unsignedMin = -1; /* INTEGER_0_65535 */ static int hf_h245_unsignedMax = -1; /* INTEGER_0_65535 */ static int hf_h245_unsigned32Min = -1; /* INTEGER_0_4294967295 */ static int hf_h245_unsigned32Max = -1; /* INTEGER_0_4294967295 */ -static int hf_h245_octetString = -1; /* OCTET_STRING */ +static int hf_h245_octetString = -1; /* T_octetString */ static int hf_h245_genericParameters = -1; /* SEQUENCE_OF_GenericParameter */ static int hf_h245_genericParameters_item = -1; /* GenericParameter */ static int hf_h245_multiplexFormat = -1; /* MultiplexFormat */ @@ -1682,7 +1685,7 @@ static int hf_h245_encrypted = -1; /* OCTET_STRING */ static int hf_h245_encryptedAlphanumeric = -1; /* EncryptedAlphanumeric */ /*--- End of included file: packet-h245-hf.c ---*/ -#line 279 "packet-h245-template.c" +#line 282 "packet-h245-template.c" /* Initialize the subtree pointers */ @@ -2178,7 +2181,7 @@ static gint ett_h245_FlowControlIndication = -1; static gint ett_h245_MobileMultilinkReconfigurationIndication = -1; /*--- End of included file: packet-h245-ett.c ---*/ -#line 282 "packet-h245-template.c" +#line 285 "packet-h245-template.c" /*--- Included file: packet-h245-fn.c ---*/ @@ -2259,7 +2262,7 @@ static const per_sequence_t H221NonStandardID_sequence[] = { static int dissect_h245_H221NonStandardID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 703 "h245.cnf" +#line 736 "h245.cnf" t35CountryCode = 0; t35Extension = 0; manufacturerCode = 0; @@ -2267,7 +2270,7 @@ dissect_h245_H221NonStandardID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_H221NonStandardID, H221NonStandardID_sequence); -#line 707 "h245.cnf" +#line 740 "h245.cnf" h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode; proto_tree_add_uint(tree, hf_h245Manufacturer, tvb, (offset>>3)-4, 4, h221NonStandard); @@ -2289,7 +2292,7 @@ static const per_choice_t NonStandardIdentifier_choice[] = { static int dissect_h245_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 684 "h245.cnf" +#line 717 "h245.cnf" guint32 value; nsiOID = ""; @@ -2318,7 +2321,7 @@ dissect_h245_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_h245_T_nsd_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 718 "h245.cnf" +#line 751 "h245.cnf" tvbuff_t *next_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -2341,7 +2344,7 @@ static const per_sequence_t NonStandardParameter_sequence[] = { static int dissect_h245_NonStandardParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 716 "h245.cnf" +#line 749 "h245.cnf" nsp_handle = NULL; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -3296,6 +3299,7 @@ dissect_h245_T_standardOid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ offset = dissect_per_object_identifier_str(tvb, offset, actx, tree, hf_index, &standard_oid_str); #line 506 "h245.cnf" + 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; @@ -3361,9 +3365,15 @@ dissect_h245_INTEGER_0_4294967295(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int -dissect_h245_INTEGER_0_127(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +dissect_h245_T_standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 537 "h245.cnf" + gint32 value_int; + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, - 0U, 127U, NULL, FALSE); + 0U, 127U, &value_int, FALSE); + + gen_par_str = ep_strdup_printf("%d", value_int); + return offset; } @@ -3378,7 +3388,7 @@ static const value_string h245_ParameterIdentifier_vals[] = { }; static const per_choice_t ParameterIdentifier_choice[] = { - { 0, &hf_h245_standard , ASN1_EXTENSION_ROOT , dissect_h245_INTEGER_0_127 }, + { 0, &hf_h245_standard , ASN1_EXTENSION_ROOT , dissect_h245_T_standard }, { 1, &hf_h245_h221NonStandard, ASN1_EXTENSION_ROOT , dissect_h245_NonStandardParameter }, { 2, &hf_h245_uuid , ASN1_EXTENSION_ROOT , dissect_h245_OCTET_STRING_SIZE_16 }, { 3, &hf_h245_domainBased , ASN1_EXTENSION_ROOT , dissect_h245_IA5String_SIZE_1_64 }, @@ -3395,6 +3405,34 @@ dissect_h245_ParameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * } + +static int +dissect_h245_T_parameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_h245_ParameterIdentifier(tvb, offset, actx, tree, hf_index); + +#line 533 "h245.cnf" + gen_par_str = ep_strdup_printf("%s-%s", gen_par_prefix, gen_par_str); + + return offset; +} + + + +static int +dissect_h245_T_octetString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 544 "h245.cnf" + tvbuff_t *value_tvb; + + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, + NO_BOUND, NO_BOUND, &value_tvb); + + dissector_try_string(gen_par_dissector_table, gen_par_str, value_tvb, actx->pinfo, tree); + + + return offset; +} + + static const per_sequence_t SEQUENCE_OF_GenericParameter_sequence_of[1] = { { &hf_h245_messageContent_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h245_GenericParameter }, }; @@ -3427,7 +3465,7 @@ static const per_choice_t ParameterValue_choice[] = { { 3, &hf_h245_unsignedMax , ASN1_EXTENSION_ROOT , dissect_h245_INTEGER_0_65535 }, { 4, &hf_h245_unsigned32Min , ASN1_EXTENSION_ROOT , dissect_h245_INTEGER_0_4294967295 }, { 5, &hf_h245_unsigned32Max , ASN1_EXTENSION_ROOT , dissect_h245_INTEGER_0_4294967295 }, - { 6, &hf_h245_octetString , ASN1_EXTENSION_ROOT , dissect_h245_OCTET_STRING }, + { 6, &hf_h245_octetString , ASN1_EXTENSION_ROOT , dissect_h245_T_octetString }, { 7, &hf_h245_genericParameters, ASN1_EXTENSION_ROOT , dissect_h245_SEQUENCE_OF_GenericParameter }, { 0, NULL, 0, NULL } }; @@ -3456,7 +3494,7 @@ dissect_h245_SEQUENCE_OF_ParameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, static const per_sequence_t GenericParameter_sequence[] = { - { &hf_h245_parameterIdentifier, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h245_ParameterIdentifier }, + { &hf_h245_parameterIdentifier, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h245_T_parameterIdentifier }, { &hf_h245_parameterValue , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h245_ParameterValue }, { &hf_h245_supersedes , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_SEQUENCE_OF_ParameterIdentifier }, { NULL, 0, 0, NULL } @@ -3464,6 +3502,9 @@ static const per_sequence_t GenericParameter_sequence[] = { static int dissect_h245_GenericParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 531 "h245.cnf" + gen_par_str = ""; + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_GenericParameter, GenericParameter_sequence); @@ -3483,6 +3524,9 @@ static const per_sequence_t GenericCapability_sequence[] = { static int dissect_h245_GenericCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 512 "h245.cnf" + gen_par_prefix = ""; + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_GenericCapability, GenericCapability_sequence); @@ -3670,6 +3714,16 @@ dissect_h245_T_payloadDescriptor(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * } + +static int +dissect_h245_INTEGER_0_127(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, + 0U, 127U, NULL, FALSE); + + return offset; +} + + static const per_sequence_t RTPPayloadType_sequence[] = { { &hf_h245_payloadDescriptor, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h245_T_payloadDescriptor }, { &hf_h245_payloadType , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_INTEGER_0_127 }, @@ -6051,7 +6105,7 @@ dissect_h245_SET_SIZE_1_256_OF_CapabilityDescriptor(tvbuff_t *tvb _U_, int offse static int dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 511 "h245.cnf" +#line 520 "h245.cnf" guint32 subMessageIdentifer; @@ -6071,6 +6125,9 @@ static const per_sequence_t GenericMessage_sequence[] = { static int dissect_h245_GenericMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 516 "h245.cnf" + gen_par_prefix = ""; + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_GenericMessage, GenericMessage_sequence); @@ -7291,7 +7348,7 @@ dissect_h245_V76LogicalChannelParameters(tvbuff_t *tvb _U_, int offset _U_, asn1 static int dissect_h245_Ipv4_network(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 518 "h245.cnf" +#line 551 "h245.cnf" tvbuff_t *value_tvb; @@ -7313,7 +7370,7 @@ dissect_h245_Ipv4_network(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U static int dissect_h245_TsapIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 531 "h245.cnf" +#line 564 "h245.cnf" guint32 tsapIdentifier; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -7572,14 +7629,14 @@ dissect_h245_TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_h245_T_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 549 "h245.cnf" +#line 582 "h245.cnf" media_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 579 "h245.cnf" +#line 612 "h245.cnf" media_channel = FALSE; @@ -7591,14 +7648,14 @@ dissect_h245_T_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_h245_T_mediaControlChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 561 "h245.cnf" +#line 594 "h245.cnf" media_control_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 585 "h245.cnf" +#line 618 "h245.cnf" media_control_channel = FALSE; @@ -7778,7 +7835,7 @@ static const per_choice_t OLC_rev_multiplexParameters_choice[] = { static int dissect_h245_OLC_rev_multiplexParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 635 "h245.cnf" +#line 668 "h245.cnf" media_channel = FALSE; @@ -7789,7 +7846,7 @@ dissect_h245_OLC_rev_multiplexParameters(tvbuff_t *tvb _U_, int offset _U_, asn1 ett_h245_OLC_rev_multiplexParameters, OLC_rev_multiplexParameters_choice, NULL); -#line 643 "h245.cnf" +#line 676 "h245.cnf" if (!actx->pinfo->fd->flags.visited) { if (codec_type && (strcmp(codec_type, "t38fax")==0)) { @@ -8014,6 +8071,9 @@ static const per_sequence_t EncryptionSync_sequence[] = { static int dissect_h245_EncryptionSync(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 527 "h245.cnf" + gen_par_prefix = "EncryptionSync"; + offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_EncryptionSync, EncryptionSync_sequence); @@ -10270,14 +10330,14 @@ dissect_h245_OLC_ack_reverseLogicalChannelParameters(tvbuff_t *tvb _U_, int offs static int dissect_h245_Ack_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 543 "h245.cnf" +#line 576 "h245.cnf" media_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 567 "h245.cnf" +#line 600 "h245.cnf" media_channel = FALSE; @@ -10289,14 +10349,14 @@ dissect_h245_Ack_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_h245_Ack_mediaControlChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 555 "h245.cnf" +#line 588 "h245.cnf" media_control_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 573 "h245.cnf" +#line 606 "h245.cnf" media_control_channel = FALSE; @@ -10337,7 +10397,7 @@ static const per_choice_t T_forwardMultiplexAckParameters_choice[] = { static int dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 591 "h245.cnf" +#line 624 "h245.cnf" media_channel = FALSE; @@ -10348,7 +10408,7 @@ dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb _U_, int offset _U_, ett_h245_T_forwardMultiplexAckParameters, T_forwardMultiplexAckParameters_choice, NULL); -#line 599 "h245.cnf" +#line 632 "h245.cnf" if (!actx->pinfo->fd->flags.visited) { if (codec_type && strcmp(codec_type, "t38fax")==0) { @@ -13788,7 +13848,7 @@ static void dissect_OpenLogicalChannel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-h245-fn.c ---*/ -#line 284 "packet-h245-template.c" +#line 287 "packet-h245-template.c" static void dissect_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) @@ -16586,7 +16646,7 @@ void proto_register_h245(void) { { &hf_h245_parameterIdentifier, { "parameterIdentifier", "h245.parameterIdentifier", FT_UINT32, BASE_DEC, VALS(h245_ParameterIdentifier_vals), 0, - "h245.ParameterIdentifier", HFILL }}, + "h245.T_parameterIdentifier", HFILL }}, { &hf_h245_parameterValue, { "parameterValue", "h245.parameterValue", FT_UINT32, BASE_DEC, VALS(h245_ParameterValue_vals), 0, @@ -16602,7 +16662,7 @@ void proto_register_h245(void) { { &hf_h245_standard, { "standard", "h245.standard", FT_UINT32, BASE_DEC, NULL, 0, - "h245.INTEGER_0_127", HFILL }}, + "h245.T_standard", HFILL }}, { &hf_h245_logical, { "logical", "h245.logical", FT_NONE, BASE_NONE, NULL, 0, @@ -16630,7 +16690,7 @@ void proto_register_h245(void) { { &hf_h245_octetString, { "octetString", "h245.octetString", FT_BYTES, BASE_HEX, NULL, 0, - "h245.OCTET_STRING", HFILL }}, + "h245.T_octetString", HFILL }}, { &hf_h245_genericParameters, { "genericParameter", "h245.genericParameter", FT_UINT32, BASE_DEC, NULL, 0, @@ -19437,7 +19497,7 @@ void proto_register_h245(void) { "h245.EncryptedAlphanumeric", HFILL }}, /*--- End of included file: packet-h245-hfarr.c ---*/ -#line 352 "packet-h245-template.c" +#line 355 "packet-h245-template.c" }; /* List of subtrees */ @@ -19936,7 +19996,7 @@ void proto_register_h245(void) { &ett_h245_MobileMultilinkReconfigurationIndication, /*--- End of included file: packet-h245-ettarr.c ---*/ -#line 358 "packet-h245-template.c" +#line 361 "packet-h245-template.c" }; module_t *h245_module; @@ -19963,6 +20023,8 @@ 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); + h245_tap = register_tap("h245"); h245dg_tap = register_tap("h245dg"); diff --git a/epan/dissectors/packet-mikey.c b/epan/dissectors/packet-mikey.c index 54766a6652..950c824b29 100644 --- a/epan/dissectors/packet-mikey.c +++ b/epan/dissectors/packet-mikey.c @@ -1590,6 +1590,7 @@ proto_register_mikey(void) /* Register the protocol name and description */ proto_mikey = proto_register_protocol("Multimedia Internet KEYing", "MIKEY", "mikey"); + register_dissector("mikey", dissect_mikey, proto_mikey); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_mikey, hf, array_length(hf));