diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-04-23 16:23:57 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-04-23 16:23:57 +0000 |
commit | 8819fa284ce875978a92d2f9cbc879dd9e2db130 (patch) | |
tree | e5b3f3d021ff848c9314687255d4d3734adabb6c /epan/dissectors/packet-3g-a11.c | |
parent | 78cba09c8d8dd18fda82888341a8ef726dff1d16 (diff) |
Replace hf[] "duplicate blurbs" by NULL;
Use consistent indentation (replace 4-space tabs by spaces);
Use consistent formatting style.
svn path=/trunk/; revision=42211
Diffstat (limited to 'epan/dissectors/packet-3g-a11.c')
-rw-r--r-- | epan/dissectors/packet-3g-a11.c | 904 |
1 files changed, 455 insertions, 449 deletions
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c index 8d9ee5b608..fa5849130b 100644 --- a/epan/dissectors/packet-3g-a11.c +++ b/epan/dissectors/packet-3g-a11.c @@ -448,15 +448,15 @@ static const value_string a11_rohc_profile_vals[] = Last Byte: [F] [Digit N] */ static void -decode_sse(proto_tree* ext_tree, tvbuff_t* tvb, int offset, guint ext_len) +decode_sse(proto_tree *ext_tree, tvbuff_t *tvb, int offset, guint ext_len) { - guint8 msid_len; - guint8 msid_start_offset; - guint8 msid_num_digits; - guint8 msid_index; - char *msid_digits; - const char* p_msid; - gboolean odd_even_ind; + guint8 msid_len; + guint8 msid_start_offset; + guint8 msid_num_digits; + guint8 msid_index; + char *msid_digits; + const char *p_msid; + gboolean odd_even_ind; /* Decode Protocol Type */ if (ext_len < 2) @@ -539,10 +539,10 @@ decode_sse(proto_tree* ext_tree, tvbuff_t* tvb, int offset, guint ext_len) msid_digits = ep_alloc(A11_MSG_MSID_LEN_MAX+2); msid_start_offset = offset; - if(msid_len > A11_MSG_MSID_ELEM_LEN_MAX) + if (msid_len > A11_MSG_MSID_ELEM_LEN_MAX) { p_msid = "MSID is too long"; - }else if(msid_len == 0) + }else if (msid_len == 0) { p_msid = "MSID is too short"; }else @@ -560,7 +560,7 @@ decode_sse(proto_tree* ext_tree, tvbuff_t* tvb, int offset, guint ext_len) odd_even_ind = (msid_digits[0] == '1'); - if(odd_even_ind) + if (odd_even_ind) { msid_num_digits = ((msid_len-1) * 2) + 1; }else @@ -589,7 +589,7 @@ dissect_a11_radius( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *t /* None of this really matters if we don't have a tree */ if (!tree) - return; + return; /* return if length of extension is not valid */ if (tvb_reported_length_remaining(tvb, offset) < 12) { @@ -600,39 +600,40 @@ dissect_a11_radius( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *t radius_tree = proto_item_add_subtree(ti, ett_a11_radiuses); - dissect_attribute_value_pairs(radius_tree, pinfo, tvb, offset, app_len-2); + dissect_attribute_value_pairs(radius_tree, pinfo, tvb, offset, app_len-2); } /* X.S0011-005-D v2.0 Service Option Profile */ -static const gchar *dissect_3gpp2_service_option_profile(proto_tree * tree, tvbuff_t * tvb, packet_info* pinfo _U_) +static const gchar * +dissect_3gpp2_service_option_profile(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_) { - int offset = 0; - guint8 sub_type, sub_type_length; - - /* Maximum service connections/Link Flows total 32 bit*/ - proto_tree_add_item(tree, hf_a11_serv_opt_prof_max_serv, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; - - while (tvb_length_remaining(tvb,offset)>0){ - sub_type_length = tvb_get_guint8(tvb,offset+1); - - sub_type = tvb_get_guint8(tvb,offset); - proto_tree_add_item(tree, hf_a11_sub_type, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - proto_tree_add_item(tree, hf_a11_sub_type_length, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - if(sub_type==1){ - proto_tree_add_item(tree, hf_a11_serv_opt, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - /* Max number of service instances of Service Option n */ - proto_tree_add_item(tree, hf_a11_max_num_serv_opt, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - } - - offset = offset+sub_type_length-2; - } + int offset = 0; + guint8 sub_type, sub_type_length; + + /* Maximum service connections/Link Flows total 32 bit*/ + proto_tree_add_item(tree, hf_a11_serv_opt_prof_max_serv, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + while (tvb_length_remaining(tvb,offset)>0){ + sub_type_length = tvb_get_guint8(tvb,offset+1); + + sub_type = tvb_get_guint8(tvb,offset); + proto_tree_add_item(tree, hf_a11_sub_type, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + proto_tree_add_item(tree, hf_a11_sub_type_length, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + if (sub_type==1){ + proto_tree_add_item(tree, hf_a11_serv_opt, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + /* Max number of service instances of Service Option n */ + proto_tree_add_item(tree, hf_a11_max_num_serv_opt, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + } + + offset = offset+sub_type_length-2; + } return ""; @@ -646,186 +647,188 @@ static const value_string a11_aut_flow_prof_subtype_vals[] = { }; /* X.S0011-005-D v2.0 Authorized Flow Profile IDs for the User */ -static const gchar *dissect_3gpp2_radius_aut_flow_profile_ids(proto_tree * tree, tvbuff_t * tvb, packet_info* pinfo _U_) +static const gchar * +dissect_3gpp2_radius_aut_flow_profile_ids(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_) { - proto_tree* sub_tree; - int offset = 0; - proto_item *item; - guint8 sub_type, sub_type_length; - guint32 value; - - while (tvb_length_remaining(tvb,offset)>0){ - sub_type = tvb_get_guint8(tvb,offset); - sub_type_length = tvb_get_guint8(tvb,offset+1); - /* value is 2 octets */ - value = tvb_get_ntohs(tvb,offset+2); - item = proto_tree_add_text(tree, tvb, offset, sub_type_length, "%s = %u", - val_to_str(sub_type, a11_aut_flow_prof_subtype_vals, "Unknown"), value); - sub_tree = proto_item_add_subtree(item, ett_a11_aut_flow_profile_ids); - - proto_tree_add_item(sub_tree, hf_a11_aut_flow_prof_sub_type, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - proto_tree_add_item(sub_tree, hf_a11_aut_flow_prof_sub_type_len, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - proto_tree_add_item(sub_tree, hf_a11_aut_flow_prof_sub_type_value, tvb, offset, 2, ENC_BIG_ENDIAN); - - offset = offset+sub_type_length-2; - } + proto_tree *sub_tree; + int offset = 0; + proto_item *item; + guint8 sub_type, sub_type_length; + guint32 value; + + while (tvb_length_remaining(tvb,offset)>0){ + sub_type = tvb_get_guint8(tvb,offset); + sub_type_length = tvb_get_guint8(tvb,offset+1); + /* value is 2 octets */ + value = tvb_get_ntohs(tvb,offset+2); + item = proto_tree_add_text(tree, tvb, offset, sub_type_length, "%s = %u", + val_to_str(sub_type, a11_aut_flow_prof_subtype_vals, "Unknown"), value); + sub_tree = proto_item_add_subtree(item, ett_a11_aut_flow_profile_ids); + + proto_tree_add_item(sub_tree, hf_a11_aut_flow_prof_sub_type, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + proto_tree_add_item(sub_tree, hf_a11_aut_flow_prof_sub_type_len, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + proto_tree_add_item(sub_tree, hf_a11_aut_flow_prof_sub_type_value, tvb, offset, 2, ENC_BIG_ENDIAN); + + offset = offset+sub_type_length-2; + } return ""; } /* Code to dissect Additional Session Info */ -static void dissect_ase(tvbuff_t* tvb, int offset, guint ase_len, proto_tree* ext_tree) +static void +dissect_ase(tvbuff_t *tvb, int offset, guint ase_len, proto_tree *ext_tree) { - guint clen = 0; /* consumed length */ + guint clen = 0; /* consumed length */ - while(clen < ase_len) - { - proto_tree* exts_tree; - guint8 srid = tvb_get_guint8(tvb, offset+1); - guint16 service_option =tvb_get_ntohs(tvb,offset+2); - proto_item *ti; - guint8 entry_lenght; - int entry_start_offset; - - /* Entry Length */ - entry_start_offset = offset; - entry_lenght = tvb_get_guint8(tvb, offset); + while (clen < ase_len) + { + proto_tree *exts_tree; + guint8 srid = tvb_get_guint8(tvb, offset+1); + guint16 service_option = tvb_get_ntohs(tvb, offset+2); + proto_item *ti; + guint8 entry_lenght; + int entry_start_offset; - if(registration_request_msg && (service_option==64 || service_option==67)){ - if(service_option == 67){ - ti = proto_tree_add_text(ext_tree, tvb, offset, entry_lenght+1, "GRE Key Entry (SRID: %d)", srid); - } else if(service_option== 64){ - ti = proto_tree_add_text(ext_tree, tvb, offset, entry_lenght+1, "GRE Key Entry (SRID: %d)", srid); - } else { - proto_tree_add_text(ext_tree, tvb, offset, entry_lenght+1, "Unknown service option %u (SRID: %d)", service_option, srid); - clen+=entry_lenght+1; - continue; - } - }else{ - ti = proto_tree_add_text(ext_tree, tvb, offset, entry_lenght, "GRE Key Entry (SRID: %d)", srid); - } + /* Entry Length */ + entry_start_offset = offset; + entry_lenght = tvb_get_guint8(tvb, offset); + + if (registration_request_msg && (service_option==64 || service_option==67)){ + if (service_option == 67){ + ti = proto_tree_add_text(ext_tree, tvb, offset, entry_lenght+1, "GRE Key Entry (SRID: %d)", srid); + } else if (service_option== 64){ + ti = proto_tree_add_text(ext_tree, tvb, offset, entry_lenght+1, "GRE Key Entry (SRID: %d)", srid); + } else { + proto_tree_add_text(ext_tree, tvb, offset, entry_lenght+1, "Unknown service option %u (SRID: %d)", service_option, srid); + clen+=entry_lenght+1; + continue; + } + }else{ + ti = proto_tree_add_text(ext_tree, tvb, offset, entry_lenght, "GRE Key Entry (SRID: %d)", srid); + } - exts_tree = proto_item_add_subtree(ti, ett_a11_ase); + exts_tree = proto_item_add_subtree(ti, ett_a11_ase); - proto_tree_add_item(exts_tree, hf_a11_ase_len_type, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; + proto_tree_add_item(exts_tree, hf_a11_ase_len_type, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; - /* SRID */ - proto_tree_add_item(exts_tree, hf_a11_ase_srid_type, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; + /* SRID */ + proto_tree_add_item(exts_tree, hf_a11_ase_srid_type, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; - /* Service Option */ - proto_tree_add_item(exts_tree, hf_a11_ase_servopt_type, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; + /* Service Option */ + proto_tree_add_item(exts_tree, hf_a11_ase_servopt_type, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; - /* GRE Protocol Type*/ - proto_tree_add_item(exts_tree, hf_a11_ase_gre_proto_type, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; + /* GRE Protocol Type*/ + proto_tree_add_item(exts_tree, hf_a11_ase_gre_proto_type, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; - /* GRE Key */ - proto_tree_add_item(exts_tree, hf_a11_ase_gre_key, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + /* GRE Key */ + proto_tree_add_item(exts_tree, hf_a11_ase_gre_key, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; - /* PCF IP Address */ - proto_tree_add_item(exts_tree, hf_a11_ase_pcf_addr_key, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + /* PCF IP Address */ + proto_tree_add_item(exts_tree, hf_a11_ase_pcf_addr_key, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; - if(registration_request_msg){ - if(service_option == 0x0043){ - proto_item* tl; - proto_tree* extv_tree; - guint8 profile_count=tvb_get_guint8(tvb, offset+6); - guint8 profile_index=0; - guint8 reverse_profile_count; + if (registration_request_msg){ + if (service_option == 0x0043){ + proto_item *tl; + proto_tree *extv_tree; + guint8 profile_count=tvb_get_guint8(tvb, offset+6); + guint8 profile_index=0; + guint8 reverse_profile_count; - proto_item* tj = proto_tree_add_text(exts_tree, tvb, offset,6+(profile_count*2)+1, "Forward ROHC Info"); + proto_item *tj = proto_tree_add_text(exts_tree, tvb, offset,6+(profile_count*2)+1, "Forward ROHC Info"); - proto_tree* extt_tree = proto_item_add_subtree(tj, ett_a11_forward_rohc); + proto_tree *extt_tree = proto_item_add_subtree(tj, ett_a11_forward_rohc); - proto_tree_add_item(extt_tree, hf_a11_ase_forward_rohc_info_len, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; + proto_tree_add_item(extt_tree, hf_a11_ase_forward_rohc_info_len, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; - proto_tree_add_item(extt_tree, hf_a11_ase_forward_maxcid, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; - proto_tree_add_item(extt_tree, hf_a11_ase_forward_mrru, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; - proto_tree_add_item(extt_tree, hf_a11_ase_forward_large_cids, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; - profile_count=tvb_get_guint8(tvb, offset); + proto_tree_add_item(extt_tree, hf_a11_ase_forward_maxcid, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + proto_tree_add_item(extt_tree, hf_a11_ase_forward_mrru, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + proto_tree_add_item(extt_tree, hf_a11_ase_forward_large_cids, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + profile_count=tvb_get_guint8(tvb, offset); - proto_tree_add_item(extt_tree, hf_a11_ase_forward_profile_count, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; + proto_tree_add_item(extt_tree, hf_a11_ase_forward_profile_count, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; - for(profile_index=0; profile_index<profile_count; profile_index++){ - proto_item* tk = proto_tree_add_text (extt_tree, tvb, offset, (2*profile_count), "Forward Profile : %d", profile_index); - proto_tree* extu_tree = proto_item_add_subtree(tk, ett_a11_forward_profile); - proto_tree_add_item(extu_tree, hf_a11_ase_forward_profile, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; - }/*for*/ + for(profile_index=0; profile_index<profile_count; profile_index++){ + proto_item *tk = proto_tree_add_text (extt_tree, tvb, offset, (2*profile_count), "Forward Profile : %d", profile_index); + proto_tree *extu_tree = proto_item_add_subtree(tk, ett_a11_forward_profile); + proto_tree_add_item(extu_tree, hf_a11_ase_forward_profile, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + }/*for*/ - reverse_profile_count=tvb_get_guint8(tvb, offset+6); + reverse_profile_count=tvb_get_guint8(tvb, offset+6); - tl = proto_tree_add_text(exts_tree, tvb, offset,6+(reverse_profile_count*2)+1, "Reverse ROHC Info"); + tl = proto_tree_add_text(exts_tree, tvb, offset,6+(reverse_profile_count*2)+1, "Reverse ROHC Info"); - extv_tree = proto_item_add_subtree(tl, ett_a11_reverse_rohc); + extv_tree = proto_item_add_subtree(tl, ett_a11_reverse_rohc); - proto_tree_add_item(extv_tree, hf_a11_ase_reverse_rohc_info_len, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; + proto_tree_add_item(extv_tree, hf_a11_ase_reverse_rohc_info_len, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; - proto_tree_add_item(extv_tree, hf_a11_ase_reverse_maxcid, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; - proto_tree_add_item(extv_tree, hf_a11_ase_reverse_mrru, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; - proto_tree_add_item(extv_tree, hf_a11_ase_reverse_large_cids, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; + proto_tree_add_item(extv_tree, hf_a11_ase_reverse_maxcid, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + proto_tree_add_item(extv_tree, hf_a11_ase_reverse_mrru, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + proto_tree_add_item(extv_tree, hf_a11_ase_reverse_large_cids, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; - profile_count=tvb_get_guint8(tvb, offset); + profile_count=tvb_get_guint8(tvb, offset); - proto_tree_add_item(extv_tree, hf_a11_ase_reverse_profile_count, tvb, offset, 1, ENC_BIG_ENDIAN); - offset++; + proto_tree_add_item(extv_tree, hf_a11_ase_reverse_profile_count, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; - for(profile_index=0; profile_index<reverse_profile_count; profile_index++){ - proto_item* tm = proto_tree_add_text(extv_tree, tvb, offset, (2*profile_count), "Reverse Profile : %d", profile_index); + for(profile_index=0; profile_index<reverse_profile_count; profile_index++){ + proto_item *tm = proto_tree_add_text(extv_tree, tvb, offset, (2*profile_count), "Reverse Profile : %d", profile_index); - proto_tree* extw_tree = proto_item_add_subtree(tm, ett_a11_reverse_profile); + proto_tree *extw_tree = proto_item_add_subtree(tm, ett_a11_reverse_profile); - proto_tree_add_item(extw_tree, hf_a11_ase_reverse_profile, tvb, offset, 2, ENC_BIG_ENDIAN); - offset+=2; + proto_tree_add_item(extw_tree, hf_a11_ase_reverse_profile, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; - }/*for*/ - }/* Service option */ + }/*for*/ + }/* Service option */ - }/* if */ - clen+=entry_lenght+1; - /* Set offset = start of next entry in case of padding */ - offset = entry_start_offset + entry_lenght+1; + }/* if */ + clen+=entry_lenght+1; + /* Set offset = start of next entry in case of padding */ + offset = entry_start_offset + entry_lenght+1; - }/*while*/ + } /* while */ - registration_request_msg =0; + registration_request_msg =0; } #define A11_FQI_IPFLOW_DISC_ENABLED 0x80 #define A11_FQI_DSCP_INCLUDED 0x40 -static void dissect_fwd_qosinfo_flags - (tvbuff_t* tvb, int offset, proto_tree* ext_tree, guint8* p_dscp_included) +static void +dissect_fwd_qosinfo_flags(tvbuff_t *tvb, int offset, proto_tree *ext_tree, guint8 *p_dscp_included) { guint8 flags = tvb_get_guint8(tvb, offset); guint8 nbits = sizeof(flags) * 8; - proto_item* ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(flags), + proto_item *ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(flags), "Flags: %#02x", flags); - proto_tree* flags_tree = proto_item_add_subtree(ti, ett_a11_fqi_flags); + proto_tree *flags_tree = proto_item_add_subtree(ti, ett_a11_fqi_flags); proto_tree_add_text(flags_tree, tvb, offset, sizeof(flags), "%s", decode_boolean_bitfield(flags, A11_FQI_IPFLOW_DISC_ENABLED, nbits, @@ -834,7 +837,7 @@ static void dissect_fwd_qosinfo_flags proto_tree_add_text(flags_tree, tvb, offset, sizeof(flags), "%s", decode_boolean_bitfield(flags, A11_FQI_DSCP_INCLUDED, nbits, "DSCP Included", "DSCP Not Included")); - if(flags & A11_FQI_DSCP_INCLUDED) + if (flags & A11_FQI_DSCP_INCLUDED) { *p_dscp_included = 1; }else @@ -847,18 +850,18 @@ static void dissect_fwd_qosinfo_flags #define A11_FQI_DSCP 0x7E #define A11_FQI_FLOW_STATE 0x01 -static void dissect_fqi_entry_flags - (tvbuff_t* tvb, int offset, proto_tree* ext_tree, guint8 dscp_enabled) +static void +dissect_fqi_entry_flags(tvbuff_t *tvb, int offset, proto_tree *ext_tree, guint8 dscp_enabled) { - guint8 dscp = tvb_get_guint8(tvb, offset); + guint8 dscp = tvb_get_guint8(tvb, offset); guint8 nbits = sizeof(dscp) * 8; - proto_item* ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(dscp), + proto_item *ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(dscp), "DSCP and Flow State: %#02x", dscp); - proto_tree* flags_tree = proto_item_add_subtree(ti, ett_a11_fqi_entry_flags); + proto_tree *flags_tree = proto_item_add_subtree(ti, ett_a11_fqi_entry_flags); - if(dscp_enabled) + if (dscp_enabled) { proto_tree_add_text(flags_tree, tvb, offset, sizeof(dscp), "%s", decode_numeric_bitfield(dscp, A11_FQI_DSCP, nbits, @@ -873,16 +876,16 @@ static void dissect_fqi_entry_flags #define A11_RQI_FLOW_STATE 0x01 -static void dissect_rqi_entry_flags - (tvbuff_t* tvb, int offset, proto_tree* ext_tree) +static void +dissect_rqi_entry_flags(tvbuff_t *tvb, int offset, proto_tree *ext_tree) { guint8 flags = tvb_get_guint8(tvb, offset); guint8 nbits = sizeof(flags) * 8; - proto_item* ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(flags), + proto_item *ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(flags), "Flags: %#02x", flags); - proto_tree* flags_tree = proto_item_add_subtree(ti, ett_a11_rqi_entry_flags); + proto_tree *flags_tree = proto_item_add_subtree(ti, ett_a11_rqi_entry_flags); proto_tree_add_text(flags_tree, tvb, offset, sizeof(flags), "%s", decode_boolean_bitfield(flags, A11_RQI_FLOW_STATE, nbits, @@ -890,9 +893,10 @@ static void dissect_rqi_entry_flags } /* Code to dissect Forward QoS Info */ -static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) +static void +dissect_fwd_qosinfo(tvbuff_t *tvb, int offset, proto_tree *ext_tree) { - int clen = 0; /* consumed length */ + int clen = 0; /* consumed length */ guint8 flow_count; guint8 flow_index; guint8 dscp_enabled = 0; @@ -919,10 +923,10 @@ static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) guint8 entry_len = tvb_get_guint8(tvb, offset+clen); guint8 flow_id = tvb_get_guint8(tvb, offset+clen+1); - proto_item* ti = proto_tree_add_text + proto_item *ti = proto_tree_add_text (ext_tree, tvb, offset+clen, entry_len+1, "Forward Flow Entry (Flow Id: %d)", flow_id); - proto_tree* exts_tree = proto_item_add_subtree(ti, ett_a11_fqi_flowentry); + proto_tree *exts_tree = proto_item_add_subtree(ti, ett_a11_fqi_flowentry); /* Entry Length */ proto_tree_add_item(exts_tree, hf_a11_fqi_entrylen, tvb, offset+clen, 1, ENC_BIG_ENDIAN); @@ -943,13 +947,13 @@ static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) clen++; /* Requested QoS Blob */ - if(requested_qos_len) + if (requested_qos_len) { - proto_item* ti2; - proto_tree* exts_tree2; + proto_item *ti2; + proto_tree *exts_tree2; - proto_item* ti1 = proto_tree_add_text(ext_tree, tvb, offset+clen,requested_qos_len, "Forward Requested QoS "); - proto_tree* exts_tree1 = proto_item_add_subtree(ti1, ett_a11_fqi_requestedqos); + proto_item *ti1 = proto_tree_add_text(ext_tree, tvb, offset+clen,requested_qos_len, "Forward Requested QoS "); + proto_tree *exts_tree1 = proto_item_add_subtree(ti1, ett_a11_fqi_requestedqos); proto_tree_add_text(exts_tree1, tvb, offset+clen, requested_qos_len, "Forward Requested QoS Sub Blob"); @@ -986,10 +990,10 @@ static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) clen++; /* Granted QoS Blob */ - if(granted_qos_len) + if (granted_qos_len) { - proto_item* ti3; - proto_tree* exts_tree3; + proto_item *ti3; + proto_tree *exts_tree3; ti3 = proto_tree_add_text(ext_tree, tvb, offset+clen, granted_qos_len, "Forward Granted QoS "); @@ -1005,9 +1009,10 @@ static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) } /* Code to dissect Reverse QoS Info */ -static void dissect_rev_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) +static void +dissect_rev_qosinfo(tvbuff_t *tvb, int offset, proto_tree *ext_tree) { - int clen = 0; /* consumed length */ + int clen = 0; /* consumed length */ guint8 flow_count; guint8 flow_index; @@ -1029,10 +1034,10 @@ static void dissect_rev_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) guint8 entry_len = tvb_get_guint8(tvb, offset+clen); guint8 flow_id = tvb_get_guint8(tvb, offset+clen+1); - proto_item* ti = proto_tree_add_text + proto_item *ti = proto_tree_add_text (ext_tree, tvb, offset+clen, entry_len+1, "Reverse Flow Entry (Flow Id: %d)", flow_id); - proto_tree* exts_tree = proto_item_add_subtree(ti, ett_a11_rqi_flowentry); + proto_tree *exts_tree = proto_item_add_subtree(ti, ett_a11_rqi_flowentry); /* Entry Length */ proto_tree_add_item(exts_tree, hf_a11_rqi_entrylen, tvb, offset+clen, 1, ENC_BIG_ENDIAN); @@ -1052,12 +1057,12 @@ static void dissect_rev_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) clen++; /* Requested QoS Blob */ - if(requested_qos_len) + if (requested_qos_len) { proto_item *ti1, *ti2; proto_tree *exts_tree1, *exts_tree2; - ti1 = proto_tree_add_text(ext_tree, tvb, offset+clen,requested_qos_len , "Reverse Requested QoS "); + ti1 = proto_tree_add_text(ext_tree, tvb, offset+clen,requested_qos_len , "Reverse Requested QoS "); exts_tree1 = proto_item_add_subtree(ti1, ett_a11_rqi_requestedqos); @@ -1095,10 +1100,10 @@ static void dissect_rev_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) clen++; /* Granted QoS Blob */ - if(granted_qos_len) + if (granted_qos_len) { - proto_item* ti3; - proto_tree* exts_tree3; + proto_item *ti3; + proto_tree *exts_tree3; ti3 = proto_tree_add_text(ext_tree, tvb, offset+clen,granted_qos_len , "Reverse Granted QoS "); exts_tree3 = proto_item_add_subtree(ti3, ett_a11_rqi_grantedqos); @@ -1114,13 +1119,14 @@ static void dissect_rev_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree) /* Code to dissect Subscriber QoS Profile */ -static void dissect_subscriber_qos_profile(tvbuff_t* tvb, packet_info *pinfo, int offset, int ext_len, proto_tree* ext_tree) +static void +dissect_subscriber_qos_profile(tvbuff_t *tvb, packet_info *pinfo, int offset, int ext_len, proto_tree *ext_tree) { - proto_tree* exts_tree; + proto_tree *exts_tree; int qos_profile_len = ext_len; - proto_item* ti = + proto_item *ti = proto_tree_add_text (ext_tree, tvb, offset, 0, "Subscriber Qos Profile (%d bytes)", qos_profile_len); @@ -1128,20 +1134,21 @@ static void dissect_subscriber_qos_profile(tvbuff_t* tvb, packet_info *pinfo, in exts_tree = proto_item_add_subtree(ti, ett_a11_subscriber_profile); /* Subscriber QoS profile */ - if(qos_profile_len) + if (qos_profile_len) { proto_tree_add_item (exts_tree, hf_a11_subsciber_profile, tvb, offset, qos_profile_len, ENC_NA); - dissect_attribute_value_pairs(exts_tree, pinfo, tvb, offset, qos_profile_len); + dissect_attribute_value_pairs(exts_tree, pinfo, tvb, offset, qos_profile_len); } } /* Code to dissect Forward QoS Update Info */ -static void dissect_fwd_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ext_tree) +static void +dissect_fwd_qosupdate_info(tvbuff_t *tvb, int offset, proto_tree *ext_tree) { - int clen = 0; /* consumed length */ + int clen = 0; /* consumed length */ guint8 flow_count; guint8 flow_index; @@ -1152,12 +1159,12 @@ static void dissect_fwd_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex for(flow_index=0; flow_index<flow_count; flow_index++) { - proto_tree* exts_tree; + proto_tree *exts_tree; guint8 granted_qos_len; guint8 flow_id = tvb_get_guint8(tvb, offset+clen); - proto_item* ti = proto_tree_add_text + proto_item *ti = proto_tree_add_text (ext_tree, tvb, offset+clen, 1, "Forward Flow Entry (Flow Id: %d)", flow_id); clen++; @@ -1170,7 +1177,7 @@ static void dissect_fwd_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex clen++; /* Forward QoS Sub Blob */ - if(granted_qos_len) + if (granted_qos_len) { proto_tree_add_item (exts_tree, hf_a11_fqui_updated_qos, tvb, offset+clen, @@ -1182,9 +1189,10 @@ static void dissect_fwd_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex /* Code to dissect Reverse QoS Update Info */ -static void dissect_rev_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ext_tree) +static void +dissect_rev_qosupdate_info(tvbuff_t *tvb, int offset, proto_tree *ext_tree) { - int clen = 0; /* consumed length */ + int clen = 0; /* consumed length */ guint8 flow_count; guint8 flow_index; @@ -1195,12 +1203,12 @@ static void dissect_rev_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex for(flow_index=0; flow_index<flow_count; flow_index++) { - proto_tree* exts_tree; - guint8 granted_qos_len; + proto_tree *exts_tree; + guint8 granted_qos_len; - guint8 flow_id = tvb_get_guint8(tvb, offset+clen); + guint8 flow_id = tvb_get_guint8(tvb, offset+clen); - proto_item* ti = proto_tree_add_text + proto_item *ti = proto_tree_add_text (ext_tree, tvb, offset+clen, 1, "Reverse Flow Entry (Flow Id: %d)", flow_id); clen++; exts_tree = proto_item_add_subtree(ti, ett_a11_rqui_flowentry); @@ -1212,7 +1220,7 @@ static void dissect_rev_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex clen++; /* Reverse QoS Sub Blob */ - if(granted_qos_len) + if (granted_qos_len) { proto_tree_add_item (exts_tree, hf_a11_rqui_updated_qos, tvb, offset+clen, @@ -1226,18 +1234,15 @@ static void dissect_rev_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex static void dissect_a11_extensions( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree) { - proto_item *ti; - proto_tree *exts_tree; - proto_tree *ext_tree; - guint ext_len; - guint8 ext_type; - guint8 ext_subtype = 0; - guint hdrLen; - - gint16 apptype = -1; + proto_item *ti; + proto_tree *exts_tree; + proto_tree *ext_tree; + guint ext_len; + guint8 ext_type; + guint8 ext_subtype = 0; + guint hdrLen; - /* None of this really matters if we don't have a tree */ - if (!tree) return; + gint16 apptype = -1; /* Add our tree, if we have extensions */ ti = proto_tree_add_text(tree, tvb, offset, -1, "Extensions"); @@ -1255,14 +1260,14 @@ dissect_a11_extensions( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tre */ ext_subtype = tvb_get_guint8(tvb, offset + 1); ext_len = tvb_get_ntohs(tvb, offset + 2); - hdrLen = 4; + hdrLen = 4; } else if ((ext_type == CVSE_EXT) || (ext_type == OLD_CVSE_EXT)) { ext_len = tvb_get_ntohs(tvb, offset + 2); ext_subtype = tvb_get_guint8(tvb, offset + 8); hdrLen = 4; } else { ext_len = tvb_get_guint8(tvb, offset + 1); - hdrLen = 2; + hdrLen = 2; } ti = proto_tree_add_text(exts_tree, tvb, offset, ext_len + hdrLen, @@ -1278,7 +1283,7 @@ dissect_a11_extensions( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tre proto_tree_add_uint(ext_tree, hf_a11_ext_len, tvb, offset, 1, ext_len); offset++; } - else if((ext_type == CVSE_EXT) || (ext_type == OLD_CVSE_EXT)) { + else if ((ext_type == CVSE_EXT) || (ext_type == OLD_CVSE_EXT)) { offset++; proto_tree_add_uint(ext_tree, hf_a11_ext_len, tvb, offset, 2, ext_len); offset+=2; @@ -1304,7 +1309,7 @@ dissect_a11_extensions( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tre if (ext_len < 4) break; proto_tree_add_item(ext_tree, hf_a11_aext_spi, tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; + offset += 4; ext_len -= 4; if (ext_len == 0) break; @@ -1335,7 +1340,7 @@ dissect_a11_extensions( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tre if (ext_len < 4) break; proto_tree_add_item(ext_tree, hf_a11_aext_spi, tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; + offset += 4; ext_len -= 4; /* Key */ if (ext_len == 0) @@ -1349,15 +1354,15 @@ dissect_a11_extensions( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tre if (ext_len < 4) break; proto_tree_add_item(ext_tree, hf_a11_vse_vid, tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; + offset += 4; ext_len -= 4; if (ext_len < 2) break; apptype = tvb_get_ntohs(tvb, offset); proto_tree_add_uint(ext_tree, hf_a11_vse_apptype, tvb, offset, 2, apptype); - offset += 2; + offset += 2; ext_len -= 2; - if(apptype == 0x0101) { + if (apptype == 0x0101) { if (tvb_reported_length_remaining(tvb, offset) > 0) { dissect_a11_radius(tvb, pinfo, offset, ext_tree, ext_len + 2); } @@ -1368,21 +1373,21 @@ dissect_a11_extensions( tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tre if (ext_len < 6) break; proto_tree_add_item(ext_tree, hf_a11_vse_vid, tvb, offset+2, 4, ENC_BIG_ENDIAN); - offset += 6; + offset += 6; ext_len -= 6; proto_tree_add_item(ext_tree, hf_a11_vse_apptype, tvb, offset, 2, ENC_BIG_ENDIAN); if (ext_len < 2) break; apptype = tvb_get_ntohs(tvb, offset); - offset += 2; + offset += 2; ext_len -= 2; switch(apptype) { case 0x0401: if (ext_len < 5) break; proto_tree_add_item(ext_tree, hf_a11_vse_panid, tvb, offset, 5, ENC_NA); - offset += 5; + offset += 5; ext_len -= 5; if (ext_len < 5) break; @@ -1457,13 +1462,13 @@ static int dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* Set up structures we will need to add the protocol subtree and manage it */ - proto_item *ti; - proto_tree *a11_tree = NULL; - proto_item *tf; - proto_tree *flags_tree; - guint8 type; - guint8 flags; - guint offset=0; + proto_item *ti; + proto_tree *a11_tree = NULL; + proto_item *tf; + proto_tree *flags_tree; + guint8 type; + guint8 flags; + guint offset = 0; if (!tvb_bytes_exist(tvb, offset, 1)) return 0; /* not enough data to check message type */ @@ -1477,17 +1482,17 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "3GPP2 A11"); col_clear(pinfo->cinfo, COL_INFO); - if(type == REGISTRATION_REQUEST) - registration_request_msg =1; + if (type == REGISTRATION_REQUEST) + registration_request_msg =1; else - registration_request_msg =0; + registration_request_msg =0; - switch (type) { - case REGISTRATION_REQUEST: + switch (type) { + case REGISTRATION_REQUEST: - registration_request_msg =1; - col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Request: PDSN=%s PCF=%s", + registration_request_msg = 1; + col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Request: PDSN=%s PCF=%s", tvb_ip_to_str(tvb, 8), tvb_ip_to_str(tvb, 12)); @@ -1781,22 +1786,22 @@ proto_register_a11(void) { &hf_a11_type, { "Message Type", "a11.type", FT_UINT8, BASE_DEC, VALS(a11_types), 0, - "A11 Message type.", HFILL } + "A11 Message Type", HFILL } }, { &hf_a11_flags, - {"Flags", "a11.flags", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL} + { "Flags", "a11.flags", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL} }, { &hf_a11_s, - {"Simultaneous Bindings", "a11.s", - FT_BOOLEAN, 8, NULL, 128, - "Simultaneous Bindings Allowed", HFILL } + { "Simultaneous Bindings", "a11.s", + FT_BOOLEAN, 8, NULL, 128, + "Simultaneous Bindings Allowed", HFILL } }, { &hf_a11_b, - {"Broadcast Datagrams", "a11.b", - FT_BOOLEAN, 8, NULL, 64, - "Broadcast Datagrams requested", HFILL } + { "Broadcast Datagrams", "a11.b", + FT_BOOLEAN, 8, NULL, 64, + "Broadcast Datagrams requested", HFILL } }, { &hf_a11_d, { "Co-located Care-of Address", "a11.d", @@ -1804,14 +1809,14 @@ proto_register_a11(void) "MN using Co-located Care-of address", HFILL } }, { &hf_a11_m, - {"Minimal Encapsulation", "a11.m", - FT_BOOLEAN, 8, NULL, 16, - "MN wants Minimal encapsulation", HFILL } + { "Minimal Encapsulation", "a11.m", + FT_BOOLEAN, 8, NULL, 16, + "MN wants Minimal encapsulation", HFILL } }, { &hf_a11_g, - {"GRE", "a11.g", - FT_BOOLEAN, 8, NULL, 8, - "MN wants GRE encapsulation", HFILL } + { "GRE", "a11.g", + FT_BOOLEAN, 8, NULL, 8, + "MN wants GRE encapsulation", HFILL } }, { &hf_a11_v, { "Van Jacobson", "a11.v", @@ -1826,53 +1831,53 @@ proto_register_a11(void) { &hf_a11_code, { "Reply Code", "a11.code", FT_UINT8, BASE_DEC, VALS(a11_reply_codes), 0, - "A11 Registration Reply code.", HFILL } + "A11 Registration Reply code", HFILL } }, { &hf_a11_status, { "Reply Status", "a11.ackstat", FT_UINT8, BASE_DEC, VALS(a11_ack_status), 0, - "A11 Registration Ack Status.", HFILL } + "A11 Registration Ack Status", HFILL } }, { &hf_a11_life, { "Lifetime", "a11.life", FT_UINT16, BASE_DEC, NULL, 0, - "A11 Registration Lifetime.", HFILL } + "A11 Registration Lifetime", HFILL } }, { &hf_a11_homeaddr, { "Home Address", "a11.homeaddr", FT_IPv4, BASE_NONE, NULL, 0, - "Mobile Node's home address.", HFILL } + "Mobile Node's home address", HFILL } }, { &hf_a11_haaddr, { "Home Agent", "a11.haaddr", FT_IPv4, BASE_NONE, NULL, 0, - "Home agent IP Address.", HFILL } + "Home agent IP Address", HFILL } }, { &hf_a11_coa, { "Care of Address", "a11.coa", FT_IPv4, BASE_NONE, NULL, 0, - "Care of Address.", HFILL } + NULL, HFILL } }, { &hf_a11_ident, { "Identification", "a11.ident", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, - "MN Identification.", HFILL } + "MN Identification", HFILL } }, { &hf_a11_ext_type, { "Extension Type", "a11.ext.type", FT_UINT8, BASE_DEC, VALS(a11_ext_types), 0, - "Mobile IP Extension Type.", HFILL } + "Mobile IP Extension Type", HFILL } }, { &hf_a11_ext_stype, { "Gen Auth Ext SubType", "a11.ext.auth.subtype", FT_UINT8, BASE_DEC, VALS(a11_ext_stypes), 0, - "Mobile IP Auth Extension Sub Type.", HFILL } + "Mobile IP Auth Extension Sub Type", HFILL } }, { &hf_a11_ext_len, { "Extension Length", "a11.ext.len", FT_UINT16, BASE_DEC, NULL, 0, - "Mobile IP Extension Length.", HFILL } + "Mobile IP Extension Length", HFILL } }, { &hf_a11_ext, { "Extension", "a11.extension", @@ -1882,12 +1887,12 @@ proto_register_a11(void) { &hf_a11_aext_spi, { "SPI", "a11.auth.spi", FT_UINT32, BASE_HEX, NULL, 0, - "Authentication Header Security Parameter Index.", HFILL } + "Authentication Header Security Parameter Index", HFILL } }, { &hf_a11_aext_auth, { "Authenticator", "a11.auth.auth", FT_BYTES, BASE_NONE, NULL, 0, - "Authenticator.", HFILL } + NULL, HFILL } }, { &hf_a11_next_nai, { "NAI", "a11.nai", @@ -1897,7 +1902,7 @@ proto_register_a11(void) { &hf_a11_ses_key, { "Key", "a11.ext.key", FT_UINT32, BASE_HEX, NULL, 0, - "Session Key.", HFILL } + "Session Key", HFILL } }, { &hf_a11_ses_sidver, { "Session ID Version", "a11.ext.sidver", @@ -1912,57 +1917,58 @@ proto_register_a11(void) { &hf_a11_ses_msid_type, { "MSID Type", "a11.ext.msid_type", FT_UINT16, BASE_DEC, NULL, 0, - "MSID Type.", HFILL } + NULL, HFILL } }, { &hf_a11_ses_msid_len, { "MSID Length", "a11.ext.msid_len", FT_UINT8, BASE_DEC, NULL, 0, - "MSID Length.", HFILL } + NULL, HFILL } }, { &hf_a11_ses_msid, { "MSID(BCD)", "a11.ext.msid", FT_STRING, BASE_NONE, NULL, 0, - "MSID(BCD).", HFILL } + NULL, HFILL } }, { &hf_a11_ses_ptype, { "Protocol Type", "a11.ext.ptype", FT_UINT16, BASE_HEX, VALS(a11_ses_ptype_vals), 0, - "Protocol Type.", HFILL } + NULL, HFILL } }, { &hf_a11_vse_vid, { "Vendor ID", "a11.ext.vid", FT_UINT32, BASE_HEX|BASE_EXT_STRING, &sminmpec_values_ext, 0, - "Vendor ID.", HFILL } + NULL, HFILL } }, { &hf_a11_vse_apptype, { "Application Type", "a11.ext.apptype", FT_UINT8, BASE_HEX, VALS(a11_ext_app), 0, - "Application Type.", HFILL } + NULL, HFILL } }, { &hf_a11_vse_ppaddr, { "Anchor P-P Address", "a11.ext.ppaddr", FT_IPv4, BASE_NONE, NULL, 0, - "Anchor P-P Address.", HFILL } + NULL, HFILL } }, { &hf_a11_vse_dormant, { "All Dormant Indicator", "a11.ext.dormant", FT_UINT16, BASE_HEX, VALS(a11_ext_dormant), 0, - "All Dormant Indicator.", HFILL } + NULL, HFILL } }, { &hf_a11_vse_code, { "Reply Code", "a11.ext.code", FT_UINT8, BASE_DEC, VALS(a11_reply_codes), 0, - "PDSN Code.", HFILL } + NULL, HFILL } }, + /* XXX: Is this the correct filter name ?? */ { &hf_a11_vse_pdit, { "PDSN Code", "a11.ext.code", FT_UINT8, BASE_HEX, VALS(a11_ext_nvose_pdsn_code), 0, - "PDSN Code.", HFILL } + NULL, HFILL } }, { &hf_a11_vse_srvopt, { "Service Option", "a11.ext.srvopt", FT_UINT16, BASE_HEX, VALS(a11_ext_nvose_srvopt), 0, - "Service Option.", HFILL } + NULL, HFILL } }, { &hf_a11_vse_panid, { "PANID", "a11.ext.panid", @@ -1977,47 +1983,47 @@ proto_register_a11(void) { &hf_a11_vse_qosmode, { "QoS Mode", "a11.ext.qosmode", FT_UINT8, BASE_HEX, VALS(a11_ext_nvose_qosmode), 0, - "QoS Mode.", HFILL } + NULL, HFILL } }, { &hf_a11_ase_len_type, { "Entry Length", "a11.ext.ase.len", FT_UINT8, BASE_DEC, NULL, 0, - "Entry Length.", HFILL } + NULL, HFILL } }, { &hf_a11_ase_srid_type, { "Service Reference ID (SRID)", "a11.ext.ase.srid", FT_UINT8, BASE_DEC, NULL, 0, - "Service Reference ID (SRID).", HFILL } + NULL, HFILL } }, { &hf_a11_ase_servopt_type, { "Service Option", "a11.ext.ase.srvopt", FT_UINT16, BASE_HEX, VALS(a11_ext_nvose_srvopt), 0, - "Service Option.", HFILL } + NULL, HFILL } }, { &hf_a11_ase_gre_proto_type, { "GRE Protocol Type", "a11.ext.ase.ptype", FT_UINT16, BASE_HEX, VALS(a11_ses_ptype_vals), 0, - "GRE Protocol Type.", HFILL } + NULL, HFILL } }, { &hf_a11_ase_gre_key, { "GRE Key", "a11.ext.ase.key", FT_UINT32, BASE_HEX, NULL, 0, - "GRE Key.", HFILL } + NULL, HFILL } }, { &hf_a11_ase_pcf_addr_key, { "PCF IP Address", "a11.ext.ase.pcfip", FT_IPv4, BASE_NONE, NULL, 0, - "PCF IP Address.", HFILL } + "PCF IP Address", HFILL } }, { &hf_a11_fqi_srid, { "SRID", "a11.ext.fqi.srid", FT_UINT8, BASE_DEC, NULL, 0, - "Forward Flow Entry SRID.", HFILL } + "Forward Flow Entry SRID", HFILL } }, { &hf_a11_fqi_flags, { "Flags", "a11.ext.fqi.flags", FT_UINT8, BASE_HEX, NULL, 0, - "Forward Flow Entry Flags.", HFILL } + "Forward Flow Entry Flags", HFILL } }, { &hf_a11_fqi_flowcount, { "Forward Flow Count", "a11.ext.fqi.flowcount", @@ -2032,12 +2038,12 @@ proto_register_a11(void) { &hf_a11_fqi_entrylen, { "Entry Length", "a11.ext.fqi.entrylen", FT_UINT8, BASE_DEC, NULL, 0, - "Forward Entry Length.", HFILL } + "Forward Entry Length", HFILL } }, { &hf_a11_fqi_dscp, { "Forward DSCP", "a11.ext.fqi.dscp", FT_UINT8, BASE_HEX, NULL, 0, - "Forward Flow DSCP.", HFILL } + "Forward Flow DSCP", HFILL } }, { &hf_a11_fqi_flowstate, { "Forward Flow State", "a11.ext.fqi.flowstate", @@ -2047,62 +2053,62 @@ proto_register_a11(void) { &hf_a11_fqi_requested_qoslen, { "Requested QoS Length", "a11.ext.fqi.reqqoslen", FT_UINT8, BASE_DEC, NULL, 0, - "Forward Requested QoS Length.", HFILL } - }, - { &hf_a11_fqi_flow_priority, - { "Flow Priority", "a11.ext.fqi.flow_priority", - FT_UINT8, BASE_DEC, NULL, 0xF0, - NULL, HFILL } - }, - { &hf_a11_fqi_num_qos_attribute_set, - { "Number of QoS Attribute Sets", "a11.ext.fqi.num_qos_attribute_set", - FT_UINT8, BASE_DEC, NULL, 0x0E, - NULL, HFILL } - }, - { &hf_a11_fqi_qos_attribute_setlen, - { "QoS Attribute Set Length", "a11.ext.fqi.qos_attribute_setlen", - FT_UINT16, BASE_DEC, NULL, 0x01E0, - NULL, HFILL } - }, - { &hf_a11_fqi_qos_attribute_setid, - { "QoS Attribute SetID", "a11.ext.fqi.qos_attribute_setid", - FT_UINT16, BASE_DEC, NULL, 0x1FC0, - "QoS Attribute SetID.", HFILL } - }, - { &hf_a11_fqi_verbose, - { "Verbose", "a11.ext.fqi.verbose", - FT_UINT8, BASE_DEC, NULL, 0x20, - NULL, HFILL } - }, - { &hf_a11_fqi_flow_profileid, - { "Flow Profile Id", "a11.ext.fqi.flow_profileid", - FT_UINT24, BASE_DEC, NULL, 0x1FFFE0, - NULL, HFILL } - }, - { &hf_a11_fqi_qos_granted_attribute_setid, - { "QoS Attribute SetID", "a11.ext.fqi.qos_granted_attribute_setid", - FT_UINT8, BASE_DEC, NULL, 0xFE, - NULL, HFILL } - }, + "Forward Requested QoS Length", HFILL } + }, + { &hf_a11_fqi_flow_priority, + { "Flow Priority", "a11.ext.fqi.flow_priority", + FT_UINT8, BASE_DEC, NULL, 0xF0, + NULL, HFILL } + }, + { &hf_a11_fqi_num_qos_attribute_set, + { "Number of QoS Attribute Sets", "a11.ext.fqi.num_qos_attribute_set", + FT_UINT8, BASE_DEC, NULL, 0x0E, + NULL, HFILL } + }, + { &hf_a11_fqi_qos_attribute_setlen, + { "QoS Attribute Set Length", "a11.ext.fqi.qos_attribute_setlen", + FT_UINT16, BASE_DEC, NULL, 0x01E0, + NULL, HFILL } + }, + { &hf_a11_fqi_qos_attribute_setid, + { "QoS Attribute SetID", "a11.ext.fqi.qos_attribute_setid", + FT_UINT16, BASE_DEC, NULL, 0x1FC0, + NULL, HFILL } + }, + { &hf_a11_fqi_verbose, + { "Verbose", "a11.ext.fqi.verbose", + FT_UINT8, BASE_DEC, NULL, 0x20, + NULL, HFILL } + }, + { &hf_a11_fqi_flow_profileid, + { "Flow Profile Id", "a11.ext.fqi.flow_profileid", + FT_UINT24, BASE_DEC, NULL, 0x1FFFE0, + NULL, HFILL } + }, + { &hf_a11_fqi_qos_granted_attribute_setid, + { "QoS Attribute SetID", "a11.ext.fqi.qos_granted_attribute_setid", + FT_UINT8, BASE_DEC, NULL, 0xFE, + NULL, HFILL } + }, { &hf_a11_fqi_granted_qoslen, { "Granted QoS Length", "a11.ext.fqi.graqoslen", FT_UINT8, BASE_DEC, NULL, 0, - "Forward Granted QoS Length.", HFILL } + "Forward Granted QoS Length", HFILL } }, { &hf_a11_rqi_flow_priority, { "Flow Priority", "a11.ext.rqi.flow_priority", - FT_UINT8, BASE_DEC, NULL, 0xF0, - NULL, HFILL } + FT_UINT8, BASE_DEC, NULL, 0xF0, + NULL, HFILL } }, { &hf_a11_rqi_num_qos_attribute_set, { "Number of QoS Attribute Sets", "a11.ext.rqi.num_qos_attribute_set", - FT_UINT8, BASE_DEC, NULL, 0x0E, - NULL, HFILL } + FT_UINT8, BASE_DEC, NULL, 0x0E, + NULL, HFILL } }, { &hf_a11_rqi_qos_attribute_setlen, { "QoS Attribute Set Length", "a11.ext.rqi.qos_attribute_setlen", - FT_UINT16, BASE_DEC, NULL, 0x01E0, - NULL, HFILL } + FT_UINT16, BASE_DEC, NULL, 0x01E0, + NULL, HFILL } }, { &hf_a11_rqi_qos_attribute_setid, { "QoS Attribute SetID", "a11.ext.rqi.qos_attribute_setid", @@ -2122,98 +2128,98 @@ proto_register_a11(void) { &hf_a11_rqi_qos_granted_attribute_setid, { "QoS Attribute SetID", "a11.ext.rqi.qos_granted_attribute_setid", FT_UINT8, BASE_DEC, NULL, 0xFE, - "QoS Attribute SetID.", HFILL } + NULL, HFILL } }, { &hf_a11_rqi_srid, { "SRID", "a11.ext.rqi.srid", FT_UINT8, BASE_DEC, NULL, 0, - "Reverse Flow Entry SRID.", HFILL } + "Reverse Flow Entry SRID", HFILL } }, { &hf_a11_rqi_flowcount, { "Reverse Flow Count", "a11.ext.rqi.flowcount", FT_UINT8, BASE_DEC, NULL, 0, - "Reverse Flow Count.", HFILL } + NULL, HFILL } }, { &hf_a11_rqi_flowid, { "Reverse Flow Id", "a11.ext.rqi.flowid", FT_UINT8, BASE_DEC, NULL, 0, - "Reverse Flow Id.", HFILL } + NULL, HFILL } }, { &hf_a11_rqi_entrylen, { "Entry Length", "a11.ext.rqi.entrylen", FT_UINT8, BASE_DEC, NULL, 0, - "Reverse Flow Entry Length.", HFILL } + "Reverse Flow Entry Length", HFILL } }, { &hf_a11_rqi_flowstate, { "Flow State", "a11.ext.rqi.flowstate", FT_UINT8, BASE_HEX, NULL, 0, - "Reverse Flow State.", HFILL } + "Reverse Flow State", HFILL } }, { &hf_a11_rqi_requested_qoslen, { "Requested QoS Length", "a11.ext.rqi.reqqoslen", FT_UINT8, BASE_DEC, NULL, 0, - "Reverse Requested QoS Length.", HFILL } - }, - { &hf_a11_rqi_requested_qos, - { "Requested QoS", "a11.ext.rqi.reqqos", - FT_BYTES, BASE_NONE, NULL, 0, - "Reverse Requested QoS.", HFILL } - }, - { &hf_a11_rqi_granted_qoslen, - { "Granted QoS Length", "a11.ext.rqi.graqoslen", - FT_UINT8, BASE_DEC, NULL, 0, - "Reverse Granted QoS Length.", HFILL } - }, - { &hf_a11_rqi_granted_qos, - { "Granted QoS", "a11.ext.rqi.graqos", - FT_BYTES, BASE_NONE, NULL, 0, - "Reverse Granted QoS.", HFILL } - }, - { &hf_a11_fqui_flowcount, - { "Forward QoS Update Flow Count", "a11.ext.fqui.flowcount", - FT_UINT8, BASE_DEC, NULL, 0, - "Forward QoS Update Flow Count.", HFILL } - }, - { &hf_a11_rqui_flowcount, - { "Reverse QoS Update Flow Count", "a11.ext.rqui.flowcount", - FT_UINT8, BASE_DEC, NULL, 0, - "Reverse QoS Update Flow Count.", HFILL } - }, - { &hf_a11_fqui_updated_qoslen, - { "Forward Updated QoS Sub-Blob Length", "a11.ext.fqui.updatedqoslen", - FT_UINT8, BASE_DEC, NULL, 0, - "Forward Updated QoS Sub-Blob Length.", HFILL } - }, - { &hf_a11_fqui_updated_qos, - { "Forward Updated QoS Sub-Blob", "a11.ext.fqui.updatedqos", - FT_BYTES, BASE_NONE, NULL, 0, - "Forward Updated QoS Sub-Blob.", HFILL } - }, + "Reverse Requested QoS Length", HFILL } + }, + { &hf_a11_rqi_requested_qos, + { "Requested QoS", "a11.ext.rqi.reqqos", + FT_BYTES, BASE_NONE, NULL, 0, + "Reverse Requested QoS", HFILL } + }, + { &hf_a11_rqi_granted_qoslen, + { "Granted QoS Length", "a11.ext.rqi.graqoslen", + FT_UINT8, BASE_DEC, NULL, 0, + "Reverse Granted QoS Length", HFILL } + }, + { &hf_a11_rqi_granted_qos, + { "Granted QoS", "a11.ext.rqi.graqos", + FT_BYTES, BASE_NONE, NULL, 0, + "Reverse Granted QoS", HFILL } + }, + { &hf_a11_fqui_flowcount, + { "Forward QoS Update Flow Count", "a11.ext.fqui.flowcount", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_rqui_flowcount, + { "Reverse QoS Update Flow Count", "a11.ext.rqui.flowcount", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_fqui_updated_qoslen, + { "Forward Updated QoS Sub-Blob Length", "a11.ext.fqui.updatedqoslen", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_fqui_updated_qos, + { "Forward Updated QoS Sub-Blob", "a11.ext.fqui.updatedqos", + FT_BYTES, BASE_NONE, NULL, 0, + NULL, HFILL } + }, { &hf_a11_rqui_updated_qoslen, { "Reverse Updated QoS Sub-Blob Length", "a11.ext.rqui.updatedqoslen", FT_UINT8, BASE_DEC, NULL, 0, - "Reverse Updated QoS Sub-Blob Length.", HFILL } + NULL, HFILL } }, { &hf_a11_rqui_updated_qos, { "Reverse Updated QoS Sub-Blob", "a11.ext.rqui.updatedqos", FT_BYTES, BASE_NONE, NULL, 0, - "Reverse Updated QoS Sub-Blob.", HFILL } + NULL, HFILL } }, { &hf_a11_subsciber_profile_len, { "Subscriber QoS Profile Length", "a11.ext.sqp.profilelen", FT_BYTES, BASE_NONE, NULL, 0, - "Subscriber QoS Profile Length.", HFILL } + NULL, HFILL } }, { &hf_a11_subsciber_profile, { "Subscriber QoS Profile", "a11.ext.sqp.profile", FT_BYTES, BASE_NONE, NULL, 0, - "Subscriber QoS Profile.", HFILL } + NULL, HFILL } }, { &hf_a11_ase_forward_rohc_info_len, { "Forward ROHC Info Length", "a11.ext.ase.forwardlen", - FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL } + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } }, { &hf_a11_ase_forward_maxcid, @@ -2226,7 +2232,7 @@ proto_register_a11(void) { "Forward MRRU", "a11.ext.ase.mrru", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } - }, + }, { &hf_a11_ase_forward_large_cids, { "Forward Large CIDS", "a11.ext.ase.forwardlargecids", @@ -2238,7 +2244,7 @@ proto_register_a11(void) { "Forward Profile Count", "a11.ext.ase.profilecount", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } - }, + }, { &hf_a11_ase_forward_profile, @@ -2275,54 +2281,54 @@ proto_register_a11(void) { "Reverse Profile Count", "a11.ext.ase.revprofilecount", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } - }, - - - { &hf_a11_ase_reverse_profile, - { "Reverse Profile", "a11.ext.ase.reverseprofile", - FT_UINT16, BASE_DEC, VALS(a11_rohc_profile_vals), 0, - NULL, HFILL } - }, - { &hf_a11_aut_flow_prof_sub_type, - { "Sub type", "a11.aut_flow_prof.sub_type", - FT_UINT8, BASE_DEC, VALS(a11_aut_flow_prof_subtype_vals), 0, - NULL, HFILL } - }, - { &hf_a11_aut_flow_prof_sub_type_len, - { "Length", "a11.aut_flow_prof.length", - FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL } - }, - { &hf_a11_aut_flow_prof_sub_type_value, - { "Value", "a11.aut_flow_prof.value", - FT_UINT16, BASE_DEC, NULL, 0, - NULL, HFILL } - }, - { &hf_a11_serv_opt_prof_max_serv, - { "Service-Connections-Per-Link-flow", "a11.serv_opt_prof.scplf", - FT_UINT32, BASE_DEC, NULL, 0, - NULL, HFILL } - }, - { &hf_a11_sub_type, - { "Sub-Type", "a11.sub_type", - FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL } - }, - { &hf_a11_sub_type_length, - { "Sub-Type Length", "a11.sub_type_length", - FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL } - }, - { &hf_a11_serv_opt, - { "Service Option", "a11.serviceoption", - FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL } - }, - { &hf_a11_max_num_serv_opt, - { "Max number of service instances of Service Option", "a11.serviceoption", - FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL } - }, + }, + + + { &hf_a11_ase_reverse_profile, + { "Reverse Profile", "a11.ext.ase.reverseprofile", + FT_UINT16, BASE_DEC, VALS(a11_rohc_profile_vals), 0, + NULL, HFILL } + }, + { &hf_a11_aut_flow_prof_sub_type, + { "Sub type", "a11.aut_flow_prof.sub_type", + FT_UINT8, BASE_DEC, VALS(a11_aut_flow_prof_subtype_vals), 0, + NULL, HFILL } + }, + { &hf_a11_aut_flow_prof_sub_type_len, + { "Length", "a11.aut_flow_prof.length", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_aut_flow_prof_sub_type_value, + { "Value", "a11.aut_flow_prof.value", + FT_UINT16, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_serv_opt_prof_max_serv, + { "Service-Connections-Per-Link-flow", "a11.serv_opt_prof.scplf", + FT_UINT32, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_sub_type, + { "Sub-Type", "a11.sub_type", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_sub_type_length, + { "Sub-Type Length", "a11.sub_type_length", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_serv_opt, + { "Service Option", "a11.serviceoption", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, + { &hf_a11_max_num_serv_opt, + { "Max number of service instances of Service Option", "a11.serviceoption", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL } + }, }; /* Setup protocol subtree array */ @@ -2352,7 +2358,7 @@ proto_register_a11(void) &ett_a11_reverse_rohc, &ett_a11_forward_profile, &ett_a11_reverse_profile, - &ett_a11_aut_flow_profile_ids, + &ett_a11_aut_flow_profile_ids, }; /* Register the protocol name and description */ @@ -2374,8 +2380,8 @@ proto_reg_handoff_a11(void) a11_handle = find_dissector("a11"); dissector_add_uint("udp.port", UDP_PORT_3GA11, a11_handle); - /* 3GPP2-Service-Option-Profile(74) */ - radius_register_avp_dissector(VENDOR_THE3GPP2, 74, dissect_3gpp2_service_option_profile); - /* 3GPP2-Authorized-Flow-Profile-IDs(131) */ - radius_register_avp_dissector(VENDOR_THE3GPP2, 131, dissect_3gpp2_radius_aut_flow_profile_ids); + /* 3GPP2-Service-Option-Profile(74) */ + radius_register_avp_dissector(VENDOR_THE3GPP2, 74, dissect_3gpp2_service_option_profile); + /* 3GPP2-Authorized-Flow-Profile-IDs(131) */ + radius_register_avp_dissector(VENDOR_THE3GPP2, 131, dissect_3gpp2_radius_aut_flow_profile_ids); } |