MCPcopy Index your code
hub / github.com/F-Stack/f-stack / set80211protmode

Function set80211protmode

tools/ifconfig/ifieee80211.c:1024–1040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1022}
1023
1024static void
1025set80211protmode(const char *val, int d, int s, const struct afswtch *rafp)
1026{
1027 int mode;
1028
1029 if (strcasecmp(val, "off") == 0) {
1030 mode = IEEE80211_PROTMODE_OFF;
1031 } else if (strcasecmp(val, "cts") == 0) {
1032 mode = IEEE80211_PROTMODE_CTS;
1033 } else if (strncasecmp(val, "rtscts", 3) == 0) {
1034 mode = IEEE80211_PROTMODE_RTSCTS;
1035 } else {
1036 errx(1, "unknown protection mode");
1037 }
1038
1039 set80211(s, IEEE80211_IOC_PROTMODE, mode, 0, NULL);
1040}
1041
1042static void
1043set80211htprotmode(const char *val, int d, int s, const struct afswtch *rafp)

Callers

nothing calls this directly

Calls 3

strcasecmpFunction · 0.85
strncasecmpFunction · 0.85
set80211Function · 0.85

Tested by

no test coverage detected