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