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.
 
 
 

651 lines
11 KiB

  1. // +build arm64,linux
  2. // Created by cgo -godefs - DO NOT EDIT
  3. // cgo -godefs -- -fsigned-char 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. Mode uint32
  91. Nlink uint32
  92. Uid uint32
  93. Gid uint32
  94. Rdev uint64
  95. X__pad1 uint64
  96. Size int64
  97. Blksize int32
  98. X__pad2 int32
  99. Blocks int64
  100. Atim Timespec
  101. Mtim Timespec
  102. Ctim Timespec
  103. X__glibc_reserved [2]int32
  104. }
  105. type Statfs_t struct {
  106. Type int64
  107. Bsize int64
  108. Blocks uint64
  109. Bfree uint64
  110. Bavail uint64
  111. Files uint64
  112. Ffree uint64
  113. Fsid Fsid
  114. Namelen int64
  115. Frsize int64
  116. Flags int64
  117. Spare [4]int64
  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 uint64
  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. Pad_cgo_0 [4]byte
  238. Iov *Iovec
  239. Iovlen uint64
  240. Control *byte
  241. Controllen uint64
  242. Flags int32
  243. Pad_cgo_1 [4]byte
  244. }
  245. type Cmsghdr struct {
  246. Len uint64
  247. Level int32
  248. Type int32
  249. X__cmsg_data [0]uint8
  250. }
  251. type Inet4Pktinfo struct {
  252. Ifindex int32
  253. Spec_dst [4]byte /* in_addr */
  254. Addr [4]byte /* in_addr */
  255. }
  256. type Inet6Pktinfo struct {
  257. Addr [16]byte /* in6_addr */
  258. Ifindex uint32
  259. }
  260. type IPv6MTUInfo struct {
  261. Addr RawSockaddrInet6
  262. Mtu uint32
  263. }
  264. type ICMPv6Filter struct {
  265. Data [8]uint32
  266. }
  267. type Ucred struct {
  268. Pid int32
  269. Uid uint32
  270. Gid uint32
  271. }
  272. type TCPInfo struct {
  273. State uint8
  274. Ca_state uint8
  275. Retransmits uint8
  276. Probes uint8
  277. Backoff uint8
  278. Options uint8
  279. Pad_cgo_0 [2]byte
  280. Rto uint32
  281. Ato uint32
  282. Snd_mss uint32
  283. Rcv_mss uint32
  284. Unacked uint32
  285. Sacked uint32
  286. Lost uint32
  287. Retrans uint32
  288. Fackets uint32
  289. Last_data_sent uint32
  290. Last_ack_sent uint32
  291. Last_data_recv uint32
  292. Last_ack_recv uint32
  293. Pmtu uint32
  294. Rcv_ssthresh uint32
  295. Rtt uint32
  296. Rttvar uint32
  297. Snd_ssthresh uint32
  298. Snd_cwnd uint32
  299. Advmss uint32
  300. Reordering uint32
  301. Rcv_rtt uint32
  302. Rcv_space uint32
  303. Total_retrans uint32
  304. }
  305. const (
  306. SizeofSockaddrInet4 = 0x10
  307. SizeofSockaddrInet6 = 0x1c
  308. SizeofSockaddrAny = 0x70
  309. SizeofSockaddrUnix = 0x6e
  310. SizeofSockaddrLinklayer = 0x14
  311. SizeofSockaddrNetlink = 0xc
  312. SizeofSockaddrHCI = 0x6
  313. SizeofSockaddrCAN = 0x10
  314. SizeofSockaddrALG = 0x58
  315. SizeofSockaddrVM = 0x10
  316. SizeofLinger = 0x8
  317. SizeofIPMreq = 0x8
  318. SizeofIPMreqn = 0xc
  319. SizeofIPv6Mreq = 0x14
  320. SizeofMsghdr = 0x38
  321. SizeofCmsghdr = 0x10
  322. SizeofInet4Pktinfo = 0xc
  323. SizeofInet6Pktinfo = 0x14
  324. SizeofIPv6MTUInfo = 0x20
  325. SizeofICMPv6Filter = 0x20
  326. SizeofUcred = 0xc
  327. SizeofTCPInfo = 0x68
  328. )
  329. const (
  330. IFA_UNSPEC = 0x0
  331. IFA_ADDRESS = 0x1
  332. IFA_LOCAL = 0x2
  333. IFA_LABEL = 0x3
  334. IFA_BROADCAST = 0x4
  335. IFA_ANYCAST = 0x5
  336. IFA_CACHEINFO = 0x6
  337. IFA_MULTICAST = 0x7
  338. IFLA_UNSPEC = 0x0
  339. IFLA_ADDRESS = 0x1
  340. IFLA_BROADCAST = 0x2
  341. IFLA_IFNAME = 0x3
  342. IFLA_MTU = 0x4
  343. IFLA_LINK = 0x5
  344. IFLA_QDISC = 0x6
  345. IFLA_STATS = 0x7
  346. IFLA_COST = 0x8
  347. IFLA_PRIORITY = 0x9
  348. IFLA_MASTER = 0xa
  349. IFLA_WIRELESS = 0xb
  350. IFLA_PROTINFO = 0xc
  351. IFLA_TXQLEN = 0xd
  352. IFLA_MAP = 0xe
  353. IFLA_WEIGHT = 0xf
  354. IFLA_OPERSTATE = 0x10
  355. IFLA_LINKMODE = 0x11
  356. IFLA_LINKINFO = 0x12
  357. IFLA_NET_NS_PID = 0x13
  358. IFLA_IFALIAS = 0x14
  359. IFLA_MAX = 0x22
  360. RT_SCOPE_UNIVERSE = 0x0
  361. RT_SCOPE_SITE = 0xc8
  362. RT_SCOPE_LINK = 0xfd
  363. RT_SCOPE_HOST = 0xfe
  364. RT_SCOPE_NOWHERE = 0xff
  365. RT_TABLE_UNSPEC = 0x0
  366. RT_TABLE_COMPAT = 0xfc
  367. RT_TABLE_DEFAULT = 0xfd
  368. RT_TABLE_MAIN = 0xfe
  369. RT_TABLE_LOCAL = 0xff
  370. RT_TABLE_MAX = 0xffffffff
  371. RTA_UNSPEC = 0x0
  372. RTA_DST = 0x1
  373. RTA_SRC = 0x2
  374. RTA_IIF = 0x3
  375. RTA_OIF = 0x4
  376. RTA_GATEWAY = 0x5
  377. RTA_PRIORITY = 0x6
  378. RTA_PREFSRC = 0x7
  379. RTA_METRICS = 0x8
  380. RTA_MULTIPATH = 0x9
  381. RTA_FLOW = 0xb
  382. RTA_CACHEINFO = 0xc
  383. RTA_TABLE = 0xf
  384. RTN_UNSPEC = 0x0
  385. RTN_UNICAST = 0x1
  386. RTN_LOCAL = 0x2
  387. RTN_BROADCAST = 0x3
  388. RTN_ANYCAST = 0x4
  389. RTN_MULTICAST = 0x5
  390. RTN_BLACKHOLE = 0x6
  391. RTN_UNREACHABLE = 0x7
  392. RTN_PROHIBIT = 0x8
  393. RTN_THROW = 0x9
  394. RTN_NAT = 0xa
  395. RTN_XRESOLVE = 0xb
  396. RTNLGRP_NONE = 0x0
  397. RTNLGRP_LINK = 0x1
  398. RTNLGRP_NOTIFY = 0x2
  399. RTNLGRP_NEIGH = 0x3
  400. RTNLGRP_TC = 0x4
  401. RTNLGRP_IPV4_IFADDR = 0x5
  402. RTNLGRP_IPV4_MROUTE = 0x6
  403. RTNLGRP_IPV4_ROUTE = 0x7
  404. RTNLGRP_IPV4_RULE = 0x8
  405. RTNLGRP_IPV6_IFADDR = 0x9
  406. RTNLGRP_IPV6_MROUTE = 0xa
  407. RTNLGRP_IPV6_ROUTE = 0xb
  408. RTNLGRP_IPV6_IFINFO = 0xc
  409. RTNLGRP_IPV6_PREFIX = 0x12
  410. RTNLGRP_IPV6_RULE = 0x13
  411. RTNLGRP_ND_USEROPT = 0x14
  412. SizeofNlMsghdr = 0x10
  413. SizeofNlMsgerr = 0x14
  414. SizeofRtGenmsg = 0x1
  415. SizeofNlAttr = 0x4
  416. SizeofRtAttr = 0x4
  417. SizeofIfInfomsg = 0x10
  418. SizeofIfAddrmsg = 0x8
  419. SizeofRtMsg = 0xc
  420. SizeofRtNexthop = 0x8
  421. )
  422. type NlMsghdr struct {
  423. Len uint32
  424. Type uint16
  425. Flags uint16
  426. Seq uint32
  427. Pid uint32
  428. }
  429. type NlMsgerr struct {
  430. Error int32
  431. Msg NlMsghdr
  432. }
  433. type RtGenmsg struct {
  434. Family uint8
  435. }
  436. type NlAttr struct {
  437. Len uint16
  438. Type uint16
  439. }
  440. type RtAttr struct {
  441. Len uint16
  442. Type uint16
  443. }
  444. type IfInfomsg struct {
  445. Family uint8
  446. X__ifi_pad uint8
  447. Type uint16
  448. Index int32
  449. Flags uint32
  450. Change uint32
  451. }
  452. type IfAddrmsg struct {
  453. Family uint8
  454. Prefixlen uint8
  455. Flags uint8
  456. Scope uint8
  457. Index uint32
  458. }
  459. type RtMsg struct {
  460. Family uint8
  461. Dst_len uint8
  462. Src_len uint8
  463. Tos uint8
  464. Table uint8
  465. Protocol uint8
  466. Scope uint8
  467. Type uint8
  468. Flags uint32
  469. }
  470. type RtNexthop struct {
  471. Len uint16
  472. Flags uint8
  473. Hops uint8
  474. Ifindex int32
  475. }
  476. const (
  477. SizeofSockFilter = 0x8
  478. SizeofSockFprog = 0x10
  479. )
  480. type SockFilter struct {
  481. Code uint16
  482. Jt uint8
  483. Jf uint8
  484. K uint32
  485. }
  486. type SockFprog struct {
  487. Len uint16
  488. Pad_cgo_0 [6]byte
  489. Filter *SockFilter
  490. }
  491. type InotifyEvent struct {
  492. Wd int32
  493. Mask uint32
  494. Cookie uint32
  495. Len uint32
  496. Name [0]int8
  497. }
  498. const SizeofInotifyEvent = 0x10
  499. type PtraceRegs struct {
  500. Regs [31]uint64
  501. Sp uint64
  502. Pc uint64
  503. Pstate uint64
  504. }
  505. type FdSet struct {
  506. Bits [16]int64
  507. }
  508. type Sysinfo_t struct {
  509. Uptime int64
  510. Loads [3]uint64
  511. Totalram uint64
  512. Freeram uint64
  513. Sharedram uint64
  514. Bufferram uint64
  515. Totalswap uint64
  516. Freeswap uint64
  517. Procs uint16
  518. Pad uint16
  519. Pad_cgo_0 [4]byte
  520. Totalhigh uint64
  521. Freehigh uint64
  522. Unit uint32
  523. X_f [0]int8
  524. Pad_cgo_1 [4]byte
  525. }
  526. type Utsname struct {
  527. Sysname [65]int8
  528. Nodename [65]int8
  529. Release [65]int8
  530. Version [65]int8
  531. Machine [65]int8
  532. Domainname [65]int8
  533. }
  534. type Ustat_t struct {
  535. Tfree int32
  536. Pad_cgo_0 [4]byte
  537. Tinode uint64
  538. Fname [6]int8
  539. Fpack [6]int8
  540. Pad_cgo_1 [4]byte
  541. }
  542. type EpollEvent struct {
  543. Events uint32
  544. PadFd int32
  545. Fd int32
  546. Pad int32
  547. }
  548. const (
  549. AT_FDCWD = -0x64
  550. AT_REMOVEDIR = 0x200
  551. AT_SYMLINK_FOLLOW = 0x400
  552. AT_SYMLINK_NOFOLLOW = 0x100
  553. )
  554. type PollFd struct {
  555. Fd int32
  556. Events int16
  557. Revents int16
  558. }
  559. const (
  560. POLLIN = 0x1
  561. POLLPRI = 0x2
  562. POLLOUT = 0x4
  563. POLLRDHUP = 0x2000
  564. POLLERR = 0x8
  565. POLLHUP = 0x10
  566. POLLNVAL = 0x20
  567. )
  568. type Sigset_t struct {
  569. X__val [16]uint64
  570. }
  571. type Termios struct {
  572. Iflag uint32
  573. Oflag uint32
  574. Cflag uint32
  575. Lflag uint32
  576. Line uint8
  577. Cc [19]uint8
  578. Ispeed uint32
  579. Ospeed uint32
  580. }