Hello,
2.4.17 kernel.
I am having troubles understanding how to implement 'options' field
(of possibly variable length) in my transport protocol's header.
For the fixed-size fields I just extend the structure describing
my packet's header (say, struct udphdr) and it works fine.
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 (and tcphdr is actually used to get a
pointer to them later on)...
Which part of the code actually separate the options (which
apparently are not defined in the structure describing the header) from
the user's data, and also at which point should I inject my options when
sending a packet (in such a way so I don't overwrite user's data)?
I use UDP implementation as my base, so please refer to it, if possible.
I'll appreciate any help.
-marek
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:31 EST