msghdr_helper_linux_32.go 498 B

12345678910111213141516171819202122232425
  1. //go:build linux && (386 || amd64p32 || arm || mips || mipsle) && !android && !e2e_testing
  2. // +build linux
  3. // +build 386 amd64p32 arm mips mipsle
  4. // +build !android
  5. // +build !e2e_testing
  6. package udp
  7. import "golang.org/x/sys/unix"
  8. func controllen(n int) uint32 {
  9. return uint32(n)
  10. }
  11. func setCmsgLen(h *unix.Cmsghdr, n int) {
  12. h.Len = uint32(unix.CmsgLen(n))
  13. }
  14. func setIovecLen(v *unix.Iovec, n int) {
  15. v.Len = uint32(n)
  16. }
  17. func setMsghdrIovlen(m *unix.Msghdr, n int) {
  18. m.Iovlen = uint32(n)
  19. }