Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Aug 2012 16:55:45 +0100
From:      "Colin O'Keeffe" <cokeeffe@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   IPv6 Destination Option Header options problem
Message-ID:  <CAE11QawK2UyE3NPvFxfv5OyLDyGOecs=W%2BVO0BH52B6us38sVw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

As part of a research task, I'm trying to add additional options to a
ip6_dest header. I've taken the code for the jumbo option header
(ip6_output.c line 1254) and modified that to take one value (a u_int32). I
can send and receive this header, with this value no problem.

The problem I'm having is adding a second option into the extension header.
Can anyone guide me into what I'm doing wrong?

I've tried the following

/* fill in the option. */01333         optbuf[2] = IP6OPT_JUMBO;01334
       optbuf[3] = 4;01335         v = (u_int32_t)htonl(plen +
JUMBOOPTLEN <http://www.leidinger.net/FreeBSD/dox/netinet6/html/d9/d5e/ip6__output_8c.html#afad55bf37dc3a5dc03dfe3ca1dacfbcc>);01336
        bcopy(&v, &optbuf[4], sizeof(u_int32_t));01337

01337 optbuf[2] = IP6OPT_JUMBO;

01334         optbuf[3] = 4;

01335         v = (u_int32_t)htonl(plen + JUMBOOPTLEN
<http://www.leidinger.net/FreeBSD/dox/netinet6/html/d9/d5e/ip6__output_8c.html#afad55bf37dc3a5dc03dfe3ca1dacfbcc>);

01336         bcopy(&v, &optbuf[4], sizeof(u_int32_t));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE11QawK2UyE3NPvFxfv5OyLDyGOecs=W%2BVO0BH52B6us38sVw>