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_amd64.go 11KB

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