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 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  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. 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. R15 int64
  287. R14 int64
  288. R13 int64
  289. R12 int64
  290. R11 int64
  291. R10 int64
  292. R9 int64
  293. R8 int64
  294. Rdi int64
  295. Rsi int64
  296. Rbp int64
  297. Rbx int64
  298. Rdx int64
  299. Rcx int64
  300. Rax int64
  301. Trapno uint32
  302. Fs uint16
  303. Gs uint16
  304. Err uint32
  305. Es uint16
  306. Ds uint16
  307. Rip int64
  308. Cs int64
  309. Rflags int64
  310. Rsp int64
  311. Ss int64
  312. }
  313. type FpReg struct {
  314. Env [4]uint64
  315. Acc [8][16]uint8
  316. Xacc [16][16]uint8
  317. Spare [12]uint64
  318. }
  319. type FpExtendedPrecision struct{}
  320. type PtraceIoDesc struct {
  321. Op int32
  322. Offs uintptr
  323. Addr *byte
  324. Len uint64
  325. }
  326. type Kevent_t struct {
  327. Ident uint64
  328. Filter int16
  329. Flags uint16
  330. Fflags uint32
  331. Data int64
  332. Udata *byte
  333. Ext [4]uint64
  334. }
  335. type FdSet struct {
  336. Bits [16]uint64
  337. }
  338. const (
  339. sizeofIfMsghdr = 0xa8
  340. SizeofIfMsghdr = 0xa8
  341. sizeofIfData = 0x98
  342. SizeofIfData = 0x98
  343. SizeofIfaMsghdr = 0x14
  344. SizeofIfmaMsghdr = 0x10
  345. SizeofIfAnnounceMsghdr = 0x18
  346. SizeofRtMsghdr = 0x98
  347. SizeofRtMetrics = 0x70
  348. )
  349. type ifMsghdr struct {
  350. Msglen uint16
  351. Version uint8
  352. Type uint8
  353. Addrs int32
  354. Flags int32
  355. Index uint16
  356. _ uint16
  357. Data ifData
  358. }
  359. type IfMsghdr struct {
  360. Msglen uint16
  361. Version uint8
  362. Type uint8
  363. Addrs int32
  364. Flags int32
  365. Index uint16
  366. Data IfData
  367. }
  368. type ifData struct {
  369. Type uint8
  370. Physical uint8
  371. Addrlen uint8
  372. Hdrlen uint8
  373. Link_state uint8
  374. Vhid uint8
  375. Datalen uint16
  376. Mtu uint32
  377. Metric uint32
  378. Baudrate uint64
  379. Ipackets uint64
  380. Ierrors uint64
  381. Opackets uint64
  382. Oerrors uint64
  383. Collisions uint64
  384. Ibytes uint64
  385. Obytes uint64
  386. Imcasts uint64
  387. Omcasts uint64
  388. Iqdrops uint64
  389. Oqdrops uint64
  390. Noproto uint64
  391. Hwassist uint64
  392. _ [8]byte
  393. _ [16]byte
  394. }
  395. type IfData struct {
  396. Type uint8
  397. Physical uint8
  398. Addrlen uint8
  399. Hdrlen uint8
  400. Link_state uint8
  401. Spare_char1 uint8
  402. Spare_char2 uint8
  403. Datalen uint8
  404. Mtu uint64
  405. Metric uint64
  406. Baudrate uint64
  407. Ipackets uint64
  408. Ierrors uint64
  409. Opackets uint64
  410. Oerrors uint64
  411. Collisions uint64
  412. Ibytes uint64
  413. Obytes uint64
  414. Imcasts uint64
  415. Omcasts uint64
  416. Iqdrops uint64
  417. Noproto uint64
  418. Hwassist uint64
  419. Epoch int64
  420. Lastchange Timeval
  421. }
  422. type IfaMsghdr struct {
  423. Msglen uint16
  424. Version uint8
  425. Type uint8
  426. Addrs int32
  427. Flags int32
  428. Index uint16
  429. _ uint16
  430. Metric int32
  431. }
  432. type IfmaMsghdr struct {
  433. Msglen uint16
  434. Version uint8
  435. Type uint8
  436. Addrs int32
  437. Flags int32
  438. Index uint16
  439. _ uint16
  440. }
  441. type IfAnnounceMsghdr struct {
  442. Msglen uint16
  443. Version uint8
  444. Type uint8
  445. Index uint16
  446. Name [16]int8
  447. What uint16
  448. }
  449. type RtMsghdr struct {
  450. Msglen uint16
  451. Version uint8
  452. Type uint8
  453. Index uint16
  454. _ uint16
  455. Flags int32
  456. Addrs int32
  457. Pid int32
  458. Seq int32
  459. Errno int32
  460. Fmask int32
  461. Inits uint64
  462. Rmx RtMetrics
  463. }
  464. type RtMetrics struct {
  465. Locks uint64
  466. Mtu uint64
  467. Hopcount uint64
  468. Expire uint64
  469. Recvpipe uint64
  470. Sendpipe uint64
  471. Ssthresh uint64
  472. Rtt uint64
  473. Rttvar uint64
  474. Pksent uint64
  475. Weight uint64
  476. Filler [3]uint64
  477. }
  478. const (
  479. SizeofBpfVersion = 0x4
  480. SizeofBpfStat = 0x8
  481. SizeofBpfZbuf = 0x18
  482. SizeofBpfProgram = 0x10
  483. SizeofBpfInsn = 0x8
  484. SizeofBpfHdr = 0x20
  485. SizeofBpfZbufHeader = 0x20
  486. )
  487. type BpfVersion struct {
  488. Major uint16
  489. Minor uint16
  490. }
  491. type BpfStat struct {
  492. Recv uint32
  493. Drop uint32
  494. }
  495. type BpfZbuf struct {
  496. Bufa *byte
  497. Bufb *byte
  498. Buflen uint64
  499. }
  500. type BpfProgram struct {
  501. Len uint32
  502. Insns *BpfInsn
  503. }
  504. type BpfInsn struct {
  505. Code uint16
  506. Jt uint8
  507. Jf uint8
  508. K uint32
  509. }
  510. type BpfHdr struct {
  511. Tstamp Timeval
  512. Caplen uint32
  513. Datalen uint32
  514. Hdrlen uint16
  515. _ [6]byte
  516. }
  517. type BpfZbufHeader struct {
  518. Kernel_gen uint32
  519. Kernel_len uint32
  520. User_gen uint32
  521. _ [5]uint32
  522. }
  523. type Termios struct {
  524. Iflag uint32
  525. Oflag uint32
  526. Cflag uint32
  527. Lflag uint32
  528. Cc [20]uint8
  529. Ispeed uint32
  530. Ospeed uint32
  531. }
  532. type Winsize struct {
  533. Row uint16
  534. Col uint16
  535. Xpixel uint16
  536. Ypixel uint16
  537. }
  538. const (
  539. AT_FDCWD = -0x64
  540. AT_EACCESS = 0x100
  541. AT_SYMLINK_NOFOLLOW = 0x200
  542. AT_SYMLINK_FOLLOW = 0x400
  543. AT_REMOVEDIR = 0x800
  544. )
  545. type PollFd struct {
  546. Fd int32
  547. Events int16
  548. Revents int16
  549. }
  550. const (
  551. POLLERR = 0x8
  552. POLLHUP = 0x10
  553. POLLIN = 0x1
  554. POLLINIGNEOF = 0x2000
  555. POLLNVAL = 0x20
  556. POLLOUT = 0x4
  557. POLLPRI = 0x2
  558. POLLRDBAND = 0x80
  559. POLLRDNORM = 0x40
  560. POLLWRBAND = 0x100
  561. POLLWRNORM = 0x4
  562. )
  563. type CapRights struct {
  564. Rights [2]uint64
  565. }
  566. type Utsname struct {
  567. Sysname [256]byte
  568. Nodename [256]byte
  569. Release [256]byte
  570. Version [256]byte
  571. Machine [256]byte
  572. }
  573. const SizeofClockinfo = 0x14
  574. type Clockinfo struct {
  575. Hz int32
  576. Tick int32
  577. Spare int32
  578. Stathz int32
  579. Profhz int32
  580. }