github.com/Kalvelign/golang-windows-sys-lib@v0.0.0-20221121121202-63da651435e1/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  //go:build amd64 && freebsd
     5  // +build amd64,freebsd
     6  
     7  package unix
     8  
     9  const (
    10  	SizeofPtr      = 0x8
    11  	SizeofShort    = 0x2
    12  	SizeofInt      = 0x4
    13  	SizeofLong     = 0x8
    14  	SizeofLongLong = 0x8
    15  )
    16  
    17  type (
    18  	_C_short     int16
    19  	_C_int       int32
    20  	_C_long      int64
    21  	_C_long_long int64
    22  )
    23  
    24  type Timespec struct {
    25  	Sec  int64
    26  	Nsec int64
    27  }
    28  
    29  type Timeval struct {
    30  	Sec  int64
    31  	Usec int64
    32  }
    33  
    34  type Time_t int64
    35  
    36  type Rusage struct {
    37  	Utime    Timeval
    38  	Stime    Timeval
    39  	Maxrss   int64
    40  	Ixrss    int64
    41  	Idrss    int64
    42  	Isrss    int64
    43  	Minflt   int64
    44  	Majflt   int64
    45  	Nswap    int64
    46  	Inblock  int64
    47  	Oublock  int64
    48  	Msgsnd   int64
    49  	Msgrcv   int64
    50  	Nsignals int64
    51  	Nvcsw    int64
    52  	Nivcsw   int64
    53  }
    54  
    55  type Rlimit struct {
    56  	Cur int64
    57  	Max int64
    58  }
    59  
    60  type _Gid_t uint32
    61  
    62  const (
    63  	_statfsVersion = 0x20140518
    64  	_dirblksiz     = 0x400
    65  )
    66  
    67  type Stat_t struct {
    68  	Dev     uint64
    69  	Ino     uint64
    70  	Nlink   uint64
    71  	Mode    uint16
    72  	_0      int16
    73  	Uid     uint32
    74  	Gid     uint32
    75  	_1      int32
    76  	Rdev    uint64
    77  	Atim    Timespec
    78  	Mtim    Timespec
    79  	Ctim    Timespec
    80  	Btim    Timespec
    81  	Size    int64
    82  	Blocks  int64
    83  	Blksize int32
    84  	Flags   uint32
    85  	Gen     uint64
    86  	Spare   [10]uint64
    87  }
    88  
    89  type Statfs_t struct {
    90  	Version     uint32
    91  	Type        uint32
    92  	Flags       uint64
    93  	Bsize       uint64
    94  	Iosize      uint64
    95  	Blocks      uint64
    96  	Bfree       uint64
    97  	Bavail      int64
    98  	Files       uint64
    99  	Ffree       int64
   100  	Syncwrites  uint64
   101  	Asyncwrites uint64
   102  	Syncreads   uint64
   103  	Asyncreads  uint64
   104  	Spare       [10]uint64
   105  	Namemax     uint32
   106  	Owner       uint32
   107  	Fsid        Fsid
   108  	Charspare   [80]int8
   109  	Fstypename  [16]byte
   110  	Mntfromname [1024]byte
   111  	Mntonname   [1024]byte
   112  }
   113  
   114  type Flock_t struct {
   115  	Start  int64
   116  	Len    int64
   117  	Pid    int32
   118  	Type   int16
   119  	Whence int16
   120  	Sysid  int32
   121  	_      [4]byte
   122  }
   123  
   124  type Dirent struct {
   125  	Fileno uint64
   126  	Off    int64
   127  	Reclen uint16
   128  	Type   uint8
   129  	Pad0   uint8
   130  	Namlen uint16
   131  	Pad1   uint16
   132  	Name   [256]int8
   133  }
   134  
   135  type Fsid struct {
   136  	Val [2]int32
   137  }
   138  
   139  const (
   140  	PathMax = 0x400
   141  )
   142  
   143  const (
   144  	FADV_NORMAL     = 0x0
   145  	FADV_RANDOM     = 0x1
   146  	FADV_SEQUENTIAL = 0x2
   147  	FADV_WILLNEED   = 0x3
   148  	FADV_DONTNEED   = 0x4
   149  	FADV_NOREUSE    = 0x5
   150  )
   151  
   152  type RawSockaddrInet4 struct {
   153  	Len    uint8
   154  	Family uint8
   155  	Port   uint16
   156  	Addr   [4]byte /* in_addr */
   157  	Zero   [8]int8
   158  }
   159  
   160  type RawSockaddrInet6 struct {
   161  	Len      uint8
   162  	Family   uint8
   163  	Port     uint16
   164  	Flowinfo uint32
   165  	Addr     [16]byte /* in6_addr */
   166  	Scope_id uint32
   167  }
   168  
   169  type RawSockaddrUnix struct {
   170  	Len    uint8
   171  	Family uint8
   172  	Path   [104]int8
   173  }
   174  
   175  type RawSockaddrDatalink struct {
   176  	Len    uint8
   177  	Family uint8
   178  	Index  uint16
   179  	Type   uint8
   180  	Nlen   uint8
   181  	Alen   uint8
   182  	Slen   uint8
   183  	Data   [46]int8
   184  }
   185  
   186  type RawSockaddr struct {
   187  	Len    uint8
   188  	Family uint8
   189  	Data   [14]int8
   190  }
   191  
   192  type RawSockaddrAny struct {
   193  	Addr RawSockaddr
   194  	Pad  [92]int8
   195  }
   196  
   197  type _Socklen uint32
   198  
   199  type Xucred struct {
   200  	Version uint32
   201  	Uid     uint32
   202  	Ngroups int16
   203  	Groups  [16]uint32
   204  	_       *byte
   205  }
   206  
   207  type Linger struct {
   208  	Onoff  int32
   209  	Linger int32
   210  }
   211  
   212  type Iovec struct {
   213  	Base *byte
   214  	Len  uint64
   215  }
   216  
   217  type IPMreq struct {
   218  	Multiaddr [4]byte /* in_addr */
   219  	Interface [4]byte /* in_addr */
   220  }
   221  
   222  type IPMreqn struct {
   223  	Multiaddr [4]byte /* in_addr */
   224  	Address   [4]byte /* in_addr */
   225  	Ifindex   int32
   226  }
   227  
   228  type IPv6Mreq struct {
   229  	Multiaddr [16]byte /* in6_addr */
   230  	Interface uint32
   231  }
   232  
   233  type Msghdr struct {
   234  	Name       *byte
   235  	Namelen    uint32
   236  	Iov        *Iovec
   237  	Iovlen     int32
   238  	Control    *byte
   239  	Controllen uint32
   240  	Flags      int32
   241  }
   242  
   243  type Cmsghdr struct {
   244  	Len   uint32
   245  	Level int32
   246  	Type  int32
   247  }
   248  
   249  type Inet6Pktinfo struct {
   250  	Addr    [16]byte /* in6_addr */
   251  	Ifindex uint32
   252  }
   253  
   254  type IPv6MTUInfo struct {
   255  	Addr RawSockaddrInet6
   256  	Mtu  uint32
   257  }
   258  
   259  type ICMPv6Filter struct {
   260  	Filt [8]uint32
   261  }
   262  
   263  const (
   264  	SizeofSockaddrInet4    = 0x10
   265  	SizeofSockaddrInet6    = 0x1c
   266  	SizeofSockaddrAny      = 0x6c
   267  	SizeofSockaddrUnix     = 0x6a
   268  	SizeofSockaddrDatalink = 0x36
   269  	SizeofXucred           = 0x58
   270  	SizeofLinger           = 0x8
   271  	SizeofIovec            = 0x10
   272  	SizeofIPMreq           = 0x8
   273  	SizeofIPMreqn          = 0xc
   274  	SizeofIPv6Mreq         = 0x14
   275  	SizeofMsghdr           = 0x30
   276  	SizeofCmsghdr          = 0xc
   277  	SizeofInet6Pktinfo     = 0x14
   278  	SizeofIPv6MTUInfo      = 0x20
   279  	SizeofICMPv6Filter     = 0x20
   280  )
   281  
   282  const (
   283  	PTRACE_TRACEME = 0x0
   284  	PTRACE_CONT    = 0x7
   285  	PTRACE_KILL    = 0x8
   286  )
   287  
   288  type PtraceLwpInfoStruct struct {
   289  	Lwpid        int32
   290  	Event        int32
   291  	Flags        int32
   292  	Sigmask      Sigset_t
   293  	Siglist      Sigset_t
   294  	Siginfo      __PtraceSiginfo
   295  	Tdname       [20]int8
   296  	Child_pid    int32
   297  	Syscall_code uint32
   298  	Syscall_narg uint32
   299  }
   300  
   301  type __Siginfo struct {
   302  	Signo  int32
   303  	Errno  int32
   304  	Code   int32
   305  	Pid    int32
   306  	Uid    uint32
   307  	Status int32
   308  	Addr   *byte
   309  	Value  [8]byte
   310  	_      [40]byte
   311  }
   312  
   313  type __PtraceSiginfo struct {
   314  	Signo  int32
   315  	Errno  int32
   316  	Code   int32
   317  	Pid    int32
   318  	Uid    uint32
   319  	Status int32
   320  	Addr   uintptr
   321  	Value  [8]byte
   322  	_      [40]byte
   323  }
   324  
   325  type Sigset_t struct {
   326  	Val [4]uint32
   327  }
   328  
   329  type Reg struct {
   330  	R15    int64
   331  	R14    int64
   332  	R13    int64
   333  	R12    int64
   334  	R11    int64
   335  	R10    int64
   336  	R9     int64
   337  	R8     int64
   338  	Rdi    int64
   339  	Rsi    int64
   340  	Rbp    int64
   341  	Rbx    int64
   342  	Rdx    int64
   343  	Rcx    int64
   344  	Rax    int64
   345  	Trapno uint32
   346  	Fs     uint16
   347  	Gs     uint16
   348  	Err    uint32
   349  	Es     uint16
   350  	Ds     uint16
   351  	Rip    int64
   352  	Cs     int64
   353  	Rflags int64
   354  	Rsp    int64
   355  	Ss     int64
   356  }
   357  
   358  type FpReg struct {
   359  	Env   [4]uint64
   360  	Acc   [8][16]uint8
   361  	Xacc  [16][16]uint8
   362  	Spare [12]uint64
   363  }
   364  
   365  type FpExtendedPrecision struct{}
   366  
   367  type PtraceIoDesc struct {
   368  	Op   int32
   369  	Offs uintptr
   370  	Addr uintptr
   371  	Len  uint64
   372  }
   373  
   374  type Kevent_t struct {
   375  	Ident  uint64
   376  	Filter int16
   377  	Flags  uint16
   378  	Fflags uint32
   379  	Data   int64
   380  	Udata  *byte
   381  	Ext    [4]uint64
   382  }
   383  
   384  type FdSet struct {
   385  	Bits [16]uint64
   386  }
   387  
   388  const (
   389  	sizeofIfMsghdr         = 0xa8
   390  	SizeofIfMsghdr         = 0xa8
   391  	sizeofIfData           = 0x98
   392  	SizeofIfData           = 0x98
   393  	SizeofIfaMsghdr        = 0x14
   394  	SizeofIfmaMsghdr       = 0x10
   395  	SizeofIfAnnounceMsghdr = 0x18
   396  	SizeofRtMsghdr         = 0x98
   397  	SizeofRtMetrics        = 0x70
   398  )
   399  
   400  type ifMsghdr struct {
   401  	Msglen  uint16
   402  	Version uint8
   403  	Type    uint8
   404  	Addrs   int32
   405  	Flags   int32
   406  	Index   uint16
   407  	_       uint16
   408  	Data    ifData
   409  }
   410  
   411  type IfMsghdr struct {
   412  	Msglen  uint16
   413  	Version uint8
   414  	Type    uint8
   415  	Addrs   int32
   416  	Flags   int32
   417  	Index   uint16
   418  	Data    IfData
   419  }
   420  
   421  type ifData struct {
   422  	Type       uint8
   423  	Physical   uint8
   424  	Addrlen    uint8
   425  	Hdrlen     uint8
   426  	Link_state uint8
   427  	Vhid       uint8
   428  	Datalen    uint16
   429  	Mtu        uint32
   430  	Metric     uint32
   431  	Baudrate   uint64
   432  	Ipackets   uint64
   433  	Ierrors    uint64
   434  	Opackets   uint64
   435  	Oerrors    uint64
   436  	Collisions uint64
   437  	Ibytes     uint64
   438  	Obytes     uint64
   439  	Imcasts    uint64
   440  	Omcasts    uint64
   441  	Iqdrops    uint64
   442  	Oqdrops    uint64
   443  	Noproto    uint64
   444  	Hwassist   uint64
   445  	_          [8]byte
   446  	_          [16]byte
   447  }
   448  
   449  type IfData struct {
   450  	Type        uint8
   451  	Physical    uint8
   452  	Addrlen     uint8
   453  	Hdrlen      uint8
   454  	Link_state  uint8
   455  	Spare_char1 uint8
   456  	Spare_char2 uint8
   457  	Datalen     uint8
   458  	Mtu         uint64
   459  	Metric      uint64
   460  	Baudrate    uint64
   461  	Ipackets    uint64
   462  	Ierrors     uint64
   463  	Opackets    uint64
   464  	Oerrors     uint64
   465  	Collisions  uint64
   466  	Ibytes      uint64
   467  	Obytes      uint64
   468  	Imcasts     uint64
   469  	Omcasts     uint64
   470  	Iqdrops     uint64
   471  	Noproto     uint64
   472  	Hwassist    uint64
   473  	Epoch       int64
   474  	Lastchange  Timeval
   475  }
   476  
   477  type IfaMsghdr struct {
   478  	Msglen  uint16
   479  	Version uint8
   480  	Type    uint8
   481  	Addrs   int32
   482  	Flags   int32
   483  	Index   uint16
   484  	_       uint16
   485  	Metric  int32
   486  }
   487  
   488  type IfmaMsghdr struct {
   489  	Msglen  uint16
   490  	Version uint8
   491  	Type    uint8
   492  	Addrs   int32
   493  	Flags   int32
   494  	Index   uint16
   495  	_       uint16
   496  }
   497  
   498  type IfAnnounceMsghdr struct {
   499  	Msglen  uint16
   500  	Version uint8
   501  	Type    uint8
   502  	Index   uint16
   503  	Name    [16]int8
   504  	What    uint16
   505  }
   506  
   507  type RtMsghdr struct {
   508  	Msglen  uint16
   509  	Version uint8
   510  	Type    uint8
   511  	Index   uint16
   512  	_       uint16
   513  	Flags   int32
   514  	Addrs   int32
   515  	Pid     int32
   516  	Seq     int32
   517  	Errno   int32
   518  	Fmask   int32
   519  	Inits   uint64
   520  	Rmx     RtMetrics
   521  }
   522  
   523  type RtMetrics struct {
   524  	Locks    uint64
   525  	Mtu      uint64
   526  	Hopcount uint64
   527  	Expire   uint64
   528  	Recvpipe uint64
   529  	Sendpipe uint64
   530  	Ssthresh uint64
   531  	Rtt      uint64
   532  	Rttvar   uint64
   533  	Pksent   uint64
   534  	Weight   uint64
   535  	Filler   [3]uint64
   536  }
   537  
   538  const (
   539  	SizeofBpfVersion    = 0x4
   540  	SizeofBpfStat       = 0x8
   541  	SizeofBpfZbuf       = 0x18
   542  	SizeofBpfProgram    = 0x10
   543  	SizeofBpfInsn       = 0x8
   544  	SizeofBpfHdr        = 0x20
   545  	SizeofBpfZbufHeader = 0x20
   546  )
   547  
   548  type BpfVersion struct {
   549  	Major uint16
   550  	Minor uint16
   551  }
   552  
   553  type BpfStat struct {
   554  	Recv uint32
   555  	Drop uint32
   556  }
   557  
   558  type BpfZbuf struct {
   559  	Bufa   *byte
   560  	Bufb   *byte
   561  	Buflen uint64
   562  }
   563  
   564  type BpfProgram struct {
   565  	Len   uint32
   566  	Insns *BpfInsn
   567  }
   568  
   569  type BpfInsn struct {
   570  	Code uint16
   571  	Jt   uint8
   572  	Jf   uint8
   573  	K    uint32
   574  }
   575  
   576  type BpfHdr struct {
   577  	Tstamp  Timeval
   578  	Caplen  uint32
   579  	Datalen uint32
   580  	Hdrlen  uint16
   581  	_       [6]byte
   582  }
   583  
   584  type BpfZbufHeader struct {
   585  	Kernel_gen uint32
   586  	Kernel_len uint32
   587  	User_gen   uint32
   588  	_          [5]uint32
   589  }
   590  
   591  type Termios struct {
   592  	Iflag  uint32
   593  	Oflag  uint32
   594  	Cflag  uint32
   595  	Lflag  uint32
   596  	Cc     [20]uint8
   597  	Ispeed uint32
   598  	Ospeed uint32
   599  }
   600  
   601  type Winsize struct {
   602  	Row    uint16
   603  	Col    uint16
   604  	Xpixel uint16
   605  	Ypixel uint16
   606  }
   607  
   608  const (
   609  	AT_FDCWD            = -0x64
   610  	AT_EACCESS          = 0x100
   611  	AT_SYMLINK_NOFOLLOW = 0x200
   612  	AT_SYMLINK_FOLLOW   = 0x400
   613  	AT_REMOVEDIR        = 0x800
   614  )
   615  
   616  type PollFd struct {
   617  	Fd      int32
   618  	Events  int16
   619  	Revents int16
   620  }
   621  
   622  const (
   623  	POLLERR      = 0x8
   624  	POLLHUP      = 0x10
   625  	POLLIN       = 0x1
   626  	POLLINIGNEOF = 0x2000
   627  	POLLNVAL     = 0x20
   628  	POLLOUT      = 0x4
   629  	POLLPRI      = 0x2
   630  	POLLRDBAND   = 0x80
   631  	POLLRDNORM   = 0x40
   632  	POLLWRBAND   = 0x100
   633  	POLLWRNORM   = 0x4
   634  )
   635  
   636  type CapRights struct {
   637  	Rights [2]uint64
   638  }
   639  
   640  type Utsname struct {
   641  	Sysname  [256]byte
   642  	Nodename [256]byte
   643  	Release  [256]byte
   644  	Version  [256]byte
   645  	Machine  [256]byte
   646  }
   647  
   648  const SizeofClockinfo = 0x14
   649  
   650  type Clockinfo struct {
   651  	Hz     int32
   652  	Tick   int32
   653  	Spare  int32
   654  	Stathz int32
   655  	Profhz int32
   656  }