implementing options field in the packet's header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux