lib80211(3)

lib802113

Manage net80211 configuration and regulatory database

Usage

#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);

Library

library “lib80211”

Overview

The lib80211 library is an interface to the net80211(4) infrastructure. It implements wrappers around the net80211(4) ioctl command, as well as providing a convenient API to access the regulatory database.

The lib80211_alloc_regdata() and lib80211_free_regdata() function allocates / frees a regdata structure to store regulatory domain information in.

The lib80211_regdomain_readconfig() and lib80211_regdomain_cleanup() functions read in the regulatory database XML configuration and free it when finished.

The lib80211_regdomain_findbysku() and lib80211_regdomain_findbyname() functions look up a regulatory domain entry by SKU enum and SKU name respectively.

The lib80211_country_findbycc() and lib80211_country_findbyname() functions look up a country information entry by ISO country enum and ISO country code string respectively.

Return values

The lib80211_alloc_regdata(), lib80211_regdomain_readconfig(), lib80211_regdomain_findbysku(), lib80211_regdomain_findbyname(), lib80211_country_findbycc(), lib80211_country_findbyname() return NULL upon error.

Releases

25 releases since FreeBSD 11.0-RELEASE; the text changed 11 times.

  1. 11.0
  2. 11.1
  3. 11.2
  4. 11.3
  5. 11.4
  6. 12.0
  7. 12.1
  8. 12.2
  9. 12.3
  10. 12.4
  11. 13.0–13.2
  12. 13.3–16.0

History

The lib80211 library first appeared in FreeBSD 11.0.

Authors

Adrian Chadd

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.