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

Function set80211wepkey

tools/ifconfig/ifieee80211.c:955–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

953}
954
955static void
956set80211wepkey(const char *val, int d, int s, const struct afswtch *rafp)
957{
958 int key = 0;
959 int len;
960 u_int8_t data[IEEE80211_KEYBUF_SIZE];
961
962 if (isdigit((int)val[0]) && val[1] == ':') {
963 key = atoi(val)-1;
964 val += 2;
965 }
966
967 bzero(data, sizeof(data));
968 len = sizeof(data);
969 get_string(val, NULL, data, &len);
970
971 set80211(s, IEEE80211_IOC_WEPKEY, key, len, data);
972}
973
974/*
975 * This function is purely a NetBSD compatibility interface. The NetBSD

Callers

nothing calls this directly

Calls 4

isdigitFunction · 0.85
bzeroFunction · 0.85
set80211Function · 0.85
get_stringFunction · 0.70

Tested by

no test coverage detected