Source file
src/syscall/ztypes_darwin_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 int32
29 Pad_cgo_0 [4]byte
30 }
31
32 type Timeval32 struct {
33 Sec int32
34 Usec int32
35 }
36
37 type Rusage struct {
38 Utime Timeval
39 Stime Timeval
40 Maxrss int64
41 Ixrss int64
42 Idrss int64
43 Isrss int64
44 Minflt int64
45 Majflt int64
46 Nswap int64
47 Inblock int64
48 Oublock int64
49 Msgsnd int64
50 Msgrcv int64
51 Nsignals int64
52 Nvcsw int64
53 Nivcsw int64
54 }
55
56 type Rlimit struct {
57 Cur uint64
58 Max uint64
59 }
60
61 type _Gid_t uint32
62
63 type Stat_t struct {
64 Dev int32
65 Mode uint16
66 Nlink uint16
67 Ino uint64
68 Uid uint32
69 Gid uint32
70 Rdev int32
71 Pad_cgo_0 [4]byte
72 Atimespec Timespec
73 Mtimespec Timespec
74 Ctimespec Timespec
75 Birthtimespec Timespec
76 Size int64
77 Blocks int64
78 Blksize int32
79 Flags uint32
80 Gen uint32
81 Lspare int32
82 Qspare [2]int64
83 }
84
85 type Statfs_t struct {
86 Bsize uint32
87 Iosize int32
88 Blocks uint64
89 Bfree uint64
90 Bavail uint64
91 Files uint64
92 Ffree uint64
93 Fsid Fsid
94 Owner uint32
95 Type uint32
96 Flags uint32
97 Fssubtype uint32
98 Fstypename [16]int8
99 Mntonname [1024]int8
100 Mntfromname [1024]int8
101 Reserved [8]uint32
102 }
103
104 type Flock_t struct {
105 Start int64
106 Len int64
107 Pid int32
108 Type int16
109 Whence int16
110 }
111
112 type Fstore_t struct {
113 Flags uint32
114 Posmode int32
115 Offset int64
116 Length int64
117 Bytesalloc int64
118 }
119
120 type Radvisory_t struct {
121 Offset int64
122 Count int32
123 Pad_cgo_0 [4]byte
124 }
125
126 type Fbootstraptransfer_t struct {
127 Offset int64
128 Length uint64
129 Buffer *byte
130 }
131
132 type Log2phys_t struct {
133 Flags uint32
134 Contigbytes int64
135 Devoffset int64
136 }
137
138 type Fsid struct {
139 Val [2]int32
140 }
141
142 type Dirent struct {
143 Ino uint64
144 Seekoff uint64
145 Reclen uint16
146 Namlen uint16
147 Type uint8
148 Name [1024]int8
149 Pad_cgo_0 [3]byte
150 }
151
152 const (
153 pathMax = 0x400
154 )
155
156 type RawSockaddrInet4 struct {
157 Len uint8
158 Family uint8
159 Port uint16
160 Addr [4]byte
161 Zero [8]int8
162 }
163
164 type RawSockaddrInet6 struct {
165 Len uint8
166 Family uint8
167 Port uint16
168 Flowinfo uint32
169 Addr [16]byte
170 Scope_id uint32
171 }
172
173 type RawSockaddrUnix struct {
174 Len uint8
175 Family uint8
176 Path [104]int8
177 }
178
179 type RawSockaddrDatalink struct {
180 Len uint8
181 Family uint8
182 Index uint16
183 Type uint8
184 Nlen uint8
185 Alen uint8
186 Slen uint8
187 Data [12]int8
188 }
189
190 type RawSockaddr struct {
191 Len uint8
192 Family uint8
193 Data [14]int8
194 }
195
196 type RawSockaddrAny struct {
197 Addr RawSockaddr
198 Pad [92]int8
199 }
200
201 type _Socklen uint32
202
203 type Linger struct {
204 Onoff int32
205 Linger int32
206 }
207
208 type Iovec struct {
209 Base *byte
210 Len uint64
211 }
212
213 type IPMreq struct {
214 Multiaddr [4]byte
215 Interface [4]byte
216 }
217
218 type IPv6Mreq struct {
219 Multiaddr [16]byte
220 Interface uint32
221 }
222
223 type Msghdr struct {
224 Name *byte
225 Namelen uint32
226 Pad_cgo_0 [4]byte
227 Iov *Iovec
228 Iovlen int32
229 Pad_cgo_1 [4]byte
230 Control *byte
231 Controllen uint32
232 Flags int32
233 }
234
235 type Cmsghdr struct {
236 Len uint32
237 Level int32
238 Type int32
239 }
240
241 type Inet4Pktinfo struct {
242 Ifindex uint32
243 Spec_dst [4]byte
244 Addr [4]byte
245 }
246
247 type Inet6Pktinfo struct {
248 Addr [16]byte
249 Ifindex uint32
250 }
251
252 type IPv6MTUInfo struct {
253 Addr RawSockaddrInet6
254 Mtu uint32
255 }
256
257 type ICMPv6Filter struct {
258 Filt [8]uint32
259 }
260
261 const (
262 SizeofSockaddrInet4 = 0x10
263 SizeofSockaddrInet6 = 0x1c
264 SizeofSockaddrAny = 0x6c
265 SizeofSockaddrUnix = 0x6a
266 SizeofSockaddrDatalink = 0x14
267 SizeofLinger = 0x8
268 SizeofIPMreq = 0x8
269 SizeofIPv6Mreq = 0x14
270 SizeofMsghdr = 0x30
271 SizeofCmsghdr = 0xc
272 SizeofInet4Pktinfo = 0xc
273 SizeofInet6Pktinfo = 0x14
274 SizeofIPv6MTUInfo = 0x20
275 SizeofICMPv6Filter = 0x20
276 )
277
278 const (
279 PTRACE_TRACEME = 0x0
280 PTRACE_CONT = 0x7
281 PTRACE_KILL = 0x8
282 )
283
284 type Kevent_t struct {
285 Ident uint64
286 Filter int16
287 Flags uint16
288 Fflags uint32
289 Data int64
290 Udata *byte
291 }
292
293 type FdSet struct {
294 Bits [32]int32
295 }
296
297 const (
298 SizeofIfMsghdr = 0x70
299 SizeofIfData = 0x60
300 SizeofIfaMsghdr = 0x14
301 SizeofIfmaMsghdr = 0x10
302 SizeofIfmaMsghdr2 = 0x14
303 SizeofRtMsghdr = 0x5c
304 SizeofRtMetrics = 0x38
305 )
306
307 type IfMsghdr struct {
308 Msglen uint16
309 Version uint8
310 Type uint8
311 Addrs int32
312 Flags int32
313 Index uint16
314 Pad_cgo_0 [2]byte
315 Data IfData
316 }
317
318 type IfData struct {
319 Type uint8
320 Typelen uint8
321 Physical uint8
322 Addrlen uint8
323 Hdrlen uint8
324 Recvquota uint8
325 Xmitquota uint8
326 Unused1 uint8
327 Mtu uint32
328 Metric uint32
329 Baudrate uint32
330 Ipackets uint32
331 Ierrors uint32
332 Opackets uint32
333 Oerrors uint32
334 Collisions uint32
335 Ibytes uint32
336 Obytes uint32
337 Imcasts uint32
338 Omcasts uint32
339 Iqdrops uint32
340 Noproto uint32
341 Recvtiming uint32
342 Xmittiming uint32
343 Lastchange Timeval32
344 Unused2 uint32
345 Hwassist uint32
346 Reserved1 uint32
347 Reserved2 uint32
348 }
349
350 type IfaMsghdr struct {
351 Msglen uint16
352 Version uint8
353 Type uint8
354 Addrs int32
355 Flags int32
356 Index uint16
357 Pad_cgo_0 [2]byte
358 Metric int32
359 }
360
361 type IfmaMsghdr struct {
362 Msglen uint16
363 Version uint8
364 Type uint8
365 Addrs int32
366 Flags int32
367 Index uint16
368 Pad_cgo_0 [2]byte
369 }
370
371 type IfmaMsghdr2 struct {
372 Msglen uint16
373 Version uint8
374 Type uint8
375 Addrs int32
376 Flags int32
377 Index uint16
378 Pad_cgo_0 [2]byte
379 Refcount int32
380 }
381
382 type RtMsghdr struct {
383 Msglen uint16
384 Version uint8
385 Type uint8
386 Index uint16
387 Pad_cgo_0 [2]byte
388 Flags int32
389 Addrs int32
390 Pid int32
391 Seq int32
392 Errno int32
393 Use int32
394 Inits uint32
395 Rmx RtMetrics
396 }
397
398 type RtMetrics struct {
399 Locks uint32
400 Mtu uint32
401 Hopcount uint32
402 Expire int32
403 Recvpipe uint32
404 Sendpipe uint32
405 Ssthresh uint32
406 Rtt uint32
407 Rttvar uint32
408 Pksent uint32
409 Filler [4]uint32
410 }
411
412 const (
413 SizeofBpfVersion = 0x4
414 SizeofBpfStat = 0x8
415 SizeofBpfProgram = 0x10
416 SizeofBpfInsn = 0x8
417 SizeofBpfHdr = 0x14
418 )
419
420 type BpfVersion struct {
421 Major uint16
422 Minor uint16
423 }
424
425 type BpfStat struct {
426 Recv uint32
427 Drop uint32
428 }
429
430 type BpfProgram struct {
431 Len uint32
432 Pad_cgo_0 [4]byte
433 Insns *BpfInsn
434 }
435
436 type BpfInsn struct {
437 Code uint16
438 Jt uint8
439 Jf uint8
440 K uint32
441 }
442
443 type BpfHdr struct {
444 Tstamp Timeval32
445 Caplen uint32
446 Datalen uint32
447 Hdrlen uint16
448 Pad_cgo_0 [2]byte
449 }
450
451 const (
452 _AT_FDCWD = -0x2
453 )
454
455 type Termios struct {
456 Iflag uint64
457 Oflag uint64
458 Cflag uint64
459 Lflag uint64
460 Cc [20]uint8
461 Pad_cgo_0 [4]byte
462 Ispeed uint64
463 Ospeed uint64
464 }
465
View as plain text