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

707 lines
11KB

  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]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. _ [40]byte
  341. }
  342. type Sigset_t struct {
  343. Val [4]uint32
  344. }
  345. type Reg struct {
  346. R15 int64
  347. R14 int64
  348. R13 int64
  349. R12 int64
  350. R11 int64
  351. R10 int64
  352. R9 int64
  353. R8 int64
  354. Rdi int64
  355. Rsi int64
  356. Rbp int64
  357. Rbx int64
  358. Rdx int64
  359. Rcx int64
  360. Rax int64
  361. Trapno uint32
  362. Fs uint16
  363. Gs uint16
  364. Err uint32
  365. Es uint16
  366. Ds uint16
  367. Rip int64
  368. Cs int64
  369. Rflags int64
  370. Rsp int64
  371. Ss int64
  372. }
  373. type FpReg struct {
  374. Env [4]uint64
  375. Acc [8][16]uint8
  376. Xacc [16][16]uint8
  377. Spare [12]uint64
  378. }
  379. type PtraceIoDesc struct {
  380. Op int32
  381. Offs *byte
  382. Addr *byte
  383. Len uint
  384. }
  385. type Kevent_t struct {
  386. Ident uint64
  387. Filter int16
  388. Flags uint16
  389. Fflags uint32
  390. Data int64
  391. Udata *byte
  392. }
  393. type FdSet struct {
  394. Bits [16]uint64
  395. }
  396. const (
  397. sizeofIfMsghdr = 0xa8
  398. SizeofIfMsghdr = 0xa8
  399. sizeofIfData = 0x98
  400. SizeofIfData = 0x98
  401. SizeofIfaMsghdr = 0x14
  402. SizeofIfmaMsghdr = 0x10
  403. SizeofIfAnnounceMsghdr = 0x18
  404. SizeofRtMsghdr = 0x98
  405. SizeofRtMetrics = 0x70
  406. )
  407. type ifMsghdr struct {
  408. Msglen uint16
  409. Version uint8
  410. Type uint8
  411. Addrs int32
  412. Flags int32
  413. Index uint16
  414. _ [2]byte
  415. Data ifData
  416. }
  417. type IfMsghdr struct {
  418. Msglen uint16
  419. Version uint8
  420. Type uint8
  421. Addrs int32
  422. Flags int32
  423. Index uint16
  424. _ [2]byte
  425. Data IfData
  426. }
  427. type ifData struct {
  428. Type uint8
  429. Physical uint8
  430. Addrlen uint8
  431. Hdrlen uint8
  432. Link_state uint8
  433. Vhid uint8
  434. Datalen uint16
  435. Mtu uint32
  436. Metric uint32
  437. Baudrate uint64
  438. Ipackets uint64
  439. Ierrors uint64
  440. Opackets uint64
  441. Oerrors uint64
  442. Collisions uint64
  443. Ibytes uint64
  444. Obytes uint64
  445. Imcasts uint64
  446. Omcasts uint64
  447. Iqdrops uint64
  448. Oqdrops uint64
  449. Noproto uint64
  450. Hwassist uint64
  451. _ [8]byte
  452. _ [16]byte
  453. }
  454. type IfData struct {
  455. Type uint8
  456. Physical uint8
  457. Addrlen uint8
  458. Hdrlen uint8
  459. Link_state uint8
  460. Spare_char1 uint8
  461. Spare_char2 uint8
  462. Datalen uint8
  463. Mtu uint64
  464. Metric uint64
  465. Baudrate uint64
  466. Ipackets uint64
  467. Ierrors uint64
  468. Opackets uint64
  469. Oerrors uint64
  470. Collisions uint64
  471. Ibytes uint64
  472. Obytes uint64
  473. Imcasts uint64
  474. Omcasts uint64
  475. Iqdrops uint64
  476. Noproto uint64
  477. Hwassist uint64
  478. Epoch int64
  479. Lastchange Timeval
  480. }
  481. type IfaMsghdr struct {
  482. Msglen uint16
  483. Version uint8
  484. Type uint8
  485. Addrs int32
  486. Flags int32
  487. Index uint16
  488. _ [2]byte
  489. Metric int32
  490. }
  491. type IfmaMsghdr struct {
  492. Msglen uint16
  493. Version uint8
  494. Type uint8
  495. Addrs int32
  496. Flags int32
  497. Index uint16
  498. _ [2]byte
  499. }
  500. type IfAnnounceMsghdr struct {
  501. Msglen uint16
  502. Version uint8
  503. Type uint8
  504. Index uint16
  505. Name [16]int8
  506. What uint16
  507. }
  508. type RtMsghdr struct {
  509. Msglen uint16
  510. Version uint8
  511. Type uint8
  512. Index uint16
  513. _ [2]byte
  514. Flags int32
  515. Addrs int32
  516. Pid int32
  517. Seq int32
  518. Errno int32
  519. Fmask int32
  520. Inits uint64
  521. Rmx RtMetrics
  522. }
  523. type RtMetrics struct {
  524. Locks uint64
  525. Mtu uint64
  526. Hopcount uint64
  527. Expire uint64
  528. Recvpipe uint64
  529. Sendpipe uint64
  530. Ssthresh uint64
  531. Rtt uint64
  532. Rttvar uint64
  533. Pksent uint64
  534. Weight uint64
  535. Filler [3]uint64
  536. }
  537. const (
  538. SizeofBpfVersion = 0x4
  539. SizeofBpfStat = 0x8
  540. SizeofBpfZbuf = 0x18
  541. SizeofBpfProgram = 0x10
  542. SizeofBpfInsn = 0x8
  543. SizeofBpfHdr = 0x20
  544. SizeofBpfZbufHeader = 0x20
  545. )
  546. type BpfVersion struct {
  547. Major uint16
  548. Minor uint16
  549. }
  550. type BpfStat struct {
  551. Recv uint32
  552. Drop uint32
  553. }
  554. type BpfZbuf struct {
  555. Bufa *byte
  556. Bufb *byte
  557. Buflen uint64
  558. }
  559. type BpfProgram struct {
  560. Len uint32
  561. _ [4]byte
  562. Insns *BpfInsn
  563. }
  564. type BpfInsn struct {
  565. Code uint16
  566. Jt uint8
  567. Jf uint8
  568. K uint32
  569. }
  570. type BpfHdr struct {
  571. Tstamp Timeval
  572. Caplen uint32
  573. Datalen uint32
  574. Hdrlen uint16
  575. _ [6]byte
  576. }
  577. type BpfZbufHeader struct {
  578. Kernel_gen uint32
  579. Kernel_len uint32
  580. User_gen uint32
  581. _ [5]uint32
  582. }
  583. type Termios struct {
  584. Iflag uint32
  585. Oflag uint32
  586. Cflag uint32
  587. Lflag uint32
  588. Cc [20]uint8
  589. Ispeed uint32
  590. Ospeed uint32
  591. }
  592. type Winsize struct {
  593. Row uint16
  594. Col uint16
  595. Xpixel uint16
  596. Ypixel uint16
  597. }
  598. const (
  599. AT_FDCWD = -0x64
  600. AT_REMOVEDIR = 0x800
  601. AT_SYMLINK_FOLLOW = 0x400
  602. AT_SYMLINK_NOFOLLOW = 0x200
  603. )
  604. type PollFd struct {
  605. Fd int32
  606. Events int16
  607. Revents int16
  608. }
  609. const (
  610. POLLERR = 0x8
  611. POLLHUP = 0x10
  612. POLLIN = 0x1
  613. POLLINIGNEOF = 0x2000
  614. POLLNVAL = 0x20
  615. POLLOUT = 0x4
  616. POLLPRI = 0x2
  617. POLLRDBAND = 0x80
  618. POLLRDNORM = 0x40
  619. POLLWRBAND = 0x100
  620. POLLWRNORM = 0x4
  621. )
  622. type CapRights struct {
  623. Rights [2]uint64
  624. }
  625. type Utsname struct {
  626. Sysname [256]byte
  627. Nodename [256]byte
  628. Release [256]byte
  629. Version [256]byte
  630. Machine [256]byte
  631. }
上海开阖软件有限公司 沪ICP备12045867号-1