1 // Copyright 2020 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4 5 //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 7 package socket
8 9 import "golang.org/x/sys/unix"
10 11 func controlHeaderLen() int {
12 return unix.CmsgLen(0)
13 }
14 15 func controlMessageLen(dataLen int) int {
16 return unix.CmsgLen(dataLen)
17 }
18 19 func controlMessageSpace(dataLen int) int {
20 return unix.CmsgSpace(dataLen)
21 }
22