2015-06-18 05:18:26 -05:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
2019-10-25 00:43:08 +02:00
|
|
|
* Copyright (C) 2013-2019 Intel Corporation. All rights reserved.
|
2015-06-18 05:18:26 -05:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2016-06-17 00:54:13 +02:00
|
|
|
#include <time.h>
|
2015-06-18 05:18:26 -05:00
|
|
|
|
2018-07-22 14:15:18 +02:00
|
|
|
enum security;
|
2016-05-31 12:57:24 -05:00
|
|
|
struct device;
|
2018-09-04 16:07:03 -05:00
|
|
|
struct station;
|
2016-05-28 05:27:13 +02:00
|
|
|
struct network;
|
2016-06-14 11:14:45 -05:00
|
|
|
struct scan_bss;
|
2021-07-08 16:47:50 -05:00
|
|
|
struct handshake_state;
|
2021-08-03 14:40:43 -07:00
|
|
|
struct erp_cache_entry;
|
2016-05-11 21:59:03 -05:00
|
|
|
|
2018-07-22 14:15:17 +02:00
|
|
|
void network_connected(struct network *network);
|
2016-06-09 19:55:18 +02:00
|
|
|
void network_disconnected(struct network *network);
|
2016-06-09 19:55:20 +02:00
|
|
|
bool network_rankmod(const struct network *network, double *rankmod);
|
2015-06-18 05:18:26 -05:00
|
|
|
|
2018-09-04 15:45:37 -05:00
|
|
|
struct network *network_create(struct station *station, const char *ssid,
|
2016-05-15 21:11:01 -05:00
|
|
|
enum security security);
|
|
|
|
|
2016-05-28 05:27:12 +02:00
|
|
|
const char *network_get_ssid(const struct network *network);
|
|
|
|
const char *network_get_path(const struct network *network);
|
|
|
|
enum security network_get_security(const struct network *network);
|
2019-09-17 13:23:15 -07:00
|
|
|
bool network_set_passphrase(struct network *network, const char *passphrase);
|
2016-06-09 19:55:22 +02:00
|
|
|
int network_get_signal_strength(const struct network *network);
|
2016-05-28 05:27:12 +02:00
|
|
|
struct l_settings *network_get_settings(const struct network *network);
|
2021-09-17 15:58:37 -07:00
|
|
|
struct station *network_get_station(const struct network *network);
|
2016-05-11 22:00:58 -05:00
|
|
|
|
2016-09-21 16:20:09 -05:00
|
|
|
bool network_set_psk(struct network *network, const uint8_t *psk);
|
2021-07-08 16:47:50 -05:00
|
|
|
|
2021-07-15 17:06:34 -05:00
|
|
|
int network_set_transition_disable(struct network *network,
|
|
|
|
const uint8_t *td, size_t len);
|
|
|
|
|
2021-09-15 10:36:16 -07:00
|
|
|
int network_handshake_setup(struct network *network, struct scan_bss *bss,
|
2021-07-08 16:47:50 -05:00
|
|
|
struct handshake_state *hs);
|
|
|
|
|
2021-07-06 11:46:33 -05:00
|
|
|
void network_sync_settings(struct network *network);
|
2016-05-16 15:43:32 -05:00
|
|
|
|
2019-08-19 11:11:54 -07:00
|
|
|
const struct network_info *network_get_info(const struct network *network);
|
|
|
|
void network_set_info(struct network *network, struct network_info *info);
|
2024-02-27 10:33:57 -08:00
|
|
|
void network_set_force_default_ecc_group(struct network *network);
|
|
|
|
bool network_get_force_default_ecc_group(struct network *network);
|
2019-06-26 10:42:50 -07:00
|
|
|
|
2024-01-26 12:22:40 -08:00
|
|
|
bool network_update_known_frequencies(struct network *network);
|
|
|
|
|
2021-07-27 13:59:52 -05:00
|
|
|
int network_can_connect_bss(struct network *network,
|
|
|
|
const struct scan_bss *bss);
|
2016-05-16 14:24:21 -05:00
|
|
|
int network_autoconnect(struct network *network, struct scan_bss *bss);
|
2020-06-12 15:21:39 -05:00
|
|
|
void network_connect_failed(struct network *network, bool in_handshake);
|
2016-05-16 16:06:41 -05:00
|
|
|
bool network_bss_add(struct network *network, struct scan_bss *bss);
|
2021-03-15 12:15:27 -07:00
|
|
|
bool network_bss_update(struct network *network, struct scan_bss *bss);
|
2016-05-16 16:13:36 -05:00
|
|
|
bool network_bss_list_isempty(struct network *network);
|
2016-05-16 16:13:52 -05:00
|
|
|
void network_bss_list_clear(struct network *network);
|
2021-02-01 22:43:34 -06:00
|
|
|
struct scan_bss *network_bss_list_pop(struct network *network);
|
2016-09-19 20:26:41 -05:00
|
|
|
struct scan_bss *network_bss_find_by_addr(struct network *network,
|
|
|
|
const uint8_t *addr);
|
2019-01-30 15:13:57 -08:00
|
|
|
struct scan_bss *network_bss_select(struct network *network,
|
|
|
|
bool fallback_to_blacklist);
|
2016-05-15 20:47:41 -05:00
|
|
|
|
2016-05-15 21:30:10 -05:00
|
|
|
bool network_register(struct network *network, const char *path);
|
|
|
|
|
2016-06-10 11:49:34 +02:00
|
|
|
void network_remove(struct network *network, int reason);
|
2016-05-15 21:37:12 -05:00
|
|
|
|
2016-06-10 11:50:20 +02:00
|
|
|
int network_rank_compare(const void *a, const void *b, void *user);
|
2018-09-04 14:42:35 -05:00
|
|
|
void network_rank_update(struct network *network, bool connected);
|
2016-06-17 00:54:13 +02:00
|
|
|
|
2021-02-01 11:22:42 -06:00
|
|
|
struct l_dbus_message *network_connect_new_hidden_network(
|
|
|
|
struct network *network,
|
|
|
|
struct l_dbus_message *message);
|
2018-07-10 15:46:55 -07:00
|
|
|
|
2019-03-01 10:55:03 -08:00
|
|
|
void network_blacklist_add(struct network *network, struct scan_bss *bss);
|
2019-09-09 09:49:09 -07:00
|
|
|
|
2021-08-03 14:40:43 -07:00
|
|
|
struct erp_cache_entry *network_get_erp_cache(struct network *network);
|
2021-05-12 16:01:42 -07:00
|
|
|
|
|
|
|
const struct l_queue_entry *network_bss_list_get_entries(
|
2022-08-10 16:16:14 -07:00
|
|
|
const struct network *network);
|
2021-08-06 16:02:09 -07:00
|
|
|
|
|
|
|
struct l_dbus_message *__network_connect(struct network *network,
|
|
|
|
struct scan_bss *bss,
|
|
|
|
struct l_dbus_message *message);
|