mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 16:34:25 +01:00
26 lines
580 B
Go
26 lines
580 B
Go
//go:build linux && (amd64 || arm64 || ppc64 || ppc64le || mips64 || mips64le || s390x || riscv64 || loong64) && !android && !e2e_testing
|
|
// +build linux
|
|
// +build amd64 arm64 ppc64 ppc64le mips64 mips64le s390x riscv64 loong64
|
|
// +build !android
|
|
// +build !e2e_testing
|
|
|
|
package udp
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
func controllen(n int) uint64 {
|
|
return uint64(n)
|
|
}
|
|
|
|
func setCmsgLen(h *unix.Cmsghdr, n int) {
|
|
h.Len = uint64(unix.CmsgLen(n))
|
|
}
|
|
|
|
func setIovecLen(v *unix.Iovec, n int) {
|
|
v.Len = uint64(n)
|
|
}
|
|
|
|
func setMsghdrIovlen(m *unix.Msghdr, n int) {
|
|
m.Iovlen = uint64(n)
|
|
}
|