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

684 lines
10KB

  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. // +build arm,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 int64
  20. Nsec int32
  21. _ [4]byte
  22. }
  23. type Timeval struct {
  24. Sec int64
  25. Usec int32
  26. _ [4]byte
  27. }
  28. type Rusage struct {
  29. Utime Timeval
  30. Stime Timeval
  31. Maxrss int32
  32. Ixrss int32
  33. Idrss int32
  34. Isrss int32
  35. Minflt int32
  36. Majflt int32
  37. Nswap int32
  38. Inblock int32
  39. Oublock int32
  40. Msgsnd int32
  41. Msgrcv int32
  42. Nsignals int32
  43. Nvcsw int32
  44. Nivcsw int32
  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 stat_freebsd11_t struct {
  77. Dev uint32
  78. Ino uint32
  79. Mode uint16
  80. Nlink uint16
  81. Uid uint32
  82. Gid uint32
  83. Rdev uint32
  84. Atim Timespec
  85. Mtim Timespec
  86. Ctim Timespec
  87. Size int64
  88. Blocks int64
  89. Blksize int32
  90. Flags uint32
  91. Gen uint32
  92. Lspare int32
  93. Btim Timespec
  94. }
  95. type Statfs_t struct {
  96. Version uint32
  97. Type uint32
  98. Flags uint64
  99. Bsize uint64
  100. Iosize uint64
  101. Blocks uint64
  102. Bfree uint64
  103. Bavail int64
  104. Files uint64
  105. Ffree int64
  106. Syncwrites uint64
  107. Asyncwrites uint64
  108. Syncreads uint64
  109. Asyncreads uint64
  110. Spare [10]uint64
  111. Namemax uint32
  112. Owner uint32
  113. Fsid Fsid
  114. Charspare [80]int8
  115. Fstypename [16]int8
  116. Mntfromname [1024]int8
  117. Mntonname [1024]int8
  118. }
  119. type statfs_freebsd11_t struct {
  120. Version uint32
  121. Type uint32
  122. Flags uint64
  123. Bsize uint64
  124. Iosize uint64
  125. Blocks uint64
  126. Bfree uint64
  127. Bavail int64
  128. Files uint64
  129. Ffree int64
  130. Syncwrites uint64
  131. Asyncwrites uint64
  132. Syncreads uint64
  133. Asyncreads uint64
  134. Spare [10]uint64
  135. Namemax uint32
  136. Owner uint32
  137. Fsid Fsid
  138. Charspare [80]int8
  139. Fstypename [16]int8
  140. Mntfromname [88]int8
  141. Mntonname [88]int8
  142. }
  143. type Flock_t struct {
  144. Start int64
  145. Len int64
  146. Pid int32
  147. Type int16
  148. Whence int16
  149. Sysid int32
  150. _ [4]byte
  151. }
  152. type Dirent struct {
  153. Fileno uint64
  154. Off int64
  155. Reclen uint16
  156. Type uint8
  157. Pad0 uint8
  158. Namlen uint16
  159. Pad1 uint16
  160. Name [256]int8
  161. }
  162. type dirent_freebsd11 struct {
  163. Fileno uint32
  164. Reclen uint16
  165. Type uint8
  166. Namlen uint8
  167. Name [256]int8
  168. }
  169. type Fsid struct {
  170. Val [2]int32
  171. }
  172. const (
  173. PathMax = 0x400
  174. )
  175. const (
  176. FADV_NORMAL = 0x0
  177. FADV_RANDOM = 0x1
  178. FADV_SEQUENTIAL = 0x2
  179. FADV_WILLNEED = 0x3
  180. FADV_DONTNEED = 0x4
  181. FADV_NOREUSE = 0x5
  182. )
  183. type RawSockaddrInet4 struct {
  184. Len uint8
  185. Family uint8
  186. Port uint16
  187. Addr [4]byte /* in_addr */
  188. Zero [8]int8
  189. }
  190. type RawSockaddrInet6 struct {
  191. Len uint8
  192. Family uint8
  193. Port uint16
  194. Flowinfo uint32
  195. Addr [16]byte /* in6_addr */
  196. Scope_id uint32
  197. }
  198. type RawSockaddrUnix struct {
  199. Len uint8
  200. Family uint8
  201. Path [104]int8
  202. }
  203. type RawSockaddrDatalink struct {
  204. Len uint8
  205. Family uint8
  206. Index uint16
  207. Type uint8
  208. Nlen uint8
  209. Alen uint8
  210. Slen uint8
  211. Data [46]int8
  212. }
  213. type RawSockaddr struct {
  214. Len uint8
  215. Family uint8
  216. Data [14]int8
  217. }
  218. type RawSockaddrAny struct {
  219. Addr RawSockaddr
  220. Pad [92]int8
  221. }
  222. type _Socklen uint32
  223. type Linger struct {
  224. Onoff int32
  225. Linger int32
  226. }
  227. type Iovec struct {
  228. Base *byte
  229. Len uint32
  230. }
  231. type IPMreq struct {
  232. Multiaddr [4]byte /* in_addr */
  233. Interface [4]byte /* in_addr */
  234. }
  235. type IPMreqn struct {
  236. Multiaddr [4]byte /* in_addr */
  237. Address [4]byte /* in_addr */
  238. Ifindex int32
  239. }
  240. type IPv6Mreq struct {
  241. Multiaddr [16]byte /* in6_addr */
  242. Interface uint32
  243. }
  244. type Msghdr struct {
  245. Name *byte
  246. Namelen uint32
  247. Iov *Iovec
  248. Iovlen int32
  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 = 0x1c
  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 [4]byte
  340. X_reason [32]byte
  341. }
  342. type Sigset_t struct {
  343. Val [4]uint32
  344. }
  345. type Reg struct {
  346. R [13]uint32
  347. R_sp uint32
  348. R_lr uint32
  349. R_pc uint32
  350. R_cpsr uint32
  351. }
  352. type FpReg struct {
  353. Fpr_fpsr uint32
  354. Fpr [8][3]uint32
  355. }
  356. type PtraceIoDesc struct {
  357. Op int32
  358. Offs *byte
  359. Addr *byte
  360. Len uint
  361. }
  362. type Kevent_t struct {
  363. Ident uint32
  364. Filter int16
  365. Flags uint16
  366. Fflags uint32
  367. Data int32
  368. Udata *byte
  369. }
  370. type FdSet struct {
  371. Bits [32]uint32
  372. }
  373. const (
  374. sizeofIfMsghdr = 0xa8
  375. SizeofIfMsghdr = 0x70
  376. sizeofIfData = 0x98
  377. SizeofIfData = 0x60
  378. SizeofIfaMsghdr = 0x14
  379. SizeofIfmaMsghdr = 0x10
  380. SizeofIfAnnounceMsghdr = 0x18
  381. SizeofRtMsghdr = 0x5c
  382. SizeofRtMetrics = 0x38
  383. )
  384. type ifMsghdr struct {
  385. Msglen uint16
  386. Version uint8
  387. Type uint8
  388. Addrs int32
  389. Flags int32
  390. Index uint16
  391. _ [2]byte
  392. Data ifData
  393. }
  394. type IfMsghdr struct {
  395. Msglen uint16
  396. Version uint8
  397. Type uint8
  398. Addrs int32
  399. Flags int32
  400. Index uint16
  401. _ [2]byte
  402. Data IfData
  403. }
  404. type ifData struct {
  405. Type uint8
  406. Physical uint8
  407. Addrlen uint8
  408. Hdrlen uint8
  409. Link_state uint8
  410. Vhid uint8
  411. Datalen uint16
  412. Mtu uint32
  413. Metric uint32
  414. Baudrate uint64
  415. Ipackets uint64
  416. Ierrors uint64
  417. Opackets uint64
  418. Oerrors uint64
  419. Collisions uint64
  420. Ibytes uint64
  421. Obytes uint64
  422. Imcasts uint64
  423. Omcasts uint64
  424. Iqdrops uint64
  425. Oqdrops uint64
  426. Noproto uint64
  427. Hwassist uint64
  428. _ [8]byte
  429. _ [16]byte
  430. }
  431. type IfData struct {
  432. Type uint8
  433. Physical uint8
  434. Addrlen uint8
  435. Hdrlen uint8
  436. Link_state uint8
  437. Spare_char1 uint8
  438. Spare_char2 uint8
  439. Datalen uint8
  440. Mtu uint32
  441. Metric uint32
  442. Baudrate uint32
  443. Ipackets uint32
  444. Ierrors uint32
  445. Opackets uint32
  446. Oerrors uint32
  447. Collisions uint32
  448. Ibytes uint32
  449. Obytes uint32
  450. Imcasts uint32
  451. Omcasts uint32
  452. Iqdrops uint32
  453. Noproto uint32
  454. Hwassist uint32
  455. _ [4]byte
  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 uint32
  499. Rmx RtMetrics
  500. }
  501. type RtMetrics struct {
  502. Locks uint32
  503. Mtu uint32
  504. Hopcount uint32
  505. Expire uint32
  506. Recvpipe uint32
  507. Sendpipe uint32
  508. Ssthresh uint32
  509. Rtt uint32
  510. Rttvar uint32
  511. Pksent uint32
  512. Weight uint32
  513. Filler [3]uint32
  514. }
  515. const (
  516. SizeofBpfVersion = 0x4
  517. SizeofBpfStat = 0x8
  518. SizeofBpfZbuf = 0xc
  519. SizeofBpfProgram = 0x8
  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 uint32
  536. }
  537. type BpfProgram struct {
  538. Len uint32
  539. Insns *BpfInsn
  540. }
  541. type BpfInsn struct {
  542. Code uint16
  543. Jt uint8
  544. Jf uint8
  545. K uint32
  546. }
  547. type BpfHdr struct {
  548. Tstamp Timeval
  549. Caplen uint32
  550. Datalen uint32
  551. Hdrlen uint16
  552. _ [6]byte
  553. }
  554. type BpfZbufHeader struct {
  555. Kernel_gen uint32
  556. Kernel_len uint32
  557. User_gen uint32
  558. _ [5]uint32
  559. }
  560. type Termios struct {
  561. Iflag uint32
  562. Oflag uint32
  563. Cflag uint32
  564. Lflag uint32
  565. Cc [20]uint8
  566. Ispeed uint32
  567. Ospeed uint32
  568. }
  569. type Winsize struct {
  570. Row uint16
  571. Col uint16
  572. Xpixel uint16
  573. Ypixel uint16
  574. }
  575. const (
  576. AT_FDCWD = -0x64
  577. AT_REMOVEDIR = 0x800
  578. AT_SYMLINK_FOLLOW = 0x400
  579. AT_SYMLINK_NOFOLLOW = 0x200
  580. )
  581. type PollFd struct {
  582. Fd int32
  583. Events int16
  584. Revents int16
  585. }
  586. const (
  587. POLLERR = 0x8
  588. POLLHUP = 0x10
  589. POLLIN = 0x1
  590. POLLINIGNEOF = 0x2000
  591. POLLNVAL = 0x20
  592. POLLOUT = 0x4
  593. POLLPRI = 0x2
  594. POLLRDBAND = 0x80
  595. POLLRDNORM = 0x40
  596. POLLWRBAND = 0x100
  597. POLLWRNORM = 0x4
  598. )
  599. type CapRights struct {
  600. Rights [2]uint64
  601. }
  602. type Utsname struct {
  603. Sysname [256]byte
  604. Nodename [256]byte
  605. Release [256]byte
  606. Version [256]byte
  607. Machine [256]byte
  608. }
上海开阖软件有限公司 沪ICP备12045867号-1