about ip_options_compile

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

 



Hi,
I try to understand how are set and read the ip options in the kernel, and I find something that I can understand in the function ip_options_compile of ip_options.c.


----- net/ipv4/ip_options.c ------

245 int ip_options_compile(....)
246 {
	...
250 int optlen;
         ...
281 optlen = optptr[1];
282 if(optlen<2 || optlen>1){
283		pp_ptr = optptr;
284		goto error;
285 }
	....
457 }

-----------------------------------------

(the number of the line come from the kernel 2.4.20 http://www.iglu.org/lxr/srouce/net/ipv4/ip_options.c )

For me, this test is always true, maybe I am wrong. So if someone can explain me how this work ...

Thank for all.

Antoine Luu

ps : I also look for any documentation about how modify the ip options in the kernel.

-
: 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