.\" $OpenBSD: hostapd.conf.5,v 1.5 2005/06/17 20:17:01 jmc Exp $ .\" .\" Copyright (c) 2004, 2005 Reyk Floeter .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd April 13, 2004 .Dt HOSTAPD.CONF 5 .Os .Sh NAME .Nm hostapd.conf .Nd configuration file for the Host Access Point daemon .Sh DESCRIPTION .Nm is the configuration file for the .Xr hostapd 8 daemon. .Sh SECTIONS The .Nm file is divided into two main sections. .Bl -tag -width xxxx .It Sy Macros User-defined variables may be defined and used later, simplifying the configuration file. .It Sy Tables Tables provide a mechanism to handle a large number of link layer addresses easily, with increased performance and flexibility. .It Sy Global Configuration Global runtime settings for .Xr hostapd 8 . .It Sy Event rules Event rules provide a powerful mechanism to trigger certain actions when receiving specified IEEE 802.11 frames. .El .Pp Comments can be put anywhere in the file using a hash mark .Pq Sq # , and extend to the end of the current line. .Sh MACROS Much like .Xr cpp 1 or .Xr m4 1 , macros can be defined that will later be expanded in context. Macro names must start with a letter, and may contain letters, digits and underscores. Macro names may not be reserved words (for example, .Ic set , .Ic interface , or .Ic hostap ) . Macros are not expanded inside quotes. .Pp For example: .Bd -literal -offset indent wlan="ath0" set iapp interface $wlan .Ed .Sh TABLES Tables are named structures which can hold a collection of link layer addresses, masked address ranges, and link layer to IP address assignments. Lookups against tables in .Xr hostapd 8 are relatively fast, making a single rule with tables much more efficient, in terms of processor usage and memory consumption, than a large number of rules which differ only in link layer addresses. .Pp Tables are used for .Xr hostapd 8 .Ic event rules to match specified IEEE 802.11 link layer addresses and address ranges and the capability to assign link layer to IP addresses is a requirement for advanced IAPP functionality. .Pp For example: .Bd -literal -offset indent cisco="00:40:06:ff:ff:ff / ff:ff:ff:00:00:00" table { $cisco, 00:0d:60:ff:f1:2a } table const { 00:00:24:c3:40:18 -> 10.195.64.24, 00:00:24:c3:40:19 -> 10.195.64.25, 00:00:24:c3:40:1a -> 10.195.64.26 } .Ed .Sh GLOBAL CONFIGURATION The following configuration settings are understood: .Bl -tag -width xxxx .It Ic set hostap interface Ar interface Specify the wireless interface running in Host AP mode. This option could be omitted to use .Xr hostapd 8 to log received IAPP messages. .It Ic set iapp interface Ar interface Specify the mandatory Inter-Access-Point (IAPP) interface. .It Ic set iapp mode Ar mode Specify the IAPP mode, if not using the default one. IAPP could be used in multicast (default) or in broadcast mode. The used multicast group is 224.0.1.178. .Pp Possible options: .Bd -unfilled -offset indent .Ic set iapp mode multicast .Ic set iapp mode broadcast .Ed .El .Sh EVENT RULES Event rules provide a powerful way to trigger a certain action when receiving specified IEEE 802.11 frames on the .Ic hostap interface . The rules are handled in sequential order, from first to last. .Pp In difference to packet filter rules like in .Xr pf.conf 5 , the .Xr hostapd 8 event rules are handled without a state, each rule is processed indepedently from the others and from any previous actions. .Pp All hostapd event rules are single line statements beginning with the mandatory .Ic hostap handle keywords and optional rule options, frame matching, a specified action and a limit: .Bd -literal -offset indent hostap handle [