...
Run Format

Source file src/syscall/ztypes_freebsd_amd64.go

Documentation: syscall

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

View as plain text