diff options
Diffstat (limited to 'epan/dissectors/packet-indigocare-netrix.c')
-rw-r--r-- | epan/dissectors/packet-indigocare-netrix.c | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/epan/dissectors/packet-indigocare-netrix.c b/epan/dissectors/packet-indigocare-netrix.c index bea7a368..6f9164d5 100644 --- a/epan/dissectors/packet-indigocare-netrix.c +++ b/epan/dissectors/packet-indigocare-netrix.c @@ -73,61 +73,61 @@ void proto_register_netrix(void); static dissector_handle_t netrix_handle; -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 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 int ett_netrix; +static int ett_netrix_systeminfo; +static int ett_netrix_groupcall; +static int ett_netrix_profilecall; +static int ett_netrix_get_conversiontable; +static int ett_netrix_get_conversiontable_result; +static int ett_netrix_search_conversiontables; +static int ett_netrix_search_conversiontables_result; +static int ett_netrix_boschcall; +static int ett_netrix_unknown; static const value_string netrix_headertypenames[] = { { INDIGOCARE_NETRIX_SYSTEMINFO, "System Info" }, @@ -148,29 +148,29 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da 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; + int32_t current_offset = 0, header_offset, identifier_start, identifier_offset, data_start, data_offset, ett; + int32_t header; + int32_t record_identifier; + int32_t group_number; + int32_t profile_number; const char * record_data; /* Corner case: 'EssecProtocolWithAck' ACK */ - if (( tvb_get_guint8(tvb, 0) == INDIGOCARE_NETRIX_ACK ) && (tvb_reported_length(tvb) == 1)) { + if (( tvb_get_uint8(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"); + col_set_str(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 ) + if ( tvb_get_uint8(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 ))) { + if ((tvb_captured_length(tvb) == tvb_reported_length(tvb)) && (( tvb_get_uint8(tvb, tvb_reported_length(tvb) - 1) != INDIGOCARE_NETRIX_ETX ) && ( tvb_get_uint8(tvb, tvb_reported_length(tvb) - 1) != INDIGOCARE_NETRIX_EOT ))) { return 0; } /* It is a Netrix Communication Protocol packet */ @@ -181,7 +181,7 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da current_offset++; /* Read header */ - header_offset = tvb_find_guint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_STX); + header_offset = tvb_find_uint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_STX); if(!ws_strtoi32(tvb_get_string_enc(pinfo->pool, tvb, current_offset, header_offset - current_offset, ENC_ASCII|ENC_NA), NULL, &header)) { /* Warn about invalid header? */ return 0; @@ -248,14 +248,14 @@ dissect_netrix(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *da current_offset = header_offset + 1; /* Read records */ - while (tvb_get_guint8(tvb, current_offset) != INDIGOCARE_NETRIX_ETX) { + while (tvb_get_uint8(tvb, current_offset) != INDIGOCARE_NETRIX_ETX) { identifier_start = current_offset; - identifier_offset = tvb_find_guint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_US); + identifier_offset = tvb_find_uint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_US); ws_strtoi32(tvb_get_string_enc(pinfo->pool, tvb, current_offset, identifier_offset - current_offset, ENC_ASCII|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); + data_offset = tvb_find_uint8(tvb, current_offset, -1, INDIGOCARE_NETRIX_RS); record_data = tvb_get_string_enc(pinfo->pool, tvb, current_offset, data_offset - current_offset, ENC_ASCII|ENC_NA); current_offset = data_offset + 1; @@ -626,7 +626,7 @@ proto_register_netrix(void) expert_module_t* expert_netrix; /* Setup protocol subtree array */ - static gint *ett[] = { + static int *ett[] = { &ett_netrix, &ett_netrix_systeminfo, &ett_netrix_groupcall, |