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.
 
 
 

485 lines
7.1 KiB

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