summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik de Jong <erikdejong@gmail.com>2016-12-12 21:49:39 +0100
committerAnders Broman <a.broman58@gmail.com>2017-01-24 14:01:29 +0000
commit1ee1e14a78a7d77ba85274f9eba380b6b06242a6 (patch)
tree33568ed0964ba0da324fa740051d31a04392ff23
parent4e2b2d4292243f13e5fe1638a12704d43dbd07df (diff)
downloadwireshark-1ee1e14a78a7d77ba85274f9eba380b6b06242a6.tar.gz
Dissector: IndigoCare nursecall protocols support
Adds support for IndigoCare nursecall protocols Bug: 13241 Change-Id: I83098c15d467ea42da8301c6b6a5568d9892fc60 Reviewed-on: https://code.wireshark.org/review/19224 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--docbook/release-notes.asciidoc2
-rw-r--r--epan/dissectors/.editorconfig8
-rw-r--r--epan/dissectors/CMakeLists.txt2
-rw-r--r--epan/dissectors/Makefile.am2
-rw-r--r--epan/dissectors/packet-indigocare-icall.c306
-rw-r--r--epan/dissectors/packet-indigocare-netrix.c680
6 files changed, 1000 insertions, 0 deletions
diff --git a/docbook/release-notes.asciidoc b/docbook/release-notes.asciidoc
index 47e8c2071a..b53008ef9b 100644
--- a/docbook/release-notes.asciidoc
+++ b/docbook/release-notes.asciidoc
@@ -77,6 +77,8 @@ Windows Cluster Management API (clusapi)
GSMTAP based logging
HomePNA
X-Rite i1 Display Pro (and derivatives) USB protocol
+IndigoCare iCall protocol
+IndigoCare Netrix protocol
--sort-and-group--
=== Updated Protocol Support
diff --git a/epan/dissectors/.editorconfig b/epan/dissectors/.editorconfig
index 345f3176de..80330f6308 100644
--- a/epan/dissectors/.editorconfig
+++ b/epan/dissectors/.editorconfig
@@ -1029,6 +1029,14 @@ indent_size = 2
[packet-imf.[ch]]
indent_size = 2
+[packet-indigocare-netrix.[ch]]
+indent_style = tab
+indent_size = tab
+
+[packet-indigocare-icall.[ch]]
+indent_style = tab
+indent_size = tab
+
[packet-interlink.[ch]]
indent_style = tab
indent_size = tab
diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt
index 1d7034bc84..4ec72b6726 100644
--- a/epan/dissectors/CMakeLists.txt
+++ b/epan/dissectors/CMakeLists.txt
@@ -729,6 +729,8 @@ set(DISSECTOR_SRC
packet-igrp.c
packet-imap.c
packet-imf.c
+ packet-indigocare-icall.c
+ packet-indigocare-netrix.c
packet-infiniband.c
packet-infiniband_sdp.c
packet-interlink.c
diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am
index 798fbb2d84..9f1ec30c82 100644
--- a/epan/dissectors/Makefile.am
+++ b/epan/dissectors/Makefile.am
@@ -750,6 +750,8 @@ DISSECTOR_SRC = \
packet-igrp.c \
packet-imap.c \
packet-imf.c \
+ packet-indigocare-icall.c \
+ packet-indigocare-netrix.c \
packet-infiniband.c \
packet-infiniband_sdp.c \
packet-interlink.c \
diff --git a/epan/dissectors/packet-indigocare-icall.c b/epan/dissectors/packet-indigocare-icall.c
new file mode 100644
index 0000000000..547d73418d
--- /dev/null
+++ b/epan/dissectors/packet-indigocare-icall.c
@@ -0,0 +1,306 @@
+/* packet-indigocare-icall.c
+ * Dissector routines for the IndigoCare iCall protocol
+ * By Erik de Jong <erikdejong@gmail.com>
+ * Copyright 2016 Erik de Jong
+ *
+ * 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 <range.h>
+#include <wiretap/wtap.h>
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include <wsutil/strtoi.h>
+
+#define INDIGOCARE_ICALL_SOH 0x01
+#define INDIGOCARE_ICALL_STX 0x02
+#define INDIGOCARE_ICALL_ETX 0x03
+#define INDIGOCARE_ICALL_EOT 0x04
+#define INDIGOCARE_ICALL_ACK 0x06
+#define INDIGOCARE_ICALL_US 0x1F
+#define INDIGOCARE_ICALL_RS 0x1E
+
+#define INDIGOCARE_ICALL_CALL 0x0A
+
+#define INDIGOCARE_ICALL_CALL_ROOM 0x01
+#define INDIGOCARE_ICALL_CALL_TYPE 0x02
+#define INDIGOCARE_ICALL_CALL_ADDITION 0x03
+#define INDIGOCARE_ICALL_CALL_ID 0x04
+#define INDIGOCARE_ICALL_CALL_TASK 0x05
+#define INDIGOCARE_ICALL_CALL_LOCATION 0x06
+#define INDIGOCARE_ICALL_CALL_NAME1 0x07
+#define INDIGOCARE_ICALL_CALL_NAME2 0x08
+#define INDIGOCARE_ICALL_CALL_TYPE_NUMERICAL 0x09
+#define INDIGOCARE_ICALL_CALL_NURSE 0x0A
+
+void proto_reg_handoff_icall(void);
+void proto_register_icall(void);
+
+static expert_field ei_icall_unexpected_header = EI_INIT;
+static expert_field ei_icall_unexpected_record = EI_INIT;
+
+static int proto_icall = -1;
+static int hf_icall_header_type = -1;
+
+static int hf_icall_call_room_type = -1;
+static int hf_icall_call_type_type = -1;
+static int hf_icall_call_addition_type = -1;
+static int hf_icall_call_id_type = -1;
+static int hf_icall_call_task_type = -1;
+static int hf_icall_call_location_type = -1;
+static int hf_icall_call_name1_type = -1;
+static int hf_icall_call_name2_type = -1;
+static int hf_icall_call_numerical_type = -1;
+static int hf_icall_call_nurse_type = -1;
+
+static gint ett_icall = -1;
+static gint ett_icall_call = -1;
+static gint ett_icall_unknown = -1;
+
+static const value_string icall_headertypenames[] = {
+ { INDIGOCARE_ICALL_CALL, "Call Info" },
+ { 0, NULL }
+};
+
+static int
+dissect_icall(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *data _U_)
+{
+ proto_item *ti;
+ proto_item *header_item;
+ proto_tree *icall_tree;
+ proto_tree *icall_header_tree;
+ gint32 current_offset = 0, header_offset, identifier_start, identifier_offset, data_start, data_offset, ett;
+ gint32 header;
+ gint32 record_identifier;
+ const guint8 * record_data;
+
+ /* Starts with SOH */
+ if ( tvb_get_guint8(tvb, 0) != INDIGOCARE_ICALL_SOH )
+ return 0;
+ /* Ends with EOT */
+ if ((pinfo->phdr->caplen == pinfo->phdr->len) && ( tvb_get_guint8(tvb, tvb_reported_length(tvb) - 1) != INDIGOCARE_ICALL_EOT ))
+ return 0;
+ /* It is a iCall Communication Protocol packet */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "iCall");
+ col_clear(pinfo->cinfo,COL_INFO);
+ ti = proto_tree_add_item(tree, proto_icall, tvb, 0, -1, ENC_NA);
+ icall_tree = proto_item_add_subtree(ti, ett_icall);
+ current_offset++;
+
+ /* Read header */
+ header_offset = tvb_find_guint8(tvb, current_offset, -1, INDIGOCARE_ICALL_STX);
+ ws_strtoi32(tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, header_offset - current_offset, ENC_NA), NULL, &header);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s:", val_to_str(header, icall_headertypenames, "Unknown (%d)"));
+ switch(header) {
+ case INDIGOCARE_ICALL_CALL:
+ ett = ett_icall_call;
+ break;
+ default:
+ proto_tree_add_expert_format(icall_tree, pinfo, &ei_icall_unexpected_header, tvb, current_offset, header_offset - current_offset, "Unexpected header %d", header);
+ return 0;
+ break;
+ }
+ header_item = proto_tree_add_uint_format(icall_tree, hf_icall_header_type, tvb, current_offset, header_offset - current_offset, header, "%s", val_to_str(header, icall_headertypenames, "Unknown (%d)"));
+ icall_header_tree = proto_item_add_subtree(header_item, ett);
+ current_offset = header_offset + 1;
+
+ /* Read records */
+ while (tvb_get_guint8(tvb, current_offset) != INDIGOCARE_ICALL_ETX) {
+ identifier_start = current_offset;
+ identifier_offset = tvb_find_guint8(tvb, current_offset, -1, INDIGOCARE_ICALL_US);
+ ws_strtoi32(tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, identifier_offset - current_offset, ENC_NA), NULL, &record_identifier);
+ current_offset = identifier_offset + 1;
+
+ data_start = current_offset;
+ data_offset = tvb_find_guint8(tvb, data_start, -1, INDIGOCARE_ICALL_RS);
+ record_data = tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, data_offset - data_start, ENC_NA);
+
+ current_offset = data_offset + 1;
+
+ switch (header) {
+ case INDIGOCARE_ICALL_CALL:
+ switch (record_identifier) {
+ case INDIGOCARE_ICALL_CALL_ROOM:
+ proto_tree_add_item_ret_string(icall_header_tree, hf_icall_call_room_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA, wmem_packet_scope(), &record_data);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Room=%s", record_data);
+ break;
+ case INDIGOCARE_ICALL_CALL_TYPE:
+ proto_tree_add_item_ret_string(icall_header_tree, hf_icall_call_type_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA, wmem_packet_scope(), &record_data);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Type=%s", record_data);
+ break;
+ case INDIGOCARE_ICALL_CALL_ADDITION:
+ proto_tree_add_item(icall_header_tree, hf_icall_call_addition_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_ICALL_CALL_ID:
+ proto_tree_add_item(icall_header_tree, hf_icall_call_id_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_ICALL_CALL_TASK:
+ proto_tree_add_item(icall_header_tree, hf_icall_call_task_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_ICALL_CALL_LOCATION:
+ proto_tree_add_item_ret_string(icall_header_tree, hf_icall_call_location_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA, wmem_packet_scope(), &record_data);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Location=%s", record_data);
+ break;
+ case INDIGOCARE_ICALL_CALL_NAME1:
+ proto_tree_add_item_ret_string(icall_header_tree, hf_icall_call_name1_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA, wmem_packet_scope(), &record_data);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Name 1=%s", record_data);
+ break;
+ case INDIGOCARE_ICALL_CALL_NAME2:
+ proto_tree_add_item_ret_string(icall_header_tree, hf_icall_call_name2_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA, wmem_packet_scope(), &record_data);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Name 2=%s", record_data);
+ break;
+ case INDIGOCARE_ICALL_CALL_TYPE_NUMERICAL:
+ proto_tree_add_item(icall_header_tree, hf_icall_call_numerical_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_ICALL_CALL_NURSE:
+ proto_tree_add_item(icall_header_tree, hf_icall_call_nurse_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ default:
+ proto_tree_add_expert_format(icall_header_tree, pinfo, &ei_icall_unexpected_record, tvb, identifier_start, data_offset - identifier_start, "Unexpected record %d with value %s", record_identifier, record_data);
+ break;
+ }
+ break;
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+void
+proto_reg_handoff_icall(void)
+{
+ dissector_handle_t icall_handle;
+
+ icall_handle = create_dissector_handle(dissect_icall, proto_icall);
+ dissector_add_for_decode_as("udp.port", icall_handle);
+ dissector_add_for_decode_as("tcp.port", icall_handle);
+}
+
+void
+proto_register_icall(void)
+{
+ static hf_register_info hf[] = {
+ { &hf_icall_header_type,
+ { "Header Type", "icall.header",
+ FT_UINT32, BASE_DEC,
+ VALS(icall_headertypenames), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_room_type,
+ { "Room", "icall.call.room",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_type_type,
+ { "Type", "icall.call.type",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_addition_type,
+ { "Addition", "icall.call.addition",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_id_type,
+ { "ID", "icall.call.id",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_task_type,
+ { "Task", "icall.call.task",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_location_type,
+ { "Location", "icall.call.location",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_name1_type,
+ { "Name 1", "icall.call.name1",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_name2_type,
+ { "Name 2", "icall.call.name2",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_numerical_type,
+ { "Type Numerical", "icall.call.type_numerical",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_icall_call_nurse_type,
+ { "Nurse", "icall.call.nurse",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ }
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_icall_unexpected_header, { "icall.unexpected.header", PI_MALFORMED, PI_WARN, "Unexpected header", EXPFILL }},
+ { &ei_icall_unexpected_record, { "icall.unexpected.record", PI_MALFORMED, PI_WARN, "Unexpected record", EXPFILL }}
+ };
+
+ expert_module_t* expert_icall;
+
+ /* Setup protocol subtree array */
+ static gint *ett[] = {
+ &ett_icall,
+ &ett_icall_call,
+ &ett_icall_unknown
+ };
+
+ proto_icall = proto_register_protocol (
+ "iCall Communication Protocol", /* name */
+ "iCall", /* short name */
+ "icall" /* abbrev */
+ );
+
+ proto_register_field_array(proto_icall, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ expert_icall = expert_register_protocol(proto_icall);
+ expert_register_field_array(expert_icall, ei, array_length(ei));
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-indigocare-netrix.c b/epan/dissectors/packet-indigocare-netrix.c
new file mode 100644
index 0000000000..58fdf3b83a
--- /dev/null
+++ b/epan/dissectors/packet-indigocare-netrix.c
@@ -0,0 +1,680 @@
+/* packet-indigocare-netrix.c
+ * Dissector routines for the IndigoCare Netrix protocols
+ * By Erik de Jong <erikdejong@gmail.com>
+ * Copyright 2016 Erik de Jong
+ *
+ * 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 <range.h>
+#include <wiretap/wtap.h>
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include <wsutil/strtoi.h>
+
+#define INDIGOCARE_NETRIX_SOH 0x01
+#define INDIGOCARE_NETRIX_STX 0x02
+#define INDIGOCARE_NETRIX_ETX 0x03
+#define INDIGOCARE_NETRIX_EOT 0x04
+#define INDIGOCARE_NETRIX_ACK 0x06
+#define INDIGOCARE_NETRIX_US 0x1F
+#define INDIGOCARE_NETRIX_RS 0x1E
+
+#define INDIGOCARE_NETRIX_SYSTEMINFO 0x01
+#define INDIGOCARE_NETRIX_GROUP 0x0A
+#define INDIGOCARE_NETRIX_PROFILE 0x0F
+#define INDIGOCARE_NETRIX_GET_CONVERSIONTABLE 0x23
+#define INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_BEGIN 0x88B8
+#define INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_END 0x8C9E
+#define INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_NONE 0x8C9F
+#define INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES 0x24
+#define INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_BEGIN 0x8CA0
+#define INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_END 0x9086
+#define INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_NONE 0x9087
+#define INDIGOCARE_NETRIX_BOSCH 0x69
+
+#define INDIGOCARE_NETRIX_SYSTEMINFO_COMPUTERNAME 0x01
+#define INDIGOCARE_NETRIX_SYSTEMINFO_IPADDRESS 0x02
+#define INDIGOCARE_NETRIX_SYSTEMINFO_VERSION 0x03
+#define INDIGOCARE_NETRIX_SYSTEMINFO_BEEP 0x04
+
+#define INDIGOCARE_NETRIX_GROUP_GROUPNUMBER 0x01
+#define INDIGOCARE_NETRIX_GROUP_TYPE 0x02
+#define INDIGOCARE_NETRIX_GROUP_ADDITION 0x03
+#define INDIGOCARE_NETRIX_GROUP_IDBOSCHLOC 0x04
+#define INDIGOCARE_NETRIX_GROUP_NAME 0x05
+#define INDIGOCARE_NETRIX_GROUP_ROOM 0x06
+#define INDIGOCARE_NETRIX_GROUP_LOCATION 0x07
+
+#define INDIGOCARE_NETRIX_PROFILE_PROFILENUMBER 0x01
+#define INDIGOCARE_NETRIX_PROFILE_TYPE 0x02
+#define INDIGOCARE_NETRIX_PROFILE_ADDITION 0x03
+#define INDIGOCARE_NETRIX_PROFILE_IDBOSCHLOC 0x04
+#define INDIGOCARE_NETRIX_PROFILE_NAME 0x05
+#define INDIGOCARE_NETRIX_PROFILE_ROOM 0x06
+#define INDIGOCARE_NETRIX_PROFILE_LOCATION 0x07
+
+#define INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_TABLE 0x01
+
+#define INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_KEY 0x01
+#define INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_VALUE 0x02
+
+#define INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_KEY 0x01
+
+#define INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_TABLE 0x01
+
+void proto_reg_handoff_netrix(void);
+void proto_register_netrix(void);
+
+static expert_field ei_netrix_unexpected_header = EI_INIT;
+static expert_field ei_netrix_unexpected_record = EI_INIT;
+
+static int proto_netrix = -1;
+static int hf_netrix_header_type = -1;
+static int hf_netrix_header_systeminfo_type = -1;
+static int hf_netrix_header_groupcall_type = -1;
+static int hf_netrix_header_profilecall_type = -1;
+static int hf_netrix_header_get_conversiontable_type = -1;
+static int hf_netrix_header_get_conversiontable_none_type = -1;
+static int hf_netrix_header_get_conversiontable_result_type = -1;
+static int hf_netrix_header_search_conversiontables_type = -1;
+static int hf_netrix_header_search_conversiontables_none_type = -1;
+static int hf_netrix_header_boschcall_type = -1;
+
+static int hf_netrix_ack_type = -1;
+
+static int hf_netrix_systeminfo_computername_type = -1;
+static int hf_netrix_systeminfo_ipaddress_type = -1;
+static int hf_netrix_systeminfo_version_type = -1;
+static int hf_netrix_systeminfo_beep_type = -1;
+
+static int hf_netrix_groupcall_groupnumber_type = -1;
+static int hf_netrix_groupcall_type_type = -1;
+static int hf_netrix_groupcall_addition_type = -1;
+static int hf_netrix_groupcall_idboschloc_type = -1;
+static int hf_netrix_groupcall_name_type = -1;
+static int hf_netrix_groupcall_room_type = -1;
+static int hf_netrix_groupcall_location_type = -1;
+
+static int hf_netrix_profilecall_groupnumber_type = -1;
+static int hf_netrix_profilecall_type_type = -1;
+static int hf_netrix_profilecall_addition_type = -1;
+static int hf_netrix_profilecall_idboschloc_type = -1;
+static int hf_netrix_profilecall_name_type = -1;
+static int hf_netrix_profilecall_room_type = -1;
+static int hf_netrix_profilecall_location_type = -1;
+
+static int hf_netrix_get_conversiontable_table_type = -1;
+static int hf_netrix_get_conversiontable_key_type = -1;
+static int hf_netrix_get_conversiontable_value_type = -1;
+
+static int hf_netrix_search_conversiontables_key_type = -1;
+static int hf_netrix_search_conversiontables_table_type = -1;
+
+static gint ett_netrix = -1;
+static gint ett_netrix_systeminfo = -1;
+static gint ett_netrix_groupcall = -1;
+static gint ett_netrix_profilecall = -1;
+static gint ett_netrix_get_conversiontable = -1;
+static gint ett_netrix_get_conversiontable_result = -1;
+static gint ett_netrix_search_conversiontables = -1;
+static gint ett_netrix_search_conversiontables_result = -1;
+static gint ett_netrix_boschcall = -1;
+static gint ett_netrix_unknown = -1;
+
+static const value_string netrix_headertypenames[] = {
+ { INDIGOCARE_NETRIX_SYSTEMINFO, "System Info" },
+ { INDIGOCARE_NETRIX_GROUP, "Group Call" },
+ { INDIGOCARE_NETRIX_PROFILE, "Profile Call" },
+ { INDIGOCARE_NETRIX_GET_CONVERSIONTABLE, "Get Conversiontable" },
+ { INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_NONE, "Get Conversiontable - No Results" },
+ { INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES, "Search Conversiontables" },
+ { INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_NONE, "Search Conversiontables - No Results" },
+ { INDIGOCARE_NETRIX_BOSCH, "Bosch Call" },
+ { 0, NULL }
+};
+
+static int
+dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *data _U_)
+{
+ proto_item *ti;
+ proto_item *header_item;
+ proto_tree *netrix_tree;
+ proto_tree *netrix_header_tree;
+ gint32 current_offset = 0, header_offset, identifier_start, identifier_offset, data_start, data_offset, ett;
+ gint32 header;
+ gint32 record_identifier;
+ gint32 group_number;
+ gint32 profile_number;
+ const char * record_data;
+
+ /* Corner case: 'EssecProtocolWithAck' ACK */
+ if (( tvb_get_guint8(tvb, 0) == INDIGOCARE_NETRIX_ACK ) && (tvb_reported_length(tvb) == 1)) {
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Netrix");
+ col_clear(pinfo->cinfo, COL_INFO);
+ ti = proto_tree_add_item(tree, proto_netrix, tvb, 0, -1, ENC_NA);
+ netrix_tree = proto_item_add_subtree(ti, ett_netrix);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Ack");
+ proto_tree_add_item(netrix_tree, hf_netrix_ack_type, tvb, 0, 1, ENC_NA);
+ return 1;
+ }
+
+ /* Starts with SOH */
+ if ( tvb_get_guint8(tvb, 0) != INDIGOCARE_NETRIX_SOH )
+ return 0;
+ /* Ends with ETX or EOT */
+ if ((tvb_captured_length(tvb) == tvb_reported_length(tvb)) && (( tvb_get_guint8(tvb, tvb_reported_length(tvb) - 1) != INDIGOCARE_NETRIX_ETX ) && ( tvb_get_guint8(tvb, tvb_reported_length(tvb) - 1) != INDIGOCARE_NETRIX_EOT ))) {
+ return 0;
+ }
+ /* It is a Netrix Communication Protocol packet */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "Netrix");
+ col_clear(pinfo->cinfo, COL_INFO);
+ ti = proto_tree_add_item(tree, proto_netrix, tvb, 0, -1, ENC_NA);
+ netrix_tree = proto_item_add_subtree(ti, ett_netrix);
+ current_offset++;
+
+ /* Read header */
+ header_offset = tvb_find_guint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_STX);
+ if(!ws_strtoi32(tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, header_offset - current_offset, ENC_NA), NULL, &header)) {
+ /* Warn about invalid header? */
+ return 0;
+ }
+ switch(header) {
+ case INDIGOCARE_NETRIX_SYSTEMINFO:
+ ett = ett_netrix_systeminfo;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_systeminfo_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Systeminfo:");
+ break;
+ case INDIGOCARE_NETRIX_GROUP:
+ ett = ett_netrix_groupcall;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_groupcall_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Group Call:");
+ break;
+ case INDIGOCARE_NETRIX_PROFILE:
+ ett = ett_netrix_profilecall;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_profilecall_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Profile Call:");
+ break;
+ case INDIGOCARE_NETRIX_GET_CONVERSIONTABLE:
+ ett = ett_netrix_get_conversiontable;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_get_conversiontable_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Get Conversiontable:");
+ break;
+ case INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_NONE:
+ ett = ett_netrix_get_conversiontable_result;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_get_conversiontable_none_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Get Conversiontable: No Results");
+ break;
+ case INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES:
+ ett = ett_netrix_search_conversiontables;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_search_conversiontables_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Search Conversiontables:");
+ break;
+ case INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_NONE:
+ ett = ett_netrix_search_conversiontables_result;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_search_conversiontables_none_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Search Conversiontables: No Results");
+ break;
+ case INDIGOCARE_NETRIX_BOSCH:
+ ett = ett_netrix_boschcall;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_boschcall_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_set_str(pinfo->cinfo, COL_INFO, "Bosch Call:");
+ break;
+ default:
+ if ((header >= INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_BEGIN) && (header <= INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_END)) {
+ ett = ett_netrix_get_conversiontable_result;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_get_conversiontable_result_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Get Conversiontable result %d:", header - INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_BEGIN);
+ } else if ((header >= INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_BEGIN) && (header <= INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_END)) {
+ ett = ett_netrix_search_conversiontables_result;
+ header_item = proto_tree_add_item(netrix_tree, hf_netrix_header_get_conversiontable_result_type, tvb, current_offset, header_offset - current_offset, ENC_NA);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Search Conversiontables result %d:", header - INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_BEGIN);
+ } else {
+ proto_tree_add_expert_format(netrix_tree, pinfo, &ei_netrix_unexpected_header, tvb, current_offset, header_offset - current_offset, "Unexpected header %d", header);
+ ett = ett_netrix_unknown;
+ header_item = proto_tree_add_uint_format_value(netrix_tree, hf_netrix_header_type, tvb, current_offset, header_offset - current_offset, header, "%d", header);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s:", val_to_str(header, netrix_headertypenames, "Unknown (%d)"));
+ }
+ break;
+ }
+ netrix_header_tree = proto_item_add_subtree(header_item, ett);
+ current_offset = header_offset + 1;
+
+ /* Read records */
+ while (tvb_get_guint8(tvb, current_offset) != INDIGOCARE_NETRIX_ETX) {
+ identifier_start = current_offset;
+ identifier_offset = tvb_find_guint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_US);
+ ws_strtoi32(tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, identifier_offset - current_offset, ENC_NA), NULL, &record_identifier);
+ current_offset = identifier_offset + 1;
+
+ data_start = current_offset;
+ data_offset = tvb_find_guint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_RS);
+ record_data = tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, data_offset - current_offset, ENC_NA);
+
+ current_offset = data_offset + 1;
+
+ switch (header) {
+ case INDIGOCARE_NETRIX_SYSTEMINFO:
+ switch (record_identifier) {
+ case INDIGOCARE_NETRIX_SYSTEMINFO_COMPUTERNAME:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_computername_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Computername=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_SYSTEMINFO_IPADDRESS:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_ipaddress_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " IP Address=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_SYSTEMINFO_VERSION:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_version_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Systeminfo=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_SYSTEMINFO_BEEP:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_beep_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ default:
+ proto_tree_add_expert_format(netrix_header_tree, pinfo, &ei_netrix_unexpected_record, tvb, identifier_start, data_offset - identifier_start, "Unexpected record %d with value %s", record_identifier, record_data);
+ break;
+ }
+ break;
+ case INDIGOCARE_NETRIX_GROUP:
+ switch (record_identifier) {
+ case INDIGOCARE_NETRIX_GROUP_GROUPNUMBER:
+ ws_strtoi32(record_data, NULL, &group_number);
+ proto_tree_add_uint_format_value(netrix_header_tree, hf_netrix_groupcall_groupnumber_type, tvb, identifier_start, data_offset - identifier_start, group_number, "%d", group_number);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Groupnumber=%d", group_number);
+ break;
+ case INDIGOCARE_NETRIX_GROUP_TYPE:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_type_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Type=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_GROUP_ADDITION:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_addition_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_NETRIX_GROUP_IDBOSCHLOC:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_idboschloc_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_NETRIX_GROUP_NAME:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_name_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Name=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_GROUP_ROOM:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_room_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Room=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_GROUP_LOCATION:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_location_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Location=%s", record_data);
+ break;
+ default:
+ proto_tree_add_expert_format(netrix_header_tree, pinfo, &ei_netrix_unexpected_record, tvb, identifier_start, data_offset - identifier_start, "Unexpected record %d with value %s", record_identifier, record_data);
+ break;
+ }
+ break;
+ case INDIGOCARE_NETRIX_PROFILE:
+ switch (record_identifier) {
+ case INDIGOCARE_NETRIX_PROFILE_PROFILENUMBER:
+ ws_strtoi32(record_data, NULL, &profile_number);
+ proto_tree_add_uint_format_value(netrix_header_tree, hf_netrix_profilecall_groupnumber_type, tvb, identifier_start, data_offset - identifier_start, profile_number, "%d", profile_number);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Profilenumber=%d", profile_number);
+ break;
+ case INDIGOCARE_NETRIX_PROFILE_TYPE:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_type_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Type=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_PROFILE_ADDITION:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_addition_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_NETRIX_PROFILE_IDBOSCHLOC:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_idboschloc_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ break;
+ case INDIGOCARE_NETRIX_PROFILE_NAME:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_name_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Name=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_PROFILE_ROOM:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_room_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Room=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_PROFILE_LOCATION:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_location_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Location=%s", record_data);
+ break;
+ default:
+ proto_tree_add_expert_format(netrix_header_tree, pinfo, &ei_netrix_unexpected_record, tvb, identifier_start, data_offset - identifier_start, "Unexpected record %d with value %s", record_identifier, record_data);
+ break;
+ }
+ break;
+ case INDIGOCARE_NETRIX_GET_CONVERSIONTABLE:
+ switch (record_identifier) {
+ case INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_TABLE:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_get_conversiontable_table_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Table=%s", record_data);
+ break;
+ }
+ break;
+ case INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES:
+ switch (record_identifier) {
+ case INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_KEY:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_search_conversiontables_key_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Key=%s", record_data);
+ break;
+ default:
+ proto_tree_add_expert_format(netrix_header_tree, pinfo, &ei_netrix_unexpected_record, tvb, identifier_start, data_offset - identifier_start, "Unexpected record %d with value %s", record_identifier, record_data);
+ break;
+ }
+ break;
+ default:
+ if ((header >= INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_BEGIN) && (header <= INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_END)) {
+ switch (record_identifier) {
+ case INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_KEY:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_get_conversiontable_key_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Key=%s", record_data);
+ break;
+ case INDIGOCARE_NETRIX_GET_CONVERSIONTABLE_VALUE:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_get_conversiontable_value_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Value=%s", record_data);
+ break;
+ default:
+ proto_tree_add_expert_format(netrix_header_tree, pinfo, &ei_netrix_unexpected_record, tvb, identifier_start, data_offset - identifier_start, "Unexpected record %d with value %s", record_identifier, record_data);
+ break;
+ }
+ } else if ((header >= INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_BEGIN) && (header <= INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_END)) {
+ switch (record_identifier) {
+ case INDIGOCARE_NETRIX_SEARCH_CONVERSIONTABLES_TABLE:
+ proto_tree_add_item(netrix_header_tree, hf_netrix_search_conversiontables_table_type, tvb, data_start, data_offset - data_start, ENC_ASCII|ENC_NA);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Table=%s", record_data);
+ break;
+ default:
+ proto_tree_add_expert_format(netrix_header_tree, pinfo, &ei_netrix_unexpected_record, tvb, identifier_start, data_offset - identifier_start, "Unexpected record %d with value %s", record_identifier, record_data);
+ break;
+ }
+ }
+ break;
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+void
+proto_reg_handoff_netrix(void)
+{
+ static dissector_handle_t netrix_handle;
+
+ netrix_handle = create_dissector_handle(dissect_netrix, proto_netrix);
+ dissector_add_for_decode_as("tcp.port", netrix_handle);
+}
+
+void
+proto_register_netrix(void)
+{
+ static hf_register_info hf[] = {
+ { &hf_netrix_header_type,
+ { "Header Type", "netrix.header",
+ FT_UINT32, BASE_DEC,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_systeminfo_type,
+ { "Ack", "netrix.systeminfo",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_groupcall_type,
+ { "Group call", "netrix.groupcall",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_profilecall_type,
+ { "Profile call", "netrix.profilecall",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_get_conversiontable_type,
+ { "Get conversiontable", "netrix.getconversiontable",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_get_conversiontable_none_type,
+ { "Get conversiontable: no results", "netrix.getconversiontable.noresult",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_get_conversiontable_result_type,
+ { "Get conversiontable result", "netrix.getconversiontable.result",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_search_conversiontables_type,
+ { "Search conversiontables", "netrix.searchconversiontables",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_search_conversiontables_none_type,
+ { "Search converstiontables: no results", "netrix.searchconversiontables.noresult",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_header_boschcall_type,
+ { "Bosch call", "netrix.boschcall",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_ack_type,
+ { "Ack", "netrix.ack",
+ FT_NONE, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_systeminfo_computername_type,
+ { "Computername", "netrix.systeminfo.computername",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_systeminfo_ipaddress_type,
+ { "IP Address", "netrix.systeminfo.ipaddress",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_systeminfo_version_type,
+ { "Version", "netrix.systeminfo.version",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_systeminfo_beep_type,
+ { "Beep", "netrix.systeminfo.beep",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_groupcall_groupnumber_type,
+ { "Groupnumber", "netrix.groupcall.groupnumber",
+ FT_UINT32, BASE_DEC,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_groupcall_type_type,
+ { "MSG1 (Type)", "netrix.groupcall.type",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_groupcall_addition_type,
+ { "MSG2 (Addition)", "netrix.groupcall.addition",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_groupcall_idboschloc_type,
+ { "MSG3 (ID / Bosch Loc)", "netrix.groupcall.idboschloc",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_groupcall_name_type,
+ { "MSG4 (Name)", "netrix.groupcall.name",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_groupcall_room_type,
+ { "MSG5 (Room)", "netrix.groupcall.room",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_groupcall_location_type,
+ { "MSG6 (Location)", "netrix.groupcall.location",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_profilecall_groupnumber_type,
+ { "Profilenumber", "netrix.profilecall.profilenumber",
+ FT_UINT32, BASE_DEC,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_profilecall_type_type,
+ { "MSG1 (Type)", "netrix.profilecall.type",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_profilecall_addition_type,
+ { "MSG2 (Addition)", "netrix.profilecall.addition",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_profilecall_idboschloc_type,
+ { "MSG3 (ID / Bosch Loc)", "netrix.profilecall.idboschloc",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_profilecall_name_type,
+ { "MSG4 (Name)", "netrix.profilecall.name",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_profilecall_room_type,
+ { "MSG5 (Room)", "netrix.profilecall.room",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_profilecall_location_type,
+ { "MSG6 (Location)", "netrix.profilecall.location",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_get_conversiontable_table_type,
+ { "Table", "netrix.getconversiontable.table",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_get_conversiontable_key_type,
+ { "Key", "netrix.getconversiontable.key",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_get_conversiontable_value_type,
+ { "Value", "netrix.getconversiontable.value",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_search_conversiontables_key_type,
+ { "Key", "netrix.searchconversiontables.key",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_netrix_search_conversiontables_table_type,
+ { "Table", "netrix.searchconversiontables.table",
+ FT_STRING, BASE_NONE,
+ NULL, 0x0,
+ NULL, HFILL }
+ }
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_netrix_unexpected_header, { "netrix.unexpected.header", PI_MALFORMED, PI_WARN, "Unexpected header", EXPFILL }},
+ { &ei_netrix_unexpected_record, { "netrix.unexpected.record", PI_MALFORMED, PI_WARN, "Unexpected record", EXPFILL }}
+ };
+
+ expert_module_t* expert_netrix;
+
+ /* Setup protocol subtree array */
+ static gint *ett[] = {
+ &ett_netrix,
+ &ett_netrix_systeminfo,
+ &ett_netrix_groupcall,
+ &ett_netrix_profilecall,
+ &ett_netrix_get_conversiontable,
+ &ett_netrix_get_conversiontable_result,
+ &ett_netrix_search_conversiontables,
+ &ett_netrix_search_conversiontables_result,
+ &ett_netrix_boschcall,
+ &ett_netrix_unknown
+ };
+
+ proto_netrix = proto_register_protocol (
+ "Netrix Communication Protocol", /* name */
+ "Netrix", /* short name */
+ "netrix" /* abbrev */
+ );
+
+ proto_register_field_array(proto_netrix, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ expert_netrix = expert_register_protocol(proto_netrix);
+ expert_register_field_array(expert_netrix, ei, array_length(ei));
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */