ztypes_linux_amd64.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. // +build amd64,linux
  2. // Created by cgo -godefs - DO NOT EDIT
  3. // cgo -godefs types_linux.go
  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. Pad_cgo_0 [4]byte
  30. Offset int64
  31. Freq int64
  32. Maxerror int64
  33. Esterror int64
  34. Status int32
  35. Pad_cgo_1 [4]byte
  36. Constant int64
  37. Precision int64
  38. Tolerance int64
  39. Time Timeval
  40. Tick int64
  41. Ppsfreq int64
  42. Jitter int64
  43. Shift int32
  44. Pad_cgo_2 [4]byte
  45. Stabil int64
  46. Jitcnt int64
  47. Calcnt int64
  48. Errcnt int64
  49. Stbcnt int64
  50. Tai int32
  51. Pad_cgo_3 [44]byte
  52. }
  53. type Time_t int64
  54. type Tms struct {
  55. Utime int64
  56. Stime int64
  57. Cutime int64
  58. Cstime int64
  59. }
  60. type Utimbuf struct {
  61. Actime int64
  62. Modtime int64
  63. }
  64. type Rusage struct {
  65. Utime Timeval
  66. Stime Timeval
  67. Maxrss int64
  68. Ixrss int64
  69. Idrss int64
  70. Isrss int64
  71. Minflt int64
  72. Majflt int64
  73. Nswap int64
  74. Inblock int64
  75. Oublock int64
  76. Msgsnd int64
  77. Msgrcv int64
  78. Nsignals int64
  79. Nvcsw int64
  80. Nivcsw int64
  81. }
  82. type Rlimit struct {
  83. Cur uint64
  84. Max uint64
  85. }
  86. type _Gid_t uint32
  87. type Stat_t struct {
  88. Dev uint64
  89. Ino uint64
  90. Nlink uint64
  91. Mode uint32
  92. Uid uint32
  93. Gid uint32
  94. X__pad0 int32
  95. Rdev uint64
  96. Size int64
  97. Blksize int64
  98. Blocks int64
  99. Atim Timespec
  100. Mtim Timespec
  101. Ctim Timespec
  102. X__unused [3]int64
  103. }
  104. type Statfs_t struct {
  105. Type int64
  106. Bsize int64
  107. Blocks uint64
  108. Bfree uint64
  109. Bavail uint64
  110. Files uint64
  111. Ffree uint64
  112. Fsid Fsid
  113. Namelen int64
  114. Frsize int64
  115. Flags int64
  116. Spare [4]int64
  117. }
  118. type Dirent struct {
  119. Ino uint64
  120. Off int64
  121. Reclen uint16
  122. Type uint8
  123. Name [256]int8
  124. Pad_cgo_0 [5]byte
  125. }
  126. type Fsid struct {
  127. X__val [2]int32
  128. }
  129. type Flock_t struct {
  130. Type int16
  131. Whence int16
  132. Pad_cgo_0 [4]byte
  133. Start int64
  134. Len int64
  135. Pid int32
  136. Pad_cgo_1 [4]byte
  137. }
  138. const (
  139. FADV_NORMAL = 0x0
  140. FADV_RANDOM = 0x1
  141. FADV_SEQUENTIAL = 0x2
  142. FADV_WILLNEED = 0x3
  143. FADV_DONTNEED = 0x4
  144. FADV_NOREUSE = 0x5
  145. )
  146. type RawSockaddrInet4 struct {
  147. Family uint16
  148. Port uint16
  149. Addr [4]byte /* in_addr */
  150. Zero [8]uint8
  151. }
  152. type RawSockaddrInet6 struct {
  153. Family uint16
  154. Port uint16
  155. Flowinfo uint32
  156. Addr [16]byte /* in6_addr */
  157. Scope_id uint32
  158. }
  159. type RawSockaddrUnix struct {
  160. Family uint16
  161. Path [108]int8
  162. }
  163. type RawSockaddrLinklayer struct {
  164. Family uint16
  165. Protocol uint16
  166. Ifindex int32
  167. Hatype uint16
  168. Pkttype uint8
  169. Halen uint8
  170. Addr [8]uint8
  171. }
  172. type RawSockaddrNetlink struct {
  173. Family uint16
  174. Pad uint16
  175. Pid uint32
  176. Groups uint32
  177. }
  178. type RawSockaddrHCI struct {
  179. Family uint16
  180. Dev uint16
  181. Channel uint16
  182. }
  183. type RawSockaddr struct {
  184. Family uint16
  185. Data [14]int8
  186. }
  187. type RawSockaddrAny struct {
  188. Addr RawSockaddr
  189. Pad [96]int8
  190. }
  191. type _Socklen uint32
  192. type Linger struct {
  193. Onoff int32
  194. Linger int32
  195. }
  196. type Iovec struct {
  197. Base *byte
  198. Len uint64
  199. }
  200. type IPMreq struct {
  201. Multiaddr [4]byte /* in_addr */
  202. Interface [4]byte /* in_addr */
  203. }
  204. type IPMreqn struct {
  205. Multiaddr [4]byte /* in_addr */
  206. Address [4]byte /* in_addr */
  207. Ifindex int32
  208. }
  209. type IPv6Mreq struct {
  210. Multiaddr [16]byte /* in6_addr */
  211. Interface uint32
  212. }
  213. type Msghdr struct {
  214. Name *byte
  215. Namelen uint32
  216. Pad_cgo_0 [4]byte
  217. Iov *Iovec
  218. Iovlen uint64
  219. Control *byte
  220. Controllen uint64
  221. Flags int32
  222. Pad_cgo_1 [4]byte
  223. }
  224. type Cmsghdr struct {
  225. Len uint64
  226. Level int32
  227. Type int32
  228. X__cmsg_data [0]uint8
  229. }
  230. type Inet4Pktinfo struct {
  231. Ifindex int32
  232. Spec_dst [4]byte /* in_addr */
  233. Addr [4]byte /* in_addr */
  234. }
  235. type Inet6Pktinfo struct {
  236. Addr [16]byte /* in6_addr */
  237. Ifindex uint32
  238. }
  239. type IPv6MTUInfo struct {
  240. Addr RawSockaddrInet6
  241. Mtu uint32
  242. }
  243. type ICMPv6Filter struct {
  244. Data [8]uint32
  245. }
  246. type Ucred struct {
  247. Pid int32
  248. Uid uint32
  249. Gid uint32
  250. }
  251. type TCPInfo struct {
  252. State uint8
  253. Ca_state uint8
  254. Retransmits uint8
  255. Probes uint8
  256. Backoff uint8
  257. Options uint8
  258. Pad_cgo_0 [2]byte
  259. Rto uint32
  260. Ato uint32
  261. Snd_mss uint32
  262. Rcv_mss uint32
  263. Unacked uint32
  264. Sacked uint32
  265. Lost uint32
  266. Retrans uint32
  267. Fackets uint32
  268. Last_data_sent uint32
  269. Last_ack_sent uint32
  270. Last_data_recv uint32
  271. Last_ack_recv uint32
  272. Pmtu uint32
  273. Rcv_ssthresh uint32
  274. Rtt uint32
  275. Rttvar uint32
  276. Snd_ssthresh uint32
  277. Snd_cwnd uint32
  278. Advmss uint32
  279. Reordering uint32
  280. Rcv_rtt uint32
  281. Rcv_space uint32
  282. Total_retrans uint32
  283. }
  284. const (
  285. SizeofSockaddrInet4 = 0x10
  286. SizeofSockaddrInet6 = 0x1c
  287. SizeofSockaddrAny = 0x70
  288. SizeofSockaddrUnix = 0x6e
  289. SizeofSockaddrLinklayer = 0x14
  290. SizeofSockaddrNetlink = 0xc
  291. SizeofSockaddrHCI = 0x6
  292. SizeofLinger = 0x8
  293. SizeofIPMreq = 0x8
  294. SizeofIPMreqn = 0xc
  295. SizeofIPv6Mreq = 0x14
  296. SizeofMsghdr = 0x38
  297. SizeofCmsghdr = 0x10
  298. SizeofInet4Pktinfo = 0xc
  299. SizeofInet6Pktinfo = 0x14
  300. SizeofIPv6MTUInfo = 0x20
  301. SizeofICMPv6Filter = 0x20
  302. SizeofUcred = 0xc
  303. SizeofTCPInfo = 0x68
  304. )
  305. const (
  306. IFA_UNSPEC = 0x0
  307. IFA_ADDRESS = 0x1
  308. IFA_LOCAL = 0x2
  309. IFA_LABEL = 0x3
  310. IFA_BROADCAST = 0x4
  311. IFA_ANYCAST = 0x5
  312. IFA_CACHEINFO = 0x6
  313. IFA_MULTICAST = 0x7
  314. IFLA_UNSPEC = 0x0
  315. IFLA_ADDRESS = 0x1
  316. IFLA_BROADCAST = 0x2
  317. IFLA_IFNAME = 0x3
  318. IFLA_MTU = 0x4
  319. IFLA_LINK = 0x5
  320. IFLA_QDISC = 0x6
  321. IFLA_STATS = 0x7
  322. IFLA_COST = 0x8
  323. IFLA_PRIORITY = 0x9
  324. IFLA_MASTER = 0xa
  325. IFLA_WIRELESS = 0xb
  326. IFLA_PROTINFO = 0xc
  327. IFLA_TXQLEN = 0xd
  328. IFLA_MAP = 0xe
  329. IFLA_WEIGHT = 0xf
  330. IFLA_OPERSTATE = 0x10
  331. IFLA_LINKMODE = 0x11
  332. IFLA_LINKINFO = 0x12
  333. IFLA_NET_NS_PID = 0x13
  334. IFLA_IFALIAS = 0x14
  335. IFLA_MAX = 0x1d
  336. RT_SCOPE_UNIVERSE = 0x0
  337. RT_SCOPE_SITE = 0xc8
  338. RT_SCOPE_LINK = 0xfd
  339. RT_SCOPE_HOST = 0xfe
  340. RT_SCOPE_NOWHERE = 0xff
  341. RT_TABLE_UNSPEC = 0x0
  342. RT_TABLE_COMPAT = 0xfc
  343. RT_TABLE_DEFAULT = 0xfd
  344. RT_TABLE_MAIN = 0xfe
  345. RT_TABLE_LOCAL = 0xff
  346. RT_TABLE_MAX = 0xffffffff
  347. RTA_UNSPEC = 0x0
  348. RTA_DST = 0x1
  349. RTA_SRC = 0x2
  350. RTA_IIF = 0x3
  351. RTA_OIF = 0x4
  352. RTA_GATEWAY = 0x5
  353. RTA_PRIORITY = 0x6
  354. RTA_PREFSRC = 0x7
  355. RTA_METRICS = 0x8
  356. RTA_MULTIPATH = 0x9
  357. RTA_FLOW = 0xb
  358. RTA_CACHEINFO = 0xc
  359. RTA_TABLE = 0xf
  360. RTN_UNSPEC = 0x0
  361. RTN_UNICAST = 0x1
  362. RTN_LOCAL = 0x2
  363. RTN_BROADCAST = 0x3
  364. RTN_ANYCAST = 0x4
  365. RTN_MULTICAST = 0x5
  366. RTN_BLACKHOLE = 0x6
  367. RTN_UNREACHABLE = 0x7
  368. RTN_PROHIBIT = 0x8
  369. RTN_THROW = 0x9
  370. RTN_NAT = 0xa
  371. RTN_XRESOLVE = 0xb
  372. RTNLGRP_NONE = 0x0
  373. RTNLGRP_LINK = 0x1
  374. RTNLGRP_NOTIFY = 0x2
  375. RTNLGRP_NEIGH = 0x3
  376. RTNLGRP_TC = 0x4
  377. RTNLGRP_IPV4_IFADDR = 0x5
  378. RTNLGRP_IPV4_MROUTE = 0x6
  379. RTNLGRP_IPV4_ROUTE = 0x7
  380. RTNLGRP_IPV4_RULE = 0x8
  381. RTNLGRP_IPV6_IFADDR = 0x9
  382. RTNLGRP_IPV6_MROUTE = 0xa
  383. RTNLGRP_IPV6_ROUTE = 0xb
  384. RTNLGRP_IPV6_IFINFO = 0xc
  385. RTNLGRP_IPV6_PREFIX = 0x12
  386. RTNLGRP_IPV6_RULE = 0x13
  387. RTNLGRP_ND_USEROPT = 0x14
  388. SizeofNlMsghdr = 0x10
  389. SizeofNlMsgerr = 0x14
  390. SizeofRtGenmsg = 0x1
  391. SizeofNlAttr = 0x4
  392. SizeofRtAttr = 0x4
  393. SizeofIfInfomsg = 0x10
  394. SizeofIfAddrmsg = 0x8
  395. SizeofRtMsg = 0xc
  396. SizeofRtNexthop = 0x8
  397. )
  398. type NlMsghdr struct {
  399. Len uint32
  400. Type uint16
  401. Flags uint16
  402. Seq uint32
  403. Pid uint32
  404. }
  405. type NlMsgerr struct {
  406. Error int32
  407. Msg NlMsghdr
  408. }
  409. type RtGenmsg struct {
  410. Family uint8
  411. }
  412. type NlAttr struct {
  413. Len uint16
  414. Type uint16
  415. }
  416. type RtAttr struct {
  417. Len uint16
  418. Type uint16
  419. }
  420. type IfInfomsg struct {
  421. Family uint8
  422. X__ifi_pad uint8
  423. Type uint16
  424. Index int32
  425. Flags uint32
  426. Change uint32
  427. }
  428. type IfAddrmsg struct {
  429. Family uint8
  430. Prefixlen uint8
  431. Flags uint8
  432. Scope uint8
  433. Index uint32
  434. }
  435. type RtMsg struct {
  436. Family uint8
  437. Dst_len uint8
  438. Src_len uint8
  439. Tos uint8
  440. Table uint8
  441. Protocol uint8
  442. Scope uint8
  443. Type uint8
  444. Flags uint32
  445. }
  446. type RtNexthop struct {
  447. Len uint16
  448. Flags uint8
  449. Hops uint8
  450. Ifindex int32
  451. }
  452. const (
  453. SizeofSockFilter = 0x8
  454. SizeofSockFprog = 0x10
  455. )
  456. type SockFilter struct {
  457. Code uint16
  458. Jt uint8
  459. Jf uint8
  460. K uint32
  461. }
  462. type SockFprog struct {
  463. Len uint16
  464. Pad_cgo_0 [6]byte
  465. Filter *SockFilter
  466. }
  467. type InotifyEvent struct {
  468. Wd int32
  469. Mask uint32
  470. Cookie uint32
  471. Len uint32
  472. Name [0]int8
  473. }
  474. const SizeofInotifyEvent = 0x10
  475. type PtraceRegs struct {
  476. R15 uint64
  477. R14 uint64
  478. R13 uint64
  479. R12 uint64
  480. Rbp uint64
  481. Rbx uint64
  482. R11 uint64
  483. R10 uint64
  484. R9 uint64
  485. R8 uint64
  486. Rax uint64
  487. Rcx uint64
  488. Rdx uint64
  489. Rsi uint64
  490. Rdi uint64
  491. Orig_rax uint64
  492. Rip uint64
  493. Cs uint64
  494. Eflags uint64
  495. Rsp uint64
  496. Ss uint64
  497. Fs_base uint64
  498. Gs_base uint64
  499. Ds uint64
  500. Es uint64
  501. Fs uint64
  502. Gs uint64
  503. }
  504. type FdSet struct {
  505. Bits [16]int64
  506. }
  507. type Sysinfo_t struct {
  508. Uptime int64
  509. Loads [3]uint64
  510. Totalram uint64
  511. Freeram uint64
  512. Sharedram uint64
  513. Bufferram uint64
  514. Totalswap uint64
  515. Freeswap uint64
  516. Procs uint16
  517. Pad uint16
  518. Pad_cgo_0 [4]byte
  519. Totalhigh uint64
  520. Freehigh uint64
  521. Unit uint32
  522. X_f [0]int8
  523. Pad_cgo_1 [4]byte
  524. }
  525. type Utsname struct {
  526. Sysname [65]int8
  527. Nodename [65]int8
  528. Release [65]int8
  529. Version [65]int8
  530. Machine [65]int8
  531. Domainname [65]int8
  532. }
  533. type Ustat_t struct {
  534. Tfree int32
  535. Pad_cgo_0 [4]byte
  536. Tinode uint64
  537. Fname [6]int8
  538. Fpack [6]int8
  539. Pad_cgo_1 [4]byte
  540. }
  541. type EpollEvent struct {
  542. Events uint32
  543. Fd int32
  544. Pad int32
  545. }
  546. const (
  547. AT_FDCWD = -0x64
  548. AT_REMOVEDIR = 0x200
  549. AT_SYMLINK_FOLLOW = 0x400
  550. AT_SYMLINK_NOFOLLOW = 0x100
  551. )
  552. type PollFd struct {
  553. Fd int32
  554. Events int16
  555. Revents int16
  556. }
  557. const (
  558. POLLIN = 0x1
  559. POLLPRI = 0x2
  560. POLLOUT = 0x4
  561. POLLRDHUP = 0x2000
  562. POLLERR = 0x8
  563. POLLHUP = 0x10
  564. POLLNVAL = 0x20
  565. )
  566. type Sigset_t struct {
  567. X__val [16]uint64
  568. }
  569. type Termios struct {
  570. Iflag uint32
  571. Oflag uint32
  572. Cflag uint32
  573. Lflag uint32
  574. Line uint8
  575. Cc [19]uint8
  576. Ispeed uint32
  577. Ospeed uint32
  578. }