zsys_zos_s390x.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. // Hand edited based on zerrors_zos_s390x.go
  5. // TODO(Bill O'Farrell): auto-generate.
  6. package ipv4
  7. const (
  8. sysIP_ADD_MEMBERSHIP = 5
  9. sysIP_ADD_SOURCE_MEMBERSHIP = 12
  10. sysIP_BLOCK_SOURCE = 10
  11. sysIP_DEFAULT_MULTICAST_LOOP = 1
  12. sysIP_DEFAULT_MULTICAST_TTL = 1
  13. sysIP_DROP_MEMBERSHIP = 6
  14. sysIP_DROP_SOURCE_MEMBERSHIP = 13
  15. sysIP_MAX_MEMBERSHIPS = 20
  16. sysIP_MULTICAST_IF = 7
  17. sysIP_MULTICAST_LOOP = 4
  18. sysIP_MULTICAST_TTL = 3
  19. sysIP_OPTIONS = 1
  20. sysIP_PKTINFO = 101
  21. sysIP_RECVPKTINFO = 102
  22. sysIP_TOS = 2
  23. sysIP_UNBLOCK_SOURCE = 11
  24. sysMCAST_JOIN_GROUP = 40
  25. sysMCAST_LEAVE_GROUP = 41
  26. sysMCAST_JOIN_SOURCE_GROUP = 42
  27. sysMCAST_LEAVE_SOURCE_GROUP = 43
  28. sysMCAST_BLOCK_SOURCE = 44
  29. sysMCAST_UNBLOCK_SOURCE = 45
  30. sizeofIPMreq = 8
  31. sizeofSockaddrInet4 = 16
  32. sizeofSockaddrStorage = 128
  33. sizeofGroupReq = 136
  34. sizeofGroupSourceReq = 264
  35. sizeofInetPktinfo = 8
  36. )
  37. type sockaddrInet4 struct {
  38. Len uint8
  39. Family uint8
  40. Port uint16
  41. Addr [4]byte
  42. Zero [8]uint8
  43. }
  44. type inetPktinfo struct {
  45. Addr [4]byte
  46. Ifindex uint32
  47. }
  48. type sockaddrStorage struct {
  49. Len uint8
  50. Family byte
  51. ss_pad1 [6]byte
  52. ss_align int64
  53. ss_pad2 [112]byte
  54. }
  55. type groupReq struct {
  56. Interface uint32
  57. reserved uint32
  58. Group sockaddrStorage
  59. }
  60. type groupSourceReq struct {
  61. Interface uint32
  62. reserved uint32
  63. Group sockaddrStorage
  64. Source sockaddrStorage
  65. }
  66. type ipMreq struct {
  67. Multiaddr [4]byte /* in_addr */
  68. Interface [4]byte /* in_addr */
  69. }