Subject: Re: Router Alert IPv4 Option
To: None <paul@whooppee.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 07/23/2001 09:28:45
>> hmmm, maybe this is exposing my ignorance about it :)  nearly all the
>> Ipv4 options are manipulated in one way or another vis setsockopt &
>> getsockopt.  What's required?

>Well, setscokopt would be a good way to have programs set the option.

	setsockopt/getsockopt to enable/disable it, correct.

	for example - you are a router.
	a packet to address X comes in with router alert set.
	you need to inspect it as well as forward it.
	- which socket will the packet come up?  raw, tcp, udp, whatever?
	  (note that in_laddr won't match as the address X is not on this
	  router)
	- will the packet get forwarded inside the kernel, or will it just
	  come up to the userland?  i guess the latter, as otherwise you
	  won't have control over forwarding behavior.
	- if you need to forward it, then, how do you really forward the
	  packet?  how can you preserve the form of original packet and send
	  it out?  ip_stripoptions() should have stripped the ip options,
	  there are header field reordering like ip_len (darren you know
	  this well:-), 

	we need to think about these gory details, yes.

itojun