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_freebsd_riscv64.go 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. // cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build riscv64 && freebsd
  4. package unix
  5. const (
  6. SizeofPtr = 0x8
  7. SizeofShort = 0x2
  8. SizeofInt = 0x4
  9. SizeofLong = 0x8
  10. SizeofLongLong = 0x8
  11. )
  12. type (
  13. _C_short int16
  14. _C_int int32
  15. _C_long int64
  16. _C_long_long int64
  17. )
  18. type Timespec struct {
  19. Sec int64
  20. Nsec int64
  21. }
  22. type Timeval struct {
  23. Sec int64
  24. Usec int64
  25. }
  26. type Time_t int64
  27. type Rusage struct {
  28. Utime Timeval
  29. Stime Timeval
  30. Maxrss int64
  31. Ixrss int64
  32. Idrss int64
  33. Isrss int64
  34. Minflt int64
  35. Majflt int64
  36. Nswap int64
  37. Inblock int64
  38. Oublock int64
  39. Msgsnd int64
  40. Msgrcv int64
  41. Nsignals int64
  42. Nvcsw int64
  43. Nivcsw int64
  44. }
  45. type Rlimit struct {
  46. Cur int64
  47. Max int64
  48. }
  49. type _Gid_t uint32
  50. const (
  51. _statfsVersion = 0x20140518
  52. _dirblksiz = 0x400
  53. )
  54. type Stat_t struct {
  55. Dev uint64
  56. Ino uint64
  57. Nlink uint64
  58. Mode uint16
  59. _0 int16
  60. Uid uint32
  61. Gid uint32
  62. _1 int32
  63. Rdev uint64
  64. Atim Timespec
  65. Mtim Timespec
  66. Ctim Timespec
  67. Btim Timespec
  68. Size int64
  69. Blocks int64
  70. Blksize int32
  71. Flags uint32
  72. Gen uint64
  73. Spare [10]uint64
  74. }
  75. type Statfs_t struct {
  76. Version uint32
  77. Type uint32
  78. Flags uint64
  79. Bsize uint64
  80. Iosize uint64
  81. Blocks uint64
  82. Bfree uint64
  83. Bavail int64
  84. Files uint64
  85. Ffree int64
  86. Syncwrites uint64
  87. Asyncwrites uint64
  88. Syncreads uint64
  89. Asyncreads uint64
  90. Spare [10]uint64
  91. Namemax uint32
  92. Owner uint32
  93. Fsid Fsid
  94. Charspare [80]int8
  95. Fstypename [16]byte
  96. Mntfromname [1024]byte
  97. Mntonname [1024]byte
  98. }
  99. type Flock_t struct {
  100. Start int64
  101. Len int64
  102. Pid int32
  103. Type int16
  104. Whence int16
  105. Sysid int32
  106. _ [4]byte
  107. }
  108. type Dirent struct {
  109. Fileno uint64
  110. Off int64
  111. Reclen uint16
  112. Type uint8
  113. Pad0 uint8
  114. Namlen uint16
  115. Pad1 uint16
  116. Name [256]int8
  117. }
  118. type Fsid struct {
  119. Val [2]int32
  120. }
  121. const (
  122. PathMax = 0x400
  123. )
  124. const (
  125. FADV_NORMAL = 0x0
  126. FADV_RANDOM = 0x1
  127. FADV_SEQUENTIAL = 0x2
  128. FADV_WILLNEED = 0x3
  129. FADV_DONTNEED = 0x4
  130. FADV_NOREUSE = 0x5
  131. )
  132. type RawSockaddrInet4 struct {
  133. Len uint8
  134. Family uint8
  135. Port uint16
  136. Addr [4]byte /* in_addr */
  137. Zero [8]int8
  138. }
  139. type RawSockaddrInet6 struct {
  140. Len uint8
  141. Family uint8
  142. Port uint16
  143. Flowinfo uint32
  144. Addr [16]byte /* in6_addr */
  145. Scope_id uint32
  146. }
  147. type RawSockaddrUnix struct {
  148. Len uint8
  149. Family uint8
  150. Path [104]int8
  151. }
  152. type RawSockaddrDatalink struct {
  153. Len uint8
  154. Family uint8
  155. Index uint16
  156. Type uint8
  157. Nlen uint8
  158. Alen uint8
  159. Slen uint8
  160. Data [46]int8
  161. }
  162. type RawSockaddr struct {
  163. Len uint8
  164. Family uint8
  165. Data [14]int8
  166. }
  167. type RawSockaddrAny struct {
  168. Addr RawSockaddr
  169. Pad [92]int8
  170. }
  171. type _Socklen uint32
  172. type Xucred struct {
  173. Version uint32
  174. Uid uint32
  175. Ngroups int16
  176. Groups [16]uint32
  177. _ *byte
  178. }
  179. type Linger struct {
  180. Onoff int32
  181. Linger int32
  182. }
  183. type Iovec struct {
  184. Base *byte
  185. Len uint64
  186. }
  187. type IPMreq struct {
  188. Multiaddr [4]byte /* in_addr */
  189. Interface [4]byte /* in_addr */
  190. }
  191. type IPMreqn struct {
  192. Multiaddr [4]byte /* in_addr */
  193. Address [4]byte /* in_addr */
  194. Ifindex int32
  195. }
  196. type IPv6Mreq struct {
  197. Multiaddr [16]byte /* in6_addr */
  198. Interface uint32
  199. }
  200. type Msghdr struct {
  201. Name *byte
  202. Namelen uint32
  203. Iov *Iovec
  204. Iovlen int32
  205. Control *byte
  206. Controllen uint32
  207. Flags int32
  208. }
  209. type Cmsghdr struct {
  210. Len uint32
  211. Level int32
  212. Type int32
  213. }
  214. type Inet6Pktinfo struct {
  215. Addr [16]byte /* in6_addr */
  216. Ifindex uint32
  217. }
  218. type IPv6MTUInfo struct {
  219. Addr RawSockaddrInet6
  220. Mtu uint32
  221. }
  222. type ICMPv6Filter struct {
  223. Filt [8]uint32
  224. }
  225. const (
  226. SizeofSockaddrInet4 = 0x10
  227. SizeofSockaddrInet6 = 0x1c
  228. SizeofSockaddrAny = 0x6c
  229. SizeofSockaddrUnix = 0x6a
  230. SizeofSockaddrDatalink = 0x36
  231. SizeofXucred = 0x58
  232. SizeofLinger = 0x8
  233. SizeofIovec = 0x10
  234. SizeofIPMreq = 0x8
  235. SizeofIPMreqn = 0xc
  236. SizeofIPv6Mreq = 0x14
  237. SizeofMsghdr = 0x30
  238. SizeofCmsghdr = 0xc
  239. SizeofInet6Pktinfo = 0x14
  240. SizeofIPv6MTUInfo = 0x20
  241. SizeofICMPv6Filter = 0x20
  242. )
  243. const (
  244. PTRACE_TRACEME = 0x0
  245. PTRACE_CONT = 0x7
  246. PTRACE_KILL = 0x8
  247. )
  248. type PtraceLwpInfoStruct struct {
  249. Lwpid int32
  250. Event int32
  251. Flags int32
  252. Sigmask Sigset_t
  253. Siglist Sigset_t
  254. Siginfo __PtraceSiginfo
  255. Tdname [20]int8
  256. Child_pid int32
  257. Syscall_code uint32
  258. Syscall_narg uint32
  259. }
  260. type __Siginfo struct {
  261. Signo int32
  262. Errno int32
  263. Code int32
  264. Pid int32
  265. Uid uint32
  266. Status int32
  267. Addr *byte
  268. Value [8]byte
  269. _ [40]byte
  270. }
  271. type __PtraceSiginfo struct {
  272. Signo int32
  273. Errno int32
  274. Code int32
  275. Pid int32
  276. Uid uint32
  277. Status int32
  278. Addr uintptr
  279. Value [8]byte
  280. _ [40]byte
  281. }
  282. type Sigset_t struct {
  283. Val [4]uint32
  284. }
  285. type Reg struct {
  286. Ra uint64
  287. Sp uint64
  288. Gp uint64
  289. Tp uint64
  290. T [7]uint64
  291. S [12]uint64
  292. A [8]uint64
  293. Sepc uint64
  294. Sstatus uint64
  295. }
  296. type FpReg struct {
  297. X [32][2]uint64
  298. Fcsr uint64
  299. }
  300. type FpExtendedPrecision struct{}
  301. type PtraceIoDesc struct {
  302. Op int32
  303. Offs uintptr
  304. Addr *byte
  305. Len uint64
  306. }
  307. type Kevent_t struct {
  308. Ident uint64
  309. Filter int16
  310. Flags uint16
  311. Fflags uint32
  312. Data int64
  313. Udata *byte
  314. Ext [4]uint64
  315. }
  316. type FdSet struct {
  317. Bits [16]uint64
  318. }
  319. const (
  320. sizeofIfMsghdr = 0xa8
  321. SizeofIfMsghdr = 0xa8
  322. sizeofIfData = 0x98
  323. SizeofIfData = 0x98
  324. SizeofIfaMsghdr = 0x14
  325. SizeofIfmaMsghdr = 0x10
  326. SizeofIfAnnounceMsghdr = 0x18
  327. SizeofRtMsghdr = 0x98
  328. SizeofRtMetrics = 0x70
  329. )
  330. type ifMsghdr struct {
  331. Msglen uint16
  332. Version uint8
  333. Type uint8
  334. Addrs int32
  335. Flags int32
  336. Index uint16
  337. _ uint16
  338. Data ifData
  339. }
  340. type IfMsghdr struct {
  341. Msglen uint16
  342. Version uint8
  343. Type uint8
  344. Addrs int32
  345. Flags int32
  346. Index uint16
  347. Data IfData
  348. }
  349. type ifData struct {
  350. Type uint8
  351. Physical uint8
  352. Addrlen uint8
  353. Hdrlen uint8
  354. Link_state uint8
  355. Vhid uint8
  356. Datalen uint16
  357. Mtu uint32
  358. Metric uint32
  359. Baudrate uint64
  360. Ipackets uint64
  361. Ierrors uint64
  362. Opackets uint64
  363. Oerrors uint64
  364. Collisions uint64
  365. Ibytes uint64
  366. Obytes uint64
  367. Imcasts uint64
  368. Omcasts uint64
  369. Iqdrops uint64
  370. Oqdrops uint64
  371. Noproto uint64
  372. Hwassist uint64
  373. _ [8]byte
  374. _ [16]byte
  375. }
  376. type IfData struct {
  377. Type uint8
  378. Physical uint8
  379. Addrlen uint8
  380. Hdrlen uint8
  381. Link_state uint8
  382. Spare_char1 uint8
  383. Spare_char2 uint8
  384. Datalen uint8
  385. Mtu uint64
  386. Metric uint64
  387. Baudrate uint64
  388. Ipackets uint64
  389. Ierrors uint64
  390. Opackets uint64
  391. Oerrors uint64
  392. Collisions uint64
  393. Ibytes uint64
  394. Obytes uint64
  395. Imcasts uint64
  396. Omcasts uint64
  397. Iqdrops uint64
  398. Noproto uint64
  399. Hwassist uint64
  400. Epoch int64
  401. Lastchange Timeval
  402. }
  403. type IfaMsghdr struct {
  404. Msglen uint16
  405. Version uint8
  406. Type uint8
  407. Addrs int32
  408. Flags int32
  409. Index uint16
  410. _ uint16
  411. Metric int32
  412. }
  413. type IfmaMsghdr struct {
  414. Msglen uint16
  415. Version uint8
  416. Type uint8
  417. Addrs int32
  418. Flags int32
  419. Index uint16
  420. _ uint16
  421. }
  422. type IfAnnounceMsghdr struct {
  423. Msglen uint16
  424. Version uint8
  425. Type uint8
  426. Index uint16
  427. Name [16]int8
  428. What uint16
  429. }
  430. type RtMsghdr struct {
  431. Msglen uint16
  432. Version uint8
  433. Type uint8
  434. Index uint16
  435. _ uint16
  436. Flags int32
  437. Addrs int32
  438. Pid int32
  439. Seq int32
  440. Errno int32
  441. Fmask int32
  442. Inits uint64
  443. Rmx RtMetrics
  444. }
  445. type RtMetrics struct {
  446. Locks uint64
  447. Mtu uint64
  448. Hopcount uint64
  449. Expire uint64
  450. Recvpipe uint64
  451. Sendpipe uint64
  452. Ssthresh uint64
  453. Rtt uint64
  454. Rttvar uint64
  455. Pksent uint64
  456. Weight uint64
  457. Nhidx uint64
  458. Filler [2]uint64
  459. }
  460. const (
  461. SizeofBpfVersion = 0x4
  462. SizeofBpfStat = 0x8
  463. SizeofBpfZbuf = 0x18
  464. SizeofBpfProgram = 0x10
  465. SizeofBpfInsn = 0x8
  466. SizeofBpfHdr = 0x20
  467. SizeofBpfZbufHeader = 0x20
  468. )
  469. type BpfVersion struct {
  470. Major uint16
  471. Minor uint16
  472. }
  473. type BpfStat struct {
  474. Recv uint32
  475. Drop uint32
  476. }
  477. type BpfZbuf struct {
  478. Bufa *byte
  479. Bufb *byte
  480. Buflen uint64
  481. }
  482. type BpfProgram struct {
  483. Len uint32
  484. Insns *BpfInsn
  485. }
  486. type BpfInsn struct {
  487. Code uint16
  488. Jt uint8
  489. Jf uint8
  490. K uint32
  491. }
  492. type BpfHdr struct {
  493. Tstamp Timeval
  494. Caplen uint32
  495. Datalen uint32
  496. Hdrlen uint16
  497. _ [6]byte
  498. }
  499. type BpfZbufHeader struct {
  500. Kernel_gen uint32
  501. Kernel_len uint32
  502. User_gen uint32
  503. _ [5]uint32
  504. }
  505. type Termios struct {
  506. Iflag uint32
  507. Oflag uint32
  508. Cflag uint32
  509. Lflag uint32
  510. Cc [20]uint8
  511. Ispeed uint32
  512. Ospeed uint32
  513. }
  514. type Winsize struct {
  515. Row uint16
  516. Col uint16
  517. Xpixel uint16
  518. Ypixel uint16
  519. }
  520. const (
  521. AT_FDCWD = -0x64
  522. AT_EACCESS = 0x100
  523. AT_SYMLINK_NOFOLLOW = 0x200
  524. AT_SYMLINK_FOLLOW = 0x400
  525. AT_REMOVEDIR = 0x800
  526. )
  527. type PollFd struct {
  528. Fd int32
  529. Events int16
  530. Revents int16
  531. }
  532. const (
  533. POLLERR = 0x8
  534. POLLHUP = 0x10
  535. POLLIN = 0x1
  536. POLLINIGNEOF = 0x2000
  537. POLLNVAL = 0x20
  538. POLLOUT = 0x4
  539. POLLPRI = 0x2
  540. POLLRDBAND = 0x80
  541. POLLRDNORM = 0x40
  542. POLLWRBAND = 0x100
  543. POLLWRNORM = 0x4
  544. )
  545. type CapRights struct {
  546. Rights [2]uint64
  547. }
  548. type Utsname struct {
  549. Sysname [256]byte
  550. Nodename [256]byte
  551. Release [256]byte
  552. Version [256]byte
  553. Machine [256]byte
  554. }
  555. const SizeofClockinfo = 0x14
  556. type Clockinfo struct {
  557. Hz int32
  558. Tick int32
  559. Spare int32
  560. Stathz int32
  561. Profhz int32
  562. }