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

Function set80211authmode

tools/ifconfig/ifieee80211.c:855–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855static void
856set80211authmode(const char *val, int d, int s, const struct afswtch *rafp)
857{
858 int mode;
859
860 if (strcasecmp(val, "none") == 0) {
861 mode = IEEE80211_AUTH_NONE;
862 } else if (strcasecmp(val, "open") == 0) {
863 mode = IEEE80211_AUTH_OPEN;
864 } else if (strcasecmp(val, "shared") == 0) {
865 mode = IEEE80211_AUTH_SHARED;
866 } else if (strcasecmp(val, "8021x") == 0) {
867 mode = IEEE80211_AUTH_8021X;
868 } else if (strcasecmp(val, "wpa") == 0) {
869 mode = IEEE80211_AUTH_WPA;
870 } else {
871 errx(1, "unknown authmode");
872 }
873
874 set80211(s, IEEE80211_IOC_AUTHMODE, mode, 0, NULL);
875}
876
877static void
878set80211powersavemode(const char *val, int d, int s, const struct afswtch *rafp)

Callers

nothing calls this directly

Calls 2

strcasecmpFunction · 0.85
set80211Function · 0.85

Tested by

no test coverage detected