Hello,
2.4.17 kernel.
I am having troubles understanding how to implement options
(of possibly variable length) in my transport protocol (similar to
TCP-options). For the fixed fields I just extend the structure describing
my packet's header and it works fine. However, where should I place the
parsing required for a variable-length list of options?
I know I'll need a function similar to net/ipv4/tcp_input.c :
tcp_parse_options. I believe I'll have to do the parsing of 'skb->data' in
my receiving function, but how do I (if at all) decribe those options
in include/linux/skbuff.h : skbuff structure? I mean, tcp, for instance,
doesn't have any options defined in struct tcphdr, but the options _are_
the part of a packet's header...
So which part of the code actually divides the options (which
apparently are not defined in the structure describing the header) from
the user's data?
I'll appreciate any help.
-marek
|