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.
 
 
 

654 lines
11 KiB

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