o change _db_show_key to always dump the contents instead of checking
IEEE80211_KEY_DEVKEY o fix channel power printing (they are signed values) o add show statab to dump a node table and automatically dump the sta table of a com structure with /s
This commit is contained in:
parent
102720b585
commit
30a4e0680d
@ -61,6 +61,8 @@ static void _db_show_vap(const struct ieee80211vap *, int);
|
||||
static void _db_show_com(const struct ieee80211com *,
|
||||
int showvaps, int showsta, int showprocs);
|
||||
|
||||
static void _db_show_node_table(const char *tag,
|
||||
const struct ieee80211_node_table *);
|
||||
static void _db_show_channel(const char *tag, const struct ieee80211_channel *);
|
||||
static void _db_show_ssid(const char *tag, int ix, int len, const uint8_t *);
|
||||
static void _db_show_appie(const char *tag, const struct ieee80211_appie *);
|
||||
@ -80,6 +82,15 @@ DB_SHOW_COMMAND(sta, db_show_sta)
|
||||
_db_show_sta((const struct ieee80211_node *) addr);
|
||||
}
|
||||
|
||||
DB_SHOW_COMMAND(statab, db_show_statab)
|
||||
{
|
||||
if (!have_addr) {
|
||||
db_printf("usage: show statab <addr>\n");
|
||||
return;
|
||||
}
|
||||
_db_show_node_table("", (const struct ieee80211_node_table *) addr);
|
||||
}
|
||||
|
||||
DB_SHOW_COMMAND(vap, db_show_vap)
|
||||
{
|
||||
int i, showprocs = 0;
|
||||
@ -509,9 +520,12 @@ _db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, int showp
|
||||
db_printf("\n");
|
||||
|
||||
db_printf("\tmax_keyix %d", ic->ic_max_keyix);
|
||||
db_printf(" sta %p", &ic->ic_sta);
|
||||
db_printf(" wme %p", &ic->ic_wme);
|
||||
if (!showsta)
|
||||
db_printf(" sta %p", &ic->ic_sta);
|
||||
db_printf("\n");
|
||||
if (showsta)
|
||||
_db_show_node_table("\t", &ic->ic_sta);
|
||||
|
||||
db_printf("\tprotmode %d", ic->ic_protmode);
|
||||
db_printf(" nonerpsta %u", ic->ic_nonerpsta);
|
||||
@ -575,6 +589,26 @@ _db_show_com(const struct ieee80211com *ic, int showvaps, int showsta, int showp
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_db_show_node_table(const char *tag, const struct ieee80211_node_table *nt)
|
||||
{
|
||||
int i;
|
||||
|
||||
db_printf("%s%s@%p:\n", tag, nt->nt_name, nt);
|
||||
db_printf("%s nodelock %p", tag, &nt->nt_nodelock);
|
||||
db_printf(" inact_init %d", nt->nt_inact_init);
|
||||
db_printf(" scanlock %p", &nt->nt_scanlock);
|
||||
db_printf(" scangen %u\n", nt->nt_scangen);
|
||||
db_printf("%s keyixmax %d keyixmap %p\n",
|
||||
tag, nt->nt_keyixmax, nt->nt_keyixmap);
|
||||
for (i = 0; i < nt->nt_keyixmax; i++) {
|
||||
const struct ieee80211_node *ni = nt->nt_keyixmap[i];
|
||||
if (ni != NULL)
|
||||
db_printf("%s [%3u] %p %s\n", tag, i, ni,
|
||||
ether_sprintf(ni->ni_macaddr));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_db_show_channel(const char *tag, const struct ieee80211_channel *c)
|
||||
{
|
||||
@ -584,7 +618,7 @@ _db_show_channel(const char *tag, const struct ieee80211_channel *c)
|
||||
else if (c == IEEE80211_CHAN_ANYC)
|
||||
db_printf("<ANY>");
|
||||
else
|
||||
db_printf("[%u (%u) flags=%b maxreg %u maxpow %u minpow %u state 0x%x extieee %u]",
|
||||
db_printf("[%u (%u) flags=%b maxreg %d maxpow %d minpow %d state 0x%x extieee %u]",
|
||||
c->ic_freq, c->ic_ieee,
|
||||
c->ic_flags, IEEE80211_CHAN_BITS,
|
||||
c->ic_maxregpower, c->ic_maxpower, c->ic_minpower,
|
||||
@ -639,8 +673,6 @@ _db_show_key(const char *tag, int ix, const struct ieee80211_key *wk)
|
||||
const struct ieee80211_cipher *cip = wk->wk_cipher;
|
||||
int keylen = wk->wk_keylen;
|
||||
|
||||
if ((wk->wk_flags & IEEE80211_KEY_DEVKEY) == 0)
|
||||
return;
|
||||
db_printf(tag, ix);
|
||||
switch (cip->ic_cipher) {
|
||||
case IEEE80211_CIPHER_WEP:
|
||||
|
Loading…
Reference in New Issue
Block a user