aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/h283
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/asn1/h283')
-rw-r--r--epan/dissectors/asn1/h283/CMakeLists.txt47
-rw-r--r--epan/dissectors/asn1/h283/LCT-PROTOCOL.asn79
-rw-r--r--epan/dissectors/asn1/h283/Makefile.am23
-rw-r--r--epan/dissectors/asn1/h283/Makefile.common40
-rw-r--r--epan/dissectors/asn1/h283/Makefile.nmake26
-rw-r--r--epan/dissectors/asn1/h283/h283.cnf115
-rw-r--r--epan/dissectors/asn1/h283/packet-h283-template.c109
7 files changed, 439 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/h283/CMakeLists.txt b/epan/dissectors/asn1/h283/CMakeLists.txt
new file mode 100644
index 0000000000..5aad101eba
--- /dev/null
+++ b/epan/dissectors/asn1/h283/CMakeLists.txt
@@ -0,0 +1,47 @@
+# CMakeLists.txt
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+set( PROTOCOL_NAME h283 )
+
+set( PROTO_OPT )
+
+set( EXT_ASN_FILE_LIST
+)
+
+set( ASN_FILE_LIST
+ LCT-PROTOCOL.asn
+)
+
+set( EXTRA_DIST
+ ${ASN_FILE_LIST}
+ packet-${PROTOCOL_NAME}-template.c
+ ${PROTOCOL_NAME}.cnf
+)
+
+set( SRC_FILES
+ ${EXTRA_DIST}
+ ${EXT_ASN_FILE_LIST}
+)
+
+set( A2W_FLAGS )
+
+ASN2WRS()
+
diff --git a/epan/dissectors/asn1/h283/LCT-PROTOCOL.asn b/epan/dissectors/asn1/h283/LCT-PROTOCOL.asn
new file mode 100644
index 0000000000..b4c53edf31
--- /dev/null
+++ b/epan/dissectors/asn1/h283/LCT-PROTOCOL.asn
@@ -0,0 +1,79 @@
+-- http://www.itu.int/ITU-T/asn1/database/itu-t/h/h283/1999/LCT-PROTOCOL.asn
+
+-- Module LCT-PROTOCOL (H.283:05/1999)
+LCT-PROTOCOL {itu-t recommendation h 283 version(0) 1} DEFINITIONS AUTOMATIC
+TAGS ::=
+BEGIN
+
+H221NonStandard ::= SEQUENCE {
+ t35CountryCode INTEGER(0..255), -- country, as per Recommendation T.35
+ t35Extension INTEGER(0..255), -- assigned nationally
+ manufacturerCode INTEGER(0..65535)
+} -- assigned nationally
+
+NonStandardIdentifier ::= CHOICE {
+ object OBJECT IDENTIFIER,
+ h221NonStandard H221NonStandard,
+ ...
+}
+
+NonStandardParameter ::= SEQUENCE {
+ nonStandardIdentifier NonStandardIdentifier,
+ data OCTET STRING
+}
+
+LCTPDU ::= SEQUENCE {
+ srcAddr MTAddress,
+ dstAddr MTAddress,
+ timestamp INTEGER(0..4294967295), -- milliseconds
+ seqNumber INTEGER(0..65535),
+ pduType CHOICE {ack NULL,
+ rdcData RDCData},
+ nonStandardParameters SEQUENCE OF NonStandardParameter OPTIONAL,
+ ...
+}
+
+MTAddress ::= SEQUENCE {
+ mAddress INTEGER(0..65535),
+ tAddress INTEGER(0..65535)
+}
+
+RDCData ::= SEQUENCE {
+ reliable BOOLEAN,
+ dataType CHOICE {lctMessage LCTMessage,
+ rdcPDU OCTET STRING}, -- Common RDC PDU
+ ...
+}
+
+LCTMessage ::= CHOICE {
+ lctRequest LCTRequest,
+ lctResponse LCTResponse,
+ lctIndication LCTIndication,
+ nonStandardMessage NonStandardMessage,
+ ...
+}
+
+LCTRequest ::= CHOICE {announceReq NULL,
+ deviceListReq NULL,
+ ...
+}
+
+LCTResponse ::= CHOICE {
+ announceResp NULL,
+ deviceListResp OCTET STRING, -- Common RDC
+ ...
+}
+
+LCTIndication ::= CHOICE {deviceChange NULL,
+ ...
+}
+
+NonStandardMessage ::= SEQUENCE {
+ nonStandardParameters SEQUENCE OF NonStandardParameter OPTIONAL,
+ ...
+}
+
+END
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D
+
diff --git a/epan/dissectors/asn1/h283/Makefile.am b/epan/dissectors/asn1/h283/Makefile.am
new file mode 100644
index 0000000000..72d28e600b
--- /dev/null
+++ b/epan/dissectors/asn1/h283/Makefile.am
@@ -0,0 +1,23 @@
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+include ../Makefile.preinc
+include Makefile.common
+include ../Makefile.inc
+
diff --git a/epan/dissectors/asn1/h283/Makefile.common b/epan/dissectors/asn1/h283/Makefile.common
new file mode 100644
index 0000000000..dce8a40778
--- /dev/null
+++ b/epan/dissectors/asn1/h283/Makefile.common
@@ -0,0 +1,40 @@
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+PROTOCOL_NAME = h283
+
+EXT_ASN_FILE_LIST =
+
+ASN_FILE_LIST = \
+ LCT-PROTOCOL.asn
+
+EXTRA_DIST = \
+ $(EXTRA_DIST_COMMON) \
+ $(ASN_FILE_LIST) \
+ packet-$(PROTOCOL_NAME)-template.c \
+ $(PROTOCOL_NAME).cnf
+
+SRC_FILES = \
+ $(EXTRA_DIST) \
+ $(EXT_ASN_FILE_LIST)
+
+A2W_FLAGS =
+
+EXTRA_CNF =
+
diff --git a/epan/dissectors/asn1/h283/Makefile.nmake b/epan/dissectors/asn1/h283/Makefile.nmake
new file mode 100644
index 0000000000..d296638ddd
--- /dev/null
+++ b/epan/dissectors/asn1/h283/Makefile.nmake
@@ -0,0 +1,26 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+include ../../../../config.nmake
+include ../Makefile.preinc.nmake
+include Makefile.common
+include ../Makefile.inc.nmake
+
diff --git a/epan/dissectors/asn1/h283/h283.cnf b/epan/dissectors/asn1/h283/h283.cnf
new file mode 100644
index 0000000000..0f7577ccc8
--- /dev/null
+++ b/epan/dissectors/asn1/h283/h283.cnf
@@ -0,0 +1,115 @@
+# h283.cnf
+# H.283 conformation file
+# 2007 Tomas Kukosa
+
+#.OPT
+PER
+ALIGNED
+#.END
+
+#.PDU
+LCTPDU
+#.END
+
+#.FN_PARS LCTPDU/pduType
+ VAL_PTR = &pdu_type
+#.FN_HDR
+ gint32 pdu_type = -1;
+ const gchar *p = NULL;
+#.FN_FTR
+ p = try_val_to_str(pdu_type, VALS(h283_T_pduType_vals));
+ if (!info_is_set && p ) {
+ col_set_str(actx->pinfo->cinfo, COL_INFO, p);
+ info_is_set = TRUE;
+ }
+#.END
+
+#.FN_PARS RDCData/dataType
+ VAL_PTR = &data_type
+#.FN_HDR
+ gint32 data_type = -1;
+ const gchar *p = NULL;
+#.FN_FTR
+ p = try_val_to_str(data_type, VALS(h283_T_dataType_vals));
+ if (!info_is_set && p ) {
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "RDCData/%s", p);
+ info_is_set = TRUE;
+ }
+#.END
+
+#.FN_PARS LCTMessage
+ VAL_PTR = &msg_type
+#.FN_HDR
+ gint32 msg_type = -1;
+ const gchar *p = NULL;
+#.FN_FTR
+ p = try_val_to_str(msg_type, VALS(h283_LCTMessage_vals));
+ if (!info_is_set && p ) {
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTMessage/%s", p);
+ info_is_set = TRUE;
+ }
+#.END
+
+#.FN_PARS LCTRequest
+ VAL_PTR = &msg_type
+#.FN_HDR
+ gint32 msg_type = -1;
+ const gchar *p = NULL;
+#.FN_FTR
+ p = try_val_to_str(msg_type, VALS(h283_LCTRequest_vals));
+ if (!info_is_set && p ) {
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTRequest/%s", p);
+ info_is_set = TRUE;
+ }
+#.END
+
+#.FN_PARS LCTResponse
+ VAL_PTR = &msg_type
+#.FN_HDR
+ gint32 msg_type = -1;
+ const gchar *p = NULL;
+#.FN_FTR
+ p = try_val_to_str(msg_type, VALS(h283_LCTResponse_vals));
+ if (!info_is_set && p ) {
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTResponse/%s", p);
+ info_is_set = TRUE;
+ }
+#.END
+
+#.FN_PARS LCTIndication
+ VAL_PTR = &msg_type
+#.FN_HDR
+ gint32 msg_type = -1;
+ const gchar *p = NULL;
+#.FN_FTR
+ p = try_val_to_str(msg_type, VALS(h283_LCTIndication_vals));
+ if (!info_is_set && p ) {
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "LCTIndication/%s", p);
+ info_is_set = TRUE;
+ }
+#.END
+
+#.FN_BODY RDCData/dataType/rdcPDU VAL_PTR = &next_tvb
+ tvbuff_t *next_tvb = NULL;
+
+%(DEFAULT_BODY)s
+ if (next_tvb && tvb_reported_length(next_tvb)) {
+ call_dissector((rdc_pdu_handle)?rdc_pdu_handle:data_handle, next_tvb, %(ACTX)s->pinfo, proto_tree_get_root(tree));
+ }
+ info_is_set = TRUE;
+#.END
+
+#.FN_BODY LCTResponse/deviceListResp VAL_PTR = &next_tvb
+ tvbuff_t *next_tvb = NULL;
+
+%(DEFAULT_BODY)s
+ if (next_tvb && tvb_reported_length(next_tvb)) {
+ call_dissector((rdc_device_list_handle)?rdc_device_list_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
+ }
+#.END
+
+#.TYPE_ATTR
+RDCData/dataType/rdcPDU TYPE = FT_UINT32 DISPLAY = BASE_DEC
+LCTResponse/deviceListResp TYPE = FT_UINT32 DISPLAY = BASE_DEC
+#.END
+
diff --git a/epan/dissectors/asn1/h283/packet-h283-template.c b/epan/dissectors/asn1/h283/packet-h283-template.c
new file mode 100644
index 0000000000..02437ff443
--- /dev/null
+++ b/epan/dissectors/asn1/h283/packet-h283-template.c
@@ -0,0 +1,109 @@
+/* packet-h283.c
+ * Routines for H.283 packet dissection
+ * 2007 Tomas Kukosa
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/oids.h>
+#include <epan/asn1.h>
+
+#include "packet-per.h"
+
+#define PNAME "H.283 Logical Channel Transport"
+#define PSNAME "LCT"
+#define PFNAME "lct"
+
+void proto_register_h283(void);
+void proto_reg_handoff_h283(void);
+
+/* Initialize the protocol and registered fields */
+static int proto_h283 = -1;
+#include "packet-h283-hf.c"
+
+/* Initialize the subtree pointers */
+static int ett_h283 = -1;
+#include "packet-h283-ett.c"
+
+/* Subdissectors */
+static dissector_handle_t rdc_pdu_handle;
+static dissector_handle_t rdc_device_list_handle;
+static dissector_handle_t data_handle;
+
+static gboolean info_is_set;
+
+#include "packet-h283-fn.c"
+
+static int
+dissect_h283_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+{
+ proto_item *ti = NULL;
+ proto_tree *h283_tree = NULL;
+
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
+
+ info_is_set = FALSE;
+
+ ti = proto_tree_add_item(tree, proto_h283, tvb, 0, -1, ENC_NA);
+ h283_tree = proto_item_add_subtree(ti, ett_h283);
+
+ return dissect_LCTPDU_PDU(tvb, pinfo, h283_tree, NULL);
+}
+
+/*--- proto_register_h283 ----------------------------------------------*/
+void proto_register_h283(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] = {
+#include "packet-h283-hfarr.c"
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+ &ett_h283,
+#include "packet-h283-ettarr.c"
+ };
+
+ /* Register protocol */
+ proto_h283 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_h283, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector(PFNAME, dissect_h283_udp, proto_h283);
+
+}
+
+/*--- proto_reg_handoff_h283 -------------------------------------------*/
+void proto_reg_handoff_h283(void)
+{
+ dissector_handle_t h283_udp_handle;
+
+ h283_udp_handle = find_dissector(PFNAME);
+ dissector_add_for_decode_as("udp.port", h283_udp_handle);
+
+ rdc_pdu_handle = find_dissector("rdc");
+ rdc_device_list_handle = find_dissector("rdc.device_list");
+ data_handle = find_dissector("data");
+}
+