nl80211util.h (3497B)
1 /* 2 * 3 * Wireless daemon for Linux 4 * 5 * Copyright (C) 2018-2019 Intel Corporation. All rights reserved. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 * 21 */ 22 23 #include <ell/ell.h> 24 25 struct band_chandef; 26 struct scan_freq_set; 27 struct band_freq_attrs; 28 struct handshake_state; 29 struct band; 30 31 int nl80211_parse_attrs(struct l_genl_msg *msg, int tag, ...); 32 int nl80211_parse_nested(struct l_genl_attr *attr, int type, int tag, ...); 33 34 struct l_genl_msg *nl80211_build_deauthenticate(uint32_t ifindex, 35 const uint8_t addr[static 6], 36 uint16_t reason_code); 37 struct l_genl_msg *nl80211_build_disconnect(uint32_t ifindex, 38 uint16_t reason_code); 39 40 struct l_genl_msg *nl80211_build_del_station(uint32_t ifindex, 41 const uint8_t addr[static 6], 42 uint16_t reason_code, 43 uint8_t subtype); 44 45 struct l_genl_msg *nl80211_build_new_key_group(uint32_t ifindex, 46 uint32_t cipher, uint8_t key_id, 47 const uint8_t *key, size_t key_len, 48 const uint8_t *ctr, size_t ctr_len, 49 const uint8_t *addr); 50 struct l_genl_msg *nl80211_build_new_key_pairwise(uint32_t ifindex, 51 uint32_t cipher, 52 const uint8_t addr[static 6], 53 const uint8_t *tk, 54 size_t tk_len, 55 uint8_t key_id); 56 struct l_genl_msg *nl80211_build_new_rx_key_pairwise(uint32_t ifindex, 57 uint32_t cipher, 58 const uint8_t addr[static 6], 59 const uint8_t *tk, 60 size_t tk_len, 61 uint8_t key_id); 62 63 struct l_genl_msg *nl80211_build_rekey_offload(uint32_t ifindex, 64 const uint8_t *kek, 65 const uint8_t *kck, 66 uint64_t replay_ctr); 67 68 struct l_genl_msg *nl80211_build_set_station_authorized(uint32_t ifindex, 69 const uint8_t *addr); 70 71 struct l_genl_msg *nl80211_build_set_station_associated(uint32_t ifindex, 72 const uint8_t *addr); 73 74 struct l_genl_msg *nl80211_build_set_station_unauthorized(uint32_t ifindex, 75 const uint8_t *addr); 76 77 struct l_genl_msg *nl80211_build_set_key(uint32_t ifindex, uint8_t key_index); 78 79 struct l_genl_msg *nl80211_build_get_key(uint32_t ifindex, uint8_t key_index); 80 81 const void *nl80211_parse_get_key_seq(struct l_genl_msg *msg); 82 83 struct l_genl_msg *nl80211_build_cmd_frame(uint32_t ifindex, 84 uint16_t frame_type, 85 const uint8_t *addr, 86 const uint8_t *to, 87 uint32_t freq, 88 struct iovec *iov, 89 size_t iov_len); 90 91 struct l_genl_msg *nl80211_build_external_auth(uint32_t ifindex, 92 uint16_t status_code, 93 const uint8_t *ssid, size_t ssid_len, 94 const uint8_t bssid[static 6]); 95 96 int nl80211_parse_chandef(struct l_genl_msg *msg, struct band_chandef *out); 97 int nl80211_parse_supported_frequencies(struct l_genl_attr *band_freqs, 98 struct scan_freq_set *supported_list, 99 struct band *band); 100 101 void nl80211_append_rsn_attributes(struct l_genl_msg *msg, 102 struct handshake_state *hs);