diff options
Diffstat (limited to 'epan/dissectors/packet-cops.c')
-rw-r--r-- | epan/dissectors/packet-cops.c | 883 |
1 files changed, 442 insertions, 441 deletions
diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c index 6eaa01e9..998410dc 100644 --- a/epan/dissectors/packet-cops.c +++ b/epan/dissectors/packet-cops.c @@ -47,6 +47,7 @@ #include <epan/oids.h> #include <epan/expert.h> +#include <epan/tfs.h> #include <wsutil/str_util.h> @@ -61,7 +62,7 @@ void proto_register_cops(void); /* Preference: desegmentation of COPS */ -static gboolean cops_desegment = TRUE; +static bool cops_desegment = true; #define COPS_OBJECT_HDR_SIZE 4 @@ -522,262 +523,262 @@ static const value_string pcmm_gate_state_reason[] = { /* Initialize the protocol and registered fields */ -static gint proto_cops = -1; -static gint hf_cops_ver_flags = -1; -static gint hf_cops_version = -1; -static gint hf_cops_flags = -1; - -static gint hf_cops_response_in = -1; -static gint hf_cops_response_to = -1; -static gint hf_cops_response_time = -1; - -static gint hf_cops_op_code = -1; -static gint hf_cops_client_type = -1; -static gint hf_cops_msg_len = -1; - -static gint hf_cops_obj_len = -1; -static gint hf_cops_obj_c_num = -1; -static gint hf_cops_obj_c_type = -1; - -static gint hf_cops_obj_s_num = -1; -static gint hf_cops_obj_s_type = -1; - -static gint hf_cops_handle = -1; - -static gint hf_cops_r_type_flags = -1; -static gint hf_cops_m_type_flags = -1; - -static gint hf_cops_in_int_ipv4 = -1; -static gint hf_cops_in_int_ipv6 = -1; -static gint hf_cops_out_int_ipv4 = -1; -static gint hf_cops_out_int_ipv6 = -1; -static gint hf_cops_int_ifindex = -1; - -static gint hf_cops_reason = -1; -static gint hf_cops_reason_sub = -1; - -static gint hf_cops_dec_cmd_code = -1; -static gint hf_cops_dec_flags = -1; - -static gint hf_cops_error = -1; -static gint hf_cops_error_sub = -1; - -static gint hf_cops_gperror = -1; -static gint hf_cops_gperror_sub = -1; - -static gint hf_cops_cperror = -1; -static gint hf_cops_cperror_sub = -1; - -static gint hf_cops_katimer = -1; - -static gint hf_cops_pepid = -1; - -static gint hf_cops_report_type = -1; - -static gint hf_cops_pdprediraddr_ipv4 = -1; -static gint hf_cops_pdprediraddr_ipv6 = -1; -static gint hf_cops_lastpdpaddr_ipv4 = -1; -static gint hf_cops_lastpdpaddr_ipv6 = -1; -static gint hf_cops_pdp_tcp_port = -1; - -static gint hf_cops_accttimer = -1; - -static gint hf_cops_key_id = -1; -static gint hf_cops_seq_num = -1; - -static gint hf_cops_prid_oid = -1; -static gint hf_cops_pprid_oid = -1; -static gint hf_cops_errprid_oid = -1; -static gint hf_cops_epd_null = -1; -static gint hf_cops_epd_int = -1; -static gint hf_cops_epd_octets = -1; -static gint hf_cops_epd_oid = -1; -static gint hf_cops_epd_ipv4 = -1; -static gint hf_cops_epd_u32 = -1; -static gint hf_cops_epd_ticks = -1; -static gint hf_cops_epd_opaque = -1; -static gint hf_cops_epd_i64 = -1; -static gint hf_cops_epd_u64 = -1; -static gint hf_cops_epd_unknown = -1; -static gint hf_cops_reserved8 = -1; -static gint hf_cops_reserved16 = -1; -static gint hf_cops_reserved24 = -1; -static gint hf_cops_keyed_message_digest = -1; -static gint hf_cops_integrity_contents = -1; -static gint hf_cops_opaque_data = -1; +static int proto_cops; +static int hf_cops_ver_flags; +static int hf_cops_version; +static int hf_cops_flags; + +static int hf_cops_response_in; +static int hf_cops_response_to; +static int hf_cops_response_time; + +static int hf_cops_op_code; +static int hf_cops_client_type; +static int hf_cops_msg_len; + +static int hf_cops_obj_len; +static int hf_cops_obj_c_num; +static int hf_cops_obj_c_type; + +static int hf_cops_obj_s_num; +static int hf_cops_obj_s_type; + +static int hf_cops_handle; + +static int hf_cops_r_type_flags; +static int hf_cops_m_type_flags; + +static int hf_cops_in_int_ipv4; +static int hf_cops_in_int_ipv6; +static int hf_cops_out_int_ipv4; +static int hf_cops_out_int_ipv6; +static int hf_cops_int_ifindex; + +static int hf_cops_reason; +static int hf_cops_reason_sub; + +static int hf_cops_dec_cmd_code; +static int hf_cops_dec_flags; + +static int hf_cops_error; +static int hf_cops_error_sub; + +static int hf_cops_gperror; +static int hf_cops_gperror_sub; + +static int hf_cops_cperror; +static int hf_cops_cperror_sub; + +static int hf_cops_katimer; + +static int hf_cops_pepid; + +static int hf_cops_report_type; + +static int hf_cops_pdprediraddr_ipv4; +static int hf_cops_pdprediraddr_ipv6; +static int hf_cops_lastpdpaddr_ipv4; +static int hf_cops_lastpdpaddr_ipv6; +static int hf_cops_pdp_tcp_port; + +static int hf_cops_accttimer; + +static int hf_cops_key_id; +static int hf_cops_seq_num; + +static int hf_cops_prid_oid; +static int hf_cops_pprid_oid; +static int hf_cops_errprid_oid; +static int hf_cops_epd_null; +static int hf_cops_epd_int; +static int hf_cops_epd_octets; +static int hf_cops_epd_oid; +static int hf_cops_epd_ipv4; +static int hf_cops_epd_u32; +static int hf_cops_epd_ticks; +static int hf_cops_epd_opaque; +static int hf_cops_epd_i64; +static int hf_cops_epd_u64; +static int hf_cops_epd_unknown; +static int hf_cops_reserved8; +static int hf_cops_reserved16; +static int hf_cops_reserved24; +static int hf_cops_keyed_message_digest; +static int hf_cops_integrity_contents; +static int hf_cops_opaque_data; /* For PacketCable D-QoS */ -static gint hf_cops_subtree = -1; -static gint hf_cops_pc_activity_count = -1; -static gint hf_cops_pc_algorithm = -1; -static gint hf_cops_pc_close_subcode = -1; -static gint hf_cops_pc_cmts_ip = -1; -static gint hf_cops_pc_cmts_ip_port = -1; -static gint hf_cops_pc_prks_ip = -1; -static gint hf_cops_pc_prks_ip_port = -1; -static gint hf_cops_pc_srks_ip = -1; -static gint hf_cops_pc_srks_ip_port = -1; -static gint hf_cops_pc_delete_subcode = -1; -static gint hf_cops_pc_dest_ip = -1; -static gint hf_cops_pc_dest_port = -1; -static gint hf_cops_pc_direction = -1; -static gint hf_cops_pc_ds_field = -1; -static gint hf_cops_pc_gate_id = -1; -static gint hf_cops_pc_gate_spec_flags = -1; -static gint hf_cops_pc_gate_command_type = -1; -static gint hf_cops_pc_key = -1; -static gint hf_cops_pc_max_packet_size = -1; -static gint hf_cops_pc_min_policed_unit = -1; -static gint hf_cops_pc_packetcable_err_code = -1; -static gint hf_cops_pc_packetcable_sub_code = -1; -static gint hf_cops_pc_peak_data_rate = -1; -static gint hf_cops_pc_protocol_id = -1; -static gint hf_cops_pc_reason_code = -1; -static gint hf_cops_pc_remote_flags = -1; -static gint hf_cops_pc_remote_gate_id = -1; -static gint hf_cops_pc_reserved = -1; -static gint hf_cops_pc_session_class = -1; -static gint hf_cops_pc_slack_term = -1; -static gint hf_cops_pc_spec_rate = -1; -static gint hf_cops_pc_src_ip = -1; -static gint hf_cops_pc_src_port = -1; -static gint hf_cops_pc_subscriber_id_ipv4 = -1; -static gint hf_cops_pc_subscriber_id_ipv6 = -1; -static gint hf_cops_pc_t1_value = -1; -static gint hf_cops_pc_t7_value = -1; -static gint hf_cops_pc_t8_value = -1; -static gint hf_cops_pc_token_bucket_rate = -1; -static gint hf_cops_pc_token_bucket_size = -1; -static gint hf_cops_pc_transaction_id = -1; -static gint hf_cops_pc_bcid_ts = -1; -static gint hf_cops_pc_bcid_id = -1; -static gint hf_cops_pc_bcid_tz = -1; -static gint hf_cops_pc_bcid_ev = -1; -static gint hf_cops_pc_dfcdc_ip = -1; -static gint hf_cops_pc_dfccc_ip = -1; -static gint hf_cops_pc_dfcdc_ip_port = -1; -static gint hf_cops_pc_dfccc_ip_port = -1; -static gint hf_cops_pc_dfccc_id = -1; +static int hf_cops_subtree; +static int hf_cops_pc_activity_count; +static int hf_cops_pc_algorithm; +static int hf_cops_pc_close_subcode; +static int hf_cops_pc_cmts_ip; +static int hf_cops_pc_cmts_ip_port; +static int hf_cops_pc_prks_ip; +static int hf_cops_pc_prks_ip_port; +static int hf_cops_pc_srks_ip; +static int hf_cops_pc_srks_ip_port; +static int hf_cops_pc_delete_subcode; +static int hf_cops_pc_dest_ip; +static int hf_cops_pc_dest_port; +static int hf_cops_pc_direction; +static int hf_cops_pc_ds_field; +static int hf_cops_pc_gate_id; +static int hf_cops_pc_gate_spec_flags; +static int hf_cops_pc_gate_command_type; +static int hf_cops_pc_key; +static int hf_cops_pc_max_packet_size; +static int hf_cops_pc_min_policed_unit; +static int hf_cops_pc_packetcable_err_code; +static int hf_cops_pc_packetcable_sub_code; +static int hf_cops_pc_peak_data_rate; +static int hf_cops_pc_protocol_id; +static int hf_cops_pc_reason_code; +static int hf_cops_pc_remote_flags; +static int hf_cops_pc_remote_gate_id; +static int hf_cops_pc_reserved; +static int hf_cops_pc_session_class; +static int hf_cops_pc_slack_term; +static int hf_cops_pc_spec_rate; +static int hf_cops_pc_src_ip; +static int hf_cops_pc_src_port; +static int hf_cops_pc_subscriber_id_ipv4; +static int hf_cops_pc_subscriber_id_ipv6; +static int hf_cops_pc_t1_value; +static int hf_cops_pc_t7_value; +static int hf_cops_pc_t8_value; +static int hf_cops_pc_token_bucket_rate; +static int hf_cops_pc_token_bucket_size; +static int hf_cops_pc_transaction_id; +static int hf_cops_pc_bcid_ts; +static int hf_cops_pc_bcid_id; +static int hf_cops_pc_bcid_tz; +static int hf_cops_pc_bcid_ev; +static int hf_cops_pc_dfcdc_ip; +static int hf_cops_pc_dfccc_ip; +static int hf_cops_pc_dfcdc_ip_port; +static int hf_cops_pc_dfccc_ip_port; +static int hf_cops_pc_dfccc_id; /* PacketCable Multimedia */ -static gint hf_cops_pcmm_amid_app_type = -1; -static gint hf_cops_pcmm_amid_am_tag = -1; -static gint hf_cops_pcmm_gate_spec_flags = -1; -static gint hf_cops_pcmm_gate_spec_flags_gate = -1; -static gint hf_cops_pcmm_gate_spec_flags_dscp_overwrite = -1; -static gint hf_cops_pcmm_gate_spec_dscp_tos_field = -1; -static gint hf_cops_pcmm_gate_spec_dscp_tos_mask = -1; -static gint hf_cops_pcmm_gate_spec_session_class_id = -1; -static gint hf_cops_pcmm_gate_spec_session_class_id_priority = -1; -static gint hf_cops_pcmm_gate_spec_session_class_id_preemption = -1; -static gint hf_cops_pcmm_gate_spec_session_class_id_configurable = -1; -static gint hf_cops_pcmm_gate_spec_timer_t1 = -1; -static gint hf_cops_pcmm_gate_spec_timer_t2 = -1; -static gint hf_cops_pcmm_gate_spec_timer_t3 = -1; -static gint hf_cops_pcmm_gate_spec_timer_t4 = -1; -static gint hf_cops_pcmm_classifier_protocol_id = -1; -static gint hf_cops_pcmm_classifier_dscp_tos_field = -1; -static gint hf_cops_pcmm_classifier_dscp_tos_mask = -1; -static gint hf_cops_pcmm_classifier_src_addr = -1; -static gint hf_cops_pcmm_classifier_src_mask = -1; -static gint hf_cops_pcmm_classifier_dst_addr = -1; -static gint hf_cops_pcmm_classifier_dst_mask = -1; -static gint hf_cops_pcmm_classifier_src_port = -1; -static gint hf_cops_pcmm_classifier_src_port_end = -1; -static gint hf_cops_pcmm_classifier_dst_port = -1; -static gint hf_cops_pcmm_classifier_dst_port_end = -1; -static gint hf_cops_pcmm_classifier_priority = -1; -static gint hf_cops_pcmm_classifier_classifier_id = -1; -static gint hf_cops_pcmm_classifier_activation_state = -1; -static gint hf_cops_pcmm_classifier_action = -1; -static gint hf_cops_pcmm_classifier_flags = -1; -static gint hf_cops_pcmm_classifier_tc_low = -1; -static gint hf_cops_pcmm_classifier_tc_high = -1; -static gint hf_cops_pcmm_classifier_tc_mask = -1; -static gint hf_cops_pcmm_classifier_flow_label = -1; -static gint hf_cops_pcmm_classifier_next_header_type = -1; -static gint hf_cops_pcmm_classifier_source_prefix_length = -1; -static gint hf_cops_pcmm_classifier_destination_prefix_length = -1; -static gint hf_cops_pcmm_classifier_src_addr_v6 = -1; -static gint hf_cops_pcmm_classifier_dst_addr_v6 = -1; -static gint hf_cops_pcmm_flow_spec_envelope = -1; -static gint hf_cops_pcmm_flow_spec_service_number = -1; -static gint hf_cops_pcmm_docsis_scn = -1; -static gint hf_cops_pcmm_envelope = -1; -static gint hf_cops_pcmm_traffic_priority = -1; -static gint hf_cops_pcmm_request_transmission_policy = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_all_cm = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_priority = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_request_for_request = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_data_for_data = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_piggyback = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_concatenate = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_fragment = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_suppress = -1; -static gint hf_cops_pcmm_request_transmission_policy_sf_drop_packets = -1; -static gint hf_cops_pcmm_max_sustained_traffic_rate = -1; -static gint hf_cops_pcmm_max_traffic_burst = -1; -static gint hf_cops_pcmm_min_reserved_traffic_rate = -1; -static gint hf_cops_pcmm_ass_min_rtr_packet_size = -1; -static gint hf_cops_pcmm_max_concat_burst = -1; -static gint hf_cops_pcmm_req_att_mask = -1; -static gint hf_cops_pcmm_forbid_att_mask = -1; -static gint hf_cops_pcmm_att_aggr_rule_mask = -1; -static gint hf_cops_pcmm_nominal_polling_interval = -1; -static gint hf_cops_pcmm_tolerated_poll_jitter = -1; -static gint hf_cops_pcmm_unsolicited_grant_size = -1; -static gint hf_cops_pcmm_grants_per_interval = -1; -static gint hf_cops_pcmm_nominal_grant_interval = -1; -static gint hf_cops_pcmm_tolerated_grant_jitter = -1; -static gint hf_cops_pcmm_down_resequencing = -1; -static gint hf_cops_pcmm_down_peak_traffic_rate = -1; -static gint hf_cops_pcmm_max_downstream_latency = -1; -static gint hf_cops_pcmm_volume_based_usage_limit = -1; -static gint hf_cops_pcmm_time_based_usage_limit = -1; -static gint hf_cops_pcmm_gate_time_info = -1; -static gint hf_cops_pcmm_gate_usage_info = -1; -static gint hf_cops_pcmm_packetcable_error_code = -1; -static gint hf_cops_pcmm_packetcable_error_subcode = -1; -static gint hf_cops_pcmm_packetcable_gate_state = -1; -static gint hf_cops_pcmm_packetcable_gate_state_reason = -1; -static gint hf_cops_pcmm_packetcable_version_info_major = -1; -static gint hf_cops_pcmm_packetcable_version_info_minor = -1; -static gint hf_cops_pcmm_psid = -1; -static gint hf_cops_pcmm_synch_options_report_type = -1; -static gint hf_cops_pcmm_synch_options_synch_type = -1; -static gint hf_cops_pcmm_msg_receipt_key = -1; -static gint hf_cops_pcmm_userid = -1; -static gint hf_cops_pcmm_sharedresourceid = -1; +static int hf_cops_pcmm_amid_app_type; +static int hf_cops_pcmm_amid_am_tag; +static int hf_cops_pcmm_gate_spec_flags; +static int hf_cops_pcmm_gate_spec_flags_gate; +static int hf_cops_pcmm_gate_spec_flags_dscp_overwrite; +static int hf_cops_pcmm_gate_spec_dscp_tos_field; +static int hf_cops_pcmm_gate_spec_dscp_tos_mask; +static int hf_cops_pcmm_gate_spec_session_class_id; +static int hf_cops_pcmm_gate_spec_session_class_id_priority; +static int hf_cops_pcmm_gate_spec_session_class_id_preemption; +static int hf_cops_pcmm_gate_spec_session_class_id_configurable; +static int hf_cops_pcmm_gate_spec_timer_t1; +static int hf_cops_pcmm_gate_spec_timer_t2; +static int hf_cops_pcmm_gate_spec_timer_t3; +static int hf_cops_pcmm_gate_spec_timer_t4; +static int hf_cops_pcmm_classifier_protocol_id; +static int hf_cops_pcmm_classifier_dscp_tos_field; +static int hf_cops_pcmm_classifier_dscp_tos_mask; +static int hf_cops_pcmm_classifier_src_addr; +static int hf_cops_pcmm_classifier_src_mask; +static int hf_cops_pcmm_classifier_dst_addr; +static int hf_cops_pcmm_classifier_dst_mask; +static int hf_cops_pcmm_classifier_src_port; +static int hf_cops_pcmm_classifier_src_port_end; +static int hf_cops_pcmm_classifier_dst_port; +static int hf_cops_pcmm_classifier_dst_port_end; +static int hf_cops_pcmm_classifier_priority; +static int hf_cops_pcmm_classifier_classifier_id; +static int hf_cops_pcmm_classifier_activation_state; +static int hf_cops_pcmm_classifier_action; +static int hf_cops_pcmm_classifier_flags; +static int hf_cops_pcmm_classifier_tc_low; +static int hf_cops_pcmm_classifier_tc_high; +static int hf_cops_pcmm_classifier_tc_mask; +static int hf_cops_pcmm_classifier_flow_label; +static int hf_cops_pcmm_classifier_next_header_type; +static int hf_cops_pcmm_classifier_source_prefix_length; +static int hf_cops_pcmm_classifier_destination_prefix_length; +static int hf_cops_pcmm_classifier_src_addr_v6; +static int hf_cops_pcmm_classifier_dst_addr_v6; +static int hf_cops_pcmm_flow_spec_envelope; +static int hf_cops_pcmm_flow_spec_service_number; +static int hf_cops_pcmm_docsis_scn; +static int hf_cops_pcmm_envelope; +static int hf_cops_pcmm_traffic_priority; +static int hf_cops_pcmm_request_transmission_policy; +static int hf_cops_pcmm_request_transmission_policy_sf_all_cm; +static int hf_cops_pcmm_request_transmission_policy_sf_priority; +static int hf_cops_pcmm_request_transmission_policy_sf_request_for_request; +static int hf_cops_pcmm_request_transmission_policy_sf_data_for_data; +static int hf_cops_pcmm_request_transmission_policy_sf_piggyback; +static int hf_cops_pcmm_request_transmission_policy_sf_concatenate; +static int hf_cops_pcmm_request_transmission_policy_sf_fragment; +static int hf_cops_pcmm_request_transmission_policy_sf_suppress; +static int hf_cops_pcmm_request_transmission_policy_sf_drop_packets; +static int hf_cops_pcmm_max_sustained_traffic_rate; +static int hf_cops_pcmm_max_traffic_burst; +static int hf_cops_pcmm_min_reserved_traffic_rate; +static int hf_cops_pcmm_ass_min_rtr_packet_size; +static int hf_cops_pcmm_max_concat_burst; +static int hf_cops_pcmm_req_att_mask; +static int hf_cops_pcmm_forbid_att_mask; +static int hf_cops_pcmm_att_aggr_rule_mask; +static int hf_cops_pcmm_nominal_polling_interval; +static int hf_cops_pcmm_tolerated_poll_jitter; +static int hf_cops_pcmm_unsolicited_grant_size; +static int hf_cops_pcmm_grants_per_interval; +static int hf_cops_pcmm_nominal_grant_interval; +static int hf_cops_pcmm_tolerated_grant_jitter; +static int hf_cops_pcmm_down_resequencing; +static int hf_cops_pcmm_down_peak_traffic_rate; +static int hf_cops_pcmm_max_downstream_latency; +static int hf_cops_pcmm_volume_based_usage_limit; +static int hf_cops_pcmm_time_based_usage_limit; +static int hf_cops_pcmm_gate_time_info; +static int hf_cops_pcmm_gate_usage_info; +static int hf_cops_pcmm_packetcable_error_code; +static int hf_cops_pcmm_packetcable_error_subcode; +static int hf_cops_pcmm_packetcable_gate_state; +static int hf_cops_pcmm_packetcable_gate_state_reason; +static int hf_cops_pcmm_packetcable_version_info_major; +static int hf_cops_pcmm_packetcable_version_info_minor; +static int hf_cops_pcmm_psid; +static int hf_cops_pcmm_synch_options_report_type; +static int hf_cops_pcmm_synch_options_synch_type; +static int hf_cops_pcmm_msg_receipt_key; +static int hf_cops_pcmm_userid; +static int hf_cops_pcmm_sharedresourceid; /* Initialize the subtree pointers */ -static gint ett_cops = -1; -static gint ett_cops_ver_flags = -1; -static gint ett_cops_obj = -1; -static gint ett_cops_pr_obj = -1; -static gint ett_cops_obj_data = -1; -static gint ett_cops_r_type_flags = -1; -static gint ett_cops_itf = -1; -static gint ett_cops_reason = -1; -static gint ett_cops_decision = -1; -static gint ett_cops_error = -1; -static gint ett_cops_clientsi = -1; -static gint ett_cops_asn1 = -1; -static gint ett_cops_gperror = -1; -static gint ett_cops_cperror = -1; -static gint ett_cops_pdp = -1; - -static expert_field ei_cops_pepid_not_null = EI_INIT; -static expert_field ei_cops_trailing_garbage = EI_INIT; -static expert_field ei_cops_bad_cops_object_length = EI_INIT; -static expert_field ei_cops_bad_cops_pr_object_length = EI_INIT; -static expert_field ei_cops_unknown_c_num = EI_INIT; -/* static expert_field ei_cops_unknown_s_num = EI_INIT; */ +static int ett_cops; +static int ett_cops_ver_flags; +static int ett_cops_obj; +static int ett_cops_pr_obj; +static int ett_cops_obj_data; +static int ett_cops_r_type_flags; +static int ett_cops_itf; +static int ett_cops_reason; +static int ett_cops_decision; +static int ett_cops_error; +static int ett_cops_clientsi; +static int ett_cops_asn1; +static int ett_cops_gperror; +static int ett_cops_cperror; +static int ett_cops_pdp; + +static expert_field ei_cops_pepid_not_null; +static expert_field ei_cops_trailing_garbage; +static expert_field ei_cops_bad_cops_object_length; +static expert_field ei_cops_bad_cops_pr_object_length; +static expert_field ei_cops_unknown_c_num; +/* static expert_field ei_cops_unknown_s_num; */ /* For PacketCable */ -static gint ett_cops_subtree = -1; +static int ett_cops_subtree; -static gint ett_docsis_request_transmission_policy = -1; +static int ett_docsis_request_transmission_policy; static dissector_handle_t cops_handle; @@ -788,48 +789,48 @@ typedef struct _cops_conv_info_t { typedef struct _cops_call_t { - guint8 op_code; - gboolean solicited; - guint32 req_num; - guint32 rsp_num; + uint8_t op_code; + bool solicited; + uint32_t req_num; + uint32_t rsp_num; nstime_t req_time; } cops_call_t; void proto_reg_handoff_cops(void); -static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, guint8 op_code, guint32 offset, proto_tree *tree, guint16 client_type, guint32* handle_value); -static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, proto_tree *tree, - guint8 op_code, guint16 client_type, guint8 c_num, guint8 c_type, int len, guint32* handle_value); +static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, uint8_t op_code, uint32_t offset, proto_tree *tree, uint16_t client_type, uint32_t* handle_value); +static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, uint32_t offset, proto_tree *tree, + uint8_t op_code, uint16_t client_type, uint8_t c_num, uint8_t c_type, int len, uint32_t* handle_value); -static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, proto_tree *tree, int pr_len, - oid_info_t** oid_info_p, guint32** pprid_subids_p, guint* pprid_subids_len_p); -static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, proto_tree *tree, - guint8 s_num, guint8 s_type, int len, - oid_info_t** oid_info_p, guint32** pprid_subids, guint* pprid_subids_len); +static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, uint32_t offset, proto_tree *tree, int pr_len, + oid_info_t** oid_info_p, uint32_t** pprid_subids_p, unsigned* pprid_subids_len_p); +static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, uint32_t offset, proto_tree *tree, + uint8_t s_num, uint8_t s_type, int len, + oid_info_t** oid_info_p, uint32_t** pprid_subids, unsigned* pprid_subids_len); /* Added for PacketCable */ static proto_tree *info_to_cops_subtree(tvbuff_t *, proto_tree *, int, int, const char *); -static proto_item *info_to_display(tvbuff_t *, proto_item *, int, int, const char *, const value_string *, int, gint *); +static proto_item *info_to_display(tvbuff_t *, proto_item *, int, int, const char *, const value_string *, int, int *); -static void cops_transaction_id(tvbuff_t *, packet_info *, proto_tree *, guint8, guint, guint32); -static void cops_subscriber_id_v4(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_subscriber_id_v6(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_gate_id(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_activity_count(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_gate_specs(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_remote_gate_info(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_packetcable_reason(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_packetcable_error(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_event_generation_info(tvbuff_t *, proto_tree *, guint, guint32); -static void cops_surveillance_parameters(tvbuff_t *, proto_tree *, guint, guint32); +static void cops_transaction_id(tvbuff_t *, packet_info *, proto_tree *, uint8_t, unsigned, uint32_t); +static void cops_subscriber_id_v4(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_subscriber_id_v6(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_gate_id(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_activity_count(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_gate_specs(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_remote_gate_info(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_packetcable_reason(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_packetcable_error(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_event_generation_info(tvbuff_t *, proto_tree *, unsigned, uint32_t); +static void cops_surveillance_parameters(tvbuff_t *, proto_tree *, unsigned, uint32_t); -static void cops_amid(tvbuff_t *, proto_tree *, guint, guint32); +static void cops_amid(tvbuff_t *, proto_tree *, unsigned, uint32_t); -static void decode_docsis_request_transmission_policy(tvbuff_t *tvb, guint32 offset, proto_tree *tree); +static void decode_docsis_request_transmission_policy(tvbuff_t *tvb, uint32_t offset, proto_tree *tree); -static void cops_analyze_packetcable_dqos_obj(tvbuff_t *, packet_info *, proto_tree *, guint8, guint32); -static void cops_analyze_packetcable_mm_obj(tvbuff_t *, packet_info *, proto_tree *, guint8, guint32); +static void cops_analyze_packetcable_dqos_obj(tvbuff_t *, packet_info *, proto_tree *, uint8_t, uint32_t); +static void cops_analyze_packetcable_mm_obj(tvbuff_t *, packet_info *, proto_tree *, uint8_t, uint32_t); -static gboolean cops_packetcable = TRUE; +static bool cops_packetcable = true; /* End of addition for PacketCable */ @@ -859,10 +860,10 @@ typedef struct _COPS_CNV COPS_CNV; struct _COPS_CNV { - guint ber_class; - guint tag; - gint syntax; - const gchar *name; + unsigned ber_class; + unsigned tag; + int syntax; + const char *name; int* hfidp; }; @@ -883,7 +884,7 @@ static COPS_CNV CopsCnv [] = {BER_CLASS_ANY, 0, -1, NULL, NULL} }; -static int cops_tag_cls2syntax ( guint tag, guint cls ) { +static int cops_tag_cls2syntax ( unsigned tag, unsigned cls ) { COPS_CNV *cnv; @@ -899,7 +900,7 @@ static int cops_tag_cls2syntax ( guint tag, guint cls ) { return hf_cops_epd_unknown; } -static guint +static unsigned get_cops_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { /* @@ -911,20 +912,20 @@ get_cops_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _ static int dissect_cops_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { - guint8 op_code; - guint16 client_type; + uint8_t op_code; + uint16_t client_type; int object_len; proto_item *ti, *tv; proto_tree *cops_tree, *ver_flags_tree; - guint32 msg_len; - guint32 offset = 0; - guint8 ver_flags; - gint garbage; - guint32 handle_value = 0; + uint32_t msg_len; + uint32_t offset = 0; + uint8_t ver_flags; + int garbage; + uint32_t handle_value = 0; /* variables for Request/Response tracking */ - guint i; - gboolean is_solicited, is_request, is_response; + unsigned i; + bool is_solicited, is_request, is_response; conversation_t *conversation; cops_conv_info_t *cops_conv_info; cops_call_t *cops_call; @@ -934,7 +935,7 @@ dissect_cops_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data col_set_str(pinfo->cinfo, COL_PROTOCOL, "COPS"); col_clear(pinfo->cinfo, COL_INFO); - op_code = tvb_get_guint8(tvb, 1); + op_code = tvb_get_uint8(tvb, 1); col_add_fstr(pinfo->cinfo, COL_INFO, "COPS %s", val_to_str_const(op_code, cops_op_code_vals, "Unknown Op Code")); @@ -945,7 +946,7 @@ dissect_cops_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data cops_tree = proto_item_add_subtree(ti, ett_cops); /* Version and flags share the same byte, put them in a subtree */ - ver_flags = tvb_get_guint8(tvb, offset); + ver_flags = tvb_get_uint8(tvb, offset); is_solicited = (lo_nibble(ver_flags) == 0x01); tv = proto_tree_add_uint_format(cops_tree, hf_cops_ver_flags, tvb, offset, 1, ver_flags, "Version: %u, Flags: %s", @@ -1141,7 +1142,7 @@ dissect_cops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) return tvb_reported_length(tvb); } -static const char *cops_c_type_to_str(guint8 c_num, guint8 c_type) +static const char *cops_c_type_to_str(uint8_t c_num, uint8_t c_type) { switch (c_num) { case COPS_OBJ_HANDLE: @@ -1198,10 +1199,10 @@ static const char *cops_c_type_to_str(guint8 c_num, guint8 c_type) return ""; } -static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, guint8 op_code, guint32 offset, proto_tree *tree, guint16 client_type, guint32* handle_value) +static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, uint8_t op_code, uint32_t offset, proto_tree *tree, uint16_t client_type, uint32_t* handle_value) { int object_len, contents_len; - guint8 c_num, c_type; + uint8_t c_num, c_type; proto_item *ti; proto_tree *obj_tree; const char *type_str; @@ -1215,8 +1216,8 @@ static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, guint8 op_code object_len, COPS_OBJECT_HDR_SIZE); return -1; } - c_num = tvb_get_guint8(tvb, offset + 2); - c_type = tvb_get_guint8(tvb, offset + 3); + c_num = tvb_get_uint8(tvb, offset + 2); + c_type = tvb_get_uint8(tvb, offset + 3); ti = proto_tree_add_uint_format(tree, hf_cops_obj_c_num, tvb, offset, object_len, c_num, "%s: %s", val_to_str_const(c_num, cops_c_num_vals, "Unknown"), @@ -1242,17 +1243,17 @@ static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, guint8 op_code dissect_cops_object_data(tvb, pinfo, offset, obj_tree, op_code, client_type, c_num, c_type, contents_len, handle_value); /* Pad to 32bit boundary */ - if (object_len % sizeof (guint32)) - object_len += ((int)sizeof (guint32) - object_len % (int)sizeof (guint32)); + if (object_len % sizeof (uint32_t)) + object_len += ((int)sizeof (uint32_t) - object_len % (int)sizeof (uint32_t)); return object_len; } -static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, proto_tree *tree, int pr_len, - oid_info_t** oid_info_p, guint32** pprid_subids_p, guint* pprid_subids_len_p) +static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, uint32_t offset, proto_tree *tree, int pr_len, + oid_info_t** oid_info_p, uint32_t** pprid_subids_p, unsigned* pprid_subids_len_p) { int object_len, contents_len; - guint8 s_num, s_type; + uint8_t s_num, s_type; const char *type_str; int ret; proto_tree *cops_pr_tree, *obj_tree; @@ -1270,7 +1271,7 @@ static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, guint32 o object_len, COPS_OBJECT_HDR_SIZE); return; } - s_num = tvb_get_guint8(tvb, offset + 2); + s_num = tvb_get_uint8(tvb, offset + 2); ti = proto_tree_add_uint_format(cops_pr_tree, hf_cops_obj_s_num, tvb, offset, object_len, s_num, "%s", val_to_str_const(s_num, cops_s_num_vals, "Unknown")); @@ -1284,7 +1285,7 @@ static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, guint32 o offset++; pr_len--; - s_type = tvb_get_guint8(tvb, offset); + s_type = tvb_get_uint8(tvb, offset); type_str = val_to_str_const(s_type, cops_s_type_vals, "Unknown"); proto_tree_add_uint_format_value(obj_tree, hf_cops_obj_s_type, tvb, offset, 1, s_type, "%s%s%u%s", @@ -1302,26 +1303,26 @@ static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, guint32 o break; /* Pad to 32bit boundary */ - if (object_len % sizeof (guint32)) - object_len += ((int)sizeof (guint32) - object_len % (int)sizeof (guint32)); + if (object_len % sizeof (uint32_t)) + object_len += ((int)sizeof (uint32_t) - object_len % (int)sizeof (uint32_t)); pr_len -= object_len - COPS_OBJECT_HDR_SIZE; offset += object_len - COPS_OBJECT_HDR_SIZE; } } -static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, proto_tree *tree, - guint8 op_code, guint16 client_type, guint8 c_num, guint8 c_type, int len, guint32* handle_value) +static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, uint32_t offset, proto_tree *tree, + uint8_t op_code, uint16_t client_type, uint8_t c_num, uint8_t c_type, int len, uint32_t* handle_value) { proto_item *ti; proto_tree *r_type_tree, *itf_tree, *reason_tree, *dec_tree, *error_tree, *clientsi_tree, *pdp_tree; - guint16 r_type, m_type, reason, reason_sub, cmd_code, cmd_flags, error, error_sub, + uint16_t r_type, m_type, reason, reason_sub, cmd_code, cmd_flags, error, error_sub, tcp_port, katimer, accttimer; - guint32 ifindex; + uint32_t ifindex; ws_in6_addr ipv6addr; oid_info_t* oid_info = NULL; - guint32* pprid_subids = NULL; - guint pprid_subids_len = 0; + uint32_t* pprid_subids = NULL; + unsigned pprid_subids_len = 0; switch (c_num) { case COPS_OBJ_HANDLE: /* handle is a variable-length field, however 32bit seems enough for most of the applications */ @@ -1380,7 +1381,7 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 if (reason == 13) { /* RFC 2748 2.2.5 */ proto_tree_add_uint_format_value(reason_tree, hf_cops_reason_sub, tvb, offset, 2, reason_sub, "Unknown object's C-Num %u, C-Type %u", - tvb_get_guint8(tvb, offset), tvb_get_guint8(tvb, offset + 1)); + tvb_get_uint8(tvb, offset), tvb_get_uint8(tvb, offset + 1)); } else proto_tree_add_uint(reason_tree, hf_cops_reason_sub, tvb, offset, 2, reason_sub); @@ -1423,7 +1424,7 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 if (error == 13) { /* RFC 2748 2.2.8 */ proto_tree_add_uint_format_value(error_tree, hf_cops_error_sub, tvb, offset, 2, error_sub, "Unknown object's C-Num %u, C-Type %u", - tvb_get_guint8(tvb, offset), tvb_get_guint8(tvb, offset + 1)); + tvb_get_uint8(tvb, offset), tvb_get_uint8(tvb, offset + 1)); } else proto_tree_add_uint(error_tree, hf_cops_error_sub, tvb, offset, 2, error_sub); @@ -1532,16 +1533,16 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 } } -static guint redecode_oid(guint32* pprid_subids, guint pprid_subids_len, guint8* encoded_subids, guint encoded_len, guint32** subids_p) { - guint i; - guint n = 0; - guint32 subid = 0; - guint32* subids; - guint32* subid_overflow; +static unsigned redecode_oid(uint32_t* pprid_subids, unsigned pprid_subids_len, uint8_t* encoded_subids, unsigned encoded_len, uint32_t** subids_p) { + unsigned i; + unsigned n = 0; + uint32_t subid = 0; + uint32_t* subids; + uint32_t* subid_overflow; for (i=0; i<encoded_len; i++) { if (! (encoded_subids[i] & 0x80 )) n++; } - *subids_p = subids = (guint32 *)wmem_alloc(wmem_packet_scope(), sizeof(guint32)*(n+pprid_subids_len)); + *subids_p = subids = (uint32_t *)wmem_alloc(wmem_packet_scope(), sizeof(uint32_t)*(n+pprid_subids_len)); subid_overflow = subids+n+pprid_subids_len; for (i=0;i<pprid_subids_len;i++) subids[i] = pprid_subids[i]; @@ -1549,7 +1550,7 @@ static guint redecode_oid(guint32* pprid_subids, guint pprid_subids_len, guint8* for (i=0; i<encoded_len; i++){ - guint8 byte = encoded_subids[i]; + uint8_t byte = encoded_subids[i]; subid <<= 7; subid |= byte & 0x7F; @@ -1567,11 +1568,11 @@ static guint redecode_oid(guint32* pprid_subids, guint pprid_subids_len, guint8* } -static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, proto_tree *tree, - guint8 s_num, guint8 s_type, int len, - oid_info_t** oid_info_p, guint32** pprid_subids, guint* pprid_subids_len) { +static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, uint32_t offset, proto_tree *tree, + uint8_t s_num, uint8_t s_type, int len, + oid_info_t** oid_info_p, uint32_t** pprid_subids, unsigned* pprid_subids_len) { proto_tree *asn_tree, *gperror_tree, *cperror_tree; - guint16 gperror=0, gperror_sub=0, cperror=0, cperror_sub=0; + uint16_t gperror=0, gperror_sub=0, cperror=0, cperror_sub=0; asn1_ctx_t actx; memset(&actx,0,sizeof(actx)); @@ -1586,30 +1587,30 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 /* Never tested this branch */ asn_tree = proto_tree_add_subtree(tree, tvb, offset, len, ett_cops_asn1, NULL, "Contents:"); - dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_pprid_oid, &oid_tvb); + dissect_ber_object_identifier(false, &actx, asn_tree, tvb, offset, hf_cops_pprid_oid, &oid_tvb); if (oid_tvb) { - gint encoid_len; - guint8* encoid; + int encoid_len; + uint8_t* encoid; encoid_len = tvb_reported_length_remaining(oid_tvb,0); if (encoid_len > 0) { - encoid = (guint8*)tvb_memdup(wmem_packet_scope(),oid_tvb,0,encoid_len); - (*pprid_subids_len) = oid_encoded2subid(wmem_packet_scope(), encoid, encoid_len, pprid_subids); + encoid = (uint8_t*)tvb_memdup(pinfo->pool,oid_tvb,0,encoid_len); + (*pprid_subids_len) = oid_encoded2subid(pinfo->pool, encoid, encoid_len, pprid_subids); } } break; } case COPS_OBJ_PRID: { - guint32* subids; - guint subids_len; - guint matched; - guint left; - gint8 ber_class; + uint32_t* subids; + unsigned subids_len; + unsigned matched; + unsigned left; + int8_t ber_class; bool ber_pc; - gint32 ber_tag; - guint encoid_len; - guint8* encoid; + int32_t ber_tag; + unsigned encoid_len; + uint8_t* encoid; oid_info_t* oid_info; if (s_type != 1) break; /* Not Provisioning Instance Identifier (PRID) */ @@ -1621,14 +1622,14 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 /* TODO: check pc, class and tag */ - encoid = (guint8*)tvb_memdup(wmem_packet_scope(),tvb,offset,encoid_len); + encoid = (uint8_t*)tvb_memdup(pinfo->pool,tvb,offset,encoid_len); if (*pprid_subids) { /* Never tested this branch */ subids_len = redecode_oid(*pprid_subids, *pprid_subids_len, encoid, encoid_len, &subids); - encoid_len = oid_subid2encoded(wmem_packet_scope(), subids_len, subids, &encoid); + encoid_len = oid_subid2encoded(pinfo->pool, subids_len, subids, &encoid); } else { - subids_len = oid_encoded2subid(wmem_packet_scope(), encoid, encoid_len, &subids); + subids_len = oid_encoded2subid(pinfo->pool, encoid, encoid_len, &subids); } proto_tree_add_oid(asn_tree,hf_cops_prid_oid,tvb,offset,encoid_len,encoid); @@ -1651,14 +1652,14 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 } case COPS_OBJ_EPD: { oid_info_t* oid_info; - guint end_offset = offset + len; + unsigned end_offset = offset + len; if (s_type != 1) break;/* Not Encoded Provisioning Instance Data (EPD) */ asn_tree = proto_tree_add_subtree(tree, tvb, offset, len, ett_cops_asn1, NULL, "Contents:"); /* - * XXX: LAZYNESS WARNING: + * XXX: LAZINESS WARNING: * We are assuming that for the first element in the sequence * that describes an entry subid==1, and, that the subsequent elements * use ++subid; This is true for all IETF's PIBs (and good sense @@ -1678,10 +1679,10 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 while(offset < end_offset) { - gint8 ber_class; + int8_t ber_class; bool ber_pc; - gint32 ber_tag; - guint32 ber_length; + int32_t ber_tag; + uint32_t ber_length; bool ber_ind; int hfid; @@ -1690,7 +1691,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 if (oid_info) { /* - * XXX: LAZYNESS WARNING: + * XXX: LAZINESS WARNING: * We are assuming that the value of the sequenced item is of * the right class, the right type and the right length. * We should check that to avoid throwing a Malformed packet and @@ -1743,7 +1744,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 asn_tree = proto_tree_add_subtree(tree, tvb, offset, len, ett_cops_asn1, NULL, "Contents:"); - dissect_ber_object_identifier(FALSE, &actx, asn_tree, tvb, offset, hf_cops_errprid_oid, NULL); + dissect_ber_object_identifier(false, &actx, asn_tree, tvb, offset, hf_cops_errprid_oid, NULL); break; } @@ -1761,7 +1762,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 if (gperror == 13) { /* RFC 3084 4.4 */ proto_tree_add_uint_format_value(gperror_tree, hf_cops_gperror_sub, tvb, offset, 2, gperror_sub, "Unknown object's C-Num %u, C-Type %u", - tvb_get_guint8(tvb, offset), tvb_get_guint8(tvb, offset + 1)); + tvb_get_uint8(tvb, offset), tvb_get_uint8(tvb, offset + 1)); } else proto_tree_add_uint(gperror_tree, hf_cops_gperror_sub, tvb, offset, 2, gperror_sub); @@ -1780,7 +1781,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3 if (cperror == 13) { /* RFC 3084 4.5 */ proto_tree_add_uint_format_value(cperror_tree, hf_cops_cperror_sub, tvb, offset, 2, cperror_sub, "Unknown object's S-Num %u, C-Type %u", - tvb_get_guint8(tvb, offset), tvb_get_guint8(tvb, offset + 1)); + tvb_get_uint8(tvb, offset), tvb_get_uint8(tvb, offset + 1)); } else proto_tree_add_uint(cperror_tree, hf_cops_cperror_sub, tvb, offset, 2, cperror_sub); @@ -2780,7 +2781,7 @@ void proto_register_cops(void) }; /* Setup protocol subtree array */ - static gint *ett[] = { + static int *ett[] = { &ett_cops, &ett_cops_ver_flags, &ett_cops_obj, @@ -2888,15 +2889,15 @@ void proto_reg_handoff_cops(void) */ static proto_item * -info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, const char *str, const value_string *vsp, int mode,gint *hf_proto_parameter) +info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, const char *str, const value_string *vsp, int mode,int *hf_proto_parameter) { proto_item *pi = NULL; - guint8 *codestr; - guint8 code8 = 0; - guint16 code16 = 0; - guint32 codeipv4 = 0; - guint32 code32 = 0; - guint64 code64 = 0; + uint8_t *codestr; + uint8_t code8 = 0; + uint16_t code16 = 0; + uint32_t codeipv4 = 0; + uint32_t code32 = 0; + uint64_t code64 = 0; float codefl = 0.0f; /* Special section for printing strings */ @@ -2912,7 +2913,7 @@ info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, const ch case 1: /* Get the octet */ - code8 = tvb_get_guint8( tvb, offset ); + code8 = tvb_get_uint8( tvb, offset ); if (vsp == NULL) { /* Hexadecimal format */ if (mode==FMT_HEX) @@ -3036,15 +3037,15 @@ info_to_cops_subtree(tvbuff_t *tvb, proto_tree *st, int n, int offset, const cha proto_item *tv; tv = proto_tree_add_none_format( st, hf_cops_subtree, tvb, offset, n, "%s", str); - return( proto_item_add_subtree( tv, ett_cops_subtree ) ); + return proto_item_add_subtree( tv, ett_cops_subtree ); } /* Cops - Section : D-QoS Transaction ID */ static void -cops_transaction_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, guint8 op_code, guint n, guint32 offset) { +cops_transaction_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, uint8_t op_code, unsigned n, uint32_t offset) { proto_tree *stt; - guint16 code16; + uint16_t code16; char info[50]; /* Create a subtree */ @@ -3070,7 +3071,7 @@ cops_transaction_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, guint8 op /* Cops - Section : Subscriber IDv4 */ static void -cops_subscriber_id_v4(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_subscriber_id_v4(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_item *tv; @@ -3084,7 +3085,7 @@ cops_subscriber_id_v4(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Subscriber IDv6 */ static void -cops_subscriber_id_v6(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_subscriber_id_v6(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_item *tv; @@ -3098,7 +3099,7 @@ cops_subscriber_id_v6(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Gate ID */ static void -cops_gate_id(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_gate_id(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3112,7 +3113,7 @@ cops_gate_id(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Activity Count */ static void -cops_activity_count(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_activity_count(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3126,7 +3127,7 @@ cops_activity_count(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Gate Specifications */ static void -cops_gate_specs(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_gate_specs(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3219,7 +3220,7 @@ cops_gate_specs(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Electronic Surveillance Parameters */ static void -cops_surveillance_parameters(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_surveillance_parameters(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3273,7 +3274,7 @@ cops_surveillance_parameters(tvbuff_t *tvb, proto_tree *st, guint n, guint32 off /* Cops - Section : Event Gereration-Info */ static void -cops_event_generation_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_event_generation_info(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3331,7 +3332,7 @@ cops_event_generation_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offse /* Cops - Section : Remote Gate */ static void -cops_remote_gate_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_remote_gate_info(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3381,10 +3382,10 @@ cops_remote_gate_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : PacketCable reason */ static void -cops_packetcable_reason(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_packetcable_reason(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; - guint16 code16; + uint16_t code16; /* Create a subtree */ stt = info_to_cops_subtree(tvb,st,n,offset,"PacketCable Reason"); @@ -3408,7 +3409,7 @@ cops_packetcable_reason(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) /* Cops - Section : PacketCable error */ static void -cops_packetcable_error(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_packetcable_error(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3427,10 +3428,10 @@ cops_packetcable_error(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Multimedia Transaction ID */ static void -cops_mm_transaction_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, guint8 op_code, guint n, guint32 offset) { +cops_mm_transaction_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, uint8_t op_code, unsigned n, uint32_t offset) { proto_tree *stt; - guint16 code16; + uint16_t code16; char info[50]; /* Create a subtree */ @@ -3456,7 +3457,7 @@ cops_mm_transaction_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, guint8 /* Cops - Section : AMID */ static void -cops_amid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_amid(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3476,7 +3477,7 @@ cops_amid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Multimedia Gate Specifications */ static int -cops_mm_gate_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_mm_gate_spec(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_item *ti; proto_tree *stt, *object_tree; @@ -3528,7 +3529,7 @@ cops_mm_gate_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Classifier */ static int -cops_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean extended) { +cops_classifier(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset, bool extended) { proto_tree *stt; @@ -3617,7 +3618,7 @@ cops_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean /* Cops - Section : IPv6 Classifier */ static int -cops_ipv6_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_ipv6_classifier(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -3705,7 +3706,7 @@ cops_ipv6_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Gate Specifications */ static int -cops_flow_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_flow_spec(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -3826,7 +3827,7 @@ cops_flow_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : DOCSIS Service Class Name */ static int -cops_docsis_service_class_name(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, guint object_len, guint32 offset) { +cops_docsis_service_class_name(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st, unsigned object_len, uint32_t offset) { proto_tree *stt; @@ -3860,7 +3861,7 @@ cops_docsis_service_class_name(tvbuff_t *tvb, packet_info *pinfo, proto_tree *st /* Cops - Section : Best Effort Service */ static int -cops_best_effort_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) { +cops_best_effort_service_i04_i05(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset, bool i05) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -4027,7 +4028,7 @@ cops_best_effort_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 /* Cops - Section : Non-Real-Time Polling Service */ static int -cops_non_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) { +cops_non_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset, bool i05) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -4206,7 +4207,7 @@ cops_non_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint /* Cops - Section : Real-Time Polling Service */ static int -cops_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) { +cops_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset, bool i05) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -4376,7 +4377,7 @@ cops_real_time_polling_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g /* Cops - Section : Unsolicited Grant Service */ static int -cops_unsolicited_grant_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) { +cops_unsolicited_grant_service_i04_i05(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset, bool i05) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -4519,7 +4520,7 @@ cops_unsolicited_grant_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, g /* Cops - Section : Unsolicited Grant Service with Activity Detection */ static int -cops_ugs_with_activity_detection_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) { +cops_ugs_with_activity_detection_i04_i05(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset, bool i05) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -4686,7 +4687,7 @@ cops_ugs_with_activity_detection_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, /* Cops - Section : Downstream Service */ static int -cops_downstream_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean i05) { +cops_downstream_service_i04_i05(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset, bool i05) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -4877,7 +4878,7 @@ cops_downstream_service_i04_i05(tvbuff_t *tvb, proto_tree *st, guint n, guint32 /* Cops - Section : Upstream Drop */ static int -cops_upstream_drop_i04(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_upstream_drop_i04(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; /* Create a subtree */ @@ -4898,7 +4899,7 @@ cops_upstream_drop_i04(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Best Effort Service */ static int -cops_best_effort_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_best_effort_service(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -5023,7 +5024,7 @@ cops_best_effort_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) /* Cops - Section : Non-Real-Time Polling Service */ static int -cops_non_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_non_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -5160,7 +5161,7 @@ cops_non_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint /* Cops - Section : Real-Time Polling Service */ static int -cops_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -5288,7 +5289,7 @@ cops_real_time_polling_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o /* Cops - Section : Unsolicited Grant Service */ static int -cops_unsolicited_grant_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_unsolicited_grant_service(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -5389,7 +5390,7 @@ cops_unsolicited_grant_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 o /* Cops - Section : Unsolicited Grant Service with Activity Detection */ static int -cops_ugs_with_activity_detection(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_ugs_with_activity_detection(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -5514,7 +5515,7 @@ cops_ugs_with_activity_detection(tvbuff_t *tvb, proto_tree *st, guint n, guint32 /* Cops - Section : Downstream Service */ static int -cops_downstream_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_downstream_service(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt, *object_tree; /* Create a subtree */ @@ -5639,7 +5640,7 @@ cops_downstream_service(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) /* Cops - Section : PacketCable Multimedia Event Gereration-Info */ static void -cops_mm_event_generation_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_mm_event_generation_info(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5689,7 +5690,7 @@ cops_mm_event_generation_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 of /* Cops - Section : Volume-Based Usage Limit */ static int -cops_volume_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint object_len, guint32 offset) { +cops_volume_based_usage_limit(tvbuff_t *tvb, proto_tree *st, unsigned object_len, uint32_t offset) { proto_tree *stt; @@ -5707,7 +5708,7 @@ cops_volume_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint object_len, g /* Cops - Section : Time-Based Usage Limit */ static int -cops_time_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_time_based_usage_limit(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5724,7 +5725,7 @@ cops_time_based_usage_limit(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offs /* Cops - Section : Opaque Data */ static void -cops_opaque_data(tvbuff_t *tvb, proto_tree *st, guint object_len, guint32 offset) { +cops_opaque_data(tvbuff_t *tvb, proto_tree *st, unsigned object_len, uint32_t offset) { proto_tree *stt; @@ -5738,7 +5739,7 @@ cops_opaque_data(tvbuff_t *tvb, proto_tree *st, guint object_len, guint32 offset /* Cops - Section : Gate Time Info */ static int -cops_gate_time_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_gate_time_info(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5755,7 +5756,7 @@ cops_gate_time_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Gate Usage Info */ static void -cops_gate_usage_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_gate_usage_info(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5769,10 +5770,10 @@ cops_gate_usage_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : PacketCable error */ static int -cops_packetcable_mm_error(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_packetcable_mm_error(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; - guint16 code, subcode; + uint16_t code, subcode; /* Create a subtree */ stt = info_to_cops_subtree(tvb,st,n,offset,"PacketCable Error"); @@ -5799,7 +5800,7 @@ cops_packetcable_mm_error(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset /* Cops - Section : Gate State */ static int -cops_gate_state(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_gate_state(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5820,7 +5821,7 @@ cops_gate_state(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Version Info */ static int -cops_version_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_version_info(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5841,7 +5842,7 @@ cops_version_info(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : PSID */ static void -cops_psid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_psid(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5855,7 +5856,7 @@ cops_psid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Synch Options */ static int -cops_synch_options(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_synch_options(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5879,7 +5880,7 @@ cops_synch_options(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : Msg Receipt Key */ static void -cops_msg_receipt_key(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_msg_receipt_key(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5893,7 +5894,7 @@ cops_msg_receipt_key(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : UserID */ static void -cops_userid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_userid(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5907,7 +5908,7 @@ cops_userid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Cops - Section : SharedResourceID */ static void -cops_sharedresourceid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { +cops_sharedresourceid(tvbuff_t *tvb, proto_tree *st, unsigned n, uint32_t offset) { proto_tree *stt; @@ -5936,15 +5937,15 @@ cops_sharedresourceid(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) { /* Analyze the PacketCable objects */ static void -cops_analyze_packetcable_dqos_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 op_code, guint32 offset) { +cops_analyze_packetcable_dqos_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint8_t op_code, uint32_t offset) { - gint remdata; - guint16 object_len; - guint8 s_num, s_type; - guint16 num_type_glob; + int remdata; + uint16_t object_len; + uint8_t s_num, s_type; + uint16_t num_type_glob; /* Only if this option is enabled by the Gui */ - if ( cops_packetcable == FALSE ) { + if ( cops_packetcable == false ) { return; } @@ -5960,8 +5961,8 @@ cops_analyze_packetcable_dqos_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree return; } - s_num = tvb_get_guint8(tvb, offset + 2); - s_type = tvb_get_guint8(tvb, offset + 3); + s_num = tvb_get_uint8(tvb, offset + 2); + s_type = tvb_get_uint8(tvb, offset + 3); /* Glom the s_num and s_type together to make switching easier */ num_type_glob = s_num << 8 | s_type; @@ -6013,7 +6014,7 @@ cops_analyze_packetcable_dqos_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* XXX - This duplicates code in the DOCSIS dissector. */ static void -decode_docsis_request_transmission_policy(tvbuff_t *tvb, guint32 offset, proto_tree *tree) { +decode_docsis_request_transmission_policy(tvbuff_t *tvb, uint32_t offset, proto_tree *tree) { static int * const policies[] = { &hf_cops_pcmm_request_transmission_policy_sf_all_cm, @@ -6070,14 +6071,14 @@ decode_docsis_request_transmission_policy(tvbuff_t *tvb, guint32 offset, proto_t static void -cops_analyze_packetcable_mm_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 op_code, guint32 offset) { +cops_analyze_packetcable_mm_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint8_t op_code, uint32_t offset) { - guint16 object_len; - guint8 s_num, s_type; - guint16 num_type_glob; + uint16_t object_len; + uint8_t s_num, s_type; + uint16_t num_type_glob; /* Only if this option is enabled by the Gui */ - if ( cops_packetcable == FALSE ) { + if ( cops_packetcable == false ) { return; } @@ -6092,8 +6093,8 @@ cops_analyze_packetcable_mm_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t return; } - s_num = tvb_get_guint8(tvb, offset + 2); - s_type = tvb_get_guint8(tvb, offset + 3); + s_num = tvb_get_uint8(tvb, offset + 2); + s_type = tvb_get_uint8(tvb, offset + 3); /* Glom the s_num and s_type together to make switching easier */ num_type_glob = s_num << 8 | s_type; @@ -6119,10 +6120,10 @@ cops_analyze_packetcable_mm_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t cops_mm_gate_spec(tvb, tree, object_len, offset); break; case PCMM_CLASSIFIER: - cops_classifier(tvb, tree, object_len, offset, FALSE); + cops_classifier(tvb, tree, object_len, offset, false); break; case PCMM_EXTENDED_CLASSIFIER: - cops_classifier(tvb, tree, object_len, offset, TRUE); + cops_classifier(tvb, tree, object_len, offset, true); break; case PCMM_IPV6_CLASSIFIER: cops_ipv6_classifier(tvb, tree, object_len, offset); @@ -6135,49 +6136,49 @@ cops_analyze_packetcable_mm_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t break; case PCMM_BEST_EFFORT_SERVICE: if (object_len == 44 || object_len == 80 || object_len == 116) - cops_best_effort_service_i04_i05(tvb, tree, object_len, offset, TRUE); + cops_best_effort_service_i04_i05(tvb, tree, object_len, offset, true); else if (object_len == 40 || object_len == 72 || object_len == 104) - cops_best_effort_service_i04_i05(tvb, tree, object_len, offset, FALSE); + cops_best_effort_service_i04_i05(tvb, tree, object_len, offset, false); else cops_best_effort_service(tvb, tree, object_len, offset); break; case PCMM_NON_REAL_TIME_POLLING_SERVICE: if (object_len == 48 || object_len == 88 || object_len == 128) - cops_non_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, TRUE); + cops_non_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, true); else if (object_len == 44 || object_len == 80 || object_len == 116) - cops_non_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, FALSE); + cops_non_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, false); else cops_non_real_time_polling_service(tvb, tree, object_len, offset); break; case PCMM_REAL_TIME_POLLING_SERVICE: if (object_len == 48 || object_len == 88 || object_len == 128) - cops_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, TRUE); + cops_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, true); else if (object_len == 44 || object_len == 80 || object_len == 116) - cops_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, FALSE); + cops_real_time_polling_service_i04_i05(tvb, tree, object_len, offset, false); else cops_real_time_polling_service(tvb, tree, object_len, offset); break; case PCMM_UNSOLICITED_GRANT_SERVICE: if (object_len == 36 || object_len == 64 || object_len == 92) - cops_unsolicited_grant_service_i04_i05(tvb, tree, object_len, offset, TRUE); + cops_unsolicited_grant_service_i04_i05(tvb, tree, object_len, offset, true); else if (object_len == 32 || object_len == 56 || object_len == 80) - cops_unsolicited_grant_service_i04_i05(tvb, tree, object_len, offset, FALSE); + cops_unsolicited_grant_service_i04_i05(tvb, tree, object_len, offset, false); else cops_unsolicited_grant_service(tvb, tree, object_len, offset); break; case PCMM_UGS_WITH_ACTIVITY_DETECTION: if (object_len == 44 || object_len == 80 || object_len == 116) - cops_ugs_with_activity_detection_i04_i05(tvb, tree, object_len, offset, TRUE); + cops_ugs_with_activity_detection_i04_i05(tvb, tree, object_len, offset, true); else if (object_len == 40 || object_len == 72 || object_len == 104) - cops_ugs_with_activity_detection_i04_i05(tvb, tree, object_len, offset, FALSE); + cops_ugs_with_activity_detection_i04_i05(tvb, tree, object_len, offset, false); else cops_ugs_with_activity_detection(tvb, tree, object_len, offset); break; case PCMM_DOWNSTREAM_SERVICE: if (object_len == 48 || object_len == 88 || object_len == 128) - cops_downstream_service_i04_i05(tvb, tree, object_len, offset, TRUE); + cops_downstream_service_i04_i05(tvb, tree, object_len, offset, true); else if (object_len == 40 || object_len == 72 || object_len == 104) - cops_downstream_service_i04_i05(tvb, tree, object_len, offset, FALSE); + cops_downstream_service_i04_i05(tvb, tree, object_len, offset, false); else cops_downstream_service(tvb, tree, object_len, offset); break; |