github.com/peggyl/go@v0.0.0-20151008231540-ae315999c2d5/src/syscall/ztypes_freebsd_amd64.go (about)

     1  // Created by cgo -godefs - DO NOT EDIT
     2  // cgo -godefs types_freebsd.go
     3  
     4  // +build amd64,freebsd
     5  
     6  package syscall
     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       uint32
    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  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  uint64
   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  	Pad_cgo_0  [4]byte
   220  	Iov        *Iovec
   221  	Iovlen     int32
   222  	Pad_cgo_1  [4]byte
   223  	Control    *byte
   224  	Controllen uint32
   225  	Flags      int32
   226  }
   227  
   228  type Cmsghdr struct {
   229  	Len   uint32
   230  	Level int32
   231  	Type  int32
   232  }
   233  
   234  type Inet6Pktinfo struct {
   235  	Addr    [16]byte /* in6_addr */
   236  	Ifindex uint32
   237  }
   238  
   239  type IPv6MTUInfo struct {
   240  	Addr RawSockaddrInet6
   241  	Mtu  uint32
   242  }
   243  
   244  type ICMPv6Filter struct {
   245  	Filt [8]uint32
   246  }
   247  
   248  const (
   249  	SizeofSockaddrInet4    = 0x10
   250  	SizeofSockaddrInet6    = 0x1c
   251  	SizeofSockaddrAny      = 0x6c
   252  	SizeofSockaddrUnix     = 0x6a
   253  	SizeofSockaddrDatalink = 0x36
   254  	SizeofLinger           = 0x8
   255  	SizeofIPMreq           = 0x8
   256  	SizeofIPMreqn          = 0xc
   257  	SizeofIPv6Mreq         = 0x14
   258  	SizeofMsghdr           = 0x30
   259  	SizeofCmsghdr          = 0xc
   260  	SizeofInet6Pktinfo     = 0x14
   261  	SizeofIPv6MTUInfo      = 0x20
   262  	SizeofICMPv6Filter     = 0x20
   263  )
   264  
   265  const (
   266  	PTRACE_TRACEME = 0x0
   267  	PTRACE_CONT    = 0x7
   268  	PTRACE_KILL    = 0x8
   269  )
   270  
   271  type Kevent_t struct {
   272  	Ident  uint64
   273  	Filter int16
   274  	Flags  uint16
   275  	Fflags uint32
   276  	Data   int64
   277  	Udata  *byte
   278  }
   279  
   280  type FdSet struct {
   281  	X__fds_bits [16]uint64
   282  }
   283  
   284  const (
   285  	sizeofIfMsghdr         = 0xa8
   286  	SizeofIfMsghdr         = 0xa8
   287  	sizeofIfData           = 0x98
   288  	SizeofIfData           = 0x98
   289  	SizeofIfaMsghdr        = 0x14
   290  	SizeofIfmaMsghdr       = 0x10
   291  	SizeofIfAnnounceMsghdr = 0x18
   292  	SizeofRtMsghdr         = 0x98
   293  	SizeofRtMetrics        = 0x70
   294  )
   295  
   296  type ifMsghdr struct {
   297  	Msglen    uint16
   298  	Version   uint8
   299  	Type      uint8
   300  	Addrs     int32
   301  	Flags     int32
   302  	Index     uint16
   303  	Pad_cgo_0 [2]byte
   304  	Data      ifData
   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 ifData struct {
   319  	Type        uint8
   320  	Physical    uint8
   321  	Addrlen     uint8
   322  	Hdrlen      uint8
   323  	Link_state  uint8
   324  	Vhid        uint8
   325  	Baudrate_pf uint8
   326  	Datalen     uint8
   327  	Mtu         uint64
   328  	Metric      uint64
   329  	Baudrate    uint64
   330  	Ipackets    uint64
   331  	Ierrors     uint64
   332  	Opackets    uint64
   333  	Oerrors     uint64
   334  	Collisions  uint64
   335  	Ibytes      uint64
   336  	Obytes      uint64
   337  	Imcasts     uint64
   338  	Omcasts     uint64
   339  	Iqdrops     uint64
   340  	Noproto     uint64
   341  	Hwassist    uint64
   342  	Epoch       int64
   343  	Lastchange  Timeval
   344  }
   345  
   346  type IfData struct {
   347  	Type        uint8
   348  	Physical    uint8
   349  	Addrlen     uint8
   350  	Hdrlen      uint8
   351  	Link_state  uint8
   352  	Spare_char1 uint8
   353  	Spare_char2 uint8
   354  	Datalen     uint8
   355  	Mtu         uint64
   356  	Metric      uint64
   357  	Baudrate    uint64
   358  	Ipackets    uint64
   359  	Ierrors     uint64
   360  	Opackets    uint64
   361  	Oerrors     uint64
   362  	Collisions  uint64
   363  	Ibytes      uint64
   364  	Obytes      uint64
   365  	Imcasts     uint64
   366  	Omcasts     uint64
   367  	Iqdrops     uint64
   368  	Noproto     uint64
   369  	Hwassist    uint64
   370  	Epoch       int64
   371  	Lastchange  Timeval
   372  }
   373  
   374  type IfaMsghdr struct {
   375  	Msglen    uint16
   376  	Version   uint8
   377  	Type      uint8
   378  	Addrs     int32
   379  	Flags     int32
   380  	Index     uint16
   381  	Pad_cgo_0 [2]byte
   382  	Metric    int32
   383  }
   384  
   385  type IfmaMsghdr 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  }
   394  
   395  type IfAnnounceMsghdr struct {
   396  	Msglen  uint16
   397  	Version uint8
   398  	Type    uint8
   399  	Index   uint16
   400  	Name    [16]int8
   401  	What    uint16
   402  }
   403  
   404  type RtMsghdr struct {
   405  	Msglen    uint16
   406  	Version   uint8
   407  	Type      uint8
   408  	Index     uint16
   409  	Pad_cgo_0 [2]byte
   410  	Flags     int32
   411  	Addrs     int32
   412  	Pid       int32
   413  	Seq       int32
   414  	Errno     int32
   415  	Fmask     int32
   416  	Inits     uint64
   417  	Rmx       RtMetrics
   418  }
   419  
   420  type RtMetrics struct {
   421  	Locks    uint64
   422  	Mtu      uint64
   423  	Hopcount uint64
   424  	Expire   uint64
   425  	Recvpipe uint64
   426  	Sendpipe uint64
   427  	Ssthresh uint64
   428  	Rtt      uint64
   429  	Rttvar   uint64
   430  	Pksent   uint64
   431  	Weight   uint64
   432  	Filler   [3]uint64
   433  }
   434  
   435  const (
   436  	SizeofBpfVersion    = 0x4
   437  	SizeofBpfStat       = 0x8
   438  	SizeofBpfZbuf       = 0x18
   439  	SizeofBpfProgram    = 0x10
   440  	SizeofBpfInsn       = 0x8
   441  	SizeofBpfHdr        = 0x20
   442  	SizeofBpfZbufHeader = 0x20
   443  )
   444  
   445  type BpfVersion struct {
   446  	Major uint16
   447  	Minor uint16
   448  }
   449  
   450  type BpfStat struct {
   451  	Recv uint32
   452  	Drop uint32
   453  }
   454  
   455  type BpfZbuf struct {
   456  	Bufa   *byte
   457  	Bufb   *byte
   458  	Buflen uint64
   459  }
   460  
   461  type BpfProgram struct {
   462  	Len       uint32
   463  	Pad_cgo_0 [4]byte
   464  	Insns     *BpfInsn
   465  }
   466  
   467  type BpfInsn struct {
   468  	Code uint16
   469  	Jt   uint8
   470  	Jf   uint8
   471  	K    uint32
   472  }
   473  
   474  type BpfHdr struct {
   475  	Tstamp    Timeval
   476  	Caplen    uint32
   477  	Datalen   uint32
   478  	Hdrlen    uint16
   479  	Pad_cgo_0 [6]byte
   480  }
   481  
   482  type BpfZbufHeader struct {
   483  	Kernel_gen uint32
   484  	Kernel_len uint32
   485  	User_gen   uint32
   486  	X_bzh_pad  [5]uint32
   487  }
   488  
   489  type Termios struct {
   490  	Iflag  uint32
   491  	Oflag  uint32
   492  	Cflag  uint32
   493  	Lflag  uint32
   494  	Cc     [20]uint8
   495  	Ispeed uint32
   496  	Ospeed uint32
   497  }