github.com/aayushi-bansal/sys@v0.0.0-20180118120756-90d962a959d8/unix/ztypes_freebsd_amd64.go (about) 1 // cgo -godefs types_freebsd.go | go run mkpost.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build amd64,freebsd 5 6 package unix 7 8 const ( 9 sizeofPtr = 0x8 10 sizeofShort = 0x2 11 sizeofInt = 0x4 12 sizeofLong = 0x8 13 sizeofLongLong = 0x8 14 ) 15 16 type ( 17 _C_short int16 18 _C_int int32 19 _C_long int64 20 _C_long_long int64 21 ) 22 23 type Timespec struct { 24 Sec int64 25 Nsec int64 26 } 27 28 type Timeval struct { 29 Sec int64 30 Usec int64 31 } 32 33 type Rusage struct { 34 Utime Timeval 35 Stime Timeval 36 Maxrss int64 37 Ixrss int64 38 Idrss int64 39 Isrss int64 40 Minflt int64 41 Majflt int64 42 Nswap int64 43 Inblock int64 44 Oublock int64 45 Msgsnd int64 46 Msgrcv int64 47 Nsignals int64 48 Nvcsw int64 49 Nivcsw int64 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 ) 75 76 type Stat_t struct { 77 Dev uint32 78 Ino uint32 79 Mode uint16 80 Nlink uint16 81 Uid uint32 82 Gid uint32 83 Rdev uint32 84 Atimespec Timespec 85 Mtimespec Timespec 86 Ctimespec Timespec 87 Size int64 88 Blocks int64 89 Blksize int32 90 Flags uint32 91 Gen uint32 92 Lspare int32 93 Birthtimespec Timespec 94 } 95 96 type Statfs_t struct { 97 Version uint32 98 Type uint32 99 Flags uint64 100 Bsize uint64 101 Iosize uint64 102 Blocks uint64 103 Bfree uint64 104 Bavail int64 105 Files uint64 106 Ffree int64 107 Syncwrites uint64 108 Asyncwrites uint64 109 Syncreads uint64 110 Asyncreads uint64 111 Spare [10]uint64 112 Namemax uint32 113 Owner uint32 114 Fsid Fsid 115 Charspare [80]int8 116 Fstypename [16]int8 117 Mntfromname [88]int8 118 Mntonname [88]int8 119 } 120 121 type Flock_t struct { 122 Start int64 123 Len int64 124 Pid int32 125 Type int16 126 Whence int16 127 Sysid int32 128 Pad_cgo_0 [4]byte 129 } 130 131 type Dirent struct { 132 Fileno uint32 133 Reclen uint16 134 Type uint8 135 Namlen uint8 136 Name [256]int8 137 } 138 139 type Fsid struct { 140 Val [2]int32 141 } 142 143 const ( 144 PathMax = 0x400 145 ) 146 147 const ( 148 FADV_NORMAL = 0x0 149 FADV_RANDOM = 0x1 150 FADV_SEQUENTIAL = 0x2 151 FADV_WILLNEED = 0x3 152 FADV_DONTNEED = 0x4 153 FADV_NOREUSE = 0x5 154 ) 155 156 type RawSockaddrInet4 struct { 157 Len uint8 158 Family uint8 159 Port uint16 160 Addr [4]byte /* in_addr */ 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 /* in6_addr */ 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 [46]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 /* in_addr */ 215 Interface [4]byte /* in_addr */ 216 } 217 218 type IPMreqn struct { 219 Multiaddr [4]byte /* in_addr */ 220 Address [4]byte /* in_addr */ 221 Ifindex int32 222 } 223 224 type IPv6Mreq struct { 225 Multiaddr [16]byte /* in6_addr */ 226 Interface uint32 227 } 228 229 type Msghdr struct { 230 Name *byte 231 Namelen uint32 232 Pad_cgo_0 [4]byte 233 Iov *Iovec 234 Iovlen int32 235 Pad_cgo_1 [4]byte 236 Control *byte 237 Controllen uint32 238 Flags int32 239 } 240 241 type Cmsghdr struct { 242 Len uint32 243 Level int32 244 Type int32 245 } 246 247 type Inet6Pktinfo struct { 248 Addr [16]byte /* in6_addr */ 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 = 0x36 267 SizeofLinger = 0x8 268 SizeofIPMreq = 0x8 269 SizeofIPMreqn = 0xc 270 SizeofIPv6Mreq = 0x14 271 SizeofMsghdr = 0x30 272 SizeofCmsghdr = 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 X__fds_bits [16]uint64 295 } 296 297 const ( 298 sizeofIfMsghdr = 0xa8 299 SizeofIfMsghdr = 0xa8 300 sizeofIfData = 0x98 301 SizeofIfData = 0x98 302 SizeofIfaMsghdr = 0x14 303 SizeofIfmaMsghdr = 0x10 304 SizeofIfAnnounceMsghdr = 0x18 305 SizeofRtMsghdr = 0x98 306 SizeofRtMetrics = 0x70 307 ) 308 309 type ifMsghdr struct { 310 Msglen uint16 311 Version uint8 312 Type uint8 313 Addrs int32 314 Flags int32 315 Index uint16 316 Pad_cgo_0 [2]byte 317 Data ifData 318 } 319 320 type IfMsghdr struct { 321 Msglen uint16 322 Version uint8 323 Type uint8 324 Addrs int32 325 Flags int32 326 Index uint16 327 Pad_cgo_0 [2]byte 328 Data IfData 329 } 330 331 type ifData struct { 332 Type uint8 333 Physical uint8 334 Addrlen uint8 335 Hdrlen uint8 336 Link_state uint8 337 Vhid uint8 338 Datalen uint16 339 Mtu uint32 340 Metric uint32 341 Baudrate uint64 342 Ipackets uint64 343 Ierrors uint64 344 Opackets uint64 345 Oerrors uint64 346 Collisions uint64 347 Ibytes uint64 348 Obytes uint64 349 Imcasts uint64 350 Omcasts uint64 351 Iqdrops uint64 352 Oqdrops uint64 353 Noproto uint64 354 Hwassist uint64 355 X__ifi_epoch [8]byte 356 X__ifi_lastchange [16]byte 357 } 358 359 type IfData struct { 360 Type uint8 361 Physical uint8 362 Addrlen uint8 363 Hdrlen uint8 364 Link_state uint8 365 Spare_char1 uint8 366 Spare_char2 uint8 367 Datalen uint8 368 Mtu uint64 369 Metric uint64 370 Baudrate uint64 371 Ipackets uint64 372 Ierrors uint64 373 Opackets uint64 374 Oerrors uint64 375 Collisions uint64 376 Ibytes uint64 377 Obytes uint64 378 Imcasts uint64 379 Omcasts uint64 380 Iqdrops uint64 381 Noproto uint64 382 Hwassist uint64 383 Epoch int64 384 Lastchange Timeval 385 } 386 387 type IfaMsghdr struct { 388 Msglen uint16 389 Version uint8 390 Type uint8 391 Addrs int32 392 Flags int32 393 Index uint16 394 Pad_cgo_0 [2]byte 395 Metric int32 396 } 397 398 type IfmaMsghdr struct { 399 Msglen uint16 400 Version uint8 401 Type uint8 402 Addrs int32 403 Flags int32 404 Index uint16 405 Pad_cgo_0 [2]byte 406 } 407 408 type IfAnnounceMsghdr struct { 409 Msglen uint16 410 Version uint8 411 Type uint8 412 Index uint16 413 Name [16]int8 414 What uint16 415 } 416 417 type RtMsghdr struct { 418 Msglen uint16 419 Version uint8 420 Type uint8 421 Index uint16 422 Pad_cgo_0 [2]byte 423 Flags int32 424 Addrs int32 425 Pid int32 426 Seq int32 427 Errno int32 428 Fmask int32 429 Inits uint64 430 Rmx RtMetrics 431 } 432 433 type RtMetrics struct { 434 Locks uint64 435 Mtu uint64 436 Hopcount uint64 437 Expire uint64 438 Recvpipe uint64 439 Sendpipe uint64 440 Ssthresh uint64 441 Rtt uint64 442 Rttvar uint64 443 Pksent uint64 444 Weight uint64 445 Filler [3]uint64 446 } 447 448 const ( 449 SizeofBpfVersion = 0x4 450 SizeofBpfStat = 0x8 451 SizeofBpfZbuf = 0x18 452 SizeofBpfProgram = 0x10 453 SizeofBpfInsn = 0x8 454 SizeofBpfHdr = 0x20 455 SizeofBpfZbufHeader = 0x20 456 ) 457 458 type BpfVersion struct { 459 Major uint16 460 Minor uint16 461 } 462 463 type BpfStat struct { 464 Recv uint32 465 Drop uint32 466 } 467 468 type BpfZbuf struct { 469 Bufa *byte 470 Bufb *byte 471 Buflen uint64 472 } 473 474 type BpfProgram struct { 475 Len uint32 476 Pad_cgo_0 [4]byte 477 Insns *BpfInsn 478 } 479 480 type BpfInsn struct { 481 Code uint16 482 Jt uint8 483 Jf uint8 484 K uint32 485 } 486 487 type BpfHdr struct { 488 Tstamp Timeval 489 Caplen uint32 490 Datalen uint32 491 Hdrlen uint16 492 Pad_cgo_0 [6]byte 493 } 494 495 type BpfZbufHeader struct { 496 Kernel_gen uint32 497 Kernel_len uint32 498 User_gen uint32 499 X_bzh_pad [5]uint32 500 } 501 502 type Termios struct { 503 Iflag uint32 504 Oflag uint32 505 Cflag uint32 506 Lflag uint32 507 Cc [20]uint8 508 Ispeed uint32 509 Ospeed uint32 510 } 511 512 type Winsize struct { 513 Row uint16 514 Col uint16 515 Xpixel uint16 516 Ypixel uint16 517 } 518 519 const ( 520 AT_FDCWD = -0x64 521 AT_REMOVEDIR = 0x800 522 AT_SYMLINK_FOLLOW = 0x400 523 AT_SYMLINK_NOFOLLOW = 0x200 524 ) 525 526 type PollFd struct { 527 Fd int32 528 Events int16 529 Revents int16 530 } 531 532 const ( 533 POLLERR = 0x8 534 POLLHUP = 0x10 535 POLLIN = 0x1 536 POLLINIGNEOF = 0x2000 537 POLLNVAL = 0x20 538 POLLOUT = 0x4 539 POLLPRI = 0x2 540 POLLRDBAND = 0x80 541 POLLRDNORM = 0x40 542 POLLWRBAND = 0x100 543 POLLWRNORM = 0x4 544 ) 545 546 type CapRights struct { 547 Rights [2]uint64 548 } 549 550 type Utsname struct { 551 Sysname [256]byte 552 Nodename [256]byte 553 Release [256]byte 554 Version [256]byte 555 Machine [256]byte 556 }