[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1335504701.2775.67.camel@edumazet-glaptop>
Date: Fri, 27 Apr 2012 07:31:41 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: "S, Sreeram" <Sreeram.S@...app.com>
Cc: Ravishankar <cyberax82@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@....edu>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists