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.
 
 
 

643 lines
11 KiB

  1. // +build arm,linux
  2. // Created by cgo -godefs - DO NOT EDIT
  3. // cgo -godefs types_linux.go | go run mkpost.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 [6]byte
  96. Size int64
  97. Blksize int32
  98. Pad_cgo_2 [4]byte
  99. Blocks int64
  100. Atim Timespec
  101. Mtim Timespec
  102. Ctim Timespec
  103. Ino uint64
  104. }
  105. type Statfs_t struct {
  106. Type int32
  107. Bsize int32
  108. Blocks uint64
  109. Bfree uint64
  110. Bavail uint64
  111. Files uint64
  112. Ffree uint64
  113. Fsid Fsid
  114. Namelen int32
  115. Frsize int32
  116. Flags int32
  117. Spare [4]int32
  118. Pad_cgo_0 [4]byte
  119. }
  120. type Dirent struct {
  121. Ino uint64
  122. Off int64
  123. Reclen uint16
  124. Type uint8
  125. Name [256]uint8
  126. Pad_cgo_0 [5]byte
  127. }
  128. type Fsid struct {
  129. X__val [2]int32
  130. }
  131. type Flock_t struct {
  132. Type int16
  133. Whence int16
  134. Pad_cgo_0 [4]byte
  135. Start int64
  136. Len int64
  137. Pid int32
  138. Pad_cgo_1 [4]byte
  139. }
  140. const (
  141. FADV_NORMAL = 0x0
  142. FADV_RANDOM = 0x1
  143. FADV_SEQUENTIAL = 0x2
  144. FADV_WILLNEED = 0x3
  145. FADV_DONTNEED = 0x4
  146. FADV_NOREUSE = 0x5
  147. )
  148. type RawSockaddrInet4 struct {
  149. Family uint16
  150. Port uint16
  151. Addr [4]byte /* in_addr */
  152. Zero [8]uint8
  153. }
  154. type RawSockaddrInet6 struct {
  155. Family uint16
  156. Port uint16
  157. Flowinfo uint32
  158. Addr [16]byte /* in6_addr */
  159. Scope_id uint32
  160. }
  161. type RawSockaddrUnix struct {
  162. Family uint16
  163. Path [108]int8
  164. }
  165. type RawSockaddrLinklayer struct {
  166. Family uint16
  167. Protocol uint16
  168. Ifindex int32
  169. Hatype uint16
  170. Pkttype uint8
  171. Halen uint8
  172. Addr [8]uint8
  173. }
  174. type RawSockaddrNetlink struct {
  175. Family uint16
  176. Pad uint16
  177. Pid uint32
  178. Groups uint32
  179. }
  180. type RawSockaddrHCI struct {
  181. Family uint16
  182. Dev uint16
  183. Channel uint16
  184. }
  185. type RawSockaddrCAN struct {
  186. Family uint16
  187. Pad_cgo_0 [2]byte
  188. Ifindex int32
  189. Addr [8]byte
  190. }
  191. type RawSockaddrALG struct {
  192. Family uint16
  193. Type [14]uint8
  194. Feat uint32
  195. Mask uint32
  196. Name [64]uint8
  197. }
  198. type RawSockaddrVM struct {
  199. Family uint16
  200. Reserved1 uint16
  201. Port uint32
  202. Cid uint32
  203. Zero [4]uint8
  204. }
  205. type RawSockaddr struct {
  206. Family uint16
  207. Data [14]uint8
  208. }
  209. type RawSockaddrAny struct {
  210. Addr RawSockaddr
  211. Pad [96]uint8
  212. }
  213. type _Socklen uint32
  214. type Linger struct {
  215. Onoff int32
  216. Linger int32
  217. }
  218. type Iovec struct {
  219. Base *byte
  220. Len uint32
  221. }
  222. type IPMreq struct {
  223. Multiaddr [4]byte /* in_addr */
  224. Interface [4]byte /* in_addr */
  225. }
  226. type IPMreqn struct {
  227. Multiaddr [4]byte /* in_addr */
  228. Address [4]byte /* in_addr */
  229. Ifindex int32
  230. }
  231. type IPv6Mreq struct {
  232. Multiaddr [16]byte /* in6_addr */
  233. Interface uint32
  234. }
  235. type Msghdr struct {
  236. Name *byte
  237. Namelen uint32
  238. Iov *Iovec
  239. Iovlen uint32
  240. Control *byte
  241. Controllen uint32
  242. Flags int32
  243. }
  244. type Cmsghdr struct {
  245. Len uint32
  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 = 0x1c
  320. SizeofCmsghdr = 0xc
  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 = 0x8
  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 [2]byte
  488. Filter *SockFilter
  489. }
  490. type InotifyEvent struct {
  491. Wd int32
  492. Mask uint32
  493. Cookie uint32
  494. Len uint32
  495. Name [0]uint8
  496. }
  497. const SizeofInotifyEvent = 0x10
  498. type PtraceRegs struct {
  499. Uregs [18]uint32
  500. }
  501. type FdSet struct {
  502. Bits [32]int32
  503. }
  504. type Sysinfo_t struct {
  505. Uptime int32
  506. Loads [3]uint32
  507. Totalram uint32
  508. Freeram uint32
  509. Sharedram uint32
  510. Bufferram uint32
  511. Totalswap uint32
  512. Freeswap uint32
  513. Procs uint16
  514. Pad uint16
  515. Totalhigh uint32
  516. Freehigh uint32
  517. Unit uint32
  518. X_f [8]uint8
  519. }
  520. type Utsname struct {
  521. Sysname [65]uint8
  522. Nodename [65]uint8
  523. Release [65]uint8
  524. Version [65]uint8
  525. Machine [65]uint8
  526. Domainname [65]uint8
  527. }
  528. type Ustat_t struct {
  529. Tfree int32
  530. Tinode uint32
  531. Fname [6]uint8
  532. Fpack [6]uint8
  533. }
  534. type EpollEvent struct {
  535. Events uint32
  536. PadFd int32
  537. Fd int32
  538. Pad int32
  539. }
  540. const (
  541. AT_FDCWD = -0x64
  542. AT_REMOVEDIR = 0x200
  543. AT_SYMLINK_FOLLOW = 0x400
  544. AT_SYMLINK_NOFOLLOW = 0x100
  545. )
  546. type PollFd struct {
  547. Fd int32
  548. Events int16
  549. Revents int16
  550. }
  551. const (
  552. POLLIN = 0x1
  553. POLLPRI = 0x2
  554. POLLOUT = 0x4
  555. POLLRDHUP = 0x2000
  556. POLLERR = 0x8
  557. POLLHUP = 0x10
  558. POLLNVAL = 0x20
  559. )
  560. type Sigset_t struct {
  561. X__val [16]uint64
  562. }
  563. type Termios struct {
  564. Iflag uint32
  565. Oflag uint32
  566. Cflag uint32
  567. Lflag uint32
  568. Line uint8
  569. Cc [19]uint8
  570. Ispeed uint32
  571. Ospeed uint32
  572. }