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

701 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 386,freebsd
  4. package unix
  5. const (
  6. SizeofPtr = 0x4
  7. SizeofShort = 0x2
  8. SizeofInt = 0x4
  9. SizeofLong = 0x4
  10. SizeofLongLong = 0x8
  11. )
  12. type (
  13. _C_short int16
  14. _C_int int32
  15. _C_long int32
  16. _C_long_long int64
  17. )
  18. type Timespec struct {
  19. Sec int32
  20. Nsec int32
  21. }
  22. type Timeval struct {
  23. Sec int32
  24. Usec int32
  25. }
  26. type Rusage struct {
  27. Utime Timeval
  28. Stime Timeval
  29. Maxrss int32
  30. Ixrss int32
  31. Idrss int32
  32. Isrss int32
  33. Minflt int32
  34. Majflt int32
  35. Nswap int32
  36. Inblock int32
  37. Oublock int32
  38. Msgsnd int32
  39. Msgrcv int32
  40. Nsignals int32
  41. Nvcsw int32
  42. Nivcsw int32
  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. _ int32
  64. Atim Timespec
  65. _ int32
  66. Mtim Timespec
  67. _ int32
  68. Ctim Timespec
  69. _ int32
  70. Btim Timespec
  71. Size int64
  72. Blocks int64
  73. Blksize int32
  74. Flags uint32
  75. Gen uint64
  76. Spare [10]uint64
  77. }
  78. type stat_freebsd11_t struct {
  79. Dev uint32
  80. Ino uint32
  81. Mode uint16
  82. Nlink uint16
  83. Uid uint32
  84. Gid uint32
  85. Rdev uint32
  86. Atim Timespec
  87. Mtim Timespec
  88. Ctim Timespec
  89. Size int64
  90. Blocks int64
  91. Blksize int32
  92. Flags uint32
  93. Gen uint32
  94. Lspare int32
  95. Btim Timespec
  96. _ [8]byte
  97. }
  98. type Statfs_t struct {
  99. Version uint32
  100. Type uint32
  101. Flags uint64
  102. Bsize uint64
  103. Iosize uint64
  104. Blocks uint64
  105. Bfree uint64
  106. Bavail int64
  107. Files uint64
  108. Ffree int64
  109. Syncwrites uint64
  110. Asyncwrites uint64
  111. Syncreads uint64
  112. Asyncreads uint64
  113. Spare [10]uint64
  114. Namemax uint32
  115. Owner uint32
  116. Fsid Fsid
  117. Charspare [80]int8
  118. Fstypename [16]int8
  119. Mntfromname [1024]int8
  120. Mntonname [1024]int8
  121. }
  122. type statfs_freebsd11_t struct {
  123. Version uint32
  124. Type uint32
  125. Flags uint64
  126. Bsize uint64
  127. Iosize uint64
  128. Blocks uint64
  129. Bfree uint64
  130. Bavail int64
  131. Files uint64
  132. Ffree int64
  133. Syncwrites uint64
  134. Asyncwrites uint64
  135. Syncreads uint64
  136. Asyncreads uint64
  137. Spare [10]uint64
  138. Namemax uint32
  139. Owner uint32
  140. Fsid Fsid
  141. Charspare [80]int8
  142. Fstypename [16]int8
  143. Mntfromname [88]int8
  144. Mntonname [88]int8
  145. }
  146. type Flock_t struct {
  147. Start int64
  148. Len int64
  149. Pid int32
  150. Type int16
  151. Whence int16
  152. Sysid int32
  153. }
  154. type Dirent struct {
  155. Fileno uint64
  156. Off int64
  157. Reclen uint16
  158. Type uint8
  159. Pad0 uint8
  160. Namlen uint16
  161. Pad1 uint16
  162. Name [256]int8
  163. }
  164. type dirent_freebsd11 struct {
  165. Fileno uint32
  166. Reclen uint16
  167. Type uint8
  168. Namlen uint8
  169. Name [256]int8
  170. }
  171. type Fsid struct {
  172. Val [2]int32
  173. }
  174. const (
  175. PathMax = 0x400
  176. )
  177. const (
  178. FADV_NORMAL = 0x0
  179. FADV_RANDOM = 0x1
  180. FADV_SEQUENTIAL = 0x2
  181. FADV_WILLNEED = 0x3
  182. FADV_DONTNEED = 0x4
  183. FADV_NOREUSE = 0x5
  184. )
  185. type RawSockaddrInet4 struct {
  186. Len uint8
  187. Family uint8
  188. Port uint16
  189. Addr [4]byte /* in_addr */
  190. Zero [8]int8
  191. }
  192. type RawSockaddrInet6 struct {
  193. Len uint8
  194. Family uint8
  195. Port uint16
  196. Flowinfo uint32
  197. Addr [16]byte /* in6_addr */
  198. Scope_id uint32
  199. }
  200. type RawSockaddrUnix struct {
  201. Len uint8
  202. Family uint8
  203. Path [104]int8
  204. }
  205. type RawSockaddrDatalink struct {
  206. Len uint8
  207. Family uint8
  208. Index uint16
  209. Type uint8
  210. Nlen uint8
  211. Alen uint8
  212. Slen uint8
  213. Data [46]int8
  214. }
  215. type RawSockaddr struct {
  216. Len uint8
  217. Family uint8
  218. Data [14]int8
  219. }
  220. type RawSockaddrAny struct {
  221. Addr RawSockaddr
  222. Pad [92]int8
  223. }
  224. type _Socklen uint32
  225. type Linger struct {
  226. Onoff int32
  227. Linger int32
  228. }
  229. type Iovec struct {
  230. Base *byte
  231. Len uint32
  232. }
  233. type IPMreq struct {
  234. Multiaddr [4]byte /* in_addr */
  235. Interface [4]byte /* in_addr */
  236. }
  237. type IPMreqn struct {
  238. Multiaddr [4]byte /* in_addr */
  239. Address [4]byte /* in_addr */
  240. Ifindex int32
  241. }
  242. type IPv6Mreq struct {
  243. Multiaddr [16]byte /* in6_addr */
  244. Interface uint32
  245. }
  246. type Msghdr struct {
  247. Name *byte
  248. Namelen uint32
  249. Iov *Iovec
  250. Iovlen int32
  251. Control *byte
  252. Controllen uint32
  253. Flags int32
  254. }
  255. type Cmsghdr struct {
  256. Len uint32
  257. Level int32
  258. Type int32
  259. }
  260. type Inet6Pktinfo struct {
  261. Addr [16]byte /* in6_addr */
  262. Ifindex uint32
  263. }
  264. type IPv6MTUInfo struct {
  265. Addr RawSockaddrInet6
  266. Mtu uint32
  267. }
  268. type ICMPv6Filter struct {
  269. Filt [8]uint32
  270. }
  271. const (
  272. SizeofSockaddrInet4 = 0x10
  273. SizeofSockaddrInet6 = 0x1c
  274. SizeofSockaddrAny = 0x6c
  275. SizeofSockaddrUnix = 0x6a
  276. SizeofSockaddrDatalink = 0x36
  277. SizeofLinger = 0x8
  278. SizeofIPMreq = 0x8
  279. SizeofIPMreqn = 0xc
  280. SizeofIPv6Mreq = 0x14
  281. SizeofMsghdr = 0x1c
  282. SizeofCmsghdr = 0xc
  283. SizeofInet6Pktinfo = 0x14
  284. SizeofIPv6MTUInfo = 0x20
  285. SizeofICMPv6Filter = 0x20
  286. )
  287. const (
  288. PTRACE_ATTACH = 0xa
  289. PTRACE_CONT = 0x7
  290. PTRACE_DETACH = 0xb
  291. PTRACE_GETFPREGS = 0x23
  292. PTRACE_GETFSBASE = 0x47
  293. PTRACE_GETLWPLIST = 0xf
  294. PTRACE_GETNUMLWPS = 0xe
  295. PTRACE_GETREGS = 0x21
  296. PTRACE_GETXSTATE = 0x45
  297. PTRACE_IO = 0xc
  298. PTRACE_KILL = 0x8
  299. PTRACE_LWPEVENTS = 0x18
  300. PTRACE_LWPINFO = 0xd
  301. PTRACE_SETFPREGS = 0x24
  302. PTRACE_SETREGS = 0x22
  303. PTRACE_SINGLESTEP = 0x9
  304. PTRACE_TRACEME = 0x0
  305. )
  306. const (
  307. PIOD_READ_D = 0x1
  308. PIOD_WRITE_D = 0x2
  309. PIOD_READ_I = 0x3
  310. PIOD_WRITE_I = 0x4
  311. )
  312. const (
  313. PL_FLAG_BORN = 0x100
  314. PL_FLAG_EXITED = 0x200
  315. PL_FLAG_SI = 0x20
  316. )
  317. const (
  318. TRAP_BRKPT = 0x1
  319. TRAP_TRACE = 0x2
  320. )
  321. type PtraceLwpInfoStruct struct {
  322. Lwpid int32
  323. Event int32
  324. Flags int32
  325. Sigmask Sigset_t
  326. Siglist Sigset_t
  327. Siginfo __Siginfo
  328. Tdname [20]int8
  329. Child_pid int32
  330. Syscall_code uint32
  331. Syscall_narg uint32
  332. }
  333. type __Siginfo struct {
  334. Signo int32
  335. Errno int32
  336. Code int32
  337. Pid int32
  338. Uid uint32
  339. Status int32
  340. Addr *byte
  341. Value [4]byte
  342. X_reason [32]byte
  343. }
  344. type Sigset_t struct {
  345. Val [4]uint32
  346. }
  347. type Reg struct {
  348. Fs uint32
  349. Es uint32
  350. Ds uint32
  351. Edi uint32
  352. Esi uint32
  353. Ebp uint32
  354. Isp uint32
  355. Ebx uint32
  356. Edx uint32
  357. Ecx uint32
  358. Eax uint32
  359. Trapno uint32
  360. Err uint32
  361. Eip uint32
  362. Cs uint32
  363. Eflags uint32
  364. Esp uint32
  365. Ss uint32
  366. Gs uint32
  367. }
  368. type FpReg struct {
  369. Env [7]uint32
  370. Acc [8][10]uint8
  371. Ex_sw uint32
  372. Pad [64]uint8
  373. }
  374. type PtraceIoDesc struct {
  375. Op int32
  376. Offs *byte
  377. Addr *byte
  378. Len uint
  379. }
  380. type Kevent_t struct {
  381. Ident uint32
  382. Filter int16
  383. Flags uint16
  384. Fflags uint32
  385. Data int32
  386. Udata *byte
  387. }
  388. type FdSet struct {
  389. Bits [32]uint32
  390. }
  391. const (
  392. sizeofIfMsghdr = 0xa8
  393. SizeofIfMsghdr = 0x60
  394. sizeofIfData = 0x98
  395. SizeofIfData = 0x50
  396. SizeofIfaMsghdr = 0x14
  397. SizeofIfmaMsghdr = 0x10
  398. SizeofIfAnnounceMsghdr = 0x18
  399. SizeofRtMsghdr = 0x5c
  400. SizeofRtMetrics = 0x38
  401. )
  402. type ifMsghdr struct {
  403. Msglen uint16
  404. Version uint8
  405. Type uint8
  406. Addrs int32
  407. Flags int32
  408. Index uint16
  409. _ [2]byte
  410. Data ifData
  411. }
  412. type IfMsghdr struct {
  413. Msglen uint16
  414. Version uint8
  415. Type uint8
  416. Addrs int32
  417. Flags int32
  418. Index uint16
  419. _ [2]byte
  420. Data IfData
  421. }
  422. type ifData struct {
  423. Type uint8
  424. Physical uint8
  425. Addrlen uint8
  426. Hdrlen uint8
  427. Link_state uint8
  428. Vhid uint8
  429. Datalen uint16
  430. Mtu uint32
  431. Metric uint32
  432. Baudrate uint64
  433. Ipackets uint64
  434. Ierrors uint64
  435. Opackets uint64
  436. Oerrors uint64
  437. Collisions uint64
  438. Ibytes uint64
  439. Obytes uint64
  440. Imcasts uint64
  441. Omcasts uint64
  442. Iqdrops uint64
  443. Oqdrops uint64
  444. Noproto uint64
  445. Hwassist uint64
  446. _ [8]byte
  447. _ [16]byte
  448. }
  449. type IfData struct {
  450. Type uint8
  451. Physical uint8
  452. Addrlen uint8
  453. Hdrlen uint8
  454. Link_state uint8
  455. Spare_char1 uint8
  456. Spare_char2 uint8
  457. Datalen uint8
  458. Mtu uint32
  459. Metric uint32
  460. Baudrate uint32
  461. Ipackets uint32
  462. Ierrors uint32
  463. Opackets uint32
  464. Oerrors uint32
  465. Collisions uint32
  466. Ibytes uint32
  467. Obytes uint32
  468. Imcasts uint32
  469. Omcasts uint32
  470. Iqdrops uint32
  471. Noproto uint32
  472. Hwassist uint32
  473. Epoch int32
  474. Lastchange Timeval
  475. }
  476. type IfaMsghdr struct {
  477. Msglen uint16
  478. Version uint8
  479. Type uint8
  480. Addrs int32
  481. Flags int32
  482. Index uint16
  483. _ [2]byte
  484. Metric int32
  485. }
  486. type IfmaMsghdr struct {
  487. Msglen uint16
  488. Version uint8
  489. Type uint8
  490. Addrs int32
  491. Flags int32
  492. Index uint16
  493. _ [2]byte
  494. }
  495. type IfAnnounceMsghdr struct {
  496. Msglen uint16
  497. Version uint8
  498. Type uint8
  499. Index uint16
  500. Name [16]int8
  501. What uint16
  502. }
  503. type RtMsghdr struct {
  504. Msglen uint16
  505. Version uint8
  506. Type uint8
  507. Index uint16
  508. _ [2]byte
  509. Flags int32
  510. Addrs int32
  511. Pid int32
  512. Seq int32
  513. Errno int32
  514. Fmask int32
  515. Inits uint32
  516. Rmx RtMetrics
  517. }
  518. type RtMetrics struct {
  519. Locks uint32
  520. Mtu uint32
  521. Hopcount uint32
  522. Expire uint32
  523. Recvpipe uint32
  524. Sendpipe uint32
  525. Ssthresh uint32
  526. Rtt uint32
  527. Rttvar uint32
  528. Pksent uint32
  529. Weight uint32
  530. Filler [3]uint32
  531. }
  532. const (
  533. SizeofBpfVersion = 0x4
  534. SizeofBpfStat = 0x8
  535. SizeofBpfZbuf = 0xc
  536. SizeofBpfProgram = 0x8
  537. SizeofBpfInsn = 0x8
  538. SizeofBpfHdr = 0x14
  539. SizeofBpfZbufHeader = 0x20
  540. )
  541. type BpfVersion struct {
  542. Major uint16
  543. Minor uint16
  544. }
  545. type BpfStat struct {
  546. Recv uint32
  547. Drop uint32
  548. }
  549. type BpfZbuf struct {
  550. Bufa *byte
  551. Bufb *byte
  552. Buflen uint32
  553. }
  554. type BpfProgram struct {
  555. Len uint32
  556. Insns *BpfInsn
  557. }
  558. type BpfInsn struct {
  559. Code uint16
  560. Jt uint8
  561. Jf uint8
  562. K uint32
  563. }
  564. type BpfHdr struct {
  565. Tstamp Timeval
  566. Caplen uint32
  567. Datalen uint32
  568. Hdrlen uint16
  569. _ [2]byte
  570. }
  571. type BpfZbufHeader struct {
  572. Kernel_gen uint32
  573. Kernel_len uint32
  574. User_gen uint32
  575. _ [5]uint32
  576. }
  577. type Termios struct {
  578. Iflag uint32
  579. Oflag uint32
  580. Cflag uint32
  581. Lflag uint32
  582. Cc [20]uint8
  583. Ispeed uint32
  584. Ospeed uint32
  585. }
  586. type Winsize struct {
  587. Row uint16
  588. Col uint16
  589. Xpixel uint16
  590. Ypixel uint16
  591. }
  592. const (
  593. AT_FDCWD = -0x64
  594. AT_REMOVEDIR = 0x800
  595. AT_SYMLINK_FOLLOW = 0x400
  596. AT_SYMLINK_NOFOLLOW = 0x200
  597. )
  598. type PollFd struct {
  599. Fd int32
  600. Events int16
  601. Revents int16
  602. }
  603. const (
  604. POLLERR = 0x8
  605. POLLHUP = 0x10
  606. POLLIN = 0x1
  607. POLLINIGNEOF = 0x2000
  608. POLLNVAL = 0x20
  609. POLLOUT = 0x4
  610. POLLPRI = 0x2
  611. POLLRDBAND = 0x80
  612. POLLRDNORM = 0x40
  613. POLLWRBAND = 0x100
  614. POLLWRNORM = 0x4
  615. )
  616. type CapRights struct {
  617. Rights [2]uint64
  618. }
  619. type Utsname struct {
  620. Sysname [256]byte
  621. Nodename [256]byte
  622. Release [256]byte
  623. Version [256]byte
  624. Machine [256]byte
  625. }
上海开阖软件有限公司 沪ICP备12045867号-1