blob: f5c55a3cc81439e28e61bd0b4039979ed7d83fca [file] [log] [blame]
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build fuchsia
package fdio
const (
OpFlagOneHandle = uint32(0x100 + iota)
OpFlagTwoHandles
OpFlagThreeHandles
)
// Values for op. Each one will signify a request for a different operation.
const (
_ = uint32(iota)
OpClose
OpClone = uint32(iota) | OpFlagOneHandle
OpOpen = uint32(iota) | OpFlagOneHandle
OpMisc = uint32(iota)
OpRead
OpWrite
OpSeek
OpStat
OpReaddir
OpIoctl
OpUnlink
OpReadAt
OpWriteAt
OpTruncate
OpRename = uint32(iota) | OpFlagOneHandle
OpConnect = uint32(iota)
OpBind
OpListen
OpGetSockname
OpGetPeerName
OpGetSockOpt
OpSetSockOpt
OpGetAddrInfo
OpSetAttr
OpSync
OpLink = uint32(iota) | OpFlagOneHandle
OpMmap = uint32(iota)
OpFcntl
OpAccept
OpNumOps = uint32(iota) // The total number of operations
)
// Control ordinal operations. Sent from server to client without
// necessarily having an accompanying request message.
const (
OpOnOpen = uint32(0x80000007)
)
const (
OpenFlagDescribe = 0x00800000
)
const (
OpOpenFlagReadable = 1
OpOpenFlagWritable = 2
OpOpenFlagRDWR = OpOpenFlagReadable | OpOpenFlagWritable
)
// Ops which correspond to a previously listed operation, but have a different number of handles
const (
OpIoctlOneHandle = OpIoctl | OpFlagOneHandle
)
const (
OpFcntlCmdGetFL = uint32(iota + 3)
OpFcntlCmdSetFL
)