From: "Steinar H. Gunderson" <sgunderson@bigfoot.com>
To: Jens Rosenboom <jens@mcbone.net>
Cc: "Rémi Denis-Courmont" <remi@remlab.net>, netdev@vger.kernel.org
Subject: Re: IPV6_RTHDR with a type-0 routing header
Date: Thu, 20 Aug 2009 15:00:09 +0200 [thread overview]
Message-ID: <20090820130009.GA22183@uio.no> (raw)
In-Reply-To: <1250772824.9489.3.camel@fnki-nb00130>
On Thu, Aug 20, 2009 at 02:53:44PM +0200, Jens Rosenboom wrote:
>> It looks like I can use destination options instead, but those don't seem to
>> be too easy to use either. The kernel seems to demand that I put eight bytes
>> of padding at the end?
>>
>> #define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
>>
>> Why the +1?
> Because that matches the definition of the hdrlen field in RFC2460.
Hm, in that case I guess it's glibc that has one too much indeed (I never
write this field).
>> FWIW, the program I try to run is at http://home.samfundet.no/~sesse/v6fun.c .
>> If I replace "len" in the setsockopt call by "len + 8", the program runs and
>> the packets get the right option attached -- but also eight padding bytes.
> ERROR 404: Not Found.
Sorry, http://home.samfundet.no/~sesse/v6opt.c
/* Steinar */
--
Homepage: http://www.sesse.net/
next prev parent reply other threads:[~2009-08-20 13:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 11:11 IPV6_RTHDR with a type-0 routing header Steinar H. Gunderson
2009-08-20 11:29 ` Jens Rosenboom
2009-08-20 11:29 ` Rémi Denis-Courmont
2009-08-20 12:18 ` Steinar H. Gunderson
2009-08-20 12:39 ` Steinar H. Gunderson
2009-08-20 12:53 ` Jens Rosenboom
2009-08-20 13:00 ` Steinar H. Gunderson [this message]
2009-08-20 13:11 ` Steinar H. Gunderson
2009-08-21 1:09 ` Shan Wei
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=20090820130009.GA22183@uio.no \
--to=sgunderson@bigfoot.com \
--cc=jens@mcbone.net \
--cc=netdev@vger.kernel.org \
--cc=remi@remlab.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.