summaryrefslogtreecommitdiffstats
path: root/plugins/epan/gryphon/packet-gryphon.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/epan/gryphon/packet-gryphon.c')
-rw-r--r--plugins/epan/gryphon/packet-gryphon.c962
1 files changed, 481 insertions, 481 deletions
diff --git a/plugins/epan/gryphon/packet-gryphon.c b/plugins/epan/gryphon/packet-gryphon.c
index 08da00fd..f6d69a43 100644
--- a/plugins/epan/gryphon/packet-gryphon.c
+++ b/plugins/epan/gryphon/packet-gryphon.c
@@ -42,347 +42,347 @@ static dissector_handle_t gryphon_handle;
#define GRYPHON_TCP_PORT 7000 /* Not IANA registed */
-static int proto_gryphon = -1;
-
-static int hf_gryphon_src = -1;
-static int hf_gryphon_srcchan = -1;
-static int hf_gryphon_srcchanclient = -1;
-static int hf_gryphon_dest = -1;
-static int hf_gryphon_destchan = -1;
-static int hf_gryphon_destchanclient = -1;
-static int hf_gryphon_type = -1;
-static int hf_gryphon_cmd = -1;
-static int hf_gryphon_cmd_context = -1;
-static int hf_gryphon_cmd_ioctl_context = -1;
-static int hf_gryphon_data = -1;
-static int hf_gryphon_data_length = -1;
-static int hf_gryphon_reserved = -1;
-static int hf_gryphon_padding = -1;
-static int hf_gryphon_ignored = -1;
-static int hf_gryphon_wait_flags = -1;
-static int hf_gryphon_wait_resp = -1;
-static int hf_gryphon_wait_prev_resp = -1;
-static int hf_gryphon_status = -1;
-static int hf_gryphon_response_in = -1;
-static int hf_gryphon_response_to = -1;
-static int hf_gryphon_response_time = -1;
-static int hf_gryphon_data_header_length = -1;
-static int hf_gryphon_data_header_length_bits = -1;
-static int hf_gryphon_data_data_length = -1;
-static int hf_gryphon_data_extra_data_length = -1;
-static int hf_gryphon_data_mode = -1;
-static int hf_gryphon_data_mode_transmitted = -1;
-static int hf_gryphon_data_mode_receive = -1;
-static int hf_gryphon_data_mode_local = -1;
-static int hf_gryphon_data_mode_remote = -1;
-static int hf_gryphon_data_mode_oneshot = -1;
-static int hf_gryphon_data_mode_combined = -1;
-static int hf_gryphon_data_mode_nomux = -1;
-static int hf_gryphon_data_mode_internal = -1;
-static int hf_gryphon_data_priority = -1;
-static int hf_gryphon_data_error_status = -1;
-static int hf_gryphon_data_time = -1;
-static int hf_gryphon_data_context = -1;
-static int hf_gryphon_data_header_data = -1;
-static int hf_gryphon_data_data = -1;
-static int hf_gryphon_data_extra_data = -1;
-static int hf_gryphon_data_padding = -1;
-static int hf_gryphon_event_id = -1;
-static int hf_gryphon_event_context = -1;
-static int hf_gryphon_event_time = -1;
-static int hf_gryphon_event_data = -1;
-static int hf_gryphon_event_padding = -1;
-static int hf_gryphon_misc_text = -1;
-static int hf_gryphon_misc_padding = -1;
-static int hf_gryphon_eventnum = -1;
-static int hf_gryphon_resp_time = -1;
-static int hf_gryphon_setfilt = -1;
-static int hf_gryphon_setfilt_length = -1;
-static int hf_gryphon_setfilt_discard_data = -1;
-static int hf_gryphon_setfilt_padding = -1;
-static int hf_gryphon_ioctl = -1;
-static int hf_gryphon_ioctl_nbytes = -1;
-static int hf_gryphon_ioctl_data = -1;
-static int hf_gryphon_addfilt_pass = -1;
-static int hf_gryphon_addfilt_active = -1;
-static int hf_gryphon_addfilt_blocks = -1;
-static int hf_gryphon_addfilt_handle = -1;
-static int hf_gryphon_modfilt = -1;
-static int hf_gryphon_modfilt_action = -1;
-static int hf_gryphon_filthan = -1;
-static int hf_gryphon_filthan_id = -1;
-static int hf_gryphon_filthan_padding = -1;
-static int hf_gryphon_dfiltmode = -1;
-static int hf_gryphon_filtmode = -1;
-static int hf_gryphon_event_name = -1;
-static int hf_gryphon_register_username = -1;
-static int hf_gryphon_register_password = -1;
-static int hf_gryphon_register_client_id = -1;
-static int hf_gryphon_register_privileges = -1;
-static int hf_gryphon_getspeeds_set_ioctl = -1;
-static int hf_gryphon_getspeeds_get_ioctl = -1;
-static int hf_gryphon_getspeeds_size = -1;
-static int hf_gryphon_getspeeds_preset = -1;
-static int hf_gryphon_getspeeds_data = -1;
-static int hf_gryphon_cmd_sort = -1;
-static int hf_gryphon_cmd_optimize = -1;
-static int hf_gryphon_config_device_name = -1;
-static int hf_gryphon_config_device_version = -1;
-static int hf_gryphon_config_device_serial_number = -1;
-static int hf_gryphon_config_num_channels = -1;
-static int hf_gryphon_config_name_version_ext = -1;
-static int hf_gryphon_config_driver_name = -1;
-static int hf_gryphon_config_driver_version = -1;
-static int hf_gryphon_config_device_security = -1;
-static int hf_gryphon_config_max_data_length = -1;
-static int hf_gryphon_config_min_data_length = -1;
-static int hf_gryphon_config_hardware_serial_number = -1;
-static int hf_gryphon_config_protocol_type = -1;
-static int hf_gryphon_config_channel_id = -1;
-static int hf_gryphon_config_card_slot_number = -1;
-static int hf_gryphon_config_max_extra_data = -1;
-static int hf_gryphon_config_min_extra_data = -1;
-static int hf_gryphon_sched_num_iterations = -1;
-static int hf_gryphon_sched_flags = -1;
-static int hf_gryphon_sched_flags_scheduler = -1;
-static int hf_gryphon_sched_sleep = -1;
-static int hf_gryphon_sched_transmit_count = -1;
-static int hf_gryphon_sched_transmit_period = -1;
-static int hf_gryphon_sched_transmit_flags = -1;
-static int hf_gryphon_sched_skip_transmit_period = -1;
-static int hf_gryphon_sched_skip_sleep = -1;
-static int hf_gryphon_sched_channel = -1;
-static int hf_gryphon_sched_channel0 = -1;
-static int hf_gryphon_sched_rep_id = -1;
-static int hf_gryphon_sched_rep_message_index = -1;
-static int hf_gryphon_blm_data_time = -1;
-static int hf_gryphon_blm_data_bus_load = -1;
-static int hf_gryphon_blm_data_current_bus_load = -1;
-static int hf_gryphon_blm_data_peak_bus_load = -1;
-static int hf_gryphon_blm_data_historic_peak_bus_load = -1;
-static int hf_gryphon_blm_stat_receive_frame_count = -1;
-static int hf_gryphon_blm_stat_transmit_frame_count = -1;
-static int hf_gryphon_blm_stat_receive_dropped_frame_count = -1;
-static int hf_gryphon_blm_stat_transmit_dropped_frame_count = -1;
-static int hf_gryphon_blm_stat_receive_error_count = -1;
-static int hf_gryphon_blm_stat_transmit_error_count = -1;
-static int hf_gryphon_addresp_flags = -1;
-static int hf_gryphon_addresp_flags_active = -1;
-static int hf_gryphon_addresp_blocks = -1;
-static int hf_gryphon_addresp_responses = -1;
-static int hf_gryphon_addresp_old_handle = -1;
-static int hf_gryphon_addresp_action = -1;
-static int hf_gryphon_addresp_action_period = -1;
-static int hf_gryphon_addresp_action_deact_on_event = -1;
-static int hf_gryphon_addresp_action_deact_after_period = -1;
-static int hf_gryphon_addresp_action_period_type = -1;
-static int hf_gryphon_addresp_handle = -1;
-static int hf_gryphon_ldf_list = -1;
-static int hf_gryphon_ldf_number = -1;
-static int hf_gryphon_ldf_nodenumber = -1;
-static int hf_gryphon_ldf_remaining = -1;
-static int hf_gryphon_ldf_name = -1;
-static int hf_gryphon_ldf_info_pv = -1;
-static int hf_gryphon_ldf_info_lv = -1;
-static int hf_gryphon_ldf_ui = -1;
-static int hf_gryphon_lin_nodename = -1;
-static int hf_gryphon_lin_data_length = -1;
-static int hf_gryphon_lin_slave_table_enable = -1;
-static int hf_gryphon_lin_slave_table_cs = -1;
-static int hf_gryphon_lin_slave_table_data = -1;
-static int hf_gryphon_lin_slave_table_datacs = -1;
-static int hf_gryphon_lin_masterevent = -1;
-static int hf_gryphon_lin_numdata = -1;
-static int hf_gryphon_lin_numextra = -1;
-static int hf_gryphon_ldf_description = -1;
-static int hf_gryphon_ldf_size = -1;
-static int hf_gryphon_ldf_exists = -1;
-static int hf_gryphon_ldf_blockn = -1;
-static int hf_gryphon_ldf_file = -1;
-static int hf_gryphon_ldf_desc_pad = -1;
-static int hf_gryphon_ldf_restore_session = -1;
-static int hf_gryphon_ldf_schedule_name = -1;
-static int hf_gryphon_ldf_schedule_msg_dbytes = -1;
-static int hf_gryphon_ldf_schedule_flags = -1;
-static int hf_gryphon_ldf_schedule_event = -1;
-static int hf_gryphon_ldf_schedule_sporadic = -1;
-static int hf_gryphon_ldf_ioctl_setflags = -1;
-static int hf_gryphon_ldf_numb_ids = -1;
-static int hf_gryphon_ldf_bitrate = -1;
-static int hf_gryphon_ldf_ioctl_setflags_flags = -1;
-static int hf_gryphon_ldf_sched_size_place = -1;
-static int hf_gryphon_ldf_sched_numb_place = -1;
-static int hf_gryphon_ldf_sched_size = -1;
-static int hf_gryphon_ldf_num_node_names = -1;
-static int hf_gryphon_ldf_num_frames = -1;
-static int hf_gryphon_ldf_num_signal_names = -1;
-static int hf_gryphon_ldf_num_schedules = -1;
-static int hf_gryphon_ldf_num_encodings = -1;
-static int hf_gryphon_ldf_encoding_value = -1;
-static int hf_gryphon_ldf_encoding_min = -1;
-static int hf_gryphon_ldf_encoding_max = -1;
-static int hf_gryphon_ldf_master_node_name = -1;
-static int hf_gryphon_ldf_slave_node_name = -1;
-static int hf_gryphon_ldf_node_name = -1;
-static int hf_gryphon_ldf_signal_name = -1;
-static int hf_gryphon_ldf_signal_encoding_name = -1;
-static int hf_gryphon_ldf_signal_encoding_type = -1;
-static int hf_gryphon_ldf_signal_encoding_logical = -1;
-static int hf_gryphon_ldf_signal_offset = -1;
-static int hf_gryphon_ldf_signal_length = -1;
-static int hf_gryphon_ldf_get_frame = -1;
-static int hf_gryphon_ldf_get_frame_num = -1;
-static int hf_gryphon_ldf_get_frame_pub = -1;
-static int hf_gryphon_ldf_get_frame_num_signals = -1;
-static int hf_gryphon_cnvt_valuef = -1;
-static int hf_gryphon_cnvt_valuei = -1;
-static int hf_gryphon_cnvt_values = -1;
-static int hf_gryphon_cnvt_units = -1;
-static int hf_gryphon_cnvt_flags_getvalues = -1;
-static int hf_gryphon_dd_stream = -1;
-static int hf_gryphon_dd_value = -1;
-static int hf_gryphon_dd_time = -1;
-static int hf_gryphon_modresp_handle = -1;
-static int hf_gryphon_modresp_action = -1;
-static int hf_gryphon_num_resphan = -1;
-static int hf_gryphon_handle = -1;
-static int hf_gryphon_transmit_sched_id = -1;
-static int hf_gryphon_desc_program_size = -1;
-static int hf_gryphon_desc_program_name = -1;
-static int hf_gryphon_desc_program_description = -1;
-static int hf_gryphon_desc_flags = -1;
-static int hf_gryphon_desc_flags_program = -1;
-static int hf_gryphon_desc_handle = -1;
-static int hf_gryphon_upload_block_number = -1;
-static int hf_gryphon_upload_handle = -1;
-static int hf_gryphon_upload_data = -1;
-static int hf_gryphon_delete = -1;
-static int hf_gryphon_list_block_number = -1;
-static int hf_gryphon_list_num_programs = -1;
-static int hf_gryphon_list_num_remain_programs = -1;
-static int hf_gryphon_list_name = -1;
-static int hf_gryphon_list_description = -1;
-static int hf_gryphon_start_arguments = -1;
-static int hf_gryphon_start_channel = -1;
-static int hf_gryphon_status_num_running_copies = -1;
-static int hf_gryphon_options_handle = -1;
-static int hf_gryphon_files = -1;
-static int hf_gryphon_usdt_flags_register = -1;
-static int hf_gryphon_usdt_action_flags = -1;
-static int hf_gryphon_usdt_action_flags_non_legacy = -1;
-static int hf_gryphon_usdt_action_flags_register = -1;
-static int hf_gryphon_usdt_action_flags_action = -1;
-static int hf_gryphon_usdt_transmit_options_flags = -1;
-static int hf_gryphon_usdt_transmit_options_flags_echo = -1;
-static int hf_gryphon_usdt_transmit_options_done_event = -1;
-static int hf_gryphon_usdt_transmit_options_echo_short = -1;
-static int hf_gryphon_usdt_transmit_options_rx_nth_fc = -1;
-static int hf_gryphon_usdt_transmit_options_action = -1;
-static int hf_gryphon_usdt_transmit_options_send_done = -1;
-static int hf_gryphon_usdt_receive_options_flags = -1;
-static int hf_gryphon_usdt_receive_options_action = -1;
-static int hf_gryphon_usdt_receive_options_firstframe_event = -1;
-static int hf_gryphon_usdt_receive_options_lastframe_event = -1;
-static int hf_gryphon_usdt_receive_options_tx_nth_fc = -1;
-static int hf_gryphon_usdt_length_options_flags = -1;
-static int hf_gryphon_usdt_length_control_j1939 = -1;
-static int hf_gryphon_usdt_stmin_fc = -1;
-static int hf_gryphon_usdt_bsmax_fc = -1;
-static int hf_gryphon_usdt_stmin_override = -1;
-static int hf_gryphon_usdt_stmin_override_active = -1;
-static int hf_gryphon_usdt_stmin_override_activate = -1;
-static int hf_gryphon_usdt_set_stmin_mul = -1;
-static int hf_gryphon_usdt_receive_options_firstframe = -1;
-static int hf_gryphon_usdt_receive_options_lastframe = -1;
-static int hf_gryphon_usdt_ext_address = -1;
-static int hf_gryphon_usdt_ext_address_id = -1;
-static int hf_gryphon_usdt_block_size = -1;
-static int hf_gryphon_bits_in_input1 = -1;
-static int hf_gryphon_bits_in_input2 = -1;
-static int hf_gryphon_bits_in_input3 = -1;
-static int hf_gryphon_bits_in_pushbutton = -1;
-static int hf_gryphon_bits_out_output1 = -1;
-static int hf_gryphon_bits_out_output2 = -1;
-static int hf_gryphon_init_strat_reset_limit = -1;
-static int hf_gryphon_init_strat_delay = -1;
-static int hf_gryphon_speed_baud_rate_index = -1;
-static int hf_gryphon_filter_block_filter_start = -1;
-static int hf_gryphon_filter_block_filter_length = -1;
-static int hf_gryphon_filter_block_filter_type = -1;
-static int hf_gryphon_filter_block_filter_operator = -1;
-static int hf_gryphon_filter_block_filter_value1 = -1;
-static int hf_gryphon_filter_block_filter_value2 = -1;
-static int hf_gryphon_filter_block_filter_value4 = -1;
-static int hf_gryphon_filter_block_filter_value_bytes = -1;
-static int hf_gryphon_blm_mode = -1;
-static int hf_gryphon_blm_mode_avg_period = -1;
-static int hf_gryphon_blm_mode_avg_frames = -1;
-static int hf_gryphon_command = -1;
-static int hf_gryphon_cmd_mode = -1;
-static int hf_gryphon_option = -1;
-static int hf_gryphon_option_data = -1;
-static int hf_gryphon_cmd_file = -1;
-static int hf_gryphon_bit_in_digital_data = -1;
-static int hf_gryphon_bit_out_digital_data = -1;
-static int hf_gryphon_filter_block_pattern = -1;
-static int hf_gryphon_filter_block_mask = -1;
-static int hf_gryphon_usdt_request = -1;
-static int hf_gryphon_usdt_request_ext = -1;
-static int hf_gryphon_usdt_nids = -1;
-static int hf_gryphon_usdt_response = -1;
-static int hf_gryphon_usdt_response_ext = -1;
-static int hf_gryphon_uudt_response = -1;
-static int hf_gryphon_uudt_response_ext = -1;
-static int hf_gryphon_more_filenames = -1;
-static int hf_gryphon_filenames = -1;
-static int hf_gryphon_program_channel_number = -1;
-static int hf_gryphon_valid_header_length = -1;
-
-static gint ett_gryphon = -1;
-static gint ett_gryphon_header = -1;
-static gint ett_gryphon_body = -1;
-static gint ett_gryphon_command_data = -1;
-static gint ett_gryphon_response_data = -1;
-static gint ett_gryphon_data_header = -1;
-static gint ett_gryphon_flags = -1;
-static gint ett_gryphon_data_body = -1;
-static gint ett_gryphon_cmd_filter_block = -1;
-static gint ett_gryphon_cmd_events_data = -1;
-static gint ett_gryphon_cmd_config_device = -1;
-static gint ett_gryphon_cmd_sched_data = -1;
-static gint ett_gryphon_cmd_sched_cmd = -1;
-static gint ett_gryphon_cmd_response_block = -1;
-static gint ett_gryphon_pgm_list = -1;
-static gint ett_gryphon_pgm_status = -1;
-static gint ett_gryphon_pgm_options = -1;
-static gint ett_gryphon_valid_headers = -1;
-static gint ett_gryphon_usdt_data = -1;
-static gint ett_gryphon_usdt_action_flags = -1;
-static gint ett_gryphon_usdt_tx_options_flags = -1;
-static gint ett_gryphon_usdt_rx_options_flags = -1;
-static gint ett_gryphon_usdt_len_options_flags = -1;
-static gint ett_gryphon_usdt_data_block = -1;
-static gint ett_gryphon_lin_emulate_node = -1;
-static gint ett_gryphon_ldf_block = -1;
-static gint ett_gryphon_ldf_schedule_name = -1;
-static gint ett_gryphon_lin_schedule_msg = -1;
-static gint ett_gryphon_cnvt_getflags = -1;
-static gint ett_gryphon_digital_data = -1;
-static gint ett_gryphon_blm_mode = -1;
-
-static expert_field ei_gryphon_type = EI_INIT;
+static int proto_gryphon;
+
+static int hf_gryphon_src;
+static int hf_gryphon_srcchan;
+static int hf_gryphon_srcchanclient;
+static int hf_gryphon_dest;
+static int hf_gryphon_destchan;
+static int hf_gryphon_destchanclient;
+static int hf_gryphon_type;
+static int hf_gryphon_cmd;
+static int hf_gryphon_cmd_context;
+static int hf_gryphon_cmd_ioctl_context;
+static int hf_gryphon_data;
+static int hf_gryphon_data_length;
+static int hf_gryphon_reserved;
+static int hf_gryphon_padding;
+static int hf_gryphon_ignored;
+static int hf_gryphon_wait_flags;
+static int hf_gryphon_wait_resp;
+static int hf_gryphon_wait_prev_resp;
+static int hf_gryphon_status;
+static int hf_gryphon_response_in;
+static int hf_gryphon_response_to;
+static int hf_gryphon_response_time;
+static int hf_gryphon_data_header_length;
+static int hf_gryphon_data_header_length_bits;
+static int hf_gryphon_data_data_length;
+static int hf_gryphon_data_extra_data_length;
+static int hf_gryphon_data_mode;
+static int hf_gryphon_data_mode_transmitted;
+static int hf_gryphon_data_mode_receive;
+static int hf_gryphon_data_mode_local;
+static int hf_gryphon_data_mode_remote;
+static int hf_gryphon_data_mode_oneshot;
+static int hf_gryphon_data_mode_combined;
+static int hf_gryphon_data_mode_nomux;
+static int hf_gryphon_data_mode_internal;
+static int hf_gryphon_data_priority;
+static int hf_gryphon_data_error_status;
+static int hf_gryphon_data_time;
+static int hf_gryphon_data_context;
+static int hf_gryphon_data_header_data;
+static int hf_gryphon_data_data;
+static int hf_gryphon_data_extra_data;
+static int hf_gryphon_data_padding;
+static int hf_gryphon_event_id;
+static int hf_gryphon_event_context;
+static int hf_gryphon_event_time;
+static int hf_gryphon_event_data;
+static int hf_gryphon_event_padding;
+static int hf_gryphon_misc_text;
+static int hf_gryphon_misc_padding;
+static int hf_gryphon_eventnum;
+static int hf_gryphon_resp_time;
+static int hf_gryphon_setfilt;
+static int hf_gryphon_setfilt_length;
+static int hf_gryphon_setfilt_discard_data;
+static int hf_gryphon_setfilt_padding;
+static int hf_gryphon_ioctl;
+static int hf_gryphon_ioctl_nbytes;
+static int hf_gryphon_ioctl_data;
+static int hf_gryphon_addfilt_pass;
+static int hf_gryphon_addfilt_active;
+static int hf_gryphon_addfilt_blocks;
+static int hf_gryphon_addfilt_handle;
+static int hf_gryphon_modfilt;
+static int hf_gryphon_modfilt_action;
+static int hf_gryphon_filthan;
+static int hf_gryphon_filthan_id;
+static int hf_gryphon_filthan_padding;
+static int hf_gryphon_dfiltmode;
+static int hf_gryphon_filtmode;
+static int hf_gryphon_event_name;
+static int hf_gryphon_register_username;
+static int hf_gryphon_register_password;
+static int hf_gryphon_register_client_id;
+static int hf_gryphon_register_privileges;
+static int hf_gryphon_getspeeds_set_ioctl;
+static int hf_gryphon_getspeeds_get_ioctl;
+static int hf_gryphon_getspeeds_size;
+static int hf_gryphon_getspeeds_preset;
+static int hf_gryphon_getspeeds_data;
+static int hf_gryphon_cmd_sort;
+static int hf_gryphon_cmd_optimize;
+static int hf_gryphon_config_device_name;
+static int hf_gryphon_config_device_version;
+static int hf_gryphon_config_device_serial_number;
+static int hf_gryphon_config_num_channels;
+static int hf_gryphon_config_name_version_ext;
+static int hf_gryphon_config_driver_name;
+static int hf_gryphon_config_driver_version;
+static int hf_gryphon_config_device_security;
+static int hf_gryphon_config_max_data_length;
+static int hf_gryphon_config_min_data_length;
+static int hf_gryphon_config_hardware_serial_number;
+static int hf_gryphon_config_protocol_type;
+static int hf_gryphon_config_channel_id;
+static int hf_gryphon_config_card_slot_number;
+static int hf_gryphon_config_max_extra_data;
+static int hf_gryphon_config_min_extra_data;
+static int hf_gryphon_sched_num_iterations;
+static int hf_gryphon_sched_flags;
+static int hf_gryphon_sched_flags_scheduler;
+static int hf_gryphon_sched_sleep;
+static int hf_gryphon_sched_transmit_count;
+static int hf_gryphon_sched_transmit_period;
+static int hf_gryphon_sched_transmit_flags;
+static int hf_gryphon_sched_skip_transmit_period;
+static int hf_gryphon_sched_skip_sleep;
+static int hf_gryphon_sched_channel;
+static int hf_gryphon_sched_channel0;
+static int hf_gryphon_sched_rep_id;
+static int hf_gryphon_sched_rep_message_index;
+static int hf_gryphon_blm_data_time;
+static int hf_gryphon_blm_data_bus_load;
+static int hf_gryphon_blm_data_current_bus_load;
+static int hf_gryphon_blm_data_peak_bus_load;
+static int hf_gryphon_blm_data_historic_peak_bus_load;
+static int hf_gryphon_blm_stat_receive_frame_count;
+static int hf_gryphon_blm_stat_transmit_frame_count;
+static int hf_gryphon_blm_stat_receive_dropped_frame_count;
+static int hf_gryphon_blm_stat_transmit_dropped_frame_count;
+static int hf_gryphon_blm_stat_receive_error_count;
+static int hf_gryphon_blm_stat_transmit_error_count;
+static int hf_gryphon_addresp_flags;
+static int hf_gryphon_addresp_flags_active;
+static int hf_gryphon_addresp_blocks;
+static int hf_gryphon_addresp_responses;
+static int hf_gryphon_addresp_old_handle;
+static int hf_gryphon_addresp_action;
+static int hf_gryphon_addresp_action_period;
+static int hf_gryphon_addresp_action_deact_on_event;
+static int hf_gryphon_addresp_action_deact_after_period;
+static int hf_gryphon_addresp_action_period_type;
+static int hf_gryphon_addresp_handle;
+static int hf_gryphon_ldf_list;
+static int hf_gryphon_ldf_number;
+static int hf_gryphon_ldf_nodenumber;
+static int hf_gryphon_ldf_remaining;
+static int hf_gryphon_ldf_name;
+static int hf_gryphon_ldf_info_pv;
+static int hf_gryphon_ldf_info_lv;
+static int hf_gryphon_ldf_ui;
+static int hf_gryphon_lin_nodename;
+static int hf_gryphon_lin_data_length;
+static int hf_gryphon_lin_slave_table_enable;
+static int hf_gryphon_lin_slave_table_cs;
+static int hf_gryphon_lin_slave_table_data;
+static int hf_gryphon_lin_slave_table_datacs;
+static int hf_gryphon_lin_masterevent;
+static int hf_gryphon_lin_numdata;
+static int hf_gryphon_lin_numextra;
+static int hf_gryphon_ldf_description;
+static int hf_gryphon_ldf_size;
+static int hf_gryphon_ldf_exists;
+static int hf_gryphon_ldf_blockn;
+static int hf_gryphon_ldf_file;
+static int hf_gryphon_ldf_desc_pad;
+static int hf_gryphon_ldf_restore_session;
+static int hf_gryphon_ldf_schedule_name;
+static int hf_gryphon_ldf_schedule_msg_dbytes;
+static int hf_gryphon_ldf_schedule_flags;
+static int hf_gryphon_ldf_schedule_event;
+static int hf_gryphon_ldf_schedule_sporadic;
+static int hf_gryphon_ldf_ioctl_setflags;
+static int hf_gryphon_ldf_numb_ids;
+static int hf_gryphon_ldf_bitrate;
+static int hf_gryphon_ldf_ioctl_setflags_flags;
+static int hf_gryphon_ldf_sched_size_place;
+static int hf_gryphon_ldf_sched_numb_place;
+static int hf_gryphon_ldf_sched_size;
+static int hf_gryphon_ldf_num_node_names;
+static int hf_gryphon_ldf_num_frames;
+static int hf_gryphon_ldf_num_signal_names;
+static int hf_gryphon_ldf_num_schedules;
+static int hf_gryphon_ldf_num_encodings;
+static int hf_gryphon_ldf_encoding_value;
+static int hf_gryphon_ldf_encoding_min;
+static int hf_gryphon_ldf_encoding_max;
+static int hf_gryphon_ldf_master_node_name;
+static int hf_gryphon_ldf_slave_node_name;
+static int hf_gryphon_ldf_node_name;
+static int hf_gryphon_ldf_signal_name;
+static int hf_gryphon_ldf_signal_encoding_name;
+static int hf_gryphon_ldf_signal_encoding_type;
+static int hf_gryphon_ldf_signal_encoding_logical;
+static int hf_gryphon_ldf_signal_offset;
+static int hf_gryphon_ldf_signal_length;
+static int hf_gryphon_ldf_get_frame;
+static int hf_gryphon_ldf_get_frame_num;
+static int hf_gryphon_ldf_get_frame_pub;
+static int hf_gryphon_ldf_get_frame_num_signals;
+static int hf_gryphon_cnvt_valuef;
+static int hf_gryphon_cnvt_valuei;
+static int hf_gryphon_cnvt_values;
+static int hf_gryphon_cnvt_units;
+static int hf_gryphon_cnvt_flags_getvalues;
+static int hf_gryphon_dd_stream;
+static int hf_gryphon_dd_value;
+static int hf_gryphon_dd_time;
+static int hf_gryphon_modresp_handle;
+static int hf_gryphon_modresp_action;
+static int hf_gryphon_num_resphan;
+static int hf_gryphon_handle;
+static int hf_gryphon_transmit_sched_id;
+static int hf_gryphon_desc_program_size;
+static int hf_gryphon_desc_program_name;
+static int hf_gryphon_desc_program_description;
+static int hf_gryphon_desc_flags;
+static int hf_gryphon_desc_flags_program;
+static int hf_gryphon_desc_handle;
+static int hf_gryphon_upload_block_number;
+static int hf_gryphon_upload_handle;
+static int hf_gryphon_upload_data;
+static int hf_gryphon_delete;
+static int hf_gryphon_list_block_number;
+static int hf_gryphon_list_num_programs;
+static int hf_gryphon_list_num_remain_programs;
+static int hf_gryphon_list_name;
+static int hf_gryphon_list_description;
+static int hf_gryphon_start_arguments;
+static int hf_gryphon_start_channel;
+static int hf_gryphon_status_num_running_copies;
+static int hf_gryphon_options_handle;
+static int hf_gryphon_files;
+static int hf_gryphon_usdt_flags_register;
+static int hf_gryphon_usdt_action_flags;
+static int hf_gryphon_usdt_action_flags_non_legacy;
+static int hf_gryphon_usdt_action_flags_register;
+static int hf_gryphon_usdt_action_flags_action;
+static int hf_gryphon_usdt_transmit_options_flags;
+static int hf_gryphon_usdt_transmit_options_flags_echo;
+static int hf_gryphon_usdt_transmit_options_done_event;
+static int hf_gryphon_usdt_transmit_options_echo_short;
+static int hf_gryphon_usdt_transmit_options_rx_nth_fc;
+static int hf_gryphon_usdt_transmit_options_action;
+static int hf_gryphon_usdt_transmit_options_send_done;
+static int hf_gryphon_usdt_receive_options_flags;
+static int hf_gryphon_usdt_receive_options_action;
+static int hf_gryphon_usdt_receive_options_firstframe_event;
+static int hf_gryphon_usdt_receive_options_lastframe_event;
+static int hf_gryphon_usdt_receive_options_tx_nth_fc;
+static int hf_gryphon_usdt_length_options_flags;
+static int hf_gryphon_usdt_length_control_j1939;
+static int hf_gryphon_usdt_stmin_fc;
+static int hf_gryphon_usdt_bsmax_fc;
+static int hf_gryphon_usdt_stmin_override;
+static int hf_gryphon_usdt_stmin_override_active;
+static int hf_gryphon_usdt_stmin_override_activate;
+static int hf_gryphon_usdt_set_stmin_mul;
+static int hf_gryphon_usdt_receive_options_firstframe;
+static int hf_gryphon_usdt_receive_options_lastframe;
+static int hf_gryphon_usdt_ext_address;
+static int hf_gryphon_usdt_ext_address_id;
+static int hf_gryphon_usdt_block_size;
+static int hf_gryphon_bits_in_input1;
+static int hf_gryphon_bits_in_input2;
+static int hf_gryphon_bits_in_input3;
+static int hf_gryphon_bits_in_pushbutton;
+static int hf_gryphon_bits_out_output1;
+static int hf_gryphon_bits_out_output2;
+static int hf_gryphon_init_strat_reset_limit;
+static int hf_gryphon_init_strat_delay;
+static int hf_gryphon_speed_baud_rate_index;
+static int hf_gryphon_filter_block_filter_start;
+static int hf_gryphon_filter_block_filter_length;
+static int hf_gryphon_filter_block_filter_type;
+static int hf_gryphon_filter_block_filter_operator;
+static int hf_gryphon_filter_block_filter_value1;
+static int hf_gryphon_filter_block_filter_value2;
+static int hf_gryphon_filter_block_filter_value4;
+static int hf_gryphon_filter_block_filter_value_bytes;
+static int hf_gryphon_blm_mode;
+static int hf_gryphon_blm_mode_avg_period;
+static int hf_gryphon_blm_mode_avg_frames;
+static int hf_gryphon_command;
+static int hf_gryphon_cmd_mode;
+static int hf_gryphon_option;
+static int hf_gryphon_option_data;
+static int hf_gryphon_cmd_file;
+static int hf_gryphon_bit_in_digital_data;
+static int hf_gryphon_bit_out_digital_data;
+static int hf_gryphon_filter_block_pattern;
+static int hf_gryphon_filter_block_mask;
+static int hf_gryphon_usdt_request;
+static int hf_gryphon_usdt_request_ext;
+static int hf_gryphon_usdt_nids;
+static int hf_gryphon_usdt_response;
+static int hf_gryphon_usdt_response_ext;
+static int hf_gryphon_uudt_response;
+static int hf_gryphon_uudt_response_ext;
+static int hf_gryphon_more_filenames;
+static int hf_gryphon_filenames;
+static int hf_gryphon_program_channel_number;
+static int hf_gryphon_valid_header_length;
+
+static int ett_gryphon;
+static int ett_gryphon_header;
+static int ett_gryphon_body;
+static int ett_gryphon_command_data;
+static int ett_gryphon_response_data;
+static int ett_gryphon_data_header;
+static int ett_gryphon_flags;
+static int ett_gryphon_data_body;
+static int ett_gryphon_cmd_filter_block;
+static int ett_gryphon_cmd_events_data;
+static int ett_gryphon_cmd_config_device;
+static int ett_gryphon_cmd_sched_data;
+static int ett_gryphon_cmd_sched_cmd;
+static int ett_gryphon_cmd_response_block;
+static int ett_gryphon_pgm_list;
+static int ett_gryphon_pgm_status;
+static int ett_gryphon_pgm_options;
+static int ett_gryphon_valid_headers;
+static int ett_gryphon_usdt_data;
+static int ett_gryphon_usdt_action_flags;
+static int ett_gryphon_usdt_tx_options_flags;
+static int ett_gryphon_usdt_rx_options_flags;
+static int ett_gryphon_usdt_len_options_flags;
+static int ett_gryphon_usdt_data_block;
+static int ett_gryphon_lin_emulate_node;
+static int ett_gryphon_ldf_block;
+static int ett_gryphon_ldf_schedule_name;
+static int ett_gryphon_lin_schedule_msg;
+static int ett_gryphon_cnvt_getflags;
+static int ett_gryphon_digital_data;
+static int ett_gryphon_blm_mode;
+
+static expert_field ei_gryphon_type;
/* desegmentation of Gryphon */
-static gboolean gryphon_desegment = TRUE;
+static bool gryphon_desegment = true;
/*
* Length of the frame header.
*/
#define GRYPHON_FRAME_HEADER_LEN 8
-static int dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_msgresp_add);
-static int cmd_ioctl(tvbuff_t*, packet_info*, int, proto_tree*, guint32 ui_command);
-static int cmd_ioctl_resp(tvbuff_t*, packet_info*, int, proto_tree*, guint32 ui_command);
+static int dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bool is_msgresp_add);
+static int cmd_ioctl(tvbuff_t*, packet_info*, int, proto_tree*, uint32_t ui_command);
+static int cmd_ioctl_resp(tvbuff_t*, packet_info*, int, proto_tree*, uint32_t ui_command);
static const value_string action_vals[] = {
{ FR_RESP_AFTER_EVENT,
@@ -1007,7 +1007,7 @@ static const true_false_string set_not_set = { "Set", "Not set" };
* returns 1 if the ID is one of the special servers
* return 0 otherwise
*/
-static int is_special_client(guint32 id)
+static int is_special_client(uint32_t id)
{
if((id == SD_SERVER) || (id == SD_CLIENT)) {
return 1;
@@ -1035,10 +1035,10 @@ decode_data(tvbuff_t *tvb, int offset, proto_tree *pt)
NULL
};
- hdrsize = tvb_get_guint8(tvb, offset+0);
- /* hdrbits = tvb_get_guint8(tvb, offset+1); */
+ hdrsize = tvb_get_uint8(tvb, offset+0);
+ /* hdrbits = tvb_get_uint8(tvb, offset+1); */
datasize = tvb_get_ntohs(tvb, offset+2);
- extrasize = tvb_get_guint8(tvb, offset+4);
+ extrasize = tvb_get_uint8(tvb, offset+4);
padding = 3 - (hdrsize + datasize + extrasize + 3) % 4;
msgsize = hdrsize + datasize + extrasize + padding + 16;
@@ -1134,7 +1134,7 @@ decode_misc (tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
*/
next_tvb = tvb_new_subset_remaining(tvb, offset);
- offset += dissect_gryphon_message(next_tvb, pinfo, pt, TRUE);
+ offset += dissect_gryphon_message(next_tvb, pinfo, pt, true);
}
return offset;
}
@@ -1158,7 +1158,7 @@ decode_text (tvbuff_t *tvb, int offset, int msglen, proto_tree *pt)
static int
cmd_init(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 mode = tvb_get_guint8(tvb, offset);
+ uint8_t mode = tvb_get_uint8(tvb, offset);
if (mode == 0)
proto_tree_add_uint_format_value(pt, hf_gryphon_cmd_mode, tvb, offset, 1, mode, "Always initialize");
@@ -1171,7 +1171,7 @@ cmd_init(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
eventnum(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 event = tvb_get_guint8(tvb, offset);
+ uint8_t event = tvb_get_uint8(tvb, offset);
if (event)
proto_tree_add_item(pt, hf_gryphon_eventnum, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1184,7 +1184,7 @@ eventnum(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_time(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint64 val;
+ uint64_t val;
nstime_t timestamp;
val = tvb_get_ntoh64(tvb, offset);
@@ -1203,7 +1203,7 @@ cmd_setfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
int flag = tvb_get_ntohl(tvb, offset);
int length, padding;
- length = tvb_get_guint8(tvb, offset+4) + tvb_get_guint8(tvb, offset+5)
+ length = tvb_get_uint8(tvb, offset+4) + tvb_get_uint8(tvb, offset+5)
+ tvb_get_ntohs(tvb, offset+6);
proto_tree_add_uint_format_value(pt, hf_gryphon_setfilt, tvb, offset, 4,
@@ -1223,26 +1223,26 @@ cmd_setfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
}
static int
-cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32 ui_command, int msglen)
+cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, uint32_t ui_command, int msglen)
{
char *string;
int length;
- gint32 nbytes;
- gint32 block_nbytes;
- gint16 us_stream;
- gint16 us_value;
+ int32_t nbytes;
+ int32_t block_nbytes;
+ int16_t us_stream;
+ int16_t us_value;
proto_tree *tree;
unsigned int msg;
- guint8 number_ids;
- guint8 number_bytes;
- guint8 number_extra_bytes;
- guint8 flags;
- guint8 pid;
- guint8 datalen;
- guint8 extralen;
+ uint8_t number_ids;
+ uint8_t number_bytes;
+ uint8_t number_extra_bytes;
+ uint8_t flags;
+ uint8_t pid;
+ uint8_t datalen;
+ uint8_t extralen;
int i;
- guint32 mtime;
- guint16 us_nsched;
+ uint32_t mtime;
+ uint16_t us_nsched;
float value;
static int * const ldf_schedule_flags[] = {
&hf_gryphon_ldf_schedule_event,
@@ -1301,13 +1301,13 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
proto_tree_add_float_format_value(pt, hf_gryphon_init_strat_delay, tvb, offset, 4, value, "%.1f milliseconds", value);
offset += 4;
- number_ids = tvb_get_guint8(tvb, offset);
+ number_ids = tvb_get_uint8(tvb, offset);
/* header length, number of IDs to follow */
proto_tree_add_item(pt, hf_gryphon_data_header_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- number_bytes = tvb_get_guint8(tvb, offset);
+ number_bytes = tvb_get_uint8(tvb, offset);
number_bytes &= 0x0F; /* bit0 thru bit3 */
/* data length, number data bytes to follow */
@@ -1365,8 +1365,8 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
while(nbytes > 0) {
/* calc the number of bytes in this block */
- number_ids = tvb_get_guint8(tvb, offset+4);
- number_bytes = tvb_get_guint8(tvb, offset+5);
+ number_ids = tvb_get_uint8(tvb, offset+4);
+ number_bytes = tvb_get_uint8(tvb, offset+5);
number_bytes &= 0x0F; /* bit0 thru bit3 */
block_nbytes = 4 + 1 + 1 + number_ids + number_bytes;
@@ -1409,11 +1409,11 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
/* 20171113 */
proto_tree_add_item(pt, hf_gryphon_ldf_ioctl_setflags, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- number_ids = tvb_get_guint8(tvb, offset);
+ number_ids = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_numb_ids, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i = 0; i < number_ids; i++) {
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, flags, "0x%x %s",i,flags==0 ? "Classic checksum" : (flags==0x80?"Enhanced checksum":(flags==0x40?"Event":"UNKNOWN")));
offset += 1;
}
@@ -1439,11 +1439,11 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
case GLINGETSLAVETABLEPIDS:
{
/* 20180104 */
- number_ids = tvb_get_guint8(tvb, offset);
+ number_ids = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_numb_ids, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i = 0; i < number_ids; i++) {
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%x ",pid);
offset += 1;
}
@@ -1461,13 +1461,13 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
* byte 5-13: data[datalen]
* byte n: checksum
*/
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%02x ",pid);
offset += 1;
- datalen = tvb_get_guint8(tvb, offset);
+ datalen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_lin_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- extralen = tvb_get_guint8(tvb, offset);
+ extralen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_data_extra_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(pt, hf_gryphon_lin_slave_table_enable, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1495,13 +1495,13 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
* byte 4-12: data[datalen]
* byte n: checksum
*/
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%02x ",pid);
offset += 1;
- datalen = tvb_get_guint8(tvb, offset);
+ datalen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_lin_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- extralen = tvb_get_guint8(tvb, offset);
+ extralen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_data_extra_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(pt, hf_gryphon_lin_slave_table_enable, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1519,7 +1519,7 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
case GLINCLEARSLAVETABLE:
{
/* 20180104 done */
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%02x ",pid);
offset += 1;
}
@@ -1542,8 +1542,8 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
{
/* 20180104 */
/* 20180228 */
- number_bytes = tvb_get_guint8(tvb, offset+1);
- number_extra_bytes = tvb_get_guint8(tvb, offset+2);
+ number_bytes = tvb_get_uint8(tvb, offset+1);
+ number_extra_bytes = tvb_get_uint8(tvb, offset+2);
/* id */
proto_tree_add_item(pt, hf_gryphon_data_header_data, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -1622,10 +1622,10 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
* calls cmd_ioctl_details()
*/
static int
-cmd_ioctl(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32 ui_command)
+cmd_ioctl(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, uint32_t ui_command)
{
int msglen;
- /*guint32 ioctl;*/
+ /*uint32_t ioctl;*/
int padding;
msglen = tvb_reported_length_remaining(tvb, offset);
@@ -1660,7 +1660,7 @@ cmd_ioctl(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32
* the IOCTL response to the request.
*/
static int
-cmd_ioctl_resp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32 ui_command)
+cmd_ioctl_resp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, uint32_t ui_command)
{
int msglen = tvb_reported_length_remaining(tvb, offset);
@@ -1678,7 +1678,7 @@ cmd_ioctl_resp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, gu
static int
filter_block(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 op, length, padding;
+ uint32_t op, length, padding;
/* 20171017 fixed display of filter block padding */
@@ -1753,7 +1753,7 @@ cmd_addfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_item(tree, hf_gryphon_addfilt_active, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- blocks = tvb_get_guint8(tvb, offset);
+ blocks = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_addfilt_blocks, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(pt, hf_gryphon_reserved, tvb, offset+1, 6, ENC_NA);
offset += 7;
@@ -1780,7 +1780,7 @@ resp_addfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_modfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 filter_handle = tvb_get_guint8(tvb, offset);
+ uint8_t filter_handle = tvb_get_uint8(tvb, offset);
if (filter_handle)
proto_tree_add_item(pt, hf_gryphon_modfilt, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1797,12 +1797,12 @@ cmd_modfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_filthan(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- int handles = tvb_get_guint8(tvb, offset);
+ int handles = tvb_get_uint8(tvb, offset);
int i, padding, handle;
proto_tree_add_item(pt, hf_gryphon_filthan, tvb, offset, 1, ENC_BIG_ENDIAN);
for (i = 1; i <= handles; i++){
- handle = tvb_get_guint8(tvb, offset+i);
+ handle = tvb_get_uint8(tvb, offset+i);
proto_tree_add_uint_format_value(pt, hf_gryphon_filthan_id, tvb, offset+i, 1,
handle, "Handle %d: %u", i, handle);
}
@@ -1876,8 +1876,8 @@ static int
resp_getspeeds(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int indx,
- size = tvb_get_guint8(tvb, offset+8),
- number = tvb_get_guint8(tvb, offset+9);
+ size = tvb_get_uint8(tvb, offset+8),
+ number = tvb_get_uint8(tvb, offset+9);
proto_tree_add_item(pt, hf_gryphon_getspeeds_set_ioctl, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(pt, hf_gryphon_getspeeds_get_ioctl, tvb, offset+4, 4, ENC_BIG_ENDIAN);
@@ -1924,7 +1924,7 @@ resp_config(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_item(pt, hf_gryphon_config_device_serial_number, tvb, offset, 20, ENC_NA|ENC_ASCII);
offset += 20;
- devices = tvb_get_guint8(tvb, offset);
+ devices = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_config_num_channels, tvb, offset+1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(pt, hf_gryphon_config_name_version_ext, tvb, offset+1, 11, ENC_NA|ENC_ASCII);
@@ -1993,7 +1993,7 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree *tree, *tree1;
int save_offset;
unsigned int i, x, length;
- guint8 def_chan = tvb_get_guint8(tvb, offset-9);
+ uint8_t def_chan = tvb_get_uint8(tvb, offset-9);
msglen = tvb_reported_length_remaining(tvb, offset);
@@ -2015,7 +2015,7 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
i = 1;
while (msglen > 0) {
- length = 16 + tvb_get_guint8(tvb, offset+16) + tvb_get_ntohs(tvb, offset+18) + tvb_get_guint8(tvb, offset+20) + 16;
+ length = 16 + tvb_get_uint8(tvb, offset+16) + tvb_get_ntohs(tvb, offset+18) + tvb_get_uint8(tvb, offset+20) + 16;
length += 3 - (length + 3) % 4;
tree = proto_tree_add_subtree_format(pt, tvb, offset, length, ett_gryphon_cmd_sched_data, NULL, "Message %d", i);
@@ -2039,7 +2039,7 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_item(tree1, hf_gryphon_sched_skip_sleep, tvb, offset, 2, ENC_BIG_ENDIAN);
}
- x = tvb_get_guint8(tvb, offset+2);
+ x = tvb_get_uint8(tvb, offset+2);
/* 20171026 */
if (x == 0) {
x = def_chan;
@@ -2157,7 +2157,7 @@ resp_ldf_list(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree *localTree;
/* block index */
- blocks = tvb_get_guint8(tvb, offset);
+ blocks = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_number, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2194,7 +2194,7 @@ cmd_ldf_delete(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_ldf_desc(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 size;
+ uint32_t size;
/* size 4 bytes */
size = tvb_get_ntohl(tvb, offset);
@@ -2249,7 +2249,7 @@ cmd_ldf_parse(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_get_ldf_info(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 bitrate;
+ uint32_t bitrate;
float value;
proto_tree_add_item(pt, hf_gryphon_ldf_info_pv, tvb, offset, 16, ENC_ASCII|ENC_NA);
offset += 16;
@@ -2265,10 +2265,10 @@ resp_get_ldf_info(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int length;
int i;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2281,17 +2281,17 @@ cmd_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 flag;
- guint8 num_signals;
+ uint8_t flag;
+ uint8_t num_signals;
float fvalue;
int i;
int length;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
/* flag */
- flag = tvb_get_guint8(tvb, offset);
+ flag = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_cnvt_flags_getvalues, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2319,10 +2319,10 @@ resp_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int length;
int i;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2335,10 +2335,10 @@ cmd_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int i;
int length;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2352,11 +2352,11 @@ resp_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_cnvt_set_values(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int length;
int i;
float fvalue;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2384,7 +2384,7 @@ static int
resp_ldf_get_node_names(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_node_names, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2415,15 +2415,15 @@ static int
resp_ldf_get_frames(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
- guint8 pid;
+ uint16_t us_num;
+ uint8_t pid;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_frames, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
while(us_num > 0) {
/* id */
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%x ",pid);
offset += 1;
/* frame name */
@@ -2439,7 +2439,7 @@ cmd_ldf_get_frame_info(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
{
char *string;
int length;
- guint8 id;
+ uint8_t id;
string = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &length, ENC_ASCII);
if(length > 1) {
proto_tree_add_string(pt, hf_gryphon_ldf_get_frame, tvb, offset, length, string);
@@ -2447,7 +2447,7 @@ cmd_ldf_get_frame_info(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, 0, "(Id not used)");
offset += 1;
} else {
- id = tvb_get_guint8(tvb, offset);
+ id = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, id, "0x%x ",id);
offset += 1;
}
@@ -2458,12 +2458,12 @@ static int
resp_ldf_get_frame_info(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint8 count, i;
+ uint8_t count, i;
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item_ret_length(pt, hf_gryphon_ldf_get_frame_pub, tvb, offset, -1, ENC_NA | ENC_ASCII, &length);
offset += length;
- count = tvb_get_guint8(tvb, offset);
+ count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for (i = 0; i < count; i++) {
@@ -2553,7 +2553,7 @@ resp_ldf_do_encoding_block(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_
static int
resp_ldf_get_signal_detail(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt)
{
- guint16 us_num;
+ uint16_t us_num;
/* offset */
proto_tree_add_item(pt, hf_gryphon_ldf_signal_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2586,7 +2586,7 @@ cmd_ldf_get_encoding_info(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_ldf_get_encoding_info(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt)
{
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_encodings, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2620,7 +2620,7 @@ cmd_ldf_emulate_nodes(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
int length;
proto_tree *tree2;
- nnodes = tvb_get_guint8(tvb, offset);
+ nnodes = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_nodenumber, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2631,7 +2631,7 @@ cmd_ldf_emulate_nodes(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
tree2 = proto_tree_add_subtree_format(pt, tvb, offset, 1+length, ett_gryphon_lin_emulate_node, NULL, "Node %u", node_numb);
- xchannel = tvb_get_guint8(tvb, offset);
+ xchannel = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(tree2, hf_gryphon_sched_channel, tvb, offset, 1, xchannel);
offset += 1;
@@ -2647,7 +2647,7 @@ static int
resp_ldf_get_schedules(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_schedules, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2683,7 +2683,7 @@ static int
resp_ldf_get_node_signals(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_signal_names, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2721,7 +2721,7 @@ cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
{
proto_item *item;
proto_tree *tree;
- guint blocks, responses, i, msglen, length;
+ unsigned blocks, responses, i, msglen, length;
int padding;
int action, actionType, actionValue;
tvbuff_t *next_tvb;
@@ -2749,7 +2749,7 @@ cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
offset += 1;
/* action */
- action = tvb_get_guint8(tvb, offset);
+ action = tvb_get_uint8(tvb, offset);
item = proto_tree_add_item(pt, hf_gryphon_addresp_action, tvb, offset, 1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (item, ett_gryphon_flags);
actionValue = tvb_get_ntohs(tvb, offset+2);
@@ -2797,7 +2797,7 @@ cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
padding = 3 - (msglen + 3) % 4;
tree = proto_tree_add_subtree_format(pt, tvb, offset, msglen + padding, ett_gryphon_cmd_response_block, NULL, "Response block %d", i);
next_tvb = tvb_new_subset_length(tvb, offset, msglen + padding);
- dissect_gryphon_message(next_tvb, pinfo, tree, TRUE);
+ dissect_gryphon_message(next_tvb, pinfo, tree, true);
offset += msglen + padding;
}
return offset;
@@ -2815,8 +2815,8 @@ resp_addresp(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_modresp(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 dest = tvb_get_guint8(tvb, offset-5),
- resp_handle = tvb_get_guint8(tvb, offset);
+ uint8_t dest = tvb_get_uint8(tvb, offset-5),
+ resp_handle = tvb_get_uint8(tvb, offset);
if (resp_handle)
proto_tree_add_item(pt, hf_gryphon_modresp_handle, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2836,12 +2836,12 @@ cmd_modresp(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_resphan(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- int handles = tvb_get_guint8(tvb, offset);
+ int handles = tvb_get_uint8(tvb, offset);
int i, padding, handle;
proto_tree_add_item(pt, hf_gryphon_num_resphan, tvb, offset, 1, ENC_BIG_ENDIAN);
for (i = 1; i <= handles; i++){
- handle = tvb_get_guint8(tvb, offset+i);
+ handle = tvb_get_uint8(tvb, offset+i);
proto_tree_add_uint_format(pt, hf_gryphon_handle, tvb, offset+i, 1, handle, "Handle %d: %u", i,
handle);
}
@@ -2935,7 +2935,7 @@ static int
resp_list(tvbuff_t *tvb, int offset, proto_tree *pt)
{
proto_tree *tree;
- guint32 i, count;
+ uint32_t i, count;
proto_tree_add_item_ret_uint(pt, hf_gryphon_list_num_programs, tvb, offset, 1, ENC_BIG_ENDIAN, &count);
proto_tree_add_item(pt, hf_gryphon_reserved, tvb, offset+1, 1, ENC_NA);
@@ -2959,7 +2959,7 @@ static int
cmd_start(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt)
{
char *string;
- gint length;
+ int length;
int msglen;
int hdr_stuff = offset;
@@ -3003,13 +3003,13 @@ resp_status(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree *tree;
unsigned int i, copies, length, channel;
- copies = tvb_get_guint8(tvb, offset);
+ copies = tvb_get_uint8(tvb, offset);
item = proto_tree_add_item(pt, hf_gryphon_status_num_running_copies, tvb, offset, 1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (item, ett_gryphon_pgm_status);
offset += 1;
if (copies) {
for (i = 1; i <= copies; i++) {
- channel = tvb_get_guint8(tvb, offset);
+ channel = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(tree, hf_gryphon_program_channel_number, tvb, offset, 1, channel,
"Program %u channel (client) number %u", i, channel);
offset += 1;
@@ -3038,14 +3038,14 @@ cmd_options(tvbuff_t *tvb, int offset, proto_tree *pt)
msglen -= 4;
for (i = 1; msglen > 0; i++) {
- option_length = tvb_get_guint8(tvb, offset+1);
+ option_length = tvb_get_uint8(tvb, offset+1);
size = option_length + 2;
padding = 3 - ((size + 3) %4);
tree = proto_tree_add_subtree_format(pt, tvb, offset, size + padding, ett_gryphon_pgm_options, NULL, "Option number %u", i);
- option = tvb_get_guint8(tvb, offset);
+ option = tvb_get_uint8(tvb, offset);
switch (option_length) {
case 1:
- option_value = tvb_get_guint8(tvb, offset+2);
+ option_value = tvb_get_uint8(tvb, offset+2);
break;
case 2:
option_value = tvb_get_ntohs(tvb, offset+2);
@@ -3096,10 +3096,10 @@ static int
cmd_files(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int msglen;
- guint8 file;
+ uint8_t file;
msglen = tvb_reported_length_remaining(tvb, offset);
- file = tvb_get_guint8(tvb, offset);
+ file = tvb_get_uint8(tvb, offset);
if (file == 0)
proto_tree_add_uint_format(pt, hf_gryphon_cmd_file, tvb, offset, 1, file, "First group of names");
else
@@ -3128,21 +3128,21 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int remain;
unsigned int ui_block;
- guint32 ui_ids;
+ uint32_t ui_ids;
int id_usdtreq;
int id_usdtresp;
int id_uudtresp;
- guint8 u8_options;
- guint8 u8USDTReqExtAddr_bit;
- guint8 u8USDTRespExtAddr_bit;
- guint8 u8UUDTRespExtAddr_bit;
- guint8 u8USDTReqExtAddr;
- guint8 u8USDTRespExtAddr;
- guint8 u8UUDTRespExtAddr;
- guint8 u8USDTReqHeaderSize;
- guint8 u8USDTRespHeaderSize;
- guint8 u8UUDTRespHeaderSize;
- guint8 flags;
+ uint8_t u8_options;
+ uint8_t u8USDTReqExtAddr_bit;
+ uint8_t u8USDTRespExtAddr_bit;
+ uint8_t u8UUDTRespExtAddr_bit;
+ uint8_t u8USDTReqExtAddr;
+ uint8_t u8USDTRespExtAddr;
+ uint8_t u8UUDTRespExtAddr;
+ uint8_t u8USDTReqHeaderSize;
+ uint8_t u8USDTRespHeaderSize;
+ uint8_t u8UUDTRespHeaderSize;
+ uint8_t flags;
proto_tree *tree1;
proto_tree *tree2;
proto_tree *tree3;
@@ -3171,21 +3171,21 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
/* 20171012 */
/* Action flags */
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
tree1 = proto_tree_add_subtree_format(pt, tvb, offset, 1, ett_gryphon_usdt_action_flags, NULL, "Action flags 0x%02x", flags);
proto_tree_add_item(tree1, hf_gryphon_usdt_action_flags_non_legacy, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
remain -= 1;
/* tx options */
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
tree2 = proto_tree_add_subtree_format(pt, tvb, offset, 1, ett_gryphon_usdt_tx_options_flags, NULL, "Transmit options 0x%02x", flags);
proto_tree_add_bitmask(tree2, tvb, offset, hf_gryphon_usdt_transmit_options_flags, ett_gryphon_flags, transmit_options_flags, ENC_BIG_ENDIAN);
offset += 1;
remain -= 1;
/* rx options */
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
tree3 = proto_tree_add_subtree_format(pt, tvb, offset, 1, ett_gryphon_usdt_rx_options_flags, NULL, "Receive options 0x%02x", flags);
proto_tree_add_bitmask(tree3, tvb, offset, hf_gryphon_usdt_receive_options_flags, ett_gryphon_flags, receive_options_flags, ENC_BIG_ENDIAN);
offset += 1;
@@ -3221,9 +3221,9 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
offset += 4;
remain -= 4;
- u8UUDTRespExtAddr = tvb_get_guint8(tvb, offset+10);
- u8USDTRespExtAddr = tvb_get_guint8(tvb, offset+13);
- u8USDTReqExtAddr = tvb_get_guint8(tvb, offset+16);
+ u8UUDTRespExtAddr = tvb_get_uint8(tvb, offset+10);
+ u8USDTRespExtAddr = tvb_get_uint8(tvb, offset+13);
+ u8USDTReqExtAddr = tvb_get_uint8(tvb, offset+16);
if(ui_ids == 1) {
/* single ID */
@@ -3242,7 +3242,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%04x (29-bit)", id_usdtreq);
}
} else {
- u8USDTReqExtAddr = tvb_get_guint8(tvb, offset+16);
+ u8USDTReqExtAddr = tvb_get_uint8(tvb, offset+16);
if(u8USDTReqHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%02x (11-bit extended address %01x)", id_usdtreq, u8USDTReqExtAddr);
} else {
@@ -3265,7 +3265,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%04x (29-bit)", id_usdtresp);
}
} else {
- u8USDTRespExtAddr = tvb_get_guint8(tvb, offset+13);
+ u8USDTRespExtAddr = tvb_get_uint8(tvb, offset+13);
if(u8USDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%02x (11-bit extended address %01x)", id_usdtresp, u8USDTRespExtAddr);
} else {
@@ -3289,7 +3289,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%04x (29-bit)", id_uudtresp);
}
} else {
- u8UUDTRespExtAddr = tvb_get_guint8(tvb, offset+10);
+ u8UUDTRespExtAddr = tvb_get_uint8(tvb, offset+10);
if(u8UUDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%02x (11-bit extended address %01x)", id_uudtresp, u8UUDTRespExtAddr);
} else {
@@ -3319,7 +3319,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%04x through 0x%04x (29-bit)", id_usdtreq, id_usdtreq + ui_ids-1);
}
} else {
- u8USDTReqExtAddr = tvb_get_guint8(tvb, offset+16);
+ u8USDTReqExtAddr = tvb_get_uint8(tvb, offset+16);
if(u8USDTReqHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%02x through 0x%02x (11-bit extended address %0x)", id_usdtreq, id_usdtreq + ui_ids-1, u8USDTReqExtAddr);
} else {
@@ -3342,7 +3342,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%04x through 0x%04x (29-bit)", id_usdtresp, id_usdtresp + ui_ids-1);
}
} else {
- u8USDTRespExtAddr = tvb_get_guint8(tvb, offset+13);
+ u8USDTRespExtAddr = tvb_get_uint8(tvb, offset+13);
if(u8USDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%02x through 0x%02x (11-bit extended address %01x)", id_usdtresp, id_usdtresp + ui_ids-1, u8USDTRespExtAddr);
} else {
@@ -3365,7 +3365,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%04x through 0x%04x (29-bit)", id_uudtresp, id_uudtresp + ui_ids-1);
}
} else {
- u8UUDTRespExtAddr = tvb_get_guint8(tvb, offset+10);
+ u8UUDTRespExtAddr = tvb_get_uint8(tvb, offset+10);
if(u8UUDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%02x through 0x%02x (11-bit extended address %01x)", id_uudtresp, id_uudtresp + ui_ids-1, u8UUDTRespExtAddr);
} else {
@@ -3489,11 +3489,11 @@ static int
cmd_usdt(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int ids, id, remain, size, i, bytes;
- guint8 flags;
+ uint8_t flags;
proto_tree *localTree;
proto_item *localItem;
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_usdt_flags_register, tvb, offset, 1, ENC_BIG_ENDIAN);
if (flags & 1) {
@@ -3521,7 +3521,7 @@ cmd_usdt(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_bitmask(pt, tvb, offset+1, hf_gryphon_usdt_transmit_options_flags, ett_gryphon_flags, transmit_option_flags, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(pt, tvb, offset+2, hf_gryphon_usdt_receive_options_flags, ett_gryphon_flags, receive_option_flags, ENC_BIG_ENDIAN);
- if ((ids = tvb_get_guint8(tvb, offset+3))) {
+ if ((ids = tvb_get_uint8(tvb, offset+3))) {
localItem = proto_tree_add_item(pt, hf_gryphon_usdt_ext_address, tvb, offset+3, 1, ENC_BIG_ENDIAN);
offset += 4;
@@ -3580,7 +3580,7 @@ cmd_bits_in (tvbuff_t *tvb, int offset, proto_tree *pt)
{
int value;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value) {
static int * const digital_values[] = {
&hf_gryphon_bits_in_input1,
@@ -3603,7 +3603,7 @@ cmd_bits_out (tvbuff_t *tvb, int offset, proto_tree *pt)
{
int value;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value) {
static int * const digital_values[] = {
&hf_gryphon_bits_out_output1,
@@ -3622,7 +3622,7 @@ cmd_bits_out (tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_init_strat (tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 reset_limit;
+ uint32_t reset_limit;
int msglen, indx;
float value;
@@ -3633,7 +3633,7 @@ cmd_init_strat (tvbuff_t *tvb, int offset, proto_tree *pt)
offset += 4;
msglen -= 4;
for (indx = 1; msglen; indx++, offset++, msglen--) {
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value)
proto_tree_add_float_format_value(pt, hf_gryphon_init_strat_delay, tvb, offset, 1,
value/4, "Delay %d = %.2f seconds", indx, value/4);
@@ -3659,7 +3659,7 @@ blm_mode(tvbuff_t *tvb, int offset, proto_tree *pt)
{
proto_item *item;
proto_tree *tree;
- guint32 mode, milliseconds;
+ uint32_t mode, milliseconds;
item = proto_tree_add_item_ret_uint(pt, hf_gryphon_blm_mode, tvb, offset, 4, ENC_BIG_ENDIAN, &mode);
tree = proto_item_add_subtree(item, ett_gryphon_blm_mode);
@@ -3705,8 +3705,8 @@ static int
// NOLINTNEXTLINE(misc-no-recursion)
decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int dst, proto_tree *pt)
{
- guint32 cmd;
- guint32 context, ioctl_command;
+ uint32_t cmd;
+ uint32_t context, ioctl_command;
proto_tree *ft;
proto_item *hi;
gryphon_pkt_info_t *pkt_info;
@@ -3717,7 +3717,7 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
if (cmd > 0x3F)
cmd += dst * 256;
- pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb));
+ pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb));
if (!pkt_info) {
/* Find a conversation, create a new if no one exists */
@@ -3732,7 +3732,7 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
wmem_list_prepend(conv_data->request_frame_data, pkt_info);
- p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb), pkt_info);
+ p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb), pkt_info);
}
proto_tree_add_uint(pt, hf_gryphon_command, tvb, offset, 1, cmd);
@@ -3973,17 +3973,17 @@ static int
decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tree *pt)
{
int msglen;
- guint32 cmd;
+ uint32_t cmd;
proto_tree *ft;
gryphon_pkt_info_t *pkt_info, *pkt_info_list;
msglen = tvb_reported_length_remaining(tvb, offset);
- cmd = tvb_get_guint8(tvb, offset);
+ cmd = tvb_get_uint8(tvb, offset);
if (cmd > 0x3F)
cmd += src * 256;
- pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb));
+ pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb));
if (!pkt_info) {
/* Find a conversation, create a new if no one exists */
@@ -4008,7 +4008,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
frame = wmem_list_frame_next(frame);
}
- p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb), pkt_info);
+ p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb), pkt_info);
}
/*
@@ -4211,14 +4211,14 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
*/
static int
// NOLINTNEXTLINE(misc-no-recursion)
-dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_msgresp_add)
+dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bool is_msgresp_add)
{
proto_tree *gryphon_tree;
proto_item *ti, *type_item;
proto_tree *header_tree, *body_tree;
int msgend, msglen, msgpad;
int offset = 0;
- guint32 src, dest, i, frmtyp, flags;
+ uint32_t src, dest, i, frmtyp, flags;
if (!is_msgresp_add) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Gryphon");
@@ -4256,7 +4256,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
}
proto_tree_add_item_ret_uint(header_tree, hf_gryphon_data_length, tvb, offset + 4, 2, ENC_BIG_ENDIAN, &msglen);
- flags = tvb_get_guint8(tvb, offset + 6);
+ flags = tvb_get_uint8(tvb, offset + 6);
frmtyp = flags & ~RESPONSE_FLAGS;
type_item = proto_tree_add_uint(header_tree, hf_gryphon_type, tvb, offset + 6, 1, frmtyp);
/*
@@ -4327,10 +4327,10 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
return offset;
}
-static guint
+static unsigned
get_gryphon_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
- guint16 plen;
+ uint16_t plen;
int padded_len;
/*
@@ -4350,7 +4350,7 @@ get_gryphon_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *dat
static int
dissect_gryphon_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- dissect_gryphon_message(tvb, pinfo, tree, FALSE);
+ dissect_gryphon_message(tvb, pinfo, tree, false);
return tvb_reported_length(tvb);
}
@@ -5251,10 +5251,10 @@ proto_register_gryphon(void)
{ "UUDT response IDs", "gryphon.uudt_response", FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_gryphon_uudt_response_ext,
- { "UUDT response extended address", "gryphon.usdt_response_ext", FT_UINT8, BASE_HEX, NULL, 0x0,
+ { "UUDT response extended address", "gryphon.uudt_response_ext", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_gryphon_more_filenames,
- { "More filenames to return", "gryphon.more_filenames", FT_BOOLEAN, 8, TFS(&yes_no), 0x0,
+ { "More filenames to return", "gryphon.more_filenames", FT_BOOLEAN, BASE_NONE, TFS(&yes_no), 0x0,
NULL, HFILL }},
{ &hf_gryphon_filenames,
{ "File and directory names", "gryphon.filenames", FT_STRING, BASE_NONE, NULL, 0x0,
@@ -5267,7 +5267,7 @@ proto_register_gryphon(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_gryphon,
&ett_gryphon_header,
&ett_gryphon_body,