Hello community!
I’m implementing a PPP stack for communication with a GPRS module.
Each PPP frame is different, can carry control data or IP data, and each one has a lot of options and sub options (nested headers, etc). For example, a control frame looks like this:
–HDLC frame–|--LCP header–|LCP_option_1|LCP_option_2|…
Each LCP option have it’s own header too, so you could have 8-9 pktsnips per PPP frame if every LCP option is treated as a pktsnip. I’m using gnrc_pktbuf_mark to mark the HDLC header, the LCP header and each LCP options.
The LCP_options header have “type” and “length” header, so I was thinking in manually parse each option without using gnrc_pktbuf_mark.
As gnrc_pktbuf_mark reallocates memory with each call, which approach do you think is better?
Cheers!