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.
 
 
 

661 lines
11 KiB

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