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.

ztypes_linux_386.go 10KB

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