Source file src/syscall/ztypes_openbsd_386.go

     1  // Created by cgo -godefs - DO NOT EDIT
     2  // cgo -godefs types_openbsd.go
     3  
     4  //go:build 386 && openbsd
     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  int64
    25  	Nsec int32
    26  }
    27  
    28  type Timeval struct {
    29  	Sec  int64
    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 uint64
    54  	Max uint64
    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  	S_IRWXG  = 0x38
    75  	S_IRWXO  = 0x7
    76  )
    77  
    78  type Stat_t struct {
    79  	Mode           uint32
    80  	Dev            int32
    81  	Ino            uint64
    82  	Nlink          uint32
    83  	Uid            uint32
    84  	Gid            uint32
    85  	Rdev           int32
    86  	Atim           Timespec
    87  	Mtim           Timespec
    88  	Ctim           Timespec
    89  	Size           int64
    90  	Blocks         int64
    91  	Blksize        uint32
    92  	Flags          uint32
    93  	Gen            uint32
    94  	X__st_birthtim Timespec
    95  }
    96  
    97  type Statfs_t struct {
    98  	F_flags       uint32
    99  	F_bsize       uint32
   100  	F_iosize      uint32
   101  	F_blocks      uint64
   102  	F_bfree       uint64
   103  	F_bavail      int64
   104  	F_files       uint64
   105  	F_ffree       uint64
   106  	F_favail      int64
   107  	F_syncwrites  uint64
   108  	F_syncreads   uint64
   109  	F_asyncwrites uint64
   110  	F_asyncreads  uint64
   111  	F_fsid        Fsid
   112  	F_namemax     uint32
   113  	F_owner       uint32
   114  	F_ctime       uint64
   115  	F_fstypename  [16]int8
   116  	F_mntonname   [90]int8
   117  	F_mntfromname [90]int8
   118  	F_mntfromspec [90]int8
   119  	Pad_cgo_0     [2]byte
   120  	Mount_info    [160]byte
   121  }
   122  
   123  type Flock_t struct {
   124  	Start  int64
   125  	Len    int64
   126  	Pid    int32
   127  	Type   int16
   128  	Whence int16
   129  }
   130  
   131  type Dirent struct {
   132  	Fileno       uint64
   133  	Off          int64
   134  	Reclen       uint16
   135  	Type         uint8
   136  	Namlen       uint8
   137  	X__d_padding [4]uint8
   138  	Name         [256]int8
   139  }
   140  
   141  type Fsid struct {
   142  	Val [2]int32
   143  }
   144  
   145  const (
   146  	pathMax = 0x400
   147  )
   148  
   149  type RawSockaddrInet4 struct {
   150  	Len    uint8
   151  	Family uint8
   152  	Port   uint16
   153  	Addr   [4]byte /* in_addr */
   154  	Zero   [8]int8
   155  }
   156  
   157  type RawSockaddrInet6 struct {
   158  	Len      uint8
   159  	Family   uint8
   160  	Port     uint16
   161  	Flowinfo uint32
   162  	Addr     [16]byte /* in6_addr */
   163  	Scope_id uint32
   164  }
   165  
   166  type RawSockaddrUnix struct {
   167  	Len    uint8
   168  	Family uint8
   169  	Path   [104]int8
   170  }
   171  
   172  type RawSockaddrDatalink struct {
   173  	Len    uint8
   174  	Family uint8
   175  	Index  uint16
   176  	Type   uint8
   177  	Nlen   uint8
   178  	Alen   uint8
   179  	Slen   uint8
   180  	Data   [24]int8
   181  }
   182  
   183  type RawSockaddr struct {
   184  	Len    uint8
   185  	Family uint8
   186  	Data   [14]int8
   187  }
   188  
   189  type RawSockaddrAny struct {
   190  	Addr RawSockaddr
   191  	Pad  [92]int8
   192  }
   193  
   194  type _Socklen uint32
   195  
   196  type Linger struct {
   197  	Onoff  int32
   198  	Linger int32
   199  }
   200  
   201  type Iovec struct {
   202  	Base *byte
   203  	Len  uint32
   204  }
   205  
   206  type IPMreq struct {
   207  	Multiaddr [4]byte /* in_addr */
   208  	Interface [4]byte /* in_addr */
   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     uint32
   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 = 0x20
   252  	SizeofLinger           = 0x8
   253  	SizeofIPMreq           = 0x8
   254  	SizeofIPv6Mreq         = 0x14
   255  	SizeofMsghdr           = 0x1c
   256  	SizeofCmsghdr          = 0xc
   257  	SizeofInet6Pktinfo     = 0x14
   258  	SizeofIPv6MTUInfo      = 0x20
   259  	SizeofICMPv6Filter     = 0x20
   260  )
   261  
   262  const (
   263  	PTRACE_TRACEME = 0x0
   264  	PTRACE_CONT    = 0x7
   265  	PTRACE_KILL    = 0x8
   266  )
   267  
   268  type Kevent_t struct {
   269  	Ident  uint32
   270  	Filter int16
   271  	Flags  uint16
   272  	Fflags uint32
   273  	Data   int64
   274  	Udata  *byte
   275  }
   276  
   277  type FdSet struct {
   278  	Bits [32]uint32
   279  }
   280  
   281  const (
   282  	SizeofIfMsghdr         = 0xec
   283  	SizeofIfData           = 0xd4
   284  	SizeofIfaMsghdr        = 0x18
   285  	SizeofIfAnnounceMsghdr = 0x1a
   286  	SizeofRtMsghdr         = 0x60
   287  	SizeofRtMetrics        = 0x38
   288  )
   289  
   290  type IfMsghdr struct {
   291  	Msglen  uint16
   292  	Version uint8
   293  	Type    uint8
   294  	Hdrlen  uint16
   295  	Index   uint16
   296  	Tableid uint16
   297  	Pad1    uint8
   298  	Pad2    uint8
   299  	Addrs   int32
   300  	Flags   int32
   301  	Xflags  int32
   302  	Data    IfData
   303  }
   304  
   305  type IfData struct {
   306  	Type         uint8
   307  	Addrlen      uint8
   308  	Hdrlen       uint8
   309  	Link_state   uint8
   310  	Mtu          uint32
   311  	Metric       uint32
   312  	Pad          uint32
   313  	Baudrate     uint64
   314  	Ipackets     uint64
   315  	Ierrors      uint64
   316  	Opackets     uint64
   317  	Oerrors      uint64
   318  	Collisions   uint64
   319  	Ibytes       uint64
   320  	Obytes       uint64
   321  	Imcasts      uint64
   322  	Omcasts      uint64
   323  	Iqdrops      uint64
   324  	Noproto      uint64
   325  	Capabilities uint32
   326  	Lastchange   Timeval
   327  	Mclpool      [7]Mclpool
   328  }
   329  
   330  type IfaMsghdr struct {
   331  	Msglen  uint16
   332  	Version uint8
   333  	Type    uint8
   334  	Hdrlen  uint16
   335  	Index   uint16
   336  	Tableid uint16
   337  	Pad1    uint8
   338  	Pad2    uint8
   339  	Addrs   int32
   340  	Flags   int32
   341  	Metric  int32
   342  }
   343  
   344  type IfAnnounceMsghdr struct {
   345  	Msglen  uint16
   346  	Version uint8
   347  	Type    uint8
   348  	Hdrlen  uint16
   349  	Index   uint16
   350  	What    uint16
   351  	Name    [16]int8
   352  }
   353  
   354  type RtMsghdr struct {
   355  	Msglen   uint16
   356  	Version  uint8
   357  	Type     uint8
   358  	Hdrlen   uint16
   359  	Index    uint16
   360  	Tableid  uint16
   361  	Priority uint8
   362  	Mpls     uint8
   363  	Addrs    int32
   364  	Flags    int32
   365  	Fmask    int32
   366  	Pid      int32
   367  	Seq      int32
   368  	Errno    int32
   369  	Inits    uint32
   370  	Rmx      RtMetrics
   371  }
   372  
   373  type RtMetrics struct {
   374  	Pksent   uint64
   375  	Expire   int64
   376  	Locks    uint32
   377  	Mtu      uint32
   378  	Refcnt   uint32
   379  	Hopcount uint32
   380  	Recvpipe uint32
   381  	Sendpipe uint32
   382  	Ssthresh uint32
   383  	Rtt      uint32
   384  	Rttvar   uint32
   385  	Pad      uint32
   386  }
   387  
   388  type Mclpool struct {
   389  	Grown int32
   390  	Alive uint16
   391  	Hwm   uint16
   392  	Cwm   uint16
   393  	Lwm   uint16
   394  }
   395  
   396  const (
   397  	SizeofBpfVersion = 0x4
   398  	SizeofBpfStat    = 0x8
   399  	SizeofBpfProgram = 0x8
   400  	SizeofBpfInsn    = 0x8
   401  	SizeofBpfHdr     = 0x14
   402  )
   403  
   404  type BpfVersion struct {
   405  	Major uint16
   406  	Minor uint16
   407  }
   408  
   409  type BpfStat struct {
   410  	Recv uint32
   411  	Drop uint32
   412  }
   413  
   414  type BpfProgram struct {
   415  	Len   uint32
   416  	Insns *BpfInsn
   417  }
   418  
   419  type BpfInsn struct {
   420  	Code uint16
   421  	Jt   uint8
   422  	Jf   uint8
   423  	K    uint32
   424  }
   425  
   426  type BpfHdr struct {
   427  	Tstamp    BpfTimeval
   428  	Caplen    uint32
   429  	Datalen   uint32
   430  	Hdrlen    uint16
   431  	Pad_cgo_0 [2]byte
   432  }
   433  
   434  type BpfTimeval struct {
   435  	Sec  uint32
   436  	Usec uint32
   437  }
   438  
   439  const (
   440  	_AT_FDCWD = -0x64
   441  )
   442  
   443  type Termios struct {
   444  	Iflag  uint32
   445  	Oflag  uint32
   446  	Cflag  uint32
   447  	Lflag  uint32
   448  	Cc     [20]uint8
   449  	Ispeed int32
   450  	Ospeed int32
   451  }
   452  

View as plain text