2018-10-08 22:44:09 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
2019-10-25 00:43:08 +02:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation. All rights reserved.
|
2018-10-08 22:44:09 +02: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 <ell/ell.h>
|
|
|
|
|
2021-09-18 21:19:41 +02:00
|
|
|
struct band_chandef;
|
2022-08-03 23:36:34 +02:00
|
|
|
struct scan_freq_set;
|
2022-12-16 22:27:35 +01:00
|
|
|
struct band_freq_attrs;
|
2023-11-27 05:38:42 +01:00
|
|
|
struct handshake_state;
|
2021-09-18 21:19:41 +02:00
|
|
|
|
2019-09-20 04:29:27 +02:00
|
|
|
int nl80211_parse_attrs(struct l_genl_msg *msg, int tag, ...);
|
|
|
|
|
2023-11-14 16:26:49 +01:00
|
|
|
struct l_genl_msg *nl80211_build_deauthenticate(uint32_t ifindex,
|
|
|
|
const uint8_t addr[static 6],
|
|
|
|
uint16_t reason_code);
|
2023-11-14 16:20:16 +01:00
|
|
|
struct l_genl_msg *nl80211_build_disconnect(uint32_t ifindex,
|
|
|
|
uint16_t reason_code);
|
|
|
|
|
2023-11-14 16:49:39 +01:00
|
|
|
struct l_genl_msg *nl80211_build_del_station(uint32_t ifindex,
|
|
|
|
const uint8_t addr[static 6],
|
|
|
|
uint16_t reason_code,
|
|
|
|
uint8_t subtype);
|
|
|
|
|
2018-10-08 22:44:09 +02:00
|
|
|
struct l_genl_msg *nl80211_build_new_key_group(uint32_t ifindex,
|
|
|
|
uint32_t cipher, uint8_t key_id,
|
|
|
|
const uint8_t *key, size_t key_len,
|
2018-10-08 22:44:12 +02:00
|
|
|
const uint8_t *ctr, size_t ctr_len,
|
|
|
|
const uint8_t *addr);
|
2023-11-14 16:57:36 +01:00
|
|
|
struct l_genl_msg *nl80211_build_new_key_pairwise(uint32_t ifindex,
|
|
|
|
uint32_t cipher,
|
|
|
|
const uint8_t addr[static 6],
|
|
|
|
const uint8_t *tk,
|
|
|
|
size_t tk_len,
|
|
|
|
uint8_t key_id);
|
2023-11-14 17:03:58 +01:00
|
|
|
struct l_genl_msg *nl80211_build_new_rx_key_pairwise(uint32_t ifindex,
|
|
|
|
uint32_t cipher,
|
|
|
|
const uint8_t addr[static 6],
|
|
|
|
const uint8_t *tk,
|
|
|
|
size_t tk_len,
|
|
|
|
uint8_t key_id);
|
2018-10-08 22:44:09 +02:00
|
|
|
|
2023-11-14 17:09:07 +01:00
|
|
|
struct l_genl_msg *nl80211_build_rekey_offload(uint32_t ifindex,
|
|
|
|
const uint8_t *kek,
|
|
|
|
const uint8_t *kck,
|
|
|
|
uint64_t replay_ctr);
|
|
|
|
|
2018-10-08 22:44:09 +02:00
|
|
|
struct l_genl_msg *nl80211_build_set_station_authorized(uint32_t ifindex,
|
|
|
|
const uint8_t *addr);
|
|
|
|
|
|
|
|
struct l_genl_msg *nl80211_build_set_station_associated(uint32_t ifindex,
|
|
|
|
const uint8_t *addr);
|
|
|
|
|
|
|
|
struct l_genl_msg *nl80211_build_set_station_unauthorized(uint32_t ifindex,
|
|
|
|
const uint8_t *addr);
|
2018-10-08 22:44:10 +02:00
|
|
|
|
|
|
|
struct l_genl_msg *nl80211_build_set_key(uint32_t ifindex, uint8_t key_index);
|
|
|
|
|
|
|
|
struct l_genl_msg *nl80211_build_get_key(uint32_t ifindex, uint8_t key_index);
|
2018-10-08 22:44:11 +02:00
|
|
|
|
|
|
|
const void *nl80211_parse_get_key_seq(struct l_genl_msg *msg);
|
2019-06-27 00:15:53 +02:00
|
|
|
|
|
|
|
struct l_genl_msg *nl80211_build_cmd_frame(uint32_t ifindex,
|
2022-09-22 00:31:45 +02:00
|
|
|
uint16_t frame_type,
|
2019-06-27 00:15:53 +02:00
|
|
|
const uint8_t *addr,
|
|
|
|
const uint8_t *to,
|
|
|
|
uint32_t freq,
|
|
|
|
struct iovec *iov,
|
|
|
|
size_t iov_len);
|
2021-09-18 21:19:41 +02:00
|
|
|
|
|
|
|
int nl80211_parse_chandef(struct l_genl_msg *msg, struct band_chandef *out);
|
2022-08-03 23:36:34 +02:00
|
|
|
int nl80211_parse_supported_frequencies(struct l_genl_attr *band_freqs,
|
2022-12-16 22:27:35 +01:00
|
|
|
struct scan_freq_set *supported_list,
|
|
|
|
struct band_freq_attrs *list,
|
|
|
|
size_t num_channels);
|
2023-11-27 05:38:42 +01:00
|
|
|
|
|
|
|
void nl80211_append_rsn_attributes(struct l_genl_msg *msg,
|
|
|
|
struct handshake_state *hs);
|