mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-20 02:32:36 +01:00
ie: Add length/data/tag inline getters
This commit is contained in:
parent
bfdd4a2328
commit
b1ca41b476
5
src/ie.c
5
src/ie.c
@ -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;
|
||||
|
17
src/ie.h
17
src/ie.h
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user