X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..4d15aeb193b2c68f1d38666c317f8d3734f5f083:/bsd/man/man4/ip.4 diff --git a/bsd/man/man4/ip.4 b/bsd/man/man4/ip.4 index cf0337391..c5cc79b90 100644 --- a/bsd/man/man4/ip.4 +++ b/bsd/man/man4/ip.4 @@ -129,10 +129,29 @@ that contains a cmsghdr structure followed by the address. The cmsghdr fields have the following values: .Bd -literal -cmsg_len = sizeof(struct in_addr) +cmsg_len = CMSG_LEN(sizeof(struct in_addr)) cmsg_level = IPPROTO_IP cmsg_type = IP_RECVDSTADDR .Ed +.Pp +If the +.Dv IP_RECVTOS +option is enabled on a +.Dv SOCK_DGRAM +or +.Dv SOCK_RAW +socket, +the +.Xr recvmsg +call will return the TOS (type of service) field of the IP header. +The msg_control field in the msghdr structure points to a buffer +that contains a cmsghdr structure followed by the TOS. +The cmsghdr fields have the following values: +.Bd -literal +cmsg_len = CMSG_LEN(sizeof(u_char)) +cmsg_level = IPPROTO_IP +cmsg_type = IP_RECVTOS +.Ed .Ss "Multicast Options" .Pp .Tn IP