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

Function wlan_create

tools/ifconfig/ifieee80211.c:5748–5770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5746};
5747
5748static void
5749wlan_create(int s, struct ifreq *ifr)
5750{
5751 static const uint8_t zerobssid[IEEE80211_ADDR_LEN];
5752 char orig_name[IFNAMSIZ];
5753
5754 if (params.icp_parent[0] == '\0')
5755 errx(1, "must specify a parent device (wlandev) when creating "
5756 "a wlan device");
5757 if (params.icp_opmode == IEEE80211_M_WDS &&
5758 memcmp(params.icp_bssid, zerobssid, sizeof(zerobssid)) == 0)
5759 errx(1, "no bssid specified for WDS (use wlanbssid)");
5760 ifr->ifr_data = (caddr_t) &params;
5761 ioctl_ifcreate(s, ifr);
5762
5763 /* XXX preserve original name for ifclonecreate(). */
5764 strlcpy(orig_name, name, sizeof(orig_name));
5765 strlcpy(name, ifr->ifr_name, sizeof(name));
5766
5767 setdefregdomain(s);
5768
5769 strlcpy(name, orig_name, sizeof(name));
5770}
5771
5772static
5773DECL_CMD_FUNC(set80211clone_wlandev, arg, d)

Callers

nothing calls this directly

Calls 3

ioctl_ifcreateFunction · 0.85
setdefregdomainFunction · 0.85
strlcpyFunction · 0.50

Tested by

no test coverage detected