mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "S, Sreeram" <Sreeram.S@netapp.com>
Cc: Ravishankar <cyberax82@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andy Lutomirski <luto@mit.edu>
Subject: RE: IP options IP_RECVOPTS on Linux 2.6 - Kindly comment
Date: Fri, 27 Apr 2012 07:31:41 +0200	[thread overview]
Message-ID: <1335504701.2775.67.camel@edumazet-glaptop> (raw)
In-Reply-To: <402249329CEF3E49AACD14423D8386EE03C6B5E5@SACEXCMBX03-PRD.hq.netapp.com>

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.





  parent reply	other threads:[~2012-04-27  5:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26  9:37 S, Sreeram
     [not found] ` <CAO_LctSkkqctOEaC_CPDB7yHCzgAYe+G3rPQBFT3jh1-cCT22A@mail.gmail.com>
     [not found]   ` <402249329CEF3E49AACD14423D8386EE03C6B5E5@SACEXCMBX03-PRD.hq.netapp.com>
2012-04-27  5:31     ` Eric Dumazet [this message]
2012-04-27  5:34       ` S, Sreeram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335504701.2775.67.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=Sreeram.S@netapp.com \
    --cc=cyberax82@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®