1127be1a7SAdrian Chadd.\" Copyright (c) 2015 Adrian Chadd. 2127be1a7SAdrian Chadd.\" All rights reserved. 3127be1a7SAdrian Chadd.\" 4127be1a7SAdrian Chadd.\" Redistribution and use in source and binary forms, with or without 5127be1a7SAdrian Chadd.\" modification, are permitted provided that the following conditions 6127be1a7SAdrian Chadd.\" are met: 7127be1a7SAdrian Chadd.\" 1. Redistributions of source code must retain the above copyright 8127be1a7SAdrian Chadd.\" notice, this list of conditions and the following disclaimer. 9127be1a7SAdrian Chadd.\" 2. Redistributions in binary form must reproduce the above copyright 10127be1a7SAdrian Chadd.\" notice, this list of conditions and the following disclaimer in the 11127be1a7SAdrian Chadd.\" documentation and/or other materials provided with the distribution. 12127be1a7SAdrian Chadd.\" 13127be1a7SAdrian Chadd.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14127be1a7SAdrian Chadd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15127be1a7SAdrian Chadd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16127be1a7SAdrian Chadd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17127be1a7SAdrian Chadd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18127be1a7SAdrian Chadd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19127be1a7SAdrian Chadd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20127be1a7SAdrian Chadd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21127be1a7SAdrian Chadd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22127be1a7SAdrian Chadd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23127be1a7SAdrian Chadd.\" SUCH DAMAGE. 24127be1a7SAdrian Chadd.\" 25ef7f1005SChristian Brueffer.Dd December 15, 2015 26127be1a7SAdrian Chadd.Dt 80211 3 27127be1a7SAdrian Chadd.Os 28127be1a7SAdrian Chadd.Sh NAME 29127be1a7SAdrian Chadd.Nm lib80211_alloc_regdata , 30127be1a7SAdrian Chadd.Nm lib80211_free_regdata , 31127be1a7SAdrian Chadd.Nm lib80211_regdomain_readconfig , 32127be1a7SAdrian Chadd.Nm lib80211_regdomain_cleanup , 33127be1a7SAdrian Chadd.Nm lib80211_regdomain_findbysku , 34127be1a7SAdrian Chadd.Nm lib80211_regdomain_findbyname , 35127be1a7SAdrian Chadd.Nm lib80211_country_findbycc , 36127be1a7SAdrian Chadd.Nm lib80211_country_findbyname 37*a9a393b3SEdward Tomasz Napierala.Nd manage net80211 configuration and regulatory database 38127be1a7SAdrian Chadd.Sh LIBRARY 39127be1a7SAdrian Chadd.Lb lib80211 40127be1a7SAdrian Chadd.Sh SYNOPSIS 41127be1a7SAdrian Chadd.In lib80211/lib80211_regdomain.h 42127be1a7SAdrian Chadd.In lib80211/lib80211_ioctl.h 43127be1a7SAdrian Chadd.Ft struct regdata * 44127be1a7SAdrian Chadd.Fn lib80211_alloc_regdata void 45127be1a7SAdrian Chadd.Ft void 46127be1a7SAdrian Chadd.Fn lib80211_free_regdata "struct regdata *reg" 47127be1a7SAdrian Chadd.Ft int 48127be1a7SAdrian Chadd.Fn lib80211_regdomain_readconfig "struct regdata *reg" "const void *config" "size_t size" 49127be1a7SAdrian Chadd.Ft void 50127be1a7SAdrian Chadd.Fn lib80211_regdomain_cleanup "struct regdata *reg" 51127be1a7SAdrian Chadd.Ft const struct regdomain * 52127be1a7SAdrian Chadd.Fn lib80211_regdomain_findbysku "const struct regdata *reg" "enumRegDomainCode" 53127be1a7SAdrian Chadd.Ft const struct regdomain * 54127be1a7SAdrian Chadd.Fn lib80211_regdomain_findbyname "const struct regdata *reg" "const char *sku" 55127be1a7SAdrian Chadd.Ft const struct country * 56127be1a7SAdrian Chadd.Fn lib80211_country_findbycc "const struct regdata *reg" "enum ISOCountryCode" 57127be1a7SAdrian Chadd.Ft const struct country * 58127be1a7SAdrian Chadd.Fn lib80211_country_findbyname "const struct regdata *reg" "const char *cc" 59127be1a7SAdrian Chadd.Sh DESCRIPTION 60127be1a7SAdrian ChaddThe 61127be1a7SAdrian Chadd.Nm lib80211 62127be1a7SAdrian Chaddlibrary is an interface to the 63127be1a7SAdrian Chadd.Xr net80211 4 64127be1a7SAdrian Chaddinfrastructure. 65127be1a7SAdrian ChaddIt implements wrappers around the 66127be1a7SAdrian Chadd.Xr net80211 4 67127be1a7SAdrian Chaddioctl command, as well as providing a convenient API to access the regulatory 68127be1a7SAdrian Chadddatabase. 69127be1a7SAdrian Chadd.Pp 70127be1a7SAdrian ChaddThe 71127be1a7SAdrian Chadd.Fn lib80211_alloc_regdata 72127be1a7SAdrian Chaddand 73127be1a7SAdrian Chadd.Fn lib80211_free_regdata 74127be1a7SAdrian Chaddfunction allocates / frees a regdata structure to store regulatory domain 75127be1a7SAdrian Chaddinformation in. 76127be1a7SAdrian Chadd.Pp 77127be1a7SAdrian ChaddThe 78127be1a7SAdrian Chadd.Fn lib80211_regdomain_readconfig 79127be1a7SAdrian Chaddand 80127be1a7SAdrian Chadd.Fn lib80211_regdomain_cleanup 81127be1a7SAdrian Chaddfunctions read in the regulatory database XML configuration and free it when 82127be1a7SAdrian Chaddfinished. 83127be1a7SAdrian Chadd.Pp 84127be1a7SAdrian ChaddThe 85127be1a7SAdrian Chadd.Fn lib80211_regdomain_findbysku 86127be1a7SAdrian Chaddand 87127be1a7SAdrian Chadd.Fn lib80211_regdomain_findbyname 88127be1a7SAdrian Chaddfunctions look up a regulatory domain entry by SKU enum and SKU name 89127be1a7SAdrian Chaddrespectively. 90127be1a7SAdrian Chadd.Pp 91127be1a7SAdrian ChaddThe 92127be1a7SAdrian Chadd.Fn lib80211_country_findbycc 93127be1a7SAdrian Chaddand 94127be1a7SAdrian Chadd.Fn lib80211_country_findbyname 95127be1a7SAdrian Chaddfunctions look up a country information entry by ISO country enum and 96127be1a7SAdrian ChaddISO country code string respectively. 97127be1a7SAdrian Chadd.Sh RETURN VALUES 98127be1a7SAdrian ChaddThe 99127be1a7SAdrian Chadd.Fn lib80211_alloc_regdata , 100127be1a7SAdrian Chadd.Fn lib80211_regdomain_readconfig , 101127be1a7SAdrian Chadd.Fn lib80211_regdomain_findbysku , 102127be1a7SAdrian Chadd.Fn lib80211_regdomain_findbyname , 103127be1a7SAdrian Chadd.Fn lib80211_country_findbycc , 104127be1a7SAdrian Chadd.Fn lib80211_country_findbyname 105ef7f1005SChristian Bruefferreturn 106ef7f1005SChristian Brueffer.Dv NULL 107ef7f1005SChristian Bruefferupon error. 108127be1a7SAdrian Chadd.Sh SEE ALSO 109ef7f1005SChristian Brueffer.Xr net80211 4 , 110ef7f1005SChristian Brueffer.Xr ifconfig 8 111127be1a7SAdrian Chadd.Sh HISTORY 112127be1a7SAdrian ChaddThe 113127be1a7SAdrian Chadd.Nm lib80211 114127be1a7SAdrian Chaddlibrary first appeared in 115127be1a7SAdrian Chadd.Fx 11.0 . 116127be1a7SAdrian Chadd.Sh AUTHORS 117127be1a7SAdrian Chadd.An Adrian Chadd 118