Sendmsg, Recvmsg and Ancillary Data Operations
Socket::MsgHdr provides advanced socket messaging operations via sendmsg and recvmsg. Like their C counterparts, these functions accept few parameters, instead stuffing a lot of information into a complex structure.
This structure describes the message sent or received (buf), the peer on the other end of the socket (name), and ancillary or so-called control information (cmsghdr). This ancillary data may be used for file descriptor passing, IPv6 operations, and a host of implemenation-specific extensions.