80211(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– NAME πŸ’–

okay bestie, welcome to the 80211(3) Library Functions Manual page for lib80211 β€” and the whole squad is here: lib80211_alloc_regdata, lib80211_free_regdata, lib80211_regdomain_readconfig, lib80211_regdomain_cleanup, lib80211_regdomain_findbysku, lib80211_regdomain_findbyname, lib80211_country_findbycc, and lib80211_country_findbyname. ✨ Their whole vibe? Manage net80211 configuration and the regulatory database. πŸ’…


πŸŽ€ LIBRARY πŸŽ€

it's the library β€œlib80211”, obviously. 🫢


✨ SYNOPSIS ✨

#include <lib80211/lib80211_regdomain.h>
#include <lib80211/lib80211_ioctl.h>

struct regdata *
lib80211_alloc_regdata(void);

void
lib80211_free_regdata(struct regdata *reg);

int
lib80211_regdomain_readconfig(struct regdata *reg, const void *config,
    size_t size);

void
lib80211_regdomain_cleanup(struct regdata *reg);

const struct regdomain *
lib80211_regdomain_findbysku(const struct regdata *reg,
    enumRegDomainCode);

const struct regdomain *
lib80211_regdomain_findbyname(const struct regdata *reg,
    const char *sku);

const struct country *
lib80211_country_findbycc(const struct regdata *reg,
    enum ISOCountryCode);

const struct country *
lib80211_country_findbyname(const struct regdata *reg, const char *cc);

🌸 DESCRIPTION 🌸

so the lib80211 library is basically your interface to the net80211(4) infrastructure. it implements wrappers around the net80211(4) ioctl command, and it also gives you a convenient API to access the regulatory database. iconic behavior, honestly. πŸ‘‘

  • lib80211_alloc_regdata() and lib80211_free_regdata() β€” these allocate / free a regdata structure that stores regulatory domain information in it. πŸŽ€
  • lib80211_regdomain_readconfig() and lib80211_regdomain_cleanup() β€” these read in the regulatory database XML configuration and free it when you're finished. 🧚
  • lib80211_regdomain_findbysku() and lib80211_regdomain_findbyname() β€” these look up a regulatory domain entry by SKU enum and SKU name respectively. πŸ”₯
  • lib80211_country_findbycc() and lib80211_country_findbyname() β€” these look up a country information entry by ISO country enum and ISO country code string respectively. 🌈

😭 RETURN VALUES 😭

these ones return NULL upon error, bestie:

  • lib80211_alloc_regdata()
  • lib80211_regdomain_readconfig()
  • lib80211_regdomain_findbysku()
  • lib80211_regdomain_findbyname()
  • lib80211_country_findbycc()
  • lib80211_country_findbyname()

so yeah, if something goes sideways, you get NULL. no cap. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ HISTORY πŸ‘‘

the lib80211 library first appeared in FreeBSD 11.0. periodt. ⭐


πŸ’œ AUTHORS πŸ’œ

Adrian Chadd. πŸ’–


cute little sign-off: this page is from Debian, dated December 15, 2015. πŸŽ€πŸ«Ά
πŸ“¦ where this page comes from