Re: IP_RECVTTL socket option.

[email protected] Wed, 30 Apr 2003 15:45:23 +0900
Newsgroups gmane.os.bsd.api.general
Message-ID <[email protected]>
>I've committed the IP_RECVTTL socket option to FreeBSD.
>
>(From ip(4))
>%%%
>     If the IP_RECVTTL option is enabled on a SOCK_DGRAM socket, the
>     recvmsg(2) call will return the IP TTL (time to live) field for a UDP
>     datagram.  The msg_control field in the msghdr structure points to a
>     buffer that contains a cmsghdr structure followed by the TTL.  The cms-
>     ghdr fields have the following values:
>
>     cmsg_len = sizeof(u_char)
>     cmsg_level = IPPROTO_IP
>     cmsg_type = IP_RECVTTL
>%%%
>
>This is needed for things like:
>
>http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt
>
>It would be useful of NetBSD and OpenBSD provided this feature as well.

	FYI, IPv6 counterpart (IPV6_{RECV,}HOPLIMIT in 2292bis API) uses
	cmsg_len = sizeof(int).  not sure why it is not u_int8_t.

	any reason why you don't support it for SOCK_RAW?

itojun

---------------------------------------------------------------------
The BSD APIs Discussion Mailing List
To unsubscribe:
send "unsubscribe bsd-api-discuss" to majordomo-of7zbby7T3pWk0Htik3J/[email protected]