Home | History | Annotate | Download | only in unix
      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 386,freebsd
      5 
      6 package unix
      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 )
     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 	Pad_cgo_0     [8]byte
     95 }
     96 
     97 type Statfs_t struct {
     98 	Version     uint32
     99 	Type        uint32
    100 	Flags       uint64
    101 	Bsize       uint64
    102 	Iosize      uint64
    103 	Blocks      uint64
    104 	Bfree       uint64
    105 	Bavail      int64
    106 	Files       uint64
    107 	Ffree       int64
    108 	Syncwrites  uint64
    109 	Asyncwrites uint64
    110 	Syncreads   uint64
    111 	Asyncreads  uint64
    112 	Spare       [10]uint64
    113 	Namemax     uint32
    114 	Owner       uint32
    115 	Fsid        Fsid
    116 	Charspare   [80]int8
    117 	Fstypename  [16]int8
    118 	Mntfromname [88]int8
    119 	Mntonname   [88]int8
    120 }
    121 
    122 type Flock_t struct {
    123 	Start  int64
    124 	Len    int64
    125 	Pid    int32
    126 	Type   int16
    127 	Whence int16
    128 	Sysid  int32
    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  uint32
    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 	Iov        *Iovec
    233 	Iovlen     int32
    234 	Control    *byte
    235 	Controllen uint32
    236 	Flags      int32
    237 }
    238 
    239 type Cmsghdr struct {
    240 	Len   uint32
    241 	Level int32
    242 	Type  int32
    243 }
    244 
    245 type Inet6Pktinfo struct {
    246 	Addr    [16]byte /* in6_addr */
    247 	Ifindex uint32
    248 }
    249 
    250 type IPv6MTUInfo struct {
    251 	Addr RawSockaddrInet6
    252 	Mtu  uint32
    253 }
    254 
    255 type ICMPv6Filter struct {
    256 	Filt [8]uint32
    257 }
    258 
    259 const (
    260 	SizeofSockaddrInet4    = 0x10
    261 	SizeofSockaddrInet6    = 0x1c
    262 	SizeofSockaddrAny      = 0x6c
    263 	SizeofSockaddrUnix     = 0x6a
    264 	SizeofSockaddrDatalink = 0x36
    265 	SizeofLinger           = 0x8
    266 	SizeofIPMreq           = 0x8
    267 	SizeofIPMreqn          = 0xc
    268 	SizeofIPv6Mreq         = 0x14
    269 	SizeofMsghdr           = 0x1c
    270 	SizeofCmsghdr          = 0xc
    271 	SizeofInet6Pktinfo     = 0x14
    272 	SizeofIPv6MTUInfo      = 0x20
    273 	SizeofICMPv6Filter     = 0x20
    274 )
    275 
    276 const (
    277 	PTRACE_TRACEME = 0x0
    278 	PTRACE_CONT    = 0x7
    279 	PTRACE_KILL    = 0x8
    280 )
    281 
    282 type Kevent_t struct {
    283 	Ident  uint32
    284 	Filter int16
    285 	Flags  uint16
    286 	Fflags uint32
    287 	Data   int32
    288 	Udata  *byte
    289 }
    290 
    291 type FdSet struct {
    292 	X__fds_bits [32]uint32
    293 }
    294 
    295 const (
    296 	sizeofIfMsghdr         = 0xa8
    297 	SizeofIfMsghdr         = 0x60
    298 	sizeofIfData           = 0x98
    299 	SizeofIfData           = 0x50
    300 	SizeofIfaMsghdr        = 0x14
    301 	SizeofIfmaMsghdr       = 0x10
    302 	SizeofIfAnnounceMsghdr = 0x18
    303 	SizeofRtMsghdr         = 0x5c
    304 	SizeofRtMetrics        = 0x38
    305 )
    306 
    307 type ifMsghdr struct {
    308 	Msglen    uint16
    309 	Version   uint8
    310 	Type      uint8
    311 	Addrs     int32
    312 	Flags     int32
    313 	Index     uint16
    314 	Pad_cgo_0 [2]byte
    315 	Data      ifData
    316 }
    317 
    318 type IfMsghdr struct {
    319 	Msglen    uint16
    320 	Version   uint8
    321 	Type      uint8
    322 	Addrs     int32
    323 	Flags     int32
    324 	Index     uint16
    325 	Pad_cgo_0 [2]byte
    326 	Data      IfData
    327 }
    328 
    329 type ifData struct {
    330 	Type              uint8
    331 	Physical          uint8
    332 	Addrlen           uint8
    333 	Hdrlen            uint8
    334 	Link_state        uint8
    335 	Vhid              uint8
    336 	Datalen           uint16
    337 	Mtu               uint32
    338 	Metric            uint32
    339 	Baudrate          uint64
    340 	Ipackets          uint64
    341 	Ierrors           uint64
    342 	Opackets          uint64
    343 	Oerrors           uint64
    344 	Collisions        uint64
    345 	Ibytes            uint64
    346 	Obytes            uint64
    347 	Imcasts           uint64
    348 	Omcasts           uint64
    349 	Iqdrops           uint64
    350 	Oqdrops           uint64
    351 	Noproto           uint64
    352 	Hwassist          uint64
    353 	X__ifi_epoch      [8]byte
    354 	X__ifi_lastchange [16]byte
    355 }
    356 
    357 type IfData struct {
    358 	Type        uint8
    359 	Physical    uint8
    360 	Addrlen     uint8
    361 	Hdrlen      uint8
    362 	Link_state  uint8
    363 	Spare_char1 uint8
    364 	Spare_char2 uint8
    365 	Datalen     uint8
    366 	Mtu         uint32
    367 	Metric      uint32
    368 	Baudrate    uint32
    369 	Ipackets    uint32
    370 	Ierrors     uint32
    371 	Opackets    uint32
    372 	Oerrors     uint32
    373 	Collisions  uint32
    374 	Ibytes      uint32
    375 	Obytes      uint32
    376 	Imcasts     uint32
    377 	Omcasts     uint32
    378 	Iqdrops     uint32
    379 	Noproto     uint32
    380 	Hwassist    uint32
    381 	Epoch       int32
    382 	Lastchange  Timeval
    383 }
    384 
    385 type IfaMsghdr struct {
    386 	Msglen    uint16
    387 	Version   uint8
    388 	Type      uint8
    389 	Addrs     int32
    390 	Flags     int32
    391 	Index     uint16
    392 	Pad_cgo_0 [2]byte
    393 	Metric    int32
    394 }
    395 
    396 type IfmaMsghdr struct {
    397 	Msglen    uint16
    398 	Version   uint8
    399 	Type      uint8
    400 	Addrs     int32
    401 	Flags     int32
    402 	Index     uint16
    403 	Pad_cgo_0 [2]byte
    404 }
    405 
    406 type IfAnnounceMsghdr struct {
    407 	Msglen  uint16
    408 	Version uint8
    409 	Type    uint8
    410 	Index   uint16
    411 	Name    [16]int8
    412 	What    uint16
    413 }
    414 
    415 type RtMsghdr struct {
    416 	Msglen    uint16
    417 	Version   uint8
    418 	Type      uint8
    419 	Index     uint16
    420 	Pad_cgo_0 [2]byte
    421 	Flags     int32
    422 	Addrs     int32
    423 	Pid       int32
    424 	Seq       int32
    425 	Errno     int32
    426 	Fmask     int32
    427 	Inits     uint32
    428 	Rmx       RtMetrics
    429 }
    430 
    431 type RtMetrics struct {
    432 	Locks    uint32
    433 	Mtu      uint32
    434 	Hopcount uint32
    435 	Expire   uint32
    436 	Recvpipe uint32
    437 	Sendpipe uint32
    438 	Ssthresh uint32
    439 	Rtt      uint32
    440 	Rttvar   uint32
    441 	Pksent   uint32
    442 	Weight   uint32
    443 	Filler   [3]uint32
    444 }
    445 
    446 const (
    447 	SizeofBpfVersion    = 0x4
    448 	SizeofBpfStat       = 0x8
    449 	SizeofBpfZbuf       = 0xc
    450 	SizeofBpfProgram    = 0x8
    451 	SizeofBpfInsn       = 0x8
    452 	SizeofBpfHdr        = 0x14
    453 	SizeofBpfZbufHeader = 0x20
    454 )
    455 
    456 type BpfVersion struct {
    457 	Major uint16
    458 	Minor uint16
    459 }
    460 
    461 type BpfStat struct {
    462 	Recv uint32
    463 	Drop uint32
    464 }
    465 
    466 type BpfZbuf struct {
    467 	Bufa   *byte
    468 	Bufb   *byte
    469 	Buflen uint32
    470 }
    471 
    472 type BpfProgram struct {
    473 	Len   uint32
    474 	Insns *BpfInsn
    475 }
    476 
    477 type BpfInsn struct {
    478 	Code uint16
    479 	Jt   uint8
    480 	Jf   uint8
    481 	K    uint32
    482 }
    483 
    484 type BpfHdr struct {
    485 	Tstamp    Timeval
    486 	Caplen    uint32
    487 	Datalen   uint32
    488 	Hdrlen    uint16
    489 	Pad_cgo_0 [2]byte
    490 }
    491 
    492 type BpfZbufHeader struct {
    493 	Kernel_gen uint32
    494 	Kernel_len uint32
    495 	User_gen   uint32
    496 	X_bzh_pad  [5]uint32
    497 }
    498 
    499 type Termios struct {
    500 	Iflag  uint32
    501 	Oflag  uint32
    502 	Cflag  uint32
    503 	Lflag  uint32
    504 	Cc     [20]uint8
    505 	Ispeed uint32
    506 	Ospeed uint32
    507 }
    508 
    509 type Winsize struct {
    510 	Row    uint16
    511 	Col    uint16
    512 	Xpixel uint16
    513 	Ypixel uint16
    514 }
    515 
    516 const (
    517 	AT_FDCWD            = -0x64
    518 	AT_REMOVEDIR        = 0x800
    519 	AT_SYMLINK_FOLLOW   = 0x400
    520 	AT_SYMLINK_NOFOLLOW = 0x200
    521 )
    522 
    523 type PollFd struct {
    524 	Fd      int32
    525 	Events  int16
    526 	Revents int16
    527 }
    528 
    529 const (
    530 	POLLERR      = 0x8
    531 	POLLHUP      = 0x10
    532 	POLLIN       = 0x1
    533 	POLLINIGNEOF = 0x2000
    534 	POLLNVAL     = 0x20
    535 	POLLOUT      = 0x4
    536 	POLLPRI      = 0x2
    537 	POLLRDBAND   = 0x80
    538 	POLLRDNORM   = 0x40
    539 	POLLWRBAND   = 0x100
    540 	POLLWRNORM   = 0x4
    541 )
    542 
    543 type CapRights struct {
    544 	Rights [2]uint64
    545 }
    546 
    547 type Utsname struct {
    548 	Sysname  [256]byte
    549 	Nodename [256]byte
    550 	Release  [256]byte
    551 	Version  [256]byte
    552 	Machine  [256]byte
    553 }
    554