Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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