Source file
src/syscall/ztypes_freebsd_arm64.go
Documentation: syscall
1
2
3
4
5
6
7 package syscall
8
9 const (
10 sizeofPtr = 0x8
11 sizeofShort = 0x2
12 sizeofInt = 0x4
13 sizeofLong = 0x8
14 sizeofLongLong = 0x8
15 )
16
17 type (
18 _C_short int16
19 _C_int int32
20 _C_long int64
21 _C_long_long int64
22 )
23
24 type Timespec struct {
25 Sec int64
26 Nsec int64
27 }
28
29 type Timeval struct {
30 Sec int64
31 Usec int64
32 }
33
34 type Rusage struct {
35 Utime Timeval
36 Stime Timeval
37 Maxrss int64
38 Ixrss int64
39 Idrss int64
40 Isrss int64
41 Minflt int64
42 Majflt int64
43 Nswap int64
44 Inblock int64
45 Oublock int64
46 Msgsnd int64
47 Msgrcv int64
48 Nsignals int64
49 Nvcsw int64
50 Nivcsw int64
51 }
52
53 type Rlimit struct {
54 Cur int64
55 Max int64
56 }
57
58 type _Gid_t uint32
59
60 const (
61 S_IFMT = 0xf000
62 S_IFIFO = 0x1000
63 S_IFCHR = 0x2000
64 S_IFDIR = 0x4000
65 S_IFBLK = 0x6000
66 S_IFREG = 0x8000
67 S_IFLNK = 0xa000
68 S_IFSOCK = 0xc000
69 S_ISUID = 0x800
70 S_ISGID = 0x400
71 S_ISVTX = 0x200
72 S_IRUSR = 0x100
73 S_IWUSR = 0x80
74 S_IXUSR = 0x40
75 S_IRWXG = 0x38
76 S_IRWXO = 0x7
77 )
78
79 const (
80 _statfsVersion = 0x20140518
81 _dirblksiz = 0x400
82 )
83
84 type Stat_t struct {
85 Dev uint64
86 Ino uint64
87 Nlink uint64
88 Mode uint16
89 Padding0 int16
90 Uid uint32
91 Gid uint32
92 Padding1 int32
93 Rdev uint64
94 Atimespec Timespec
95 Mtimespec Timespec
96 Ctimespec Timespec
97 Birthtimespec Timespec
98 Size int64
99 Blocks int64
100 Blksize int32
101 Flags uint32
102 Gen uint64
103 Spare [10]uint64
104 }
105
106 type stat_freebsd11_t struct {
107 Dev uint32
108 Ino uint32
109 Mode uint16
110 Nlink uint16
111 Uid uint32
112 Gid uint32
113 Rdev uint32
114 Atimespec Timespec
115 Mtimespec Timespec
116 Ctimespec Timespec
117 Size int64
118 Blocks int64
119 Blksize int32
120 Flags uint32
121 Gen uint32
122 Lspare int32
123 Birthtimespec Timespec
124 }
125
126 type Statfs_t struct {
127 Version uint32
128 Type uint32
129 Flags uint64
130 Bsize uint64
131 Iosize uint64
132 Blocks uint64
133 Bfree uint64
134 Bavail int64
135 Files uint64
136 Ffree int64
137 Syncwrites uint64
138 Asyncwrites uint64
139 Syncreads uint64
140 Asyncreads uint64
141 Spare [10]uint64
142 Namemax uint32
143 Owner uint32
144 Fsid Fsid
145 Charspare [80]int8
146 Fstypename [16]int8
147 Mntfromname [1024]int8
148 Mntonname [1024]int8
149 }
150
151 type statfs_freebsd11_t struct {
152 Version uint32
153 Type uint32
154 Flags uint64
155 Bsize uint64
156 Iosize uint64
157 Blocks uint64
158 Bfree uint64
159 Bavail int64
160 Files uint64
161 Ffree int64
162 Syncwrites uint64
163 Asyncwrites uint64
164 Syncreads uint64
165 Asyncreads uint64
166 Spare [10]uint64
167 Namemax uint32
168 Owner uint32
169 Fsid Fsid
170 Charspare [80]int8
171 Fstypename [16]int8
172 Mntfromname [88]int8
173 Mntonname [88]int8
174 }
175
176 type Flock_t struct {
177 Start int64
178 Len int64
179 Pid int32
180 Type int16
181 Whence int16
182 Sysid int32
183 Pad_cgo_0 [4]byte
184 }
185
186 type Dirent struct {
187 Fileno uint64
188 Off int64
189 Reclen uint16
190 Type uint8
191 Pad0 uint8
192 Namlen uint16
193 Pad1 uint16
194 Name [256]int8
195 }
196
197 type dirent_freebsd11 struct {
198 Fileno uint32
199 Reclen uint16
200 Type uint8
201 Namlen uint8
202 Name [256]int8
203 }
204
205 type Fsid struct {
206 Val [2]int32
207 }
208
209 const (
210 pathMax = 0x400
211 )
212
213 type RawSockaddrInet4 struct {
214 Len uint8
215 Family uint8
216 Port uint16
217 Addr [4]byte
218 Zero [8]int8
219 }
220
221 type RawSockaddrInet6 struct {
222 Len uint8
223 Family uint8
224 Port uint16
225 Flowinfo uint32
226 Addr [16]byte
227 Scope_id uint32
228 }
229
230 type RawSockaddrUnix struct {
231 Len uint8
232 Family uint8
233 Path [104]int8
234 }
235
236 type RawSockaddrDatalink struct {
237 Len uint8
238 Family uint8
239 Index uint16
240 Type uint8
241 Nlen uint8
242 Alen uint8
243 Slen uint8
244 Data [46]int8
245 }
246
247 type RawSockaddr struct {
248 Len uint8
249 Family uint8
250 Data [14]int8
251 }
252
253 type RawSockaddrAny struct {
254 Addr RawSockaddr
255 Pad [92]int8
256 }
257
258 type _Socklen uint32
259
260 type Linger struct {
261 Onoff int32
262 Linger int32
263 }
264
265 type Iovec struct {
266 Base *byte
267 Len uint64
268 }
269
270 type IPMreq struct {
271 Multiaddr [4]byte
272 Interface [4]byte
273 }
274
275 type IPMreqn struct {
276 Multiaddr [4]byte
277 Address [4]byte
278 Ifindex int32
279 }
280
281 type IPv6Mreq struct {
282 Multiaddr [16]byte
283 Interface uint32
284 }
285
286 type Msghdr struct {
287 Name *byte
288 Namelen uint32
289 Pad_cgo_0 [4]byte
290 Iov *Iovec
291 Iovlen int32
292 Pad_cgo_1 [4]byte
293 Control *byte
294 Controllen uint32
295 Flags int32
296 }
297
298 type Cmsghdr struct {
299 Len uint32
300 Level int32
301 Type int32
302 }
303
304 type Inet6Pktinfo struct {
305 Addr [16]byte
306 Ifindex uint32
307 }
308
309 type IPv6MTUInfo struct {
310 Addr RawSockaddrInet6
311 Mtu uint32
312 }
313
314 type ICMPv6Filter struct {
315 Filt [8]uint32
316 }
317
318 const (
319 SizeofSockaddrInet4 = 0x10
320 SizeofSockaddrInet6 = 0x1c
321 SizeofSockaddrAny = 0x6c
322 SizeofSockaddrUnix = 0x6a
323 SizeofSockaddrDatalink = 0x36
324 SizeofLinger = 0x8
325 SizeofIPMreq = 0x8
326 SizeofIPMreqn = 0xc
327 SizeofIPv6Mreq = 0x14
328 SizeofMsghdr = 0x30
329 SizeofCmsghdr = 0xc
330 SizeofInet6Pktinfo = 0x14
331 SizeofIPv6MTUInfo = 0x20
332 SizeofICMPv6Filter = 0x20
333 )
334
335 const (
336 PTRACE_TRACEME = 0x0
337 PTRACE_CONT = 0x7
338 PTRACE_KILL = 0x8
339 )
340
341 type Kevent_t struct {
342 Ident uint64
343 Filter int16
344 Flags uint16
345 Fflags uint32
346 Data int64
347 Udata *byte
348 }
349
350 type FdSet struct {
351 X__fds_bits [16]uint64
352 }
353
354 const (
355 sizeofIfMsghdr = 0xa8
356 SizeofIfMsghdr = 0xa8
357 sizeofIfData = 0x98
358 SizeofIfData = 0x98
359 SizeofIfaMsghdr = 0x14
360 SizeofIfmaMsghdr = 0x10
361 SizeofIfAnnounceMsghdr = 0x18
362 SizeofRtMsghdr = 0x98
363 SizeofRtMetrics = 0x70
364 )
365
366 type ifMsghdr struct {
367 Msglen uint16
368 Version uint8
369 Type uint8
370 Addrs int32
371 Flags int32
372 Index uint16
373 Pad_cgo_0 [2]byte
374 Data ifData
375 }
376
377 type IfMsghdr struct {
378 Msglen uint16
379 Version uint8
380 Type uint8
381 Addrs int32
382 Flags int32
383 Index uint16
384 Pad_cgo_0 [2]byte
385 Data IfData
386 }
387
388 type ifData struct {
389 Type uint8
390 Physical uint8
391 Addrlen uint8
392 Hdrlen uint8
393 Link_state uint8
394 Vhid uint8
395 Baudrate_pf uint8
396 Datalen uint8
397 Mtu uint64
398 Metric uint64
399 Baudrate uint64
400 Ipackets uint64
401 Ierrors uint64
402 Opackets uint64
403 Oerrors uint64
404 Collisions uint64
405 Ibytes uint64
406 Obytes uint64
407 Imcasts uint64
408 Omcasts uint64
409 Iqdrops uint64
410 Noproto uint64
411 Hwassist uint64
412 Epoch int64
413 Lastchange Timeval
414 }
415
416 type IfData struct {
417 Type uint8
418 Physical uint8
419 Addrlen uint8
420 Hdrlen uint8
421 Link_state uint8
422 Spare_char1 uint8
423 Spare_char2 uint8
424 Datalen uint8
425 Mtu uint64
426 Metric uint64
427 Baudrate uint64
428 Ipackets uint64
429 Ierrors uint64
430 Opackets uint64
431 Oerrors uint64
432 Collisions uint64
433 Ibytes uint64
434 Obytes uint64
435 Imcasts uint64
436 Omcasts uint64
437 Iqdrops uint64
438 Noproto uint64
439 Hwassist uint64
440 Epoch int64
441 Lastchange Timeval
442 }
443
444 type IfaMsghdr struct {
445 Msglen uint16
446 Version uint8
447 Type uint8
448 Addrs int32
449 Flags int32
450 Index uint16
451 Pad_cgo_0 [2]byte
452 Metric int32
453 }
454
455 type IfmaMsghdr struct {
456 Msglen uint16
457 Version uint8
458 Type uint8
459 Addrs int32
460 Flags int32
461 Index uint16
462 Pad_cgo_0 [2]byte
463 }
464
465 type IfAnnounceMsghdr struct {
466 Msglen uint16
467 Version uint8
468 Type uint8
469 Index uint16
470 Name [16]int8
471 What uint16
472 }
473
474 type RtMsghdr struct {
475 Msglen uint16
476 Version uint8
477 Type uint8
478 Index uint16
479 Pad_cgo_0 [2]byte
480 Flags int32
481 Addrs int32
482 Pid int32
483 Seq int32
484 Errno int32
485 Fmask int32
486 Inits uint64
487 Rmx RtMetrics
488 }
489
490 type RtMetrics struct {
491 Locks uint64
492 Mtu uint64
493 Hopcount uint64
494 Expire uint64
495 Recvpipe uint64
496 Sendpipe uint64
497 Ssthresh uint64
498 Rtt uint64
499 Rttvar uint64
500 Pksent uint64
501 Weight uint64
502 Filler [3]uint64
503 }
504
505 const (
506 SizeofBpfVersion = 0x4
507 SizeofBpfStat = 0x8
508 SizeofBpfZbuf = 0x18
509 SizeofBpfProgram = 0x10
510 SizeofBpfInsn = 0x8
511 SizeofBpfHdr = 0x20
512 SizeofBpfZbufHeader = 0x20
513 )
514
515 type BpfVersion struct {
516 Major uint16
517 Minor uint16
518 }
519
520 type BpfStat struct {
521 Recv uint32
522 Drop uint32
523 }
524
525 type BpfZbuf struct {
526 Bufa *byte
527 Bufb *byte
528 Buflen uint64
529 }
530
531 type BpfProgram struct {
532 Len uint32
533 Pad_cgo_0 [4]byte
534 Insns *BpfInsn
535 }
536
537 type BpfInsn struct {
538 Code uint16
539 Jt uint8
540 Jf uint8
541 K uint32
542 }
543
544 type BpfHdr struct {
545 Tstamp Timeval
546 Caplen uint32
547 Datalen uint32
548 Hdrlen uint16
549 Pad_cgo_0 [6]byte
550 }
551
552 type BpfZbufHeader struct {
553 Kernel_gen uint32
554 Kernel_len uint32
555 User_gen uint32
556 X_bzh_pad [5]uint32
557 }
558
559 const (
560 _AT_FDCWD = -0x64
561 _AT_SYMLINK_FOLLOW = 0x400
562 _AT_SYMLINK_NOFOLLOW = 0x200
563 )
564
565 type Termios struct {
566 Iflag uint32
567 Oflag uint32
568 Cflag uint32
569 Lflag uint32
570 Cc [20]uint8
571 Ispeed uint32
572 Ospeed uint32
573 }
574
View as plain text