github.com/slayercat/go@v0.0.0-20170428012452-c51559813f61/src/syscall/ztypes_freebsd_386.go (about)

     1  // Created by cgo -godefs - DO NOT EDIT
     2  // cgo -godefs types_freebsd.go
     3  
     4  // +build 386,freebsd
     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  )
    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       uint32
    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  type RawSockaddrInet4 struct {
   144  	Len    uint8
   145  	Family uint8
   146  	Port   uint16
   147  	Addr   [4]byte /* in_addr */
   148  	Zero   [8]int8
   149  }
   150  
   151  type RawSockaddrInet6 struct {
   152  	Len      uint8
   153  	Family   uint8
   154  	Port     uint16
   155  	Flowinfo uint32
   156  	Addr     [16]byte /* in6_addr */
   157  	Scope_id uint32
   158  }
   159  
   160  type RawSockaddrUnix struct {
   161  	Len    uint8
   162  	Family uint8
   163  	Path   [104]int8
   164  }
   165  
   166  type RawSockaddrDatalink struct {
   167  	Len    uint8
   168  	Family uint8
   169  	Index  uint16
   170  	Type   uint8
   171  	Nlen   uint8
   172  	Alen   uint8
   173  	Slen   uint8
   174  	Data   [46]int8
   175  }
   176  
   177  type RawSockaddr struct {
   178  	Len    uint8
   179  	Family uint8
   180  	Data   [14]int8
   181  }
   182  
   183  type RawSockaddrAny struct {
   184  	Addr RawSockaddr
   185  	Pad  [92]int8
   186  }
   187  
   188  type _Socklen uint32
   189  
   190  type Linger struct {
   191  	Onoff  int32
   192  	Linger int32
   193  }
   194  
   195  type Iovec struct {
   196  	Base *byte
   197  	Len  uint32
   198  }
   199  
   200  type IPMreq struct {
   201  	Multiaddr [4]byte /* in_addr */
   202  	Interface [4]byte /* in_addr */
   203  }
   204  
   205  type IPMreqn struct {
   206  	Multiaddr [4]byte /* in_addr */
   207  	Address   [4]byte /* in_addr */
   208  	Ifindex   int32
   209  }
   210  
   211  type IPv6Mreq struct {
   212  	Multiaddr [16]byte /* in6_addr */
   213  	Interface uint32
   214  }
   215  
   216  type Msghdr struct {
   217  	Name       *byte
   218  	Namelen    uint32
   219  	Iov        *Iovec
   220  	Iovlen     int32
   221  	Control    *byte
   222  	Controllen uint32
   223  	Flags      int32
   224  }
   225  
   226  type Cmsghdr struct {
   227  	Len   uint32
   228  	Level int32
   229  	Type  int32
   230  }
   231  
   232  type Inet6Pktinfo struct {
   233  	Addr    [16]byte /* in6_addr */
   234  	Ifindex uint32
   235  }
   236  
   237  type IPv6MTUInfo struct {
   238  	Addr RawSockaddrInet6
   239  	Mtu  uint32
   240  }
   241  
   242  type ICMPv6Filter struct {
   243  	Filt [8]uint32
   244  }
   245  
   246  const (
   247  	SizeofSockaddrInet4    = 0x10
   248  	SizeofSockaddrInet6    = 0x1c
   249  	SizeofSockaddrAny      = 0x6c
   250  	SizeofSockaddrUnix     = 0x6a
   251  	SizeofSockaddrDatalink = 0x36
   252  	SizeofLinger           = 0x8
   253  	SizeofIPMreq           = 0x8
   254  	SizeofIPMreqn          = 0xc
   255  	SizeofIPv6Mreq         = 0x14
   256  	SizeofMsghdr           = 0x1c
   257  	SizeofCmsghdr          = 0xc
   258  	SizeofInet6Pktinfo     = 0x14
   259  	SizeofIPv6MTUInfo      = 0x20
   260  	SizeofICMPv6Filter     = 0x20
   261  )
   262  
   263  const (
   264  	PTRACE_TRACEME = 0x0
   265  	PTRACE_CONT    = 0x7
   266  	PTRACE_KILL    = 0x8
   267  )
   268  
   269  type Kevent_t struct {
   270  	Ident  uint32
   271  	Filter int16
   272  	Flags  uint16
   273  	Fflags uint32
   274  	Data   int32
   275  	Udata  *byte
   276  }
   277  
   278  type FdSet struct {
   279  	X__fds_bits [32]uint32
   280  }
   281  
   282  const (
   283  	sizeofIfMsghdr         = 0x64
   284  	SizeofIfMsghdr         = 0x60
   285  	sizeofIfData           = 0x54
   286  	SizeofIfData           = 0x50
   287  	SizeofIfaMsghdr        = 0x14
   288  	SizeofIfmaMsghdr       = 0x10
   289  	SizeofIfAnnounceMsghdr = 0x18
   290  	SizeofRtMsghdr         = 0x5c
   291  	SizeofRtMetrics        = 0x38
   292  )
   293  
   294  type ifMsghdr struct {
   295  	Msglen    uint16
   296  	Version   uint8
   297  	Type      uint8
   298  	Addrs     int32
   299  	Flags     int32
   300  	Index     uint16
   301  	Pad_cgo_0 [2]byte
   302  	Data      ifData
   303  }
   304  
   305  type IfMsghdr struct {
   306  	Msglen    uint16
   307  	Version   uint8
   308  	Type      uint8
   309  	Addrs     int32
   310  	Flags     int32
   311  	Index     uint16
   312  	Pad_cgo_0 [2]byte
   313  	Data      IfData
   314  }
   315  
   316  type ifData struct {
   317  	Type        uint8
   318  	Physical    uint8
   319  	Addrlen     uint8
   320  	Hdrlen      uint8
   321  	Link_state  uint8
   322  	Vhid        uint8
   323  	Baudrate_pf uint8
   324  	Datalen     uint8
   325  	Mtu         uint32
   326  	Metric      uint32
   327  	Baudrate    uint32
   328  	Ipackets    uint32
   329  	Ierrors     uint32
   330  	Opackets    uint32
   331  	Oerrors     uint32
   332  	Collisions  uint32
   333  	Ibytes      uint32
   334  	Obytes      uint32
   335  	Imcasts     uint32
   336  	Omcasts     uint32
   337  	Iqdrops     uint32
   338  	Noproto     uint32
   339  	Hwassist    uint64
   340  	Epoch       int32
   341  	Lastchange  Timeval
   342  }
   343  
   344  type IfData struct {
   345  	Type        uint8
   346  	Physical    uint8
   347  	Addrlen     uint8
   348  	Hdrlen      uint8
   349  	Link_state  uint8
   350  	Spare_char1 uint8
   351  	Spare_char2 uint8
   352  	Datalen     uint8
   353  	Mtu         uint32
   354  	Metric      uint32
   355  	Baudrate    uint32
   356  	Ipackets    uint32
   357  	Ierrors     uint32
   358  	Opackets    uint32
   359  	Oerrors     uint32
   360  	Collisions  uint32
   361  	Ibytes      uint32
   362  	Obytes      uint32
   363  	Imcasts     uint32
   364  	Omcasts     uint32
   365  	Iqdrops     uint32
   366  	Noproto     uint32
   367  	Hwassist    uint32
   368  	Epoch       int32
   369  	Lastchange  Timeval
   370  }
   371  
   372  type IfaMsghdr struct {
   373  	Msglen    uint16
   374  	Version   uint8
   375  	Type      uint8
   376  	Addrs     int32
   377  	Flags     int32
   378  	Index     uint16
   379  	Pad_cgo_0 [2]byte
   380  	Metric    int32
   381  }
   382  
   383  type IfmaMsghdr struct {
   384  	Msglen    uint16
   385  	Version   uint8
   386  	Type      uint8
   387  	Addrs     int32
   388  	Flags     int32
   389  	Index     uint16
   390  	Pad_cgo_0 [2]byte
   391  }
   392  
   393  type IfAnnounceMsghdr struct {
   394  	Msglen  uint16
   395  	Version uint8
   396  	Type    uint8
   397  	Index   uint16
   398  	Name    [16]int8
   399  	What    uint16
   400  }
   401  
   402  type RtMsghdr struct {
   403  	Msglen    uint16
   404  	Version   uint8
   405  	Type      uint8
   406  	Index     uint16
   407  	Pad_cgo_0 [2]byte
   408  	Flags     int32
   409  	Addrs     int32
   410  	Pid       int32
   411  	Seq       int32
   412  	Errno     int32
   413  	Fmask     int32
   414  	Inits     uint32
   415  	Rmx       RtMetrics
   416  }
   417  
   418  type RtMetrics struct {
   419  	Locks    uint32
   420  	Mtu      uint32
   421  	Hopcount uint32
   422  	Expire   uint32
   423  	Recvpipe uint32
   424  	Sendpipe uint32
   425  	Ssthresh uint32
   426  	Rtt      uint32
   427  	Rttvar   uint32
   428  	Pksent   uint32
   429  	Weight   uint32
   430  	Filler   [3]uint32
   431  }
   432  
   433  const (
   434  	SizeofBpfVersion    = 0x4
   435  	SizeofBpfStat       = 0x8
   436  	SizeofBpfZbuf       = 0xc
   437  	SizeofBpfProgram    = 0x8
   438  	SizeofBpfInsn       = 0x8
   439  	SizeofBpfHdr        = 0x14
   440  	SizeofBpfZbufHeader = 0x20
   441  )
   442  
   443  type BpfVersion struct {
   444  	Major uint16
   445  	Minor uint16
   446  }
   447  
   448  type BpfStat struct {
   449  	Recv uint32
   450  	Drop uint32
   451  }
   452  
   453  type BpfZbuf struct {
   454  	Bufa   *byte
   455  	Bufb   *byte
   456  	Buflen uint32
   457  }
   458  
   459  type BpfProgram struct {
   460  	Len   uint32
   461  	Insns *BpfInsn
   462  }
   463  
   464  type BpfInsn struct {
   465  	Code uint16
   466  	Jt   uint8
   467  	Jf   uint8
   468  	K    uint32
   469  }
   470  
   471  type BpfHdr struct {
   472  	Tstamp    Timeval
   473  	Caplen    uint32
   474  	Datalen   uint32
   475  	Hdrlen    uint16
   476  	Pad_cgo_0 [2]byte
   477  }
   478  
   479  type BpfZbufHeader struct {
   480  	Kernel_gen uint32
   481  	Kernel_len uint32
   482  	User_gen   uint32
   483  	X_bzh_pad  [5]uint32
   484  }
   485  
   486  type Termios struct {
   487  	Iflag  uint32
   488  	Oflag  uint32
   489  	Cflag  uint32
   490  	Lflag  uint32
   491  	Cc     [20]uint8
   492  	Ispeed uint32
   493  	Ospeed uint32
   494  }