#include "tag.h"
#include "tag_iterator.h"
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
Go to the source code of this file.
|
int | libwifi_add_tag (struct libwifi_tagged_parameters *tags, struct libwifi_tagged_parameter *tag) |
| Add a tagged parameter to a list of frame tagged parameters. More...
|
|
int | libwifi_remove_tag (struct libwifi_tagged_parameters *tags, int tag_number) |
| Remove a tagged parameter from a list of frame tagged parameters. More...
|
|
size_t | libwifi_create_tag (struct libwifi_tagged_parameter *tagged_parameter, int tag_number, const unsigned char *tag_data, size_t tag_length) |
| Create a tagged parameter from a tag number, length and data. More...
|
|
void | libwifi_free_tag (struct libwifi_tagged_parameter *tagged_parameter) |
| Free a tagged parameters body. More...
|
|
size_t | libwifi_dump_tag (struct libwifi_tagged_parameter *tag, unsigned char *buf, size_t buf_len) |
| Dump a tagged parameter into a raw buffer, for use with other buffers or injection. More...
|
|
int | libwifi_quick_add_tag (struct libwifi_tagged_parameters *tags, int tag_number, const unsigned char *tag_data, size_t tag_length) |
| Add a tagged parameter via tag number and data to a management frame. More...
|
|
int | libwifi_check_tag (struct libwifi_tagged_parameters *tags, int tag_number) |
| Check if a tagged parameter is present via tag number. More...
|
|
char * | libwifi_get_tag_name (int tag_number) |
| Get the name of a tagged parameter via a supplied tag number. More...
|
|
◆ libwifi_add_tag()
Add a tagged parameter to a list of frame tagged parameters.
- Parameters
-
tagged_parameters | A management frame's tagged parameters |
tagged_parameter | The new tagged parameter |
Definition at line 25 of file tag.c.
◆ libwifi_check_tag()
Check if a tagged parameter is present via tag number.
- Parameters
-
tags | A tagged parameters list |
tag_number | The number of the tagged parameter to find |
- Returns
- The number of times the supplied tag_number was found in tags
Definition at line 133 of file tag.c.
◆ libwifi_create_tag()
size_t libwifi_create_tag |
( |
struct libwifi_tagged_parameter * |
tagged_parameter, |
|
|
int |
tag_number, |
|
|
const unsigned char * |
tag_data, |
|
|
size_t |
tag_length |
|
) |
| |
Create a tagged parameter from a tag number, length and data.
This can be useful when generating tags on their own, for use with action frame body's.
- Parameters
-
tagged_parameter | A new tagged parameter struct |
tag_number | Tagged parameter number |
tag_data | The tag body |
tag_length | Length of the tag body |
- Returns
- length of the created tag
Definition at line 81 of file tag.c.
◆ libwifi_dump_tag()
Dump a tagged parameter into a raw buffer, for use with other buffers or injection.
- Parameters
-
tag | A used tagged parameter struct |
buf | A buffer for the raw data |
buf_len | Length of buf |
Definition at line 103 of file tag.c.
◆ libwifi_free_tag()
Free a tagged parameters body.
- Parameters
-
tagged_parameter | A used tagged parameter |
Definition at line 99 of file tag.c.
◆ libwifi_get_tag_name()
char * libwifi_get_tag_name |
( |
int |
tag_number | ) |
|
Get the name of a tagged parameter via a supplied tag number.
- Parameters
-
tag_number | The number of the tagged parameter to name |
- Returns
- The name of the tag
Definition at line 149 of file tag.c.
◆ libwifi_quick_add_tag()
int libwifi_quick_add_tag |
( |
struct libwifi_tagged_parameters * |
tagged_parameters, |
|
|
int |
tag_number, |
|
|
const unsigned char * |
tag_data, |
|
|
size_t |
tag_length |
|
) |
| |
Add a tagged parameter via tag number and data to a management frame.
- Parameters
-
tagged_parameters | A management frame's tagged parameters |
tag_number | Tagged parameter to add |
tag_data | Data to copy into new tag |
tag_length | Length of the new tag |
- Returns
- 0 on success, negative number on error
Definition at line 118 of file tag.c.
◆ libwifi_remove_tag()
Remove a tagged parameter from a list of frame tagged parameters.
- Parameters
-
tagged_parameters | A management frame's tagged parameters |
tag_number | Number of the tag to remove |
Definition at line 55 of file tag.c.