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.

652 lines
9.6 KiB

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