Macro nix::cmsg_space [−][src]
Create a buffer large enough for storing some control messages as returned
by recvmsg
.
Examples
// Create a buffer for a `ControlMessageOwned::ScmTimestamp` message let _ = cmsg_space!(TimeVal); // Create a buffer big enough for a `ControlMessageOwned::ScmRights` message // with two file descriptors let _ = cmsg_space!([RawFd; 2]); // Create a buffer big enough for a `ControlMessageOwned::ScmRights` message // and a `ControlMessageOwned::ScmTimestamp` message let _ = cmsg_space!(RawFd, TimeVal);