Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

554 wiersze
8.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. // +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. S_IFMT = 0xf000
  51. S_IFIFO = 0x1000
  52. S_IFCHR = 0x2000
  53. S_IFDIR = 0x4000
  54. S_IFBLK = 0x6000
  55. S_IFREG = 0x8000
  56. S_IFLNK = 0xa000
  57. S_IFSOCK = 0xc000
  58. S_ISUID = 0x800
  59. S_ISGID = 0x400
  60. S_ISVTX = 0x200
  61. S_IRUSR = 0x100
  62. S_IWUSR = 0x80
  63. S_IXUSR = 0x40
  64. )
  65. type Stat_t struct {
  66. Dev uint32
  67. Ino uint32
  68. Mode uint16
  69. Nlink uint16
  70. Uid uint32
  71. Gid uint32
  72. Rdev uint32
  73. Atimespec Timespec
  74. Mtimespec Timespec
  75. Ctimespec Timespec
  76. Size int64
  77. Blocks int64
  78. Blksize int32
  79. Flags uint32
  80. Gen uint32
  81. Lspare int32
  82. Birthtimespec Timespec
  83. Pad_cgo_0 [8]byte
  84. }
  85. type Statfs_t struct {
  86. Version uint32
  87. Type uint32
  88. Flags uint64
  89. Bsize uint64
  90. Iosize uint64
  91. Blocks uint64
  92. Bfree uint64
  93. Bavail int64
  94. Files uint64
  95. Ffree int64
  96. Syncwrites uint64
  97. Asyncwrites uint64
  98. Syncreads uint64
  99. Asyncreads uint64
  100. Spare [10]uint64
  101. Namemax uint32
  102. Owner uint32
  103. Fsid Fsid
  104. Charspare [80]int8
  105. Fstypename [16]int8
  106. Mntfromname [88]int8
  107. Mntonname [88]int8
  108. }
  109. type Flock_t struct {
  110. Start int64
  111. Len int64
  112. Pid int32
  113. Type int16
  114. Whence int16
  115. Sysid int32
  116. }
  117. type Dirent struct {
  118. Fileno uint32
  119. Reclen uint16
  120. Type uint8
  121. Namlen uint8
  122. Name [256]int8
  123. }
  124. type Fsid struct {
  125. Val [2]int32
  126. }
  127. const (
  128. PathMax = 0x400
  129. )
  130. const (
  131. FADV_NORMAL = 0x0
  132. FADV_RANDOM = 0x1
  133. FADV_SEQUENTIAL = 0x2
  134. FADV_WILLNEED = 0x3
  135. FADV_DONTNEED = 0x4
  136. FADV_NOREUSE = 0x5
  137. )
  138. type RawSockaddrInet4 struct {
  139. Len uint8
  140. Family uint8
  141. Port uint16
  142. Addr [4]byte /* in_addr */
  143. Zero [8]int8
  144. }
  145. type RawSockaddrInet6 struct {
  146. Len uint8
  147. Family uint8
  148. Port uint16
  149. Flowinfo uint32
  150. Addr [16]byte /* in6_addr */
  151. Scope_id uint32
  152. }
  153. type RawSockaddrUnix struct {
  154. Len uint8
  155. Family uint8
  156. Path [104]int8
  157. }
  158. type RawSockaddrDatalink struct {
  159. Len uint8
  160. Family uint8
  161. Index uint16
  162. Type uint8
  163. Nlen uint8
  164. Alen uint8
  165. Slen uint8
  166. Data [46]int8
  167. }
  168. type RawSockaddr struct {
  169. Len uint8
  170. Family uint8
  171. Data [14]int8
  172. }
  173. type RawSockaddrAny struct {
  174. Addr RawSockaddr
  175. Pad [92]int8
  176. }
  177. type _Socklen uint32
  178. type Linger struct {
  179. Onoff int32
  180. Linger int32
  181. }
  182. type Iovec struct {
  183. Base *byte
  184. Len uint32
  185. }
  186. type IPMreq struct {
  187. Multiaddr [4]byte /* in_addr */
  188. Interface [4]byte /* in_addr */
  189. }
  190. type IPMreqn struct {
  191. Multiaddr [4]byte /* in_addr */
  192. Address [4]byte /* in_addr */
  193. Ifindex int32
  194. }
  195. type IPv6Mreq struct {
  196. Multiaddr [16]byte /* in6_addr */
  197. Interface uint32
  198. }
  199. type Msghdr struct {
  200. Name *byte
  201. Namelen uint32
  202. Iov *Iovec
  203. Iovlen int32
  204. Control *byte
  205. Controllen uint32
  206. Flags int32
  207. }
  208. type Cmsghdr struct {
  209. Len uint32
  210. Level int32
  211. Type int32
  212. }
  213. type Inet6Pktinfo struct {
  214. Addr [16]byte /* in6_addr */
  215. Ifindex uint32
  216. }
  217. type IPv6MTUInfo struct {
  218. Addr RawSockaddrInet6
  219. Mtu uint32
  220. }
  221. type ICMPv6Filter struct {
  222. Filt [8]uint32
  223. }
  224. const (
  225. SizeofSockaddrInet4 = 0x10
  226. SizeofSockaddrInet6 = 0x1c
  227. SizeofSockaddrAny = 0x6c
  228. SizeofSockaddrUnix = 0x6a
  229. SizeofSockaddrDatalink = 0x36
  230. SizeofLinger = 0x8
  231. SizeofIPMreq = 0x8
  232. SizeofIPMreqn = 0xc
  233. SizeofIPv6Mreq = 0x14
  234. SizeofMsghdr = 0x1c
  235. SizeofCmsghdr = 0xc
  236. SizeofInet6Pktinfo = 0x14
  237. SizeofIPv6MTUInfo = 0x20
  238. SizeofICMPv6Filter = 0x20
  239. )
  240. const (
  241. PTRACE_TRACEME = 0x0
  242. PTRACE_CONT = 0x7
  243. PTRACE_KILL = 0x8
  244. )
  245. type Kevent_t struct {
  246. Ident uint32
  247. Filter int16
  248. Flags uint16
  249. Fflags uint32
  250. Data int32
  251. Udata *byte
  252. }
  253. type FdSet struct {
  254. X__fds_bits [32]uint32
  255. }
  256. const (
  257. sizeofIfMsghdr = 0xa8
  258. SizeofIfMsghdr = 0x60
  259. sizeofIfData = 0x98
  260. SizeofIfData = 0x50
  261. SizeofIfaMsghdr = 0x14
  262. SizeofIfmaMsghdr = 0x10
  263. SizeofIfAnnounceMsghdr = 0x18
  264. SizeofRtMsghdr = 0x5c
  265. SizeofRtMetrics = 0x38
  266. )
  267. type ifMsghdr struct {
  268. Msglen uint16
  269. Version uint8
  270. Type uint8
  271. Addrs int32
  272. Flags int32
  273. Index uint16
  274. Pad_cgo_0 [2]byte
  275. Data ifData
  276. }
  277. type IfMsghdr struct {
  278. Msglen uint16
  279. Version uint8
  280. Type uint8
  281. Addrs int32
  282. Flags int32
  283. Index uint16
  284. Pad_cgo_0 [2]byte
  285. Data IfData
  286. }
  287. type ifData struct {
  288. Type uint8
  289. Physical uint8
  290. Addrlen uint8
  291. Hdrlen uint8
  292. Link_state uint8
  293. Vhid uint8
  294. Datalen uint16
  295. Mtu uint32
  296. Metric uint32
  297. Baudrate uint64
  298. Ipackets uint64
  299. Ierrors uint64
  300. Opackets uint64
  301. Oerrors uint64
  302. Collisions uint64
  303. Ibytes uint64
  304. Obytes uint64
  305. Imcasts uint64
  306. Omcasts uint64
  307. Iqdrops uint64
  308. Oqdrops uint64
  309. Noproto uint64
  310. Hwassist uint64
  311. X__ifi_epoch [8]byte
  312. X__ifi_lastchange [16]byte
  313. }
  314. type IfData struct {
  315. Type uint8
  316. Physical uint8
  317. Addrlen uint8
  318. Hdrlen uint8
  319. Link_state uint8
  320. Spare_char1 uint8
  321. Spare_char2 uint8
  322. Datalen uint8
  323. Mtu uint32
  324. Metric uint32
  325. Baudrate uint32
  326. Ipackets uint32
  327. Ierrors uint32
  328. Opackets uint32
  329. Oerrors uint32
  330. Collisions uint32
  331. Ibytes uint32
  332. Obytes uint32
  333. Imcasts uint32
  334. Omcasts uint32
  335. Iqdrops uint32
  336. Noproto uint32
  337. Hwassist uint32
  338. Epoch int32
  339. Lastchange Timeval
  340. }
  341. type IfaMsghdr struct {
  342. Msglen uint16
  343. Version uint8
  344. Type uint8
  345. Addrs int32
  346. Flags int32
  347. Index uint16
  348. Pad_cgo_0 [2]byte
  349. Metric int32
  350. }
  351. type IfmaMsghdr struct {
  352. Msglen uint16
  353. Version uint8
  354. Type uint8
  355. Addrs int32
  356. Flags int32
  357. Index uint16
  358. Pad_cgo_0 [2]byte
  359. }
  360. type IfAnnounceMsghdr struct {
  361. Msglen uint16
  362. Version uint8
  363. Type uint8
  364. Index uint16
  365. Name [16]int8
  366. What uint16
  367. }
  368. type RtMsghdr struct {
  369. Msglen uint16
  370. Version uint8
  371. Type uint8
  372. Index uint16
  373. Pad_cgo_0 [2]byte
  374. Flags int32
  375. Addrs int32
  376. Pid int32
  377. Seq int32
  378. Errno int32
  379. Fmask int32
  380. Inits uint32
  381. Rmx RtMetrics
  382. }
  383. type RtMetrics struct {
  384. Locks uint32
  385. Mtu uint32
  386. Hopcount uint32
  387. Expire uint32
  388. Recvpipe uint32
  389. Sendpipe uint32
  390. Ssthresh uint32
  391. Rtt uint32
  392. Rttvar uint32
  393. Pksent uint32
  394. Weight uint32
  395. Filler [3]uint32
  396. }
  397. const (
  398. SizeofBpfVersion = 0x4
  399. SizeofBpfStat = 0x8
  400. SizeofBpfZbuf = 0xc
  401. SizeofBpfProgram = 0x8
  402. SizeofBpfInsn = 0x8
  403. SizeofBpfHdr = 0x14
  404. SizeofBpfZbufHeader = 0x20
  405. )
  406. type BpfVersion struct {
  407. Major uint16
  408. Minor uint16
  409. }
  410. type BpfStat struct {
  411. Recv uint32
  412. Drop uint32
  413. }
  414. type BpfZbuf struct {
  415. Bufa *byte
  416. Bufb *byte
  417. Buflen uint32
  418. }
  419. type BpfProgram struct {
  420. Len uint32
  421. Insns *BpfInsn
  422. }
  423. type BpfInsn struct {
  424. Code uint16
  425. Jt uint8
  426. Jf uint8
  427. K uint32
  428. }
  429. type BpfHdr struct {
  430. Tstamp Timeval
  431. Caplen uint32
  432. Datalen uint32
  433. Hdrlen uint16
  434. Pad_cgo_0 [2]byte
  435. }
  436. type BpfZbufHeader struct {
  437. Kernel_gen uint32
  438. Kernel_len uint32
  439. User_gen uint32
  440. X_bzh_pad [5]uint32
  441. }
  442. type Termios struct {
  443. Iflag uint32
  444. Oflag uint32
  445. Cflag uint32
  446. Lflag uint32
  447. Cc [20]uint8
  448. Ispeed uint32
  449. Ospeed uint32
  450. }
  451. type Winsize struct {
  452. Row uint16
  453. Col uint16
  454. Xpixel uint16
  455. Ypixel uint16
  456. }
  457. const (
  458. AT_FDCWD = -0x64
  459. AT_REMOVEDIR = 0x800
  460. AT_SYMLINK_FOLLOW = 0x400
  461. AT_SYMLINK_NOFOLLOW = 0x200
  462. )
  463. type PollFd struct {
  464. Fd int32
  465. Events int16
  466. Revents int16
  467. }
  468. const (
  469. POLLERR = 0x8
  470. POLLHUP = 0x10
  471. POLLIN = 0x1
  472. POLLINIGNEOF = 0x2000
  473. POLLNVAL = 0x20
  474. POLLOUT = 0x4
  475. POLLPRI = 0x2
  476. POLLRDBAND = 0x80
  477. POLLRDNORM = 0x40
  478. POLLWRBAND = 0x100
  479. POLLWRNORM = 0x4
  480. )
  481. type CapRights struct {
  482. Rights [2]uint64
  483. }
  484. type Utsname struct {
  485. Sysname [256]byte
  486. Nodename [256]byte
  487. Release [256]byte
  488. Version [256]byte
  489. Machine [256]byte
  490. }