3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 22:42:37 +01:00

ie: Adding function to recurse when reading

This function is needed when building recursive IE.
This commit is contained in:
Jukka Rissanen 2014-07-14 18:29:04 +03:00 committed by Denis Kenzior
parent 4943f2300d
commit 61245bc14e
2 changed files with 10 additions and 0 deletions

View File

@ -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;

View File

@ -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);