RE: IP options IP_RECVOPTS on Linux 2.6 - Kindly comment
From: S, Sreeram
Date: Fri Apr 27 2012 - 01:34:32 EST
Thanks Eric.
I shall try that and I will reply. Thanks for the hint.
Regards,
Sreeram
-----Original Message-----
From: Eric Dumazet [mailto:eric.dumazet@xxxxxxxxx]
Sent: Friday, April 27, 2012 11:02 AM
To: S, Sreeram
Cc: Ravishankar; linux-kernel@xxxxxxxxxxxxxxx; Andy Lutomirski
Subject: RE: IP options IP_RECVOPTS on Linux 2.6 - Kindly comment
On Fri, 2012-04-27 at 05:25 +0000, S, Sreeram wrote:
> Thanks a lot Ravi for the response.
>
> But, the IP header is 40 bytes and so I think I should expect all
> those 40 bytes to be returned to my program when I enable this option.
> Isnt that correct ?
>
> Here, TTL and TOS are getting returned because I have explicitly
> enabled the returns of IP_RECVTTL and IP_RECVTOS to my program using
> setsockopt. Otherwise even they wouldnât have been returned.
>
> I still think that the kernel is not returning what it should return
> when I enable IP_RECVOPTS. Please correct me if you think I am wrong.
>
>
>
> Also, what are the other ways of getting the IP header other than RAW
> sockets, if the current approach does not work?
>
>
IP options are not IP header.
Try to send an IP packets with options, and your program will work.
N§²æìr¸yúèØb²X¬¶ÇvØ^)Þ{.nÇ+·¥{±êçzX§¶¡Ü}©²ÆzÚ&j:+v¨¾«êçzZ+Ê+zf£¢·h§~Ûiÿûàz¹®w¥¢¸?¨èÚ&¢)ßfù^jÇy§m
á@A«a¶Úÿ0¶ìh®åi