https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=14136

--- Comment #3 from Nicolas Darchis <ndarc...@cisco.com> ---
I've tried making a fix myself actually.
Simply defined a new MCS index values for 11ac under the existing value_string
peekremote_mcs_index_vals :

static const value_string peekremote_mcs_index_vals_ac[] = {
  { 0, "Modulation type: BPSK, Codingrate: 1/2" },
  { 1, "Modulation type: QPSK, Codingrate: 1/2" },
  { 2, "Modulation type: QPSK, Codingrate: 3/4" },
  { 3, "Modulation type: 16-QAM, Codingrate: 1/2" },
  { 4, "Modulation type: 16-QAM, Codingrate: 3/4" },
  { 5, "Modulation type: 64-QAM, Codingrate: 2/3" },
  { 6, "Modulation type: 64-QAM, Codingrate: 3/4" },
  { 7, "Modulation type: 64-QAM, Codingrate: 5/6" },
  { 8, "Modulation type: 256-QAM, Codingrate: 3/4" },
  { 9, "Modulation type: 256-QAM, Codingrate: 5/6" },
  { 0, NULL }
};

the only catch is that at the time the MCS value is inserted in the current
code we didn't take a look at the 11ac flag yet. So I've added an if that goes
check further in the offset for the 11ac flag. Not very good programming but
i'm not pretending to be a good programmer :-)

  case 2:
    if (header_size != 55) {
      expert_add_info(pinfo, ti_header_size,
&ei_peekremote_invalid_header_size);
      if (header_size > 9)
        offset += (header_size - 9);
    } else {
      proto_tree_add_item(peekremote_tree, &hfi_peekremote_type, tvb, offset,
4, ENC_BIG_ENDIAN);
      offset += 4;
      mcs_index = tvb_get_ntohs(tvb, offset);
      extflags = tvb_get_ntohl(tvb, offset+12);
      if (extflags & EXT_FLAG_802_11ac)
        proto_tree_add_item(peekremote_tree, &hfi_peekremote_mcs_index_ac, tvb,
offset, 2, ENC_BIG_ENDIAN);
        else
        proto_tree_add_item(peekremote_tree, &hfi_peekremote_mcs_index, tvb,
offset, 2, ENC_BIG_ENDIAN);

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to