Source file
src/syscall/ztypes_freebsd_riscv64.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 int64
52 Max int64
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 const (
77 _statfsVersion = 0x20140518
78 _dirblksiz = 0x400
79 )
80
81 type Stat_t struct {
82 Dev uint64
83 Ino uint64
84 Nlink uint64
85 Mode uint16
86 Padding0 int16
87 Uid uint32
88 Gid uint32
89 Padding1 int32
90 Rdev uint64
91 Atimespec Timespec
92 Mtimespec Timespec
93 Ctimespec Timespec
94 Birthtimespec Timespec
95 Size int64
96 Blocks int64
97 Blksize int32
98 Flags uint32
99 Gen uint64
100 Spare [10]uint64
101 }
102
103 type Statfs_t struct {
104 Version uint32
105 Type uint32
106 Flags uint64
107 Bsize uint64
108 Iosize uint64
109 Blocks uint64
110 Bfree uint64
111 Bavail int64
112 Files uint64
113 Ffree int64
114 Syncwrites uint64
115 Asyncwrites uint64
116 Syncreads uint64
117 Asyncreads uint64
118 Spare [10]uint64
119 Namemax uint32
120 Owner uint32
121 Fsid Fsid
122 Charspare [80]int8
123 Fstypename [16]int8
124 Mntfromname [1024]int8
125 Mntonname [1024]int8
126 }
127
128 type Flock_t struct {
129 Start int64
130 Len int64
131 Pid int32
132 Type int16
133 Whence int16
134 Sysid int32
135 Pad_cgo_0 [4]byte
136 }
137
138 type Dirent struct {
139 Fileno uint64
140 Off int64
141 Reclen uint16
142 Type uint8
143 Pad0 uint8
144 Namlen uint16
145 Pad1 uint16
146 Name [256]int8
147 }
148
149 type Fsid struct {
150 Val [2]int32
151 }
152
153 const (
154 pathMax = 0x400
155 )
156
157 type RawSockaddrInet4 struct {
158 Len uint8
159 Family uint8
160 Port uint16
161 Addr [4]byte
162 Zero [8]int8
163 }
164
165 type RawSockaddrInet6 struct {
166 Len uint8
167 Family uint8
168 Port uint16
169 Flowinfo uint32
170 Addr [16]byte
171 Scope_id uint32
172 }
173
174 type RawSockaddrUnix struct {
175 Len uint8
176 Family uint8
177 Path [104]int8
178 }
179
180 type RawSockaddrDatalink struct {
181 Len uint8
182 Family uint8
183 Index uint16
184 Type uint8
185 Nlen uint8
186 Alen uint8
187 Slen uint8
188 Data [46]int8
189 }
190
191 type RawSockaddr struct {
192 Len uint8
193 Family uint8
194 Data [14]int8
195 }
196
197 type RawSockaddrAny struct {
198 Addr RawSockaddr
199 Pad [92]int8
200 }
201
202 type _Socklen uint32
203
204 type Linger struct {
205 Onoff int32
206 Linger int32
207 }
208
209 type Iovec struct {
210 Base *byte
211 Len uint64
212 }
213
214 type IPMreq struct {
215 Multiaddr [4]byte
216 Interface [4]byte
217 }
218
219 type IPMreqn struct {
220 Multiaddr [4]byte
221 Address [4]byte
222 Ifindex int32
223 }
224
225 type IPv6Mreq struct {
226 Multiaddr [16]byte
227 Interface uint32
228 }
229
230 type Msghdr struct {
231 Name *byte
232 Namelen uint32
233 Pad_cgo_0 [4]byte
234 Iov *Iovec
235 Iovlen int32
236 Pad_cgo_1 [4]byte
237 Control *byte
238 Controllen uint32
239 Flags int32
240 }
241
242 type Cmsghdr struct {
243 Len uint32
244 Level int32
245 Type int32
246 }
247
248 type Inet6Pktinfo struct {
249 Addr [16]byte
250 Ifindex uint32
251 }
252
253 type IPv6MTUInfo struct {
254 Addr RawSockaddrInet6
255 Mtu uint32
256 }
257
258 type ICMPv6Filter struct {
259 Filt [8]uint32
260 }
261
262 const (
263 SizeofSockaddrInet4 = 0x10
264 SizeofSockaddrInet6 = 0x1c
265 SizeofSockaddrAny = 0x6c
266 SizeofSockaddrUnix = 0x6a
267 SizeofSockaddrDatalink = 0x36
268 SizeofLinger = 0x8
269 SizeofIPMreq = 0x8
270 SizeofIPMreqn = 0xc
271 SizeofIPv6Mreq = 0x14
272 SizeofMsghdr = 0x30
273 SizeofCmsghdr = 0xc
274 SizeofInet6Pktinfo = 0x14
275 SizeofIPv6MTUInfo = 0x20
276 SizeofICMPv6Filter = 0x20
277 )
278
279 const (
280 PTRACE_TRACEME = 0x0
281 PTRACE_CONT = 0x7
282 PTRACE_KILL = 0x8
283 )
284
285 type Kevent_t struct {
286 Ident uint64
287 Filter int16
288 Flags uint16
289 Fflags uint32
290 Data int64
291 Udata *byte
292 }
293
294 type FdSet struct {
295 X__fds_bits [16]uint64
296 }
297
298 const (
299 sizeofIfMsghdr = 0xa8
300 SizeofIfMsghdr = 0xa8
301 sizeofIfData = 0x98
302 SizeofIfData = 0x98
303 SizeofIfaMsghdr = 0x14
304 SizeofIfmaMsghdr = 0x10
305 SizeofIfAnnounceMsghdr = 0x18
306 SizeofRtMsghdr = 0x98
307 SizeofRtMetrics = 0x70
308 )
309
310 type ifMsghdr struct {
311 Msglen uint16
312 Version uint8
313 Type uint8
314 Addrs int32
315 Flags int32
316 Index uint16
317 Pad_cgo_0 [2]byte
318 Data ifData
319 }
320
321 type IfMsghdr struct {
322 Msglen uint16
323 Version uint8
324 Type uint8
325 Addrs int32
326 Flags int32
327 Index uint16
328 Pad_cgo_0 [2]byte
329 Data IfData
330 }
331
332 type ifData struct {
333 Type uint8
334 Physical uint8
335 Addrlen uint8
336 Hdrlen uint8
337 Link_state uint8
338 Vhid uint8
339 Baudrate_pf uint8
340 Datalen uint8
341 Mtu uint64
342 Metric uint64
343 Baudrate uint64
344 Ipackets uint64
345 Ierrors uint64
346 Opackets uint64
347 Oerrors uint64
348 Collisions uint64
349 Ibytes uint64
350 Obytes uint64
351 Imcasts uint64
352 Omcasts uint64
353 Iqdrops uint64
354 Noproto uint64
355 Hwassist uint64
356 Epoch int64
357 Lastchange Timeval
358 }
359
360 type IfData struct {
361 Type uint8
362 Physical uint8
363 Addrlen uint8
364 Hdrlen uint8
365 Link_state uint8
366 Spare_char1 uint8
367 Spare_char2 uint8
368 Datalen uint8
369 Mtu uint64
370 Metric uint64
371 Baudrate uint64
372 Ipackets uint64
373 Ierrors uint64
374 Opackets uint64
375 Oerrors uint64
376 Collisions uint64
377 Ibytes uint64
378 Obytes uint64
379 Imcasts uint64
380 Omcasts uint64
381 Iqdrops uint64
382 Noproto uint64
383 Hwassist uint64
384 Epoch int64
385 Lastchange Timeval
386 }
387
388 type IfaMsghdr struct {
389 Msglen uint16
390 Version uint8
391 Type uint8
392 Addrs int32
393 Flags int32
394 Index uint16
395 Pad_cgo_0 [2]byte
396 Metric int32
397 }
398
399 type IfmaMsghdr struct {
400 Msglen uint16
401 Version uint8
402 Type uint8
403 Addrs int32
404 Flags int32
405 Index uint16
406 Pad_cgo_0 [2]byte
407 }
408
409 type IfAnnounceMsghdr struct {
410 Msglen uint16
411 Version uint8
412 Type uint8
413 Index uint16
414 Name [16]int8
415 What uint16
416 }
417
418 type RtMsghdr struct {
419 Msglen uint16
420 Version uint8
421 Type uint8
422 Index uint16
423 Pad_cgo_0 [2]byte
424 Flags int32
425 Addrs int32
426 Pid int32
427 Seq int32
428 Errno int32
429 Fmask int32
430 Inits uint64
431 Rmx RtMetrics
432 }
433
434 type RtMetrics struct {
435 Locks uint64
436 Mtu uint64
437 Hopcount uint64
438 Expire uint64
439 Recvpipe uint64
440 Sendpipe uint64
441 Ssthresh uint64
442 Rtt uint64
443 Rttvar uint64
444 Pksent uint64
445 Weight uint64
446 Filler [3]uint64
447 }
448
449 const (
450 SizeofBpfVersion = 0x4
451 SizeofBpfStat = 0x8
452 SizeofBpfZbuf = 0x18
453 SizeofBpfProgram = 0x10
454 SizeofBpfInsn = 0x8
455 SizeofBpfHdr = 0x20
456 SizeofBpfZbufHeader = 0x20
457 )
458
459 type BpfVersion struct {
460 Major uint16
461 Minor uint16
462 }
463
464 type BpfStat struct {
465 Recv uint32
466 Drop uint32
467 }
468
469 type BpfZbuf struct {
470 Bufa *byte
471 Bufb *byte
472 Buflen uint64
473 }
474
475 type BpfProgram struct {
476 Len uint32
477 Pad_cgo_0 [4]byte
478 Insns *BpfInsn
479 }
480
481 type BpfInsn struct {
482 Code uint16
483 Jt uint8
484 Jf uint8
485 K uint32
486 }
487
488 type BpfHdr struct {
489 Tstamp Timeval
490 Caplen uint32
491 Datalen uint32
492 Hdrlen uint16
493 Pad_cgo_0 [6]byte
494 }
495
496 type BpfZbufHeader struct {
497 Kernel_gen uint32
498 Kernel_len uint32
499 User_gen uint32
500 X_bzh_pad [5]uint32
501 }
502
503 const (
504 _AT_FDCWD = -0x64
505 _AT_SYMLINK_FOLLOW = 0x400
506 _AT_SYMLINK_NOFOLLOW = 0x200
507 )
508
509 type Termios struct {
510 Iflag uint32
511 Oflag uint32
512 Cflag uint32
513 Lflag uint32
514 Cc [20]uint8
515 Ispeed uint32
516 Ospeed uint32
517 }
518
View as plain text