MCPcopy Create free account
hub / github.com/F-Stack/f-stack / printwpaie

Function printwpaie

tools/ifconfig/ifieee80211.c:3061–3103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3059}
3060
3061static void
3062printwpaie(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
3063{
3064 u_int8_t len = ie[1];
3065
3066 printf("%s", tag);
3067 if (verbose) {
3068 const char *sep;
3069 int n;
3070
3071 ie += 6, len -= 4; /* NB: len is payload only */
3072
3073 printf("<v%u", LE_READ_2(ie));
3074 ie += 2, len -= 2;
3075
3076 printf(" mc:%s", wpa_cipher(ie));
3077 ie += 4, len -= 4;
3078
3079 /* unicast ciphers */
3080 n = LE_READ_2(ie);
3081 ie += 2, len -= 2;
3082 sep = " uc:";
3083 for (; n > 0; n--) {
3084 printf("%s%s", sep, wpa_cipher(ie));
3085 ie += 4, len -= 4;
3086 sep = "+";
3087 }
3088
3089 /* key management algorithms */
3090 n = LE_READ_2(ie);
3091 ie += 2, len -= 2;
3092 sep = " km:";
3093 for (; n > 0; n--) {
3094 printf("%s%s", sep, wpa_keymgmt(ie));
3095 ie += 4, len -= 4;
3096 sep = "+";
3097 }
3098
3099 if (len > 2) /* optional capabilities */
3100 printf(", caps 0x%x", LE_READ_2(ie));
3101 printf(">");
3102 }
3103}
3104
3105static const char *
3106rsn_cipher(const u_int8_t *sel)

Callers 1

printiesFunction · 0.85

Calls 3

wpa_cipherFunction · 0.70
wpa_keymgmtFunction · 0.70
printfFunction · 0.50

Tested by

no test coverage detected