SO_TIMESTAMP vs ICMP6?

Mouse <[email protected]>
Newsgroups gmane.os.netbsd.devel.network
Message-ID <[email protected]>
I'm trying to build a program that sends and receives ICMP6 packets.  I
want accurate timestamps on the received packets.  So, I turned on
SO_TIMESTAMP on the socket.

It didn't work.  recvmsg returned zero bytes of control data.  (It
works as expected for IPv4.)

So I tried it on a 9.1 machine I have root access to at work, only to
find it doesn't work there either.

I've written a small test program.  It needs SOCK_RAW access, so it
needs to be run as root, but it's small enough to read over in full.
See {http,ftp}://ftp.rodents-montreal.org/mouse/misc/test-icmp6.c for
the source.  Run it with no args on a v6-capable machine; it uses ::1,
so you don't need a second machine.

I get "data 64, ctl 0".  The ctl number should be nonzero; the exact
value depends on things such as sizeof(struct timeval) on the relevant
system - with a little kernel bludgeoning, my dev system (my mutant
4.0.1, on i386) sees 24 there.

Could someone maybe test this to see if it works on -current?  If not,
I'll send-pr it, unless someone explains why it's not supposed to work
for IPv6.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.