libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
authentication.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_GEN_AUTH_H
17#define LIBWIFI_GEN_AUTH_H
18
19#include <stdint.h>
20
21#include "../../core/frame/management/authentication.h"
22
29size_t libwifi_get_auth_length(struct libwifi_auth *auth);
30
46int libwifi_create_auth(struct libwifi_auth *auth,
47 const unsigned char receiver[6],
48 const unsigned char transmitter[6],
49 const unsigned char address3[6],
50 uint16_t algorithm_number,
51 uint16_t transaction_sequence,
52 uint16_t status_code);
53
62size_t libwifi_dump_auth(struct libwifi_auth *auth, unsigned char *buf, size_t buf_len);
63
69void libwifi_free_auth(struct libwifi_auth *auth);
70
71#endif /* LIBWIFI_GEN_AUTH_H */
uint16_t transaction_sequence
Definition: authentication.h:1
uint16_t algorithm_number
Definition: authentication.h:0
uint16_t status_code
Definition: authentication.h:2
size_t libwifi_get_auth_length(struct libwifi_auth *auth)
Calculate the length of a given libwifi_auth.
int libwifi_create_auth(struct libwifi_auth *auth, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint16_t algorithm_number, uint16_t transaction_sequence, uint16_t status_code)
Generate a populated libwifi auth.
size_t libwifi_dump_auth(struct libwifi_auth *auth, unsigned char *buf, size_t buf_len)
Dump a libwifi_auth into a raw format for packet injection.
void libwifi_free_auth(struct libwifi_auth *auth)
Free any memory claimed by a libwifi_auth back to the system.