Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | // cgo -godefs types_dragonfly.go | go run mkpost.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 4 | //go:build amd64 && dragonfly |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 5 | // +build amd64,dragonfly |
| 6 | |
| 7 | package unix |
| 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 | type Stat_t struct { |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 61 | Ino uint64 |
| 62 | Nlink uint32 |
| 63 | Dev uint32 |
| 64 | Mode uint16 |
| 65 | _1 uint16 |
| 66 | Uid uint32 |
| 67 | Gid uint32 |
| 68 | Rdev uint32 |
| 69 | Atim Timespec |
| 70 | Mtim Timespec |
| 71 | Ctim Timespec |
| 72 | Size int64 |
| 73 | Blocks int64 |
| 74 | _ uint32 |
| 75 | Flags uint32 |
| 76 | Gen uint32 |
| 77 | Lspare int32 |
| 78 | Blksize int64 |
| 79 | Qspare2 int64 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | type Statfs_t struct { |
| 83 | Spare2 int64 |
| 84 | Bsize int64 |
| 85 | Iosize int64 |
| 86 | Blocks int64 |
| 87 | Bfree int64 |
| 88 | Bavail int64 |
| 89 | Files int64 |
| 90 | Ffree int64 |
| 91 | Fsid Fsid |
| 92 | Owner uint32 |
| 93 | Type int32 |
| 94 | Flags int32 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 95 | Syncwrites int64 |
| 96 | Asyncwrites int64 |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 97 | Fstypename [16]byte |
| 98 | Mntonname [80]byte |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 99 | Syncreads int64 |
| 100 | Asyncreads int64 |
| 101 | Spares1 int16 |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 102 | Mntfromname [80]byte |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 103 | Spares2 int16 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 104 | Spare [2]int64 |
| 105 | } |
| 106 | |
| 107 | type Flock_t struct { |
| 108 | Start int64 |
| 109 | Len int64 |
| 110 | Pid int32 |
| 111 | Type int16 |
| 112 | Whence int16 |
| 113 | } |
| 114 | |
| 115 | type Dirent struct { |
| 116 | Fileno uint64 |
| 117 | Namlen uint16 |
| 118 | Type uint8 |
| 119 | Unused1 uint8 |
| 120 | Unused2 uint32 |
| 121 | Name [256]int8 |
| 122 | } |
| 123 | |
| 124 | type Fsid struct { |
| 125 | Val [2]int32 |
| 126 | } |
| 127 | |
| 128 | const ( |
| 129 | PathMax = 0x400 |
| 130 | ) |
| 131 | |
| 132 | type RawSockaddrInet4 struct { |
| 133 | Len uint8 |
| 134 | Family uint8 |
| 135 | Port uint16 |
| 136 | Addr [4]byte /* in_addr */ |
| 137 | Zero [8]int8 |
| 138 | } |
| 139 | |
| 140 | type RawSockaddrInet6 struct { |
| 141 | Len uint8 |
| 142 | Family uint8 |
| 143 | Port uint16 |
| 144 | Flowinfo uint32 |
| 145 | Addr [16]byte /* in6_addr */ |
| 146 | Scope_id uint32 |
| 147 | } |
| 148 | |
| 149 | type RawSockaddrUnix struct { |
| 150 | Len uint8 |
| 151 | Family uint8 |
| 152 | Path [104]int8 |
| 153 | } |
| 154 | |
| 155 | type RawSockaddrDatalink struct { |
| 156 | Len uint8 |
| 157 | Family uint8 |
| 158 | Index uint16 |
| 159 | Type uint8 |
| 160 | Nlen uint8 |
| 161 | Alen uint8 |
| 162 | Slen uint8 |
| 163 | Data [12]int8 |
| 164 | Rcf uint16 |
| 165 | Route [16]uint16 |
| 166 | } |
| 167 | |
| 168 | type RawSockaddr struct { |
| 169 | Len uint8 |
| 170 | Family uint8 |
| 171 | Data [14]int8 |
| 172 | } |
| 173 | |
| 174 | type RawSockaddrAny struct { |
| 175 | Addr RawSockaddr |
| 176 | Pad [92]int8 |
| 177 | } |
| 178 | |
| 179 | type _Socklen uint32 |
| 180 | |
| 181 | type Linger struct { |
| 182 | Onoff int32 |
| 183 | Linger int32 |
| 184 | } |
| 185 | |
| 186 | type Iovec struct { |
| 187 | Base *byte |
| 188 | Len uint64 |
| 189 | } |
| 190 | |
| 191 | type IPMreq struct { |
| 192 | Multiaddr [4]byte /* in_addr */ |
| 193 | Interface [4]byte /* in_addr */ |
| 194 | } |
| 195 | |
| 196 | type IPv6Mreq struct { |
| 197 | Multiaddr [16]byte /* in6_addr */ |
| 198 | Interface uint32 |
| 199 | } |
| 200 | |
| 201 | type Msghdr struct { |
| 202 | Name *byte |
| 203 | Namelen uint32 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 204 | Iov *Iovec |
| 205 | Iovlen int32 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 206 | Control *byte |
| 207 | Controllen uint32 |
| 208 | Flags int32 |
| 209 | } |
| 210 | |
| 211 | type Cmsghdr struct { |
| 212 | Len uint32 |
| 213 | Level int32 |
| 214 | Type int32 |
| 215 | } |
| 216 | |
| 217 | type Inet6Pktinfo struct { |
| 218 | Addr [16]byte /* in6_addr */ |
| 219 | Ifindex uint32 |
| 220 | } |
| 221 | |
| 222 | type IPv6MTUInfo struct { |
| 223 | Addr RawSockaddrInet6 |
| 224 | Mtu uint32 |
| 225 | } |
| 226 | |
| 227 | type ICMPv6Filter struct { |
| 228 | Filt [8]uint32 |
| 229 | } |
| 230 | |
| 231 | const ( |
| 232 | SizeofSockaddrInet4 = 0x10 |
| 233 | SizeofSockaddrInet6 = 0x1c |
| 234 | SizeofSockaddrAny = 0x6c |
| 235 | SizeofSockaddrUnix = 0x6a |
| 236 | SizeofSockaddrDatalink = 0x36 |
| 237 | SizeofLinger = 0x8 |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 238 | SizeofIovec = 0x10 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 239 | SizeofIPMreq = 0x8 |
| 240 | SizeofIPv6Mreq = 0x14 |
| 241 | SizeofMsghdr = 0x30 |
| 242 | SizeofCmsghdr = 0xc |
| 243 | SizeofInet6Pktinfo = 0x14 |
| 244 | SizeofIPv6MTUInfo = 0x20 |
| 245 | SizeofICMPv6Filter = 0x20 |
| 246 | ) |
| 247 | |
| 248 | const ( |
| 249 | PTRACE_TRACEME = 0x0 |
| 250 | PTRACE_CONT = 0x7 |
| 251 | PTRACE_KILL = 0x8 |
| 252 | ) |
| 253 | |
| 254 | type Kevent_t struct { |
| 255 | Ident uint64 |
| 256 | Filter int16 |
| 257 | Flags uint16 |
| 258 | Fflags uint32 |
| 259 | Data int64 |
| 260 | Udata *byte |
| 261 | } |
| 262 | |
| 263 | type FdSet struct { |
| 264 | Bits [16]uint64 |
| 265 | } |
| 266 | |
| 267 | const ( |
| 268 | SizeofIfMsghdr = 0xb0 |
| 269 | SizeofIfData = 0xa0 |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 270 | SizeofIfaMsghdr = 0x18 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 271 | SizeofIfmaMsghdr = 0x10 |
| 272 | SizeofIfAnnounceMsghdr = 0x18 |
| 273 | SizeofRtMsghdr = 0x98 |
| 274 | SizeofRtMetrics = 0x70 |
| 275 | ) |
| 276 | |
| 277 | type IfMsghdr struct { |
| 278 | Msglen uint16 |
| 279 | Version uint8 |
| 280 | Type uint8 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 281 | Index uint16 |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 282 | Flags int32 |
| 283 | Addrs int32 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 284 | Data IfData |
| 285 | } |
| 286 | |
| 287 | type IfData struct { |
| 288 | Type uint8 |
| 289 | Physical uint8 |
| 290 | Addrlen uint8 |
| 291 | Hdrlen uint8 |
| 292 | Recvquota uint8 |
| 293 | Xmitquota uint8 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 294 | Mtu uint64 |
| 295 | Metric uint64 |
| 296 | Link_state uint64 |
| 297 | Baudrate uint64 |
| 298 | Ipackets uint64 |
| 299 | Ierrors uint64 |
| 300 | Opackets uint64 |
| 301 | Oerrors uint64 |
| 302 | Collisions uint64 |
| 303 | Ibytes uint64 |
| 304 | Obytes uint64 |
| 305 | Imcasts uint64 |
| 306 | Omcasts uint64 |
| 307 | Iqdrops uint64 |
| 308 | Noproto uint64 |
| 309 | Hwassist uint64 |
| 310 | Oqdrops uint64 |
| 311 | Lastchange Timeval |
| 312 | } |
| 313 | |
| 314 | type IfaMsghdr struct { |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 315 | Msglen uint16 |
| 316 | Version uint8 |
| 317 | Type uint8 |
| 318 | Index uint16 |
| 319 | Flags int32 |
| 320 | Addrs int32 |
| 321 | Addrflags int32 |
| 322 | Metric int32 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 323 | } |
| 324 | |
| 325 | type IfmaMsghdr struct { |
| 326 | Msglen uint16 |
| 327 | Version uint8 |
| 328 | Type uint8 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 329 | Index uint16 |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 330 | Flags int32 |
| 331 | Addrs int32 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 332 | } |
| 333 | |
| 334 | type IfAnnounceMsghdr struct { |
| 335 | Msglen uint16 |
| 336 | Version uint8 |
| 337 | Type uint8 |
| 338 | Index uint16 |
| 339 | Name [16]int8 |
| 340 | What uint16 |
| 341 | } |
| 342 | |
| 343 | type RtMsghdr struct { |
| 344 | Msglen uint16 |
| 345 | Version uint8 |
| 346 | Type uint8 |
| 347 | Index uint16 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 348 | Flags int32 |
| 349 | Addrs int32 |
| 350 | Pid int32 |
| 351 | Seq int32 |
| 352 | Errno int32 |
| 353 | Use int32 |
| 354 | Inits uint64 |
| 355 | Rmx RtMetrics |
| 356 | } |
| 357 | |
| 358 | type RtMetrics struct { |
| 359 | Locks uint64 |
| 360 | Mtu uint64 |
| 361 | Pksent uint64 |
| 362 | Expire uint64 |
| 363 | Sendpipe uint64 |
| 364 | Ssthresh uint64 |
| 365 | Rtt uint64 |
| 366 | Rttvar uint64 |
| 367 | Recvpipe uint64 |
| 368 | Hopcount uint64 |
| 369 | Mssopt uint16 |
| 370 | Pad uint16 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 371 | Msl uint64 |
| 372 | Iwmaxsegs uint64 |
| 373 | Iwcapsegs uint64 |
| 374 | } |
| 375 | |
| 376 | const ( |
| 377 | SizeofBpfVersion = 0x4 |
| 378 | SizeofBpfStat = 0x8 |
| 379 | SizeofBpfProgram = 0x10 |
| 380 | SizeofBpfInsn = 0x8 |
| 381 | SizeofBpfHdr = 0x20 |
| 382 | ) |
| 383 | |
| 384 | type BpfVersion struct { |
| 385 | Major uint16 |
| 386 | Minor uint16 |
| 387 | } |
| 388 | |
| 389 | type BpfStat struct { |
| 390 | Recv uint32 |
| 391 | Drop uint32 |
| 392 | } |
| 393 | |
| 394 | type BpfProgram struct { |
| 395 | Len uint32 |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 396 | Insns *BpfInsn |
| 397 | } |
| 398 | |
| 399 | type BpfInsn struct { |
| 400 | Code uint16 |
| 401 | Jt uint8 |
| 402 | Jf uint8 |
| 403 | K uint32 |
| 404 | } |
| 405 | |
| 406 | type BpfHdr struct { |
| 407 | Tstamp Timeval |
| 408 | Caplen uint32 |
| 409 | Datalen uint32 |
| 410 | Hdrlen uint16 |
| 411 | _ [6]byte |
| 412 | } |
| 413 | |
| 414 | type Termios struct { |
| 415 | Iflag uint32 |
| 416 | Oflag uint32 |
| 417 | Cflag uint32 |
| 418 | Lflag uint32 |
| 419 | Cc [20]uint8 |
| 420 | Ispeed uint32 |
| 421 | Ospeed uint32 |
| 422 | } |
| 423 | |
| 424 | type Winsize struct { |
| 425 | Row uint16 |
| 426 | Col uint16 |
| 427 | Xpixel uint16 |
| 428 | Ypixel uint16 |
| 429 | } |
| 430 | |
| 431 | const ( |
| 432 | AT_FDCWD = 0xfffafdcd |
| 433 | AT_SYMLINK_NOFOLLOW = 0x1 |
| 434 | ) |
| 435 | |
| 436 | type PollFd struct { |
| 437 | Fd int32 |
| 438 | Events int16 |
| 439 | Revents int16 |
| 440 | } |
| 441 | |
| 442 | const ( |
| 443 | POLLERR = 0x8 |
| 444 | POLLHUP = 0x10 |
| 445 | POLLIN = 0x1 |
| 446 | POLLNVAL = 0x20 |
| 447 | POLLOUT = 0x4 |
| 448 | POLLPRI = 0x2 |
| 449 | POLLRDBAND = 0x80 |
| 450 | POLLRDNORM = 0x40 |
| 451 | POLLWRBAND = 0x100 |
| 452 | POLLWRNORM = 0x4 |
| 453 | ) |
| 454 | |
| 455 | type Utsname struct { |
| 456 | Sysname [32]byte |
| 457 | Nodename [32]byte |
| 458 | Release [32]byte |
| 459 | Version [32]byte |
| 460 | Machine [32]byte |
| 461 | } |
David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame] | 462 | |
| 463 | const SizeofClockinfo = 0x14 |
| 464 | |
| 465 | type Clockinfo struct { |
| 466 | Hz int32 |
| 467 | Tick int32 |
| 468 | Tickadj int32 |
| 469 | Stathz int32 |
| 470 | Profhz int32 |
| 471 | } |