3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-18 01:59:31 +01:00

ie: Add length/data/tag inline getters

This commit is contained in:
Denis Kenzior 2015-02-24 17:11:27 -06:00
parent bfdd4a2328
commit b1ca41b476
2 changed files with 16 additions and 6 deletions

View File

@ -48,11 +48,6 @@ void ie_tlv_iter_recurse(struct ie_tlv_iter *iter,
recurse->pos = 0;
}
unsigned int ie_tlv_iter_get_tag(struct ie_tlv_iter *iter)
{
return iter->tag;
}
bool ie_tlv_iter_next(struct ie_tlv_iter *iter)
{
const unsigned char *tlv = iter->tlv + iter->pos;

View File

@ -233,7 +233,22 @@ 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);
static inline unsigned int ie_tlv_iter_get_tag(struct ie_tlv_iter *iter)
{
return iter->tag;
}
static inline unsigned int ie_tlv_iter_get_length(struct ie_tlv_iter *iter)
{
return iter->len;
}
static inline const unsigned char *ie_tlv_iter_get_data(
struct ie_tlv_iter *iter)
{
return iter->data;
}
bool ie_tlv_iter_next(struct ie_tlv_iter *iter);
bool ie_tlv_builder_init(struct ie_tlv_builder *builder);
bool ie_tlv_builder_set_length(struct ie_tlv_builder *builder,