]>
Commit | Line | Data |
---|---|---|
9b12e4fe JC |
1 | // Created by cgo -godefs - DO NOT EDIT |
2 | // cgo -godefs types_openbsd.go | |
3 | ||
4 | // +build 386,openbsd | |
5 | ||
6 | package unix | |
7 | ||
8 | const ( | |
9 | sizeofPtr = 0x4 | |
10 | sizeofShort = 0x2 | |
11 | sizeofInt = 0x4 | |
12 | sizeofLong = 0x4 | |
13 | sizeofLongLong = 0x8 | |
14 | ) | |
15 | ||
16 | type ( | |
17 | _C_short int16 | |
18 | _C_int int32 | |
19 | _C_long int32 | |
20 | _C_long_long int64 | |
21 | ) | |
22 | ||
23 | type Timespec struct { | |
24 | Sec int64 | |
25 | Nsec int32 | |
26 | } | |
27 | ||
28 | type Timeval struct { | |
29 | Sec int64 | |
30 | Usec int32 | |
31 | } | |
32 | ||
33 | type Rusage struct { | |
34 | Utime Timeval | |
35 | Stime Timeval | |
36 | Maxrss int32 | |
37 | Ixrss int32 | |
38 | Idrss int32 | |
39 | Isrss int32 | |
40 | Minflt int32 | |
41 | Majflt int32 | |
42 | Nswap int32 | |
43 | Inblock int32 | |
44 | Oublock int32 | |
45 | Msgsnd int32 | |
46 | Msgrcv int32 | |
47 | Nsignals int32 | |
48 | Nvcsw int32 | |
49 | Nivcsw int32 | |
50 | } | |
51 | ||
52 | type Rlimit struct { | |
53 | Cur uint64 | |
54 | Max uint64 | |
55 | } | |
56 | ||
57 | type _Gid_t uint32 | |
58 | ||
59 | const ( | |
60 | S_IFMT = 0xf000 | |
61 | S_IFIFO = 0x1000 | |
62 | S_IFCHR = 0x2000 | |
63 | S_IFDIR = 0x4000 | |
64 | S_IFBLK = 0x6000 | |
65 | S_IFREG = 0x8000 | |
66 | S_IFLNK = 0xa000 | |
67 | S_IFSOCK = 0xc000 | |
68 | S_ISUID = 0x800 | |
69 | S_ISGID = 0x400 | |
70 | S_ISVTX = 0x200 | |
71 | S_IRUSR = 0x100 | |
72 | S_IWUSR = 0x80 | |
73 | S_IXUSR = 0x40 | |
74 | ) | |
75 | ||
76 | type Stat_t struct { | |
77 | Mode uint32 | |
78 | Dev int32 | |
79 | Ino uint64 | |
80 | Nlink uint32 | |
81 | Uid uint32 | |
82 | Gid uint32 | |
83 | Rdev int32 | |
84 | Atim Timespec | |
85 | Mtim Timespec | |
86 | Ctim Timespec | |
87 | Size int64 | |
88 | Blocks int64 | |
89 | Blksize uint32 | |
90 | Flags uint32 | |
91 | Gen uint32 | |
92 | X__st_birthtim Timespec | |
93 | } | |
94 | ||
95 | type Statfs_t struct { | |
96 | F_flags uint32 | |
97 | F_bsize uint32 | |
98 | F_iosize uint32 | |
99 | F_blocks uint64 | |
100 | F_bfree uint64 | |
101 | F_bavail int64 | |
102 | F_files uint64 | |
103 | F_ffree uint64 | |
104 | F_favail int64 | |
105 | F_syncwrites uint64 | |
106 | F_syncreads uint64 | |
107 | F_asyncwrites uint64 | |
108 | F_asyncreads uint64 | |
109 | F_fsid Fsid | |
110 | F_namemax uint32 | |
111 | F_owner uint32 | |
112 | F_ctime uint64 | |
113 | F_fstypename [16]int8 | |
114 | F_mntonname [90]int8 | |
115 | F_mntfromname [90]int8 | |
116 | F_mntfromspec [90]int8 | |
117 | Pad_cgo_0 [2]byte | |
118 | Mount_info [160]byte | |
119 | } | |
120 | ||
121 | type Flock_t struct { | |
122 | Start int64 | |
123 | Len int64 | |
124 | Pid int32 | |
125 | Type int16 | |
126 | Whence int16 | |
127 | } | |
128 | ||
129 | type Dirent struct { | |
130 | Fileno uint64 | |
131 | Off int64 | |
132 | Reclen uint16 | |
133 | Type uint8 | |
134 | Namlen uint8 | |
135 | X__d_padding [4]uint8 | |
136 | Name [256]int8 | |
137 | } | |
138 | ||
139 | type Fsid struct { | |
140 | Val [2]int32 | |
141 | } | |
142 | ||
143 | type RawSockaddrInet4 struct { | |
144 | Len uint8 | |
145 | Family uint8 | |
146 | Port uint16 | |
147 | Addr [4]byte /* in_addr */ | |
148 | Zero [8]int8 | |
149 | } | |
150 | ||
151 | type RawSockaddrInet6 struct { | |
152 | Len uint8 | |
153 | Family uint8 | |
154 | Port uint16 | |
155 | Flowinfo uint32 | |
156 | Addr [16]byte /* in6_addr */ | |
157 | Scope_id uint32 | |
158 | } | |
159 | ||
160 | type RawSockaddrUnix struct { | |
161 | Len uint8 | |
162 | Family uint8 | |
163 | Path [104]int8 | |
164 | } | |
165 | ||
166 | type RawSockaddrDatalink struct { | |
167 | Len uint8 | |
168 | Family uint8 | |
169 | Index uint16 | |
170 | Type uint8 | |
171 | Nlen uint8 | |
172 | Alen uint8 | |
173 | Slen uint8 | |
174 | Data [24]int8 | |
175 | } | |
176 | ||
177 | type RawSockaddr struct { | |
178 | Len uint8 | |
179 | Family uint8 | |
180 | Data [14]int8 | |
181 | } | |
182 | ||
183 | type RawSockaddrAny struct { | |
184 | Addr RawSockaddr | |
185 | Pad [92]int8 | |
186 | } | |
187 | ||
188 | type _Socklen uint32 | |
189 | ||
190 | type Linger struct { | |
191 | Onoff int32 | |
192 | Linger int32 | |
193 | } | |
194 | ||
195 | type Iovec struct { | |
196 | Base *byte | |
197 | Len uint32 | |
198 | } | |
199 | ||
200 | type IPMreq struct { | |
201 | Multiaddr [4]byte /* in_addr */ | |
202 | Interface [4]byte /* in_addr */ | |
203 | } | |
204 | ||
205 | type IPv6Mreq struct { | |
206 | Multiaddr [16]byte /* in6_addr */ | |
207 | Interface uint32 | |
208 | } | |
209 | ||
210 | type Msghdr struct { | |
211 | Name *byte | |
212 | Namelen uint32 | |
213 | Iov *Iovec | |
214 | Iovlen uint32 | |
215 | Control *byte | |
216 | Controllen uint32 | |
217 | Flags int32 | |
218 | } | |
219 | ||
220 | type Cmsghdr struct { | |
221 | Len uint32 | |
222 | Level int32 | |
223 | Type int32 | |
224 | } | |
225 | ||
226 | type Inet6Pktinfo struct { | |
227 | Addr [16]byte /* in6_addr */ | |
228 | Ifindex uint32 | |
229 | } | |
230 | ||
231 | type IPv6MTUInfo struct { | |
232 | Addr RawSockaddrInet6 | |
233 | Mtu uint32 | |
234 | } | |
235 | ||
236 | type ICMPv6Filter struct { | |
237 | Filt [8]uint32 | |
238 | } | |
239 | ||
240 | const ( | |
241 | SizeofSockaddrInet4 = 0x10 | |
242 | SizeofSockaddrInet6 = 0x1c | |
243 | SizeofSockaddrAny = 0x6c | |
244 | SizeofSockaddrUnix = 0x6a | |
245 | SizeofSockaddrDatalink = 0x20 | |
246 | SizeofLinger = 0x8 | |
247 | SizeofIPMreq = 0x8 | |
248 | SizeofIPv6Mreq = 0x14 | |
249 | SizeofMsghdr = 0x1c | |
250 | SizeofCmsghdr = 0xc | |
251 | SizeofInet6Pktinfo = 0x14 | |
252 | SizeofIPv6MTUInfo = 0x20 | |
253 | SizeofICMPv6Filter = 0x20 | |
254 | ) | |
255 | ||
256 | const ( | |
257 | PTRACE_TRACEME = 0x0 | |
258 | PTRACE_CONT = 0x7 | |
259 | PTRACE_KILL = 0x8 | |
260 | ) | |
261 | ||
262 | type Kevent_t struct { | |
263 | Ident uint32 | |
264 | Filter int16 | |
265 | Flags uint16 | |
266 | Fflags uint32 | |
267 | Data int64 | |
268 | Udata *byte | |
269 | } | |
270 | ||
271 | type FdSet struct { | |
272 | Bits [32]uint32 | |
273 | } | |
274 | ||
275 | const ( | |
276 | SizeofIfMsghdr = 0xec | |
277 | SizeofIfData = 0xd4 | |
278 | SizeofIfaMsghdr = 0x18 | |
279 | SizeofIfAnnounceMsghdr = 0x1a | |
280 | SizeofRtMsghdr = 0x60 | |
281 | SizeofRtMetrics = 0x38 | |
282 | ) | |
283 | ||
284 | type IfMsghdr struct { | |
285 | Msglen uint16 | |
286 | Version uint8 | |
287 | Type uint8 | |
288 | Hdrlen uint16 | |
289 | Index uint16 | |
290 | Tableid uint16 | |
291 | Pad1 uint8 | |
292 | Pad2 uint8 | |
293 | Addrs int32 | |
294 | Flags int32 | |
295 | Xflags int32 | |
296 | Data IfData | |
297 | } | |
298 | ||
299 | type IfData struct { | |
300 | Type uint8 | |
301 | Addrlen uint8 | |
302 | Hdrlen uint8 | |
303 | Link_state uint8 | |
304 | Mtu uint32 | |
305 | Metric uint32 | |
306 | Pad uint32 | |
307 | Baudrate uint64 | |
308 | Ipackets uint64 | |
309 | Ierrors uint64 | |
310 | Opackets uint64 | |
311 | Oerrors uint64 | |
312 | Collisions uint64 | |
313 | Ibytes uint64 | |
314 | Obytes uint64 | |
315 | Imcasts uint64 | |
316 | Omcasts uint64 | |
317 | Iqdrops uint64 | |
318 | Noproto uint64 | |
319 | Capabilities uint32 | |
320 | Lastchange Timeval | |
321 | Mclpool [7]Mclpool | |
322 | } | |
323 | ||
324 | type IfaMsghdr struct { | |
325 | Msglen uint16 | |
326 | Version uint8 | |
327 | Type uint8 | |
328 | Hdrlen uint16 | |
329 | Index uint16 | |
330 | Tableid uint16 | |
331 | Pad1 uint8 | |
332 | Pad2 uint8 | |
333 | Addrs int32 | |
334 | Flags int32 | |
335 | Metric int32 | |
336 | } | |
337 | ||
338 | type IfAnnounceMsghdr struct { | |
339 | Msglen uint16 | |
340 | Version uint8 | |
341 | Type uint8 | |
342 | Hdrlen uint16 | |
343 | Index uint16 | |
344 | What uint16 | |
345 | Name [16]int8 | |
346 | } | |
347 | ||
348 | type RtMsghdr struct { | |
349 | Msglen uint16 | |
350 | Version uint8 | |
351 | Type uint8 | |
352 | Hdrlen uint16 | |
353 | Index uint16 | |
354 | Tableid uint16 | |
355 | Priority uint8 | |
356 | Mpls uint8 | |
357 | Addrs int32 | |
358 | Flags int32 | |
359 | Fmask int32 | |
360 | Pid int32 | |
361 | Seq int32 | |
362 | Errno int32 | |
363 | Inits uint32 | |
364 | Rmx RtMetrics | |
365 | } | |
366 | ||
367 | type RtMetrics struct { | |
368 | Pksent uint64 | |
369 | Expire int64 | |
370 | Locks uint32 | |
371 | Mtu uint32 | |
372 | Refcnt uint32 | |
373 | Hopcount uint32 | |
374 | Recvpipe uint32 | |
375 | Sendpipe uint32 | |
376 | Ssthresh uint32 | |
377 | Rtt uint32 | |
378 | Rttvar uint32 | |
379 | Pad uint32 | |
380 | } | |
381 | ||
382 | type Mclpool struct { | |
383 | Grown int32 | |
384 | Alive uint16 | |
385 | Hwm uint16 | |
386 | Cwm uint16 | |
387 | Lwm uint16 | |
388 | } | |
389 | ||
390 | const ( | |
391 | SizeofBpfVersion = 0x4 | |
392 | SizeofBpfStat = 0x8 | |
393 | SizeofBpfProgram = 0x8 | |
394 | SizeofBpfInsn = 0x8 | |
395 | SizeofBpfHdr = 0x14 | |
396 | ) | |
397 | ||
398 | type BpfVersion struct { | |
399 | Major uint16 | |
400 | Minor uint16 | |
401 | } | |
402 | ||
403 | type BpfStat struct { | |
404 | Recv uint32 | |
405 | Drop uint32 | |
406 | } | |
407 | ||
408 | type BpfProgram struct { | |
409 | Len uint32 | |
410 | Insns *BpfInsn | |
411 | } | |
412 | ||
413 | type BpfInsn struct { | |
414 | Code uint16 | |
415 | Jt uint8 | |
416 | Jf uint8 | |
417 | K uint32 | |
418 | } | |
419 | ||
420 | type BpfHdr struct { | |
421 | Tstamp BpfTimeval | |
422 | Caplen uint32 | |
423 | Datalen uint32 | |
424 | Hdrlen uint16 | |
425 | Pad_cgo_0 [2]byte | |
426 | } | |
427 | ||
428 | type BpfTimeval struct { | |
429 | Sec uint32 | |
430 | Usec uint32 | |
431 | } | |
432 | ||
433 | type Termios struct { | |
434 | Iflag uint32 | |
435 | Oflag uint32 | |
436 | Cflag uint32 | |
437 | Lflag uint32 | |
438 | Cc [20]uint8 | |
439 | Ispeed int32 | |
440 | Ospeed int32 | |
441 | } |