mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-19 02:39:29 +01:00
module: Move declarations into separate header file
This commit is contained in:
parent
b45242562b
commit
ab5742bb32
@ -225,7 +225,7 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h src/missing.h \
|
|||||||
src/resolve.h src/resolve.c\
|
src/resolve.h src/resolve.c\
|
||||||
src/hotspot.c \
|
src/hotspot.c \
|
||||||
src/p2putil.h src/p2putil.c \
|
src/p2putil.h src/p2putil.c \
|
||||||
src/module.c \
|
src/module.h src/module.c \
|
||||||
src/rrm.c \
|
src/rrm.c \
|
||||||
$(eap_sources) \
|
$(eap_sources) \
|
||||||
$(builtin_sources)
|
$(builtin_sources)
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "linux/nl80211.h"
|
#include "linux/nl80211.h"
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/device.h"
|
#include "src/device.h"
|
||||||
#include "src/netdev.h"
|
#include "src/netdev.h"
|
||||||
#include "src/wiphy.h"
|
#include "src/wiphy.h"
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "src/dbus.h"
|
#include "src/dbus.h"
|
||||||
#include "src/agent.h"
|
#include "src/agent.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
|
|
||||||
static unsigned int next_request_id = 0;
|
static unsigned int next_request_id = 0;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/anqp.h"
|
#include "src/anqp.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
#include "src/eap-private.h"
|
#include "src/eap-private.h"
|
||||||
|
1
src/ap.c
1
src/ap.c
@ -32,6 +32,7 @@
|
|||||||
#include "linux/nl80211.h"
|
#include "linux/nl80211.h"
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/scan.h"
|
#include "src/scan.h"
|
||||||
#include "src/device.h"
|
#include "src/device.h"
|
||||||
#include "src/netdev.h"
|
#include "src/netdev.h"
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "src/blacklist.h"
|
#include "src/blacklist.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The current timeout is multiplied by this value after an entry is blacklisted
|
* The current timeout is multiplied by this value after an entry is blacklisted
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
#include "src/wiphy.h"
|
#include "src/wiphy.h"
|
||||||
#include "src/scan.h"
|
#include "src/scan.h"
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/missing.h"
|
#include "src/missing.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/eap.h"
|
#include "src/eap.h"
|
||||||
#include "src/eap-private.h"
|
#include "src/eap-private.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/missing.h"
|
#include "src/missing.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/crypto.h"
|
#include "src/crypto.h"
|
||||||
#include "src/eapol.h"
|
#include "src/eapol.h"
|
||||||
#include "src/ie.h"
|
#include "src/ie.h"
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "src/missing.h"
|
#include "src/missing.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/eap-private.h"
|
#include "src/eap-private.h"
|
||||||
#include "src/erp.h"
|
#include "src/erp.h"
|
||||||
#include "src/crypto.h"
|
#include "src/crypto.h"
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/common.h"
|
#include "src/common.h"
|
||||||
#include "src/network.h"
|
#include "src/network.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
|
30
src/iwd.h
30
src/iwd.h
@ -35,33 +35,3 @@ const char *iwd_get_iface_blacklist(void);
|
|||||||
|
|
||||||
const char *iwd_get_phy_whitelist(void);
|
const char *iwd_get_phy_whitelist(void);
|
||||||
const char *iwd_get_phy_blacklist(void);
|
const char *iwd_get_phy_blacklist(void);
|
||||||
|
|
||||||
struct iwd_module_desc {
|
|
||||||
const char *name;
|
|
||||||
int (*init)(void);
|
|
||||||
void (*exit)(void);
|
|
||||||
bool active;
|
|
||||||
} __attribute__((aligned(8)));
|
|
||||||
|
|
||||||
struct iwd_module_depends {
|
|
||||||
const char *self;
|
|
||||||
const char *target;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IWD_MODULE(name, init, exit) \
|
|
||||||
static struct iwd_module_desc __iwd_module_ ## name \
|
|
||||||
__attribute__((used, section("__iwd_module"), aligned(8))) = {\
|
|
||||||
#name, init, exit \
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IWD_MODULE_DEPENDS(name, dep) \
|
|
||||||
static struct iwd_module_depends \
|
|
||||||
__iwd_module__##name_##dep \
|
|
||||||
__attribute__((used, section("__iwd_module_dep"), \
|
|
||||||
aligned(8))) = { \
|
|
||||||
.self = #name, \
|
|
||||||
.target = #dep, \
|
|
||||||
};
|
|
||||||
|
|
||||||
int iwd_modules_init();
|
|
||||||
void iwd_modules_exit();
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/storage.h"
|
#include "src/storage.h"
|
||||||
#include "src/common.h"
|
#include "src/common.h"
|
||||||
#include "src/network.h"
|
#include "src/network.h"
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "linux/nl80211.h"
|
#include "linux/nl80211.h"
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/wiphy.h"
|
#include "src/wiphy.h"
|
||||||
#include "src/dbus.h"
|
#include "src/dbus.h"
|
||||||
#include "src/eap.h"
|
#include "src/eap.h"
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "src/nl80211util.h"
|
#include "src/nl80211util.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/netdev.h"
|
#include "src/netdev.h"
|
||||||
#include "src/wiphy.h"
|
#include "src/wiphy.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/module.h"
|
||||||
|
|
||||||
struct dependency {
|
struct dependency {
|
||||||
struct dependency *next;
|
struct dependency *next;
|
||||||
|
51
src/module.h
Normal file
51
src/module.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Wireless daemon for Linux
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct iwd_module_desc {
|
||||||
|
const char *name;
|
||||||
|
int (*init)(void);
|
||||||
|
void (*exit)(void);
|
||||||
|
bool active;
|
||||||
|
} __attribute__((aligned(8)));
|
||||||
|
|
||||||
|
struct iwd_module_depends {
|
||||||
|
const char *self;
|
||||||
|
const char *target;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define IWD_MODULE(name, init, exit) \
|
||||||
|
static struct iwd_module_desc __iwd_module_ ## name \
|
||||||
|
__attribute__((used, section("__iwd_module"), aligned(8))) = {\
|
||||||
|
#name, init, exit \
|
||||||
|
};
|
||||||
|
|
||||||
|
#define IWD_MODULE_DEPENDS(name, dep) \
|
||||||
|
static struct iwd_module_depends \
|
||||||
|
__iwd_module__##name_##dep \
|
||||||
|
__attribute__((used, section("__iwd_module_dep"), \
|
||||||
|
aligned(8))) = { \
|
||||||
|
.self = #name, \
|
||||||
|
.target = #dep, \
|
||||||
|
};
|
||||||
|
|
||||||
|
int iwd_modules_init();
|
||||||
|
void iwd_modules_exit();
|
@ -34,6 +34,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/netdev.h"
|
#include "src/netdev.h"
|
||||||
#include "src/station.h"
|
#include "src/station.h"
|
||||||
#include "src/common.h"
|
#include "src/common.h"
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "linux/nl80211.h"
|
#include "linux/nl80211.h"
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/wiphy.h"
|
#include "src/wiphy.h"
|
||||||
#include "src/ie.h"
|
#include "src/ie.h"
|
||||||
#include "src/mpdu.h"
|
#include "src/mpdu.h"
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/missing.h"
|
#include "src/missing.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/ie.h"
|
#include "src/ie.h"
|
||||||
#include "src/crypto.h"
|
#include "src/crypto.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/dbus.h"
|
#include "src/dbus.h"
|
||||||
#include "src/resolve.h"
|
#include "src/resolve.h"
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/common.h"
|
#include "src/common.h"
|
||||||
#include "src/rfkill.h"
|
#include "src/rfkill.h"
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/mpdu.h"
|
#include "src/mpdu.h"
|
||||||
#include "src/netdev.h"
|
#include "src/netdev.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "linux/nl80211.h"
|
#include "linux/nl80211.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/wiphy.h"
|
#include "src/wiphy.h"
|
||||||
#include "src/ie.h"
|
#include "src/ie.h"
|
||||||
#include "src/common.h"
|
#include "src/common.h"
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/watchlist.h"
|
#include "src/watchlist.h"
|
||||||
#include "src/simauth.h"
|
#include "src/simauth.h"
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/common.h"
|
#include "src/common.h"
|
||||||
#include "src/device.h"
|
#include "src/device.h"
|
||||||
#include "src/watchlist.h"
|
#include "src/watchlist.h"
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "linux/nl80211.h"
|
#include "linux/nl80211.h"
|
||||||
|
|
||||||
#include "src/iwd.h"
|
#include "src/iwd.h"
|
||||||
|
#include "src/module.h"
|
||||||
#include "src/ie.h"
|
#include "src/ie.h"
|
||||||
#include "src/crypto.h"
|
#include "src/crypto.h"
|
||||||
#include "src/scan.h"
|
#include "src/scan.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user