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