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

Function printcountry

tools/ifconfig/ifieee80211.c:3508–3527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3506}
3507
3508static void
3509printcountry(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
3510{
3511 const struct ieee80211_country_ie *cie =
3512 (const struct ieee80211_country_ie *) ie;
3513 int i, nbands, schan, nchan;
3514
3515 printf("%s<%c%c%c", tag, cie->cc[0], cie->cc[1], cie->cc[2]);
3516 nbands = (cie->len - 3) / sizeof(cie->band[0]);
3517 for (i = 0; i < nbands; i++) {
3518 schan = cie->band[i].schan;
3519 nchan = cie->band[i].nchan;
3520 if (nchan != 1)
3521 printf(" %u-%u,%u", schan, schan + nchan-1,
3522 cie->band[i].maxtxpwr);
3523 else
3524 printf(" %u,%u", schan, cie->band[i].maxtxpwr);
3525 }
3526 printf(">");
3527}
3528
3529static __inline int
3530iswpaoui(const u_int8_t *frm)

Callers 1

printiesFunction · 0.85

Calls 1

printfFunction · 0.50

Tested by

no test coverage detected