| 3019 | } |
| 3020 | |
| 3021 | static const char * |
| 3022 | wpa_cipher(const u_int8_t *sel) |
| 3023 | { |
| 3024 | #define WPA_SEL(x) (((x)<<24)|WPA_OUI) |
| 3025 | u_int32_t w = LE_READ_4(sel); |
| 3026 | |
| 3027 | switch (w) { |
| 3028 | case WPA_SEL(WPA_CSE_NULL): |
| 3029 | return "NONE"; |
| 3030 | case WPA_SEL(WPA_CSE_WEP40): |
| 3031 | return "WEP40"; |
| 3032 | case WPA_SEL(WPA_CSE_WEP104): |
| 3033 | return "WEP104"; |
| 3034 | case WPA_SEL(WPA_CSE_TKIP): |
| 3035 | return "TKIP"; |
| 3036 | case WPA_SEL(WPA_CSE_CCMP): |
| 3037 | return "AES-CCMP"; |
| 3038 | } |
| 3039 | return "?"; /* NB: so 1<< is discarded */ |
| 3040 | #undef WPA_SEL |
| 3041 | } |
| 3042 | |
| 3043 | static const char * |
| 3044 | wpa_keymgmt(const u_int8_t *sel) |