Lines Matching refs:RSN_SELECTOR_LEN
77 static const int RSN_SELECTOR_LEN = 4;
310 if (os_memcmp(s, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN) == 0)
312 if (os_memcmp(s, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN) == 0)
314 if (os_memcmp(s, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN) == 0)
316 if (os_memcmp(s, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN) == 0)
318 if (os_memcmp(s, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN) == 0)
321 if (os_memcmp(s, RSN_CIPHER_SUITE_AES_128_CMAC, RSN_SELECTOR_LEN) == 0)
330 if (os_memcmp(s, RSN_AUTH_KEY_MGMT_UNSPEC_802_1X, RSN_SELECTOR_LEN) ==
333 if (os_memcmp(s, RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X, RSN_SELECTOR_LEN)
353 *pos++ = RSN_SELECTOR_LEN + data_len;
354 os_memcpy(pos, kde, RSN_SELECTOR_LEN);
355 pos += RSN_SELECTOR_LEN;
519 if (left >= RSN_SELECTOR_LEN) {
528 pos += RSN_SELECTOR_LEN;
529 left -= RSN_SELECTOR_LEN;
541 if (count == 0 || left < count * RSN_SELECTOR_LEN) {
548 pos += RSN_SELECTOR_LEN;
549 left -= RSN_SELECTOR_LEN;
569 if (count == 0 || left < count * RSN_SELECTOR_LEN) {
576 pos += RSN_SELECTOR_LEN;
577 left -= RSN_SELECTOR_LEN;
616 pos += RSN_SELECTOR_LEN;
617 left -= RSN_SELECTOR_LEN;
736 if (rsn_ie_len < sizeof(*hdr) + RSN_SELECTOR_LEN +
737 2 + RSN_SELECTOR_LEN + 2 + RSN_SELECTOR_LEN + 2 +
747 os_memcpy(pos, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN);
749 os_memcpy(pos, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN);
751 os_memcpy(pos, RSN_CIPHER_SUITE_WEP104, RSN_SELECTOR_LEN);
753 os_memcpy(pos, RSN_CIPHER_SUITE_WEP40, RSN_SELECTOR_LEN);
759 pos += RSN_SELECTOR_LEN;
764 os_memcpy(pos, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN);
766 os_memcpy(pos, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN);
768 os_memcpy(pos, RSN_CIPHER_SUITE_NONE, RSN_SELECTOR_LEN);
774 pos += RSN_SELECTOR_LEN;
780 RSN_SELECTOR_LEN);
783 RSN_SELECTOR_LEN);
789 pos += RSN_SELECTOR_LEN;
818 RSN_SELECTOR_LEN);
819 pos += RSN_SELECTOR_LEN;
1094 os_memcpy(pos, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN);
1095 pos += RSN_SELECTOR_LEN;
1101 os_memcpy(pos, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN);
1102 pos += RSN_SELECTOR_LEN;
1106 os_memcpy(pos, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN);
1107 pos += RSN_SELECTOR_LEN;
1117 kde_len = peerkey->rsnie_i_len + 2 + RSN_SELECTOR_LEN + ETH_ALEN;
1224 if (pos + 1 + RSN_SELECTOR_LEN < end &&
1225 pos[1] >= RSN_SELECTOR_LEN + PMKID_LEN &&
1226 os_memcmp(pos + 2, RSN_KEY_DATA_PMKID, RSN_SELECTOR_LEN) == 0) {
1227 ie->pmkid = pos + 2 + RSN_SELECTOR_LEN;
1231 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1232 os_memcmp(pos + 2, RSN_KEY_DATA_GROUPKEY, RSN_SELECTOR_LEN) == 0) {
1233 ie->gtk = pos + 2 + RSN_SELECTOR_LEN;
1234 ie->gtk_len = pos[1] - RSN_SELECTOR_LEN;
1238 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1239 os_memcmp(pos + 2, RSN_KEY_DATA_MAC_ADDR, RSN_SELECTOR_LEN) == 0) {
1240 ie->mac_addr = pos + 2 + RSN_SELECTOR_LEN;
1241 ie->mac_addr_len = pos[1] - RSN_SELECTOR_LEN;
1246 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1247 os_memcmp(pos + 2, RSN_KEY_DATA_SMK, RSN_SELECTOR_LEN) == 0) {
1248 ie->smk = pos + 2 + RSN_SELECTOR_LEN;
1249 ie->smk_len = pos[1] - RSN_SELECTOR_LEN;
1253 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1254 os_memcmp(pos + 2, RSN_KEY_DATA_NONCE, RSN_SELECTOR_LEN) == 0) {
1255 ie->nonce = pos + 2 + RSN_SELECTOR_LEN;
1256 ie->nonce_len = pos[1] - RSN_SELECTOR_LEN;
1260 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1261 os_memcmp(pos + 2, RSN_KEY_DATA_LIFETIME, RSN_SELECTOR_LEN) == 0) {
1262 ie->lifetime = pos + 2 + RSN_SELECTOR_LEN;
1263 ie->lifetime_len = pos[1] - RSN_SELECTOR_LEN;
1267 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1268 os_memcmp(pos + 2, RSN_KEY_DATA_ERROR, RSN_SELECTOR_LEN) == 0) {
1269 ie->error = pos + 2 + RSN_SELECTOR_LEN;
1270 ie->error_len = pos[1] - RSN_SELECTOR_LEN;
1276 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1277 os_memcmp(pos + 2, RSN_KEY_DATA_DHV, RSN_SELECTOR_LEN) == 0) {
1278 ie->dhv = pos + 2 + RSN_SELECTOR_LEN;
1279 ie->dhv_len = pos[1] - RSN_SELECTOR_LEN;
1283 if (pos[1] > RSN_SELECTOR_LEN + 2 &&
1284 os_memcmp(pos + 2, RSN_KEY_DATA_IGTK, RSN_SELECTOR_LEN) == 0) {
1285 ie->igtk = pos + 2 + RSN_SELECTOR_LEN;
1286 ie->igtk_len = pos[1] - RSN_SELECTOR_LEN;
2143 kde_len = 2 + RSN_SELECTOR_LEN + sizeof(error);
2145 kde_len += 2 + RSN_SELECTOR_LEN + ETH_ALEN;
2209 2 + RSN_SELECTOR_LEN + ETH_ALEN +
2210 2 + RSN_SELECTOR_LEN + WPA_NONCE_LEN;
2337 os_memcpy(pos, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN);
2338 pos += RSN_SELECTOR_LEN;
2343 os_memcpy(pos, RSN_CIPHER_SUITE_CCMP, RSN_SELECTOR_LEN);
2345 os_memcpy(pos, RSN_CIPHER_SUITE_TKIP, RSN_SELECTOR_LEN);
2346 pos += RSN_SELECTOR_LEN;
2402 kde_len = 2 + RSN_SELECTOR_LEN + PMKID_LEN;
2461 2 + RSN_SELECTOR_LEN + sizeof(lifetime);
2758 2 + RSN_SELECTOR_LEN + sizeof(lifetime) +
2759 2 + RSN_SELECTOR_LEN + PMKID_LEN;