Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

487 rader
7.1 KiB

  1. // cgo -godefs types_dragonfly.go | go run mkpost.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build amd64,dragonfly
  4. package unix
  5. const (
  6. sizeofPtr = 0x8
  7. sizeofShort = 0x2
  8. sizeofInt = 0x4
  9. sizeofLong = 0x8
  10. sizeofLongLong = 0x8
  11. )
  12. type (
  13. _C_short int16
  14. _C_int int32
  15. _C_long int64
  16. _C_long_long int64
  17. )
  18. type Timespec struct {
  19. Sec int64
  20. Nsec int64
  21. }
  22. type Timeval struct {
  23. Sec int64
  24. Usec int64
  25. }
  26. type Rusage struct {
  27. Utime Timeval
  28. Stime Timeval
  29. Maxrss int64
  30. Ixrss int64
  31. Idrss int64
  32. Isrss int64
  33. Minflt int64
  34. Majflt int64
  35. Nswap int64
  36. Inblock int64
  37. Oublock int64
  38. Msgsnd int64
  39. Msgrcv int64
  40. Nsignals int64
  41. Nvcsw int64
  42. Nivcsw int64
  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. Ino uint64
  67. Nlink uint32
  68. Dev uint32
  69. Mode uint16
  70. Padding1 uint16
  71. Uid uint32
  72. Gid uint32
  73. Rdev uint32
  74. Atim Timespec
  75. Mtim Timespec
  76. Ctim Timespec
  77. Size int64
  78. Blocks int64
  79. Blksize uint32
  80. Flags uint32
  81. Gen uint32
  82. Lspare int32
  83. Qspare1 int64
  84. Qspare2 int64
  85. }
  86. type Statfs_t struct {
  87. Spare2 int64
  88. Bsize int64
  89. Iosize int64
  90. Blocks int64
  91. Bfree int64
  92. Bavail int64
  93. Files int64
  94. Ffree int64
  95. Fsid Fsid
  96. Owner uint32
  97. Type int32
  98. Flags int32
  99. _ [4]byte
  100. Syncwrites int64
  101. Asyncwrites int64
  102. Fstypename [16]int8
  103. Mntonname [80]int8
  104. Syncreads int64
  105. Asyncreads int64
  106. Spares1 int16
  107. Mntfromname [80]int8
  108. Spares2 int16
  109. _ [4]byte
  110. Spare [2]int64
  111. }
  112. type Flock_t struct {
  113. Start int64
  114. Len int64
  115. Pid int32
  116. Type int16
  117. Whence int16
  118. }
  119. type Dirent struct {
  120. Fileno uint64
  121. Namlen uint16
  122. Type uint8
  123. Unused1 uint8
  124. Unused2 uint32
  125. Name [256]int8
  126. }
  127. type Fsid struct {
  128. Val [2]int32
  129. }
  130. const (
  131. PathMax = 0x400
  132. )
  133. type RawSockaddrInet4 struct {
  134. Len uint8
  135. Family uint8
  136. Port uint16
  137. Addr [4]byte /* in_addr */
  138. Zero [8]int8
  139. }
  140. type RawSockaddrInet6 struct {
  141. Len uint8
  142. Family uint8
  143. Port uint16
  144. Flowinfo uint32
  145. Addr [16]byte /* in6_addr */
  146. Scope_id uint32
  147. }
  148. type RawSockaddrUnix struct {
  149. Len uint8
  150. Family uint8
  151. Path [104]int8
  152. }
  153. type RawSockaddrDatalink struct {
  154. Len uint8
  155. Family uint8
  156. Index uint16
  157. Type uint8
  158. Nlen uint8
  159. Alen uint8
  160. Slen uint8
  161. Data [12]int8
  162. Rcf uint16
  163. Route [16]uint16
  164. }
  165. type RawSockaddr struct {
  166. Len uint8
  167. Family uint8
  168. Data [14]int8
  169. }
  170. type RawSockaddrAny struct {
  171. Addr RawSockaddr
  172. Pad [92]int8
  173. }
  174. type _Socklen uint32
  175. type Linger struct {
  176. Onoff int32
  177. Linger int32
  178. }
  179. type Iovec struct {
  180. Base *byte
  181. Len uint64
  182. }
  183. type IPMreq struct {
  184. Multiaddr [4]byte /* in_addr */
  185. Interface [4]byte /* in_addr */
  186. }
  187. type IPv6Mreq struct {
  188. Multiaddr [16]byte /* in6_addr */
  189. Interface uint32
  190. }
  191. type Msghdr struct {
  192. Name *byte
  193. Namelen uint32
  194. _ [4]byte
  195. Iov *Iovec
  196. Iovlen int32
  197. _ [4]byte
  198. Control *byte
  199. Controllen uint32
  200. Flags int32
  201. }
  202. type Cmsghdr struct {
  203. Len uint32
  204. Level int32
  205. Type int32
  206. }
  207. type Inet6Pktinfo struct {
  208. Addr [16]byte /* in6_addr */
  209. Ifindex uint32
  210. }
  211. type IPv6MTUInfo struct {
  212. Addr RawSockaddrInet6
  213. Mtu uint32
  214. }
  215. type ICMPv6Filter struct {
  216. Filt [8]uint32
  217. }
  218. const (
  219. SizeofSockaddrInet4 = 0x10
  220. SizeofSockaddrInet6 = 0x1c
  221. SizeofSockaddrAny = 0x6c
  222. SizeofSockaddrUnix = 0x6a
  223. SizeofSockaddrDatalink = 0x36
  224. SizeofLinger = 0x8
  225. SizeofIPMreq = 0x8
  226. SizeofIPv6Mreq = 0x14
  227. SizeofMsghdr = 0x30
  228. SizeofCmsghdr = 0xc
  229. SizeofInet6Pktinfo = 0x14
  230. SizeofIPv6MTUInfo = 0x20
  231. SizeofICMPv6Filter = 0x20
  232. )
  233. const (
  234. PTRACE_TRACEME = 0x0
  235. PTRACE_CONT = 0x7
  236. PTRACE_KILL = 0x8
  237. )
  238. type Kevent_t struct {
  239. Ident uint64
  240. Filter int16
  241. Flags uint16
  242. Fflags uint32
  243. Data int64
  244. Udata *byte
  245. }
  246. type FdSet struct {
  247. Bits [16]uint64
  248. }
  249. const (
  250. SizeofIfMsghdr = 0xb0
  251. SizeofIfData = 0xa0
  252. SizeofIfaMsghdr = 0x14
  253. SizeofIfmaMsghdr = 0x10
  254. SizeofIfAnnounceMsghdr = 0x18
  255. SizeofRtMsghdr = 0x98
  256. SizeofRtMetrics = 0x70
  257. )
  258. type IfMsghdr struct {
  259. Msglen uint16
  260. Version uint8
  261. Type uint8
  262. Addrs int32
  263. Flags int32
  264. Index uint16
  265. _ [2]byte
  266. Data IfData
  267. }
  268. type IfData struct {
  269. Type uint8
  270. Physical uint8
  271. Addrlen uint8
  272. Hdrlen uint8
  273. Recvquota uint8
  274. Xmitquota uint8
  275. _ [2]byte
  276. Mtu uint64
  277. Metric uint64
  278. Link_state uint64
  279. Baudrate uint64
  280. Ipackets uint64
  281. Ierrors uint64
  282. Opackets uint64
  283. Oerrors uint64
  284. Collisions uint64
  285. Ibytes uint64
  286. Obytes uint64
  287. Imcasts uint64
  288. Omcasts uint64
  289. Iqdrops uint64
  290. Noproto uint64
  291. Hwassist uint64
  292. Oqdrops uint64
  293. Lastchange Timeval
  294. }
  295. type IfaMsghdr struct {
  296. Msglen uint16
  297. Version uint8
  298. Type uint8
  299. Addrs int32
  300. Flags int32
  301. Index uint16
  302. _ [2]byte
  303. Metric int32
  304. }
  305. type IfmaMsghdr struct {
  306. Msglen uint16
  307. Version uint8
  308. Type uint8
  309. Addrs int32
  310. Flags int32
  311. Index uint16
  312. _ [2]byte
  313. }
  314. type IfAnnounceMsghdr struct {
  315. Msglen uint16
  316. Version uint8
  317. Type uint8
  318. Index uint16
  319. Name [16]int8
  320. What uint16
  321. }
  322. type RtMsghdr struct {
  323. Msglen uint16
  324. Version uint8
  325. Type uint8
  326. Index uint16
  327. _ [2]byte
  328. Flags int32
  329. Addrs int32
  330. Pid int32
  331. Seq int32
  332. Errno int32
  333. Use int32
  334. Inits uint64
  335. Rmx RtMetrics
  336. }
  337. type RtMetrics struct {
  338. Locks uint64
  339. Mtu uint64
  340. Pksent uint64
  341. Expire uint64
  342. Sendpipe uint64
  343. Ssthresh uint64
  344. Rtt uint64
  345. Rttvar uint64
  346. Recvpipe uint64
  347. Hopcount uint64
  348. Mssopt uint16
  349. Pad uint16
  350. _ [4]byte
  351. Msl uint64
  352. Iwmaxsegs uint64
  353. Iwcapsegs uint64
  354. }
  355. const (
  356. SizeofBpfVersion = 0x4
  357. SizeofBpfStat = 0x8
  358. SizeofBpfProgram = 0x10
  359. SizeofBpfInsn = 0x8
  360. SizeofBpfHdr = 0x20
  361. )
  362. type BpfVersion struct {
  363. Major uint16
  364. Minor uint16
  365. }
  366. type BpfStat struct {
  367. Recv uint32
  368. Drop uint32
  369. }
  370. type BpfProgram struct {
  371. Len uint32
  372. _ [4]byte
  373. Insns *BpfInsn
  374. }
  375. type BpfInsn struct {
  376. Code uint16
  377. Jt uint8
  378. Jf uint8
  379. K uint32
  380. }
  381. type BpfHdr struct {
  382. Tstamp Timeval
  383. Caplen uint32
  384. Datalen uint32
  385. Hdrlen uint16
  386. _ [6]byte
  387. }
  388. type Termios struct {
  389. Iflag uint32
  390. Oflag uint32
  391. Cflag uint32
  392. Lflag uint32
  393. Cc [20]uint8
  394. Ispeed uint32
  395. Ospeed uint32
  396. }
  397. type Winsize struct {
  398. Row uint16
  399. Col uint16
  400. Xpixel uint16
  401. Ypixel uint16
  402. }
  403. const (
  404. AT_FDCWD = 0xfffafdcd
  405. AT_SYMLINK_NOFOLLOW = 0x1
  406. )
  407. type PollFd struct {
  408. Fd int32
  409. Events int16
  410. Revents int16
  411. }
  412. const (
  413. POLLERR = 0x8
  414. POLLHUP = 0x10
  415. POLLIN = 0x1
  416. POLLNVAL = 0x20
  417. POLLOUT = 0x4
  418. POLLPRI = 0x2
  419. POLLRDBAND = 0x80
  420. POLLRDNORM = 0x40
  421. POLLWRBAND = 0x100
  422. POLLWRNORM = 0x4
  423. )
  424. type Utsname struct {
  425. Sysname [32]byte
  426. Nodename [32]byte
  427. Release [32]byte
  428. Version [32]byte
  429. Machine [32]byte
  430. }