Commit Graph

44 Commits (c90fd485141fd5e713684cfb385c557a618fa70d)

Author SHA1 Message Date
Shan Palanisamy c90fd48514 hostapd: Add global control interface
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 3776ac73b2 Move hostapd global callback functions into hapd_interfaces
These function pointers are going to be the same for each interface so
there is no need to keep them in struct hostapd_iface. Moving them to
struct hapd_interfaces makes it easier to add interfaces at run time.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen f9884c096a Convert os_zalloc() for an array to use os_calloc()
Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 986de33d5c Convert remaining SSID routines from char* to u8*
This makes it more explicit that the SSID is not a null terminated
C string.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 9d23cff598 hostapd: Allow 'none' driver to be started without ifname
Commit 0dcc4dc4b3 made driver
initialization conditional on interface name being configured. This can
break hostapd-as-RADIUS-server use case where this parameter does not
really make any sense. Fix this with a special case for the none driver.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 07bcdbb150 Move hostapd_for_each_interface() and hapd_interfaces into src/ap
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Shan Palanisamy 0dcc4dc4b3 Do not call driver_init if hostapd interface is not yet configured
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Shan Palanisamy c0971c561f Do not call hapd_deinit if driver was not initialized
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 0f3d578efc Remove the GPL notification from files contributed by Jouni Malinen
Remove the GPL notification text from the files that were
initially contributed by myself.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 57d38ddf6b Update copyright notices to include year 2012
Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Arik Nemtsov 4f73d88afa Maintain internal copy of Probe Response offload capabilities
Signed-hostap: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
13 years ago
Jouni Malinen 7756114f6a Postpone global_init() call until first driver instance is initialized
This avoids allocating global driver state for driver wrappers that
are built in but not used. This can save some resources and avoids
failures with driver_nl80211.c that is now initializing netlink
connections for nl80211 in global_init().
13 years ago
Jouni Malinen 4b24282a17 hostapd: Call global_init/global_deinit driver_ops
Now both wpa_supplicant and hostapd allow the driver wrappers to use the
global context similarly.
13 years ago
Jouni Malinen 38e24575c1 random: Add support for maintaining internal entropy store over restarts
This can be used to avoid rejection of first two 4-way handshakes every
time hostapd (or wpa_supplicant in AP/IBSS mode) is restarted. A new
command line parameter, -e, can now be used to specify an entropy file
that will be used to maintain the needed state.
13 years ago
Guy Eilam 5b73735ba0 hostapd: Fix interfaces.iface initialization
Set all the interfaces.iface pointers to NULL after the allocation of
that memory block for cases those pointers are accessed during each of
the interfaces initialization process (hostapd_interface_init()). One
example for such case is during WPS initialization when the code tries
to fetch the uuid from each of the interfaces.

Signed-off-by: Guy Eilam <guy@wizery.com>
13 years ago
Jouni Malinen 2fee890af7 Add driver capa flag for EAPOL TX status and store capa in hostapd 13 years ago
Jouni Malinen d47fa330b8 random: Read /dev/random in the background with eloop read socket
This makes it more likely to be able to fetch the 20 octet seed from
/dev/random in cases where other programs may also be competing for
this.
13 years ago
Jouni Malinen 9e0749737c Update copyright notices to include the new year 13 years ago
Ben Greear 379ff7b9d4 hostapd: Add iface-name wpa_msg() callback registration
This allows the interface name to be automatically
added to log file lines by the core logging logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years ago
Ben Greear b41a47c03f hostapd: Allow logging to file
Also supports 'relog' CLI command to re-open the log file.

Signed-off-by: Ben Greear <greearb@candelatech.com>
14 years ago
Gregory Detal bb437f282b AP: Add wpa_msg() events for EAP server state machine 14 years ago
Jouni Malinen dff0f701d0 Preparations for v0.7.1 release 15 years ago
Jouni Malinen 9078adfc8c hostapd: Fix deinit on initialization failure 15 years ago
Jouni Malinen f7c4783379 Split hostapd_interface_deinit() into deinit and free parts
This allows the driver interface to be deinitialized before
struct hostapd_data instance gets freed. This needs to be done so
that the driver wrapper does not maintain a context pointer to
freed memory.
15 years ago
Jouni Malinen 6226e38d00 Rename some src/ap files to avoid duplicate file names
Doxygen and some build tools may get a bit confused about same file
name being used in different directories. Clean this up a bit by
renaming some of the duplicated file names in src/ap.
15 years ago
Jouni Malinen 1b56c26c40 Get rid of direct hostapd_for_each_interface() calls
src/ap/*.c must not call functions in hostapd or wpa_supplicant
directories directly, so avoid this by using a callback function
pointer.
15 years ago
Jouni Malinen 70db2ab308 Move rest of the generic AP mode functionality into src/ap 15 years ago
Jouni Malinen 8c5fe31fe8 Move driver deinitialization away from hostapd.c
This matches with the earlier change of moving driver initialization
and allows more control on how the driver context is managed.
15 years ago
Jouni Malinen a4f2110934 Clean up some of the hostapd.h function prototype definitions
Not all prototypes in hostapd.h really belong there. This is an initial
step in cleaning that up.
15 years ago
Jouni Malinen 2586bc64d0 Move authentication server setup into separate file 15 years ago
Jouni Malinen e5f2b59c7e Move hostapd driver initialization away from hostapd.c
This makes it easier to customize AP mode initialization for
wpa_supplicant.
15 years ago
Jouni Malinen 32da61d9c9 Move wps_hostapd.c into src/ap 15 years ago
Jouni Malinen 1057d78eb8 Move generic AP functionality implementation into src/ap
This code can be shared by both hostapd and wpa_supplicant and this
is an initial step in getting the generic code moved to be under the
src directories. Couple of generic files still remain under the
hostapd directory due to direct dependencies to files there. Once the
dependencies have been removed, they will also be moved to the src/ap
directory to allow wpa_supplicant to be built without requiring anything
from the hostapd directory.
15 years ago
Jouni Malinen 41d719d6e0 Move hostapd configuration parser into separate file
config.c includes now only the generic helper functions that are needed
both for hostapd and the AP mode operations in wpa_supplicant.
hostapd/config_file.c is only needed for hostapd.
15 years ago
Jouni Malinen 80d77c31ff hostapd: Call os_program_{init,deinit}() 15 years ago
Jouni Malinen 0456ea16d8 eloop: Remove global user data pointer
This is not really needed since all signal handlers can use a context
pointer provided during signal handler registration.
15 years ago
Jouni Malinen 9969e5a46a Make hostapd_for_each_interface() take context pointer as argument
This removes need for using eloop_get_user_data().
15 years ago
Jouni Malinen 03da66bd59 Remove src/crypto from default include path
In addition, start ordering header file includes to be in more
consistent order: system header files, src/utils, src/*, same
directory as the *.c file.
15 years ago
Jouni Malinen 4dbfe5c58a Conver hostapd specific files to include common.h
Instead of getting this via hostapd.h, include it as the first
non-system header file in all source code files in the same way as
used in all other files.
15 years ago
Jouni Malinen 90973fb2fd Remove src/common from default header file path
This makes it clearer which files are including header from src/common.
Some of these cases should probably be cleaned up in the future not to
do that.

In addition, src/common/nl80211_copy.h and wireless_copy.h were moved
into src/drivers since they are only used by driver wrappers and do not
need to live in src/common.
15 years ago
Jouni Malinen dd745de384 Fix use-after-free issue with pid_file in hostapd termination 15 years ago
Jouni Malinen cedf947308 Figure out absolute path for the pid file before daemonizing
This allows relative path to be used in the same way as was already
supported by wpa_supplicant.
15 years ago
Jouni Malinen b6a7859d15 Move hostapd_init() into main.c 15 years ago
Jouni Malinen 5c333467b3 Move main() and configuration file related functions into main.c
This makes it easier to share hostapd.c with wpa_supplicant
15 years ago