diff options
| author | Marc <marc@malloc.me> | 2022-09-10 20:27:14 +0100 |
|---|---|---|
| committer | Marc <marc@malloc.me> | 2022-09-10 20:27:29 +0100 |
| commit | 20898787fc8eb98cac50ddeb68a6a44f6769a064 (patch) | |
| tree | daa6b7a673a7547c3828871e1256b91e1e997f75 /src/libwifi | |
| parent | 7c2b373bf37186fd94fdc1d46393780e46f646a8 (diff) | |
| download | libwifi-20898787fc8eb98cac50ddeb68a6a44f6769a064.tar.gz libwifi-20898787fc8eb98cac50ddeb68a6a44f6769a064.tar.bz2 libwifi-20898787fc8eb98cac50ddeb68a6a44f6769a064.zip | |
core/parse: Add skeleton for element extension parsing
Diffstat (limited to 'src/libwifi')
| -rw-r--r-- | src/libwifi/core/frame/tag.h | 7 | ||||
| -rw-r--r-- | src/libwifi/parse/management/common.c | 11 |
2 files changed, 18 insertions, 0 deletions
| diff --git a/src/libwifi/core/frame/tag.h b/src/libwifi/core/frame/tag.h index e435061..b914c77 100644 --- a/src/libwifi/core/frame/tag.h +++ b/src/libwifi/core/frame/tag.h | |||
| @@ -244,6 +244,13 @@ struct libwifi_tag_vendor_header { | |||
| 244 | int8_t type; | 244 | int8_t type; |
| 245 | } __attribute__((packed)); | 245 | } __attribute__((packed)); |
| 246 | 246 | ||
| 247 | /* | ||
| 248 | * Element extension tagged parameters have a tag number | ||
| 249 | */ | ||
| 250 | struct libwifi_tag_extension_header { | ||
| 251 | uint8_t tag_num; | ||
| 252 | } __attribute__((packed)); | ||
| 253 | |||
| 247 | /** | 254 | /** |
| 248 | * Add a tagged parameter to a list of frame tagged parameters. | 255 | * Add a tagged parameter to a list of frame tagged parameters. |
| 249 | * | 256 | * |
| diff --git a/src/libwifi/parse/management/common.c b/src/libwifi/parse/management/common.c index 5e4fbf6..1faaf81 100644 --- a/src/libwifi/parse/management/common.c +++ b/src/libwifi/parse/management/common.c | |||
| @@ -142,6 +142,7 @@ int libwifi_bss_handle_msft_tag(struct libwifi_bss *bss, const unsigned char *ms | |||
| 142 | */ | 142 | */ |
| 143 | int libwifi_bss_tag_parser(struct libwifi_bss *bss, struct libwifi_tag_iterator *it) { | 143 | int libwifi_bss_tag_parser(struct libwifi_bss *bss, struct libwifi_tag_iterator *it) { |
| 144 | struct libwifi_tag_vendor_header *vendor_header = NULL; | 144 | struct libwifi_tag_vendor_header *vendor_header = NULL; |
| 145 | struct libwifi_tag_extension_header *extension_header = NULL; | ||
| 145 | 146 | ||
| 146 | do { | 147 | do { |
| 147 | switch (it->tag_header->tag_num) { | 148 | switch (it->tag_header->tag_num) { |
| @@ -167,6 +168,16 @@ int libwifi_bss_tag_parser(struct libwifi_bss *bss, struct libwifi_tag_iterator | |||
| 167 | } | 168 | } |
| 168 | } | 169 | } |
| 169 | break; | 170 | break; |
| 171 | case TAG_ELEMENT_EXTENSION: | ||
| 172 | extension_header = (struct libwifi_tag_extension_header *) it->tag_data; | ||
| 173 | |||
| 174 | switch (extension_header->tag_num) { | ||
| 175 | default: | ||
| 176 | /* Not Implemented */ | ||
| 177 | break; | ||
| 178 | } | ||
| 179 | |||
| 180 | break; | ||
| 170 | } | 181 | } |
| 171 | } while (libwifi_tag_iterator_next(it) != -1); | 182 | } while (libwifi_tag_iterator_next(it) != -1); |
| 172 | 183 | ||
