aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-indigocare-netrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-indigocare-netrix.c')
-rw-r--r--epan/dissectors/packet-indigocare-netrix.c162
1 files changed, 81 insertions, 81 deletions
diff --git a/epan/dissectors/packet-indigocare-netrix.c b/epan/dissectors/packet-indigocare-netrix.c
index 4af6b0a6ec..f9b0232762 100644
--- a/epan/dissectors/packet-indigocare-netrix.c
+++ b/epan/dissectors/packet-indigocare-netrix.c
@@ -13,7 +13,6 @@
#include "config.h"
#include <range.h>
-#include <wiretap/wtap.h>
#include <epan/packet.h>
#include <epan/expert.h>
#include <wsutil/strtoi.h>
@@ -72,61 +71,63 @@
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 dissector_handle_t netrix_handle;
+
+static expert_field ei_netrix_unexpected_header;
+static expert_field ei_netrix_unexpected_record;
+
+static int proto_netrix;
+static int hf_netrix_header_type;
+static int hf_netrix_header_systeminfo_type;
+static int hf_netrix_header_groupcall_type;
+static int hf_netrix_header_profilecall_type;
+static int hf_netrix_header_get_conversiontable_type;
+static int hf_netrix_header_get_conversiontable_none_type;
+static int hf_netrix_header_get_conversiontable_result_type;
+static int hf_netrix_header_search_conversiontables_type;
+static int hf_netrix_header_search_conversiontables_none_type;
+static int hf_netrix_header_boschcall_type;
+
+static int hf_netrix_ack_type;
+
+static int hf_netrix_systeminfo_computername_type;
+static int hf_netrix_systeminfo_ipaddress_type;
+static int hf_netrix_systeminfo_version_type;
+static int hf_netrix_systeminfo_beep_type;
+
+static int hf_netrix_groupcall_groupnumber_type;
+static int hf_netrix_groupcall_type_type;
+static int hf_netrix_groupcall_addition_type;
+static int hf_netrix_groupcall_idboschloc_type;
+static int hf_netrix_groupcall_name_type;
+static int hf_netrix_groupcall_room_type;
+static int hf_netrix_groupcall_location_type;
+
+static int hf_netrix_profilecall_groupnumber_type;
+static int hf_netrix_profilecall_type_type;
+static int hf_netrix_profilecall_addition_type;
+static int hf_netrix_profilecall_idboschloc_type;
+static int hf_netrix_profilecall_name_type;
+static int hf_netrix_profilecall_room_type;
+static int hf_netrix_profilecall_location_type;
+
+static int hf_netrix_get_conversiontable_table_type;
+static int hf_netrix_get_conversiontable_key_type;
+static int hf_netrix_get_conversiontable_value_type;
+
+static int hf_netrix_search_conversiontables_key_type;
+static int hf_netrix_search_conversiontables_table_type;
+
+static gint ett_netrix;
+static gint ett_netrix_systeminfo;
+static gint ett_netrix_groupcall;
+static gint ett_netrix_profilecall;
+static gint ett_netrix_get_conversiontable;
+static gint ett_netrix_get_conversiontable_result;
+static gint ett_netrix_search_conversiontables;
+static gint ett_netrix_search_conversiontables_result;
+static gint ett_netrix_boschcall;
+static gint ett_netrix_unknown;
static const value_string netrix_headertypenames[] = {
{ INDIGOCARE_NETRIX_SYSTEMINFO, "System Info" },
@@ -263,19 +264,19 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_computername_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_ipaddress_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_version_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_systeminfo_beep_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
@@ -290,25 +291,25 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_type_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_addition_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_idboschloc_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_name_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_room_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_groupcall_location_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, " Location=%s", record_data);
break;
default:
@@ -324,25 +325,25 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_type_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_addition_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_idboschloc_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_name_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_room_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_profilecall_location_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, " Location=%s", record_data);
break;
default:
@@ -353,7 +354,7 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_get_conversiontable_table_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, " Table=%s", record_data);
break;
}
@@ -361,7 +362,7 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_search_conversiontables_key_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, " Key=%s", record_data);
break;
default:
@@ -373,11 +374,11 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_get_conversiontable_key_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_get_conversiontable_value_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, " Value=%s", record_data);
break;
default:
@@ -387,7 +388,7 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
} 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);
+ proto_tree_add_item(netrix_header_tree, hf_netrix_search_conversiontables_table_type, tvb, data_start, data_offset - data_start, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, " Table=%s", record_data);
break;
default:
@@ -404,9 +405,6 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da
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);
}
@@ -421,7 +419,7 @@ proto_register_netrix(void)
NULL, HFILL }
},
{ &hf_netrix_header_systeminfo_type,
- { "Ack", "netrix.systeminfo",
+ { "System Info", "netrix.systeminfo",
FT_NONE, BASE_NONE,
NULL, 0x0,
NULL, HFILL }
@@ -652,6 +650,8 @@ proto_register_netrix(void)
expert_netrix = expert_register_protocol(proto_netrix);
expert_register_field_array(expert_netrix, ei, array_length(ei));
+
+ netrix_handle = register_dissector("netrix", dissect_netrix, proto_netrix);
}
/*