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