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.
master
Jouni Malinen 15 years ago
parent 6d1278e998
commit 1057d78eb8

@ -32,14 +32,23 @@ CFLAGS += -DCONFIG_NATIVE_WINDOWS
LIBS += -lws2_32
endif
OBJS = hostapd.o main.o ieee802_1x.o \
config.o config_file.o ieee802_11_auth.o \
sta_info.o wpa.o \
preauth.o pmksa_cache.o \
drv_callbacks.o \
tkip_countermeasures.o \
mlme.o wpa_auth_ie.o
OBJS = hostapd.o
OBJS += main.o
OBJS += config_file.o
OBJS += drv_callbacks.o
OBJS += ap_drv_ops.o
OBJS += ../src/ap/ieee802_1x.o
OBJS += ../src/ap/config.o
OBJS += ../src/ap/ieee802_11_auth.o
OBJS += ../src/ap/sta_info.o
OBJS += ../src/ap/wpa.o
OBJS += ../src/ap/tkip_countermeasures.o
OBJS += ../src/ap/mlme.o
OBJS += ../src/ap/wpa_auth_ie.o
OBJS += ../src/ap/preauth.o
OBJS += ../src/ap/pmksa_cache.o
NEED_RC4=y
NEED_AES=y
NEED_MD5=y
@ -93,13 +102,13 @@ endif
ifdef CONFIG_NO_ACCOUNTING
CFLAGS += -DCONFIG_NO_ACCOUNTING
else
OBJS += accounting.o
OBJS += ../src/ap/accounting.o
endif
ifdef CONFIG_NO_VLAN
CFLAGS += -DCONFIG_NO_VLAN
else
OBJS += vlan_init.o
OBJS += ../src/ap/vlan_init.o
endif
ifdef CONFIG_NO_CTRL_IFACE
@ -125,7 +134,7 @@ endif
ifdef CONFIG_PEERKEY
CFLAGS += -DCONFIG_PEERKEY
OBJS += peerkey.o
OBJS += ../src/ap/peerkey.o
endif
ifdef CONFIG_IEEE80211W
@ -136,7 +145,7 @@ endif
ifdef CONFIG_IEEE80211R
CFLAGS += -DCONFIG_IEEE80211R
OBJS += wpa_ft.o
OBJS += ../src/ap/wpa_ft.o
NEED_SHA256=y
NEED_AES_OMAC1=y
NEED_AES_UNWRAP=y
@ -677,10 +686,13 @@ OBJS += ../src/utils/base64.o
endif
ifdef NEED_AP_MLME
OBJS += beacon.o wme.o ap_list.o ieee802_11.o
OBJS += ../src/ap/beacon.o
OBJS += ../src/ap/wmm.o
OBJS += ../src/ap/ap_list.o
OBJS += ../src/ap/ieee802_11.o
OBJS += hw_features.o
ifdef CONFIG_IEEE80211N
OBJS += ieee802_11_ht.o
OBJS += ../src/ap/ieee802_11_ht.o
endif
CFLAGS += -DNEED_AP_MLME
endif

@ -15,9 +15,9 @@
#include "includes.h"
#include "common.h"
#include "hostapd.h"
#include "ieee802_11.h"
#include "sta_info.h"
#include "ap/hostapd.h"
#include "ap/ieee802_11.h"
#include "ap/sta_info.h"
#include "driver_i.h"

@ -23,8 +23,9 @@
#include "drivers/driver.h"
#include "eap_server/eap.h"
#include "radius/radius_client.h"
#include "wpa.h"
#include "config.h"
#include "ap/wpa.h"
#include "ap/config.h"
#include "config_file.h"
extern struct wpa_driver_ops *wpa_drivers[];

@ -21,18 +21,18 @@
#include <stddef.h>
#include "common.h"
#include "hostapd.h"
#include "eloop.h"
#include "config.h"
#include "ieee802_1x.h"
#include "wpa.h"
#include "drivers/driver.h"
#include "radius/radius_client.h"
#include "ieee802_11.h"
#include "ap/hostapd.h"
#include "ap/config.h"
#include "ap/ieee802_1x.h"
#include "ap/wpa.h"
#include "ap/ieee802_11.h"
#include "ap/sta_info.h"
#include "ap/accounting.h"
#include "ctrl_iface.h"
#include "sta_info.h"
#include "accounting.h"
#include "wps_hostapd.h"
#include "drivers/driver.h"
#include "ctrl_iface_ap.h"

@ -15,11 +15,11 @@
#include "includes.h"
#include "common.h"
#include "hostapd.h"
#include "ieee802_1x.h"
#include "wpa.h"
#include "ieee802_11.h"
#include "sta_info.h"
#include "ap/hostapd.h"
#include "ap/ieee802_1x.h"
#include "ap/wpa.h"
#include "ap/ieee802_11.h"
#include "ap/sta_info.h"
#include "wps_hostapd.h"
#include "ctrl_iface_ap.h"

@ -16,7 +16,7 @@
#define DRIVER_I_H
#include "drivers/driver.h"
#include "config.h"
#include "ap/config.h"
static inline void *
hostapd_driver_init(struct hostapd_data *hapd, const u8 *bssid)

@ -15,17 +15,17 @@
#include "includes.h"
#include "common.h"
#include "hostapd.h"
#include "driver_i.h"
#include "ieee802_11.h"
#include "radius/radius.h"
#include "sta_info.h"
#include "accounting.h"
#include "tkip_countermeasures.h"
#include "ieee802_1x.h"
#include "wpa.h"
#include "ap/hostapd.h"
#include "ap/ieee802_11.h"
#include "ap/sta_info.h"
#include "ap/accounting.h"
#include "ap/tkip_countermeasures.h"
#include "ap/ieee802_1x.h"
#include "ap/wpa.h"
#include "ap/wmm.h"
#include "driver_i.h"
#include "iapp.h"
#include "wme.h"
#include "wps_hostapd.h"

@ -21,9 +21,9 @@
#include "eapol_auth/eapol_auth_sm.h"
#include "eapol_auth/eapol_auth_sm_i.h"
#include "eap_server/eap.h"
#include "hostapd.h"
#include "config.h"
#include "sta_info.h"
#include "ap/hostapd.h"
#include "ap/config.h"
#include "ap/sta_info.h"
static void fprint_char(FILE *f, char c)

@ -26,22 +26,22 @@
#include "eap_server/eap.h"
#include "eap_server/tncs.h"
#include "l2_packet/l2_packet.h"
#include "hostapd.h"
#include "ieee802_1x.h"
#include "beacon.h"
#include "ap/hostapd.h"
#include "ap/sta_info.h"
#include "ap/accounting.h"
#include "ap/ap_list.h"
#include "ap/beacon.h"
#include "ap/ieee802_1x.h"
#include "ap/ieee802_11_auth.h"
#include "ap/preauth.h"
#include "ap/tkip_countermeasures.h"
#include "ap/vlan_init.h"
#include "ap/wpa.h"
#include "hw_features.h"
#include "accounting.h"
#include "iapp.h"
#include "ieee802_11_auth.h"
#include "sta_info.h"
#include "ap_list.h"
#include "driver_i.h"
#include "wpa.h"
#include "preauth.h"
#include "vlan_init.h"
#include "ctrl_iface.h"
#include "wps_hostapd.h"
#include "tkip_countermeasures.h"
static int hostapd_flush_old_stations(struct hostapd_data *hapd);

@ -2,7 +2,7 @@
* hostapd / Hardware feature query and different modes
* Copyright 2002-2003, Instant802 Networks, Inc.
* Copyright 2005-2006, Devicescape Software, Inc.
* Copyright (c) 2008, Jouni Malinen <j@w1.fi>
* Copyright (c) 2008-2009, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@ -14,16 +14,16 @@
* See README and COPYING for more details.
*/
#include "includes.h"
#include "utils/includes.h"
#include "common.h"
#include "hostapd.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
#include "eloop.h"
#include "ap/hostapd.h"
#include "ap/config.h"
#include "hw_features.h"
#include "driver_i.h"
#include "config.h"
void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,

@ -37,7 +37,7 @@
* - IEEE 802.11 context transfer
*/
#include "includes.h"
#include "utils/includes.h"
#include <net/if.h>
#include <sys/ioctl.h>
#ifdef USE_KERNEL_HEADERS
@ -46,13 +46,13 @@
#include <netpacket/packet.h>
#endif /* USE_KERNEL_HEADERS */
#include "common.h"
#include "hostapd.h"
#include "config.h"
#include "ieee802_11.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "ap/hostapd.h"
#include "ap/config.h"
#include "ap/ieee802_11.h"
#include "ap/sta_info.h"
#include "iapp.h"
#include "eloop.h"
#include "sta_info.h"
#define IAPP_MULTICAST "224.0.1.178"

@ -23,8 +23,8 @@
#include "common/version.h"
#include "eap_server/eap.h"
#include "eap_server/tncs.h"
#include "hostapd.h"
#include "config.h"
#include "ap/hostapd.h"
#include "ap/config.h"
#include "config_file.h"

@ -12,11 +12,11 @@
* See README and COPYING for more details.
*/
#include "includes.h"
#include "utils/includes.h"
#include "common.h"
#include "eloop.h"
#include "uuid.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "utils/uuid.h"
#include "crypto/dh_groups.h"
#include "common/wpa_ctrl.h"
#include "common/ieee802_11_defs.h"
@ -26,9 +26,9 @@
#include "wps/wps.h"
#include "wps/wps_defs.h"
#include "wps/wps_dev_attr.h"
#include "hostapd.h"
#include "config.h"
#include "sta_info.h"
#include "ap/hostapd.h"
#include "ap/config.h"
#include "ap/sta_info.h"
#include "wps_hostapd.h"

@ -1,4 +1,4 @@
SUBDIRS=common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet radius rsn_supp tls utils wps
SUBDIRS=ap common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet radius rsn_supp tls utils wps
all:
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done

@ -0,0 +1,9 @@
all:
@echo Nothing to be made.
clean:
for d in $(SUBDIRS); do make -C $$d clean; done
rm -f *~ *.o *.d
install:
@echo Nothing to be made.

@ -1,6 +1,6 @@
/*
* hostapd / AP table
* Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
* Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
* Copyright (c) 2003-2004, Instant802 Networks, Inc.
* Copyright (c) 2006, Devicescape Software, Inc.
*
@ -14,18 +14,17 @@
* See README and COPYING for more details.
*/
#include "includes.h"
#include "utils/includes.h"
#include "common.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "drivers/driver.h"
#include "hostapd.h"
#include "config.h"
#include "ieee802_11.h"
#include "eloop.h"
#include "sta_info.h"
#include "ap_list.h"
#include "hw_features.h"
#include "beacon.h"
#include "drivers/driver.h"
#include "ap_list.h"
/* AP list is a double linked list with head->prev pointing to the end of the

@ -22,9 +22,8 @@
#include "hostapd.h"
#include "ieee802_11.h"
#include "wpa.h"
#include "wme.h"
#include "wmm.h"
#include "beacon.h"
#include "hw_features.h"
#include "drivers/driver.h"
#include "config.h"
#include "sta_info.h"

@ -12,12 +12,12 @@
* See README and COPYING for more details.
*/
#include "includes.h"
#include "utils/includes.h"
#ifndef CONFIG_NATIVE_WINDOWS
#include "common.h"
#include "eloop.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "crypto/crypto.h"
#include "drivers/driver.h"
#include "common/wpa_ctrl.h"
@ -26,12 +26,11 @@
#include "hostapd.h"
#include "ieee802_11.h"
#include "beacon.h"
#include "hw_features.h"
#include "ieee802_11_auth.h"
#include "sta_info.h"
#include "ieee802_1x.h"
#include "wpa.h"
#include "wme.h"
#include "wmm.h"
#include "ap_list.h"
#include "accounting.h"
#include "config.h"

@ -32,7 +32,6 @@
#include "preauth.h"
#include "pmksa_cache.h"
#include "config.h"
#include "hw_features.h"
#include "eap_server/eap.h"

@ -28,7 +28,6 @@
#include "preauth.h"
#include "config.h"
#include "beacon.h"
#include "hw_features.h"
#include "mlme.h"
#include "vlan_init.h"

@ -18,9 +18,9 @@
#include "common.h"
#include "hostapd.h"
#include "ieee802_11.h"
#include "wme.h"
#include "sta_info.h"
#include "config.h"
#include "wmm.h"
/* TODO: maintain separate sequence and fragment numbers for each AC

@ -19,7 +19,7 @@
#include "config.h"
#include "wpa.h"
#include "ieee802_11.h"
#include "wme.h"
#include "wmm.h"
#include "wpa_auth_i.h"
#include "wpa_auth_ie.h"

@ -588,14 +588,14 @@ CFLAGS += -DCONFIG_NO_RADIUS
CFLAGS += -DCONFIG_NO_ACCOUNTING
CFLAGS += -DCONFIG_NO_VLAN
OBJS += ../hostapd/hostapd.o
OBJS += ../hostapd/config.o
OBJS += ../src/ap/config.o
OBJS += ../src/utils/ip_addr.o
OBJS += ../hostapd/sta_info.o
OBJS += ../hostapd/tkip_countermeasures.o
OBJS += ../hostapd/mlme.o
OBJS += ../hostapd/ieee802_1x.o
OBJS += ../src/ap/sta_info.o
OBJS += ../src/ap/tkip_countermeasures.o
OBJS += ../src/ap/mlme.o
OBJS += ../src/ap/ieee802_1x.o
OBJS += ../src/eapol_auth/eapol_auth_sm.o
OBJS += ../hostapd/ieee802_11_auth.o
OBJS += ../src/ap/ieee802_11_auth.o
OBJS += ../hostapd/drv_callbacks.o
OBJS += ../hostapd/ap_drv_ops.o
ifdef CONFIG_CTRL_IFACE
@ -612,13 +612,13 @@ CFLAGS += -DCONFIG_IEEE80211N
endif
ifdef NEED_AP_MLME
OBJS += ../hostapd/beacon.o
OBJS += ../hostapd/wme.o
OBJS += ../hostapd/ap_list.o
OBJS += ../hostapd/ieee802_11.o
OBJS += ../src/ap/beacon.o
OBJS += ../src/ap/wmm.o
OBJS += ../src/ap/ap_list.o
OBJS += ../src/ap/ieee802_11.o
OBJS += ../hostapd/hw_features.o
ifdef CONFIG_IEEE80211N
OBJS += ../hostapd/ieee802_11_ht.o
OBJS += ../src/ap/ieee802_11_ht.o
endif
CFLAGS += -DNEED_AP_MLME
endif
@ -632,14 +632,14 @@ endif
ifdef NEED_RSN_AUTHENTICATOR
CFLAGS += -DCONFIG_NO_RADIUS
NEED_AES_WRAP=y
OBJS += ../hostapd/wpa.o
OBJS += ../hostapd/wpa_auth_ie.o
OBJS += ../hostapd/pmksa_cache.o
OBJS += ../src/ap/wpa.o
OBJS += ../src/ap/wpa_auth_ie.o
OBJS += ../src/ap/pmksa_cache.o
ifdef CONFIG_IEEE80211R
OBJS += ../hostapd/wpa_ft.o
OBJS += ../src/ap/wpa_ft.o
endif
ifdef CONFIG_PEERKEY
OBJS += ../hostapd/peerkey.o
OBJS += ../src/ap/peerkey.o
endif
endif
@ -658,18 +658,18 @@ endif
ifdef CONFIG_AUTHENTICATOR
OBJS_h += ../src/eapol_auth/eapol_auth_sm.o
OBJS_h += ../hostapd/ieee802_1x.o
OBJS_h += ../src/ap/ieee802_1x.o
endif
ifdef CONFIG_WPA_AUTHENTICATOR
OBJS_h += ../hostapd/wpa.o
OBJS_h += ../hostapd/wpa_auth_ie.o
OBJS_h += ../hostapd/pmksa_cache.o
OBJS_h += ../src/ap/wpa.o
OBJS_h += ../src/ap/wpa_auth_ie.o
OBJS_h += ../src/ap/pmksa_cache.o
ifdef CONFIG_IEEE80211R
OBJS_h += ../hostapd/wpa_ft.o
OBJS_h += ../src/ap/wpa_ft.o
endif
ifdef CONFIG_PEERKEY
OBJS_h += ../hostapd/peerkey.o
OBJS_h += ../src/ap/peerkey.o
endif
endif

@ -16,10 +16,10 @@
#include "includes.h"
#include "common.h"
#include "../hostapd/hostapd.h"
#include "../hostapd/config.h"
#include "ap/hostapd.h"
#include "ap/config.h"
#ifdef NEED_AP_MLME
#include "../hostapd/ieee802_11.h"
#include "ap/ieee802_11.h"
#endif /* NEED_AP_MLME */
#include "../hostapd/wps_hostapd.h"
#include "../hostapd/ctrl_iface_ap.h"

@ -16,11 +16,11 @@
#include "common.h"
#include "l2_packet/l2_packet.h"
#include "wpa_supplicant_i.h"
#include "rsn_supp/wpa.h"
#include "rsn_supp/wpa_ie.h"
#include "ap/wpa.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#include "../hostapd/wpa.h"
#include "ibss_rsn.h"

Loading…
Cancel
Save