ztypes_freebsd_amd64.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. // cgo -godefs types_freebsd.go | go run mkpost.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build amd64 && freebsd
  4. // +build amd64,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_GETFSBASE = 0x47
  299. PTRACE_GETLWPLIST = 0xf
  300. PTRACE_GETNUMLWPS = 0xe
  301. PTRACE_GETREGS = 0x21
  302. PTRACE_GETXSTATE = 0x45
  303. PTRACE_IO = 0xc
  304. PTRACE_KILL = 0x8
  305. PTRACE_LWPEVENTS = 0x18
  306. PTRACE_LWPINFO = 0xd
  307. PTRACE_SETFPREGS = 0x24
  308. PTRACE_SETREGS = 0x22
  309. PTRACE_SINGLESTEP = 0x9
  310. PTRACE_TRACEME = 0x0
  311. )
  312. const (
  313. PIOD_READ_D = 0x1
  314. PIOD_WRITE_D = 0x2
  315. PIOD_READ_I = 0x3
  316. PIOD_WRITE_I = 0x4
  317. )
  318. const (
  319. PL_FLAG_BORN = 0x100
  320. PL_FLAG_EXITED = 0x200
  321. PL_FLAG_SI = 0x20
  322. )
  323. const (
  324. TRAP_BRKPT = 0x1
  325. TRAP_TRACE = 0x2
  326. )
  327. type PtraceLwpInfoStruct struct {
  328. Lwpid int32
  329. Event int32
  330. Flags int32
  331. Sigmask Sigset_t
  332. Siglist Sigset_t
  333. Siginfo __Siginfo
  334. Tdname [20]int8
  335. Child_pid int32
  336. Syscall_code uint32
  337. Syscall_narg uint32
  338. }
  339. type __Siginfo struct {
  340. Signo int32
  341. Errno int32
  342. Code int32
  343. Pid int32
  344. Uid uint32
  345. Status int32
  346. Addr *byte
  347. Value [8]byte
  348. _ [40]byte
  349. }
  350. type Sigset_t struct {
  351. Val [4]uint32
  352. }
  353. type Reg struct {
  354. R15 int64
  355. R14 int64
  356. R13 int64
  357. R12 int64
  358. R11 int64
  359. R10 int64
  360. R9 int64
  361. R8 int64
  362. Rdi int64
  363. Rsi int64
  364. Rbp int64
  365. Rbx int64
  366. Rdx int64
  367. Rcx int64
  368. Rax int64
  369. Trapno uint32
  370. Fs uint16
  371. Gs uint16
  372. Err uint32
  373. Es uint16
  374. Ds uint16
  375. Rip int64
  376. Cs int64
  377. Rflags int64
  378. Rsp int64
  379. Ss int64
  380. }
  381. type FpReg struct {
  382. Env [4]uint64
  383. Acc [8][16]uint8
  384. Xacc [16][16]uint8
  385. Spare [12]uint64
  386. }
  387. type PtraceIoDesc struct {
  388. Op int32
  389. Offs *byte
  390. Addr *byte
  391. Len uint64
  392. }
  393. type Kevent_t struct {
  394. Ident uint64
  395. Filter int16
  396. Flags uint16
  397. Fflags uint32
  398. Data int64
  399. Udata *byte
  400. }
  401. type FdSet struct {
  402. Bits [16]uint64
  403. }
  404. const (
  405. sizeofIfMsghdr = 0xa8
  406. SizeofIfMsghdr = 0xa8
  407. sizeofIfData = 0x98
  408. SizeofIfData = 0x98
  409. SizeofIfaMsghdr = 0x14
  410. SizeofIfmaMsghdr = 0x10
  411. SizeofIfAnnounceMsghdr = 0x18
  412. SizeofRtMsghdr = 0x98
  413. SizeofRtMetrics = 0x70
  414. )
  415. type ifMsghdr struct {
  416. Msglen uint16
  417. Version uint8
  418. Type uint8
  419. Addrs int32
  420. Flags int32
  421. Index uint16
  422. _ uint16
  423. Data ifData
  424. }
  425. type IfMsghdr struct {
  426. Msglen uint16
  427. Version uint8
  428. Type uint8
  429. Addrs int32
  430. Flags int32
  431. Index uint16
  432. Data IfData
  433. }
  434. type ifData struct {
  435. Type uint8
  436. Physical uint8
  437. Addrlen uint8
  438. Hdrlen uint8
  439. Link_state uint8
  440. Vhid uint8
  441. Datalen uint16
  442. Mtu uint32
  443. Metric uint32
  444. Baudrate uint64
  445. Ipackets uint64
  446. Ierrors uint64
  447. Opackets uint64
  448. Oerrors uint64
  449. Collisions uint64
  450. Ibytes uint64
  451. Obytes uint64
  452. Imcasts uint64
  453. Omcasts uint64
  454. Iqdrops uint64
  455. Oqdrops uint64
  456. Noproto uint64
  457. Hwassist uint64
  458. _ [8]byte
  459. _ [16]byte
  460. }
  461. type IfData struct {
  462. Type uint8
  463. Physical uint8
  464. Addrlen uint8
  465. Hdrlen uint8
  466. Link_state uint8
  467. Spare_char1 uint8
  468. Spare_char2 uint8
  469. Datalen uint8
  470. Mtu uint64
  471. Metric uint64
  472. Baudrate uint64
  473. Ipackets uint64
  474. Ierrors uint64
  475. Opackets uint64
  476. Oerrors uint64
  477. Collisions uint64
  478. Ibytes uint64
  479. Obytes uint64
  480. Imcasts uint64
  481. Omcasts uint64
  482. Iqdrops uint64
  483. Noproto uint64
  484. Hwassist uint64
  485. Epoch int64
  486. Lastchange Timeval
  487. }
  488. type IfaMsghdr struct {
  489. Msglen uint16
  490. Version uint8
  491. Type uint8
  492. Addrs int32
  493. Flags int32
  494. Index uint16
  495. _ uint16
  496. Metric int32
  497. }
  498. type IfmaMsghdr struct {
  499. Msglen uint16
  500. Version uint8
  501. Type uint8
  502. Addrs int32
  503. Flags int32
  504. Index uint16
  505. _ uint16
  506. }
  507. type IfAnnounceMsghdr struct {
  508. Msglen uint16
  509. Version uint8
  510. Type uint8
  511. Index uint16
  512. Name [16]int8
  513. What uint16
  514. }
  515. type RtMsghdr struct {
  516. Msglen uint16
  517. Version uint8
  518. Type uint8
  519. Index uint16
  520. _ uint16
  521. Flags int32
  522. Addrs int32
  523. Pid int32
  524. Seq int32
  525. Errno int32
  526. Fmask int32
  527. Inits uint64
  528. Rmx RtMetrics
  529. }
  530. type RtMetrics struct {
  531. Locks uint64
  532. Mtu uint64
  533. Hopcount uint64
  534. Expire uint64
  535. Recvpipe uint64
  536. Sendpipe uint64
  537. Ssthresh uint64
  538. Rtt uint64
  539. Rttvar uint64
  540. Pksent uint64
  541. Weight uint64
  542. Filler [3]uint64
  543. }
  544. const (
  545. SizeofBpfVersion = 0x4
  546. SizeofBpfStat = 0x8
  547. SizeofBpfZbuf = 0x18
  548. SizeofBpfProgram = 0x10
  549. SizeofBpfInsn = 0x8
  550. SizeofBpfHdr = 0x20
  551. SizeofBpfZbufHeader = 0x20
  552. )
  553. type BpfVersion struct {
  554. Major uint16
  555. Minor uint16
  556. }
  557. type BpfStat struct {
  558. Recv uint32
  559. Drop uint32
  560. }
  561. type BpfZbuf struct {
  562. Bufa *byte
  563. Bufb *byte
  564. Buflen uint64
  565. }
  566. type BpfProgram struct {
  567. Len uint32
  568. Insns *BpfInsn
  569. }
  570. type BpfInsn struct {
  571. Code uint16
  572. Jt uint8
  573. Jf uint8
  574. K uint32
  575. }
  576. type BpfHdr struct {
  577. Tstamp Timeval
  578. Caplen uint32
  579. Datalen uint32
  580. Hdrlen uint16
  581. _ [6]byte
  582. }
  583. type BpfZbufHeader struct {
  584. Kernel_gen uint32
  585. Kernel_len uint32
  586. User_gen uint32
  587. _ [5]uint32
  588. }
  589. type Termios struct {
  590. Iflag uint32
  591. Oflag uint32
  592. Cflag uint32
  593. Lflag uint32
  594. Cc [20]uint8
  595. Ispeed uint32
  596. Ospeed uint32
  597. }
  598. type Winsize struct {
  599. Row uint16
  600. Col uint16
  601. Xpixel uint16
  602. Ypixel uint16
  603. }
  604. const (
  605. AT_FDCWD = -0x64
  606. AT_REMOVEDIR = 0x800
  607. AT_SYMLINK_FOLLOW = 0x400
  608. AT_SYMLINK_NOFOLLOW = 0x200
  609. )
  610. type PollFd struct {
  611. Fd int32
  612. Events int16
  613. Revents int16
  614. }
  615. const (
  616. POLLERR = 0x8
  617. POLLHUP = 0x10
  618. POLLIN = 0x1
  619. POLLINIGNEOF = 0x2000
  620. POLLNVAL = 0x20
  621. POLLOUT = 0x4
  622. POLLPRI = 0x2
  623. POLLRDBAND = 0x80
  624. POLLRDNORM = 0x40
  625. POLLWRBAND = 0x100
  626. POLLWRNORM = 0x4
  627. )
  628. type CapRights struct {
  629. Rights [2]uint64
  630. }
  631. type Utsname struct {
  632. Sysname [256]byte
  633. Nodename [256]byte
  634. Release [256]byte
  635. Version [256]byte
  636. Machine [256]byte
  637. }
  638. const SizeofClockinfo = 0x14
  639. type Clockinfo struct {
  640. Hz int32
  641. Tick int32
  642. Spare int32
  643. Stathz int32
  644. Profhz int32
  645. }