libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
tag_iterator.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_CORE_TAGITERATOR_H
17#define LIBWIFI_CORE_TAGITERATOR_H
18
19#include "../misc/byteswap.h"
20#include "frame.h"
21#include "tag.h"
22#include <stddef.h>
23
30 const unsigned char *tag_data;
32 const unsigned char *_frame_end;
33};
34
43int libwifi_tag_iterator_init(struct libwifi_tag_iterator *it, const void *tags_start, size_t data_len);
44
52
53#endif /* LIBWIFI_CORE_TAGITERATOR_H */
A tagged parameter always consists of a tag number and length.
Definition: tag.h:215
A libwifi_tag_iterator is used to iterate through a list of tagged parameters in a wifi frame.
Definition: tag_iterator.h:28
const unsigned char * _frame_end
Definition: tag_iterator.h:32
struct libwifi_tag_header * _next_tag_header
Definition: tag_iterator.h:31
struct libwifi_tag_header * tag_header
Definition: tag_iterator.h:29
const unsigned char * tag_data
Definition: tag_iterator.h:30
int libwifi_tag_iterator_next(struct libwifi_tag_iterator *it)
Iterate towards the next tagged parameter in a libwifi tag iterator.
Definition: tag_iterator.c:31
int libwifi_tag_iterator_init(struct libwifi_tag_iterator *it, const void *tags_start, size_t data_len)
Initialise a libwifi frame tag iterator.
Definition: tag_iterator.c:21