I have a structure tcp_option_t, which is N bytes. If I have a pointer tcp_option_t* opt, and I want it to be incremented by 1, I can\'t u
tcp_option_t
N
tcp_option_t* opt
I'd suggest you to create a pointer of char and use it to transverse your struct.
char *ptr = (char*) opt; ++ptr; // will increment by one byte
when you need to restore your struct again, from ptr, just do the usual cast:
opt = (tcp_option_t *) ptr;