|
|
@ -133,11 +133,16 @@ public:
|
|
|
|
// Section 6.1.2
|
|
|
|
// Section 6.1.2
|
|
|
|
void parse_packet(uint8_t *ptr) {
|
|
|
|
void parse_packet(uint8_t *ptr) {
|
|
|
|
uint8_t *init_ptr = ptr;
|
|
|
|
uint8_t *init_ptr = ptr;
|
|
|
|
nof_subheaders = 0;
|
|
|
|
nof_subheaders = 0;
|
|
|
|
while(subheaders[nof_subheaders].read_subheader(&ptr)) {
|
|
|
|
bool ret = false;
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
|
|
|
if (nof_subheaders < (int) max_subheaders) {
|
|
|
|
|
|
|
|
ret = subheaders[nof_subheaders].read_subheader(&ptr);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} while (ret && nof_subheaders < (int) max_subheaders);
|
|
|
|
|
|
|
|
if (nof_subheaders + 1 < (int) max_subheaders) {
|
|
|
|
nof_subheaders++;
|
|
|
|
nof_subheaders++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nof_subheaders++;
|
|
|
|
|
|
|
|
for (int i=0;i<nof_subheaders;i++) {
|
|
|
|
for (int i=0;i<nof_subheaders;i++) {
|
|
|
|
subheaders[i].read_payload(&ptr);
|
|
|
|
subheaders[i].read_payload(&ptr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|