You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2516 lines
64 KiB

Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
Better logging (#6038) (#6095) * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
5 years ago
  1. // cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build arm64,linux
  4. package unix
  5. const (
  6. SizeofPtr = 0x8
  7. SizeofShort = 0x2
  8. SizeofInt = 0x4
  9. SizeofLong = 0x8
  10. SizeofLongLong = 0x8
  11. PathMax = 0x1000
  12. )
  13. type (
  14. _C_short int16
  15. _C_int int32
  16. _C_long int64
  17. _C_long_long int64
  18. )
  19. type Timespec struct {
  20. Sec int64
  21. Nsec int64
  22. }
  23. type Timeval struct {
  24. Sec int64
  25. Usec int64
  26. }
  27. type Timex struct {
  28. Modes uint32
  29. Offset int64
  30. Freq int64
  31. Maxerror int64
  32. Esterror int64
  33. Status int32
  34. Constant int64
  35. Precision int64
  36. Tolerance int64
  37. Time Timeval
  38. Tick int64
  39. Ppsfreq int64
  40. Jitter int64
  41. Shift int32
  42. Stabil int64
  43. Jitcnt int64
  44. Calcnt int64
  45. Errcnt int64
  46. Stbcnt int64
  47. Tai int32
  48. _ [44]byte
  49. }
  50. type Time_t int64
  51. type Tms struct {
  52. Utime int64
  53. Stime int64
  54. Cutime int64
  55. Cstime int64
  56. }
  57. type Utimbuf struct {
  58. Actime int64
  59. Modtime int64
  60. }
  61. type Rusage struct {
  62. Utime Timeval
  63. Stime Timeval
  64. Maxrss int64
  65. Ixrss int64
  66. Idrss int64
  67. Isrss int64
  68. Minflt int64
  69. Majflt int64
  70. Nswap int64
  71. Inblock int64
  72. Oublock int64
  73. Msgsnd int64
  74. Msgrcv int64
  75. Nsignals int64
  76. Nvcsw int64
  77. Nivcsw int64
  78. }
  79. type Rlimit struct {
  80. Cur uint64
  81. Max uint64
  82. }
  83. type _Gid_t uint32
  84. type Stat_t struct {
  85. Dev uint64
  86. Ino uint64
  87. Mode uint32
  88. Nlink uint32
  89. Uid uint32
  90. Gid uint32
  91. Rdev uint64
  92. _ uint64
  93. Size int64
  94. Blksize int32
  95. _ int32
  96. Blocks int64
  97. Atim Timespec
  98. Mtim Timespec
  99. Ctim Timespec
  100. _ [2]int32
  101. }
  102. type StatxTimestamp struct {
  103. Sec int64
  104. Nsec uint32
  105. _ int32
  106. }
  107. type Statx_t struct {
  108. Mask uint32
  109. Blksize uint32
  110. Attributes uint64
  111. Nlink uint32
  112. Uid uint32
  113. Gid uint32
  114. Mode uint16
  115. _ [1]uint16
  116. Ino uint64
  117. Size uint64
  118. Blocks uint64
  119. Attributes_mask uint64
  120. Atime StatxTimestamp
  121. Btime StatxTimestamp
  122. Ctime StatxTimestamp
  123. Mtime StatxTimestamp
  124. Rdev_major uint32
  125. Rdev_minor uint32
  126. Dev_major uint32
  127. Dev_minor uint32
  128. _ [14]uint64
  129. }
  130. type Dirent struct {
  131. Ino uint64
  132. Off int64
  133. Reclen uint16
  134. Type uint8
  135. Name [256]int8
  136. _ [5]byte
  137. }
  138. type Fsid struct {
  139. Val [2]int32
  140. }
  141. type Flock_t struct {
  142. Type int16
  143. Whence int16
  144. Start int64
  145. Len int64
  146. Pid int32
  147. _ [4]byte
  148. }
  149. type FscryptPolicy struct {
  150. Version uint8
  151. Contents_encryption_mode uint8
  152. Filenames_encryption_mode uint8
  153. Flags uint8
  154. Master_key_descriptor [8]uint8
  155. }
  156. type FscryptKey struct {
  157. Mode uint32
  158. Raw [64]uint8
  159. Size uint32
  160. }
  161. type KeyctlDHParams struct {
  162. Private int32
  163. Prime int32
  164. Base int32
  165. }
  166. const (
  167. FADV_NORMAL = 0x0
  168. FADV_RANDOM = 0x1
  169. FADV_SEQUENTIAL = 0x2
  170. FADV_WILLNEED = 0x3
  171. FADV_DONTNEED = 0x4
  172. FADV_NOREUSE = 0x5
  173. )
  174. type RawSockaddrInet4 struct {
  175. Family uint16
  176. Port uint16
  177. Addr [4]byte /* in_addr */
  178. Zero [8]uint8
  179. }
  180. type RawSockaddrInet6 struct {
  181. Family uint16
  182. Port uint16
  183. Flowinfo uint32
  184. Addr [16]byte /* in6_addr */
  185. Scope_id uint32
  186. }
  187. type RawSockaddrUnix struct {
  188. Family uint16
  189. Path [108]int8
  190. }
  191. type RawSockaddrLinklayer struct {
  192. Family uint16
  193. Protocol uint16
  194. Ifindex int32
  195. Hatype uint16
  196. Pkttype uint8
  197. Halen uint8
  198. Addr [8]uint8
  199. }
  200. type RawSockaddrNetlink struct {
  201. Family uint16
  202. Pad uint16
  203. Pid uint32
  204. Groups uint32
  205. }
  206. type RawSockaddrHCI struct {
  207. Family uint16
  208. Dev uint16
  209. Channel uint16
  210. }
  211. type RawSockaddrL2 struct {
  212. Family uint16
  213. Psm uint16
  214. Bdaddr [6]uint8
  215. Cid uint16
  216. Bdaddr_type uint8
  217. _ [1]byte
  218. }
  219. type RawSockaddrRFCOMM struct {
  220. Family uint16
  221. Bdaddr [6]uint8
  222. Channel uint8
  223. _ [1]byte
  224. }
  225. type RawSockaddrCAN struct {
  226. Family uint16
  227. Ifindex int32
  228. Addr [8]byte
  229. }
  230. type RawSockaddrALG struct {
  231. Family uint16
  232. Type [14]uint8
  233. Feat uint32
  234. Mask uint32
  235. Name [64]uint8
  236. }
  237. type RawSockaddrVM struct {
  238. Family uint16
  239. Reserved1 uint16
  240. Port uint32
  241. Cid uint32
  242. Zero [4]uint8
  243. }
  244. type RawSockaddrXDP struct {
  245. Family uint16
  246. Flags uint16
  247. Ifindex uint32
  248. Queue_id uint32
  249. Shared_umem_fd uint32
  250. }
  251. type RawSockaddrPPPoX [0x1e]byte
  252. type RawSockaddr struct {
  253. Family uint16
  254. Data [14]int8
  255. }
  256. type RawSockaddrAny struct {
  257. Addr RawSockaddr
  258. Pad [96]int8
  259. }
  260. type _Socklen uint32
  261. type Linger struct {
  262. Onoff int32
  263. Linger int32
  264. }
  265. type Iovec struct {
  266. Base *byte
  267. Len uint64
  268. }
  269. type IPMreq struct {
  270. Multiaddr [4]byte /* in_addr */
  271. Interface [4]byte /* in_addr */
  272. }
  273. type IPMreqn struct {
  274. Multiaddr [4]byte /* in_addr */
  275. Address [4]byte /* in_addr */
  276. Ifindex int32
  277. }
  278. type IPv6Mreq struct {
  279. Multiaddr [16]byte /* in6_addr */
  280. Interface uint32
  281. }
  282. type PacketMreq struct {
  283. Ifindex int32
  284. Type uint16
  285. Alen uint16
  286. Address [8]uint8
  287. }
  288. type Msghdr struct {
  289. Name *byte
  290. Namelen uint32
  291. Iov *Iovec
  292. Iovlen uint64
  293. Control *byte
  294. Controllen uint64
  295. Flags int32
  296. _ [4]byte
  297. }
  298. type Cmsghdr struct {
  299. Len uint64
  300. Level int32
  301. Type int32
  302. }
  303. type Inet4Pktinfo struct {
  304. Ifindex int32
  305. Spec_dst [4]byte /* in_addr */
  306. Addr [4]byte /* in_addr */
  307. }
  308. type Inet6Pktinfo struct {
  309. Addr [16]byte /* in6_addr */
  310. Ifindex uint32
  311. }
  312. type IPv6MTUInfo struct {
  313. Addr RawSockaddrInet6
  314. Mtu uint32
  315. }
  316. type ICMPv6Filter struct {
  317. Data [8]uint32
  318. }
  319. type Ucred struct {
  320. Pid int32
  321. Uid uint32
  322. Gid uint32
  323. }
  324. type TCPInfo struct {
  325. State uint8
  326. Ca_state uint8
  327. Retransmits uint8
  328. Probes uint8
  329. Backoff uint8
  330. Options uint8
  331. Rto uint32
  332. Ato uint32
  333. Snd_mss uint32
  334. Rcv_mss uint32
  335. Unacked uint32
  336. Sacked uint32
  337. Lost uint32
  338. Retrans uint32
  339. Fackets uint32
  340. Last_data_sent uint32
  341. Last_ack_sent uint32
  342. Last_data_recv uint32
  343. Last_ack_recv uint32
  344. Pmtu uint32
  345. Rcv_ssthresh uint32
  346. Rtt uint32
  347. Rttvar uint32
  348. Snd_ssthresh uint32
  349. Snd_cwnd uint32
  350. Advmss uint32
  351. Reordering uint32
  352. Rcv_rtt uint32
  353. Rcv_space uint32
  354. Total_retrans uint32
  355. }
  356. type CanFilter struct {
  357. Id uint32
  358. Mask uint32
  359. }
  360. const (
  361. SizeofSockaddrInet4 = 0x10
  362. SizeofSockaddrInet6 = 0x1c
  363. SizeofSockaddrAny = 0x70
  364. SizeofSockaddrUnix = 0x6e
  365. SizeofSockaddrLinklayer = 0x14
  366. SizeofSockaddrNetlink = 0xc
  367. SizeofSockaddrHCI = 0x6
  368. SizeofSockaddrL2 = 0xe
  369. SizeofSockaddrRFCOMM = 0xa
  370. SizeofSockaddrCAN = 0x10
  371. SizeofSockaddrALG = 0x58
  372. SizeofSockaddrVM = 0x10
  373. SizeofSockaddrXDP = 0x10
  374. SizeofSockaddrPPPoX = 0x1e
  375. SizeofLinger = 0x8
  376. SizeofIovec = 0x10
  377. SizeofIPMreq = 0x8
  378. SizeofIPMreqn = 0xc
  379. SizeofIPv6Mreq = 0x14
  380. SizeofPacketMreq = 0x10
  381. SizeofMsghdr = 0x38
  382. SizeofCmsghdr = 0x10
  383. SizeofInet4Pktinfo = 0xc
  384. SizeofInet6Pktinfo = 0x14
  385. SizeofIPv6MTUInfo = 0x20
  386. SizeofICMPv6Filter = 0x20
  387. SizeofUcred = 0xc
  388. SizeofTCPInfo = 0x68
  389. SizeofCanFilter = 0x8
  390. )
  391. const (
  392. NDA_UNSPEC = 0x0
  393. NDA_DST = 0x1
  394. NDA_LLADDR = 0x2
  395. NDA_CACHEINFO = 0x3
  396. NDA_PROBES = 0x4
  397. NDA_VLAN = 0x5
  398. NDA_PORT = 0x6
  399. NDA_VNI = 0x7
  400. NDA_IFINDEX = 0x8
  401. NDA_MASTER = 0x9
  402. NDA_LINK_NETNSID = 0xa
  403. NDA_SRC_VNI = 0xb
  404. NTF_USE = 0x1
  405. NTF_SELF = 0x2
  406. NTF_MASTER = 0x4
  407. NTF_PROXY = 0x8
  408. NTF_EXT_LEARNED = 0x10
  409. NTF_OFFLOADED = 0x20
  410. NTF_ROUTER = 0x80
  411. NUD_INCOMPLETE = 0x1
  412. NUD_REACHABLE = 0x2
  413. NUD_STALE = 0x4
  414. NUD_DELAY = 0x8
  415. NUD_PROBE = 0x10
  416. NUD_FAILED = 0x20
  417. NUD_NOARP = 0x40
  418. NUD_PERMANENT = 0x80
  419. NUD_NONE = 0x0
  420. IFA_UNSPEC = 0x0
  421. IFA_ADDRESS = 0x1
  422. IFA_LOCAL = 0x2
  423. IFA_LABEL = 0x3
  424. IFA_BROADCAST = 0x4
  425. IFA_ANYCAST = 0x5
  426. IFA_CACHEINFO = 0x6
  427. IFA_MULTICAST = 0x7
  428. IFA_FLAGS = 0x8
  429. IFA_RT_PRIORITY = 0x9
  430. IFA_TARGET_NETNSID = 0xa
  431. IFLA_UNSPEC = 0x0
  432. IFLA_ADDRESS = 0x1
  433. IFLA_BROADCAST = 0x2
  434. IFLA_IFNAME = 0x3
  435. IFLA_MTU = 0x4
  436. IFLA_LINK = 0x5
  437. IFLA_QDISC = 0x6
  438. IFLA_STATS = 0x7
  439. IFLA_COST = 0x8
  440. IFLA_PRIORITY = 0x9
  441. IFLA_MASTER = 0xa
  442. IFLA_WIRELESS = 0xb
  443. IFLA_PROTINFO = 0xc
  444. IFLA_TXQLEN = 0xd
  445. IFLA_MAP = 0xe
  446. IFLA_WEIGHT = 0xf
  447. IFLA_OPERSTATE = 0x10
  448. IFLA_LINKMODE = 0x11
  449. IFLA_LINKINFO = 0x12
  450. IFLA_NET_NS_PID = 0x13
  451. IFLA_IFALIAS = 0x14
  452. IFLA_NUM_VF = 0x15
  453. IFLA_VFINFO_LIST = 0x16
  454. IFLA_STATS64 = 0x17
  455. IFLA_VF_PORTS = 0x18
  456. IFLA_PORT_SELF = 0x19
  457. IFLA_AF_SPEC = 0x1a
  458. IFLA_GROUP = 0x1b
  459. IFLA_NET_NS_FD = 0x1c
  460. IFLA_EXT_MASK = 0x1d
  461. IFLA_PROMISCUITY = 0x1e
  462. IFLA_NUM_TX_QUEUES = 0x1f
  463. IFLA_NUM_RX_QUEUES = 0x20
  464. IFLA_CARRIER = 0x21
  465. IFLA_PHYS_PORT_ID = 0x22
  466. IFLA_CARRIER_CHANGES = 0x23
  467. IFLA_PHYS_SWITCH_ID = 0x24
  468. IFLA_LINK_NETNSID = 0x25
  469. IFLA_PHYS_PORT_NAME = 0x26
  470. IFLA_PROTO_DOWN = 0x27
  471. IFLA_GSO_MAX_SEGS = 0x28
  472. IFLA_GSO_MAX_SIZE = 0x29
  473. IFLA_PAD = 0x2a
  474. IFLA_XDP = 0x2b
  475. IFLA_EVENT = 0x2c
  476. IFLA_NEW_NETNSID = 0x2d
  477. IFLA_IF_NETNSID = 0x2e
  478. IFLA_TARGET_NETNSID = 0x2e
  479. IFLA_CARRIER_UP_COUNT = 0x2f
  480. IFLA_CARRIER_DOWN_COUNT = 0x30
  481. IFLA_NEW_IFINDEX = 0x31
  482. IFLA_MIN_MTU = 0x32
  483. IFLA_MAX_MTU = 0x33
  484. IFLA_MAX = 0x33
  485. IFLA_INFO_KIND = 0x1
  486. IFLA_INFO_DATA = 0x2
  487. IFLA_INFO_XSTATS = 0x3
  488. IFLA_INFO_SLAVE_KIND = 0x4
  489. IFLA_INFO_SLAVE_DATA = 0x5
  490. RT_SCOPE_UNIVERSE = 0x0
  491. RT_SCOPE_SITE = 0xc8
  492. RT_SCOPE_LINK = 0xfd
  493. RT_SCOPE_HOST = 0xfe
  494. RT_SCOPE_NOWHERE = 0xff
  495. RT_TABLE_UNSPEC = 0x0
  496. RT_TABLE_COMPAT = 0xfc
  497. RT_TABLE_DEFAULT = 0xfd
  498. RT_TABLE_MAIN = 0xfe
  499. RT_TABLE_LOCAL = 0xff
  500. RT_TABLE_MAX = 0xffffffff
  501. RTA_UNSPEC = 0x0
  502. RTA_DST = 0x1
  503. RTA_SRC = 0x2
  504. RTA_IIF = 0x3
  505. RTA_OIF = 0x4
  506. RTA_GATEWAY = 0x5
  507. RTA_PRIORITY = 0x6
  508. RTA_PREFSRC = 0x7
  509. RTA_METRICS = 0x8
  510. RTA_MULTIPATH = 0x9
  511. RTA_FLOW = 0xb
  512. RTA_CACHEINFO = 0xc
  513. RTA_TABLE = 0xf
  514. RTA_MARK = 0x10
  515. RTA_MFC_STATS = 0x11
  516. RTA_VIA = 0x12
  517. RTA_NEWDST = 0x13
  518. RTA_PREF = 0x14
  519. RTA_ENCAP_TYPE = 0x15
  520. RTA_ENCAP = 0x16
  521. RTA_EXPIRES = 0x17
  522. RTA_PAD = 0x18
  523. RTA_UID = 0x19
  524. RTA_TTL_PROPAGATE = 0x1a
  525. RTA_IP_PROTO = 0x1b
  526. RTA_SPORT = 0x1c
  527. RTA_DPORT = 0x1d
  528. RTN_UNSPEC = 0x0
  529. RTN_UNICAST = 0x1
  530. RTN_LOCAL = 0x2
  531. RTN_BROADCAST = 0x3
  532. RTN_ANYCAST = 0x4
  533. RTN_MULTICAST = 0x5
  534. RTN_BLACKHOLE = 0x6
  535. RTN_UNREACHABLE = 0x7
  536. RTN_PROHIBIT = 0x8
  537. RTN_THROW = 0x9
  538. RTN_NAT = 0xa
  539. RTN_XRESOLVE = 0xb
  540. RTNLGRP_NONE = 0x0
  541. RTNLGRP_LINK = 0x1
  542. RTNLGRP_NOTIFY = 0x2
  543. RTNLGRP_NEIGH = 0x3
  544. RTNLGRP_TC = 0x4
  545. RTNLGRP_IPV4_IFADDR = 0x5
  546. RTNLGRP_IPV4_MROUTE = 0x6
  547. RTNLGRP_IPV4_ROUTE = 0x7
  548. RTNLGRP_IPV4_RULE = 0x8
  549. RTNLGRP_IPV6_IFADDR = 0x9
  550. RTNLGRP_IPV6_MROUTE = 0xa
  551. RTNLGRP_IPV6_ROUTE = 0xb
  552. RTNLGRP_IPV6_IFINFO = 0xc
  553. RTNLGRP_IPV6_PREFIX = 0x12
  554. RTNLGRP_IPV6_RULE = 0x13
  555. RTNLGRP_ND_USEROPT = 0x14
  556. SizeofNlMsghdr = 0x10
  557. SizeofNlMsgerr = 0x14
  558. SizeofRtGenmsg = 0x1
  559. SizeofNlAttr = 0x4
  560. SizeofRtAttr = 0x4
  561. SizeofIfInfomsg = 0x10
  562. SizeofIfAddrmsg = 0x8
  563. SizeofRtMsg = 0xc
  564. SizeofRtNexthop = 0x8
  565. SizeofNdUseroptmsg = 0x10
  566. SizeofNdMsg = 0xc
  567. )
  568. type NlMsghdr struct {
  569. Len uint32
  570. Type uint16
  571. Flags uint16
  572. Seq uint32
  573. Pid uint32
  574. }
  575. type NlMsgerr struct {
  576. Error int32
  577. Msg NlMsghdr
  578. }
  579. type RtGenmsg struct {
  580. Family uint8
  581. }
  582. type NlAttr struct {
  583. Len uint16
  584. Type uint16
  585. }
  586. type RtAttr struct {
  587. Len uint16
  588. Type uint16
  589. }
  590. type IfInfomsg struct {
  591. Family uint8
  592. _ uint8
  593. Type uint16
  594. Index int32
  595. Flags uint32
  596. Change uint32
  597. }
  598. type IfAddrmsg struct {
  599. Family uint8
  600. Prefixlen uint8
  601. Flags uint8
  602. Scope uint8
  603. Index uint32
  604. }
  605. type RtMsg struct {
  606. Family uint8
  607. Dst_len uint8
  608. Src_len uint8
  609. Tos uint8
  610. Table uint8
  611. Protocol uint8
  612. Scope uint8
  613. Type uint8
  614. Flags uint32
  615. }
  616. type RtNexthop struct {
  617. Len uint16
  618. Flags uint8
  619. Hops uint8
  620. Ifindex int32
  621. }
  622. type NdUseroptmsg struct {
  623. Family uint8
  624. Pad1 uint8
  625. Opts_len uint16
  626. Ifindex int32
  627. Icmp_type uint8
  628. Icmp_code uint8
  629. Pad2 uint16
  630. Pad3 uint32
  631. }
  632. type NdMsg struct {
  633. Family uint8
  634. Pad1 uint8
  635. Pad2 uint16
  636. Ifindex int32
  637. State uint16
  638. Flags uint8
  639. Type uint8
  640. }
  641. const (
  642. SizeofSockFilter = 0x8
  643. SizeofSockFprog = 0x10
  644. )
  645. type SockFilter struct {
  646. Code uint16
  647. Jt uint8
  648. Jf uint8
  649. K uint32
  650. }
  651. type SockFprog struct {
  652. Len uint16
  653. Filter *SockFilter
  654. }
  655. type InotifyEvent struct {
  656. Wd int32
  657. Mask uint32
  658. Cookie uint32
  659. Len uint32
  660. }
  661. const SizeofInotifyEvent = 0x10
  662. type PtraceRegs struct {
  663. Regs [31]uint64
  664. Sp uint64
  665. Pc uint64
  666. Pstate uint64
  667. }
  668. type FdSet struct {
  669. Bits [16]int64
  670. }
  671. type Sysinfo_t struct {
  672. Uptime int64
  673. Loads [3]uint64
  674. Totalram uint64
  675. Freeram uint64
  676. Sharedram uint64
  677. Bufferram uint64
  678. Totalswap uint64
  679. Freeswap uint64
  680. Procs uint16
  681. Pad uint16
  682. Totalhigh uint64
  683. Freehigh uint64
  684. Unit uint32
  685. _ [0]int8
  686. _ [4]byte
  687. }
  688. type Utsname struct {
  689. Sysname [65]byte
  690. Nodename [65]byte
  691. Release [65]byte
  692. Version [65]byte
  693. Machine [65]byte
  694. Domainname [65]byte
  695. }
  696. type Ustat_t struct {
  697. Tfree int32
  698. Tinode uint64
  699. Fname [6]int8
  700. Fpack [6]int8
  701. _ [4]byte
  702. }
  703. type EpollEvent struct {
  704. Events uint32
  705. PadFd int32
  706. Fd int32
  707. Pad int32
  708. }
  709. const (
  710. AT_EMPTY_PATH = 0x1000
  711. AT_FDCWD = -0x64
  712. AT_NO_AUTOMOUNT = 0x800
  713. AT_REMOVEDIR = 0x200
  714. AT_STATX_SYNC_AS_STAT = 0x0
  715. AT_STATX_FORCE_SYNC = 0x2000
  716. AT_STATX_DONT_SYNC = 0x4000
  717. AT_SYMLINK_FOLLOW = 0x400
  718. AT_SYMLINK_NOFOLLOW = 0x100
  719. AT_EACCESS = 0x200
  720. )
  721. type PollFd struct {
  722. Fd int32
  723. Events int16
  724. Revents int16
  725. }
  726. const (
  727. POLLIN = 0x1
  728. POLLPRI = 0x2
  729. POLLOUT = 0x4
  730. POLLRDHUP = 0x2000
  731. POLLERR = 0x8
  732. POLLHUP = 0x10
  733. POLLNVAL = 0x20
  734. )
  735. type Sigset_t struct {
  736. Val [16]uint64
  737. }
  738. const _C__NSIG = 0x41
  739. type SignalfdSiginfo struct {
  740. Signo uint32
  741. Errno int32
  742. Code int32
  743. Pid uint32
  744. Uid uint32
  745. Fd int32
  746. Tid uint32
  747. Band uint32
  748. Overrun uint32
  749. Trapno uint32
  750. Status int32
  751. Int int32
  752. Ptr uint64
  753. Utime uint64
  754. Stime uint64
  755. Addr uint64
  756. Addr_lsb uint16
  757. _ uint16
  758. Syscall int32
  759. Call_addr uint64
  760. Arch uint32
  761. _ [28]uint8
  762. }
  763. const PERF_IOC_FLAG_GROUP = 0x1
  764. type Termios struct {
  765. Iflag uint32
  766. Oflag uint32
  767. Cflag uint32
  768. Lflag uint32
  769. Line uint8
  770. Cc [19]uint8
  771. Ispeed uint32
  772. Ospeed uint32
  773. }
  774. type Winsize struct {
  775. Row uint16
  776. Col uint16
  777. Xpixel uint16
  778. Ypixel uint16
  779. }
  780. type Taskstats struct {
  781. Version uint16
  782. Ac_exitcode uint32
  783. Ac_flag uint8
  784. Ac_nice uint8
  785. Cpu_count uint64
  786. Cpu_delay_total uint64
  787. Blkio_count uint64
  788. Blkio_delay_total uint64
  789. Swapin_count uint64
  790. Swapin_delay_total uint64
  791. Cpu_run_real_total uint64
  792. Cpu_run_virtual_total uint64
  793. Ac_comm [32]int8
  794. Ac_sched uint8
  795. Ac_pad [3]uint8
  796. _ [4]byte
  797. Ac_uid uint32
  798. Ac_gid uint32
  799. Ac_pid uint32
  800. Ac_ppid uint32
  801. Ac_btime uint32
  802. Ac_etime uint64
  803. Ac_utime uint64
  804. Ac_stime uint64
  805. Ac_minflt uint64
  806. Ac_majflt uint64
  807. Coremem uint64
  808. Virtmem uint64
  809. Hiwater_rss uint64
  810. Hiwater_vm uint64
  811. Read_char uint64
  812. Write_char uint64
  813. Read_syscalls uint64
  814. Write_syscalls uint64
  815. Read_bytes uint64
  816. Write_bytes uint64
  817. Cancelled_write_bytes uint64
  818. Nvcsw uint64
  819. Nivcsw uint64
  820. Ac_utimescaled uint64
  821. Ac_stimescaled uint64
  822. Cpu_scaled_run_real_total uint64
  823. Freepages_count uint64
  824. Freepages_delay_total uint64
  825. Thrashing_count uint64
  826. Thrashing_delay_total uint64
  827. }
  828. const (
  829. TASKSTATS_CMD_UNSPEC = 0x0
  830. TASKSTATS_CMD_GET = 0x1
  831. TASKSTATS_CMD_NEW = 0x2
  832. TASKSTATS_TYPE_UNSPEC = 0x0
  833. TASKSTATS_TYPE_PID = 0x1
  834. TASKSTATS_TYPE_TGID = 0x2
  835. TASKSTATS_TYPE_STATS = 0x3
  836. TASKSTATS_TYPE_AGGR_PID = 0x4
  837. TASKSTATS_TYPE_AGGR_TGID = 0x5
  838. TASKSTATS_TYPE_NULL = 0x6
  839. TASKSTATS_CMD_ATTR_UNSPEC = 0x0
  840. TASKSTATS_CMD_ATTR_PID = 0x1
  841. TASKSTATS_CMD_ATTR_TGID = 0x2
  842. TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
  843. TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
  844. )
  845. type CGroupStats struct {
  846. Sleeping uint64
  847. Running uint64
  848. Stopped uint64
  849. Uninterruptible uint64
  850. Io_wait uint64
  851. }
  852. const (
  853. CGROUPSTATS_CMD_UNSPEC = 0x3
  854. CGROUPSTATS_CMD_GET = 0x4
  855. CGROUPSTATS_CMD_NEW = 0x5
  856. CGROUPSTATS_TYPE_UNSPEC = 0x0
  857. CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
  858. CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
  859. CGROUPSTATS_CMD_ATTR_FD = 0x1
  860. )
  861. type Genlmsghdr struct {
  862. Cmd uint8
  863. Version uint8
  864. Reserved uint16
  865. }
  866. const (
  867. CTRL_CMD_UNSPEC = 0x0
  868. CTRL_CMD_NEWFAMILY = 0x1
  869. CTRL_CMD_DELFAMILY = 0x2
  870. CTRL_CMD_GETFAMILY = 0x3
  871. CTRL_CMD_NEWOPS = 0x4
  872. CTRL_CMD_DELOPS = 0x5
  873. CTRL_CMD_GETOPS = 0x6
  874. CTRL_CMD_NEWMCAST_GRP = 0x7
  875. CTRL_CMD_DELMCAST_GRP = 0x8
  876. CTRL_CMD_GETMCAST_GRP = 0x9
  877. CTRL_ATTR_UNSPEC = 0x0
  878. CTRL_ATTR_FAMILY_ID = 0x1
  879. CTRL_ATTR_FAMILY_NAME = 0x2
  880. CTRL_ATTR_VERSION = 0x3
  881. CTRL_ATTR_HDRSIZE = 0x4
  882. CTRL_ATTR_MAXATTR = 0x5
  883. CTRL_ATTR_OPS = 0x6
  884. CTRL_ATTR_MCAST_GROUPS = 0x7
  885. CTRL_ATTR_OP_UNSPEC = 0x0
  886. CTRL_ATTR_OP_ID = 0x1
  887. CTRL_ATTR_OP_FLAGS = 0x2
  888. CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
  889. CTRL_ATTR_MCAST_GRP_NAME = 0x1
  890. CTRL_ATTR_MCAST_GRP_ID = 0x2
  891. )
  892. type cpuMask uint64
  893. const (
  894. _CPU_SETSIZE = 0x400
  895. _NCPUBITS = 0x40
  896. )
  897. const (
  898. BDADDR_BREDR = 0x0
  899. BDADDR_LE_PUBLIC = 0x1
  900. BDADDR_LE_RANDOM = 0x2
  901. )
  902. type PerfEventAttr struct {
  903. Type uint32
  904. Size uint32
  905. Config uint64
  906. Sample uint64
  907. Sample_type uint64
  908. Read_format uint64
  909. Bits uint64
  910. Wakeup uint32
  911. Bp_type uint32
  912. Ext1 uint64
  913. Ext2 uint64
  914. Branch_sample_type uint64
  915. Sample_regs_user uint64
  916. Sample_stack_user uint32
  917. Clockid int32
  918. Sample_regs_intr uint64
  919. Aux_watermark uint32
  920. Sample_max_stack uint16
  921. _ uint16
  922. }
  923. type PerfEventMmapPage struct {
  924. Version uint32
  925. Compat_version uint32
  926. Lock uint32
  927. Index uint32
  928. Offset int64
  929. Time_enabled uint64
  930. Time_running uint64
  931. Capabilities uint64
  932. Pmc_width uint16
  933. Time_shift uint16
  934. Time_mult uint32
  935. Time_offset uint64
  936. Time_zero uint64
  937. Size uint32
  938. _ [948]uint8
  939. Data_head uint64
  940. Data_tail uint64
  941. Data_offset uint64
  942. Data_size uint64
  943. Aux_head uint64
  944. Aux_tail uint64
  945. Aux_offset uint64
  946. Aux_size uint64
  947. }
  948. const (
  949. PerfBitDisabled uint64 = CBitFieldMaskBit0
  950. PerfBitInherit = CBitFieldMaskBit1
  951. PerfBitPinned = CBitFieldMaskBit2
  952. PerfBitExclusive = CBitFieldMaskBit3
  953. PerfBitExcludeUser = CBitFieldMaskBit4
  954. PerfBitExcludeKernel = CBitFieldMaskBit5
  955. PerfBitExcludeHv = CBitFieldMaskBit6
  956. PerfBitExcludeIdle = CBitFieldMaskBit7
  957. PerfBitMmap = CBitFieldMaskBit8
  958. PerfBitComm = CBitFieldMaskBit9
  959. PerfBitFreq = CBitFieldMaskBit10
  960. PerfBitInheritStat = CBitFieldMaskBit11
  961. PerfBitEnableOnExec = CBitFieldMaskBit12
  962. PerfBitTask = CBitFieldMaskBit13
  963. PerfBitWatermark = CBitFieldMaskBit14
  964. PerfBitPreciseIPBit1 = CBitFieldMaskBit15
  965. PerfBitPreciseIPBit2 = CBitFieldMaskBit16
  966. PerfBitMmapData = CBitFieldMaskBit17
  967. PerfBitSampleIDAll = CBitFieldMaskBit18
  968. PerfBitExcludeHost = CBitFieldMaskBit19
  969. PerfBitExcludeGuest = CBitFieldMaskBit20
  970. PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
  971. PerfBitExcludeCallchainUser = CBitFieldMaskBit22
  972. PerfBitMmap2 = CBitFieldMaskBit23
  973. PerfBitCommExec = CBitFieldMaskBit24
  974. PerfBitUseClockID = CBitFieldMaskBit25
  975. PerfBitContextSwitch = CBitFieldMaskBit26
  976. )
  977. const (
  978. PERF_TYPE_HARDWARE = 0x0
  979. PERF_TYPE_SOFTWARE = 0x1
  980. PERF_TYPE_TRACEPOINT = 0x2
  981. PERF_TYPE_HW_CACHE = 0x3
  982. PERF_TYPE_RAW = 0x4
  983. PERF_TYPE_BREAKPOINT = 0x5
  984. PERF_COUNT_HW_CPU_CYCLES = 0x0
  985. PERF_COUNT_HW_INSTRUCTIONS = 0x1
  986. PERF_COUNT_HW_CACHE_REFERENCES = 0x2
  987. PERF_COUNT_HW_CACHE_MISSES = 0x3
  988. PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
  989. PERF_COUNT_HW_BRANCH_MISSES = 0x5
  990. PERF_COUNT_HW_BUS_CYCLES = 0x6
  991. PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
  992. PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
  993. PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
  994. PERF_COUNT_HW_CACHE_L1D = 0x0
  995. PERF_COUNT_HW_CACHE_L1I = 0x1
  996. PERF_COUNT_HW_CACHE_LL = 0x2
  997. PERF_COUNT_HW_CACHE_DTLB = 0x3
  998. PERF_COUNT_HW_CACHE_ITLB = 0x4
  999. PERF_COUNT_HW_CACHE_BPU = 0x5
  1000. PERF_COUNT_HW_CACHE_NODE = 0x6
  1001. PERF_COUNT_HW_CACHE_OP_READ = 0x0
  1002. PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
  1003. PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
  1004. PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
  1005. PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
  1006. PERF_COUNT_SW_CPU_CLOCK = 0x0
  1007. PERF_COUNT_SW_TASK_CLOCK = 0x1
  1008. PERF_COUNT_SW_PAGE_FAULTS = 0x2
  1009. PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
  1010. PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
  1011. PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
  1012. PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
  1013. PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
  1014. PERF_COUNT_SW_EMULATION_FAULTS = 0x8
  1015. PERF_COUNT_SW_DUMMY = 0x9
  1016. PERF_COUNT_SW_BPF_OUTPUT = 0xa
  1017. PERF_SAMPLE_IP = 0x1
  1018. PERF_SAMPLE_TID = 0x2
  1019. PERF_SAMPLE_TIME = 0x4
  1020. PERF_SAMPLE_ADDR = 0x8
  1021. PERF_SAMPLE_READ = 0x10
  1022. PERF_SAMPLE_CALLCHAIN = 0x20
  1023. PERF_SAMPLE_ID = 0x40
  1024. PERF_SAMPLE_CPU = 0x80
  1025. PERF_SAMPLE_PERIOD = 0x100
  1026. PERF_SAMPLE_STREAM_ID = 0x200
  1027. PERF_SAMPLE_RAW = 0x400
  1028. PERF_SAMPLE_BRANCH_STACK = 0x800
  1029. PERF_SAMPLE_BRANCH_USER = 0x1
  1030. PERF_SAMPLE_BRANCH_KERNEL = 0x2
  1031. PERF_SAMPLE_BRANCH_HV = 0x4
  1032. PERF_SAMPLE_BRANCH_ANY = 0x8
  1033. PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
  1034. PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
  1035. PERF_SAMPLE_BRANCH_IND_CALL = 0x40
  1036. PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
  1037. PERF_SAMPLE_BRANCH_IN_TX = 0x100
  1038. PERF_SAMPLE_BRANCH_NO_TX = 0x200
  1039. PERF_SAMPLE_BRANCH_COND = 0x400
  1040. PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
  1041. PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
  1042. PERF_SAMPLE_BRANCH_CALL = 0x2000
  1043. PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
  1044. PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
  1045. PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
  1046. PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
  1047. PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
  1048. PERF_FORMAT_ID = 0x4
  1049. PERF_FORMAT_GROUP = 0x8
  1050. PERF_RECORD_MMAP = 0x1
  1051. PERF_RECORD_LOST = 0x2
  1052. PERF_RECORD_COMM = 0x3
  1053. PERF_RECORD_EXIT = 0x4
  1054. PERF_RECORD_THROTTLE = 0x5
  1055. PERF_RECORD_UNTHROTTLE = 0x6
  1056. PERF_RECORD_FORK = 0x7
  1057. PERF_RECORD_READ = 0x8
  1058. PERF_RECORD_SAMPLE = 0x9
  1059. PERF_RECORD_MMAP2 = 0xa
  1060. PERF_RECORD_AUX = 0xb
  1061. PERF_RECORD_ITRACE_START = 0xc
  1062. PERF_RECORD_LOST_SAMPLES = 0xd
  1063. PERF_RECORD_SWITCH = 0xe
  1064. PERF_RECORD_SWITCH_CPU_WIDE = 0xf
  1065. PERF_RECORD_NAMESPACES = 0x10
  1066. PERF_CONTEXT_HV = -0x20
  1067. PERF_CONTEXT_KERNEL = -0x80
  1068. PERF_CONTEXT_USER = -0x200
  1069. PERF_CONTEXT_GUEST = -0x800
  1070. PERF_CONTEXT_GUEST_KERNEL = -0x880
  1071. PERF_CONTEXT_GUEST_USER = -0xa00
  1072. PERF_FLAG_FD_NO_GROUP = 0x1
  1073. PERF_FLAG_FD_OUTPUT = 0x2
  1074. PERF_FLAG_PID_CGROUP = 0x4
  1075. PERF_FLAG_FD_CLOEXEC = 0x8
  1076. )
  1077. const (
  1078. CBitFieldMaskBit0 = 0x1
  1079. CBitFieldMaskBit1 = 0x2
  1080. CBitFieldMaskBit2 = 0x4
  1081. CBitFieldMaskBit3 = 0x8
  1082. CBitFieldMaskBit4 = 0x10
  1083. CBitFieldMaskBit5 = 0x20
  1084. CBitFieldMaskBit6 = 0x40
  1085. CBitFieldMaskBit7 = 0x80
  1086. CBitFieldMaskBit8 = 0x100
  1087. CBitFieldMaskBit9 = 0x200
  1088. CBitFieldMaskBit10 = 0x400
  1089. CBitFieldMaskBit11 = 0x800
  1090. CBitFieldMaskBit12 = 0x1000
  1091. CBitFieldMaskBit13 = 0x2000
  1092. CBitFieldMaskBit14 = 0x4000
  1093. CBitFieldMaskBit15 = 0x8000
  1094. CBitFieldMaskBit16 = 0x10000
  1095. CBitFieldMaskBit17 = 0x20000
  1096. CBitFieldMaskBit18 = 0x40000
  1097. CBitFieldMaskBit19 = 0x80000
  1098. CBitFieldMaskBit20 = 0x100000
  1099. CBitFieldMaskBit21 = 0x200000
  1100. CBitFieldMaskBit22 = 0x400000
  1101. CBitFieldMaskBit23 = 0x800000
  1102. CBitFieldMaskBit24 = 0x1000000
  1103. CBitFieldMaskBit25 = 0x2000000
  1104. CBitFieldMaskBit26 = 0x4000000
  1105. CBitFieldMaskBit27 = 0x8000000
  1106. CBitFieldMaskBit28 = 0x10000000
  1107. CBitFieldMaskBit29 = 0x20000000
  1108. CBitFieldMaskBit30 = 0x40000000
  1109. CBitFieldMaskBit31 = 0x80000000
  1110. CBitFieldMaskBit32 = 0x100000000
  1111. CBitFieldMaskBit33 = 0x200000000
  1112. CBitFieldMaskBit34 = 0x400000000
  1113. CBitFieldMaskBit35 = 0x800000000
  1114. CBitFieldMaskBit36 = 0x1000000000
  1115. CBitFieldMaskBit37 = 0x2000000000
  1116. CBitFieldMaskBit38 = 0x4000000000
  1117. CBitFieldMaskBit39 = 0x8000000000
  1118. CBitFieldMaskBit40 = 0x10000000000
  1119. CBitFieldMaskBit41 = 0x20000000000
  1120. CBitFieldMaskBit42 = 0x40000000000
  1121. CBitFieldMaskBit43 = 0x80000000000
  1122. CBitFieldMaskBit44 = 0x100000000000
  1123. CBitFieldMaskBit45 = 0x200000000000
  1124. CBitFieldMaskBit46 = 0x400000000000
  1125. CBitFieldMaskBit47 = 0x800000000000
  1126. CBitFieldMaskBit48 = 0x1000000000000
  1127. CBitFieldMaskBit49 = 0x2000000000000
  1128. CBitFieldMaskBit50 = 0x4000000000000
  1129. CBitFieldMaskBit51 = 0x8000000000000
  1130. CBitFieldMaskBit52 = 0x10000000000000
  1131. CBitFieldMaskBit53 = 0x20000000000000
  1132. CBitFieldMaskBit54 = 0x40000000000000
  1133. CBitFieldMaskBit55 = 0x80000000000000
  1134. CBitFieldMaskBit56 = 0x100000000000000
  1135. CBitFieldMaskBit57 = 0x200000000000000
  1136. CBitFieldMaskBit58 = 0x400000000000000
  1137. CBitFieldMaskBit59 = 0x800000000000000
  1138. CBitFieldMaskBit60 = 0x1000000000000000
  1139. CBitFieldMaskBit61 = 0x2000000000000000
  1140. CBitFieldMaskBit62 = 0x4000000000000000
  1141. CBitFieldMaskBit63 = 0x8000000000000000
  1142. )
  1143. type SockaddrStorage struct {
  1144. Family uint16
  1145. _ [118]int8
  1146. _ uint64
  1147. }
  1148. type TCPMD5Sig struct {
  1149. Addr SockaddrStorage
  1150. Flags uint8
  1151. Prefixlen uint8
  1152. Keylen uint16
  1153. _ uint32
  1154. Key [80]uint8
  1155. }
  1156. type HDDriveCmdHdr struct {
  1157. Command uint8
  1158. Number uint8
  1159. Feature uint8
  1160. Count uint8
  1161. }
  1162. type HDGeometry struct {
  1163. Heads uint8
  1164. Sectors uint8
  1165. Cylinders uint16
  1166. Start uint64
  1167. }
  1168. type HDDriveID struct {
  1169. Config uint16
  1170. Cyls uint16
  1171. Reserved2 uint16
  1172. Heads uint16
  1173. Track_bytes uint16
  1174. Sector_bytes uint16
  1175. Sectors uint16
  1176. Vendor0 uint16
  1177. Vendor1 uint16
  1178. Vendor2 uint16
  1179. Serial_no [20]uint8
  1180. Buf_type uint16
  1181. Buf_size uint16
  1182. Ecc_bytes uint16
  1183. Fw_rev [8]uint8
  1184. Model [40]uint8
  1185. Max_multsect uint8
  1186. Vendor3 uint8
  1187. Dword_io uint16
  1188. Vendor4 uint8
  1189. Capability uint8
  1190. Reserved50 uint16
  1191. Vendor5 uint8
  1192. TPIO uint8
  1193. Vendor6 uint8
  1194. TDMA uint8
  1195. Field_valid uint16
  1196. Cur_cyls uint16
  1197. Cur_heads uint16
  1198. Cur_sectors uint16
  1199. Cur_capacity0 uint16
  1200. Cur_capacity1 uint16
  1201. Multsect uint8
  1202. Multsect_valid uint8
  1203. Lba_capacity uint32
  1204. Dma_1word uint16
  1205. Dma_mword uint16
  1206. Eide_pio_modes uint16
  1207. Eide_dma_min uint16
  1208. Eide_dma_time uint16
  1209. Eide_pio uint16
  1210. Eide_pio_iordy uint16
  1211. Words69_70 [2]uint16
  1212. Words71_74 [4]uint16
  1213. Queue_depth uint16
  1214. Words76_79 [4]uint16
  1215. Major_rev_num uint16
  1216. Minor_rev_num uint16
  1217. Command_set_1 uint16
  1218. Command_set_2 uint16
  1219. Cfsse uint16
  1220. Cfs_enable_1 uint16
  1221. Cfs_enable_2 uint16
  1222. Csf_default uint16
  1223. Dma_ultra uint16
  1224. Trseuc uint16
  1225. TrsEuc uint16
  1226. CurAPMvalues uint16
  1227. Mprc uint16
  1228. Hw_config uint16
  1229. Acoustic uint16
  1230. Msrqs uint16
  1231. Sxfert uint16
  1232. Sal uint16
  1233. Spg uint32
  1234. Lba_capacity_2 uint64
  1235. Words104_125 [22]uint16
  1236. Last_lun uint16
  1237. Word127 uint16
  1238. Dlf uint16
  1239. Csfo uint16
  1240. Words130_155 [26]uint16
  1241. Word156 uint16
  1242. Words157_159 [3]uint16
  1243. Cfa_power uint16
  1244. Words161_175 [15]uint16
  1245. Words176_205 [30]uint16
  1246. Words206_254 [49]uint16
  1247. Integrity_word uint16
  1248. }
  1249. type Statfs_t struct {
  1250. Type int64
  1251. Bsize int64
  1252. Blocks uint64
  1253. Bfree uint64
  1254. Bavail uint64
  1255. Files uint64
  1256. Ffree uint64
  1257. Fsid Fsid
  1258. Namelen int64
  1259. Frsize int64
  1260. Flags int64
  1261. Spare [4]int64
  1262. }
  1263. const (
  1264. ST_MANDLOCK = 0x40
  1265. ST_NOATIME = 0x400
  1266. ST_NODEV = 0x4
  1267. ST_NODIRATIME = 0x800
  1268. ST_NOEXEC = 0x8
  1269. ST_NOSUID = 0x2
  1270. ST_RDONLY = 0x1
  1271. ST_RELATIME = 0x1000
  1272. ST_SYNCHRONOUS = 0x10
  1273. )
  1274. type TpacketHdr struct {
  1275. Status uint64
  1276. Len uint32
  1277. Snaplen uint32
  1278. Mac uint16
  1279. Net uint16
  1280. Sec uint32
  1281. Usec uint32
  1282. _ [4]byte
  1283. }
  1284. type Tpacket2Hdr struct {
  1285. Status uint32
  1286. Len uint32
  1287. Snaplen uint32
  1288. Mac uint16
  1289. Net uint16
  1290. Sec uint32
  1291. Nsec uint32
  1292. Vlan_tci uint16
  1293. Vlan_tpid uint16
  1294. _ [4]uint8
  1295. }
  1296. type Tpacket3Hdr struct {
  1297. Next_offset uint32
  1298. Sec uint32
  1299. Nsec uint32
  1300. Snaplen uint32
  1301. Len uint32
  1302. Status uint32
  1303. Mac uint16
  1304. Net uint16
  1305. Hv1 TpacketHdrVariant1
  1306. _ [8]uint8
  1307. }
  1308. type TpacketHdrVariant1 struct {
  1309. Rxhash uint32
  1310. Vlan_tci uint32
  1311. Vlan_tpid uint16
  1312. _ uint16
  1313. }
  1314. type TpacketBlockDesc struct {
  1315. Version uint32
  1316. To_priv uint32
  1317. Hdr [40]byte
  1318. }
  1319. type TpacketBDTS struct {
  1320. Sec uint32
  1321. Usec uint32
  1322. }
  1323. type TpacketHdrV1 struct {
  1324. Block_status uint32
  1325. Num_pkts uint32
  1326. Offset_to_first_pkt uint32
  1327. Blk_len uint32
  1328. Seq_num uint64
  1329. Ts_first_pkt TpacketBDTS
  1330. Ts_last_pkt TpacketBDTS
  1331. }
  1332. type TpacketReq struct {
  1333. Block_size uint32
  1334. Block_nr uint32
  1335. Frame_size uint32
  1336. Frame_nr uint32
  1337. }
  1338. type TpacketReq3 struct {
  1339. Block_size uint32
  1340. Block_nr uint32
  1341. Frame_size uint32
  1342. Frame_nr uint32
  1343. Retire_blk_tov uint32
  1344. Sizeof_priv uint32
  1345. Feature_req_word uint32
  1346. }
  1347. type TpacketStats struct {
  1348. Packets uint32
  1349. Drops uint32
  1350. }
  1351. type TpacketStatsV3 struct {
  1352. Packets uint32
  1353. Drops uint32
  1354. Freeze_q_cnt uint32
  1355. }
  1356. type TpacketAuxdata struct {
  1357. Status uint32
  1358. Len uint32
  1359. Snaplen uint32
  1360. Mac uint16
  1361. Net uint16
  1362. Vlan_tci uint16
  1363. Vlan_tpid uint16
  1364. }
  1365. const (
  1366. TPACKET_V1 = 0x0
  1367. TPACKET_V2 = 0x1
  1368. TPACKET_V3 = 0x2
  1369. )
  1370. const (
  1371. SizeofTpacketHdr = 0x20
  1372. SizeofTpacket2Hdr = 0x20
  1373. SizeofTpacket3Hdr = 0x30
  1374. SizeofTpacketStats = 0x8
  1375. SizeofTpacketStatsV3 = 0xc
  1376. )
  1377. const (
  1378. NF_INET_PRE_ROUTING = 0x0
  1379. NF_INET_LOCAL_IN = 0x1
  1380. NF_INET_FORWARD = 0x2
  1381. NF_INET_LOCAL_OUT = 0x3
  1382. NF_INET_POST_ROUTING = 0x4
  1383. NF_INET_NUMHOOKS = 0x5
  1384. )
  1385. const (
  1386. NF_NETDEV_INGRESS = 0x0
  1387. NF_NETDEV_NUMHOOKS = 0x1
  1388. )
  1389. const (
  1390. NFPROTO_UNSPEC = 0x0
  1391. NFPROTO_INET = 0x1
  1392. NFPROTO_IPV4 = 0x2
  1393. NFPROTO_ARP = 0x3
  1394. NFPROTO_NETDEV = 0x5
  1395. NFPROTO_BRIDGE = 0x7
  1396. NFPROTO_IPV6 = 0xa
  1397. NFPROTO_DECNET = 0xc
  1398. NFPROTO_NUMPROTO = 0xd
  1399. )
  1400. type Nfgenmsg struct {
  1401. Nfgen_family uint8
  1402. Version uint8
  1403. Res_id uint16
  1404. }
  1405. const (
  1406. NFNL_BATCH_UNSPEC = 0x0
  1407. NFNL_BATCH_GENID = 0x1
  1408. )
  1409. const (
  1410. NFT_REG_VERDICT = 0x0
  1411. NFT_REG_1 = 0x1
  1412. NFT_REG_2 = 0x2
  1413. NFT_REG_3 = 0x3
  1414. NFT_REG_4 = 0x4
  1415. NFT_REG32_00 = 0x8
  1416. NFT_REG32_01 = 0x9
  1417. NFT_REG32_02 = 0xa
  1418. NFT_REG32_03 = 0xb
  1419. NFT_REG32_04 = 0xc
  1420. NFT_REG32_05 = 0xd
  1421. NFT_REG32_06 = 0xe
  1422. NFT_REG32_07 = 0xf
  1423. NFT_REG32_08 = 0x10
  1424. NFT_REG32_09 = 0x11
  1425. NFT_REG32_10 = 0x12
  1426. NFT_REG32_11 = 0x13
  1427. NFT_REG32_12 = 0x14
  1428. NFT_REG32_13 = 0x15
  1429. NFT_REG32_14 = 0x16
  1430. NFT_REG32_15 = 0x17
  1431. NFT_CONTINUE = -0x1
  1432. NFT_BREAK = -0x2
  1433. NFT_JUMP = -0x3
  1434. NFT_GOTO = -0x4
  1435. NFT_RETURN = -0x5
  1436. NFT_MSG_NEWTABLE = 0x0
  1437. NFT_MSG_GETTABLE = 0x1
  1438. NFT_MSG_DELTABLE = 0x2
  1439. NFT_MSG_NEWCHAIN = 0x3
  1440. NFT_MSG_GETCHAIN = 0x4
  1441. NFT_MSG_DELCHAIN = 0x5
  1442. NFT_MSG_NEWRULE = 0x6
  1443. NFT_MSG_GETRULE = 0x7
  1444. NFT_MSG_DELRULE = 0x8
  1445. NFT_MSG_NEWSET = 0x9
  1446. NFT_MSG_GETSET = 0xa
  1447. NFT_MSG_DELSET = 0xb
  1448. NFT_MSG_NEWSETELEM = 0xc
  1449. NFT_MSG_GETSETELEM = 0xd
  1450. NFT_MSG_DELSETELEM = 0xe
  1451. NFT_MSG_NEWGEN = 0xf
  1452. NFT_MSG_GETGEN = 0x10
  1453. NFT_MSG_TRACE = 0x11
  1454. NFT_MSG_NEWOBJ = 0x12
  1455. NFT_MSG_GETOBJ = 0x13
  1456. NFT_MSG_DELOBJ = 0x14
  1457. NFT_MSG_GETOBJ_RESET = 0x15
  1458. NFT_MSG_MAX = 0x19
  1459. NFTA_LIST_UNPEC = 0x0
  1460. NFTA_LIST_ELEM = 0x1
  1461. NFTA_HOOK_UNSPEC = 0x0
  1462. NFTA_HOOK_HOOKNUM = 0x1
  1463. NFTA_HOOK_PRIORITY = 0x2
  1464. NFTA_HOOK_DEV = 0x3
  1465. NFT_TABLE_F_DORMANT = 0x1
  1466. NFTA_TABLE_UNSPEC = 0x0
  1467. NFTA_TABLE_NAME = 0x1
  1468. NFTA_TABLE_FLAGS = 0x2
  1469. NFTA_TABLE_USE = 0x3
  1470. NFTA_CHAIN_UNSPEC = 0x0
  1471. NFTA_CHAIN_TABLE = 0x1
  1472. NFTA_CHAIN_HANDLE = 0x2
  1473. NFTA_CHAIN_NAME = 0x3
  1474. NFTA_CHAIN_HOOK = 0x4
  1475. NFTA_CHAIN_POLICY = 0x5
  1476. NFTA_CHAIN_USE = 0x6
  1477. NFTA_CHAIN_TYPE = 0x7
  1478. NFTA_CHAIN_COUNTERS = 0x8
  1479. NFTA_CHAIN_PAD = 0x9
  1480. NFTA_RULE_UNSPEC = 0x0
  1481. NFTA_RULE_TABLE = 0x1
  1482. NFTA_RULE_CHAIN = 0x2
  1483. NFTA_RULE_HANDLE = 0x3
  1484. NFTA_RULE_EXPRESSIONS = 0x4
  1485. NFTA_RULE_COMPAT = 0x5
  1486. NFTA_RULE_POSITION = 0x6
  1487. NFTA_RULE_USERDATA = 0x7
  1488. NFTA_RULE_PAD = 0x8
  1489. NFTA_RULE_ID = 0x9
  1490. NFT_RULE_COMPAT_F_INV = 0x2
  1491. NFT_RULE_COMPAT_F_MASK = 0x2
  1492. NFTA_RULE_COMPAT_UNSPEC = 0x0
  1493. NFTA_RULE_COMPAT_PROTO = 0x1
  1494. NFTA_RULE_COMPAT_FLAGS = 0x2
  1495. NFT_SET_ANONYMOUS = 0x1
  1496. NFT_SET_CONSTANT = 0x2
  1497. NFT_SET_INTERVAL = 0x4
  1498. NFT_SET_MAP = 0x8
  1499. NFT_SET_TIMEOUT = 0x10
  1500. NFT_SET_EVAL = 0x20
  1501. NFT_SET_OBJECT = 0x40
  1502. NFT_SET_POL_PERFORMANCE = 0x0
  1503. NFT_SET_POL_MEMORY = 0x1
  1504. NFTA_SET_DESC_UNSPEC = 0x0
  1505. NFTA_SET_DESC_SIZE = 0x1
  1506. NFTA_SET_UNSPEC = 0x0
  1507. NFTA_SET_TABLE = 0x1
  1508. NFTA_SET_NAME = 0x2
  1509. NFTA_SET_FLAGS = 0x3
  1510. NFTA_SET_KEY_TYPE = 0x4
  1511. NFTA_SET_KEY_LEN = 0x5
  1512. NFTA_SET_DATA_TYPE = 0x6
  1513. NFTA_SET_DATA_LEN = 0x7
  1514. NFTA_SET_POLICY = 0x8
  1515. NFTA_SET_DESC = 0x9
  1516. NFTA_SET_ID = 0xa
  1517. NFTA_SET_TIMEOUT = 0xb
  1518. NFTA_SET_GC_INTERVAL = 0xc
  1519. NFTA_SET_USERDATA = 0xd
  1520. NFTA_SET_PAD = 0xe
  1521. NFTA_SET_OBJ_TYPE = 0xf
  1522. NFT_SET_ELEM_INTERVAL_END = 0x1
  1523. NFTA_SET_ELEM_UNSPEC = 0x0
  1524. NFTA_SET_ELEM_KEY = 0x1
  1525. NFTA_SET_ELEM_DATA = 0x2
  1526. NFTA_SET_ELEM_FLAGS = 0x3
  1527. NFTA_SET_ELEM_TIMEOUT = 0x4
  1528. NFTA_SET_ELEM_EXPIRATION = 0x5
  1529. NFTA_SET_ELEM_USERDATA = 0x6
  1530. NFTA_SET_ELEM_EXPR = 0x7
  1531. NFTA_SET_ELEM_PAD = 0x8
  1532. NFTA_SET_ELEM_OBJREF = 0x9
  1533. NFTA_SET_ELEM_LIST_UNSPEC = 0x0
  1534. NFTA_SET_ELEM_LIST_TABLE = 0x1
  1535. NFTA_SET_ELEM_LIST_SET = 0x2
  1536. NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
  1537. NFTA_SET_ELEM_LIST_SET_ID = 0x4
  1538. NFT_DATA_VALUE = 0x0
  1539. NFT_DATA_VERDICT = 0xffffff00
  1540. NFTA_DATA_UNSPEC = 0x0
  1541. NFTA_DATA_VALUE = 0x1
  1542. NFTA_DATA_VERDICT = 0x2
  1543. NFTA_VERDICT_UNSPEC = 0x0
  1544. NFTA_VERDICT_CODE = 0x1
  1545. NFTA_VERDICT_CHAIN = 0x2
  1546. NFTA_EXPR_UNSPEC = 0x0
  1547. NFTA_EXPR_NAME = 0x1
  1548. NFTA_EXPR_DATA = 0x2
  1549. NFTA_IMMEDIATE_UNSPEC = 0x0
  1550. NFTA_IMMEDIATE_DREG = 0x1
  1551. NFTA_IMMEDIATE_DATA = 0x2
  1552. NFTA_BITWISE_UNSPEC = 0x0
  1553. NFTA_BITWISE_SREG = 0x1
  1554. NFTA_BITWISE_DREG = 0x2
  1555. NFTA_BITWISE_LEN = 0x3
  1556. NFTA_BITWISE_MASK = 0x4
  1557. NFTA_BITWISE_XOR = 0x5
  1558. NFT_BYTEORDER_NTOH = 0x0
  1559. NFT_BYTEORDER_HTON = 0x1
  1560. NFTA_BYTEORDER_UNSPEC = 0x0
  1561. NFTA_BYTEORDER_SREG = 0x1
  1562. NFTA_BYTEORDER_DREG = 0x2
  1563. NFTA_BYTEORDER_OP = 0x3
  1564. NFTA_BYTEORDER_LEN = 0x4
  1565. NFTA_BYTEORDER_SIZE = 0x5
  1566. NFT_CMP_EQ = 0x0
  1567. NFT_CMP_NEQ = 0x1
  1568. NFT_CMP_LT = 0x2
  1569. NFT_CMP_LTE = 0x3
  1570. NFT_CMP_GT = 0x4
  1571. NFT_CMP_GTE = 0x5
  1572. NFTA_CMP_UNSPEC = 0x0
  1573. NFTA_CMP_SREG = 0x1
  1574. NFTA_CMP_OP = 0x2
  1575. NFTA_CMP_DATA = 0x3
  1576. NFT_RANGE_EQ = 0x0
  1577. NFT_RANGE_NEQ = 0x1
  1578. NFTA_RANGE_UNSPEC = 0x0
  1579. NFTA_RANGE_SREG = 0x1
  1580. NFTA_RANGE_OP = 0x2
  1581. NFTA_RANGE_FROM_DATA = 0x3
  1582. NFTA_RANGE_TO_DATA = 0x4
  1583. NFT_LOOKUP_F_INV = 0x1
  1584. NFTA_LOOKUP_UNSPEC = 0x0
  1585. NFTA_LOOKUP_SET = 0x1
  1586. NFTA_LOOKUP_SREG = 0x2
  1587. NFTA_LOOKUP_DREG = 0x3
  1588. NFTA_LOOKUP_SET_ID = 0x4
  1589. NFTA_LOOKUP_FLAGS = 0x5
  1590. NFT_DYNSET_OP_ADD = 0x0
  1591. NFT_DYNSET_OP_UPDATE = 0x1
  1592. NFT_DYNSET_F_INV = 0x1
  1593. NFTA_DYNSET_UNSPEC = 0x0
  1594. NFTA_DYNSET_SET_NAME = 0x1
  1595. NFTA_DYNSET_SET_ID = 0x2
  1596. NFTA_DYNSET_OP = 0x3
  1597. NFTA_DYNSET_SREG_KEY = 0x4
  1598. NFTA_DYNSET_SREG_DATA = 0x5
  1599. NFTA_DYNSET_TIMEOUT = 0x6
  1600. NFTA_DYNSET_EXPR = 0x7
  1601. NFTA_DYNSET_PAD = 0x8
  1602. NFTA_DYNSET_FLAGS = 0x9
  1603. NFT_PAYLOAD_LL_HEADER = 0x0
  1604. NFT_PAYLOAD_NETWORK_HEADER = 0x1
  1605. NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
  1606. NFT_PAYLOAD_CSUM_NONE = 0x0
  1607. NFT_PAYLOAD_CSUM_INET = 0x1
  1608. NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
  1609. NFTA_PAYLOAD_UNSPEC = 0x0
  1610. NFTA_PAYLOAD_DREG = 0x1
  1611. NFTA_PAYLOAD_BASE = 0x2
  1612. NFTA_PAYLOAD_OFFSET = 0x3
  1613. NFTA_PAYLOAD_LEN = 0x4
  1614. NFTA_PAYLOAD_SREG = 0x5
  1615. NFTA_PAYLOAD_CSUM_TYPE = 0x6
  1616. NFTA_PAYLOAD_CSUM_OFFSET = 0x7
  1617. NFTA_PAYLOAD_CSUM_FLAGS = 0x8
  1618. NFT_EXTHDR_F_PRESENT = 0x1
  1619. NFT_EXTHDR_OP_IPV6 = 0x0
  1620. NFT_EXTHDR_OP_TCPOPT = 0x1
  1621. NFTA_EXTHDR_UNSPEC = 0x0
  1622. NFTA_EXTHDR_DREG = 0x1
  1623. NFTA_EXTHDR_TYPE = 0x2
  1624. NFTA_EXTHDR_OFFSET = 0x3
  1625. NFTA_EXTHDR_LEN = 0x4
  1626. NFTA_EXTHDR_FLAGS = 0x5
  1627. NFTA_EXTHDR_OP = 0x6
  1628. NFTA_EXTHDR_SREG = 0x7
  1629. NFT_META_LEN = 0x0
  1630. NFT_META_PROTOCOL = 0x1
  1631. NFT_META_PRIORITY = 0x2
  1632. NFT_META_MARK = 0x3
  1633. NFT_META_IIF = 0x4
  1634. NFT_META_OIF = 0x5
  1635. NFT_META_IIFNAME = 0x6
  1636. NFT_META_OIFNAME = 0x7
  1637. NFT_META_IIFTYPE = 0x8
  1638. NFT_META_OIFTYPE = 0x9
  1639. NFT_META_SKUID = 0xa
  1640. NFT_META_SKGID = 0xb
  1641. NFT_META_NFTRACE = 0xc
  1642. NFT_META_RTCLASSID = 0xd
  1643. NFT_META_SECMARK = 0xe
  1644. NFT_META_NFPROTO = 0xf
  1645. NFT_META_L4PROTO = 0x10
  1646. NFT_META_BRI_IIFNAME = 0x11
  1647. NFT_META_BRI_OIFNAME = 0x12
  1648. NFT_META_PKTTYPE = 0x13
  1649. NFT_META_CPU = 0x14
  1650. NFT_META_IIFGROUP = 0x15
  1651. NFT_META_OIFGROUP = 0x16
  1652. NFT_META_CGROUP = 0x17
  1653. NFT_META_PRANDOM = 0x18
  1654. NFT_RT_CLASSID = 0x0
  1655. NFT_RT_NEXTHOP4 = 0x1
  1656. NFT_RT_NEXTHOP6 = 0x2
  1657. NFT_RT_TCPMSS = 0x3
  1658. NFT_HASH_JENKINS = 0x0
  1659. NFT_HASH_SYM = 0x1
  1660. NFTA_HASH_UNSPEC = 0x0
  1661. NFTA_HASH_SREG = 0x1
  1662. NFTA_HASH_DREG = 0x2
  1663. NFTA_HASH_LEN = 0x3
  1664. NFTA_HASH_MODULUS = 0x4
  1665. NFTA_HASH_SEED = 0x5
  1666. NFTA_HASH_OFFSET = 0x6
  1667. NFTA_HASH_TYPE = 0x7
  1668. NFTA_META_UNSPEC = 0x0
  1669. NFTA_META_DREG = 0x1
  1670. NFTA_META_KEY = 0x2
  1671. NFTA_META_SREG = 0x3
  1672. NFTA_RT_UNSPEC = 0x0
  1673. NFTA_RT_DREG = 0x1
  1674. NFTA_RT_KEY = 0x2
  1675. NFT_CT_STATE = 0x0
  1676. NFT_CT_DIRECTION = 0x1
  1677. NFT_CT_STATUS = 0x2
  1678. NFT_CT_MARK = 0x3
  1679. NFT_CT_SECMARK = 0x4
  1680. NFT_CT_EXPIRATION = 0x5
  1681. NFT_CT_HELPER = 0x6
  1682. NFT_CT_L3PROTOCOL = 0x7
  1683. NFT_CT_SRC = 0x8
  1684. NFT_CT_DST = 0x9
  1685. NFT_CT_PROTOCOL = 0xa
  1686. NFT_CT_PROTO_SRC = 0xb
  1687. NFT_CT_PROTO_DST = 0xc
  1688. NFT_CT_LABELS = 0xd
  1689. NFT_CT_PKTS = 0xe
  1690. NFT_CT_BYTES = 0xf
  1691. NFT_CT_AVGPKT = 0x10
  1692. NFT_CT_ZONE = 0x11
  1693. NFT_CT_EVENTMASK = 0x12
  1694. NFTA_CT_UNSPEC = 0x0
  1695. NFTA_CT_DREG = 0x1
  1696. NFTA_CT_KEY = 0x2
  1697. NFTA_CT_DIRECTION = 0x3
  1698. NFTA_CT_SREG = 0x4
  1699. NFT_LIMIT_PKTS = 0x0
  1700. NFT_LIMIT_PKT_BYTES = 0x1
  1701. NFT_LIMIT_F_INV = 0x1
  1702. NFTA_LIMIT_UNSPEC = 0x0
  1703. NFTA_LIMIT_RATE = 0x1
  1704. NFTA_LIMIT_UNIT = 0x2
  1705. NFTA_LIMIT_BURST = 0x3
  1706. NFTA_LIMIT_TYPE = 0x4
  1707. NFTA_LIMIT_FLAGS = 0x5
  1708. NFTA_LIMIT_PAD = 0x6
  1709. NFTA_COUNTER_UNSPEC = 0x0
  1710. NFTA_COUNTER_BYTES = 0x1
  1711. NFTA_COUNTER_PACKETS = 0x2
  1712. NFTA_COUNTER_PAD = 0x3
  1713. NFTA_LOG_UNSPEC = 0x0
  1714. NFTA_LOG_GROUP = 0x1
  1715. NFTA_LOG_PREFIX = 0x2
  1716. NFTA_LOG_SNAPLEN = 0x3
  1717. NFTA_LOG_QTHRESHOLD = 0x4
  1718. NFTA_LOG_LEVEL = 0x5
  1719. NFTA_LOG_FLAGS = 0x6
  1720. NFTA_QUEUE_UNSPEC = 0x0
  1721. NFTA_QUEUE_NUM = 0x1
  1722. NFTA_QUEUE_TOTAL = 0x2
  1723. NFTA_QUEUE_FLAGS = 0x3
  1724. NFTA_QUEUE_SREG_QNUM = 0x4
  1725. NFT_QUOTA_F_INV = 0x1
  1726. NFT_QUOTA_F_DEPLETED = 0x2
  1727. NFTA_QUOTA_UNSPEC = 0x0
  1728. NFTA_QUOTA_BYTES = 0x1
  1729. NFTA_QUOTA_FLAGS = 0x2
  1730. NFTA_QUOTA_PAD = 0x3
  1731. NFTA_QUOTA_CONSUMED = 0x4
  1732. NFT_REJECT_ICMP_UNREACH = 0x0
  1733. NFT_REJECT_TCP_RST = 0x1
  1734. NFT_REJECT_ICMPX_UNREACH = 0x2
  1735. NFT_REJECT_ICMPX_NO_ROUTE = 0x0
  1736. NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
  1737. NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
  1738. NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
  1739. NFTA_REJECT_UNSPEC = 0x0
  1740. NFTA_REJECT_TYPE = 0x1
  1741. NFTA_REJECT_ICMP_CODE = 0x2
  1742. NFT_NAT_SNAT = 0x0
  1743. NFT_NAT_DNAT = 0x1
  1744. NFTA_NAT_UNSPEC = 0x0
  1745. NFTA_NAT_TYPE = 0x1
  1746. NFTA_NAT_FAMILY = 0x2
  1747. NFTA_NAT_REG_ADDR_MIN = 0x3
  1748. NFTA_NAT_REG_ADDR_MAX = 0x4
  1749. NFTA_NAT_REG_PROTO_MIN = 0x5
  1750. NFTA_NAT_REG_PROTO_MAX = 0x6
  1751. NFTA_NAT_FLAGS = 0x7
  1752. NFTA_MASQ_UNSPEC = 0x0
  1753. NFTA_MASQ_FLAGS = 0x1
  1754. NFTA_MASQ_REG_PROTO_MIN = 0x2
  1755. NFTA_MASQ_REG_PROTO_MAX = 0x3
  1756. NFTA_REDIR_UNSPEC = 0x0
  1757. NFTA_REDIR_REG_PROTO_MIN = 0x1
  1758. NFTA_REDIR_REG_PROTO_MAX = 0x2
  1759. NFTA_REDIR_FLAGS = 0x3
  1760. NFTA_DUP_UNSPEC = 0x0
  1761. NFTA_DUP_SREG_ADDR = 0x1
  1762. NFTA_DUP_SREG_DEV = 0x2
  1763. NFTA_FWD_UNSPEC = 0x0
  1764. NFTA_FWD_SREG_DEV = 0x1
  1765. NFTA_OBJREF_UNSPEC = 0x0
  1766. NFTA_OBJREF_IMM_TYPE = 0x1
  1767. NFTA_OBJREF_IMM_NAME = 0x2
  1768. NFTA_OBJREF_SET_SREG = 0x3
  1769. NFTA_OBJREF_SET_NAME = 0x4
  1770. NFTA_OBJREF_SET_ID = 0x5
  1771. NFTA_GEN_UNSPEC = 0x0
  1772. NFTA_GEN_ID = 0x1
  1773. NFTA_GEN_PROC_PID = 0x2
  1774. NFTA_GEN_PROC_NAME = 0x3
  1775. NFTA_FIB_UNSPEC = 0x0
  1776. NFTA_FIB_DREG = 0x1
  1777. NFTA_FIB_RESULT = 0x2
  1778. NFTA_FIB_FLAGS = 0x3
  1779. NFT_FIB_RESULT_UNSPEC = 0x0
  1780. NFT_FIB_RESULT_OIF = 0x1
  1781. NFT_FIB_RESULT_OIFNAME = 0x2
  1782. NFT_FIB_RESULT_ADDRTYPE = 0x3
  1783. NFTA_FIB_F_SADDR = 0x1
  1784. NFTA_FIB_F_DADDR = 0x2
  1785. NFTA_FIB_F_MARK = 0x4
  1786. NFTA_FIB_F_IIF = 0x8
  1787. NFTA_FIB_F_OIF = 0x10
  1788. NFTA_FIB_F_PRESENT = 0x20
  1789. NFTA_CT_HELPER_UNSPEC = 0x0
  1790. NFTA_CT_HELPER_NAME = 0x1
  1791. NFTA_CT_HELPER_L3PROTO = 0x2
  1792. NFTA_CT_HELPER_L4PROTO = 0x3
  1793. NFTA_OBJ_UNSPEC = 0x0
  1794. NFTA_OBJ_TABLE = 0x1
  1795. NFTA_OBJ_NAME = 0x2
  1796. NFTA_OBJ_TYPE = 0x3
  1797. NFTA_OBJ_DATA = 0x4
  1798. NFTA_OBJ_USE = 0x5
  1799. NFTA_TRACE_UNSPEC = 0x0
  1800. NFTA_TRACE_TABLE = 0x1
  1801. NFTA_TRACE_CHAIN = 0x2
  1802. NFTA_TRACE_RULE_HANDLE = 0x3
  1803. NFTA_TRACE_TYPE = 0x4
  1804. NFTA_TRACE_VERDICT = 0x5
  1805. NFTA_TRACE_ID = 0x6
  1806. NFTA_TRACE_LL_HEADER = 0x7
  1807. NFTA_TRACE_NETWORK_HEADER = 0x8
  1808. NFTA_TRACE_TRANSPORT_HEADER = 0x9
  1809. NFTA_TRACE_IIF = 0xa
  1810. NFTA_TRACE_IIFTYPE = 0xb
  1811. NFTA_TRACE_OIF = 0xc
  1812. NFTA_TRACE_OIFTYPE = 0xd
  1813. NFTA_TRACE_MARK = 0xe
  1814. NFTA_TRACE_NFPROTO = 0xf
  1815. NFTA_TRACE_POLICY = 0x10
  1816. NFTA_TRACE_PAD = 0x11
  1817. NFT_TRACETYPE_UNSPEC = 0x0
  1818. NFT_TRACETYPE_POLICY = 0x1
  1819. NFT_TRACETYPE_RETURN = 0x2
  1820. NFT_TRACETYPE_RULE = 0x3
  1821. NFTA_NG_UNSPEC = 0x0
  1822. NFTA_NG_DREG = 0x1
  1823. NFTA_NG_MODULUS = 0x2
  1824. NFTA_NG_TYPE = 0x3
  1825. NFTA_NG_OFFSET = 0x4
  1826. NFT_NG_INCREMENTAL = 0x0
  1827. NFT_NG_RANDOM = 0x1
  1828. )
  1829. type RTCTime struct {
  1830. Sec int32
  1831. Min int32
  1832. Hour int32
  1833. Mday int32
  1834. Mon int32
  1835. Year int32
  1836. Wday int32
  1837. Yday int32
  1838. Isdst int32
  1839. }
  1840. type RTCWkAlrm struct {
  1841. Enabled uint8
  1842. Pending uint8
  1843. Time RTCTime
  1844. }
  1845. type RTCPLLInfo struct {
  1846. Ctrl int32
  1847. Value int32
  1848. Max int32
  1849. Min int32
  1850. Posmult int32
  1851. Negmult int32
  1852. Clock int64
  1853. }
  1854. type BlkpgIoctlArg struct {
  1855. Op int32
  1856. Flags int32
  1857. Datalen int32
  1858. Data *byte
  1859. }
  1860. type BlkpgPartition struct {
  1861. Start int64
  1862. Length int64
  1863. Pno int32
  1864. Devname [64]uint8
  1865. Volname [64]uint8
  1866. _ [4]byte
  1867. }
  1868. const (
  1869. BLKPG = 0x1269
  1870. BLKPG_ADD_PARTITION = 0x1
  1871. BLKPG_DEL_PARTITION = 0x2
  1872. BLKPG_RESIZE_PARTITION = 0x3
  1873. )
  1874. const (
  1875. NETNSA_NONE = 0x0
  1876. NETNSA_NSID = 0x1
  1877. NETNSA_PID = 0x2
  1878. NETNSA_FD = 0x3
  1879. )
  1880. type XDPRingOffset struct {
  1881. Producer uint64
  1882. Consumer uint64
  1883. Desc uint64
  1884. }
  1885. type XDPMmapOffsets struct {
  1886. Rx XDPRingOffset
  1887. Tx XDPRingOffset
  1888. Fr XDPRingOffset
  1889. Cr XDPRingOffset
  1890. }
  1891. type XDPUmemReg struct {
  1892. Addr uint64
  1893. Len uint64
  1894. Size uint32
  1895. Headroom uint32
  1896. }
  1897. type XDPStatistics struct {
  1898. Rx_dropped uint64
  1899. Rx_invalid_descs uint64
  1900. Tx_invalid_descs uint64
  1901. }
  1902. type XDPDesc struct {
  1903. Addr uint64
  1904. Len uint32
  1905. Options uint32
  1906. }
  1907. const (
  1908. NCSI_CMD_UNSPEC = 0x0
  1909. NCSI_CMD_PKG_INFO = 0x1
  1910. NCSI_CMD_SET_INTERFACE = 0x2
  1911. NCSI_CMD_CLEAR_INTERFACE = 0x3
  1912. NCSI_ATTR_UNSPEC = 0x0
  1913. NCSI_ATTR_IFINDEX = 0x1
  1914. NCSI_ATTR_PACKAGE_LIST = 0x2
  1915. NCSI_ATTR_PACKAGE_ID = 0x3
  1916. NCSI_ATTR_CHANNEL_ID = 0x4
  1917. NCSI_PKG_ATTR_UNSPEC = 0x0
  1918. NCSI_PKG_ATTR = 0x1
  1919. NCSI_PKG_ATTR_ID = 0x2
  1920. NCSI_PKG_ATTR_FORCED = 0x3
  1921. NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
  1922. NCSI_CHANNEL_ATTR_UNSPEC = 0x0
  1923. NCSI_CHANNEL_ATTR = 0x1
  1924. NCSI_CHANNEL_ATTR_ID = 0x2
  1925. NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
  1926. NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
  1927. NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
  1928. NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
  1929. NCSI_CHANNEL_ATTR_ACTIVE = 0x7
  1930. NCSI_CHANNEL_ATTR_FORCED = 0x8
  1931. NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
  1932. NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
  1933. )
  1934. type ScmTimestamping struct {
  1935. Ts [3]Timespec
  1936. }
  1937. const (
  1938. SOF_TIMESTAMPING_TX_HARDWARE = 0x1
  1939. SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
  1940. SOF_TIMESTAMPING_RX_HARDWARE = 0x4
  1941. SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
  1942. SOF_TIMESTAMPING_SOFTWARE = 0x10
  1943. SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
  1944. SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
  1945. SOF_TIMESTAMPING_OPT_ID = 0x80
  1946. SOF_TIMESTAMPING_TX_SCHED = 0x100
  1947. SOF_TIMESTAMPING_TX_ACK = 0x200
  1948. SOF_TIMESTAMPING_OPT_CMSG = 0x400
  1949. SOF_TIMESTAMPING_OPT_TSONLY = 0x800
  1950. SOF_TIMESTAMPING_OPT_STATS = 0x1000
  1951. SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
  1952. SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
  1953. SOF_TIMESTAMPING_LAST = 0x4000
  1954. SOF_TIMESTAMPING_MASK = 0x7fff
  1955. SCM_TSTAMP_SND = 0x0
  1956. SCM_TSTAMP_SCHED = 0x1
  1957. SCM_TSTAMP_ACK = 0x2
  1958. )
  1959. type SockExtendedErr struct {
  1960. Errno uint32
  1961. Origin uint8
  1962. Type uint8
  1963. Code uint8
  1964. Pad uint8
  1965. Info uint32
  1966. Data uint32
  1967. }
  1968. type FanotifyEventMetadata struct {
  1969. Event_len uint32
  1970. Vers uint8
  1971. Reserved uint8
  1972. Metadata_len uint16
  1973. Mask uint64
  1974. Fd int32
  1975. Pid int32
  1976. }
  1977. type FanotifyResponse struct {
  1978. Fd int32
  1979. Response uint32
  1980. }
  1981. const (
  1982. CRYPTO_MSG_BASE = 0x10
  1983. CRYPTO_MSG_NEWALG = 0x10
  1984. CRYPTO_MSG_DELALG = 0x11
  1985. CRYPTO_MSG_UPDATEALG = 0x12
  1986. CRYPTO_MSG_GETALG = 0x13
  1987. CRYPTO_MSG_DELRNG = 0x14
  1988. CRYPTO_MSG_GETSTAT = 0x15
  1989. )
  1990. const (
  1991. CRYPTOCFGA_UNSPEC = 0x0
  1992. CRYPTOCFGA_PRIORITY_VAL = 0x1
  1993. CRYPTOCFGA_REPORT_LARVAL = 0x2
  1994. CRYPTOCFGA_REPORT_HASH = 0x3
  1995. CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
  1996. CRYPTOCFGA_REPORT_AEAD = 0x5
  1997. CRYPTOCFGA_REPORT_COMPRESS = 0x6
  1998. CRYPTOCFGA_REPORT_RNG = 0x7
  1999. CRYPTOCFGA_REPORT_CIPHER = 0x8
  2000. CRYPTOCFGA_REPORT_AKCIPHER = 0x9
  2001. CRYPTOCFGA_REPORT_KPP = 0xa
  2002. CRYPTOCFGA_REPORT_ACOMP = 0xb
  2003. CRYPTOCFGA_STAT_LARVAL = 0xc
  2004. CRYPTOCFGA_STAT_HASH = 0xd
  2005. CRYPTOCFGA_STAT_BLKCIPHER = 0xe
  2006. CRYPTOCFGA_STAT_AEAD = 0xf
  2007. CRYPTOCFGA_STAT_COMPRESS = 0x10
  2008. CRYPTOCFGA_STAT_RNG = 0x11
  2009. CRYPTOCFGA_STAT_CIPHER = 0x12
  2010. CRYPTOCFGA_STAT_AKCIPHER = 0x13
  2011. CRYPTOCFGA_STAT_KPP = 0x14
  2012. CRYPTOCFGA_STAT_ACOMP = 0x15
  2013. )
  2014. type CryptoUserAlg struct {
  2015. Name [64]int8
  2016. Driver_name [64]int8
  2017. Module_name [64]int8
  2018. Type uint32
  2019. Mask uint32
  2020. Refcnt uint32
  2021. Flags uint32
  2022. }
  2023. type CryptoStatAEAD struct {
  2024. Type [64]int8
  2025. Encrypt_cnt uint64
  2026. Encrypt_tlen uint64
  2027. Decrypt_cnt uint64
  2028. Decrypt_tlen uint64
  2029. Err_cnt uint64
  2030. }
  2031. type CryptoStatAKCipher struct {
  2032. Type [64]int8
  2033. Encrypt_cnt uint64
  2034. Encrypt_tlen uint64
  2035. Decrypt_cnt uint64
  2036. Decrypt_tlen uint64
  2037. Verify_cnt uint64
  2038. Sign_cnt uint64
  2039. Err_cnt uint64
  2040. }
  2041. type CryptoStatCipher struct {
  2042. Type [64]int8
  2043. Encrypt_cnt uint64
  2044. Encrypt_tlen uint64
  2045. Decrypt_cnt uint64
  2046. Decrypt_tlen uint64
  2047. Err_cnt uint64
  2048. }
  2049. type CryptoStatCompress struct {
  2050. Type [64]int8
  2051. Compress_cnt uint64
  2052. Compress_tlen uint64
  2053. Decompress_cnt uint64
  2054. Decompress_tlen uint64
  2055. Err_cnt uint64
  2056. }
  2057. type CryptoStatHash struct {
  2058. Type [64]int8
  2059. Hash_cnt uint64
  2060. Hash_tlen uint64
  2061. Err_cnt uint64
  2062. }
  2063. type CryptoStatKPP struct {
  2064. Type [64]int8
  2065. Setsecret_cnt uint64
  2066. Generate_public_key_cnt uint64
  2067. Compute_shared_secret_cnt uint64
  2068. Err_cnt uint64
  2069. }
  2070. type CryptoStatRNG struct {
  2071. Type [64]int8
  2072. Generate_cnt uint64
  2073. Generate_tlen uint64
  2074. Seed_cnt uint64
  2075. Err_cnt uint64
  2076. }
  2077. type CryptoStatLarval struct {
  2078. Type [64]int8
  2079. }
  2080. type CryptoReportLarval struct {
  2081. Type [64]int8
  2082. }
  2083. type CryptoReportHash struct {
  2084. Type [64]int8
  2085. Blocksize uint32
  2086. Digestsize uint32
  2087. }
  2088. type CryptoReportCipher struct {
  2089. Type [64]int8
  2090. Blocksize uint32
  2091. Min_keysize uint32
  2092. Max_keysize uint32
  2093. }
  2094. type CryptoReportBlkCipher struct {
  2095. Type [64]int8
  2096. Geniv [64]int8
  2097. Blocksize uint32
  2098. Min_keysize uint32
  2099. Max_keysize uint32
  2100. Ivsize uint32
  2101. }
  2102. type CryptoReportAEAD struct {
  2103. Type [64]int8
  2104. Geniv [64]int8
  2105. Blocksize uint32
  2106. Maxauthsize uint32
  2107. Ivsize uint32
  2108. }
  2109. type CryptoReportComp struct {
  2110. Type [64]int8
  2111. }
  2112. type CryptoReportRNG struct {
  2113. Type [64]int8
  2114. Seedsize uint32
  2115. }
  2116. type CryptoReportAKCipher struct {
  2117. Type [64]int8
  2118. }
  2119. type CryptoReportKPP struct {
  2120. Type [64]int8
  2121. }
  2122. type CryptoReportAcomp struct {
  2123. Type [64]int8
  2124. }
  2125. const (
  2126. BPF_REG_0 = 0x0
  2127. BPF_REG_1 = 0x1
  2128. BPF_REG_2 = 0x2
  2129. BPF_REG_3 = 0x3
  2130. BPF_REG_4 = 0x4
  2131. BPF_REG_5 = 0x5
  2132. BPF_REG_6 = 0x6
  2133. BPF_REG_7 = 0x7
  2134. BPF_REG_8 = 0x8
  2135. BPF_REG_9 = 0x9
  2136. BPF_REG_10 = 0xa
  2137. BPF_MAP_CREATE = 0x0
  2138. BPF_MAP_LOOKUP_ELEM = 0x1
  2139. BPF_MAP_UPDATE_ELEM = 0x2
  2140. BPF_MAP_DELETE_ELEM = 0x3
  2141. BPF_MAP_GET_NEXT_KEY = 0x4
  2142. BPF_PROG_LOAD = 0x5
  2143. BPF_OBJ_PIN = 0x6
  2144. BPF_OBJ_GET = 0x7
  2145. BPF_PROG_ATTACH = 0x8
  2146. BPF_PROG_DETACH = 0x9
  2147. BPF_PROG_TEST_RUN = 0xa
  2148. BPF_PROG_GET_NEXT_ID = 0xb
  2149. BPF_MAP_GET_NEXT_ID = 0xc
  2150. BPF_PROG_GET_FD_BY_ID = 0xd
  2151. BPF_MAP_GET_FD_BY_ID = 0xe
  2152. BPF_OBJ_GET_INFO_BY_FD = 0xf
  2153. BPF_PROG_QUERY = 0x10
  2154. BPF_RAW_TRACEPOINT_OPEN = 0x11
  2155. BPF_BTF_LOAD = 0x12
  2156. BPF_BTF_GET_FD_BY_ID = 0x13
  2157. BPF_TASK_FD_QUERY = 0x14
  2158. BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
  2159. BPF_MAP_TYPE_UNSPEC = 0x0
  2160. BPF_MAP_TYPE_HASH = 0x1
  2161. BPF_MAP_TYPE_ARRAY = 0x2
  2162. BPF_MAP_TYPE_PROG_ARRAY = 0x3
  2163. BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
  2164. BPF_MAP_TYPE_PERCPU_HASH = 0x5
  2165. BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
  2166. BPF_MAP_TYPE_STACK_TRACE = 0x7
  2167. BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
  2168. BPF_MAP_TYPE_LRU_HASH = 0x9
  2169. BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
  2170. BPF_MAP_TYPE_LPM_TRIE = 0xb
  2171. BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
  2172. BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
  2173. BPF_MAP_TYPE_DEVMAP = 0xe
  2174. BPF_MAP_TYPE_SOCKMAP = 0xf
  2175. BPF_MAP_TYPE_CPUMAP = 0x10
  2176. BPF_MAP_TYPE_XSKMAP = 0x11
  2177. BPF_MAP_TYPE_SOCKHASH = 0x12
  2178. BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
  2179. BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
  2180. BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
  2181. BPF_MAP_TYPE_QUEUE = 0x16
  2182. BPF_MAP_TYPE_STACK = 0x17
  2183. BPF_PROG_TYPE_UNSPEC = 0x0
  2184. BPF_PROG_TYPE_SOCKET_FILTER = 0x1
  2185. BPF_PROG_TYPE_KPROBE = 0x2
  2186. BPF_PROG_TYPE_SCHED_CLS = 0x3
  2187. BPF_PROG_TYPE_SCHED_ACT = 0x4
  2188. BPF_PROG_TYPE_TRACEPOINT = 0x5
  2189. BPF_PROG_TYPE_XDP = 0x6
  2190. BPF_PROG_TYPE_PERF_EVENT = 0x7
  2191. BPF_PROG_TYPE_CGROUP_SKB = 0x8
  2192. BPF_PROG_TYPE_CGROUP_SOCK = 0x9
  2193. BPF_PROG_TYPE_LWT_IN = 0xa
  2194. BPF_PROG_TYPE_LWT_OUT = 0xb
  2195. BPF_PROG_TYPE_LWT_XMIT = 0xc
  2196. BPF_PROG_TYPE_SOCK_OPS = 0xd
  2197. BPF_PROG_TYPE_SK_SKB = 0xe
  2198. BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
  2199. BPF_PROG_TYPE_SK_MSG = 0x10
  2200. BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
  2201. BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
  2202. BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
  2203. BPF_PROG_TYPE_LIRC_MODE2 = 0x14
  2204. BPF_PROG_TYPE_SK_REUSEPORT = 0x15
  2205. BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
  2206. BPF_CGROUP_INET_INGRESS = 0x0
  2207. BPF_CGROUP_INET_EGRESS = 0x1
  2208. BPF_CGROUP_INET_SOCK_CREATE = 0x2
  2209. BPF_CGROUP_SOCK_OPS = 0x3
  2210. BPF_SK_SKB_STREAM_PARSER = 0x4
  2211. BPF_SK_SKB_STREAM_VERDICT = 0x5
  2212. BPF_CGROUP_DEVICE = 0x6
  2213. BPF_SK_MSG_VERDICT = 0x7
  2214. BPF_CGROUP_INET4_BIND = 0x8
  2215. BPF_CGROUP_INET6_BIND = 0x9
  2216. BPF_CGROUP_INET4_CONNECT = 0xa
  2217. BPF_CGROUP_INET6_CONNECT = 0xb
  2218. BPF_CGROUP_INET4_POST_BIND = 0xc
  2219. BPF_CGROUP_INET6_POST_BIND = 0xd
  2220. BPF_CGROUP_UDP4_SENDMSG = 0xe
  2221. BPF_CGROUP_UDP6_SENDMSG = 0xf
  2222. BPF_LIRC_MODE2 = 0x10
  2223. BPF_FLOW_DISSECTOR = 0x11
  2224. BPF_STACK_BUILD_ID_EMPTY = 0x0
  2225. BPF_STACK_BUILD_ID_VALID = 0x1
  2226. BPF_STACK_BUILD_ID_IP = 0x2
  2227. BPF_ADJ_ROOM_NET = 0x0
  2228. BPF_HDR_START_MAC = 0x0
  2229. BPF_HDR_START_NET = 0x1
  2230. BPF_LWT_ENCAP_SEG6 = 0x0
  2231. BPF_LWT_ENCAP_SEG6_INLINE = 0x1
  2232. BPF_OK = 0x0
  2233. BPF_DROP = 0x2
  2234. BPF_REDIRECT = 0x7
  2235. BPF_SOCK_OPS_VOID = 0x0
  2236. BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
  2237. BPF_SOCK_OPS_RWND_INIT = 0x2
  2238. BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
  2239. BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
  2240. BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
  2241. BPF_SOCK_OPS_NEEDS_ECN = 0x6
  2242. BPF_SOCK_OPS_BASE_RTT = 0x7
  2243. BPF_SOCK_OPS_RTO_CB = 0x8
  2244. BPF_SOCK_OPS_RETRANS_CB = 0x9
  2245. BPF_SOCK_OPS_STATE_CB = 0xa
  2246. BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
  2247. BPF_TCP_ESTABLISHED = 0x1
  2248. BPF_TCP_SYN_SENT = 0x2
  2249. BPF_TCP_SYN_RECV = 0x3
  2250. BPF_TCP_FIN_WAIT1 = 0x4
  2251. BPF_TCP_FIN_WAIT2 = 0x5
  2252. BPF_TCP_TIME_WAIT = 0x6
  2253. BPF_TCP_CLOSE = 0x7
  2254. BPF_TCP_CLOSE_WAIT = 0x8
  2255. BPF_TCP_LAST_ACK = 0x9
  2256. BPF_TCP_LISTEN = 0xa
  2257. BPF_TCP_CLOSING = 0xb
  2258. BPF_TCP_NEW_SYN_RECV = 0xc
  2259. BPF_TCP_MAX_STATES = 0xd
  2260. BPF_FIB_LKUP_RET_SUCCESS = 0x0
  2261. BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
  2262. BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
  2263. BPF_FIB_LKUP_RET_PROHIBIT = 0x3
  2264. BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
  2265. BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
  2266. BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
  2267. BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
  2268. BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
  2269. BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
  2270. BPF_FD_TYPE_TRACEPOINT = 0x1
  2271. BPF_FD_TYPE_KPROBE = 0x2
  2272. BPF_FD_TYPE_KRETPROBE = 0x3
  2273. BPF_FD_TYPE_UPROBE = 0x4
  2274. BPF_FD_TYPE_URETPROBE = 0x5
  2275. )
  2276. type CapUserHeader struct {
  2277. Version uint32
  2278. Pid int32
  2279. }
  2280. type CapUserData struct {
  2281. Effective uint32
  2282. Permitted uint32
  2283. Inheritable uint32
  2284. }
  2285. const (
  2286. LINUX_CAPABILITY_VERSION_1 = 0x19980330
  2287. LINUX_CAPABILITY_VERSION_2 = 0x20071026
  2288. LINUX_CAPABILITY_VERSION_3 = 0x20080522
  2289. )
  2290. const (
  2291. LO_FLAGS_READ_ONLY = 0x1
  2292. LO_FLAGS_AUTOCLEAR = 0x4
  2293. LO_FLAGS_PARTSCAN = 0x8
  2294. LO_FLAGS_DIRECT_IO = 0x10
  2295. )
  2296. type LoopInfo struct {
  2297. Number int32
  2298. Device uint32
  2299. Inode uint64
  2300. Rdevice uint32
  2301. Offset int32
  2302. Encrypt_type int32
  2303. Encrypt_key_size int32
  2304. Flags int32
  2305. Name [64]int8
  2306. Encrypt_key [32]uint8
  2307. Init [2]uint64
  2308. Reserved [4]int8
  2309. _ [4]byte
  2310. }
  2311. type LoopInfo64 struct {
  2312. Device uint64
  2313. Inode uint64
  2314. Rdevice uint64
  2315. Offset uint64
  2316. Sizelimit uint64
  2317. Number uint32
  2318. Encrypt_type uint32
  2319. Encrypt_key_size uint32
  2320. Flags uint32
  2321. File_name [64]uint8
  2322. Crypt_name [64]uint8
  2323. Encrypt_key [32]uint8
  2324. Init [2]uint64
  2325. }