Macro nix::cmsg_space [−][src]
macro_rules! cmsg_space {
($($x : ty), *) => { ... };
}
Expand description
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);