diff options
Diffstat (limited to 'epan/dissectors/packet-arinc615a.c')
-rw-r--r-- | epan/dissectors/packet-arinc615a.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/epan/dissectors/packet-arinc615a.c b/epan/dissectors/packet-arinc615a.c index 1baa797e..5715b8b1 100644 --- a/epan/dissectors/packet-arinc615a.c +++ b/epan/dissectors/packet-arinc615a.c @@ -53,44 +53,44 @@ static const value_string a615a_operation_status_codes[] = { {0x1007, "Load of this header file has failed, details in status description"}, {0, NULL}}; -static int proto_a615a = -1; - -static gint ett_a615a = -1; - -static int hf_a615a_file_length = -1; -static int hf_a615a_protocol_version = -1; -static int hf_a615a_counter = -1; -static int hf_a615a_operation_status = -1; -static int hf_a615a_exception_timer = -1; -static int hf_a615a_estimated_time = -1; -static int hf_a615a_status_description = -1; -static int hf_a615a_load_ratio = -1; -static int hf_a615a_file_count = -1; -static int hf_a615a_file_name = -1; -static int hf_a615a_file_description = -1; -static int hf_a615a_part_number = -1; -static int hf_a615a_number_target_hardware = -1; -static int hf_a615a_literal_name = -1; -static int hf_a615a_serial_number = -1; -static int hf_a615a_part_number_count = -1; -static int hf_a615a_amendment = -1; -static int hf_a615a_designation = -1; -static int hf_a615a_user_data = -1; -static int hf_a615a_file_type = -1; +static int proto_a615a; + +static int ett_a615a; + +static int hf_a615a_file_length; +static int hf_a615a_protocol_version; +static int hf_a615a_counter; +static int hf_a615a_operation_status; +static int hf_a615a_exception_timer; +static int hf_a615a_estimated_time; +static int hf_a615a_status_description; +static int hf_a615a_load_ratio; +static int hf_a615a_file_count; +static int hf_a615a_file_name; +static int hf_a615a_file_description; +static int hf_a615a_part_number; +static int hf_a615a_number_target_hardware; +static int hf_a615a_literal_name; +static int hf_a615a_serial_number; +static int hf_a615a_part_number_count; +static int hf_a615a_amendment; +static int hf_a615a_designation; +static int hf_a615a_user_data; +static int hf_a615a_file_type; #define FIND_PORT 1001 -static int proto_find = -1; +static int proto_find; -static gint ett_find = -1; +static int ett_find; -static int hf_find_opcode = -1; -static int hf_find_target_hardware_identifier = -1; -static int hf_find_target_type_name = -1; -static int hf_find_target_position = -1; -static int hf_find_literal_name = -1; -static int hf_find_manufacturer_code = -1; -static int hf_find_packet_terminator = -1; +static int hf_find_opcode; +static int hf_find_target_hardware_identifier; +static int hf_find_target_type_name; +static int hf_find_target_position; +static int hf_find_literal_name; +static int hf_find_manufacturer_code; +static int hf_find_packet_terminator; static dissector_handle_t find_handle; @@ -105,7 +105,7 @@ static const value_string find_opcode_vals[] = { static void dissect_a615a_LCL(ptvcursor_t *ptvc, packet_info *pinfo _U_) { - guint32 th_count, pn_count; + uint32_t th_count, pn_count; proto_item *pi; ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA); @@ -130,9 +130,9 @@ static void dissect_a615a_LCL(ptvcursor_t *ptvc, packet_info *pinfo _U_) static void dissect_a615a_LUS(ptvcursor_t *ptvc, packet_info *pinfo) { - guint32 status, file_count; - const guint8 *ratio; - const guint8 *protocol_version = NULL; + uint32_t status, file_count; + const uint8_t *ratio; + const uint8_t *protocol_version = NULL; proto_item *pi; ptvcursor_add_ret_string(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA, @@ -169,7 +169,7 @@ static void dissect_a615a_LUS(ptvcursor_t *ptvc, packet_info *pinfo) static void dissect_a615a_LCS(ptvcursor_t *ptvc, packet_info *pinfo) { - guint32 status; + uint32_t status; ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA); ptvcursor_add(ptvc, hf_a615a_counter, 2, ENC_BIG_ENDIAN); @@ -183,7 +183,7 @@ static void dissect_a615a_LCS(ptvcursor_t *ptvc, packet_info *pinfo) static void dissect_a615a_LUI_LCI_LND_LNO(ptvcursor_t *ptvc, packet_info *pinfo) { - guint32 status; + uint32_t status; ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA); ptvcursor_add_ret_uint(ptvc, hf_a615a_operation_status, 2, ENC_BIG_ENDIAN, &status); @@ -194,7 +194,7 @@ static void dissect_a615a_LUI_LCI_LND_LNO(ptvcursor_t *ptvc, packet_info *pinfo) static void dissect_a615a_LUR(ptvcursor_t *ptvc, packet_info *pinfo _U_) { - guint32 file_count; + uint32_t file_count; proto_item *pi; ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA); @@ -209,7 +209,7 @@ static void dissect_a615a_LUR(ptvcursor_t *ptvc, packet_info *pinfo _U_) static void dissect_a615a_LNL(ptvcursor_t *ptvc, packet_info *pinfo _U_) { - guint32 file_count; + uint32_t file_count; proto_item *pi; ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA); @@ -224,7 +224,7 @@ static void dissect_a615a_LNL(ptvcursor_t *ptvc, packet_info *pinfo _U_) static void dissect_a615a_LNR(ptvcursor_t *ptvc, packet_info *pinfo _U_) { - guint32 file_count; + uint32_t file_count; ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA); ptvcursor_add_ret_uint(ptvc, hf_a615a_file_count, 2, ENC_BIG_ENDIAN, &file_count); @@ -236,9 +236,9 @@ static void dissect_a615a_LNR(ptvcursor_t *ptvc, packet_info *pinfo _U_) static void dissect_a615a_LNS(ptvcursor_t *ptvc, packet_info *pinfo) { - guint32 status, file_count; + uint32_t status, file_count; proto_item *pi; - const guint8 *protocol_version = NULL; + const uint8_t *protocol_version = NULL; ptvcursor_add_ret_string(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA, pinfo->pool, &protocol_version); @@ -268,7 +268,7 @@ static void dissect_a615a_LNS(ptvcursor_t *ptvc, packet_info *pinfo) static void dissect_a615a_LNA(ptvcursor_t *ptvc, packet_info *pinfo _U_) { - guint32 file_count; + uint32_t file_count; ptvcursor_add(ptvc, hf_a615a_protocol_version, 2, ENC_ASCII | ENC_NA); ptvcursor_add_ret_uint(ptvc, hf_a615a_file_count, 2, ENC_BIG_ENDIAN, &file_count); @@ -337,15 +337,15 @@ static void dissect_a615a_protocol_file(tvbuff_t *tvb, packet_info *pinfo, proto ptvcursor_free(ptvc); } -static gboolean dissect_a615a_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) +static bool dissect_a615a_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { - guint psize = tvb_captured_length(tvb); - if (psize < 6) return FALSE; - if ((tvb_get_ntohl(tvb, 0) != psize) || ((gchar)tvb_get_guint8(tvb, 4) != 'A')) return FALSE; + unsigned psize = tvb_captured_length(tvb); + if (psize < 6) return false; + if ((tvb_get_ntohl(tvb, 0) != psize) || ((char)tvb_get_uint8(tvb, 4) != 'A')) return false; const char *filename = ((struct tftpinfo *)data)->filename; if (filename == NULL) { - return FALSE; + return false; } for (unsigned i = 0; i < array_length(a615a_file); ++i) { @@ -353,10 +353,10 @@ static gboolean dissect_a615a_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree col_set_str(pinfo->cinfo, COL_PROTOCOL, "A615a"); col_add_str(pinfo->cinfo, COL_INFO, filename); dissect_a615a_protocol_file(tvb, pinfo, tree, i); - return TRUE; + return true; } } - return FALSE; + return false; } static int dissect_find(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) @@ -367,7 +367,7 @@ static int dissect_find(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi ptvcursor_t *ptvc = ptvcursor_new(pinfo->pool, find_tree, tvb, 0); - guint32 opcode; + uint32_t opcode; ptvcursor_add_ret_uint(ptvc, hf_find_opcode, 2, ENC_BIG_ENDIAN, &opcode); col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", val_to_str(opcode, find_opcode_vals, "Unknown (0x%04x)")); @@ -450,7 +450,7 @@ void proto_register_a615a(void) {"Type", "a615a.type", FT_STRINGZ, BASE_NONE, NULL, 0x0, "A615a File type", HFILL}}, }; - static gint *ett[] = {&ett_a615a}; + static int *ett[] = {&ett_a615a}; proto_a615a = proto_register_protocol("Arinc 615a Protocol", "A615a", "a615a"); proto_register_field_array(proto_a615a, hf, array_length(hf)); @@ -480,7 +480,7 @@ void proto_register_a615a(void) "FIND Packet terminator", HFILL}} }; - static gint *etts_find[] = {&ett_find}; + static int *etts_find[] = {&ett_find}; proto_find = proto_register_protocol("Find Identification of Network Devices", "FIND", "find"); proto_register_field_array(proto_find, hf_find, array_length(hf_find)); |