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.
 
 

639 lines
9.5 KiB

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