33
33
#include "packet-umts_fp.h"
36
- remaining message types
36
- IUR interface-specific formats
37
37
- verify header & payload CRCs
38
- look for (and report as expert info) spare extension bytes
38
- look for (and report as expert info) possible spare extension bytes
41
42
/* Initialize the protocol and registered fields. */
55
56
static int hf_fp_cpch_tfi = -1;
56
57
static int hf_fp_propagation_delay = -1;
57
58
static int hf_fp_tb = -1;
59
static int hf_fp_chan_zero_tbs = -1;
58
60
static int hf_fp_received_sync_ul_timing_deviation = -1;
59
61
static int hf_fp_pch_pi = -1;
60
62
static int hf_fp_pch_tfi = -1;
85
87
static int hf_fp_hsdsch_credits = -1;
86
88
static int hf_fp_hsdsch_max_macd_pdu_len = -1;
87
89
static int hf_fp_hsdsch_interval = -1;
90
static int hf_fp_hsdsch_calculated_rate = -1;
91
static int hf_fp_hsdsch_unlimited_rate = -1;
88
92
static int hf_fp_hsdsch_repetition_period = -1;
89
93
static int hf_fp_hsdsch_data_padding = -1;
90
94
static int hf_fp_hsdsch_new_ie_flags = -1;
379
383
for (chan=0; chan < p_fp_info->num_chans; chan++)
387
/* Clearly show channels with no TBs */
388
if (p_fp_info->chan_num_tbs[chan] == 0)
390
proto_item *no_tb_ti = proto_tree_add_uint(data_tree, hf_fp_chan_zero_tbs, tvb,
391
offset+(bit_offset/8),
393
proto_item_append_text(no_tb_ti, " (of size %d)",
394
p_fp_info->chan_tf_size[chan]);
395
PROTO_ITEM_SET_GENERATED(no_tb_ti);
398
/* Show TBs from non-empty channels */
382
399
for (n=0; n < p_fp_info->chan_num_tbs[chan]; n++)
737
755
if (credits == 0)
739
757
proto_item_append_text(ti, " (stop transmission)");
758
expert_add_info_format(pinfo, ti,
759
PI_RESPONSE_CODE, PI_NOTE,
760
"Stop HSDPA transmission");
741
762
if (credits == 2047)
761
782
proto_item_append_text(ti, " (unlimited repetition period)");
785
/* Calculated and show effective rate enabled */
788
rate_ti = proto_tree_add_item(tree, hf_fp_hsdsch_unlimited_rate, tvb, 0, 0, FALSE);
792
rate_ti = proto_tree_add_uint(tree, hf_fp_hsdsch_calculated_rate, tvb, 0, 0,
793
credits * max_pdu_length * (1000 / (interval*10)));
795
PROTO_ITEM_SET_GENERATED(rate_ti);
764
798
if (check_col(pinfo->cinfo, COL_INFO))
766
800
col_append_fstr(pinfo->cinfo, COL_INFO,
1032
1066
/* Transmit power level */
1033
1067
proto_tree_add_float(tree, hf_fp_transmit_power_level, tvb, offset, 1,
1034
(float)(tvb_get_guint8(tvb, offset)) / 10);
1068
(float)(int)(tvb_get_guint8(tvb, offset)) / 10);
1097
1131
/* Power offset */
1098
1132
proto_tree_add_float(tree, hf_fp_power_offset, tvb, offset, 1,
1099
1133
(float)(-32.0) +
1100
((float)(tvb_get_guint8(tvb, offset)) * (float)(0.25)));
1134
((float)(int)(tvb_get_guint8(tvb, offset)) * (float)(0.25)));
1103
1137
/* Code number */
1124
1158
/* Transmit power level */
1125
1159
proto_tree_add_float(tree, hf_fp_transmit_power_level, tvb, offset, 1,
1126
(float)(tvb_get_guint8(tvb, offset)) / 10);
1160
(float)(int)(tvb_get_guint8(tvb, offset)) / 10);
1446
1480
void dissect_dch_outer_loop_power_control(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset)
1448
1482
/* SIR target */
1449
float target = -8.2 + (0.1 * (float)(tvb_get_guint8(tvb, offset)));
1483
float target = -8.2 + (0.1 * (float)(int)(tvb_get_guint8(tvb, offset)));
1450
1484
proto_tree_add_float(tree, hf_fp_ul_sir_target, tvb, offset, 1, target);
1452
1486
if (check_col(pinfo->cinfo, COL_INFO))
1696
1731
/* Number of subframes.
1697
1732
This was 3 bits in early releases, is 4 bits offset by 1 in later releases */
1698
if ((p_fp_info->dct2000_variant % 256) > 1)
1733
if (((p_fp_info->dct2000_variant / 256) >= 2) ||
1734
(p_fp_info->release > 6))
1700
1736
/* Use 4 bits plus offset of 1 */
1701
1737
number_of_subframes = (tvb_get_guint8(tvb, offset) & 0x0f) + 1;
1810
1847
bit_offset += 6;
1850
offset += ((bit_offset+7)/8);
1813
1852
/* Tree should cover entire subframe header */
1814
proto_item_set_len(subframe_header_ti, bit_offset/8);
1816
offset += ((bit_offset+7)/8);
1853
proto_item_set_len(subframe_header_ti, offset - start_offset);
1819
1856
/* EDCH subframes */
1903
1942
proto_item_append_text(subframe_ti, " (%u bits in %u MAC-d PDUs)",
1904
1943
bits_in_subframe, mac_d_pdus_in_subframe);
1945
total_pdus += mac_d_pdus_in_subframe;
1906
1946
total_bits += bits_in_subframe;
1908
1948
offset += (bit_offset/8);
1912
1952
if (check_col(pinfo->cinfo, COL_INFO))
1914
1954
col_append_fstr(pinfo->cinfo, COL_INFO,
1915
" CFN = %03u (%u bits in %u subframes)",
1916
cfn, total_bits, number_of_subframes);
1955
" CFN = %03u (%u bits in %u pdus in %u subframes)",
1956
cfn, total_bits, total_pdus, number_of_subframes);
1919
1959
/* Payload CRC (optional) */
1981
2023
offset = dissect_macd_pdu_data(tvb, pinfo, tree, offset, pdu_length,
1982
2024
number_of_pdus);
2026
if (check_col(pinfo->cinfo, COL_INFO))
2028
col_append_fstr(pinfo->cinfo, COL_INFO, " User-Buffer-Size=%u", user_buffer_size);
1984
2031
/* Extra R6 stuff */
1985
2032
if (p_fp_info->release == 6)
2206
2253
"Transport Block", HFILL
2256
{ &hf_fp_chan_zero_tbs,
2257
{ "No TBs for channel",
2258
"fp.channel-with-zero-tbs", FT_UINT32, BASE_DEC, NULL, 0x0,
2259
"Channel with 0 TBs", HFILL
2211
2264
"fp.tfi", FT_UINT8, BASE_DEC, NULL, 0x0,
2464
2517
"HS-DSCH Interval in milliseconds", HFILL
2520
{ &hf_fp_hsdsch_calculated_rate,
2521
{ "Calculated rate allocation (bps)",
2522
"fp.hsdsch-calculated-rate", FT_UINT32, BASE_DEC, 0, 0x0,
2523
"Calculated rate RNC is allowed to send in bps", HFILL
2526
{ &hf_fp_hsdsch_unlimited_rate,
2528
"fp.hsdsch-unlimited-rate", FT_NONE, BASE_NONE, 0, 0x0,
2529
"No restriction on rate at which date may be sent", HFILL
2467
2532
{ &hf_fp_hsdsch_repetition_period,
2468
2533
{ "HS-DSCH Repetition Period",
2469
2534
"fp.hsdsch-repetition-period", FT_UINT8, BASE_DEC, 0, 0x0,
2593
2658
{ &hf_fp_ul_sir_target,
2594
2659
{ "UL_SIR_TARGET",
2595
"fp.ul-sir_target", FT_FLOAT, BASE_DEC, 0, 0x0,
2660
"fp.ul-sir-target", FT_FLOAT, BASE_DEC, 0, 0x0,
2596
2661
"Value (in dB) of the SIR target to be used by the UL inner loop power control", HFILL
2702
2767
{ &hf_fp_radio_interface_parameter_update_flag[0],
2704
"fp.radio_interface_param.cfn-valid", FT_UINT16, BASE_DEC, 0, 0x0001,
2769
"fp.radio-interface-param.cfn-valid", FT_UINT16, BASE_DEC, 0, 0x0001,
2705
2770
"CFN valid", HFILL
2708
2773
{ &hf_fp_radio_interface_parameter_update_flag[1],
2709
2774
{ "TPC PO valid",
2710
"fp.radio_interface_param.tpc-po-valid", FT_UINT16, BASE_DEC, 0, 0x0002,
2775
"fp.radio-interface-param.tpc-po-valid", FT_UINT16, BASE_DEC, 0, 0x0002,
2711
2776
"TPC PO valid", HFILL
2714
2779
{ &hf_fp_radio_interface_parameter_update_flag[2],
2715
2780
{ "DPC mode valid",
2716
"fp.radio_interface_param.dpc-mode-valid", FT_UINT16, BASE_DEC, 0, 0x0004,
2781
"fp.radio-interface-param.dpc-mode-valid", FT_UINT16, BASE_DEC, 0, 0x0004,
2717
2782
"DPC mode valid", HFILL
2720
2785
{ &hf_fp_radio_interface_parameter_update_flag[3],
2721
2786
{ "RL sets indicator valid",
2722
"fp.radio_interface_param.rl-sets-indicator-valid", FT_UINT16, BASE_DEC, 0, 0x0020,
2787
"fp.radio-interface_param.rl-sets-indicator-valid", FT_UINT16, BASE_DEC, 0, 0x0020,
2723
2788
"RI valid", HFILL
2726
2791
{ &hf_fp_radio_interface_parameter_update_flag[4],
2727
2792
{ "MAX_UE_TX_POW valid",
2728
"fp.radio_interface_param.max-ue-tx-pow-valid", FT_UINT16, BASE_DEC, 0, 0x0040,
2793
"fp.radio-interface-param.max-ue-tx-pow-valid", FT_UINT16, BASE_DEC, 0, 0x0040,
2729
2794
"MAX UE TX POW valid", HFILL