summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-radius_packetcable.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-radius_packetcable.c')
-rw-r--r--epan/dissectors/packet-radius_packetcable.c174
1 files changed, 85 insertions, 89 deletions
diff --git a/epan/dissectors/packet-radius_packetcable.c b/epan/dissectors/packet-radius_packetcable.c
index a7026159..76c58855 100644
--- a/epan/dissectors/packet-radius_packetcable.c
+++ b/epan/dissectors/packet-radius_packetcable.c
@@ -38,83 +38,79 @@
void proto_register_packetcable(void);
void proto_reg_handoff_packetcable(void);
-static int proto_packetcable = -1;
-
-static int hf_packetcable_em_header_version_id = -1;
-static int hf_packetcable_bcid_timestamp = -1;
-static int hf_packetcable_bcid_event_counter = -1;
-static int hf_packetcable_em_header_event_message_type = -1;
-static int hf_packetcable_em_header_element_type = -1;
-static int hf_packetcable_em_header_sequence_number = -1;
-static int hf_packetcable_em_header_status = -1;
-static int hf_packetcable_em_header_status_error_indicator = -1;
-static int hf_packetcable_em_header_status_event_origin = -1;
-static int hf_packetcable_em_header_status_event_message_proxied = -1;
-static int hf_packetcable_em_header_priority = -1;
-static int hf_packetcable_em_header_attribute_count = -1;
-static int hf_packetcable_em_header_event_object = -1;
-static int hf_packetcable_call_termination_cause_source_document = -1;
-static int hf_packetcable_call_termination_cause_code = -1;
-static int hf_packetcable_trunk_group_id_trunk_type = -1;
-static int hf_packetcable_trunk_group_id_trunk_number = -1;
-static int hf_packetcable_qos_status = -1;
-static int hf_packetcable_qos_status_indication = -1;
-static int hf_packetcable_time_adjustment = -1;
-static int hf_packetcable_redirected_from_info_number_of_redirections = -1;
-static int hf_packetcable_electronic_surveillance_indication_df_cdc_address = -1;
-static int hf_packetcable_electronic_surveillance_indication_df_ccc_address = -1;
-static int hf_packetcable_electronic_surveillance_indication_cdc_port = -1;
-static int hf_packetcable_electronic_surveillance_indication_ccc_port = -1;
-static int hf_packetcable_terminal_display_info_terminal_display_status_bitmask = -1;
-static int hf_packetcable_terminal_display_info_sbm_general_display = -1;
-static int hf_packetcable_terminal_display_info_sbm_calling_number = -1;
-static int hf_packetcable_terminal_display_info_sbm_calling_name = -1;
-static int hf_packetcable_terminal_display_info_sbm_message_waiting = -1;
-static int hf_packetcable_terminal_display_info_general_display = -1;
-static int hf_packetcable_terminal_display_info_calling_number = -1;
-static int hf_packetcable_terminal_display_info_calling_name = -1;
-static int hf_packetcable_terminal_display_info_message_waiting = -1;
-static int hf_packetcable_qos_desc_flags_sfst = -1;
-static int hf_packetcable_qos_desc_flags_gi = -1;
-static int hf_packetcable_qos_desc_flags_tgj = -1;
-static int hf_packetcable_qos_desc_flags_gpi = -1;
-static int hf_packetcable_qos_desc_flags_ugs = -1;
-static int hf_packetcable_qos_desc_flags_tp = -1;
-static int hf_packetcable_qos_desc_flags_msr = -1;
-static int hf_packetcable_qos_desc_flags_mtb = -1;
-static int hf_packetcable_qos_desc_flags_mrtr = -1;
-static int hf_packetcable_qos_desc_flags_mps = -1;
-static int hf_packetcable_qos_desc_flags_mcb = -1;
-static int hf_packetcable_qos_desc_flags_srtp = -1;
-static int hf_packetcable_qos_desc_flags_npi = -1;
-static int hf_packetcable_qos_desc_flags_tpj = -1;
-static int hf_packetcable_qos_desc_flags_toso = -1;
-static int hf_packetcable_qos_desc_flags_mdl = -1;
+static int proto_packetcable;
+
+static int hf_packetcable_em_header_version_id;
+static int hf_packetcable_bcid_timestamp;
+static int hf_packetcable_bcid_event_counter;
+static int hf_packetcable_em_header_event_message_type;
+static int hf_packetcable_em_header_element_type;
+static int hf_packetcable_em_header_sequence_number;
+static int hf_packetcable_em_header_status;
+static int hf_packetcable_em_header_status_error_indicator;
+static int hf_packetcable_em_header_status_event_origin;
+static int hf_packetcable_em_header_status_event_message_proxied;
+static int hf_packetcable_em_header_priority;
+static int hf_packetcable_em_header_attribute_count;
+static int hf_packetcable_em_header_event_object;
+static int hf_packetcable_call_termination_cause_source_document;
+static int hf_packetcable_call_termination_cause_code;
+static int hf_packetcable_trunk_group_id_trunk_type;
+static int hf_packetcable_trunk_group_id_trunk_number;
+static int hf_packetcable_qos_status;
+static int hf_packetcable_qos_status_indication;
+static int hf_packetcable_time_adjustment;
+static int hf_packetcable_redirected_from_info_number_of_redirections;
+static int hf_packetcable_electronic_surveillance_indication_df_cdc_address;
+static int hf_packetcable_electronic_surveillance_indication_df_ccc_address;
+static int hf_packetcable_electronic_surveillance_indication_cdc_port;
+static int hf_packetcable_electronic_surveillance_indication_ccc_port;
+static int hf_packetcable_terminal_display_info_terminal_display_status_bitmask;
+static int hf_packetcable_terminal_display_info_sbm_general_display;
+static int hf_packetcable_terminal_display_info_sbm_calling_number;
+static int hf_packetcable_terminal_display_info_sbm_calling_name;
+static int hf_packetcable_terminal_display_info_sbm_message_waiting;
+static int hf_packetcable_terminal_display_info_general_display;
+static int hf_packetcable_terminal_display_info_calling_number;
+static int hf_packetcable_terminal_display_info_calling_name;
+static int hf_packetcable_terminal_display_info_message_waiting;
+static int hf_packetcable_qos_desc_flags_sfst;
+static int hf_packetcable_qos_desc_flags_gi;
+static int hf_packetcable_qos_desc_flags_tgj;
+static int hf_packetcable_qos_desc_flags_gpi;
+static int hf_packetcable_qos_desc_flags_ugs;
+static int hf_packetcable_qos_desc_flags_tp;
+static int hf_packetcable_qos_desc_flags_msr;
+static int hf_packetcable_qos_desc_flags_mtb;
+static int hf_packetcable_qos_desc_flags_mrtr;
+static int hf_packetcable_qos_desc_flags_mps;
+static int hf_packetcable_qos_desc_flags_mcb;
+static int hf_packetcable_qos_desc_flags_srtp;
+static int hf_packetcable_qos_desc_flags_npi;
+static int hf_packetcable_qos_desc_flags_tpj;
+static int hf_packetcable_qos_desc_flags_toso;
+static int hf_packetcable_qos_desc_flags_mdl;
/* Generated from convert_proto_tree_add_text.pl */
-static int hf_packetcable_bcid_time_zone_offset = -1;
-static int hf_packetcable_bcid_element_id = -1;
-static int hf_packetcable_electronic_surveillance_indication_df_df_key = -1;
-static int hf_packetcable_redirected_from_original_called_party = -1;
-static int hf_packetcable_em_header_element_id = -1;
-static int hf_packetcable_redirected_from_last_redirecting_party = -1;
-static int hf_packetcable_bcid_time_zone_dst = -1;
-static int hf_packetcable_em_header_time_zone_offset = -1;
-static int hf_packetcable_qos_service_class_name = -1;
-static int hf_packetcable_em_header_event_time = -1;
-static int hf_packetcable_em_header_time_zone_dst = -1;
+static int hf_packetcable_bcid_time_zone_offset;
+static int hf_packetcable_bcid_element_id;
+static int hf_packetcable_electronic_surveillance_indication_df_df_key;
+static int hf_packetcable_redirected_from_original_called_party;
+static int hf_packetcable_em_header_element_id;
+static int hf_packetcable_redirected_from_last_redirecting_party;
+static int hf_packetcable_bcid_time_zone_dst;
+static int hf_packetcable_em_header_time_zone_offset;
+static int hf_packetcable_qos_service_class_name;
+static int hf_packetcable_em_header_event_time;
+static int hf_packetcable_em_header_time_zone_dst;
/* This is slightly ugly. */
-static int hf_packetcable_qos_desc_fields[] =
-{
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
+static int hf_packetcable_qos_desc_fields[16];
-static gint ett_radius_vendor_packetcable_bcid = -1;
-static gint ett_radius_vendor_packetcable_status = -1;
-static gint ett_radius_vendor_packetcable_qos_status = -1;
-static gint ett_packetcable_term_dsply = -1;
+static int ett_radius_vendor_packetcable_bcid;
+static int ett_radius_vendor_packetcable_status;
+static int ett_radius_vendor_packetcable_qos_status;
+static int ett_packetcable_term_dsply;
#define PACKETCABLE_QOS_STATE_INDICATION_MASK 0X0003
@@ -143,7 +139,7 @@ static gint ett_packetcable_term_dsply = -1;
#define PACKETCABLE_EMHS_RESERVED_MASK 0Xfff0
-static guint32 packetcable_qos_desc_mask[] =
+static uint32_t packetcable_qos_desc_mask[] =
{
PACKETCABLE_SERVICE_FLOW_SCHEDULING_TYPE_MASK,
PACKETCABLE_NOMINAL_GRANT_INTERVAL_MASK,
@@ -266,7 +262,7 @@ static void decode_packetcable_bcid (tvbuff_t *tvb, proto_tree *tree, int offset
proto_tree_add_item(tree, hf_packetcable_bcid_event_counter, tvb, offset + 20, 4, ENC_BIG_ENDIAN);
}
-static const gchar* dissect_packetcable_em_hdr(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_em_hdr(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
proto_item *ti;
proto_tree *obj_tree;
@@ -294,7 +290,7 @@ static const gchar* dissect_packetcable_em_hdr(proto_tree* tree, tvbuff_t* tvb,
return "";
}
-static const gchar* dissect_packetcable_call_term_cause(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_call_term_cause(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
proto_tree_add_item(tree, hf_packetcable_call_termination_cause_source_document,
tvb, 0, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_packetcable_call_termination_cause_code,
@@ -303,12 +299,12 @@ static const gchar* dissect_packetcable_call_term_cause(proto_tree* tree, tvbuff
return "";
}
-static const gchar* dissect_packetcable_rel_call_billing_correlation(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_rel_call_billing_correlation(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
decode_packetcable_bcid(tvb, tree, 0);
return "";
}
-static const gchar* dissect_packetcable_trunk_group_id(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_trunk_group_id(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
proto_tree_add_item(tree, hf_packetcable_trunk_group_id_trunk_type,
tvb, 0, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_packetcable_trunk_group_id_trunk_number,
@@ -316,10 +312,10 @@ static const gchar* dissect_packetcable_trunk_group_id(proto_tree* tree, tvbuff_
return "";
}
-static const gchar* dissect_packetcable_qos_descriptor(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
- guint32 intval;
- guint32 packetcable_qos_flags = tvb_get_ntohl(tvb, 0);
- guint packetcable_qos_off = 20;
+static const char* dissect_packetcable_qos_descriptor(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+ uint32_t intval;
+ uint32_t packetcable_qos_flags = tvb_get_ntohl(tvb, 0);
+ unsigned packetcable_qos_off = 20;
static int * const qos_flags[] = {
&hf_packetcable_qos_status_indication,
&hf_packetcable_qos_desc_flags_sfst,
@@ -357,13 +353,13 @@ static const gchar* dissect_packetcable_qos_descriptor(proto_tree* tree, tvbuff_
return "";
}
-static const gchar* dissect_packetcable_time_adjustment(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_time_adjustment(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
proto_tree_add_item(tree, hf_packetcable_time_adjustment, tvb, 0, 8, ENC_BIG_ENDIAN);
return "";
}
-static const gchar* dissect_packetcable_redirected_from_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_redirected_from_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
proto_tree_add_item(tree, hf_packetcable_redirected_from_last_redirecting_party, tvb, 0, 20, ENC_ASCII);
@@ -375,7 +371,7 @@ static const gchar* dissect_packetcable_redirected_from_info(proto_tree* tree, t
return "";
}
-static const gchar* dissect_packetcable_time_electr_surv_ind(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_time_electr_surv_ind(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
if (tvb_reported_length(tvb) == 0)
return "None";
@@ -393,7 +389,7 @@ static const gchar* dissect_packetcable_time_electr_surv_ind(proto_tree* tree, t
return "";
}
-static const gchar* dissect_packetcable_surv_df_sec(proto_tree* tree _U_, tvbuff_t* tvb _U_, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_surv_df_sec(proto_tree* tree _U_, tvbuff_t* tvb _U_, packet_info *pinfo _U_) {
return "";
}
@@ -402,10 +398,10 @@ static const gchar* dissect_packetcable_surv_df_sec(proto_tree* tree _U_, tvbuff
#define PACKETCABLE_CALLING_NAME (1 << 2)
#define PACKETCABLE_MESSAGE_WAITING (1 << 3)
-static const gchar* dissect_packetcable_term_dsply_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
+static const char* dissect_packetcable_term_dsply_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
/* XXX - this logic seems buggy because the offsets don't line up */
- guint8 bitmask = tvb_get_guint8(tvb, 2);
- guint intval = 1;
+ uint8_t bitmask = tvb_get_uint8(tvb, 2);
+ unsigned intval = 1;
static int * const flags[] = {
&hf_packetcable_terminal_display_info_sbm_general_display,
&hf_packetcable_terminal_display_info_sbm_calling_number,
@@ -797,7 +793,7 @@ void proto_register_packetcable(void) {
{ &hf_packetcable_electronic_surveillance_indication_df_df_key, { "DF-DF-Key", "packetcable_avps.esi.df_df_key", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_radius_vendor_packetcable_bcid,
&ett_radius_vendor_packetcable_status,
&ett_radius_vendor_packetcable_qos_status,