go/src/syscall/sockcmsg_unix.go

// CmsgLen returns the value to store in the Len field of the [Cmsghdr]
// structure, taking into account any necessary alignment.
func CmsgLen(datalen int) int {}

// CmsgSpace returns the number of bytes an ancillary element with
// payload of the passed data length occupies.
func CmsgSpace(datalen int) int {}

func (h *Cmsghdr) data(offset uintptr) unsafe.Pointer {}

type SocketControlMessage

// ParseSocketControlMessage parses b as an array of socket control
// messages.
func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {}

func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {}

// UnixRights encodes a set of open file descriptors into a socket
// control message for sending to another process.
func UnixRights(fds ...int) []byte {}

// ParseUnixRights decodes a socket control message that contains an
// integer array of open file descriptors from another process.
func ParseUnixRights(m *SocketControlMessage) ([]int, error) {}