Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

149 rindas
3.1 KiB

  1. // Created by cgo -godefs - DO NOT EDIT
  2. // cgo -godefs defs_linux.go
  3. package ipv4
  4. const (
  5. sysIP_TOS = 0x1
  6. sysIP_TTL = 0x2
  7. sysIP_HDRINCL = 0x3
  8. sysIP_OPTIONS = 0x4
  9. sysIP_ROUTER_ALERT = 0x5
  10. sysIP_RECVOPTS = 0x6
  11. sysIP_RETOPTS = 0x7
  12. sysIP_PKTINFO = 0x8
  13. sysIP_PKTOPTIONS = 0x9
  14. sysIP_MTU_DISCOVER = 0xa
  15. sysIP_RECVERR = 0xb
  16. sysIP_RECVTTL = 0xc
  17. sysIP_RECVTOS = 0xd
  18. sysIP_MTU = 0xe
  19. sysIP_FREEBIND = 0xf
  20. sysIP_TRANSPARENT = 0x13
  21. sysIP_RECVRETOPTS = 0x7
  22. sysIP_ORIGDSTADDR = 0x14
  23. sysIP_RECVORIGDSTADDR = 0x14
  24. sysIP_MINTTL = 0x15
  25. sysIP_NODEFRAG = 0x16
  26. sysIP_UNICAST_IF = 0x32
  27. sysIP_MULTICAST_IF = 0x20
  28. sysIP_MULTICAST_TTL = 0x21
  29. sysIP_MULTICAST_LOOP = 0x22
  30. sysIP_ADD_MEMBERSHIP = 0x23
  31. sysIP_DROP_MEMBERSHIP = 0x24
  32. sysIP_UNBLOCK_SOURCE = 0x25
  33. sysIP_BLOCK_SOURCE = 0x26
  34. sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
  35. sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
  36. sysIP_MSFILTER = 0x29
  37. sysMCAST_JOIN_GROUP = 0x2a
  38. sysMCAST_LEAVE_GROUP = 0x2d
  39. sysMCAST_JOIN_SOURCE_GROUP = 0x2e
  40. sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
  41. sysMCAST_BLOCK_SOURCE = 0x2b
  42. sysMCAST_UNBLOCK_SOURCE = 0x2c
  43. sysMCAST_MSFILTER = 0x30
  44. sysIP_MULTICAST_ALL = 0x31
  45. sysICMP_FILTER = 0x1
  46. sysSO_EE_ORIGIN_NONE = 0x0
  47. sysSO_EE_ORIGIN_LOCAL = 0x1
  48. sysSO_EE_ORIGIN_ICMP = 0x2
  49. sysSO_EE_ORIGIN_ICMP6 = 0x3
  50. sysSO_EE_ORIGIN_TXSTATUS = 0x4
  51. sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
  52. sysSOL_SOCKET = 0x1
  53. sysSO_ATTACH_FILTER = 0x1a
  54. sizeofKernelSockaddrStorage = 0x80
  55. sizeofSockaddrInet = 0x10
  56. sizeofInetPktinfo = 0xc
  57. sizeofSockExtendedErr = 0x10
  58. sizeofIPMreq = 0x8
  59. sizeofIPMreqn = 0xc
  60. sizeofIPMreqSource = 0xc
  61. sizeofGroupReq = 0x84
  62. sizeofGroupSourceReq = 0x104
  63. sizeofICMPFilter = 0x4
  64. sizeofSockFprog = 0x8
  65. )
  66. type kernelSockaddrStorage struct {
  67. Family uint16
  68. X__data [126]uint8
  69. }
  70. type sockaddrInet struct {
  71. Family uint16
  72. Port uint16
  73. Addr [4]byte /* in_addr */
  74. X__pad [8]uint8
  75. }
  76. type inetPktinfo struct {
  77. Ifindex int32
  78. Spec_dst [4]byte /* in_addr */
  79. Addr [4]byte /* in_addr */
  80. }
  81. type sockExtendedErr struct {
  82. Errno uint32
  83. Origin uint8
  84. Type uint8
  85. Code uint8
  86. Pad uint8
  87. Info uint32
  88. Data uint32
  89. }
  90. type ipMreq struct {
  91. Multiaddr [4]byte /* in_addr */
  92. Interface [4]byte /* in_addr */
  93. }
  94. type ipMreqn struct {
  95. Multiaddr [4]byte /* in_addr */
  96. Address [4]byte /* in_addr */
  97. Ifindex int32
  98. }
  99. type ipMreqSource struct {
  100. Multiaddr uint32
  101. Interface uint32
  102. Sourceaddr uint32
  103. }
  104. type groupReq struct {
  105. Interface uint32
  106. Group kernelSockaddrStorage
  107. }
  108. type groupSourceReq struct {
  109. Interface uint32
  110. Group kernelSockaddrStorage
  111. Source kernelSockaddrStorage
  112. }
  113. type icmpFilter struct {
  114. Data uint32
  115. }
  116. type sockFProg struct {
  117. Len uint16
  118. Pad_cgo_0 [2]byte
  119. Filter *sockFilter
  120. }
  121. type sockFilter struct {
  122. Code uint16
  123. Jt uint8
  124. Jf uint8
  125. K uint32
  126. }