vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
changeset 251 1c52a0eeb952
parent 242 2a9ec03fe5a1
child 256 6d9efbef00a9
equal deleted inserted replaced
250:c040f992052f 251:1c52a0eeb952
     4 // +build arm,freebsd
     4 // +build arm,freebsd
     5 
     5 
     6 package unix
     6 package unix
     7 
     7 
     8 const (
     8 const (
     9 	sizeofPtr      = 0x4
     9 	SizeofPtr      = 0x4
    10 	sizeofShort    = 0x2
    10 	SizeofShort    = 0x2
    11 	sizeofInt      = 0x4
    11 	SizeofInt      = 0x4
    12 	sizeofLong     = 0x4
    12 	SizeofLong     = 0x4
    13 	sizeofLongLong = 0x8
    13 	SizeofLongLong = 0x8
    14 )
    14 )
    15 
    15 
    16 type (
    16 type (
    17 	_C_short     int16
    17 	_C_short     int16
    18 	_C_int       int32
    18 	_C_int       int32
    19 	_C_long      int32
    19 	_C_long      int32
    20 	_C_long_long int64
    20 	_C_long_long int64
    21 )
    21 )
    22 
    22 
    23 type Timespec struct {
    23 type Timespec struct {
    24 	Sec       int64
    24 	Sec  int64
    25 	Nsec      int32
    25 	Nsec int32
    26 	Pad_cgo_0 [4]byte
    26 	_    [4]byte
    27 }
    27 }
    28 
    28 
    29 type Timeval struct {
    29 type Timeval struct {
    30 	Sec       int64
    30 	Sec  int64
    31 	Usec      int32
    31 	Usec int32
    32 	Pad_cgo_0 [4]byte
    32 	_    [4]byte
    33 }
    33 }
    34 
    34 
    35 type Rusage struct {
    35 type Rusage struct {
    36 	Utime    Timeval
    36 	Utime    Timeval
    37 	Stime    Timeval
    37 	Stime    Timeval
    56 	Max int64
    56 	Max int64
    57 }
    57 }
    58 
    58 
    59 type _Gid_t uint32
    59 type _Gid_t uint32
    60 
    60 
       
    61 const (
       
    62 	_statfsVersion = 0x20140518
       
    63 	_dirblksiz     = 0x400
       
    64 )
       
    65 
    61 type Stat_t struct {
    66 type Stat_t struct {
    62 	Dev           uint32
    67 	Dev     uint64
    63 	Ino           uint32
    68 	Ino     uint64
    64 	Mode          uint16
    69 	Nlink   uint64
    65 	Nlink         uint16
    70 	Mode    uint16
    66 	Uid           uint32
    71 	_0      int16
    67 	Gid           uint32
    72 	Uid     uint32
    68 	Rdev          uint32
    73 	Gid     uint32
    69 	Atimespec     Timespec
    74 	_1      int32
    70 	Mtimespec     Timespec
    75 	Rdev    uint64
    71 	Ctimespec     Timespec
    76 	Atim    Timespec
    72 	Size          int64
    77 	Mtim    Timespec
    73 	Blocks        int64
    78 	Ctim    Timespec
    74 	Blksize       int32
    79 	Btim    Timespec
    75 	Flags         uint32
    80 	Size    int64
    76 	Gen           uint32
    81 	Blocks  int64
    77 	Lspare        int32
    82 	Blksize int32
    78 	Birthtimespec Timespec
    83 	Flags   uint32
       
    84 	Gen     uint64
       
    85 	Spare   [10]uint64
       
    86 }
       
    87 
       
    88 type stat_freebsd11_t struct {
       
    89 	Dev     uint32
       
    90 	Ino     uint32
       
    91 	Mode    uint16
       
    92 	Nlink   uint16
       
    93 	Uid     uint32
       
    94 	Gid     uint32
       
    95 	Rdev    uint32
       
    96 	Atim    Timespec
       
    97 	Mtim    Timespec
       
    98 	Ctim    Timespec
       
    99 	Size    int64
       
   100 	Blocks  int64
       
   101 	Blksize int32
       
   102 	Flags   uint32
       
   103 	Gen     uint32
       
   104 	Lspare  int32
       
   105 	Btim    Timespec
    79 }
   106 }
    80 
   107 
    81 type Statfs_t struct {
   108 type Statfs_t struct {
       
   109 	Version     uint32
       
   110 	Type        uint32
       
   111 	Flags       uint64
       
   112 	Bsize       uint64
       
   113 	Iosize      uint64
       
   114 	Blocks      uint64
       
   115 	Bfree       uint64
       
   116 	Bavail      int64
       
   117 	Files       uint64
       
   118 	Ffree       int64
       
   119 	Syncwrites  uint64
       
   120 	Asyncwrites uint64
       
   121 	Syncreads   uint64
       
   122 	Asyncreads  uint64
       
   123 	Spare       [10]uint64
       
   124 	Namemax     uint32
       
   125 	Owner       uint32
       
   126 	Fsid        Fsid
       
   127 	Charspare   [80]int8
       
   128 	Fstypename  [16]int8
       
   129 	Mntfromname [1024]int8
       
   130 	Mntonname   [1024]int8
       
   131 }
       
   132 
       
   133 type statfs_freebsd11_t struct {
    82 	Version     uint32
   134 	Version     uint32
    83 	Type        uint32
   135 	Type        uint32
    84 	Flags       uint64
   136 	Flags       uint64
    85 	Bsize       uint64
   137 	Bsize       uint64
    86 	Iosize      uint64
   138 	Iosize      uint64
   102 	Mntfromname [88]int8
   154 	Mntfromname [88]int8
   103 	Mntonname   [88]int8
   155 	Mntonname   [88]int8
   104 }
   156 }
   105 
   157 
   106 type Flock_t struct {
   158 type Flock_t struct {
   107 	Start     int64
   159 	Start  int64
   108 	Len       int64
   160 	Len    int64
   109 	Pid       int32
   161 	Pid    int32
   110 	Type      int16
   162 	Type   int16
   111 	Whence    int16
   163 	Whence int16
   112 	Sysid     int32
   164 	Sysid  int32
   113 	Pad_cgo_0 [4]byte
   165 	_      [4]byte
   114 }
   166 }
   115 
   167 
   116 type Dirent struct {
   168 type Dirent struct {
       
   169 	Fileno uint64
       
   170 	Off    int64
       
   171 	Reclen uint16
       
   172 	Type   uint8
       
   173 	Pad0   uint8
       
   174 	Namlen uint16
       
   175 	Pad1   uint16
       
   176 	Name   [256]int8
       
   177 }
       
   178 
       
   179 type dirent_freebsd11 struct {
   117 	Fileno uint32
   180 	Fileno uint32
   118 	Reclen uint16
   181 	Reclen uint16
   119 	Type   uint8
   182 	Type   uint8
   120 	Namlen uint8
   183 	Namlen uint8
   121 	Name   [256]int8
   184 	Name   [256]int8
   257 	SizeofIPv6MTUInfo      = 0x20
   320 	SizeofIPv6MTUInfo      = 0x20
   258 	SizeofICMPv6Filter     = 0x20
   321 	SizeofICMPv6Filter     = 0x20
   259 )
   322 )
   260 
   323 
   261 const (
   324 const (
   262 	PTRACE_TRACEME = 0x0
   325 	PTRACE_ATTACH     = 0xa
   263 	PTRACE_CONT    = 0x7
   326 	PTRACE_CONT       = 0x7
   264 	PTRACE_KILL    = 0x8
   327 	PTRACE_DETACH     = 0xb
   265 )
   328 	PTRACE_GETFPREGS  = 0x23
       
   329 	PTRACE_GETFSBASE  = 0x47
       
   330 	PTRACE_GETLWPLIST = 0xf
       
   331 	PTRACE_GETNUMLWPS = 0xe
       
   332 	PTRACE_GETREGS    = 0x21
       
   333 	PTRACE_GETXSTATE  = 0x45
       
   334 	PTRACE_IO         = 0xc
       
   335 	PTRACE_KILL       = 0x8
       
   336 	PTRACE_LWPEVENTS  = 0x18
       
   337 	PTRACE_LWPINFO    = 0xd
       
   338 	PTRACE_SETFPREGS  = 0x24
       
   339 	PTRACE_SETREGS    = 0x22
       
   340 	PTRACE_SINGLESTEP = 0x9
       
   341 	PTRACE_TRACEME    = 0x0
       
   342 )
       
   343 
       
   344 const (
       
   345 	PIOD_READ_D  = 0x1
       
   346 	PIOD_WRITE_D = 0x2
       
   347 	PIOD_READ_I  = 0x3
       
   348 	PIOD_WRITE_I = 0x4
       
   349 )
       
   350 
       
   351 const (
       
   352 	PL_FLAG_BORN   = 0x100
       
   353 	PL_FLAG_EXITED = 0x200
       
   354 	PL_FLAG_SI     = 0x20
       
   355 )
       
   356 
       
   357 const (
       
   358 	TRAP_BRKPT = 0x1
       
   359 	TRAP_TRACE = 0x2
       
   360 )
       
   361 
       
   362 type PtraceLwpInfoStruct struct {
       
   363 	Lwpid        int32
       
   364 	Event        int32
       
   365 	Flags        int32
       
   366 	Sigmask      Sigset_t
       
   367 	Siglist      Sigset_t
       
   368 	Siginfo      __Siginfo
       
   369 	Tdname       [20]int8
       
   370 	Child_pid    int32
       
   371 	Syscall_code uint32
       
   372 	Syscall_narg uint32
       
   373 }
       
   374 
       
   375 type __Siginfo struct {
       
   376 	Signo    int32
       
   377 	Errno    int32
       
   378 	Code     int32
       
   379 	Pid      int32
       
   380 	Uid      uint32
       
   381 	Status   int32
       
   382 	Addr     *byte
       
   383 	Value    [4]byte
       
   384 	X_reason [32]byte
       
   385 }
       
   386 
       
   387 type Sigset_t struct {
       
   388 	Val [4]uint32
       
   389 }
       
   390 
       
   391 type Reg struct {
       
   392 	R      [13]uint32
       
   393 	R_sp   uint32
       
   394 	R_lr   uint32
       
   395 	R_pc   uint32
       
   396 	R_cpsr uint32
       
   397 }
       
   398 
       
   399 type FpReg struct {
       
   400 	Fpr_fpsr uint32
       
   401 	Fpr      [8][3]uint32
       
   402 }
       
   403 
       
   404 type PtraceIoDesc struct {
       
   405 	Op   int32
       
   406 	Offs *byte
       
   407 	Addr *byte
       
   408 	Len  uint32
       
   409 }
   266 
   410 
   267 type Kevent_t struct {
   411 type Kevent_t struct {
   268 	Ident  uint32
   412 	Ident  uint32
   269 	Filter int16
   413 	Filter int16
   270 	Flags  uint16
   414 	Flags  uint16
   272 	Data   int32
   416 	Data   int32
   273 	Udata  *byte
   417 	Udata  *byte
   274 }
   418 }
   275 
   419 
   276 type FdSet struct {
   420 type FdSet struct {
   277 	X__fds_bits [32]uint32
   421 	Bits [32]uint32
   278 }
   422 }
   279 
   423 
   280 const (
   424 const (
   281 	sizeofIfMsghdr         = 0xa8
   425 	sizeofIfMsghdr         = 0xa8
   282 	SizeofIfMsghdr         = 0x70
   426 	SizeofIfMsghdr         = 0x70
   288 	SizeofRtMsghdr         = 0x5c
   432 	SizeofRtMsghdr         = 0x5c
   289 	SizeofRtMetrics        = 0x38
   433 	SizeofRtMetrics        = 0x38
   290 )
   434 )
   291 
   435 
   292 type ifMsghdr struct {
   436 type ifMsghdr struct {
   293 	Msglen    uint16
   437 	Msglen  uint16
   294 	Version   uint8
   438 	Version uint8
   295 	Type      uint8
   439 	Type    uint8
   296 	Addrs     int32
   440 	Addrs   int32
   297 	Flags     int32
   441 	Flags   int32
   298 	Index     uint16
   442 	Index   uint16
   299 	Pad_cgo_0 [2]byte
   443 	_       [2]byte
   300 	Data      ifData
   444 	Data    ifData
   301 }
   445 }
   302 
   446 
   303 type IfMsghdr struct {
   447 type IfMsghdr struct {
   304 	Msglen    uint16
   448 	Msglen  uint16
   305 	Version   uint8
   449 	Version uint8
   306 	Type      uint8
   450 	Type    uint8
   307 	Addrs     int32
   451 	Addrs   int32
   308 	Flags     int32
   452 	Flags   int32
   309 	Index     uint16
   453 	Index   uint16
   310 	Pad_cgo_0 [2]byte
   454 	_       [2]byte
   311 	Data      IfData
   455 	Data    IfData
   312 }
   456 }
   313 
   457 
   314 type ifData struct {
   458 type ifData struct {
   315 	Type              uint8
   459 	Type       uint8
   316 	Physical          uint8
   460 	Physical   uint8
   317 	Addrlen           uint8
   461 	Addrlen    uint8
   318 	Hdrlen            uint8
   462 	Hdrlen     uint8
   319 	Link_state        uint8
   463 	Link_state uint8
   320 	Vhid              uint8
   464 	Vhid       uint8
   321 	Datalen           uint16
   465 	Datalen    uint16
   322 	Mtu               uint32
   466 	Mtu        uint32
   323 	Metric            uint32
   467 	Metric     uint32
   324 	Baudrate          uint64
   468 	Baudrate   uint64
   325 	Ipackets          uint64
   469 	Ipackets   uint64
   326 	Ierrors           uint64
   470 	Ierrors    uint64
   327 	Opackets          uint64
   471 	Opackets   uint64
   328 	Oerrors           uint64
   472 	Oerrors    uint64
   329 	Collisions        uint64
   473 	Collisions uint64
   330 	Ibytes            uint64
   474 	Ibytes     uint64
   331 	Obytes            uint64
   475 	Obytes     uint64
   332 	Imcasts           uint64
   476 	Imcasts    uint64
   333 	Omcasts           uint64
   477 	Omcasts    uint64
   334 	Iqdrops           uint64
   478 	Iqdrops    uint64
   335 	Oqdrops           uint64
   479 	Oqdrops    uint64
   336 	Noproto           uint64
   480 	Noproto    uint64
   337 	Hwassist          uint64
   481 	Hwassist   uint64
   338 	X__ifi_epoch      [8]byte
   482 	_          [8]byte
   339 	X__ifi_lastchange [16]byte
   483 	_          [16]byte
   340 }
   484 }
   341 
   485 
   342 type IfData struct {
   486 type IfData struct {
   343 	Type        uint8
   487 	Type        uint8
   344 	Physical    uint8
   488 	Physical    uint8
   361 	Imcasts     uint32
   505 	Imcasts     uint32
   362 	Omcasts     uint32
   506 	Omcasts     uint32
   363 	Iqdrops     uint32
   507 	Iqdrops     uint32
   364 	Noproto     uint32
   508 	Noproto     uint32
   365 	Hwassist    uint32
   509 	Hwassist    uint32
   366 	Pad_cgo_0   [4]byte
   510 	_           [4]byte
   367 	Epoch       int64
   511 	Epoch       int64
   368 	Lastchange  Timeval
   512 	Lastchange  Timeval
   369 }
   513 }
   370 
   514 
   371 type IfaMsghdr struct {
   515 type IfaMsghdr struct {
   372 	Msglen    uint16
   516 	Msglen  uint16
   373 	Version   uint8
   517 	Version uint8
   374 	Type      uint8
   518 	Type    uint8
   375 	Addrs     int32
   519 	Addrs   int32
   376 	Flags     int32
   520 	Flags   int32
   377 	Index     uint16
   521 	Index   uint16
   378 	Pad_cgo_0 [2]byte
   522 	_       [2]byte
   379 	Metric    int32
   523 	Metric  int32
   380 }
   524 }
   381 
   525 
   382 type IfmaMsghdr struct {
   526 type IfmaMsghdr struct {
   383 	Msglen    uint16
   527 	Msglen  uint16
   384 	Version   uint8
   528 	Version uint8
   385 	Type      uint8
   529 	Type    uint8
   386 	Addrs     int32
   530 	Addrs   int32
   387 	Flags     int32
   531 	Flags   int32
   388 	Index     uint16
   532 	Index   uint16
   389 	Pad_cgo_0 [2]byte
   533 	_       [2]byte
   390 }
   534 }
   391 
   535 
   392 type IfAnnounceMsghdr struct {
   536 type IfAnnounceMsghdr struct {
   393 	Msglen  uint16
   537 	Msglen  uint16
   394 	Version uint8
   538 	Version uint8
   397 	Name    [16]int8
   541 	Name    [16]int8
   398 	What    uint16
   542 	What    uint16
   399 }
   543 }
   400 
   544 
   401 type RtMsghdr struct {
   545 type RtMsghdr struct {
   402 	Msglen    uint16
   546 	Msglen  uint16
   403 	Version   uint8
   547 	Version uint8
   404 	Type      uint8
   548 	Type    uint8
   405 	Index     uint16
   549 	Index   uint16
   406 	Pad_cgo_0 [2]byte
   550 	_       [2]byte
   407 	Flags     int32
   551 	Flags   int32
   408 	Addrs     int32
   552 	Addrs   int32
   409 	Pid       int32
   553 	Pid     int32
   410 	Seq       int32
   554 	Seq     int32
   411 	Errno     int32
   555 	Errno   int32
   412 	Fmask     int32
   556 	Fmask   int32
   413 	Inits     uint32
   557 	Inits   uint32
   414 	Rmx       RtMetrics
   558 	Rmx     RtMetrics
   415 }
   559 }
   416 
   560 
   417 type RtMetrics struct {
   561 type RtMetrics struct {
   418 	Locks    uint32
   562 	Locks    uint32
   419 	Mtu      uint32
   563 	Mtu      uint32
   466 	Jf   uint8
   610 	Jf   uint8
   467 	K    uint32
   611 	K    uint32
   468 }
   612 }
   469 
   613 
   470 type BpfHdr struct {
   614 type BpfHdr struct {
   471 	Tstamp    Timeval
   615 	Tstamp  Timeval
   472 	Caplen    uint32
   616 	Caplen  uint32
   473 	Datalen   uint32
   617 	Datalen uint32
   474 	Hdrlen    uint16
   618 	Hdrlen  uint16
   475 	Pad_cgo_0 [6]byte
   619 	_       [6]byte
   476 }
   620 }
   477 
   621 
   478 type BpfZbufHeader struct {
   622 type BpfZbufHeader struct {
   479 	Kernel_gen uint32
   623 	Kernel_gen uint32
   480 	Kernel_len uint32
   624 	Kernel_len uint32
   481 	User_gen   uint32
   625 	User_gen   uint32
   482 	X_bzh_pad  [5]uint32
   626 	_          [5]uint32
   483 }
   627 }
   484 
   628 
   485 type Termios struct {
   629 type Termios struct {
   486 	Iflag  uint32
   630 	Iflag  uint32
   487 	Oflag  uint32
   631 	Oflag  uint32
   535 	Nodename [256]byte
   679 	Nodename [256]byte
   536 	Release  [256]byte
   680 	Release  [256]byte
   537 	Version  [256]byte
   681 	Version  [256]byte
   538 	Machine  [256]byte
   682 	Machine  [256]byte
   539 }
   683 }
       
   684 
       
   685 const SizeofClockinfo = 0x14
       
   686 
       
   687 type Clockinfo struct {
       
   688 	Hz     int32
       
   689 	Tick   int32
       
   690 	Spare  int32
       
   691 	Stathz int32
       
   692 	Profhz int32
       
   693 }