defs_dragonfly.go 772 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2017 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. // +build ignore
  5. // +godefs map struct_in_addr [4]byte /* in_addr */
  6. // +godefs map struct_in6_addr [16]byte /* in6_addr */
  7. package socket
  8. /*
  9. #include <sys/socket.h>
  10. #include <netinet/in.h>
  11. */
  12. import "C"
  13. type iovec C.struct_iovec
  14. type msghdr C.struct_msghdr
  15. type cmsghdr C.struct_cmsghdr
  16. type sockaddrInet C.struct_sockaddr_in
  17. type sockaddrInet6 C.struct_sockaddr_in6
  18. const (
  19. sizeofIovec = C.sizeof_struct_iovec
  20. sizeofMsghdr = C.sizeof_struct_msghdr
  21. sizeofCmsghdr = C.sizeof_struct_cmsghdr
  22. sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
  23. sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
  24. )