libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
action.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_ACTION_H
17#define LIBWIFI_GEN_ACTION_H
18
19#include "../../core/frame/management/action.h"
20#include <stdint.h>
21
32 const unsigned char *data,
33 size_t data_len);
34
41
52int libwifi_create_action(struct libwifi_action *action,
53 const unsigned char receiver[6],
54 const unsigned char transmitter[6],
55 const unsigned char address3[6],
56 uint8_t category);
58 const unsigned char receiver[6],
59 const unsigned char transmitter[6],
60 const unsigned char address3[6],
61 uint8_t category);
62
69size_t libwifi_get_action_length(struct libwifi_action *action);
70
79size_t libwifi_dump_action(struct libwifi_action *action, unsigned char *buf, size_t buf_len);
80
86void libwifi_free_action(struct libwifi_action *action);
87
88#endif /* LIBWIFI_GEN_ACTION_H */
char * detail
Definition: action.h:1
uint8_t category
Definition: action.h:0
int libwifi_create_action_no_ack(struct libwifi_action *action, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint8_t category)
Definition: action.c:69
void libwifi_free_action(struct libwifi_action *action)
Free data associated to a given libwifi_action.
Definition: action.c:114
size_t libwifi_add_action_detail(struct libwifi_action_detail *detail, const unsigned char *data, size_t data_len)
Create a detail for an action frame by supplying raw data and it's length.
Definition: action.c:22
size_t libwifi_dump_action(struct libwifi_action *action, unsigned char *buf, size_t buf_len)
Dump a given libwifi_action to a raw buffer.
Definition: action.c:94
void libwifi_free_action_detail(struct libwifi_action_detail *detail)
Free all memory in a given libwifi_action_detail.
Definition: action.c:42
size_t libwifi_get_action_length(struct libwifi_action *action)
Get the length of a given libwifi_action.
Definition: action.c:89
int libwifi_create_action(struct libwifi_action *action, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint8_t category)
Create a new action frame with a specified action and category.
Definition: action.c:49