On Thu, Feb 03, 2011 at 01:51:47PM +0100, Otto Moerbeek wrote: > > cmsg_len = CMSG_LEN(sizeof(struct in_addr)) > > cmsg_level = IPPROTO_IP > > cmsg_type = IP_RECVTTL > > > > And if I'm not mistaken the size of struct in_addr is 4. > > This looks like a documentation error. Actually, the data length is > CMSG_LEN(sizeof(u_char)), as can be seen in > src/netinet/ip_input.c:1744 and the implementation of > sbcreatecontrol() in src/kern/uipc_socket2.c. Try the FreeBSD code, it > looks that has a goof chanche of working. > > If this is indeed the case, I'd like to know so I can fix the man page. > > -Otto
Hi, At first glance it seems to be working with the FreeBSD code. On both i386 and amd64. Thanks! So it must be a documentation bug. Thanks for your help! -peter
