ztypes_freebsd_arm64.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  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 arm64 && freebsd
  4. // +build arm64,freebsd
  5. package unix
  6. const (
  7. SizeofPtr = 0x8
  8. SizeofShort = 0x2
  9. SizeofInt = 0x4
  10. SizeofLong = 0x8
  11. SizeofLongLong = 0x8
  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 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 stat_freebsd11_t struct {
  76. Dev uint32
  77. Ino uint32
  78. Mode uint16
  79. Nlink uint16
  80. Uid uint32
  81. Gid uint32
  82. Rdev uint32
  83. Atim Timespec
  84. Mtim Timespec
  85. Ctim Timespec
  86. Size int64
  87. Blocks int64
  88. Blksize int32
  89. Flags uint32
  90. Gen uint32
  91. Lspare int32
  92. Btim Timespec
  93. }
  94. type Statfs_t struct {
  95. Version uint32
  96. Type uint32
  97. Flags uint64
  98. Bsize uint64
  99. Iosize uint64
  100. Blocks uint64
  101. Bfree uint64
  102. Bavail int64
  103. Files uint64
  104. Ffree int64
  105. Syncwrites uint64
  106. Asyncwrites uint64
  107. Syncreads uint64
  108. Asyncreads uint64
  109. Spare [10]uint64
  110. Namemax uint32
  111. Owner uint32
  112. Fsid Fsid
  113. Charspare [80]int8
  114. Fstypename [16]byte
  115. Mntfromname [1024]byte
  116. Mntonname [1024]byte
  117. }
  118. type statfs_freebsd11_t struct {
  119. Version uint32
  120. Type uint32
  121. Flags uint64
  122. Bsize uint64
  123. Iosize uint64
  124. Blocks uint64
  125. Bfree uint64
  126. Bavail int64
  127. Files uint64
  128. Ffree int64
  129. Syncwrites uint64
  130. Asyncwrites uint64
  131. Syncreads uint64
  132. Asyncreads uint64
  133. Spare [10]uint64
  134. Namemax uint32
  135. Owner uint32
  136. Fsid Fsid
  137. Charspare [80]int8
  138. Fstypename [16]byte
  139. Mntfromname [88]byte
  140. Mntonname [88]byte
  141. }
  142. type Flock_t struct {
  143. Start int64
  144. Len int64
  145. Pid int32
  146. Type int16
  147. Whence int16
  148. Sysid int32
  149. _ [4]byte
  150. }
  151. type Dirent struct {
  152. Fileno uint64
  153. Off int64
  154. Reclen uint16
  155. Type uint8
  156. Pad0 uint8
  157. Namlen uint16
  158. Pad1 uint16
  159. Name [256]int8
  160. }
  161. type dirent_freebsd11 struct {
  162. Fileno uint32
  163. Reclen uint16
  164. Type uint8
  165. Namlen uint8
  166. Name [256]int8
  167. }
  168. type Fsid struct {
  169. Val [2]int32
  170. }
  171. const (
  172. PathMax = 0x400
  173. )
  174. const (
  175. FADV_NORMAL = 0x0
  176. FADV_RANDOM = 0x1
  177. FADV_SEQUENTIAL = 0x2
  178. FADV_WILLNEED = 0x3
  179. FADV_DONTNEED = 0x4
  180. FADV_NOREUSE = 0x5
  181. )
  182. type RawSockaddrInet4 struct {
  183. Len uint8
  184. Family uint8
  185. Port uint16
  186. Addr [4]byte /* in_addr */
  187. Zero [8]int8
  188. }
  189. type RawSockaddrInet6 struct {
  190. Len uint8
  191. Family uint8
  192. Port uint16
  193. Flowinfo uint32
  194. Addr [16]byte /* in6_addr */
  195. Scope_id uint32
  196. }
  197. type RawSockaddrUnix struct {
  198. Len uint8
  199. Family uint8
  200. Path [104]int8
  201. }
  202. type RawSockaddrDatalink struct {
  203. Len uint8
  204. Family uint8
  205. Index uint16
  206. Type uint8
  207. Nlen uint8
  208. Alen uint8
  209. Slen uint8
  210. Data [46]int8
  211. }
  212. type RawSockaddr struct {
  213. Len uint8
  214. Family uint8
  215. Data [14]int8
  216. }
  217. type RawSockaddrAny struct {
  218. Addr RawSockaddr
  219. Pad [92]int8
  220. }
  221. type _Socklen uint32
  222. type Xucred struct {
  223. Version uint32
  224. Uid uint32
  225. Ngroups int16
  226. Groups [16]uint32
  227. _ *byte
  228. }
  229. type Linger struct {
  230. Onoff int32
  231. Linger int32
  232. }
  233. type Iovec struct {
  234. Base *byte
  235. Len uint64
  236. }
  237. type IPMreq struct {
  238. Multiaddr [4]byte /* in_addr */
  239. Interface [4]byte /* in_addr */
  240. }
  241. type IPMreqn struct {
  242. Multiaddr [4]byte /* in_addr */
  243. Address [4]byte /* in_addr */
  244. Ifindex int32
  245. }
  246. type IPv6Mreq struct {
  247. Multiaddr [16]byte /* in6_addr */
  248. Interface uint32
  249. }
  250. type Msghdr struct {
  251. Name *byte
  252. Namelen uint32
  253. Iov *Iovec
  254. Iovlen int32
  255. Control *byte
  256. Controllen uint32
  257. Flags int32
  258. }
  259. type Cmsghdr struct {
  260. Len uint32
  261. Level int32
  262. Type int32
  263. }
  264. type Inet6Pktinfo struct {
  265. Addr [16]byte /* in6_addr */
  266. Ifindex uint32
  267. }
  268. type IPv6MTUInfo struct {
  269. Addr RawSockaddrInet6
  270. Mtu uint32
  271. }
  272. type ICMPv6Filter struct {
  273. Filt [8]uint32
  274. }
  275. const (
  276. SizeofSockaddrInet4 = 0x10
  277. SizeofSockaddrInet6 = 0x1c
  278. SizeofSockaddrAny = 0x6c
  279. SizeofSockaddrUnix = 0x6a
  280. SizeofSockaddrDatalink = 0x36
  281. SizeofXucred = 0x58
  282. SizeofLinger = 0x8
  283. SizeofIovec = 0x10
  284. SizeofIPMreq = 0x8
  285. SizeofIPMreqn = 0xc
  286. SizeofIPv6Mreq = 0x14
  287. SizeofMsghdr = 0x30
  288. SizeofCmsghdr = 0xc
  289. SizeofInet6Pktinfo = 0x14
  290. SizeofIPv6MTUInfo = 0x20
  291. SizeofICMPv6Filter = 0x20
  292. )
  293. const (
  294. PTRACE_ATTACH = 0xa
  295. PTRACE_CONT = 0x7
  296. PTRACE_DETACH = 0xb
  297. PTRACE_GETFPREGS = 0x23
  298. PTRACE_GETLWPLIST = 0xf
  299. PTRACE_GETNUMLWPS = 0xe
  300. PTRACE_GETREGS = 0x21
  301. PTRACE_IO = 0xc
  302. PTRACE_KILL = 0x8
  303. PTRACE_LWPEVENTS = 0x18
  304. PTRACE_LWPINFO = 0xd
  305. PTRACE_SETFPREGS = 0x24
  306. PTRACE_SETREGS = 0x22
  307. PTRACE_SINGLESTEP = 0x9
  308. PTRACE_TRACEME = 0x0
  309. )
  310. const (
  311. PIOD_READ_D = 0x1
  312. PIOD_WRITE_D = 0x2
  313. PIOD_READ_I = 0x3
  314. PIOD_WRITE_I = 0x4
  315. )
  316. const (
  317. PL_FLAG_BORN = 0x100
  318. PL_FLAG_EXITED = 0x200
  319. PL_FLAG_SI = 0x20
  320. )
  321. const (
  322. TRAP_BRKPT = 0x1
  323. TRAP_TRACE = 0x2
  324. )
  325. type PtraceLwpInfoStruct struct {
  326. Lwpid int32
  327. Event int32
  328. Flags int32
  329. Sigmask Sigset_t
  330. Siglist Sigset_t
  331. Siginfo __Siginfo
  332. Tdname [20]int8
  333. Child_pid int32
  334. Syscall_code uint32
  335. Syscall_narg uint32
  336. }
  337. type __Siginfo struct {
  338. Signo int32
  339. Errno int32
  340. Code int32
  341. Pid int32
  342. Uid uint32
  343. Status int32
  344. Addr *byte
  345. Value [8]byte
  346. _ [40]byte
  347. }
  348. type Sigset_t struct {
  349. Val [4]uint32
  350. }
  351. type Reg struct {
  352. X [30]uint64
  353. Lr uint64
  354. Sp uint64
  355. Elr uint64
  356. Spsr uint32
  357. _ [4]byte
  358. }
  359. type FpReg struct {
  360. Q [32][16]uint8
  361. Sr uint32
  362. Cr uint32
  363. _ [8]byte
  364. }
  365. type PtraceIoDesc struct {
  366. Op int32
  367. Offs *byte
  368. Addr *byte
  369. Len uint64
  370. }
  371. type Kevent_t struct {
  372. Ident uint64
  373. Filter int16
  374. Flags uint16
  375. Fflags uint32
  376. Data int64
  377. Udata *byte
  378. }
  379. type FdSet struct {
  380. Bits [16]uint64
  381. }
  382. const (
  383. sizeofIfMsghdr = 0xa8
  384. SizeofIfMsghdr = 0xa8
  385. sizeofIfData = 0x98
  386. SizeofIfData = 0x98
  387. SizeofIfaMsghdr = 0x14
  388. SizeofIfmaMsghdr = 0x10
  389. SizeofIfAnnounceMsghdr = 0x18
  390. SizeofRtMsghdr = 0x98
  391. SizeofRtMetrics = 0x70
  392. )
  393. type ifMsghdr struct {
  394. Msglen uint16
  395. Version uint8
  396. Type uint8
  397. Addrs int32
  398. Flags int32
  399. Index uint16
  400. _ uint16
  401. Data ifData
  402. }
  403. type IfMsghdr struct {
  404. Msglen uint16
  405. Version uint8
  406. Type uint8
  407. Addrs int32
  408. Flags int32
  409. Index uint16
  410. Data IfData
  411. }
  412. type ifData struct {
  413. Type uint8
  414. Physical uint8
  415. Addrlen uint8
  416. Hdrlen uint8
  417. Link_state uint8
  418. Vhid uint8
  419. Datalen uint16
  420. Mtu uint32
  421. Metric uint32
  422. Baudrate uint64
  423. Ipackets uint64
  424. Ierrors uint64
  425. Opackets uint64
  426. Oerrors uint64
  427. Collisions uint64
  428. Ibytes uint64
  429. Obytes uint64
  430. Imcasts uint64
  431. Omcasts uint64
  432. Iqdrops uint64
  433. Oqdrops uint64
  434. Noproto uint64
  435. Hwassist uint64
  436. _ [8]byte
  437. _ [16]byte
  438. }
  439. type IfData struct {
  440. Type uint8
  441. Physical uint8
  442. Addrlen uint8
  443. Hdrlen uint8
  444. Link_state uint8
  445. Spare_char1 uint8
  446. Spare_char2 uint8
  447. Datalen uint8
  448. Mtu uint64
  449. Metric uint64
  450. Baudrate uint64
  451. Ipackets uint64
  452. Ierrors uint64
  453. Opackets uint64
  454. Oerrors uint64
  455. Collisions uint64
  456. Ibytes uint64
  457. Obytes uint64
  458. Imcasts uint64
  459. Omcasts uint64
  460. Iqdrops uint64
  461. Noproto uint64
  462. Hwassist uint64
  463. Epoch int64
  464. Lastchange Timeval
  465. }
  466. type IfaMsghdr struct {
  467. Msglen uint16
  468. Version uint8
  469. Type uint8
  470. Addrs int32
  471. Flags int32
  472. Index uint16
  473. _ uint16
  474. Metric int32
  475. }
  476. type IfmaMsghdr struct {
  477. Msglen uint16
  478. Version uint8
  479. Type uint8
  480. Addrs int32
  481. Flags int32
  482. Index uint16
  483. _ uint16
  484. }
  485. type IfAnnounceMsghdr struct {
  486. Msglen uint16
  487. Version uint8
  488. Type uint8
  489. Index uint16
  490. Name [16]int8
  491. What uint16
  492. }
  493. type RtMsghdr struct {
  494. Msglen uint16
  495. Version uint8
  496. Type uint8
  497. Index uint16
  498. _ uint16
  499. Flags int32
  500. Addrs int32
  501. Pid int32
  502. Seq int32
  503. Errno int32
  504. Fmask int32
  505. Inits uint64
  506. Rmx RtMetrics
  507. }
  508. type RtMetrics struct {
  509. Locks uint64
  510. Mtu uint64
  511. Hopcount uint64
  512. Expire uint64
  513. Recvpipe uint64
  514. Sendpipe uint64
  515. Ssthresh uint64
  516. Rtt uint64
  517. Rttvar uint64
  518. Pksent uint64
  519. Weight uint64
  520. Filler [3]uint64
  521. }
  522. const (
  523. SizeofBpfVersion = 0x4
  524. SizeofBpfStat = 0x8
  525. SizeofBpfZbuf = 0x18
  526. SizeofBpfProgram = 0x10
  527. SizeofBpfInsn = 0x8
  528. SizeofBpfHdr = 0x20
  529. SizeofBpfZbufHeader = 0x20
  530. )
  531. type BpfVersion struct {
  532. Major uint16
  533. Minor uint16
  534. }
  535. type BpfStat struct {
  536. Recv uint32
  537. Drop uint32
  538. }
  539. type BpfZbuf struct {
  540. Bufa *byte
  541. Bufb *byte
  542. Buflen uint64
  543. }
  544. type BpfProgram struct {
  545. Len uint32
  546. Insns *BpfInsn
  547. }
  548. type BpfInsn struct {
  549. Code uint16
  550. Jt uint8
  551. Jf uint8
  552. K uint32
  553. }
  554. type BpfHdr struct {
  555. Tstamp Timeval
  556. Caplen uint32
  557. Datalen uint32
  558. Hdrlen uint16
  559. _ [6]byte
  560. }
  561. type BpfZbufHeader struct {
  562. Kernel_gen uint32
  563. Kernel_len uint32
  564. User_gen uint32
  565. _ [5]uint32
  566. }
  567. type Termios struct {
  568. Iflag uint32
  569. Oflag uint32
  570. Cflag uint32
  571. Lflag uint32
  572. Cc [20]uint8
  573. Ispeed uint32
  574. Ospeed uint32
  575. }
  576. type Winsize struct {
  577. Row uint16
  578. Col uint16
  579. Xpixel uint16
  580. Ypixel uint16
  581. }
  582. const (
  583. AT_FDCWD = -0x64
  584. AT_REMOVEDIR = 0x800
  585. AT_SYMLINK_FOLLOW = 0x400
  586. AT_SYMLINK_NOFOLLOW = 0x200
  587. )
  588. type PollFd struct {
  589. Fd int32
  590. Events int16
  591. Revents int16
  592. }
  593. const (
  594. POLLERR = 0x8
  595. POLLHUP = 0x10
  596. POLLIN = 0x1
  597. POLLINIGNEOF = 0x2000
  598. POLLNVAL = 0x20
  599. POLLOUT = 0x4
  600. POLLPRI = 0x2
  601. POLLRDBAND = 0x80
  602. POLLRDNORM = 0x40
  603. POLLWRBAND = 0x100
  604. POLLWRNORM = 0x4
  605. )
  606. type CapRights struct {
  607. Rights [2]uint64
  608. }
  609. type Utsname struct {
  610. Sysname [256]byte
  611. Nodename [256]byte
  612. Release [256]byte
  613. Version [256]byte
  614. Machine [256]byte
  615. }
  616. const SizeofClockinfo = 0x14
  617. type Clockinfo struct {
  618. Hz int32
  619. Tick int32
  620. Spare int32
  621. Stathz int32
  622. Profhz int32
  623. }