forked from osmocom/wireshark
From Pascal Quantin:
[NAS EPS] various small fixes for message decoding. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4290 svn path=/trunk/; revision=31166
This commit is contained in:
parent
c5fdb8edae
commit
571e210c76
|
@ -1287,7 +1287,7 @@ de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _
|
|||
static const value_string nas_eps_emm_tai_tol_vals[] = {
|
||||
{ 0, "list of TACs belonging to one PLMN, with non-consecutive TAC values"},
|
||||
{ 1, "list of TACs belonging to one PLMN, with consecutive TAC values"},
|
||||
{ 2, "list of TAIs belonging to different PLMNsl"},
|
||||
{ 2, "list of TAIs belonging to different PLMNs"},
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -1762,6 +1762,8 @@ de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
|
|||
"APN-AMBR for uplink : %u kbps", calc_bitrate(octet));
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* APN-AMBR for downlink (extended) octet 5 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -1774,6 +1776,8 @@ de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
|
|||
(octet > 0x4a) ? "Mbps" : "kbps");
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* APN-AMBR for uplink (extended) octet 6 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -1786,6 +1790,8 @@ de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
|
|||
(octet > 0x4a) ? "Mbps" : "kbps");
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* APN-AMBR for downlink (extended-2) octet 7 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if((octet==0)||(octet==0xff)){
|
||||
|
@ -1797,6 +1803,8 @@ de_esm_apn_aggr_max_br(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
|
|||
(octet* 256));
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* APN-AMBR for uplink (extended-2) octet 8 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if((octet==0)||(octet==0xff)){
|
||||
|
@ -1843,7 +1851,8 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
|
|||
/* QCI octet 3 */
|
||||
proto_tree_add_item(tree, hf_nas_eps_qci, tvb, curr_offset, 1, FALSE);
|
||||
curr_offset++;
|
||||
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Maximum bit rate for uplink octet 4 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -1854,6 +1863,8 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
|
|||
"Maximum bit rate for uplink : %u kbps", calc_bitrate(octet));
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Maximum bit rate for downlink octet 5 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -1864,18 +1875,24 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
|
|||
"Maximum bit rate for downlink : %u kbps", calc_bitrate(octet));
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Guaranteed bit rate for uplink octet 6 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
|
||||
"Guaranteed bit rate for uplink : %u kbps", calc_bitrate(octet));
|
||||
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Guaranteed bit rate for downlink octet 7 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
proto_tree_add_uint_format(tree, hf_nas_eps_gbr_ul, tvb, curr_offset, 1, octet,
|
||||
"Guaranteed bit rate for downlink : %u kbps", calc_bitrate(octet));
|
||||
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Maximum bit rate for uplink (extended) octet 8 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -1888,7 +1905,8 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
|
|||
(octet > 0x4a) ? "Mbps" : "kbps");
|
||||
}
|
||||
curr_offset++;
|
||||
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Maximum bit rate for downlink (extended) octet 9 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -1901,6 +1919,8 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
|
|||
(octet > 0x4a) ? "Mbps" : "kbps");
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Guaranteed bit rate for uplink (extended) octet 10 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -1913,6 +1933,8 @@ de_esm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
|
|||
(octet > 0x4a) ? "Mbps" : "kbps");
|
||||
}
|
||||
curr_offset++;
|
||||
if ((curr_offset - offset) >= len)
|
||||
return(len);
|
||||
/* Guaranteed bit rate for downlink (extended) octet 11 */
|
||||
octet = tvb_get_guint8(tvb,curr_offset);
|
||||
if(octet==0){
|
||||
|
@ -2288,15 +2310,15 @@ nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
|
|||
curr_offset = offset;
|
||||
curr_len = len;
|
||||
|
||||
/* EPS attach result EPS attach result 9.9.3.10 M V 1/2 */
|
||||
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* EPS attach result EPS attach result 9.9.3.10 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, FALSE);
|
||||
bit_offset++;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_EPS_attach_result, tvb, bit_offset, 3, FALSE);
|
||||
bit_offset+=3;
|
||||
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Fix up the lengths */
|
||||
curr_len--;
|
||||
curr_offset++;
|
||||
|
@ -3005,15 +3027,15 @@ nas_emm_trac_area_upd_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
|
|||
curr_offset = offset;
|
||||
curr_len = len;
|
||||
|
||||
/* EPS update result EPS update result 9.9.3.13 M V 1/2 */
|
||||
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* EPS update result EPS update result 9.9.3.13 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, FALSE);
|
||||
bit_offset++;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_eps_update_result_value, tvb, bit_offset, 3, FALSE);
|
||||
bit_offset+=3;
|
||||
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Fix up the lengths */
|
||||
curr_len--;
|
||||
curr_offset++;
|
||||
|
@ -3212,13 +3234,13 @@ nas_esm_act_ded_eps_bearer_ctx_req(tvbuff_t *tvb, proto_tree *tree, guint32 offs
|
|||
curr_offset = offset;
|
||||
curr_len = len;
|
||||
|
||||
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Spare half octet Spare half octet 9.9.2.7 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Fix the lengths */
|
||||
curr_len--;
|
||||
curr_offset++;
|
||||
|
@ -3359,13 +3381,13 @@ nas_esm_bearer_res_all_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guin
|
|||
curr_offset = offset;
|
||||
curr_len = len;
|
||||
|
||||
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Linked EPS bearer identity Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Fix the lengths */
|
||||
curr_len--;
|
||||
curr_offset++;
|
||||
|
@ -3412,13 +3434,13 @@ nas_esm_bearer_res_mod_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guin
|
|||
curr_offset = offset;
|
||||
curr_len = len;
|
||||
|
||||
/* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Fix the lengths */
|
||||
curr_len--;
|
||||
curr_offset++;
|
||||
|
@ -3697,13 +3719,13 @@ nas_esm_pdn_disc_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
|
|||
curr_offset = offset;
|
||||
curr_len = len;
|
||||
|
||||
/* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Spare half octet Spare half octet 9.9.2.9 M V 1/2 */
|
||||
bit_offset = curr_offset<<3;
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_emm_spare_half_octet, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* EPS bearer identity for packet filter Linked EPS bearer identity 9.9.4.6 M V 1/2 */
|
||||
proto_tree_add_bits_item(tree, hf_nas_eps_esm_linked_bearer_id, tvb, bit_offset, 4, FALSE);
|
||||
bit_offset+=4;
|
||||
/* Fix the lengths */
|
||||
curr_len--;
|
||||
curr_offset++;
|
||||
|
@ -4275,7 +4297,7 @@ void proto_register_nas_eps(void) {
|
|||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_nas_eps_emm_EPS_attach_result,
|
||||
{ "Type of identity","nas_eps.emm.EPS_attach_result",
|
||||
{ "Attach result","nas_eps.emm.EPS_attach_result",
|
||||
FT_UINT8,BASE_DEC, VALS(nas_eps_emm_EPS_attach_result_values), 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue