Help with TCP Options in C

Hello everybody,
It's me again, i need your help!
I was almost finishing a program when it crashed, because of TCP segments with the TCP Options enabled.

I am able to control every field of every packet i receive, except of those using TCP Options. Is there a way to determine if a packet is using TCP Options, and the Options size to reduce it to the TCP payload?

there are no more fields after Urgent Pointer (urg_ptr) in the /usr/include/linux/tcp.h file, Please, Help!!

Thank you.

---------- Post updated at 03:46 PM ---------- Previous update was at 03:27 PM ----------

I've found the solution, the TCP Offset determines the size of the header, and with no options it's normal value is twenty. If tcp->doff is greater than 20, it means that the TCP Segment has the Options field enabled, and the Options field size is the value of the offset minus 20.

Thanks anyway.