libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
tag_iterator.c File Reference
#include "tag_iterator.h"
#include <errno.h>
#include <string.h>

Go to the source code of this file.

Functions

int libwifi_tag_iterator_init (struct libwifi_tag_iterator *it, const void *tags_start, size_t data_len)
 Initialise a libwifi frame tag iterator. More...
 
int libwifi_tag_iterator_next (struct libwifi_tag_iterator *it)
 Iterate towards the next tagged parameter in a libwifi tag iterator. More...
 

Function Documentation

◆ libwifi_tag_iterator_init()

int libwifi_tag_iterator_init ( struct libwifi_tag_iterator it,
const void *  tags_start,
size_t  data_len 
)

Initialise a libwifi frame tag iterator.

Parameters
itA libwifi tag iterator struct
tags_startThe beginning of a frame's tag data
data_lenThe total length of the frame's tag data
Returns
negative number on error, zero on success

Definition at line 21 of file tag_iterator.c.

◆ libwifi_tag_iterator_next()

int libwifi_tag_iterator_next ( struct libwifi_tag_iterator it)

Iterate towards the next tagged parameter in a libwifi tag iterator.

Parameters
Alibwifi tag iterator sturct, after being initalised
Returns
The tag number of the next tag

Definition at line 31 of file tag_iterator.c.