-/*
-Alternative H245 dissector.
-
-Ethereal can not determine automatically what is H245 and what is not
-without the other support protocols such as H225
-so you will have to select packets you know are H245 and specify H245
-with DecodeAs.
-
-
-There are a few places in the dissector where it is known the functionality
-is not implemented yet. These are indicated by the presence of the
-NOT_DECODED_YET() macro which both prints information on stdout and puts
-"something unknown here" in the tree pane.
-Whenever this is seen in a capture file this indicates that dissection could
-not continue properly and thus everything after this tree item will be
-just random dissection junk.
-
-
-There is a flag which controls whether internal PER bits will be placed in
-the tree or not.
-This is controlled by a preference
-
-
-What needs to be done?
-TODO:
-* Test the capture with as many different capture files as possible and verify
-it against machinegenerated one.
-* Identify example captures that contain constructs that are not decoded yet
-so using a real example an implementation can be written and verified.
-* Clean up and rename a lot of hf_index fields to have better names.
-Much of it was generated by emacs scripts and sometimes there will be
-placed in the tree names of the construct/type such as OctetString
-instead of the name of the field such as madeUpAscIIStringFieldName
-* Clean up several hf_index fields and collaps duplicates such as
-all those bitRate fields which should be collapsed into a generic
-hf_h245_bitRate field where the actual dissector function reads the value from
-the tvb and translates it into bits/second
-* Adding nice COL_INFO entries for the parts of the data that is important
-* Cleaning up the PER helpers.
-etc etc etc
-All in all a lot of work.
-
-
-*/
/* packet-h245.c
* Routines for H.245 packet dissection
* 2003 Ronnie Sahlberg
* with great support with testing and providing capturefiles
* from Martin Regner
*
- * $Id: packet-h245.c,v 1.22 2003/07/16 09:23:56 sahlberg Exp $
+ *
+ * Maintained by Andreas Sikkema (andreas.sikkema@philips.com)
+ *
+ * $Id: packet-h245.c,v 1.35 2003/09/04 18:55:54 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#endif
#include <glib.h>
+#include <adler32.h>
#include <epan/packet.h>
+#include <epan/conversation.h>
#include <stdio.h>
#include <string.h>
#include "packet-tpkt.h"
#include "packet-per.h"
+static dissector_handle_t rtp_handle=NULL;
+static dissector_handle_t rtcp_handle=NULL;
+
static dissector_handle_t h245_handle;
static dissector_handle_t MultimediaSystemControlMessage_handle;
-static int proto_h245 = -1;
+static int proto_h245 = -1; /* h245 over tpkt */
static int hf_h245_rfc_number = -1;
static int hf_h245_pdu_type = -1;
static int hf_h245_DialingInformationNumber_networkAddress = -1;
static int hf_h245_MasterSlaveDeterminationReject = -1;
static int hf_h245_MasterSlaveDeterminationAck = -1;
static int hf_h245_MasterSlaveDetermination = -1;
-static int hf_h245_NonStandardIdentifier_h221NonStandard = -1;
+static int hf_h245_h221NonStandard = -1;
static int hf_h245_NonStandardParameter = -1;
static int hf_h245_NonStandardMessage = -1;
static int hf_h245_FlowControlIndication_restriction = -1;
static int hf_h245_iPSourceRouteAddress_route = -1;
static int hf_h245_audioTelephoneEvent = -1;
static int hf_h245_alphanumeric = -1;
+static int hf_h245_h221Manufacturer = -1;
+
static gint ett_h245 = -1;
static gint ett_h245_VCCapability_set_of = -1;
static gint ett_h245_MasterSlaveDeterminationReject = -1;
static gint ett_h245_MasterSlaveDeterminationAck = -1;
static gint ett_h245_MasterSlaveDetermination = -1;
-static gint ett_h245_NonStandardIdentifier_h221NonStandard = -1;
+static gint ett_h245_h221NonStandard = -1;
static gint ett_h245_NonStandardParameter = -1;
static gint ett_h245_NonStandardMessage = -1;
static gint ett_h245_FlowControlIndication_restriction = -1;
static gint ett_h245_recoveryReferencePicture = -1;
static gint ett_h245_iPSourceRouteAddress_route = -1;
+static dissector_table_t nsp_object_dissector_table;
+static dissector_table_t nsp_h221_dissector_table;
+static dissector_handle_t nsp_handle;
+
+static guint32 ipv4_address;
+static guint32 ipv4_port;
+static char object[256];
+static guint32 t35CountryCode;
+static guint32 t35Extension;
+static guint32 manufacturerCode;
+static guint32 h221NonStandard;
static gboolean h245_reassembly = TRUE;
+static gboolean h245_shorttypes = FALSE;
+/* To put the codec type only in COL_INFO when
+ an OLC is read */
+char* codec_type = NULL;
static int
dissect_h245_NULL(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_, proto_tree *tree _U_)
return offset;
}
+static int
+dissect_h245_logicalChannelNumber(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+{
+ offset=dissect_per_constrained_integer(tvb, offset, pinfo,
+ tree, hf_h245_LogicalChannelNumber, 0, 65535,
+ NULL, NULL, FALSE);
+ return offset;
+}
+
static int
dissect_h245_SequenceNumber(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
return offset;
}
+/*Recommendation T.35 (02/2000) 3 */
+
+static const value_string T35_country_code__vals[] = {
+ { 0x00, "Japan"},
+ { 0x01, "Albania"},
+ { 0x02, "Algeria"},
+ { 0x03, "American Samoa"},
+ { 0x04, "Germany (Federal Republic of)"},
+ { 0x05, "Anguilla"},
+ { 0x06, "Antigua and Barbuda"},
+ { 0x07, "Argentina"},
+ { 0x08, "Ascension (see S. Helena)"},
+ { 0x09, "Australia"},
+ { 0x0a, "Austria"},
+ { 0x0b, "Bahamas"},
+ { 0x0c, "Bahrain"},
+ { 0x0d, "Bangladesh"},
+ { 0x0e, "Barbados"},
+ { 0x0f, "Belgium"},
+ { 0x10, "Belize"},
+ { 0x11, "Benin (Republic of)"},
+ { 0x12, "Bermudas"},
+ { 0x13, "Bhutan (Kingdom of)"},
+ { 0x14, "Bolivia"},
+ { 0x15, "Botswana"},
+ { 0x16, "Brazil"},
+ { 0x17, "British Antarctic Territory"},
+ { 0x18, "British Indian Ocean Territory"},
+ { 0x19, "British Virgin Islands"},
+ { 0x1a, "Brunei Darussalam"},
+ { 0x1b, "Bulgaria"},
+ { 0x1c, "Myanmar (Union of)"},
+ { 0x1d, "Burundi"},
+ { 0x1e, "Byelorussia"},
+ { 0x1f, "Cameroon"},
+ { 0x20, "Canada"},
+ { 0x21, "Cape Verde"},
+ { 0x22, "Cayman Islands"},
+ { 0x23, "Central African Republic"},
+ { 0x24, "Chad"},
+ { 0x25, "Chile"},
+ { 0x26, "China"},
+ { 0x27, "Colombia"},
+ { 0x28, "Comoros"},
+ { 0x29, "Congo"},
+ { 0x2a, "Cook Islands"},
+ { 0x2b, "Costa Rica"},
+ { 0x2c, "Cuba"},
+ { 0x2d, "Cyprus"},
+ { 0x2e, "Czech and Slovak Federal Republic"},
+ { 0x2f, "Cambodia"},
+ { 0x30, "Democratic People's Republic of Korea"},
+ { 0x31, "Denmark"},
+ { 0x32, "Djibouti"},
+ { 0x33, "Dominican Republic"},
+ { 0x34, "Dominica"},
+ { 0x35, "Ecuador"},
+ { 0x36, "Egypt"},
+ { 0x37, "El Salvador"},
+ { 0x38, "Equatorial Guinea"},
+ { 0x39, "Ethiopia"},
+ { 0x3a, "Falkland Islands"},
+ { 0x3b, "Fiji"},
+ { 0x3c, "Finland"},
+ { 0x3d, "France"},
+ { 0x3e, "French Polynesia"},
+ { 0x3f, "French Southern and Antarctic Lands"},
+ { 0x40, "Gabon"},
+ { 0x41, "Gambia"},
+ { 0x42, "Germany (Federal Republic of)"},
+ { 0x43, "Angola"},
+ { 0x44, "Ghana"},
+ { 0x45, "Gibraltar"},
+ { 0x46, "Greece"},
+ { 0x47, "Grenada"},
+ { 0x48, "Guam"},
+ { 0x49, "Guatemala"},
+ { 0x4a, "Guernsey"},
+ { 0x4b, "Guinea"},
+ { 0x4c, "Guinea-Bissau"},
+ { 0x4d, "Guayana"},
+ { 0x4e, "Haiti"},
+ { 0x4f, "Honduras"},
+ { 0x50, "Hongkong"},
+ { 0x51, "Hungary (Republic of)"},
+ { 0x52, "Iceland"},
+ { 0x53, "India"},
+ { 0x54, "Indonesia"},
+ { 0x55, "Iran (Islamic Republic of)"},
+ { 0x56, "Iraq"},
+ { 0x57, "Ireland"},
+ { 0x58, "Israel"},
+ { 0x59, "Italy"},
+ { 0x5a, "Cte d'Ivoire"},
+ { 0x5b, "Jamaica"},
+ { 0x5c, "Afghanistan"},
+ { 0x5d, "Jersey"},
+ { 0x5e, "Jordan"},
+ { 0x5f, "Kenya"},
+ { 0x60, "Kiribati"},
+ { 0x61, "Korea (Republic of)"},
+ { 0x62, "Kuwait"},
+ { 0x63, "Lao (People's Democratic Republic)"},
+ { 0x64, "Lebanon"},
+ { 0x65, "Lesotho"},
+ { 0x66, "Liberia"},
+ { 0x67, "Libya"},
+ { 0x68, "Liechtenstein"},
+ { 0x69, "Luxembourg"},
+ { 0x6a, "Macau"},
+ { 0x6b, "Madagascar"},
+ { 0x6c, "Malaysia"},
+ { 0x6d, "Malawi"},
+ { 0x6e, "Maldives"},
+ { 0x6f, "Mali"},
+ { 0x70, "Malta"},
+ { 0x71, "Mauritania"},
+ { 0x72, "Mauritius"},
+ { 0x73, "Mexico"},
+ { 0x74, "Monaco"},
+ { 0x75, "Mongolia"},
+ { 0x76, "Montserrat"},
+ { 0x77, "Morocco"},
+ { 0x78, "Mozambique"},
+ { 0x79, "Nauru"},
+ { 0x7a, "Nepal"},
+ { 0x7b, "Netherlands"},
+ { 0x7c, "Netherlands Antilles"},
+ { 0x7d, "New Caledonia"},
+ { 0x7e, "New Zealand"},
+ { 0x7f, "Nicaragua"},
+ { 0x80, "Niger"},
+ { 0x81, "Nigeria"},
+ { 0x82, "Norway"},
+ { 0x83, "Oman"},
+ { 0x84, "Pakistan"},
+ { 0x85, "Panama"},
+ { 0x86, "Papua New Guinea"},
+ { 0x87, "Paraguay"},
+ { 0x88, "Peru"},
+ { 0x89, "Philippines"},
+ { 0x8a, "Poland (Republic of)"},
+ { 0x8b, "Portugal"},
+ { 0x8c, "Puerto Rico"},
+ { 0x8d, "Qatar"},
+ { 0x8e, "Romania"},
+ { 0x8f, "Rwanda"},
+ { 0x90, "Saint Kitts and Nevis"},
+ { 0x91, "Saint Croix"},
+ { 0x92, "Saint Helena and Ascension"},
+ { 0x93, "Saint Lucia"},
+ { 0x94, "San Marino"},
+ { 0x95, "Saint Thomas"},
+ { 0x96, "Sao Tom�and Principe"},
+ { 0x97, "Saint Vincent and the Grenadines"},
+ { 0x98, "Saudi Arabia"},
+ { 0x99, "Senegal"},
+ { 0x9a, "Seychelles"},
+ { 0x9b, "Sierra Leone"},
+ { 0x9c, "Singapore"},
+ { 0x9d, "Solomon Islands"},
+ { 0x9e, "Somalia"},
+ { 0x9f, "South Africa"},
+ { 0xa0, "Spain"},
+ { 0xa1, "Sri Lanka"},
+ { 0xa2, "Sudan"},
+ { 0xa3, "Suriname"},
+ { 0xa4, "Swaziland"},
+ { 0xa5, "Sweden"},
+ { 0xa6, "Switzerland"},
+ { 0xa7, "Syria"},
+ { 0xa8, "Tanzania"},
+ { 0xa9, "Thailand"},
+ { 0xaa, "Togo"},
+ { 0xab, "Tonga"},
+ { 0xac, "Trinidad and Tobago"},
+ { 0xad, "Tunisia"},
+ { 0xae, "Turkey"},
+ { 0xaf, "Turks and Caicos Islands"},
+ { 0xb0, "Tuvalu"},
+ { 0xb1, "Uganda"},
+ { 0xb2, "Ukraine"},
+ { 0xb3, "United Arab Emirates"},
+ { 0xb4, "United Kingdom"},
+ { 0xb5, "United States"},
+ { 0xb6, "Burkina Faso"},
+ { 0xb7, "Uruguay"},
+ { 0xb8, "U.S.S.R."},
+ { 0xb9, "Vanuatu"},
+ { 0xba, "Vatican City State"},
+ { 0xbb, "Venezuela"},
+ { 0xbc, "Viet Nam"},
+ { 0xbd, "Wallis and Futuna"},
+ { 0xbe, "Western Samoa"},
+ { 0xbf, "Yemen (Republic of)"},
+ { 0xc0, "Yemen (Republic of)"},
+ { 0xc1, "Yugoslavia"},
+ { 0xc2, "Zaire"},
+ { 0xc3, "Zambia"},
+ { 0xc4, "Zimbabwe"},
+ { 0, NULL }
+};
+
+
+static const value_string h221Manufacturer_vals[] = {
+ { 0x04000042, "Deutsche Telekom AG" }, /* From Ref. 3 */
+ { 0x04000043, "Deutsche Telekom AG" }, /* From Ref. 3 */
+ { 0x04000082, "Siemens AG" }, /* From Ref. 3 */
+ { 0x04000084, "ITO Communication" }, /* From Ref. 3 */
+ { 0x04000086, "Hauni Elektronik" }, /* From Ref. 3 */
+ { 0x04000088, "Dr.Neuhaus Mikroelektronik" }, /* From Ref. 3 */
+ { 0x0400008a, "mps Software" }, /* From Ref. 3 */
+ { 0x0400008b, "Ferrari electronik GmbH" }, /* From Ref. 3 */
+ { 0x0400008c, "mbp Kommunikationssysteme GmbH" }, /* From Ref. 3 */
+ { 0x0400008d, "Schneider Rundfunkwerke AG" }, /* From Ref. 3 */
+ { 0x0400008e, "Digitronic computersysteme gmbh" }, /* From Ref. 3 */
+ { 0x0400008f, "DeTeWe - Deutsche Telephonwerke AG &Co" }, /* From Ref. 3 */
+ { 0x04000082, "SITK Institut für Telekommunikation GmbH & Co KG" }, /* From Ref. 3 */
+ { 0x0900003D, "Equivalence (OpenH323)" }, /* From captures */
+ { 0x82000002, "Ericsson" }, /* From captures */
+ { 0xa5000001, "Ericsson" }, /* From captures */
+ { 0xb4000000, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000001, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000002, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000003, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000004, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000005, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000006, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000007, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000008, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000009, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb400000a, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb400000b, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb400000c, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb400000d, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb400000e, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb400000f, "British Telecommunications" }, /* From Ref. 2 */
+ { 0xb4000010, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000011, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000012, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000013, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000014, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000015, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000016, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000017, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000018, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000019, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb400001a, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb400001b, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb400001c, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb400001d, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb400001e, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb400001f, "GPT Video Systems" }, /* From Ref. 2 */
+ { 0xb4000020, "Marconi Communications" }, /* From Ref. 2 */
+ { 0xb4000021, "Indigo Active Vision Systems" }, /* From Ref. 2 */
+ { 0xb4000022, "LiveWorks Limited" }, /* From Ref. 2 */
+ { 0xb4000023, "ATL Telecom Limited" }, /* From Ref. 2 */
+ { 0xb400002a, "Network Alchemy Limited" }, /* From Ref. 2 */
+ { 0xb4000042, "Motion Media Technology" }, /* From Ref. 2 */
+ { 0xb4000044, "Data Connection" }, /* From Ref. 2 */
+ { 0xb4000045, "Westbay Engineers" }, /* From Ref. 2 */
+ { 0xb4000049, "ImageCom" }, /* From Ref. 2 */
+ { 0xb400004d, "Madge Networks" }, /* From Ref. 2 */
+ { 0xb4000052, "Ridgeway Systems and Software" }, /* From Ref. 2 */
+ { 0xb4000053, "SpliceCom" }, /* From Ref. 2 */
+ { 0xb4000054, "TeleWare" }, /* From Ref. 2 */
+ { 0xb4000056, "Vegastream" }, /* From Ref. 2 */
+ { 0xb4000066, "Westell" }, /* From Ref. 2 */
+ { 0xb4000069, "ISDN Communications" }, /* From Ref. 2 */
+ { 0xb40000c0, "Codian" }, /* From Ref. 2 */
+
+ { 0xb5000000, "Compression Labs" }, /* From Ref. 1 */
+ { 0xb5000001, "PictureTel" }, /* From Ref. 1 */
+ { 0xb5000002, "Compression Labs" }, /* From Ref. 1 */
+ { 0xb5000003, "VTEL" }, /* From Ref. 1 */
+ { 0xb5000005, "ERIS" }, /* From Ref. 1 */
+ { 0xb5000007, "AT&T Worldworx" }, /* From Ref. 1 */
+ { 0xb5000009, "VideoServer" }, /* From Ref. 1 */
+ { 0xb500000b, "3Com Corporation" }, /* From Ref. 1 */
+ { 0xb500000c, "Clarent Corporation" }, /* From Ref. 1 */
+ { 0xb500000d, "Genesys Telecommunications Labs Inc" }, /* From Ref. 1 */
+ { 0xb500000e, "C-Phone Corporation." }, /* From Ref. 1 */
+ { 0xb500000f, "Science Dynamics Corporation" }, /* From Ref. 1 */
+ { 0xb5000010, "AT&T Starpoint" }, /* From Ref. 1 */
+ { 0xb5000011, "Netscape Conference" }, /* From Ref. 1 */
+ { 0xb5000012, "Cisco" }, /* From Ref. 1 */
+ { 0xb5000013, "Cirilium, Inc." }, /* From Ref. 1 */
+ { 0xb5000014, "Ascend Communications, Inc." }, /* From Ref. 1 */
+ { 0xb5000015, "RADVision, Inc." }, /* From Ref. 1 */
+ { 0xb5000016, "Objective Communications" }, /* From Ref. 1 */
+ { 0xb5000017, "VocalTec Communications, Inc." }, /* From Ref. 1 */
+ { 0xb5000018, "Serome Technology, Inc." }, /* From Ref. 1 */
+ { 0xb5000019, "Aspect Communications" }, /* From Ref. 1 */
+ { 0xb500001a, "Cintech Tele-Management" }, /* From Ref. 1 */
+ { 0xb500001b, "Philips Video Conferencing Systems" }, /* From Ref. 1 */
+ { 0xb500001c, "Vertical Networks, Inc." }, /* From Ref. 1 */
+ { 0xb500001d, "Syndeo Corp." }, /* From Ref. 1 */
+ { 0xb500001e, "Telxon Corporation" }, /* From Ref. 1 */
+ { 0xb500001f, "Network Equipment Technologies" }, /* From Ref. 1 */
+ { 0xb5000020, "Pagoo, Inc." }, /* From Ref. 1 */
+ { 0xb5000021, "General Dynamics" }, /* From Ref. 1 */
+ { 0xb5000022, "Vanguard Managed Solutions" }, /* From Ref. 1 */
+ { 0xb5000023, "TeleStream Technologies, Inc." }, /* From Ref. 1 */
+ { 0xb5000024, "Spirent Communications" }, /* From Ref. 1 */
+ { 0xb5000025, "CrystalVoice Communications" }, /* From Ref. 1 */
+ { 0xb5000026, "Xiph.org" }, /* From Ref. 1 */
+ { 0xb5000027, "NACT Telecommunications" }, /* From Ref. 1 */
+ { 0xb5000028, "AudioCodes, Inc." }, /* From Ref. 1 */
+ { 0xb5000120, "AT&T - GBCS" }, /* From Ref. 1 */
+ { 0xb5000168, "Leadtek Research Inc." }, /* From Ref. 1 */
+ { 0xb5000247, "Lucent Technologies" }, /* From Ref. 1 */
+ { 0xb500029a, "Symbol Technologies Inc." }, /* From Ref. 1 */
+ { 0xb5000378, "StarVox, Inc." }, /* From Ref. 1 */
+ { 0xb50003f7, "Inari Inc." }, /* From Ref. 1 */
+ { 0xb5000727, "Quintum Technologies, Inc." }, /* From Ref. 1 */
+ { 0xb5000918, "Netrix Corporation" }, /* From Ref. 1 */
+ { 0xb500101e, "SysMaster Corporation" }, /* From Ref. 1 */
+ { 0xb5001a1a, "Alpha Telecom, Inc. U.S.A." }, /* From Ref. 1 */
+ { 0xb5002331, "ViaVideo" }, /* From Ref. 1 */
+ { 0xb500301c, "Congruency, Inc." }, /* From Ref. 1 */
+ { 0xb5003039, "MiBridge Inc." }, /* From Ref. 1 */
+ { 0xb5003838, "8x8 Inc." }, /* From Ref. 1 */
+ { 0xb5004147, "Agere Systems" }, /* From Ref. 1 */
+ { 0xb5004153, "Artisoft Inc." }, /* From Ref. 1 */
+ { 0xb5004156, "Avaya" }, /* From Ref. 1 */
+ { 0xb5004242, "IBM." }, /* From Ref. 1 */
+ { 0xb5004257, "StreamComm" }, /* From Ref. 1 */
+
+ { 0xb5004c54, "Lucent Technologies" }, /* From Ref. 1 */
+ { 0xb5004d47, "MediaGate" }, /* From Ref. 1 */
+ { 0xb5004e54, "Nortel Networks" }, /* From Ref. 1 */
+
+ { 0xb5005243, "Siemens Business Communication Systems" }, /* From Ref. 1 */
+ { 0xb500534c, "Microsoft" }, /* From Ref. 1 */
+
+ { 0xb500600d, "Lucent Technologies" }, /* From Ref. 1 */
+
+ { 0xb5008080, "Intel" }, /* From Ref. 1 */
+ { 0xa5000001, "Ericsson" }, /* From captures */
+ { 0, NULL }
+};
+/* Ref 1 http://www.delta-info.com/Protocol_Test/Manufacturer_codes.html */
+/* Ref 2 http://www.cix.co.uk/~bpechey/H221/h221code.htm */
+/* Ref 3 http://www.regtp.de/reg_tele/start/in_05-06-03-11-00_m/index.html */
+
+
+
static int
dissect_h245_t35CountryCode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
offset=dissect_per_constrained_integer(tvb, offset, pinfo,
tree, hf_h245_t35CountryCode, 0, 255,
- NULL, NULL, FALSE);
+ &t35CountryCode, NULL, FALSE);
return offset;
}
{
offset=dissect_per_constrained_integer(tvb, offset, pinfo,
tree, hf_h245_t35Extension, 0, 255,
- NULL, NULL, FALSE);
+ &t35Extension, NULL, FALSE);
return offset;
}
{
offset=dissect_per_constrained_integer(tvb, offset, pinfo,
tree, hf_h245_manufacturerCode, 0, 65535,
- NULL, NULL, FALSE);
+ &manufacturerCode, NULL, FALSE);
return offset;
}
-static per_sequence_t NonStandardIdentifier_h221NonStandard_sequence[] = {
+static per_sequence_t h221NonStandard_sequence[] = {
{ "t35CountryCode", NO_EXTENSIONS, NOT_OPTIONAL,
dissect_h245_t35CountryCode },
{ "t35Extension", NO_EXTENSIONS, NOT_OPTIONAL,
dissect_h245_manufacturerCode },
{ NULL, 0, 0, NULL }
};
-static int
-dissect_h245_NonStandardIdentifier_h221NonStandard(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+int
+dissect_h245_h221NonStandard(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h245_NonStandardIdentifier_h221NonStandard, ett_h245_NonStandardIdentifier_h221NonStandard, NonStandardIdentifier_h221NonStandard_sequence);
+ t35CountryCode = 0;
+ t35Extension = 0;
+ manufacturerCode = 0;
+
+ offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h245_h221NonStandard, ett_h245_h221NonStandard, h221NonStandard_sequence);
+
+ h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode;
+
+ proto_tree_add_uint(tree, hf_h245_h221Manufacturer, tvb, (offset-3)>>3,4,h221NonStandard);
return offset;
}
dissect_h245_T38FaxTcpOptions },
{ NULL, 0, 0, NULL }
};
-static int
+int
dissect_h245_T38FaxProfile(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h245_T38FaxProfile, ett_h245_T38FaxProfile, T38FaxProfile_sequence);
{
offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree,
hf_h245_tsapIdentifier, 0, 65535,
- NULL, NULL, FALSE);
+ &ipv4_port, NULL, FALSE);
return offset;
}
static int
dissect_h245_object(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_object);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_object, object);
return offset;
}
static int
dissect_h245_protocolIdentifier(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_protocolIdentifier);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_protocolIdentifier, NULL);
return offset;
}
static int
dissect_h245_algorithm(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_algorithm);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_algorithm, NULL);
return offset;
}
static int
dissect_h245_antiSpamAlgorithm(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_antiSpamAlgorithm);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_antiSpamAlgorithm, NULL);
return offset;
}
static int
dissect_h245_standard_object(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_standard_object);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_standard_object, NULL);
return offset;
}
static int
dissect_h245_oid(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_oid);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_oid, NULL);
return offset;
}
static int
dissect_h245_escrowID(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_escrowID);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_escrowID, NULL);
return offset;
}
static int
dissect_h245_field(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_field);
+ offset=dissect_per_object_identifier(tvb, offset, pinfo, tree, hf_h245_field, NULL);
return offset;
}
{ 0, "object", NO_EXTENSIONS,
dissect_h245_object },
{ 1, "h221NonStandard", NO_EXTENSIONS,
- dissect_h245_NonStandardIdentifier_h221NonStandard },
+ dissect_h245_h221NonStandard },
{ 0, NULL, 0, NULL }
};
static int
dissect_h245_NonStandardIdentifier(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_NonStandardIdentifier, ett_h245_NonStandardIdentifier, NonStandardIdentifier_choice, "NonStandardIdentifier", NULL);
+ guint32 value;
+
+ *object = '\0';
+ h221NonStandard = 0;
+
+ offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_NonStandardIdentifier, ett_h245_NonStandardIdentifier, NonStandardIdentifier_choice, "NonStandardIdentifier", &value);
+
+ switch (value) {
+ case 0 : /* object */
+ nsp_handle = dissector_get_port_handle(nsp_object_dissector_table, adler32_str(object));
+ break;
+ case 1 : /* h221NonStandard */
+ nsp_handle = dissector_get_port_handle(nsp_h221_dissector_table, h221NonStandard);
+ break;
+ default :
+ nsp_handle = NULL;
+ }
return offset;
}
static int
dissect_h245_NonStandardParameterData(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_NonStandardParameterData, -1, -1);
+ guint32 value_offset, value_len;
+ tvbuff_t *next_tvb;
+
+ if (nsp_handle) {
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, -1, -1, -1, &value_offset, &value_len);
+ next_tvb = tvb_new_subset(tvb, value_offset, value_len, value_len);
+ call_dissector(nsp_handle, next_tvb, pinfo, tree);
+ } else {
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_NonStandardParameterData, -1, -1, NULL, NULL);
+ }
return offset;
}
static int
dissect_h245_nlpidData(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nlpidData, -1, -1);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nlpidData, -1, -1, NULL, NULL);
return offset;
}
static int
dissect_h245_nonCollapsingRaw(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nonCollapsingRaw, -1, -1);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nonCollapsingRaw, -1, -1, NULL, NULL);
return offset;
}
static int
dissect_h245_uuid(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_uuid, 16, 16);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_uuid, 16, 16, NULL, NULL);
return offset;
}
static int
dissect_h245_octetString(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_octetString, -1, -1);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_octetString, -1, -1, NULL, NULL);
return offset;
}
static int
dissect_h245_externalReference(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_externalReference, 1, 255);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_externalReference, 1, 255, NULL, NULL);
return offset;
}
static int
dissect_h245_nsapAddress(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nsapAddress, 1, 20);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nsapAddress, 1, 20, NULL, NULL);
return offset;
}
static int
dissect_h245_subaddress_1_20(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_subaddress_1_20, 1, 20);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_subaddress_1_20, 1, 20, NULL, NULL);
return offset;
}
static int
dissect_h245_programDescriptors(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_programDescriptors, -1, -1);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_programDescriptors, -1, -1, NULL, NULL);
return offset;
}
static int
dissect_h245_streamDescriptors(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_streamDescriptors, -1, -1);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_streamDescriptors, -1, -1, NULL, NULL);
return offset;
}
static int
dissect_h245_ipv4network(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint32 ip;
-
/* byte aligned */
if(offset&0x07){
offset=(offset&0xfffffff8)+8;
}
- ip=tvb_get_letohl(tvb, offset>>3);
- proto_tree_add_ipv4(tree, hf_h245_ipv4network, tvb, offset>>3, 4, ip);
+ tvb_memcpy(tvb, (char *)&ipv4_address, offset>>3, 4);
+ proto_tree_add_ipv4(tree, hf_h245_ipv4network, tvb, offset>>3, 4, ipv4_address);
offset+=32;
return offset;
static int
dissect_h245_ipxNode(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ipxNode, 6, 6);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ipxNode, 6, 6, NULL, NULL);
return offset;
}
static int
dissect_h245_ipxNetnum(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ipxNetnum, 4, 4);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ipxNetnum, 4, 4, NULL, NULL);
return offset;
}
static int
dissect_h245_ipv6network(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ipv6network, 16, 16);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ipv6network, 16, 16, NULL, NULL);
return offset;
}
static int
dissect_h245_netBios(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_netBios, 16, 16);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_netBios, 16, 16, NULL, NULL);
return offset;
}
static int
dissect_h245_nsap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nsap, 1, 20);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_nsap, 1, 20, NULL, NULL);
return offset;
}
static int
dissect_h245_h235Key(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_h235Key, 1, 65535);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_h235Key, 1, 65535, NULL, NULL);
return offset;
}
static int
dissect_h245_value(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_value, 1, 65535);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_value, 1, 65535, NULL, NULL);
return offset;
}
static int
dissect_h245_certificateResponse(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_certificateResponse, 1, 65535);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_certificateResponse, 1, 65535, NULL, NULL);
return offset;
}
static int
dissect_h245_TerminalID(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_TerminalID, 1, 128);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_TerminalID, 1, 128, NULL, NULL);
return offset;
}
static int
dissect_h245_ConferenceID(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ConferenceID, 1, 32);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_ConferenceID, 1, 32, NULL, NULL);
return offset;
}
static int
dissect_h245_Password(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_Password, 1, 32);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_Password, 1, 32, NULL, NULL);
return offset;
}
static int
dissect_h245_encryptionSE(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_encryptionSE, -1, -1);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_encryptionSE, -1, -1, NULL, NULL);
return offset;
}
static int
dissect_h245_conferenceIdentifier(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_conferenceIdentifier, 1, 16);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_conferenceIdentifier, 1, 16, NULL, NULL);
return offset;
}
static int
dissect_h245_returnedFunction(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_returnedFunction, -1, -1);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_returnedFunction, -1, -1, NULL, NULL);
return offset;
}
static int
dissect_h245_productNumber(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_productNumber, 1, 256);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_productNumber, 1, 256, NULL, NULL);
return offset;
}
static int
dissect_h245_versionNumber(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_versionNumber, 1, 256);
+ offset=dissect_per_octet_string(tvb, offset, pinfo, tree, hf_h245_versionNumber, 1, 256, NULL, NULL);
return offset;
}
dissect_h245_NonStandardParameterData },
{ NULL, 0, 0, NULL }
};
-static int
+int
dissect_h245_NonStandardParameter(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
+ nsp_handle = NULL;
+
offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h245_NonStandardParameter, ett_h245_NonStandardParameter, NonStandardParameter_sequence);
return offset;
}
+static per_sequence_t NonStandardParameter_with_extension_sequence[] = {
+ { "nonStandardIdentifier", EXTENSION_ROOT, NOT_OPTIONAL,
+ dissect_h245_NonStandardIdentifier },
+ { "data", EXTENSION_ROOT, NOT_OPTIONAL,
+ dissect_h245_NonStandardParameterData },
+ { NULL, 0, 0, NULL }
+};
+int
+dissect_h245_NonStandardParameter_with_extension_marker(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+{
+ nsp_handle = NULL;
+
+ offset=dissect_per_sequence(tvb, offset, pinfo, tree, hf_h245_NonStandardParameter, ett_h245_NonStandardParameter, NonStandardParameter_with_extension_sequence);
+
+ return offset;
+}
+
dissect_h245_NULL },
{ 0, NULL, 0, NULL }
};
-static int
+int
dissect_h245_DataProtocolCapability(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_DataProtocolCapability, ett_h245_DataProtocolCapability, DataProtocolCapability_choice, "DataProtocolCapability", NULL);
static int
dissect_h245_DataApplicationCapability_application(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_DataApplicationCapability_application, ett_h245_DataApplicationCapability_application, DataApplicationCapability_application_choice, "application", NULL);
+ guint32 value;
+
+ offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_DataApplicationCapability_application, ett_h245_DataApplicationCapability_application, DataApplicationCapability_application_choice, "application", &value);
+
+ codec_type = val_to_str(value, DataApplicationCapability_application_vals, "<unknown>");
return offset;
}
static int
dissect_h245_mediaChannel(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
+ ipv4_address=0;
+ ipv4_port=0;
+
offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_mediaChannel, ett_h245_TransportAddress, TransportAddress_choice, "mediaChannel", NULL);
+ if((!pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && rtp_handle){
+ address src_addr;
+ conversation_t *conv=NULL;
+
+ src_addr.type=AT_IPv4;
+ src_addr.len=4;
+ src_addr.data=(char *)&ipv4_address;
+
+ conv=find_conversation(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ if(!conv){
+ conv=conversation_new(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ conversation_set_dissector(conv, rtp_handle);
+ }
+ }
return offset;
}
static int
dissect_h245_mediaControlChannel(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
+ ipv4_address=0;
+ ipv4_port=0;
+
offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_mediaControlChannel, ett_h245_TransportAddress, TransportAddress_choice, "mediaControlChannel", NULL);
+ if((!pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && rtcp_handle){
+ address src_addr;
+ conversation_t *conv=NULL;
+
+ src_addr.type=AT_IPv4;
+ src_addr.len=4;
+ src_addr.data=(char *)&ipv4_address;
+
+ conv=find_conversation(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ if(!conv){
+ conv=conversation_new(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ conversation_set_dissector(conv, rtcp_handle);
+ }
+ }
return offset;
}
static int
static per_sequence_t MultiplexEntryDescriptor_sequence[] = {
- { "multiplexTableEntryNumber", NOT_EXTENSION_ROOT, NOT_OPTIONAL,
+ { "multiplexTableEntryNumber", NO_EXTENSIONS, NOT_OPTIONAL,
dissect_h245_MultiplexTableEntryNumber },
- { "elementList", NOT_EXTENSION_ROOT, OPTIONAL,
+ { "elementList", NO_EXTENSIONS, OPTIONAL,
dissect_h245_elementList },
{ NULL, 0, 0, NULL }
};
};
static per_choice_t MultiplexElement_type_choice[] = {
{ 0, "logicalChannelNumber", NO_EXTENSIONS,
- dissect_h245_LogicalChannelNumber },
+ dissect_h245_logicalChannelNumber },
{ 1, "subElementList", NO_EXTENSIONS,
dissect_h245_subElementList },
{ 0, NULL, 0, NULL }
static per_sequence_t MultiplexElement_sequence[] = {
- { "type", NOT_EXTENSION_ROOT, NOT_OPTIONAL,
+ { "type", NO_EXTENSIONS, NOT_OPTIONAL,
dissect_h245_MultiplexElement_type },
- { "repeatCount", NOT_EXTENSION_ROOT, NOT_OPTIONAL,
+ { "repeatCount", NO_EXTENSIONS, NOT_OPTIONAL,
dissect_h245_MultiplexElement_repeatCount },
{ NULL, 0, 0, NULL }
};
static int
dissect_h245_VideoCapability(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_VideoCapability, ett_h245_VideoCapability, VideoCapability_choice, "VideoCapability", NULL);
+ guint32 value;
+
+ offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_VideoCapability, ett_h245_VideoCapability, VideoCapability_choice, "VideoCapability", &value );
+
+ codec_type = val_to_str(value, VideoCapability_vals, "<unknown>");
return offset;
}
static int
dissect_h245_AudioCapability(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_AudioCapability, ett_h245_AudioCapability, AudioCapability_choice, "AudioCapability", NULL);
+ guint32 value;
+
+ offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_AudioCapability, ett_h245_AudioCapability, AudioCapability_choice, "AudioCapability", &value);
+
+ codec_type = val_to_str(value, AudioCapability_vals, "<unknown>");
return offset;
}
static int
dissect_h245_signalType(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_h245_signalType, 1, 128, "0123456789#*ABCD!", 17);
+ offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_h245_signalType, 1, 128, "!#*0123456789ABCD", 17);
return offset;
}
static int
dissect_h245_e164Address(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_h245_e164Address, 1, 128, "0123456789#*,", 13);
+ offset=dissect_per_restricted_character_string(tvb, offset, pinfo, tree, hf_h245_e164Address, 1, 128, "#*,0123456789", 13);
return offset;
}
+static const value_string IndicationMessage_short_vals[] = {
+ { 0, "NSM" },
+ { 1, "FNU" },
+ { 2, "MSDRelease" },
+ { 3, "TCSRelease" },
+ { 4, "OLCConfirm" },
+ { 5, "RCCRelease" },
+ { 6, "MESRelease" },
+ { 7, "RMERelease" },
+ { 8, "RMRelease" },
+ { 9, "MI" },
+ { 10, "JI" },
+ { 11, "H223SI" },
+ { 12, "NATMVCI" },
+ { 13, "UII" },
+ { 14, "H2250MSI" },
+ { 15, "MCLI" },
+ { 16, "CI" },
+ { 17, "VI" },
+ { 18, "FNS" },
+ { 19, "MultilinkIndication" },
+ { 20, "LCRRelease" },
+ { 21, "FCIndication" },
+ { 22, "MMRI" },
+ { 0, NULL }
+};
static const value_string IndicationMessage_vals[] = {
offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_IndicationMessage_type, ett_h245_IndicationMessage, IndicationMessage_choice, "IndicationMessage", &value);
if (check_col(pinfo->cinfo, COL_INFO)){
- col_prepend_fstr(pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, IndicationMessage_vals, "<unknown>"));
+ if ( h245_shorttypes == TRUE )
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, IndicationMessage_short_vals, "<unknown>"));
+ }
+ else
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, IndicationMessage_vals, "<unknown>"));
+ }
}
+ col_set_fence(pinfo->cinfo,COL_INFO);
+
return offset;
}
+static const value_string RequestMessage_short_vals[] = {
+ { 0, "NSM" },
+ { 1, "MSD" },
+ { 2, "TCS" },
+ { 3, "OLC" },
+ { 4, "CLC" },
+ { 5, "RCC" },
+ { 6, "MES" },
+ { 7, "RME" },
+ { 8, "RM" },
+ { 9, "RTDR" },
+ { 10, "MLR" },
+ { 11, "CMR" },
+ { 12, "CR" },
+ { 13, "MR" },
+ { 14, "LCRR" },
+ { 0, NULL }
+};
static const value_string RequestMessage_vals[] = {
guint32 value;
offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_RequestMessage_type, ett_h245_RequestMessage, RequestMessage_choice, "RequestMessage", &value);
+
if (check_col(pinfo->cinfo, COL_INFO)){
- col_prepend_fstr(pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, RequestMessage_vals, "<unknown>"));
+ if ( h245_shorttypes == TRUE )
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, RequestMessage_short_vals, "<unknown>"));
+ }
+ else
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, RequestMessage_vals, "<unknown>"));
+ }
+ }
+
+ if (( check_col(pinfo->cinfo, COL_INFO)) && ( codec_type != NULL ) && ( value == 3) ){
+ col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ", codec_type );
}
+ col_set_fence(pinfo->cinfo,COL_INFO);
+
return offset;
}
static per_sequence_t H223ModeParameters_sequence[] = {
{ "adaptationLayerType", EXTENSION_ROOT, NOT_OPTIONAL,
dissect_h245_H223ModeParameters_adaptationLayerType },
- { "segmentableFlag", EXTENSION_ROOT, NOT_OPTIONAL,
+ { "segmentableFlag", EXTENSION_ROOT, NOT_OPTIONAL,
dissect_h245_segmentableFlag },
{ NULL, 0, 0, NULL }
};
dissect_h245_bitRateLockedToNetworkClock },
{ "aal", EXTENSION_ROOT, NOT_OPTIONAL,
dissect_h245_NewATMVCCommand_aal },
- { "multiplex", EXTENSION_ROOT, NOT_OPTIONAL,
+ { "multiplex", EXTENSION_ROOT, NOT_OPTIONAL,
dissect_h245_NewATMVCCommand_multiplex },
{ "reverseParameters", EXTENSION_ROOT, NOT_OPTIONAL,
dissect_h245_NewATMVCCommand_reverseParameters },
return offset;
}
+static const value_string CommandMessage_short_vals[] = {
+ { 0, "NSM" },
+ { 1, "MLOC" },
+ { 2, "STCS" },
+ { 3, "EC" },
+ { 4, "FCC" },
+ { 5, "ESC" },
+ { 6, "MC" },
+ { 7, "CMC" },
+ { 8, "CC" },
+ { 9, "H223MR" },
+ { 10, "NATMVCC" },
+ { 11, "MMRC" },
+ { 0, NULL }
+};
dissect_h245_CommunicationModeCommand },
{ 8, "ConferenceCommand", NOT_EXTENSION_ROOT,
dissect_h245_ConferenceCommand },
- { 9, "H223MultiplexReconfiguration", NOT_EXTENSION_ROOT,
+ { 9, "H223MultiplexReconfiguration", NOT_EXTENSION_ROOT,
dissect_h245_H223MultiplexReconfiguration },
{ 10, "NewATMVCCommand", NOT_EXTENSION_ROOT,
dissect_h245_NewATMVCCommand },
offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_CommandMessage_type, ett_h245_CommandMessage, CommandMessage_choice, "CommandMessage", &value);
if (check_col(pinfo->cinfo, COL_INFO)){
- col_prepend_fstr(pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, CommandMessage_vals, "<unknown>"));
+ if ( h245_shorttypes == TRUE )
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, CommandMessage_short_vals, "<unknown>"));
+ }
+ else
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, CommandMessage_vals, "<unknown>"));
+ }
}
+ col_set_fence(pinfo->cinfo,COL_INFO);
+
return offset;
}
+static const value_string ResponseMessage_short_vals[] = {
+ { 0, "NSM" },
+ { 1, "MSDAck" },
+ { 2, "MSDReject" },
+ { 3, "TCSAck" },
+ { 4, "TCSReject" },
+ { 5, "OLCAck" },
+ { 6, "OLCReject" },
+ { 7, "CLCAck" },
+ { 8, "RCCAck" },
+ { 9, "RCCReject" },
+ { 10, "MESAck" },
+ { 11, "MESReject" },
+ { 12, "RMEAck" },
+ { 13, "RMEReject" },
+ { 14, "RMAck" },
+ { 15, "RMReject" },
+ { 16, "RTDResponse" },
+ { 17, "MLAck" },
+ { 18, "MLReject" },
+ { 19, "CMResponse" },
+ { 20, "CResponse" },
+ { 21, "MResponse" },
+ { 22, "LCRAck" },
+ { 23, "LCRReject" },
+ { 0, NULL }
+};
static const value_string ResponseMessage_vals[] = {
offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_ResponseMessage_type, ett_h245_ResponseMessage, ResponseMessage_choice, "ResponseMessage", &value);
if (check_col(pinfo->cinfo, COL_INFO)){
- col_prepend_fstr(pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, ResponseMessage_vals, "<unknown>"));
+ if ( h245_shorttypes == TRUE )
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, ResponseMessage_short_vals, "<unknown>"));
+ }
+ else
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ val_to_str(value, ResponseMessage_vals, "<unknown>"));
+ }
}
+ col_set_fence(pinfo->cinfo,COL_INFO);
+
return offset;
}
if (check_col(pinfo->cinfo, COL_PROTOCOL)){
col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.245");
}
- if (check_col(pinfo->cinfo, COL_INFO)){
- col_clear(pinfo->cinfo, COL_INFO);
- }
it=proto_tree_add_protocol_format(tree, proto_h245, tvb, 0, tvb_length(tvb), "H.245");
tr=proto_item_add_subtree(it, ett_h245);
- offset=dissect_per_choice(tvb, offset, pinfo, tr, hf_h245_pdu_type, ett_h245_MultimediaSystemControlMessage, MultimediaSystemControlMessage_choice, "MultimediaSystemControlMessage", &value);
-
- if (check_col(pinfo->cinfo, COL_INFO)){
- col_prepend_fstr(pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, MultimediaSystemControlMessage_vals, "<unknown>"));
+ /* this code is called from at least TPKT (over TCP) and
+ MEGACO. Over MEGACO there is no framing so we just have to assume
+ that as long as we havent run out of TVB data, there is more
+ MSCM PDUsa to decode.
+ */
+ while(tvb_length_remaining(tvb, offset>>3)>0){
+ offset=dissect_per_choice(tvb, offset, pinfo, tr, hf_h245_pdu_type, ett_h245_MultimediaSystemControlMessage, MultimediaSystemControlMessage_choice, "MultimediaSystemControlMessage", &value);
+ /* align next PDU to octet boundary */
+ if(offset&0x07){
+ offset=(offset&0xfffffff8)+8;
+ }
}
-
}
{ &hf_h245_MasterSlaveDetermination,
{ "MasterSlaveDetermination", "h245.MasterSlaveDetermination", FT_NONE, BASE_NONE,
NULL, 0, "MasterSlaveDetermination sequence", HFILL }},
- { &hf_h245_NonStandardIdentifier_h221NonStandard,
- { "NonStandardIdentifier_h221NonStandard", "h245.NonStandardIdentifier_h221NonStandard", FT_NONE, BASE_NONE,
- NULL, 0, "NonStandardIdentifier_h221NonStandard sequence", HFILL }},
+ { &hf_h245_h221NonStandard,
+ { "h221NonStandard", "h245.h221NonStandard", FT_NONE, BASE_NONE,
+ NULL, 0, "h221NonStandard sequence", HFILL }},
{ &hf_h245_NonStandardParameter,
{ "NonStandardParameter", "h245.NonStandardParameter", FT_NONE, BASE_NONE,
NULL, 0, "NonStandardParameter sequence", HFILL }},
NULL, 0, "ATM BitRate in 64kbit/s units", HFILL }},
{ &hf_h245_t35CountryCode,
{ "t35CountryCode", "h245.t35CountryCode", FT_UINT32, BASE_DEC,
- NULL, 0, "t35CountryCode value", HFILL }},
+ VALS(T35_country_code__vals), 0, "t35CountryCode value", HFILL }},
{ &hf_h245_t35Extension,
{ "t35Extension", "h245.t35Extension", FT_UINT32, BASE_DEC,
NULL, 0, "t35Extension value", HFILL }},
{ &hf_h245_internationalNumber,
{ "internationalNumber", "h245.internationalNumber", FT_STRING, FT_NONE,
NULL, 0, "String for internationalNumber", HFILL }},
+ { &hf_h245_h221Manufacturer,
+ { "H.221 Manufacturer", "h245.h221Manufacturer", FT_UINT32, BASE_HEX,
+ VALS(h221Manufacturer_vals), 0, "H.221 Manufacturer", HFILL }},
};
static gint *ett[] =
&ett_h245_MasterSlaveDeterminationReject,
&ett_h245_MasterSlaveDeterminationAck,
&ett_h245_MasterSlaveDetermination,
- &ett_h245_NonStandardIdentifier_h221NonStandard,
+ &ett_h245_h221NonStandard,
&ett_h245_NonStandardParameter,
&ett_h245_NonStandardMessage,
&ett_h245_FlowControlIndication_restriction,
"Reassemble H.245 over TCP",
"Whether the dissector should reassemble H.245 PDUs spanning multiple TCP segments",
&h245_reassembly);
+ prefs_register_bool_preference(h245_module, "shorttypes",
+ "Show short message types",
+ "Whether the dissector should show short names or the long names from the standard",
+ &h245_shorttypes);
+ register_dissector("h245dg", dissect_h245_MultimediaSystemControlMessage, proto_h245);
+ register_dissector("h245", dissect_h245, proto_h245);
+
+ nsp_object_dissector_table = register_dissector_table("h245.nsp.object", "H.245 NonStandardParameter (object)", FT_UINT32, BASE_HEX);
+ nsp_h221_dissector_table = register_dissector_table("h245.nsp.h221", "H.245 NonStandardParameter (h221)", FT_UINT32, BASE_HEX);
}
void
proto_reg_handoff_h245(void)
{
- h245_handle=create_dissector_handle(dissect_h245, proto_h245);
- MultimediaSystemControlMessage_handle=create_dissector_handle(dissect_h245_MultimediaSystemControlMessage, proto_h245);
-
+ rtp_handle = find_dissector("rtp");
+ rtcp_handle = find_dissector("rtcp");
+ h245_handle=create_dissector_handle(dissect_h245, proto_h245);
dissector_add_handle("tcp.port", h245_handle);
+ MultimediaSystemControlMessage_handle=create_dissector_handle(dissect_h245_MultimediaSystemControlMessage, proto_h245);
dissector_add_handle("udp.port", MultimediaSystemControlMessage_handle);
-
}