libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
security.h
Go to the documentation of this file.
1/* Copyright 2021 The libwifi Authors
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef LIBWIFI_PARSE_SECURITY_H
17#define LIBWIFI_PARSE_SECURITY_H
18
19#include "../../core/frame/management/common.h"
20#include "../../core/misc/security.h"
21
22#include <stdint.h>
23
24#define LIBWIFI_SECURITY_BUF_LEN 256
25
37int libwifi_get_rsn_info(struct libwifi_rsn_info *info, const unsigned char *tag_data,
38 const unsigned char *tag_end);
39
50void libwifi_enumerate_rsn_suites(struct libwifi_rsn_info *rsn_info, struct libwifi_bss *bss);
51
62int libwifi_get_wpa_info(struct libwifi_wpa_info *info, const unsigned char *tag_data,
63 const unsigned char *tag_end);
64
75void libwifi_enumerate_wpa_suites(struct libwifi_wpa_info *wpa_info, struct libwifi_bss *bss);
76
84void libwifi_get_security_type(struct libwifi_bss *bss, char *buf);
85
93void libwifi_get_group_ciphers(struct libwifi_bss *bss, char *buf);
94
102void libwifi_get_pairwise_ciphers(struct libwifi_bss *bss, char *buf);
103
111void libwifi_get_auth_key_suites(struct libwifi_bss *bss, char *buf);
112
122void _libwifi_add_sec_item(char *buf, int *offset, int *append, char *item);
123
124#endif /* LIBWIFI_PARSE_SECURITY_H */
void _libwifi_add_sec_item(char *buf, int *offset, int *append, char *item)
Internal function for adding a formatted string to a buffer for use with libwifi_get_* security funct...
Definition: security.c:677
void libwifi_get_group_ciphers(struct libwifi_bss *bss, char *buf)
Enumerate the group ciphers (CCMP, GCMP128, etc) in a given libwifi_bss, formatted into the given buf...
Definition: security.c:494
void libwifi_enumerate_rsn_suites(struct libwifi_rsn_info *rsn_info, struct libwifi_bss *bss)
Enumerate the RSN cipher suites in a libwifi_rsn_info.
Definition: security.c:123
void libwifi_get_security_type(struct libwifi_bss *bss, char *buf)
Enumerate the security types (WEP, WPA, WPA2, WPA3, etc) in a given libwifi_bss, formatted into the g...
Definition: security.c:469
int libwifi_get_wpa_info(struct libwifi_wpa_info *info, const unsigned char *tag_data, const unsigned char *tag_end)
Get the WPA related information and store it in a libwifi_wpa_info.
Definition: security.c:315
int libwifi_get_rsn_info(struct libwifi_rsn_info *info, const unsigned char *tag_data, const unsigned char *tag_end)
Get the RSN related information and store it in a libwifi_rsn_info.
Definition: security.c:32
void libwifi_get_pairwise_ciphers(struct libwifi_bss *bss, char *buf)
Enumerate the pairwise ciphers (GROUP, CCMP, BIP_CMAC128, etc) in a given libwifi_bss,...
Definition: security.c:546
void libwifi_get_auth_key_suites(struct libwifi_bss *bss, char *buf)
Enumerate the auth key management suites in a given libwifi_bss, formatted into the given buffer.
Definition: security.c:601
void libwifi_enumerate_wpa_suites(struct libwifi_wpa_info *wpa_info, struct libwifi_bss *bss)
Enumerate the WPA cipher suites in a libwifi_wpa_info.
Definition: security.c:399
libwifi Representation of a 802.11 RSN Information Element ┌───────────────────────────────────┐ │ Ve...
Definition: security.h:220
libwifi Representation of a Microsoft WPA Information Element ┌───────────────────────────────────┐ │...
Definition: security.h:193