選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

641 行
9.5 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 __Siginfo
  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 Sigset_t struct {
  276. Val [4]uint32
  277. }
  278. type Reg struct {
  279. Fs uint32
  280. Es uint32
  281. Ds uint32
  282. Edi uint32
  283. Esi uint32
  284. Ebp uint32
  285. Isp uint32
  286. Ebx uint32
  287. Edx uint32
  288. Ecx uint32
  289. Eax uint32
  290. Trapno uint32
  291. Err uint32
  292. Eip uint32
  293. Cs uint32
  294. Eflags uint32
  295. Esp uint32
  296. Ss uint32
  297. Gs uint32
  298. }
  299. type FpReg struct {
  300. Env [7]uint32
  301. Acc [8][10]uint8
  302. Ex_sw uint32
  303. Pad [64]uint8
  304. }
  305. type FpExtendedPrecision struct{}
  306. type PtraceIoDesc struct {
  307. Op int32
  308. Offs *byte
  309. Addr *byte
  310. Len uint32
  311. }
  312. type Kevent_t struct {
  313. Ident uint32
  314. Filter int16
  315. Flags uint16
  316. Fflags uint32
  317. Data int64
  318. Udata *byte
  319. Ext [4]uint64
  320. }
  321. type FdSet struct {
  322. Bits [32]uint32
  323. }
  324. const (
  325. sizeofIfMsghdr = 0xa8
  326. SizeofIfMsghdr = 0x60
  327. sizeofIfData = 0x98
  328. SizeofIfData = 0x50
  329. SizeofIfaMsghdr = 0x14
  330. SizeofIfmaMsghdr = 0x10
  331. SizeofIfAnnounceMsghdr = 0x18
  332. SizeofRtMsghdr = 0x5c
  333. SizeofRtMetrics = 0x38
  334. )
  335. type ifMsghdr struct {
  336. Msglen uint16
  337. Version uint8
  338. Type uint8
  339. Addrs int32
  340. Flags int32
  341. Index uint16
  342. _ uint16
  343. Data ifData
  344. }
  345. type IfMsghdr struct {
  346. Msglen uint16
  347. Version uint8
  348. Type uint8
  349. Addrs int32
  350. Flags int32
  351. Index uint16
  352. Data IfData
  353. }
  354. type ifData struct {
  355. Type uint8
  356. Physical uint8
  357. Addrlen uint8
  358. Hdrlen uint8
  359. Link_state uint8
  360. Vhid uint8
  361. Datalen uint16
  362. Mtu uint32
  363. Metric uint32
  364. Baudrate uint64
  365. Ipackets uint64
  366. Ierrors uint64
  367. Opackets uint64
  368. Oerrors uint64
  369. Collisions uint64
  370. Ibytes uint64
  371. Obytes uint64
  372. Imcasts uint64
  373. Omcasts uint64
  374. Iqdrops uint64
  375. Oqdrops uint64
  376. Noproto uint64
  377. Hwassist uint64
  378. _ [8]byte
  379. _ [16]byte
  380. }
  381. type IfData struct {
  382. Type uint8
  383. Physical uint8
  384. Addrlen uint8
  385. Hdrlen uint8
  386. Link_state uint8
  387. Spare_char1 uint8
  388. Spare_char2 uint8
  389. Datalen uint8
  390. Mtu uint32
  391. Metric uint32
  392. Baudrate uint32
  393. Ipackets uint32
  394. Ierrors uint32
  395. Opackets uint32
  396. Oerrors uint32
  397. Collisions uint32
  398. Ibytes uint32
  399. Obytes uint32
  400. Imcasts uint32
  401. Omcasts uint32
  402. Iqdrops uint32
  403. Noproto uint32
  404. Hwassist uint32
  405. Epoch int32
  406. Lastchange Timeval
  407. }
  408. type IfaMsghdr struct {
  409. Msglen uint16
  410. Version uint8
  411. Type uint8
  412. Addrs int32
  413. Flags int32
  414. Index uint16
  415. _ uint16
  416. Metric int32
  417. }
  418. type IfmaMsghdr struct {
  419. Msglen uint16
  420. Version uint8
  421. Type uint8
  422. Addrs int32
  423. Flags int32
  424. Index uint16
  425. _ uint16
  426. }
  427. type IfAnnounceMsghdr struct {
  428. Msglen uint16
  429. Version uint8
  430. Type uint8
  431. Index uint16
  432. Name [16]int8
  433. What uint16
  434. }
  435. type RtMsghdr struct {
  436. Msglen uint16
  437. Version uint8
  438. Type uint8
  439. Index uint16
  440. _ uint16
  441. Flags int32
  442. Addrs int32
  443. Pid int32
  444. Seq int32
  445. Errno int32
  446. Fmask int32
  447. Inits uint32
  448. Rmx RtMetrics
  449. }
  450. type RtMetrics struct {
  451. Locks uint32
  452. Mtu uint32
  453. Hopcount uint32
  454. Expire uint32
  455. Recvpipe uint32
  456. Sendpipe uint32
  457. Ssthresh uint32
  458. Rtt uint32
  459. Rttvar uint32
  460. Pksent uint32
  461. Weight uint32
  462. Filler [3]uint32
  463. }
  464. const (
  465. SizeofBpfVersion = 0x4
  466. SizeofBpfStat = 0x8
  467. SizeofBpfZbuf = 0xc
  468. SizeofBpfProgram = 0x8
  469. SizeofBpfInsn = 0x8
  470. SizeofBpfHdr = 0x14
  471. SizeofBpfZbufHeader = 0x20
  472. )
  473. type BpfVersion struct {
  474. Major uint16
  475. Minor uint16
  476. }
  477. type BpfStat struct {
  478. Recv uint32
  479. Drop uint32
  480. }
  481. type BpfZbuf struct {
  482. Bufa *byte
  483. Bufb *byte
  484. Buflen uint32
  485. }
  486. type BpfProgram struct {
  487. Len uint32
  488. Insns *BpfInsn
  489. }
  490. type BpfInsn struct {
  491. Code uint16
  492. Jt uint8
  493. Jf uint8
  494. K uint32
  495. }
  496. type BpfHdr struct {
  497. Tstamp Timeval
  498. Caplen uint32
  499. Datalen uint32
  500. Hdrlen uint16
  501. _ [2]byte
  502. }
  503. type BpfZbufHeader struct {
  504. Kernel_gen uint32
  505. Kernel_len uint32
  506. User_gen uint32
  507. _ [5]uint32
  508. }
  509. type Termios struct {
  510. Iflag uint32
  511. Oflag uint32
  512. Cflag uint32
  513. Lflag uint32
  514. Cc [20]uint8
  515. Ispeed uint32
  516. Ospeed uint32
  517. }
  518. type Winsize struct {
  519. Row uint16
  520. Col uint16
  521. Xpixel uint16
  522. Ypixel uint16
  523. }
  524. const (
  525. AT_FDCWD = -0x64
  526. AT_EACCESS = 0x100
  527. AT_SYMLINK_NOFOLLOW = 0x200
  528. AT_SYMLINK_FOLLOW = 0x400
  529. AT_REMOVEDIR = 0x800
  530. )
  531. type PollFd struct {
  532. Fd int32
  533. Events int16
  534. Revents int16
  535. }
  536. const (
  537. POLLERR = 0x8
  538. POLLHUP = 0x10
  539. POLLIN = 0x1
  540. POLLINIGNEOF = 0x2000
  541. POLLNVAL = 0x20
  542. POLLOUT = 0x4
  543. POLLPRI = 0x2
  544. POLLRDBAND = 0x80
  545. POLLRDNORM = 0x40
  546. POLLWRBAND = 0x100
  547. POLLWRNORM = 0x4
  548. )
  549. type CapRights struct {
  550. Rights [2]uint64
  551. }
  552. type Utsname struct {
  553. Sysname [256]byte
  554. Nodename [256]byte
  555. Release [256]byte
  556. Version [256]byte
  557. Machine [256]byte
  558. }
  559. const SizeofClockinfo = 0x14
  560. type Clockinfo struct {
  561. Hz int32
  562. Tick int32
  563. Spare int32
  564. Stathz int32
  565. Profhz int32
  566. }