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.
 
 
 

672 lines
11 KiB

  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 RawSockaddrCAN struct {
  184. Family uint16
  185. Pad_cgo_0 [2]byte
  186. Ifindex int32
  187. Addr [8]byte
  188. }
  189. type RawSockaddrALG struct {
  190. Family uint16
  191. Type [14]uint8
  192. Feat uint32
  193. Mask uint32
  194. Name [64]uint8
  195. }
  196. type RawSockaddrVM struct {
  197. Family uint16
  198. Reserved1 uint16
  199. Port uint32
  200. Cid uint32
  201. Zero [4]uint8
  202. }
  203. type RawSockaddr struct {
  204. Family uint16
  205. Data [14]int8
  206. }
  207. type RawSockaddrAny struct {
  208. Addr RawSockaddr
  209. Pad [96]int8
  210. }
  211. type _Socklen uint32
  212. type Linger struct {
  213. Onoff int32
  214. Linger int32
  215. }
  216. type Iovec struct {
  217. Base *byte
  218. Len uint64
  219. }
  220. type IPMreq struct {
  221. Multiaddr [4]byte /* in_addr */
  222. Interface [4]byte /* in_addr */
  223. }
  224. type IPMreqn struct {
  225. Multiaddr [4]byte /* in_addr */
  226. Address [4]byte /* in_addr */
  227. Ifindex int32
  228. }
  229. type IPv6Mreq struct {
  230. Multiaddr [16]byte /* in6_addr */
  231. Interface uint32
  232. }
  233. type Msghdr struct {
  234. Name *byte
  235. Namelen uint32
  236. Pad_cgo_0 [4]byte
  237. Iov *Iovec
  238. Iovlen uint64
  239. Control *byte
  240. Controllen uint64
  241. Flags int32
  242. Pad_cgo_1 [4]byte
  243. }
  244. type Cmsghdr struct {
  245. Len uint64
  246. Level int32
  247. Type int32
  248. X__cmsg_data [0]uint8
  249. }
  250. type Inet4Pktinfo struct {
  251. Ifindex int32
  252. Spec_dst [4]byte /* in_addr */
  253. Addr [4]byte /* in_addr */
  254. }
  255. type Inet6Pktinfo struct {
  256. Addr [16]byte /* in6_addr */
  257. Ifindex uint32
  258. }
  259. type IPv6MTUInfo struct {
  260. Addr RawSockaddrInet6
  261. Mtu uint32
  262. }
  263. type ICMPv6Filter struct {
  264. Data [8]uint32
  265. }
  266. type Ucred struct {
  267. Pid int32
  268. Uid uint32
  269. Gid uint32
  270. }
  271. type TCPInfo struct {
  272. State uint8
  273. Ca_state uint8
  274. Retransmits uint8
  275. Probes uint8
  276. Backoff uint8
  277. Options uint8
  278. Pad_cgo_0 [2]byte
  279. Rto uint32
  280. Ato uint32
  281. Snd_mss uint32
  282. Rcv_mss uint32
  283. Unacked uint32
  284. Sacked uint32
  285. Lost uint32
  286. Retrans uint32
  287. Fackets uint32
  288. Last_data_sent uint32
  289. Last_ack_sent uint32
  290. Last_data_recv uint32
  291. Last_ack_recv uint32
  292. Pmtu uint32
  293. Rcv_ssthresh uint32
  294. Rtt uint32
  295. Rttvar uint32
  296. Snd_ssthresh uint32
  297. Snd_cwnd uint32
  298. Advmss uint32
  299. Reordering uint32
  300. Rcv_rtt uint32
  301. Rcv_space uint32
  302. Total_retrans uint32
  303. }
  304. const (
  305. SizeofSockaddrInet4 = 0x10
  306. SizeofSockaddrInet6 = 0x1c
  307. SizeofSockaddrAny = 0x70
  308. SizeofSockaddrUnix = 0x6e
  309. SizeofSockaddrLinklayer = 0x14
  310. SizeofSockaddrNetlink = 0xc
  311. SizeofSockaddrHCI = 0x6
  312. SizeofSockaddrCAN = 0x10
  313. SizeofSockaddrALG = 0x58
  314. SizeofSockaddrVM = 0x10
  315. SizeofLinger = 0x8
  316. SizeofIPMreq = 0x8
  317. SizeofIPMreqn = 0xc
  318. SizeofIPv6Mreq = 0x14
  319. SizeofMsghdr = 0x38
  320. SizeofCmsghdr = 0x10
  321. SizeofInet4Pktinfo = 0xc
  322. SizeofInet6Pktinfo = 0x14
  323. SizeofIPv6MTUInfo = 0x20
  324. SizeofICMPv6Filter = 0x20
  325. SizeofUcred = 0xc
  326. SizeofTCPInfo = 0x68
  327. )
  328. const (
  329. IFA_UNSPEC = 0x0
  330. IFA_ADDRESS = 0x1
  331. IFA_LOCAL = 0x2
  332. IFA_LABEL = 0x3
  333. IFA_BROADCAST = 0x4
  334. IFA_ANYCAST = 0x5
  335. IFA_CACHEINFO = 0x6
  336. IFA_MULTICAST = 0x7
  337. IFLA_UNSPEC = 0x0
  338. IFLA_ADDRESS = 0x1
  339. IFLA_BROADCAST = 0x2
  340. IFLA_IFNAME = 0x3
  341. IFLA_MTU = 0x4
  342. IFLA_LINK = 0x5
  343. IFLA_QDISC = 0x6
  344. IFLA_STATS = 0x7
  345. IFLA_COST = 0x8
  346. IFLA_PRIORITY = 0x9
  347. IFLA_MASTER = 0xa
  348. IFLA_WIRELESS = 0xb
  349. IFLA_PROTINFO = 0xc
  350. IFLA_TXQLEN = 0xd
  351. IFLA_MAP = 0xe
  352. IFLA_WEIGHT = 0xf
  353. IFLA_OPERSTATE = 0x10
  354. IFLA_LINKMODE = 0x11
  355. IFLA_LINKINFO = 0x12
  356. IFLA_NET_NS_PID = 0x13
  357. IFLA_IFALIAS = 0x14
  358. IFLA_MAX = 0x1d
  359. RT_SCOPE_UNIVERSE = 0x0
  360. RT_SCOPE_SITE = 0xc8
  361. RT_SCOPE_LINK = 0xfd
  362. RT_SCOPE_HOST = 0xfe
  363. RT_SCOPE_NOWHERE = 0xff
  364. RT_TABLE_UNSPEC = 0x0
  365. RT_TABLE_COMPAT = 0xfc
  366. RT_TABLE_DEFAULT = 0xfd
  367. RT_TABLE_MAIN = 0xfe
  368. RT_TABLE_LOCAL = 0xff
  369. RT_TABLE_MAX = 0xffffffff
  370. RTA_UNSPEC = 0x0
  371. RTA_DST = 0x1
  372. RTA_SRC = 0x2
  373. RTA_IIF = 0x3
  374. RTA_OIF = 0x4
  375. RTA_GATEWAY = 0x5
  376. RTA_PRIORITY = 0x6
  377. RTA_PREFSRC = 0x7
  378. RTA_METRICS = 0x8
  379. RTA_MULTIPATH = 0x9
  380. RTA_FLOW = 0xb
  381. RTA_CACHEINFO = 0xc
  382. RTA_TABLE = 0xf
  383. RTN_UNSPEC = 0x0
  384. RTN_UNICAST = 0x1
  385. RTN_LOCAL = 0x2
  386. RTN_BROADCAST = 0x3
  387. RTN_ANYCAST = 0x4
  388. RTN_MULTICAST = 0x5
  389. RTN_BLACKHOLE = 0x6
  390. RTN_UNREACHABLE = 0x7
  391. RTN_PROHIBIT = 0x8
  392. RTN_THROW = 0x9
  393. RTN_NAT = 0xa
  394. RTN_XRESOLVE = 0xb
  395. RTNLGRP_NONE = 0x0
  396. RTNLGRP_LINK = 0x1
  397. RTNLGRP_NOTIFY = 0x2
  398. RTNLGRP_NEIGH = 0x3
  399. RTNLGRP_TC = 0x4
  400. RTNLGRP_IPV4_IFADDR = 0x5
  401. RTNLGRP_IPV4_MROUTE = 0x6
  402. RTNLGRP_IPV4_ROUTE = 0x7
  403. RTNLGRP_IPV4_RULE = 0x8
  404. RTNLGRP_IPV6_IFADDR = 0x9
  405. RTNLGRP_IPV6_MROUTE = 0xa
  406. RTNLGRP_IPV6_ROUTE = 0xb
  407. RTNLGRP_IPV6_IFINFO = 0xc
  408. RTNLGRP_IPV6_PREFIX = 0x12
  409. RTNLGRP_IPV6_RULE = 0x13
  410. RTNLGRP_ND_USEROPT = 0x14
  411. SizeofNlMsghdr = 0x10
  412. SizeofNlMsgerr = 0x14
  413. SizeofRtGenmsg = 0x1
  414. SizeofNlAttr = 0x4
  415. SizeofRtAttr = 0x4
  416. SizeofIfInfomsg = 0x10
  417. SizeofIfAddrmsg = 0x8
  418. SizeofRtMsg = 0xc
  419. SizeofRtNexthop = 0x8
  420. )
  421. type NlMsghdr struct {
  422. Len uint32
  423. Type uint16
  424. Flags uint16
  425. Seq uint32
  426. Pid uint32
  427. }
  428. type NlMsgerr struct {
  429. Error int32
  430. Msg NlMsghdr
  431. }
  432. type RtGenmsg struct {
  433. Family uint8
  434. }
  435. type NlAttr struct {
  436. Len uint16
  437. Type uint16
  438. }
  439. type RtAttr struct {
  440. Len uint16
  441. Type uint16
  442. }
  443. type IfInfomsg struct {
  444. Family uint8
  445. X__ifi_pad uint8
  446. Type uint16
  447. Index int32
  448. Flags uint32
  449. Change uint32
  450. }
  451. type IfAddrmsg struct {
  452. Family uint8
  453. Prefixlen uint8
  454. Flags uint8
  455. Scope uint8
  456. Index uint32
  457. }
  458. type RtMsg struct {
  459. Family uint8
  460. Dst_len uint8
  461. Src_len uint8
  462. Tos uint8
  463. Table uint8
  464. Protocol uint8
  465. Scope uint8
  466. Type uint8
  467. Flags uint32
  468. }
  469. type RtNexthop struct {
  470. Len uint16
  471. Flags uint8
  472. Hops uint8
  473. Ifindex int32
  474. }
  475. const (
  476. SizeofSockFilter = 0x8
  477. SizeofSockFprog = 0x10
  478. )
  479. type SockFilter struct {
  480. Code uint16
  481. Jt uint8
  482. Jf uint8
  483. K uint32
  484. }
  485. type SockFprog struct {
  486. Len uint16
  487. Pad_cgo_0 [6]byte
  488. Filter *SockFilter
  489. }
  490. type InotifyEvent struct {
  491. Wd int32
  492. Mask uint32
  493. Cookie uint32
  494. Len uint32
  495. Name [0]int8
  496. }
  497. const SizeofInotifyEvent = 0x10
  498. type PtraceRegs struct {
  499. R15 uint64
  500. R14 uint64
  501. R13 uint64
  502. R12 uint64
  503. Rbp uint64
  504. Rbx uint64
  505. R11 uint64
  506. R10 uint64
  507. R9 uint64
  508. R8 uint64
  509. Rax uint64
  510. Rcx uint64
  511. Rdx uint64
  512. Rsi uint64
  513. Rdi uint64
  514. Orig_rax uint64
  515. Rip uint64
  516. Cs uint64
  517. Eflags uint64
  518. Rsp uint64
  519. Ss uint64
  520. Fs_base uint64
  521. Gs_base uint64
  522. Ds uint64
  523. Es uint64
  524. Fs uint64
  525. Gs uint64
  526. }
  527. type FdSet struct {
  528. Bits [16]int64
  529. }
  530. type Sysinfo_t struct {
  531. Uptime int64
  532. Loads [3]uint64
  533. Totalram uint64
  534. Freeram uint64
  535. Sharedram uint64
  536. Bufferram uint64
  537. Totalswap uint64
  538. Freeswap uint64
  539. Procs uint16
  540. Pad uint16
  541. Pad_cgo_0 [4]byte
  542. Totalhigh uint64
  543. Freehigh uint64
  544. Unit uint32
  545. X_f [0]int8
  546. Pad_cgo_1 [4]byte
  547. }
  548. type Utsname struct {
  549. Sysname [65]int8
  550. Nodename [65]int8
  551. Release [65]int8
  552. Version [65]int8
  553. Machine [65]int8
  554. Domainname [65]int8
  555. }
  556. type Ustat_t struct {
  557. Tfree int32
  558. Pad_cgo_0 [4]byte
  559. Tinode uint64
  560. Fname [6]int8
  561. Fpack [6]int8
  562. Pad_cgo_1 [4]byte
  563. }
  564. type EpollEvent struct {
  565. Events uint32
  566. Fd int32
  567. Pad int32
  568. }
  569. const (
  570. AT_FDCWD = -0x64
  571. AT_REMOVEDIR = 0x200
  572. AT_SYMLINK_FOLLOW = 0x400
  573. AT_SYMLINK_NOFOLLOW = 0x100
  574. )
  575. type PollFd struct {
  576. Fd int32
  577. Events int16
  578. Revents int16
  579. }
  580. const (
  581. POLLIN = 0x1
  582. POLLPRI = 0x2
  583. POLLOUT = 0x4
  584. POLLRDHUP = 0x2000
  585. POLLERR = 0x8
  586. POLLHUP = 0x10
  587. POLLNVAL = 0x20
  588. )
  589. type Sigset_t struct {
  590. X__val [16]uint64
  591. }
  592. type Termios struct {
  593. Iflag uint32
  594. Oflag uint32
  595. Cflag uint32
  596. Lflag uint32
  597. Line uint8
  598. Cc [19]uint8
  599. Ispeed uint32
  600. Ospeed uint32
  601. }