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.2 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 386,openbsd
  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 int64
  20. Nsec int32
  21. }
  22. type Timeval struct {
  23. Sec int64
  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 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 uint32
  79. Flags uint32
  80. Gen uint32
  81. X__st_birthtim Timespec
  82. }
  83. type Statfs_t struct {
  84. F_flags uint32
  85. F_bsize uint32
  86. F_iosize uint32
  87. F_blocks uint64
  88. F_bfree uint64
  89. F_bavail int64
  90. F_files uint64
  91. F_ffree uint64
  92. F_favail int64
  93. F_syncwrites uint64
  94. F_syncreads uint64
  95. F_asyncwrites uint64
  96. F_asyncreads uint64
  97. F_fsid Fsid
  98. F_namemax uint32
  99. F_owner uint32
  100. F_ctime uint64
  101. F_fstypename [16]int8
  102. F_mntonname [90]int8
  103. F_mntfromname [90]int8
  104. F_mntfromspec [90]int8
  105. Pad_cgo_0 [2]byte
  106. Mount_info [160]byte
  107. }
  108. type Flock_t struct {
  109. Start int64
  110. Len int64
  111. Pid int32
  112. Type int16
  113. Whence int16
  114. }
  115. type Dirent struct {
  116. Fileno uint64
  117. Off int64
  118. Reclen uint16
  119. Type uint8
  120. Namlen uint8
  121. X__d_padding [4]uint8
  122. Name [256]int8
  123. }
  124. type Fsid struct {
  125. Val [2]int32
  126. }
  127. const (
  128. PathMax = 0x400
  129. )
  130. type RawSockaddrInet4 struct {
  131. Len uint8
  132. Family uint8
  133. Port uint16
  134. Addr [4]byte /* in_addr */
  135. Zero [8]int8
  136. }
  137. type RawSockaddrInet6 struct {
  138. Len uint8
  139. Family uint8
  140. Port uint16
  141. Flowinfo uint32
  142. Addr [16]byte /* in6_addr */
  143. Scope_id uint32
  144. }
  145. type RawSockaddrUnix struct {
  146. Len uint8
  147. Family uint8
  148. Path [104]int8
  149. }
  150. type RawSockaddrDatalink struct {
  151. Len uint8
  152. Family uint8
  153. Index uint16
  154. Type uint8
  155. Nlen uint8
  156. Alen uint8
  157. Slen uint8
  158. Data [24]int8
  159. }
  160. type RawSockaddr struct {
  161. Len uint8
  162. Family uint8
  163. Data [14]int8
  164. }
  165. type RawSockaddrAny struct {
  166. Addr RawSockaddr
  167. Pad [92]int8
  168. }
  169. type _Socklen uint32
  170. type Linger struct {
  171. Onoff int32
  172. Linger int32
  173. }
  174. type Iovec struct {
  175. Base *byte
  176. Len uint32
  177. }
  178. type IPMreq struct {
  179. Multiaddr [4]byte /* in_addr */
  180. Interface [4]byte /* in_addr */
  181. }
  182. type IPv6Mreq struct {
  183. Multiaddr [16]byte /* in6_addr */
  184. Interface uint32
  185. }
  186. type Msghdr struct {
  187. Name *byte
  188. Namelen uint32
  189. Iov *Iovec
  190. Iovlen uint32
  191. Control *byte
  192. Controllen uint32
  193. Flags int32
  194. }
  195. type Cmsghdr struct {
  196. Len uint32
  197. Level int32
  198. Type int32
  199. }
  200. type Inet6Pktinfo struct {
  201. Addr [16]byte /* in6_addr */
  202. Ifindex uint32
  203. }
  204. type IPv6MTUInfo struct {
  205. Addr RawSockaddrInet6
  206. Mtu uint32
  207. }
  208. type ICMPv6Filter struct {
  209. Filt [8]uint32
  210. }
  211. const (
  212. SizeofSockaddrInet4 = 0x10
  213. SizeofSockaddrInet6 = 0x1c
  214. SizeofSockaddrAny = 0x6c
  215. SizeofSockaddrUnix = 0x6a
  216. SizeofSockaddrDatalink = 0x20
  217. SizeofLinger = 0x8
  218. SizeofIPMreq = 0x8
  219. SizeofIPv6Mreq = 0x14
  220. SizeofMsghdr = 0x1c
  221. SizeofCmsghdr = 0xc
  222. SizeofInet6Pktinfo = 0x14
  223. SizeofIPv6MTUInfo = 0x20
  224. SizeofICMPv6Filter = 0x20
  225. )
  226. const (
  227. PTRACE_TRACEME = 0x0
  228. PTRACE_CONT = 0x7
  229. PTRACE_KILL = 0x8
  230. )
  231. type Kevent_t struct {
  232. Ident uint32
  233. Filter int16
  234. Flags uint16
  235. Fflags uint32
  236. Data int64
  237. Udata *byte
  238. }
  239. type FdSet struct {
  240. Bits [32]uint32
  241. }
  242. const (
  243. SizeofIfMsghdr = 0xec
  244. SizeofIfData = 0xd4
  245. SizeofIfaMsghdr = 0x18
  246. SizeofIfAnnounceMsghdr = 0x1a
  247. SizeofRtMsghdr = 0x60
  248. SizeofRtMetrics = 0x38
  249. )
  250. type IfMsghdr struct {
  251. Msglen uint16
  252. Version uint8
  253. Type uint8
  254. Hdrlen uint16
  255. Index uint16
  256. Tableid uint16
  257. Pad1 uint8
  258. Pad2 uint8
  259. Addrs int32
  260. Flags int32
  261. Xflags int32
  262. Data IfData
  263. }
  264. type IfData struct {
  265. Type uint8
  266. Addrlen uint8
  267. Hdrlen uint8
  268. Link_state uint8
  269. Mtu uint32
  270. Metric uint32
  271. Pad uint32
  272. Baudrate uint64
  273. Ipackets uint64
  274. Ierrors uint64
  275. Opackets uint64
  276. Oerrors uint64
  277. Collisions uint64
  278. Ibytes uint64
  279. Obytes uint64
  280. Imcasts uint64
  281. Omcasts uint64
  282. Iqdrops uint64
  283. Noproto uint64
  284. Capabilities uint32
  285. Lastchange Timeval
  286. Mclpool [7]Mclpool
  287. }
  288. type IfaMsghdr struct {
  289. Msglen uint16
  290. Version uint8
  291. Type uint8
  292. Hdrlen uint16
  293. Index uint16
  294. Tableid uint16
  295. Pad1 uint8
  296. Pad2 uint8
  297. Addrs int32
  298. Flags int32
  299. Metric int32
  300. }
  301. type IfAnnounceMsghdr struct {
  302. Msglen uint16
  303. Version uint8
  304. Type uint8
  305. Hdrlen uint16
  306. Index uint16
  307. What uint16
  308. Name [16]int8
  309. }
  310. type RtMsghdr struct {
  311. Msglen uint16
  312. Version uint8
  313. Type uint8
  314. Hdrlen uint16
  315. Index uint16
  316. Tableid uint16
  317. Priority uint8
  318. Mpls uint8
  319. Addrs int32
  320. Flags int32
  321. Fmask int32
  322. Pid int32
  323. Seq int32
  324. Errno int32
  325. Inits uint32
  326. Rmx RtMetrics
  327. }
  328. type RtMetrics struct {
  329. Pksent uint64
  330. Expire int64
  331. Locks uint32
  332. Mtu uint32
  333. Refcnt uint32
  334. Hopcount uint32
  335. Recvpipe uint32
  336. Sendpipe uint32
  337. Ssthresh uint32
  338. Rtt uint32
  339. Rttvar uint32
  340. Pad uint32
  341. }
  342. type Mclpool struct {
  343. Grown int32
  344. Alive uint16
  345. Hwm uint16
  346. Cwm uint16
  347. Lwm uint16
  348. }
  349. const (
  350. SizeofBpfVersion = 0x4
  351. SizeofBpfStat = 0x8
  352. SizeofBpfProgram = 0x8
  353. SizeofBpfInsn = 0x8
  354. SizeofBpfHdr = 0x14
  355. )
  356. type BpfVersion struct {
  357. Major uint16
  358. Minor uint16
  359. }
  360. type BpfStat struct {
  361. Recv uint32
  362. Drop uint32
  363. }
  364. type BpfProgram struct {
  365. Len uint32
  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. Pad_cgo_0 [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. }