I'm linking linux/tcp.h and I'm trying to read the TCP options, I can't seem to find how to do so. I've read a bit online and according to some online sources I have to iterate all of the "remaining packet" until I hit the option(s) I want? (Right now I'm going to try and focus on the "MSS" option). Can anyone provide me with a code example of it?

Code:
      struct iphdr *iph = ((struct iphdr *) full_packet);
        fprintf(stdout, "IP{v=%u; ihl=%u; tos=%u; tot_len=%u; id=%u; ttl=%u; protocol=%u; "
            ,iph->version, iph->ihl*4, iph->tos, ntohs(iph->tot_len), ntohs(iph->id), iph->ttl, iph->protocol);
    
        if (iph->protocol == 6){
    
            struct tcphdr *tcp = ((struct tcphdr *) (full_packet + (iph->ihl << 2)));
            fprintf(stdout, "TCP{sport=%u; dport=%u; seq=%u; ack_seq=%u; flags=u%ua%up%ur%us%uf%u; window=%u; urg=%u}\n",
                ntohs(tcp->source), ntohs(tcp->dest), ntohl(tcp->seq), ntohl(tcp->ack_seq)
                ,tcp->urg, tcp->ack, tcp->psh, tcp->rst, tcp->syn, tcp->fin, ntohs(tcp->window), tcp->urg_ptr);\
        }
Is what I have so far in terms of reading/parsing the IP/TCP data


Thanks!