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




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux