Lines Matching +full:rates +full:- +full:mcs

27 #include "netdissect-stdinc.h"
123 { CTRL_PS_POLL, "Power Save-Poll" },
124 { CTRL_RTS, "Request-To-Send" },
125 { CTRL_CTS, "Clear-To-Send" },
127 { CTRL_CF_END, "CF-End" },
128 { CTRL_END_ACK, "CF-End+CF-Ack" },
151 * bits - CF-Ack, CF-Poll, Null (means the frame doesn't actually have
205 uint8_t text[254]; /* 1-253 + 1 for null */
279 struct rates_t rates; member
407 if (p.rates.length != 0) { \
408 for (u_int z = 0; z < p.rates.length ; z++) { \
409 PRINT_RATE(sep, p.rates.rate[z], \
410 (p.rates.rate[z] & 0x80 ? "*" : "")); \
428 * the MCS index (0-76);
435 /* MCS 0 */
440 /* MCS 1 */
445 /* MCS 2 */
450 /* MCS 3 */
455 /* MCS 4 */
460 /* MCS 5 */
465 /* MCS 6 */
470 /* MCS 7 */
475 /* MCS 8 */
480 /* MCS 9 */
485 /* MCS 10 */
490 /* MCS 11 */
495 /* MCS 12 */
500 /* MCS 13 */
505 /* MCS 14 */
510 /* MCS 15 */
515 /* MCS 16 */
520 /* MCS 17 */
525 /* MCS 18 */
530 /* MCS 19 */
535 /* MCS 20 */
540 /* MCS 21 */
545 /* MCS 22 */
550 /* MCS 23 */
555 /* MCS 24 */
560 /* MCS 25 */
565 /* MCS 26 */
570 /* MCS 27 */
575 /* MCS 28 */
580 /* MCS 29 */
585 /* MCS 30 */
590 /* MCS 31 */
595 /* MCS 32 */
600 /* MCS 33 */
605 /* MCS 34 */
610 /* MCS 35 */
615 /* MCS 36 */
620 /* MCS 37 */
625 /* MCS 38 */
630 /* MCS 39 */
635 /* MCS 40 */
640 /* MCS 41 */
645 /* MCS 42 */
650 /* MCS 43 */
655 /* MCS 44 */
660 /* MCS 45 */
665 /* MCS 46 */
670 /* MCS 47 */
675 /* MCS 48 */
680 /* MCS 49 */
685 /* MCS 50 */
690 /* MCS 51 */
695 /* MCS 52 */
700 /* MCS 53 */
705 /* MCS 54 */
710 /* MCS 55 */
715 /* MCS 56 */
720 /* MCS 57 */
725 /* MCS 58 */
730 /* MCS 59 */
735 /* MCS 60 */
740 /* MCS 61 */
745 /* MCS 62 */
750 /* MCS 63 */
755 /* MCS 64 */
760 /* MCS 65 */
765 /* MCS 66 */
770 /* MCS 67 */
775 /* MCS 68 */
780 /* MCS 69 */
785 /* MCS 70 */
790 /* MCS 71 */
795 /* MCS 72 */
800 /* MCS 73 */
805 /* MCS 74 */
810 /* MCS 75 */
815 /* MCS 76 */
852 "all of the data rates in the BSSBasicRateSet parameter, "
853 "the Basic HT-MCS Set field of the HT Operation "
854 "parameter, or the Basic VHT-MCS and NSS Set field in "
878 "Unspecified, QoS-related failure", /* 32 */
882 "Association denied due to excessive frame loss rates and/or "
946 "U-APSD coexistence is not supported", /* 73 */
947 "Requested U-APSD coexistence mode is not supported", /* 74 */
949 "supported with U-APSD coexistence", /* 75 */
950 "Authentication is rejected because an Anti-Clogging "
966 "Reject because of U-PID setting", /* 89 */
983 "more Multi-band elements are included that can "
1024 "4-Way Handshake timeout", /* 15 */
1026 "Information element in 4-Way Handshake different from (Re)Association"
1035 "TDLS direct-link teardown due to TDLS peer STA "
1037 "TDLS direct-link teardown for unspecified reason", /* 26 */
1047 "Disassociated for unspecified, QoS-related reason", /* 32 */
1137 struct rates_t rates; in parse_elements() local
1145 pbody->challenge_present = 0; in parse_elements()
1146 pbody->ssid_present = 0; in parse_elements()
1147 pbody->rates_present = 0; in parse_elements()
1148 pbody->ds_present = 0; in parse_elements()
1149 pbody->cf_present = 0; in parse_elements()
1150 pbody->tim_present = 0; in parse_elements()
1168 length -= 2; in parse_elements()
1170 if (ssid.length > sizeof(ssid.ssid) - 1) in parse_elements()
1174 length -= ssid.length; in parse_elements()
1184 if (!pbody->ssid_present) { in parse_elements()
1185 pbody->ssid = ssid; in parse_elements()
1186 pbody->ssid_present = 1; in parse_elements()
1192 length -= 2; in parse_elements()
1195 sizeof(challenge.text) - 1) in parse_elements()
1200 length -= challenge.length; in parse_elements()
1210 if (!pbody->challenge_present) { in parse_elements()
1211 pbody->challenge = challenge; in parse_elements()
1212 pbody->challenge_present = 1; in parse_elements()
1216 rates.length = elementlen; in parse_elements()
1218 length -= 2; in parse_elements()
1219 if (rates.length != 0) { in parse_elements()
1220 if (rates.length > sizeof(rates.rate)) in parse_elements()
1222 memcpy(&rates.rate, p + offset, rates.length); in parse_elements()
1223 offset += rates.length; in parse_elements()
1224 length -= rates.length; in parse_elements()
1229 * If we haven't already seen a rates IE, in parse_elements()
1230 * copy this one if it's not zero-length, in parse_elements()
1234 * We ignore zero-length rates IEs as some in parse_elements()
1235 * devices seem to put a zero-length rates in parse_elements()
1237 * a non-zero-length rates IE into frames, in parse_elements()
1238 * even though IEEE Std 802.11-2007 doesn't in parse_elements()
1239 * seem to indicate that a zero-length rates in parse_elements()
1242 if (!pbody->rates_present && rates.length != 0) { in parse_elements()
1243 pbody->rates = rates; in parse_elements()
1244 pbody->rates_present = 1; in parse_elements()
1250 length -= 2; in parse_elements()
1253 length -= ds.length; in parse_elements()
1258 length -= 1; in parse_elements()
1266 if (!pbody->ds_present) { in parse_elements()
1267 pbody->ds = ds; in parse_elements()
1268 pbody->ds_present = 1; in parse_elements()
1274 length -= 2; in parse_elements()
1277 length -= cf.length; in parse_elements()
1282 length -= 1; in parse_elements()
1285 length -= 1; in parse_elements()
1288 length -= 2; in parse_elements()
1291 length -= 2; in parse_elements()
1299 if (!pbody->cf_present) { in parse_elements()
1300 pbody->cf = cf; in parse_elements()
1301 pbody->cf_present = 1; in parse_elements()
1307 length -= 2; in parse_elements()
1310 length -= tim.length; in parse_elements()
1313 if (tim.length - 3U > sizeof(tim.bitmap)) in parse_elements()
1317 length -= 1; in parse_elements()
1320 length -= 1; in parse_elements()
1323 length -= 1; in parse_elements()
1324 memcpy(tim.bitmap, p + offset, tim.length - 3); in parse_elements()
1325 offset += tim.length - 3; in parse_elements()
1326 length -= tim.length - 3; in parse_elements()
1334 if (!pbody->tim_present) { in parse_elements()
1335 pbody->tim = tim; in parse_elements()
1336 pbody->tim_present = 1; in parse_elements()
1345 length -= 2 + elementlen; in parse_elements()
1377 length -= IEEE802_11_TSTAMP_LEN; in handle_beacon()
1380 length -= IEEE802_11_BCNINT_LEN; in handle_beacon()
1383 length -= IEEE802_11_CAPINFO_LEN; in handle_beacon()
1413 length -= IEEE802_11_CAPINFO_LEN; in handle_assoc_request()
1416 length -= IEEE802_11_LISTENINT_LEN; in handle_assoc_request()
1444 length -= IEEE802_11_CAPINFO_LEN; in handle_assoc_response()
1447 length -= IEEE802_11_STATUS_LEN; in handle_assoc_response()
1450 length -= IEEE802_11_AID_LEN; in handle_assoc_response()
1482 length -= IEEE802_11_CAPINFO_LEN; in handle_reassoc_request()
1485 length -= IEEE802_11_LISTENINT_LEN; in handle_reassoc_request()
1488 length -= IEEE802_11_AP_LEN; in handle_reassoc_request()
1543 length -= IEEE802_11_TSTAMP_LEN; in handle_probe_response()
1546 length -= IEEE802_11_BCNINT_LEN; in handle_probe_response()
1549 length -= IEEE802_11_CAPINFO_LEN; in handle_probe_response()
1607 length -= 2; in handle_auth()
1610 length -= 2; in handle_auth()
1613 length -= 2; in handle_auth()
1620 ND_PRINT(" (%s)-%x [Challenge Text] %s", in handle_auth()
1631 ND_PRINT(" (%s)-%x: %s", in handle_auth()
1665 if (ndo->ndo_eflag) { in handle_deauth()
1732 if (ndo->ndo_eflag) { in handle_action()
1817 /* XXX - requires special handling */ in ctrl_body_print()
1821 if (!ndo->ndo_eflag) in ctrl_body_print()
1823 GET_ETHERADDR_STRING(((const struct ctrl_bar_hdr_t *)p)->ra), in ctrl_body_print()
1824 GET_ETHERADDR_STRING(((const struct ctrl_bar_hdr_t *)p)->ta), in ctrl_body_print()
1825 GET_LE_U_2(((const struct ctrl_bar_hdr_t *)p)->ctl), in ctrl_body_print()
1826 GET_LE_U_2(((const struct ctrl_bar_hdr_t *)p)->seq)); in ctrl_body_print()
1830 if (!ndo->ndo_eflag) in ctrl_body_print()
1832 GET_ETHERADDR_STRING(((const struct ctrl_ba_hdr_t *)p)->ra)); in ctrl_body_print()
1837 GET_LE_U_2(((const struct ctrl_ps_poll_hdr_t *)p)->aid)); in ctrl_body_print()
1841 if (!ndo->ndo_eflag) in ctrl_body_print()
1843 GET_ETHERADDR_STRING(((const struct ctrl_rts_hdr_t *)p)->ta)); in ctrl_body_print()
1847 if (!ndo->ndo_eflag) in ctrl_body_print()
1849 GET_ETHERADDR_STRING(((const struct ctrl_cts_hdr_t *)p)->ra)); in ctrl_body_print()
1853 if (!ndo->ndo_eflag) in ctrl_body_print()
1855 GET_ETHERADDR_STRING(((const struct ctrl_ack_hdr_t *)p)->ra)); in ctrl_body_print()
1859 if (!ndo->ndo_eflag) in ctrl_body_print()
1861 GET_ETHERADDR_STRING(((const struct ctrl_end_hdr_t *)p)->ra)); in ctrl_body_print()
1865 if (!ndo->ndo_eflag) in ctrl_body_print()
1867 GET_ETHERADDR_STRING(((const struct ctrl_end_ack_hdr_t *)p)->ra)); in ctrl_body_print()
1876 * Data Frame - Address field contents
1931 *srcp = hp->sa; in get_mgmt_src_dst_mac()
1933 *dstp = hp->da; in get_mgmt_src_dst_mac()
1997 GET_ETHERADDR_STRING((hp)->bssid), GET_ETHERADDR_STRING((hp)->da), in mgmt_header_print()
1998 GET_ETHERADDR_STRING((hp)->sa)); in mgmt_header_print()
2007 GET_ETHERADDR_STRING(((const struct ctrl_bar_hdr_t *)p)->ra), in ctrl_header_print()
2008 GET_ETHERADDR_STRING(((const struct ctrl_bar_hdr_t *)p)->ta), in ctrl_header_print()
2009 GET_LE_U_2(((const struct ctrl_bar_hdr_t *)p)->ctl), in ctrl_header_print()
2010 GET_LE_U_2(((const struct ctrl_bar_hdr_t *)p)->seq)); in ctrl_header_print()
2014 GET_ETHERADDR_STRING(((const struct ctrl_ba_hdr_t *)p)->ra), in ctrl_header_print()
2015 GET_ETHERADDR_STRING(((const struct ctrl_ba_hdr_t *)p)->ta)); in ctrl_header_print()
2019 GET_ETHERADDR_STRING(((const struct ctrl_ps_poll_hdr_t *)p)->bssid), in ctrl_header_print()
2020 GET_ETHERADDR_STRING(((const struct ctrl_ps_poll_hdr_t *)p)->ta)); in ctrl_header_print()
2024 GET_ETHERADDR_STRING(((const struct ctrl_rts_hdr_t *)p)->ra), in ctrl_header_print()
2025 GET_ETHERADDR_STRING(((const struct ctrl_rts_hdr_t *)p)->ta)); in ctrl_header_print()
2029 GET_ETHERADDR_STRING(((const struct ctrl_cts_hdr_t *)p)->ra)); in ctrl_header_print()
2033 GET_ETHERADDR_STRING(((const struct ctrl_ack_hdr_t *)p)->ra)); in ctrl_header_print()
2037 GET_ETHERADDR_STRING(((const struct ctrl_end_hdr_t *)p)->ra), in ctrl_header_print()
2038 GET_ETHERADDR_STRING(((const struct ctrl_end_hdr_t *)p)->bssid)); in ctrl_header_print()
2042 GET_ETHERADDR_STRING(((const struct ctrl_end_ack_hdr_t *)p)->ra), in ctrl_header_print()
2043 GET_ETHERADDR_STRING(((const struct ctrl_end_ack_hdr_t *)p)->bssid)); in ctrl_header_print()
2046 /* We shouldn't get here - we should already have quit */ in ctrl_header_print()
2109 if (ndo->ndo_vflag) { in ieee_802_11_hdr_print()
2124 GET_LE_U_2(((const struct mgmt_header_t *)p)->duration)); in ieee_802_11_hdr_print()
2128 (const struct meshcntl_t *)(p + hdrlen - meshdrlen); in ieee_802_11_hdr_print()
2129 u_int ae = GET_U_1(mc->flags) & 3; in ieee_802_11_hdr_print()
2132 GET_U_1(mc->ttl), GET_LE_U_4(mc->seq)); in ieee_802_11_hdr_print()
2134 ND_PRINT(" A4:%s", GET_ETHERADDR_STRING(mc->addr4)); in ieee_802_11_hdr_print()
2136 ND_PRINT(" A5:%s", GET_ETHERADDR_STRING(mc->addr5)); in ieee_802_11_hdr_print()
2138 ND_PRINT(" A6:%s", GET_ETHERADDR_STRING(mc->addr6)); in ieee_802_11_hdr_print()
2167 ndo->ndo_protocol = "802.11"; in ieee802_11_print()
2174 length -= fcslen; in ieee802_11_print()
2177 fcslen = caplen - length; in ieee802_11_print()
2178 caplen -= fcslen; in ieee802_11_print()
2179 ndo->ndo_snapend -= fcslen; in ieee802_11_print()
2195 if (ndo->ndo_Hflag && FC_TYPE(fc) == T_DATA && in ieee802_11_print()
2211 if (ndo->ndo_eflag) in ieee802_11_print()
2217 length -= hdrlen; in ieee802_11_print()
2218 caplen -= hdrlen; in ieee802_11_print()
2225 get_mgmt_src_dst_mac(p - hdrlen, &src.addr, &dst.addr); in ieee802_11_print()
2232 if (!ctrl_body_print(ndo, fc, p - hdrlen)) { in ieee802_11_print()
2239 return hdrlen; /* no-data frame */ in ieee802_11_print()
2248 get_data_src_dst_mac(fc, p - hdrlen, &src.addr, &dst.addr); in ieee802_11_print()
2255 if (!ndo->ndo_suppress_default_print) in ieee802_11_print()
2257 llc_hdrlen = -llc_hdrlen; in ieee802_11_print()
2263 /* We shouldn't get here - we should already have quit */ in ieee802_11_print()
2272 * to the 802.11 header of the packet, 'h->ts' is the timestamp,
2273 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
2280 ndo->ndo_protocol = "802.11"; in ieee802_11_if_print()
2281 ndo->ndo_ll_hdr_len += ieee802_11_print(ndo, p, h->len, h->caplen, 0, 0); in ieee802_11_if_print()
2285 /* $FreeBSD: projects/clang400-import/contrib/tcpdump/print-802_11.c 276788 2015-01-07 19:55:18Z de…
2288 /*-
2335 * Note well: all radiotap fields are little-endian.
2359 * ---- --------- -----
2363 * Value in microseconds of the MAC's 64-bit 802.11 Time
2376 * For frequency-hopping radios, the hop set (first byte)
2382 * an MCS index and not an IEEE rate.
2459 * uint8_t mcs
2462 * by bitset of flag values, followed by the MCS rate index as
2479 * The Vendor Namespace Field contains three sub-fields. The first
2480 * sub-field is 3 bytes long. It contains the vendor's IEEE 802
2482 * vendor-specific "namespace selector."
2518 #define IEEE80211_CHAN_DYN 0x00400 /* Dynamic CCK-OFDM channel */
2558 * (to 32-bit boundary)
2568 #define IEEE80211_RADIOTAP_MCS_MCS_INDEX_KNOWN 0x02 /* MCS index field */
2658 * We have the MCS field, so this is 11n, regardless in print_chaninfo()
2691 ND_PRINT(" ht/40-"); in print_chaninfo()
2733 ND_PRINT("bad-fcs "); in print_radiotap_field()
2744 * XXX On FreeBSD rate & 0x80 means we have an MCS. On in print_radiotap_field()
2756 * an MCS value, otherwise it's a rate. If in print_radiotap_field()
2758 * "0x80 + MCS index" for MCS indices > 15, in print_radiotap_field()
2761 * setting. Such rates do exist, e.g. 11n in print_radiotap_field()
2762 * MCS 7 at 20 MHz with a long guard interval. in print_radiotap_field()
2766 * XXX - we don't know the channel width in print_radiotap_field()
2771 * use the MCS field, not the Rate field; in print_radiotap_field()
2772 * the MCS field includes not only the in print_radiotap_field()
2773 * MCS index, it also includes bandwidth in print_radiotap_field()
2776 * XXX - can we get the channel width in print_radiotap_field()
2781 ND_PRINT("MCS %u ", rate & 0x7f); in print_radiotap_field()
2857 ND_PRINT("%d tx power ", -tx_attenuation); in print_radiotap_field()
2867 ND_PRINT("%ddB tx attenuation ", -db_tx_attenuation); in print_radiotap_field()
2966 * We know the MCS index. in print_radiotap_field()
2970 * And it's in-range. in print_radiotap_field()
2987 * only report the MCS index. in print_radiotap_field()
2993 * The MCS value is out of range. in print_radiotap_field()
3002 ND_PRINT("%.1f Mb/s MCS %u ", htrate, mcs_index); in print_radiotap_field()
3005 * We at least have the MCS index. in print_radiotap_field()
3008 ND_PRINT("MCS %u ", mcs_index); in print_radiotap_field()
3031 ND_PRINT("RX-STBC%u ", in print_radiotap_field()
3126 u_int nss, mcs; in print_radiotap_field() local
3128 mcs = (mcs_nss[i] & IEEE80211_RADIOTAP_VHT_MCS_MASK) >> IEEE80211_RADIOTAP_VHT_MCS_SHIFT; in print_radiotap_field()
3133 ND_PRINT("User %u MCS %u ", i, mcs); in print_radiotap_field()
3156 return -1; in print_radiotap_field()
3186 next_present = present & (present - 1); in print_in_radiotap_namespace()
3237 ndo->ndo_protocol = "802.11_radio"; in ieee802_11_radio_print()
3245 len = GET_LE_U_2(hdr->it_len); in ieee802_11_radio_print()
3249 * it must be as large as the fixed-length part of in ieee802_11_radio_print()
3265 for (last_presentp = &hdr->it_present; in ieee802_11_radio_print()
3269 nd_cpack_advance(&cpacker, sizeof(hdr->it_present)); /* more bitmaps */ in ieee802_11_radio_print()
3291 for (presentp = &hdr->it_present; presentp <= last_presentp; in ieee802_11_radio_print()
3321 * Fatal error - can't process anything in ieee802_11_radio_print()
3347 * Reset the presence-bitmap index to 0, and in ieee802_11_radio_print()
3361 * Reset the presence-bitmap index to 0, in ieee802_11_radio_print()
3408 return len + ieee802_11_print(ndo, p + len, length - len, caplen - len, pad, in ieee802_11_radio_print()
3424 ndo->ndo_protocol = "802.11_radio_avs"; in ieee802_11_radio_avs_print()
3447 length - caphdr_len, caplen - caphdr_len, 0, 0); in ieee802_11_radio_avs_print()
3473 u_int caplen = h->caplen; in prism_if_print()
3474 u_int length = h->len; in prism_if_print()
3477 ndo->ndo_protocol = "prism"; in prism_if_print()
3480 ndo->ndo_ll_hdr_len += caplen; in prism_if_print()
3487 ndo->ndo_ll_hdr_len += ieee802_11_radio_avs_print(ndo, p, length, caplen); in prism_if_print()
3493 ndo->ndo_ll_hdr_len += caplen; in prism_if_print()
3498 length -= PRISM_HDR_LEN; in prism_if_print()
3499 caplen -= PRISM_HDR_LEN; in prism_if_print()
3500 ndo->ndo_ll_hdr_len += PRISM_HDR_LEN; in prism_if_print()
3501 ndo->ndo_ll_hdr_len += ieee802_11_print(ndo, p, length, caplen, 0, 0); in prism_if_print()
3512 ndo->ndo_protocol = "802.11_radio"; in ieee802_11_radio_if_print()
3513 ndo->ndo_ll_hdr_len += ieee802_11_radio_print(ndo, p, h->len, h->caplen); in ieee802_11_radio_if_print()
3525 ndo->ndo_protocol = "802.11_radio_avs"; in ieee802_11_radio_avs_if_print()
3526 ndo->ndo_ll_hdr_len += ieee802_11_radio_avs_print(ndo, p, h->len, h->caplen); in ieee802_11_radio_avs_if_print()