本站源代码
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.

685 lines
10KB

  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 arm64,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]int8
  114. Mntfromname [1024]int8
  115. Mntonname [1024]int8
  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]int8
  138. Mntfromname [88]int8
  139. Mntonname [88]int8
  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. _ [4]byte
  246. Iov *Iovec
  247. Iovlen int32
  248. _ [4]byte
  249. Control *byte
  250. Controllen uint32
  251. Flags int32
  252. }
  253. type Cmsghdr struct {
  254. Len uint32
  255. Level int32
  256. Type int32
  257. }
  258. type Inet6Pktinfo struct {
  259. Addr [16]byte /* in6_addr */
  260. Ifindex uint32
  261. }
  262. type IPv6MTUInfo struct {
  263. Addr RawSockaddrInet6
  264. Mtu uint32
  265. }
  266. type ICMPv6Filter struct {
  267. Filt [8]uint32
  268. }
  269. const (
  270. SizeofSockaddrInet4 = 0x10
  271. SizeofSockaddrInet6 = 0x1c
  272. SizeofSockaddrAny = 0x6c
  273. SizeofSockaddrUnix = 0x6a
  274. SizeofSockaddrDatalink = 0x36
  275. SizeofLinger = 0x8
  276. SizeofIPMreq = 0x8
  277. SizeofIPMreqn = 0xc
  278. SizeofIPv6Mreq = 0x14
  279. SizeofMsghdr = 0x30
  280. SizeofCmsghdr = 0xc
  281. SizeofInet6Pktinfo = 0x14
  282. SizeofIPv6MTUInfo = 0x20
  283. SizeofICMPv6Filter = 0x20
  284. )
  285. const (
  286. PTRACE_ATTACH = 0xa
  287. PTRACE_CONT = 0x7
  288. PTRACE_DETACH = 0xb
  289. PTRACE_GETFPREGS = 0x23
  290. PTRACE_GETFSBASE = 0x47
  291. PTRACE_GETLWPLIST = 0xf
  292. PTRACE_GETNUMLWPS = 0xe
  293. PTRACE_GETREGS = 0x21
  294. PTRACE_GETXSTATE = 0x45
  295. PTRACE_IO = 0xc
  296. PTRACE_KILL = 0x8
  297. PTRACE_LWPEVENTS = 0x18
  298. PTRACE_LWPINFO = 0xd
  299. PTRACE_SETFPREGS = 0x24
  300. PTRACE_SETREGS = 0x22
  301. PTRACE_SINGLESTEP = 0x9
  302. PTRACE_TRACEME = 0x0
  303. )
  304. const (
  305. PIOD_READ_D = 0x1
  306. PIOD_WRITE_D = 0x2
  307. PIOD_READ_I = 0x3
  308. PIOD_WRITE_I = 0x4
  309. )
  310. const (
  311. PL_FLAG_BORN = 0x100
  312. PL_FLAG_EXITED = 0x200
  313. PL_FLAG_SI = 0x20
  314. )
  315. const (
  316. TRAP_BRKPT = 0x1
  317. TRAP_TRACE = 0x2
  318. )
  319. type PtraceLwpInfoStruct struct {
  320. Lwpid int32
  321. Event int32
  322. Flags int32
  323. Sigmask Sigset_t
  324. Siglist Sigset_t
  325. Siginfo __Siginfo
  326. Tdname [20]int8
  327. Child_pid int32
  328. Syscall_code uint32
  329. Syscall_narg uint32
  330. }
  331. type __Siginfo struct {
  332. Signo int32
  333. Errno int32
  334. Code int32
  335. Pid int32
  336. Uid uint32
  337. Status int32
  338. Addr *byte
  339. Value [8]byte
  340. X_reason [40]byte
  341. }
  342. type Sigset_t struct {
  343. Val [4]uint32
  344. }
  345. type Reg struct {
  346. X [30]uint64
  347. Lr uint64
  348. Sp uint64
  349. Elr uint64
  350. Spsr uint32
  351. }
  352. type FpReg struct {
  353. Fp_q [32]uint128
  354. Fp_sr uint32
  355. Fp_cr uint32
  356. }
  357. type PtraceIoDesc struct {
  358. Op int32
  359. Offs *byte
  360. Addr *byte
  361. Len uint
  362. }
  363. type Kevent_t struct {
  364. Ident uint64
  365. Filter int16
  366. Flags uint16
  367. Fflags uint32
  368. Data int64
  369. Udata *byte
  370. }
  371. type FdSet struct {
  372. Bits [16]uint64
  373. }
  374. const (
  375. sizeofIfMsghdr = 0xa8
  376. SizeofIfMsghdr = 0xa8
  377. sizeofIfData = 0x98
  378. SizeofIfData = 0x98
  379. SizeofIfaMsghdr = 0x14
  380. SizeofIfmaMsghdr = 0x10
  381. SizeofIfAnnounceMsghdr = 0x18
  382. SizeofRtMsghdr = 0x98
  383. SizeofRtMetrics = 0x70
  384. )
  385. type ifMsghdr struct {
  386. Msglen uint16
  387. Version uint8
  388. Type uint8
  389. Addrs int32
  390. Flags int32
  391. Index uint16
  392. _ [2]byte
  393. Data ifData
  394. }
  395. type IfMsghdr struct {
  396. Msglen uint16
  397. Version uint8
  398. Type uint8
  399. Addrs int32
  400. Flags int32
  401. Index uint16
  402. _ [2]byte
  403. Data IfData
  404. }
  405. type ifData struct {
  406. Type uint8
  407. Physical uint8
  408. Addrlen uint8
  409. Hdrlen uint8
  410. Link_state uint8
  411. Vhid uint8
  412. Datalen uint16
  413. Mtu uint32
  414. Metric uint32
  415. Baudrate uint64
  416. Ipackets uint64
  417. Ierrors uint64
  418. Opackets uint64
  419. Oerrors uint64
  420. Collisions uint64
  421. Ibytes uint64
  422. Obytes uint64
  423. Imcasts uint64
  424. Omcasts uint64
  425. Iqdrops uint64
  426. Oqdrops uint64
  427. Noproto uint64
  428. Hwassist uint64
  429. _ [8]byte
  430. _ [16]byte
  431. }
  432. type IfData struct {
  433. Type uint8
  434. Physical uint8
  435. Addrlen uint8
  436. Hdrlen uint8
  437. Link_state uint8
  438. Spare_char1 uint8
  439. Spare_char2 uint8
  440. Datalen uint8
  441. Mtu uint64
  442. Metric uint64
  443. Baudrate uint64
  444. Ipackets uint64
  445. Ierrors uint64
  446. Opackets uint64
  447. Oerrors uint64
  448. Collisions uint64
  449. Ibytes uint64
  450. Obytes uint64
  451. Imcasts uint64
  452. Omcasts uint64
  453. Iqdrops uint64
  454. Noproto uint64
  455. Hwassist uint64
  456. Epoch int64
  457. Lastchange Timeval
  458. }
  459. type IfaMsghdr struct {
  460. Msglen uint16
  461. Version uint8
  462. Type uint8
  463. Addrs int32
  464. Flags int32
  465. Index uint16
  466. _ [2]byte
  467. Metric int32
  468. }
  469. type IfmaMsghdr struct {
  470. Msglen uint16
  471. Version uint8
  472. Type uint8
  473. Addrs int32
  474. Flags int32
  475. Index uint16
  476. _ [2]byte
  477. }
  478. type IfAnnounceMsghdr struct {
  479. Msglen uint16
  480. Version uint8
  481. Type uint8
  482. Index uint16
  483. Name [16]int8
  484. What uint16
  485. }
  486. type RtMsghdr struct {
  487. Msglen uint16
  488. Version uint8
  489. Type uint8
  490. Index uint16
  491. _ [2]byte
  492. Flags int32
  493. Addrs int32
  494. Pid int32
  495. Seq int32
  496. Errno int32
  497. Fmask int32
  498. Inits uint64
  499. Rmx RtMetrics
  500. }
  501. type RtMetrics struct {
  502. Locks uint64
  503. Mtu uint64
  504. Hopcount uint64
  505. Expire uint64
  506. Recvpipe uint64
  507. Sendpipe uint64
  508. Ssthresh uint64
  509. Rtt uint64
  510. Rttvar uint64
  511. Pksent uint64
  512. Weight uint64
  513. Filler [3]uint64
  514. }
  515. const (
  516. SizeofBpfVersion = 0x4
  517. SizeofBpfStat = 0x8
  518. SizeofBpfZbuf = 0x18
  519. SizeofBpfProgram = 0x10
  520. SizeofBpfInsn = 0x8
  521. SizeofBpfHdr = 0x20
  522. SizeofBpfZbufHeader = 0x20
  523. )
  524. type BpfVersion struct {
  525. Major uint16
  526. Minor uint16
  527. }
  528. type BpfStat struct {
  529. Recv uint32
  530. Drop uint32
  531. }
  532. type BpfZbuf struct {
  533. Bufa *byte
  534. Bufb *byte
  535. Buflen uint64
  536. }
  537. type BpfProgram struct {
  538. Len uint32
  539. _ [4]byte
  540. Insns *BpfInsn
  541. }
  542. type BpfInsn struct {
  543. Code uint16
  544. Jt uint8
  545. Jf uint8
  546. K uint32
  547. }
  548. type BpfHdr struct {
  549. Tstamp Timeval
  550. Caplen uint32
  551. Datalen uint32
  552. Hdrlen uint16
  553. _ [6]byte
  554. }
  555. type BpfZbufHeader struct {
  556. Kernel_gen uint32
  557. Kernel_len uint32
  558. User_gen uint32
  559. _ [5]uint32
  560. }
  561. type Termios struct {
  562. Iflag uint32
  563. Oflag uint32
  564. Cflag uint32
  565. Lflag uint32
  566. Cc [20]uint8
  567. Ispeed uint32
  568. Ospeed uint32
  569. }
  570. type Winsize struct {
  571. Row uint16
  572. Col uint16
  573. Xpixel uint16
  574. Ypixel uint16
  575. }
  576. const (
  577. AT_FDCWD = -0x64
  578. AT_REMOVEDIR = 0x800
  579. AT_SYMLINK_FOLLOW = 0x400
  580. AT_SYMLINK_NOFOLLOW = 0x200
  581. )
  582. type PollFd struct {
  583. Fd int32
  584. Events int16
  585. Revents int16
  586. }
  587. const (
  588. POLLERR = 0x8
  589. POLLHUP = 0x10
  590. POLLIN = 0x1
  591. POLLINIGNEOF = 0x2000
  592. POLLNVAL = 0x20
  593. POLLOUT = 0x4
  594. POLLPRI = 0x2
  595. POLLRDBAND = 0x80
  596. POLLRDNORM = 0x40
  597. POLLWRBAND = 0x100
  598. POLLWRNORM = 0x4
  599. )
  600. type CapRights struct {
  601. Rights [2]uint64
  602. }
  603. type Utsname struct {
  604. Sysname [256]byte
  605. Nodename [256]byte
  606. Release [256]byte
  607. Version [256]byte
  608. Machine [256]byte
  609. }
上海开阖软件有限公司 沪ICP备12045867号-1