nl80211_close();
#endif
wext_close();
+ iwinfo_close();
}
/*
case 3:
sprintf(desc, "mixed WPA/WPA2 %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(c->pair_ciphers));
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers & c->group_ciphers));
break;
case 2:
sprintf(desc, "WPA2 %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(c->pair_ciphers));
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers & c->group_ciphers));
break;
case 1:
sprintf(desc, "WPA %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(c->pair_ciphers));
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers & c->group_ciphers));
break;
}
}
+ else
+ {
+ sprintf(desc, "None");
+ }
}
else
{
return 1;
}
- return 0;
+ lua_pushnil(L);
+ return 1;
}
/* Wrapper for hwmode list */
-static int iwinfo_L_hwmodelist(lua_State *L, int (*func)(const char*, int *))
+static int iwinfo_L_hwmodelist(lua_State *L, int (*func)(const char *, int *))
{
const char *ifname = luaL_checkstring(L, 1);
int hwmodes = 0;
return 1;
}
- return 0;
+ lua_pushnil(L);
+ return 1;
+}
+
+/* Wrapper for mbbsid_support */
+static int iwinfo_L_mbssid_support(lua_State *L, int (*func)(const char *, int *))
+{
+ const char *ifname = luaL_checkstring(L, 1);
+ int support = 0;
+
+ if( !(*func)(ifname, &support) )
+ {
+ lua_pushboolean(L, support);
+ return 1;
+ }
+
+ lua_pushnil(L);
+ return 1;
}
/* Wrapper for country list */
LUA_WRAP_INT(wl,noise)
LUA_WRAP_INT(wl,quality)
LUA_WRAP_INT(wl,quality_max)
-LUA_WRAP_INT(wl,mbssid_support)
LUA_WRAP_STRING(wl,mode)
LUA_WRAP_STRING(wl,ssid)
LUA_WRAP_STRING(wl,bssid)
LUA_WRAP_LIST(wl,countrylist)
LUA_WRAP_LIST(wl,hwmodelist)
LUA_WRAP_LIST(wl,encryption)
+LUA_WRAP_LIST(wl,mbssid_support)
#endif
#ifdef USE_MADWIFI
LUA_WRAP_INT(madwifi,noise)
LUA_WRAP_INT(madwifi,quality)
LUA_WRAP_INT(madwifi,quality_max)
-LUA_WRAP_INT(madwifi,mbssid_support)
LUA_WRAP_STRING(madwifi,mode)
LUA_WRAP_STRING(madwifi,ssid)
LUA_WRAP_STRING(madwifi,bssid)
LUA_WRAP_LIST(madwifi,countrylist)
LUA_WRAP_LIST(madwifi,hwmodelist)
LUA_WRAP_LIST(madwifi,encryption)
+LUA_WRAP_LIST(madwifi,mbssid_support)
#endif
#ifdef USE_NL80211
LUA_WRAP_INT(nl80211,noise)
LUA_WRAP_INT(nl80211,quality)
LUA_WRAP_INT(nl80211,quality_max)
-LUA_WRAP_INT(nl80211,mbssid_support)
LUA_WRAP_STRING(nl80211,mode)
LUA_WRAP_STRING(nl80211,ssid)
LUA_WRAP_STRING(nl80211,bssid)
LUA_WRAP_LIST(nl80211,countrylist)
LUA_WRAP_LIST(nl80211,hwmodelist)
LUA_WRAP_LIST(nl80211,encryption)
+LUA_WRAP_LIST(nl80211,mbssid_support)
#endif
/* Wext */
LUA_WRAP_INT(wext,noise)
LUA_WRAP_INT(wext,quality)
LUA_WRAP_INT(wext,quality_max)
-LUA_WRAP_INT(wext,mbssid_support)
LUA_WRAP_STRING(wext,mode)
LUA_WRAP_STRING(wext,ssid)
LUA_WRAP_STRING(wext,bssid)
LUA_WRAP_LIST(wext,countrylist)
LUA_WRAP_LIST(wext,hwmodelist)
LUA_WRAP_LIST(wext,encryption)
+LUA_WRAP_LIST(wext,mbssid_support)
#ifdef USE_WL
/* Broadcom table */