mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 02:19:26 +01:00
ie: Adding function to recurse when reading
This function is needed when building recursive IE.
This commit is contained in:
parent
4943f2300d
commit
61245bc14e
8
src/ie.c
8
src/ie.c
@ -37,6 +37,14 @@ void ie_tlv_iter_init(struct ie_tlv_iter *iter, const unsigned char *tlv,
|
||||
iter->pos = 0;
|
||||
}
|
||||
|
||||
void ie_tlv_iter_recurse(struct ie_tlv_iter *iter,
|
||||
struct ie_tlv_iter *recurse)
|
||||
{
|
||||
recurse->tlv = iter->data;
|
||||
recurse->max = iter->len;
|
||||
recurse->pos = 0;
|
||||
}
|
||||
|
||||
unsigned int ie_tlv_iter_get_tag(struct ie_tlv_iter *iter)
|
||||
{
|
||||
return iter->tag;
|
||||
|
2
src/ie.h
2
src/ie.h
@ -165,5 +165,7 @@ struct ie_tlv_iter {
|
||||
|
||||
void ie_tlv_iter_init(struct ie_tlv_iter *iter, const unsigned char *tlv,
|
||||
unsigned int len);
|
||||
void ie_tlv_iter_recurse(struct ie_tlv_iter *iter,
|
||||
struct ie_tlv_iter *recurse);
|
||||
unsigned int ie_tlv_iter_get_tag(struct ie_tlv_iter *iter);
|
||||
bool ie_tlv_iter_next(struct ie_tlv_iter *iter);
|
||||
|
Loading…
Reference in New Issue
Block a user