Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at packet-gtp.c:3819

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

decode_qos_umts

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-gtp.c)expand/collapse
Show more  
 3734  static int decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const gchar * qos_str, guint8 type)
 3735  {
 3736   
 3737      guint length;
 3738      guint8 al_ret_priority;
 3739      guint8 delay, reliability, peak, precedence, mean, spare1, spare2, spare3;
 3740      guint8 traf_class, del_order, del_err_sdu;
 3741      guint8 max_sdu_size, max_ul, max_dl, max_ul_ext, max_dl_ext;
 3742      guint8 res_ber, sdu_err_ratio;
 3743      guint8 trans_delay, traf_handl_prio;
 3744      guint8 guar_ul, guar_dl, guar_ul_ext, guar_dl_ext;
 3745      guint8 src_stat_desc, sig_ind;
 3746      proto_tree *ext_tree_qos;
 3747      proto_item *te;
 3748      int mss, mu, md, gu, gd;
 3749   
 3750      /* Will keep if the input is UTF-8 encoded (as in RADIUS messages).
 3751       * If 1, input is *not* UTF-8 encoded (i.e. each input octet corresponds
 3752       * to one byte to be dissected).
 3753       * If 2, input is UTF-8 encoded (i.e. each *couple* of input octets 
 3754       * corresponds to one byte to be dissected)
 3755       * */
 3756      guint8 utf8_type = 1;
 3757   
 3758      /* In RADIUS messages the QoS has a version field of two octets prepended.
 3759       * As of 29.061 v.3.a.0, there is an hyphen between "Release Indicator" and 
 3760       * <release specific QoS IE UTF-8 encoding>. Even if it sounds rather 
 3761       * inconsistent and unuseful, I will check hyphen presence here and 
 3762       * will signal its presence.
 3763       * */
 3764      guint8 hyphen;
 3765   
 3766      /* Will keep the value that will be returned
 3767       * */
 3768      int retval = 0;
 3769   
 3770      switch (type) {
 3771      case 1:
 3772          length = tvb_get_guint8(tvb, offset);
 3773          te = proto_tree_add_text(tree, tvb, offset, length + 1, "%s", qos_str);
 3774          ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
 3775          proto_tree_add_text(ext_tree_qos, tvb, offset, 1, "Length: %u", length);
 3776          offset++;
 3777          retval = length + 1;
 3778          break;
 3779      case 2:
 3780          length = tvb_get_ntohs(tvb, offset + 1);
 3781          te = proto_tree_add_text(tree, tvb, offset, length + 3, "%s", qos_str);
 3782          ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
 3783          proto_tree_add_text(ext_tree_qos, tvb, offset + 1, 2, "Length: %u", length);
 3784          offset += 3;            /* +1 because of first 0x86 byte for UMTS QoS */
 3785          retval = length + 3;
 3786          break;
 3787      case 3:
 3788          /* For QoS inside RADIUS Client messages from GGSN */
 3789          utf8_type = 2;
 3790   
 3791          /* The field in the RADIUS message is the length of the tvb we were given */
 3792          length = tvb_length(tvb);
 3793          te = proto_tree_add_text(tree, tvb, offset, length, "%s", qos_str);
 3794   
 3795          ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
 3796   
 3797          proto_tree_add_item(ext_tree_qos, hf_gtp_qos_version, tvb, offset, 2, FALSE);
 3798   
 3799          /* Hyphen handling */
 3800          hyphen = tvb_get_guint8(tvb, offset + 2);
 3801          if (hyphen == ((guint8) '-')) {
 3802              /* Hyphen is present, put in protocol tree */
 3803              proto_tree_add_text(ext_tree_qos, tvb, offset + 2, 1, "Hyphen separator: -");
 3804              offset++;           /* "Get rid" of hyphen */
 3805          }
 3806   
 3807          /* Now, we modify offset here and in order to use type later 
 3808           * effectively.*/
 3809          offset++;
 3810   
 3811          length -= offset;
 3812          length /= 2;
 3813   
 3814          retval = length + 2;    /* Actually, will be ignored. */
 3815          break;
 3816      default:
 3817          /* XXX - what should we do with the length here? */
 3818          length = 0;
 3819          retval = 0;
 3820          ext_tree_qos = NULL;
 3821          break;
 3822      }
 3823   
 3824      /* In RADIUS messages there is no allocation-retention priority 
 3825       * so I don't need to wrap the following call to tvb_get_guint8
 3826       * */
 3827      al_ret_priority = tvb_get_guint8(tvb, offset);
 3828   
 3829      /* All calls are wrapped to take into  the possibility that the
 3830       * input is UTF-8 encoded. If utf8_type is equal to 1, the final value 
 3831       * of the offset will be the same as in the previous version of this
 3832       * dissector, and the wrapped function will serve as a dumb wrapper;
 3833       * otherwise, if utf_8_type is 2, the offset is correctly shifted by
 3834       * two bytes for needed shift, and the wrapped function will unencode
 3835       * two values from the input.
 3836       * */
 3837      spare1 = wrapped_tvb_get_guint8(tvb, offset + (1 - 1) * utf8_type + 1, utf8_type) & 0xC0;
 3838      delay = wrapped_tvb_get_guint8(tvb, offset + (1 - 1) * utf8_type + 1, utf8_type) & 0x38;
 3839      reliability = wrapped_tvb_get_guint8(tvb, offset + (1 - 1) * utf8_type + 1, utf8_type) & 0x07;
 3840      peak = wrapped_tvb_get_guint8(tvb, offset + (2 - 1) * utf8_type + 1, utf8_type) & 0xF0;
 3841      spare2 = wrapped_tvb_get_guint8(tvb, offset + (2 - 1) * utf8_type + 1, utf8_type) & 0x08;
 3842      precedence = wrapped_tvb_get_guint8(tvb, offset + (2 - 1) * utf8_type + 1, utf8_type) & 0x07;
 3843      spare3 = wrapped_tvb_get_guint8(tvb, offset + (3 - 1) * utf8_type + 1, utf8_type) & 0xE0;
 3844      mean = wrapped_tvb_get_guint8(tvb, offset + (3 - 1) * utf8_type + 1, utf8_type) & 0x1F;
 3845   
 3846      /* In RADIUS messages there is no allocation-retention priority */
 3847      if (type != 3)
 3848          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_al_ret_priority, tvb, offset, 1, al_ret_priority);
 3849   
 3850      /* All additions must take care of the fact that QoS fields in RADIUS 
 3851       * messages are UTF-8 encoded, so we have to use the same trick as above.
 3852       * */
 3853      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare1, tvb, offset + (1 - 1) * utf8_type + 1, utf8_type, spare1);
 3854      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_delay, tvb, offset + (1 - 1) * utf8_type + 1, utf8_type, delay);
 3855      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_reliability, tvb, offset + (1 - 1) * utf8_type + 1, utf8_type, reliability);
 3856      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_peak, tvb, offset + (2 - 1) * utf8_type + 1, utf8_type, peak);
 3857      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare2, tvb, offset + (2 - 1) * utf8_type + 1, utf8_type, spare2);
 3858      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_precedence, tvb, offset + (2 - 1) * utf8_type + 1, utf8_type, precedence);
 3859      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare3, tvb, offset + (3 - 1) * utf8_type + 1, utf8_type, spare3);
 3860      proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_mean, tvb, offset + (3 - 1) * utf8_type + 1, utf8_type, mean);
 3861   
 3862      /* TS 24.008 V 7.8.0
 3863       * The quality of service is a type 4 information element with a minimum length of 14 octets and a maximum length of 18 
 3864       * octets. The QoS requested by the MS shall be encoded both in the QoS attributes specified in octets 3-5 and in the QoS
 3865       * attributes specified in octets 6-14.
 3866       * In the MS to network direction and in the network to MS direction the following applies:
 3867       * - Octets 15-18 are optional. If octet 15 is included, then octet 16 shall also be included, and octets 17 and 18 may
 3868       * be included.
 3869       * - If octet 17 is included, then octet 18 shall also be included.
 3870       * - A QoS IE received without octets 6-18, without octets 14-18, without octets 15-18, or without octets 17-18 shall 
 3871       * be accepted by the receiving entity.
 3872       */
 3873   
 3874      if (length > 4) {
 3875   
 3876          /* See above for the need of wrapping 
 3877           *  
 3878           */
 3879          /* Octet 6 */
 3880          traf_class = wrapped_tvb_get_guint8(tvb, offset + (4 - 1) * utf8_type + 1, utf8_type) & 0xE0;
 3881          del_order = wrapped_tvb_get_guint8(tvb, offset + (4 - 1) * utf8_type + 1, utf8_type) & 0x18;
 3882          del_err_sdu = wrapped_tvb_get_guint8(tvb, offset + (4 - 1) * utf8_type + 1, utf8_type) & 0x07;
 3883          max_sdu_size = wrapped_tvb_get_guint8(tvb, offset + (5 - 1) * utf8_type + 1, utf8_type);
 3884          max_ul = wrapped_tvb_get_guint8(tvb, offset + (6 - 1) * utf8_type + 1, utf8_type);
 3885          max_dl = wrapped_tvb_get_guint8(tvb, offset + (7 - 1) * utf8_type + 1, utf8_type);
 3886          res_ber = wrapped_tvb_get_guint8(tvb, offset + (8 - 1) * utf8_type + 1, utf8_type) & 0xF0;
 3887          sdu_err_ratio = wrapped_tvb_get_guint8(tvb, offset + (8 - 1) * utf8_type + 1, utf8_type) & 0x0F;
 3888          trans_delay = wrapped_tvb_get_guint8(tvb, offset + (9 - 1) * utf8_type + 1, utf8_type) & 0xFC;
 3889          traf_handl_prio = wrapped_tvb_get_guint8(tvb, offset + (9 - 1) * utf8_type + 1, utf8_type) & 0x03;
 3890          guar_ul = wrapped_tvb_get_guint8(tvb, offset + (10 - 1) * utf8_type + 1, utf8_type);
 3891          /* Octet 13 */
 3892          guar_dl = wrapped_tvb_get_guint8(tvb, offset + (11 - 1) * utf8_type + 1, utf8_type);
 3893   
 3894          src_stat_desc = 0;
 3895          sig_ind = 0;
 3896          max_dl_ext = 0;
 3897          guar_dl_ext = 0;
 3898          max_ul_ext = 0;
 3899          guar_ul_ext =0;
 3900   
 3901          if (length > 13) {
 3902              src_stat_desc = wrapped_tvb_get_guint8(tvb, offset + (12 - 1) * utf8_type + 1, utf8_type)& 0xf;
 3903              sig_ind = wrapped_tvb_get_guint8(tvb, offset + (12 - 1) * utf8_type + 1, utf8_type)& 0x01;
 3904          }
 3905          if (length > 14) {
 3906              max_dl_ext = wrapped_tvb_get_guint8(tvb, offset + (13 - 1) * utf8_type + 1, utf8_type);
 3907              guar_dl_ext = wrapped_tvb_get_guint8(tvb, offset + (14 - 1) * utf8_type + 1, utf8_type);
 3908          }
 3909          if (length > 17) {
 3910              max_ul_ext = wrapped_tvb_get_guint8(tvb, offset + (15 - 1) * utf8_type + 1, utf8_type);
 3911              guar_ul_ext = wrapped_tvb_get_guint8(tvb, offset + (16 - 1) * utf8_type + 1, utf8_type);
 3912          }
 3913   
 3914          /* See above comments for the changes
 3915           * */
 3916          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_traf_class, tvb, offset + (4 - 1) * utf8_type + 1, utf8_type, traf_class);
 3917          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_del_order, tvb, offset + (4 - 1) * utf8_type + 1, utf8_type, del_order);
 3918          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_del_err_sdu, tvb, offset + (4 - 1) * utf8_type + 1, utf8_type, del_err_sdu);
 3919          if (max_sdu_size == 0 || max_sdu_size > 150)
 3920              proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_max_sdu_size, tvb, offset + (5 - 1) * utf8_type + 1, utf8_type, max_sdu_size);
 3921          if (max_sdu_size > 0 && max_sdu_size <= 150) {
 3922              mss = max_sdu_size * 10;
 3923              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_sdu_size, tvb, offset + (5 - 1) * utf8_type + 1, utf8_type, mss,
 3924                                         "Maximum SDU size : %u octets", mss);
 3925          }
 3926   
 3927          if (max_ul == 0 || max_ul == 255)
 3928              proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, max_ul);
 3929          if (max_ul > 0 && max_ul <= 63)
 3930              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, max_ul,
 3931                                         "Maximum bit rate for uplink : %u kbps", max_ul);
 3932          if (max_ul > 63 && max_ul <= 127) {
 3933              mu = 64 + (max_ul - 64) * 8;
 3934              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, mu,
 3935                                         "Maximum bit rate for uplink : %u kbps", mu);
 3936          }
 3937   
 3938          if (max_ul > 127 && max_ul <= 254) {
 3939              mu = 576 + (max_ul - 128) * 64;
 3940              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, mu,
 3941                                         "Maximum bit rate for uplink : %u kbps", mu);
 3942          }
 3943   
 3944          if (max_dl == 0 || max_dl == 255)
 3945              proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, max_dl);
 3946          if (max_dl > 0 && max_dl <= 63)
 3947              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, max_dl,
 3948                                         "Maximum bit rate for downlink : %u kbps", max_dl);
 3949          if (max_dl > 63 && max_dl <= 127) {
 3950              md = 64 + (max_dl - 64) * 8;
 3951              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, md,
 3952                                         "Maximum bit rate for downlink : %u kbps", md);
 3953          }
 3954          if (max_dl > 127 && max_dl <= 254) {
 3955              md = 576 + (max_dl - 128) * 64;
 3956              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, md,
 3957                                         "Maximum bit rate for downlink : %u kbps", md);
 3958          }
 3959   
 3960          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_res_ber, tvb, offset + (8 - 1) * utf8_type + 1, utf8_type, res_ber);
 3961          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_sdu_err_ratio, tvb, offset + (8 - 1) * utf8_type + 1, utf8_type, sdu_err_ratio);
 3962          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_trans_delay, tvb, offset + (9 - 1) * utf8_type + 1, utf8_type, trans_delay);
 3963          proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_traf_handl_prio, tvb, offset + (9 - 1) * utf8_type + 1, utf8_type, traf_handl_prio);
 3964   
 3965          if (guar_ul == 0 || guar_ul == 255)
 3966              proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, guar_ul);
 3967          if (guar_ul > 0 && guar_ul <= 63)
 3968              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, guar_ul,
 3969                                         "Guaranteed bit rate for uplink : %u kbps", guar_ul);
 3970          if (guar_ul > 63 && guar_ul <= 127) {
 3971              gu = 64 + (guar_ul - 64) * 8;
 3972              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, gu,
 3973                                         "Guaranteed bit rate for uplink : %u kbps", gu);
 3974          }
 3975          if (guar_ul > 127 && guar_ul <= 254) {
 3976              gu = 576 + (guar_ul - 128) * 64;
 3977              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, gu,
 3978                                         "Guaranteed bit rate for uplink : %u kbps", gu);
 3979          }
 3980   
 3981          /* Octet 13 */
 3982          if (guar_dl == 0 || guar_dl == 255)
 3983              proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, guar_dl);
 3984          if (guar_dl > 0 && guar_dl <= 63)
 3985              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, guar_dl,
 3986                                         "Guaranteed bit rate for downlink : %u kbps", guar_dl);
 3987          if (guar_dl > 63 && guar_dl <= 127) {
 3988              gd = 64 + (guar_dl - 64) * 8;
 3989              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, gd,
 3990                                         "Guaranteed bit rate for downlink : %u kbps", gd);
 3991          }
 3992          if (guar_dl > 127 && guar_dl <= 254) {
 3993              gd = 576 + (guar_dl - 128) * 64;
 3994              proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, gd,
 3995                                         "Guaranteed bit rate for downlink : %u kbps", gd);
 3996          }
 3997                   
 3998          if(length > 13){
 3999              proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_src_stat_desc, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, src_stat_desc);
 4000              proto_tree_add_boolean(ext_tree_qos, hf_gtp_qos_sig_ind, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, sig_ind);
 4001          }
 4002          if(length > 14){
 4003              /* Octet 15 */
 4004              if (max_dl_ext > 0 && max_dl_ext <= 0x4a) {
 4005                  md = 8600 + max_dl_ext * 100;
 4006                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (13 - 1) * utf8_type + 1, utf8_type, md,
 4007                                             "Ext Maximum bit rate for downlink : %u kbps", md);
 4008              }
 4009              if (max_dl_ext > 0x4a && max_dl_ext <= 0xba) {
 4010                  md = 16 + (max_dl_ext-0x4a);
 4011                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (13 - 1) * utf8_type + 1, utf8_type, md,
 4012                                             "Ext Maximum bit rate for downlink : %u Mbps", md);
 4013              }
 4014              if (max_dl_ext > 0xba && max_dl_ext <= 0xfa) {
 4015                  md = 128 + (max_dl_ext-0xba)*2;
 4016                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (13 - 1) * utf8_type + 1, utf8_type, md,
 4017                                             "Ext Maximum bit rate for downlink : %u Mbps", md);
 4018              }
 4019              /* Octet 16 */
 4020              if(guar_dl_ext == 0)
 4021                  proto_tree_add_text(ext_tree_qos, tvb, offset + (14 - 1) * utf8_type + 1, utf8_type, "Use the value indicated by the Guaranteed bit rate for downlink in octet 13");
 4022              if (guar_dl_ext > 0 && guar_dl_ext <= 0x4a) {
 4023                  gd = 8600 + guar_dl_ext * 100;
 4024                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (14 - 1) * utf8_type + 1, utf8_type, gd,
 4025                                             "Ext Guaranteed bit rate for downlink : %u kbps", gd);
 4026              }
 4027              if (guar_dl_ext > 0x4a && max_dl_ext <= 0xba) {
 4028                  gd = 16 + (guar_dl_ext-0x4a);
 4029                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (14 - 1) * utf8_type + 1, utf8_type, gd,
 4030                                             "Ext Guaranteed bit rate for downlink : %u Mbps", gd);
 4031              }
 4032              if (guar_dl_ext > 0xba && max_dl_ext <= 0xfa) {
 4033                  gd = 128 + (guar_dl_ext-0xba)*2;
 4034                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (14 - 1) * utf8_type + 1, utf8_type, gd,
 4035                                             "Ext Guaranteed bit rate for downlink : %u Mbps", gd);
 4036              }
 4037   
 4038          }
 4039          if(length > 16){
 4040              /* Octet 17
 4041               * This field is an extension of the Maximum bit rate for uplink in octet 8. The coding is identical to that of the Maximum bit
 4042               * rate for downlink (extended).
 4043               */
 4044              if (max_ul_ext > 0 && max_ul_ext <= 0x4a) {
 4045                  md = 8600 + max_ul_ext * 100;
 4046                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (15 - 1) * utf8_type + 1, utf8_type, md,
 4047                                             "Ext Maximum bit rate for uplink : %u kbps", md);
 4048              }
 4049              if (max_ul_ext > 0x4a && max_ul_ext <= 0xba) {
 4050                  md = 16 + (max_ul_ext-0x4a);
 4051                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (15 - 1) * utf8_type + 1, utf8_type, md,
 4052                                             "Ext Maximum bit rate for uplink : %u Mbps", md);
 4053              }
 4054              if (max_ul_ext > 0xba && max_ul_ext <= 0xfa) {
 4055                  md = 128 + (max_ul_ext-0xba)*2;
 4056                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (15 - 1) * utf8_type + 1, utf8_type, md,
 4057                                             "Ext Maximum bit rate for uplink : %u Mbps", md);
 4058              }
 4059              /* Octet 18 */
 4060              if(guar_ul_ext == 0)
 4061                  proto_tree_add_text(ext_tree_qos, tvb, offset + (16 - 1) * utf8_type + 1, utf8_type, "Use the value indicated by the Guaranteed bit rate for uplink in octet 13");
 4062              if (guar_ul_ext > 0 && guar_ul_ext <= 0x4a) {
 4063                  gd = 8600 + guar_ul_ext * 100;
 4064                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (16 - 1) * utf8_type + 1, utf8_type, gd,
 4065                                             "Ext Guaranteed bit rate for uplink : %u kbps", gd);
 4066              }
 4067              if (guar_ul_ext > 0x4a && max_ul_ext <= 0xba) {
 4068                  gd = 16 + (guar_ul_ext-0x4a);
 4069                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (16 - 1) * utf8_type + 1, utf8_type, gd,
 4070                                             "Ext Guaranteed bit rate for uplink : %u Mbps", gd);
 4071              }
 4072              if (guar_ul_ext > 0xba && max_ul_ext <= 0xfa) {
 4073                  gd = 128 + (guar_ul_ext-0xba)*2;
 4074                  proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (16 - 1) * utf8_type + 1, utf8_type, gd,
 4075                                             "Ext Guaranteed bit rate for uplink : %u Mbps", gd);
 4076              }
 4077          }
 4078   
 4079      }
 4080   
 4081      return retval;
 4082  }
Show more  




Change Warning 2621.32200 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: