ztypes_freebsd_386.go 11 KB

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