mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #10911 from gyuho/balancer
clientv3: fix secure endpoint failover, refactor with gRPC 1.22 upgrade
This commit is contained in:
commit
89d400211d
3
.words
3
.words
@ -8,7 +8,8 @@ MiB
|
||||
ResourceExhausted
|
||||
RPC
|
||||
RPCs
|
||||
|
||||
parsedTarget
|
||||
SRV
|
||||
WithRequireLeader
|
||||
InfoLevel
|
||||
args
|
||||
|
@ -12,24 +12,45 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package balancer implements client balancer.
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.etcd.io/etcd/clientv3/balancer/connectivity"
|
||||
"go.etcd.io/etcd/clientv3/balancer/picker"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
grpcconnectivity "google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/resolver"
|
||||
_ "google.golang.org/grpc/resolver/dns" // register DNS resolver
|
||||
_ "google.golang.org/grpc/resolver/passthrough" // register passthrough resolver
|
||||
)
|
||||
|
||||
// Config defines balancer configurations.
|
||||
type Config struct {
|
||||
// Policy configures balancer policy.
|
||||
Policy picker.Policy
|
||||
|
||||
// Picker implements gRPC picker.
|
||||
// Leave empty if "Policy" field is not custom.
|
||||
// TODO: currently custom policy is not supported.
|
||||
// Picker picker.Picker
|
||||
|
||||
// Name defines an additional name for balancer.
|
||||
// Useful for balancer testing to avoid register conflicts.
|
||||
// If empty, defaults to policy name.
|
||||
Name string
|
||||
|
||||
// Logger configures balancer logging.
|
||||
// If nil, logs are discarded.
|
||||
Logger *zap.Logger
|
||||
}
|
||||
|
||||
// RegisterBuilder creates and registers a builder. Since this function calls balancer.Register, it
|
||||
// must be invoked at initialization time.
|
||||
func RegisterBuilder(cfg Config) {
|
||||
@ -59,16 +80,13 @@ func (b *builder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balan
|
||||
|
||||
addrToSc: make(map[resolver.Address]balancer.SubConn),
|
||||
scToAddr: make(map[balancer.SubConn]resolver.Address),
|
||||
scToSt: make(map[balancer.SubConn]connectivity.State),
|
||||
scToSt: make(map[balancer.SubConn]grpcconnectivity.State),
|
||||
|
||||
currentConn: nil,
|
||||
csEvltr: &connectivityStateEvaluator{},
|
||||
currentConn: nil,
|
||||
connectivityRecorder: connectivity.New(b.cfg.Logger),
|
||||
|
||||
// initialize picker always returns "ErrNoSubConnAvailable"
|
||||
Picker: picker.NewErr(balancer.ErrNoSubConnAvailable),
|
||||
}
|
||||
if bb.lg == nil {
|
||||
bb.lg = zap.NewNop()
|
||||
picker: picker.NewErr(balancer.ErrNoSubConnAvailable),
|
||||
}
|
||||
|
||||
// TODO: support multiple connections
|
||||
@ -112,13 +130,12 @@ type baseBalancer struct {
|
||||
|
||||
addrToSc map[resolver.Address]balancer.SubConn
|
||||
scToAddr map[balancer.SubConn]resolver.Address
|
||||
scToSt map[balancer.SubConn]connectivity.State
|
||||
scToSt map[balancer.SubConn]grpcconnectivity.State
|
||||
|
||||
currentConn balancer.ClientConn
|
||||
currentState connectivity.State
|
||||
csEvltr *connectivityStateEvaluator
|
||||
currentConn balancer.ClientConn
|
||||
connectivityRecorder connectivity.Recorder
|
||||
|
||||
picker.Picker
|
||||
picker picker.Picker
|
||||
}
|
||||
|
||||
// HandleResolvedAddrs implements "grpc/balancer.Balancer" interface.
|
||||
@ -128,7 +145,11 @@ func (bb *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error)
|
||||
bb.lg.Warn("HandleResolvedAddrs called with error", zap.String("balancer-id", bb.id), zap.Error(err))
|
||||
return
|
||||
}
|
||||
bb.lg.Info("resolved", zap.String("balancer-id", bb.id), zap.Strings("addresses", addrsToStrings(addrs)))
|
||||
bb.lg.Info("resolved",
|
||||
zap.String("picker", bb.picker.String()),
|
||||
zap.String("balancer-id", bb.id),
|
||||
zap.Strings("addresses", addrsToStrings(addrs)),
|
||||
)
|
||||
|
||||
bb.mu.Lock()
|
||||
defer bb.mu.Unlock()
|
||||
@ -139,12 +160,13 @@ func (bb *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error)
|
||||
if _, ok := bb.addrToSc[addr]; !ok {
|
||||
sc, err := bb.currentConn.NewSubConn([]resolver.Address{addr}, balancer.NewSubConnOptions{})
|
||||
if err != nil {
|
||||
bb.lg.Warn("NewSubConn failed", zap.String("balancer-id", bb.id), zap.Error(err), zap.String("address", addr.Addr))
|
||||
bb.lg.Warn("NewSubConn failed", zap.String("picker", bb.picker.String()), zap.String("balancer-id", bb.id), zap.Error(err), zap.String("address", addr.Addr))
|
||||
continue
|
||||
}
|
||||
bb.lg.Info("created subconn", zap.String("address", addr.Addr))
|
||||
bb.addrToSc[addr] = sc
|
||||
bb.scToAddr[sc] = addr
|
||||
bb.scToSt[sc] = connectivity.Idle
|
||||
bb.scToSt[sc] = grpcconnectivity.Idle
|
||||
sc.Connect()
|
||||
}
|
||||
}
|
||||
@ -157,6 +179,7 @@ func (bb *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error)
|
||||
|
||||
bb.lg.Info(
|
||||
"removed subconn",
|
||||
zap.String("picker", bb.picker.String()),
|
||||
zap.String("balancer-id", bb.id),
|
||||
zap.String("address", addr.Addr),
|
||||
zap.String("subconn", scToString(sc)),
|
||||
@ -171,7 +194,7 @@ func (bb *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error)
|
||||
}
|
||||
|
||||
// HandleSubConnStateChange implements "grpc/balancer.Balancer" interface.
|
||||
func (bb *baseBalancer) HandleSubConnStateChange(sc balancer.SubConn, s connectivity.State) {
|
||||
func (bb *baseBalancer) HandleSubConnStateChange(sc balancer.SubConn, s grpcconnectivity.State) {
|
||||
bb.mu.Lock()
|
||||
defer bb.mu.Unlock()
|
||||
|
||||
@ -179,8 +202,10 @@ func (bb *baseBalancer) HandleSubConnStateChange(sc balancer.SubConn, s connecti
|
||||
if !ok {
|
||||
bb.lg.Warn(
|
||||
"state change for an unknown subconn",
|
||||
zap.String("picker", bb.picker.String()),
|
||||
zap.String("balancer-id", bb.id),
|
||||
zap.String("subconn", scToString(sc)),
|
||||
zap.Int("subconn-size", len(bb.scToAddr)),
|
||||
zap.String("state", s.String()),
|
||||
)
|
||||
return
|
||||
@ -188,9 +213,11 @@ func (bb *baseBalancer) HandleSubConnStateChange(sc balancer.SubConn, s connecti
|
||||
|
||||
bb.lg.Info(
|
||||
"state changed",
|
||||
zap.String("picker", bb.picker.String()),
|
||||
zap.String("balancer-id", bb.id),
|
||||
zap.Bool("connected", s == connectivity.Ready),
|
||||
zap.Bool("connected", s == grpcconnectivity.Ready),
|
||||
zap.String("subconn", scToString(sc)),
|
||||
zap.Int("subconn-size", len(bb.scToAddr)),
|
||||
zap.String("address", bb.scToAddr[sc].Addr),
|
||||
zap.String("old-state", old.String()),
|
||||
zap.String("new-state", s.String()),
|
||||
@ -198,68 +225,63 @@ func (bb *baseBalancer) HandleSubConnStateChange(sc balancer.SubConn, s connecti
|
||||
|
||||
bb.scToSt[sc] = s
|
||||
switch s {
|
||||
case connectivity.Idle:
|
||||
case grpcconnectivity.Idle:
|
||||
sc.Connect()
|
||||
case connectivity.Shutdown:
|
||||
case grpcconnectivity.Shutdown:
|
||||
// When an address was removed by resolver, b called RemoveSubConn but
|
||||
// kept the sc's state in scToSt. Remove state for this sc here.
|
||||
delete(bb.scToAddr, sc)
|
||||
delete(bb.scToSt, sc)
|
||||
}
|
||||
|
||||
oldAggrState := bb.currentState
|
||||
bb.currentState = bb.csEvltr.recordTransition(old, s)
|
||||
oldAggrState := bb.connectivityRecorder.GetCurrentState()
|
||||
bb.connectivityRecorder.RecordTransition(old, s)
|
||||
|
||||
// Regenerate picker when one of the following happens:
|
||||
// Update balancer picker when one of the following happens:
|
||||
// - this sc became ready from not-ready
|
||||
// - this sc became not-ready from ready
|
||||
// - the aggregated state of balancer became TransientFailure from non-TransientFailure
|
||||
// - the aggregated state of balancer became non-TransientFailure from TransientFailure
|
||||
if (s == connectivity.Ready) != (old == connectivity.Ready) ||
|
||||
(bb.currentState == connectivity.TransientFailure) != (oldAggrState == connectivity.TransientFailure) {
|
||||
bb.regeneratePicker()
|
||||
if (s == grpcconnectivity.Ready) != (old == grpcconnectivity.Ready) ||
|
||||
(bb.connectivityRecorder.GetCurrentState() == grpcconnectivity.TransientFailure) != (oldAggrState == grpcconnectivity.TransientFailure) {
|
||||
bb.updatePicker()
|
||||
}
|
||||
|
||||
bb.currentConn.UpdateBalancerState(bb.currentState, bb.Picker)
|
||||
bb.currentConn.UpdateBalancerState(bb.connectivityRecorder.GetCurrentState(), bb.picker)
|
||||
}
|
||||
|
||||
func (bb *baseBalancer) regeneratePicker() {
|
||||
if bb.currentState == connectivity.TransientFailure {
|
||||
func (bb *baseBalancer) updatePicker() {
|
||||
if bb.connectivityRecorder.GetCurrentState() == grpcconnectivity.TransientFailure {
|
||||
bb.picker = picker.NewErr(balancer.ErrTransientFailure)
|
||||
bb.lg.Info(
|
||||
"generated transient error picker",
|
||||
"updated picker to transient error picker",
|
||||
zap.String("picker", bb.picker.String()),
|
||||
zap.String("balancer-id", bb.id),
|
||||
zap.String("policy", bb.policy.String()),
|
||||
)
|
||||
bb.Picker = picker.NewErr(balancer.ErrTransientFailure)
|
||||
return
|
||||
}
|
||||
|
||||
// only pass ready subconns to picker
|
||||
scs := make([]balancer.SubConn, 0)
|
||||
addrToSc := make(map[resolver.Address]balancer.SubConn)
|
||||
scToAddr := make(map[balancer.SubConn]resolver.Address)
|
||||
for addr, sc := range bb.addrToSc {
|
||||
if st, ok := bb.scToSt[sc]; ok && st == connectivity.Ready {
|
||||
scs = append(scs, sc)
|
||||
addrToSc[addr] = sc
|
||||
if st, ok := bb.scToSt[sc]; ok && st == grpcconnectivity.Ready {
|
||||
scToAddr[sc] = addr
|
||||
}
|
||||
}
|
||||
|
||||
switch bb.policy {
|
||||
case picker.RoundrobinBalanced:
|
||||
bb.Picker = picker.NewRoundrobinBalanced(bb.lg, scs, addrToSc, scToAddr)
|
||||
|
||||
default:
|
||||
panic(fmt.Errorf("invalid balancer picker policy (%d)", bb.policy))
|
||||
}
|
||||
|
||||
bb.picker = picker.New(picker.Config{
|
||||
Policy: bb.policy,
|
||||
Logger: bb.lg,
|
||||
SubConnToResolverAddress: scToAddr,
|
||||
})
|
||||
bb.lg.Info(
|
||||
"generated picker",
|
||||
"updated picker",
|
||||
zap.String("picker", bb.picker.String()),
|
||||
zap.String("balancer-id", bb.id),
|
||||
zap.String("policy", bb.policy.String()),
|
||||
zap.Strings("subconn-ready", scsToStrings(addrToSc)),
|
||||
zap.Int("subconn-size", len(addrToSc)),
|
||||
zap.Strings("subconn-ready", scsToStrings(scToAddr)),
|
||||
zap.Int("subconn-size", len(scToAddr)),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
// Copyright 2018 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"go.etcd.io/etcd/clientv3/balancer/picker"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// Config defines balancer configurations.
|
||||
type Config struct {
|
||||
// Policy configures balancer policy.
|
||||
Policy picker.Policy
|
||||
|
||||
// Name defines an additional name for balancer.
|
||||
// Useful for balancer testing to avoid register conflicts.
|
||||
// If empty, defaults to policy name.
|
||||
Name string
|
||||
|
||||
// Logger configures balancer logging.
|
||||
// If nil, logs are discarded.
|
||||
Logger *zap.Logger
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
// Copyright 2018 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package balancer
|
||||
|
||||
import "google.golang.org/grpc/connectivity"
|
||||
|
||||
// connectivityStateEvaluator gets updated by addrConns when their
|
||||
// states transition, based on which it evaluates the state of
|
||||
// ClientConn.
|
||||
type connectivityStateEvaluator struct {
|
||||
numReady uint64 // Number of addrConns in ready state.
|
||||
numConnecting uint64 // Number of addrConns in connecting state.
|
||||
numTransientFailure uint64 // Number of addrConns in transientFailure.
|
||||
}
|
||||
|
||||
// recordTransition records state change happening in every subConn and based on
|
||||
// that it evaluates what aggregated state should be.
|
||||
// It can only transition between Ready, Connecting and TransientFailure. Other states,
|
||||
// Idle and Shutdown are transitioned into by ClientConn; in the beginning of the connection
|
||||
// before any subConn is created ClientConn is in idle state. In the end when ClientConn
|
||||
// closes it is in Shutdown state.
|
||||
//
|
||||
// recordTransition should only be called synchronously from the same goroutine.
|
||||
func (cse *connectivityStateEvaluator) recordTransition(oldState, newState connectivity.State) connectivity.State {
|
||||
// Update counters.
|
||||
for idx, state := range []connectivity.State{oldState, newState} {
|
||||
updateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new.
|
||||
switch state {
|
||||
case connectivity.Ready:
|
||||
cse.numReady += updateVal
|
||||
case connectivity.Connecting:
|
||||
cse.numConnecting += updateVal
|
||||
case connectivity.TransientFailure:
|
||||
cse.numTransientFailure += updateVal
|
||||
}
|
||||
}
|
||||
|
||||
// Evaluate.
|
||||
if cse.numReady > 0 {
|
||||
return connectivity.Ready
|
||||
}
|
||||
if cse.numConnecting > 0 {
|
||||
return connectivity.Connecting
|
||||
}
|
||||
return connectivity.TransientFailure
|
||||
}
|
93
clientv3/balancer/connectivity/connectivity.go
Normal file
93
clientv3/balancer/connectivity/connectivity.go
Normal file
@ -0,0 +1,93 @@
|
||||
// Copyright 2019 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package connectivity implements client connectivity operations.
|
||||
package connectivity
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
)
|
||||
|
||||
// Recorder records gRPC connectivity.
|
||||
type Recorder interface {
|
||||
GetCurrentState() connectivity.State
|
||||
RecordTransition(oldState, newState connectivity.State)
|
||||
}
|
||||
|
||||
// New returns a new Recorder.
|
||||
func New(lg *zap.Logger) Recorder {
|
||||
return &recorder{lg: lg}
|
||||
}
|
||||
|
||||
// recorder takes the connectivity states of multiple SubConns
|
||||
// and returns one aggregated connectivity state.
|
||||
// ref. https://github.com/grpc/grpc-go/blob/master/balancer/balancer.go
|
||||
type recorder struct {
|
||||
lg *zap.Logger
|
||||
|
||||
mu sync.RWMutex
|
||||
|
||||
cur connectivity.State
|
||||
|
||||
numReady uint64 // Number of addrConns in ready state.
|
||||
numConnecting uint64 // Number of addrConns in connecting state.
|
||||
numTransientFailure uint64 // Number of addrConns in transientFailure.
|
||||
}
|
||||
|
||||
func (rc *recorder) GetCurrentState() (state connectivity.State) {
|
||||
rc.mu.RLock()
|
||||
defer rc.mu.RUnlock()
|
||||
return rc.cur
|
||||
}
|
||||
|
||||
// RecordTransition records state change happening in subConn and based on that
|
||||
// it evaluates what aggregated state should be.
|
||||
//
|
||||
// - If at least one SubConn in Ready, the aggregated state is Ready;
|
||||
// - Else if at least one SubConn in Connecting, the aggregated state is Connecting;
|
||||
// - Else the aggregated state is TransientFailure.
|
||||
//
|
||||
// Idle and Shutdown are not considered.
|
||||
//
|
||||
// ref. https://github.com/grpc/grpc-go/blob/master/balancer/balancer.go
|
||||
func (rc *recorder) RecordTransition(oldState, newState connectivity.State) {
|
||||
rc.mu.Lock()
|
||||
defer rc.mu.Unlock()
|
||||
|
||||
for idx, state := range []connectivity.State{oldState, newState} {
|
||||
updateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new.
|
||||
switch state {
|
||||
case connectivity.Ready:
|
||||
rc.numReady += updateVal
|
||||
case connectivity.Connecting:
|
||||
rc.numConnecting += updateVal
|
||||
case connectivity.TransientFailure:
|
||||
rc.numTransientFailure += updateVal
|
||||
default:
|
||||
rc.lg.Warn("connectivity recorder received unknown state", zap.String("connectivity-state", state.String()))
|
||||
}
|
||||
}
|
||||
|
||||
switch { // must be exclusive, no overlap
|
||||
case rc.numReady > 0:
|
||||
rc.cur = connectivity.Ready
|
||||
case rc.numConnecting > 0:
|
||||
rc.cur = connectivity.Connecting
|
||||
default:
|
||||
rc.cur = connectivity.TransientFailure
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
// Copyright 2018 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package balancer implements client balancer.
|
||||
package balancer
|
@ -1,657 +0,0 @@
|
||||
// Copyright 2018 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
healthpb "google.golang.org/grpc/health/grpc_health_v1"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// TODO: replace with something better
|
||||
var lg = grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard)
|
||||
|
||||
const (
|
||||
minHealthRetryDuration = 3 * time.Second
|
||||
unknownService = "unknown service grpc.health.v1.Health"
|
||||
)
|
||||
|
||||
// ErrNoAddrAvailable is returned by Get() when the balancer does not have
|
||||
// any active connection to endpoints at the time.
|
||||
// This error is returned only when opts.BlockingWait is true.
|
||||
var ErrNoAddrAvailable = status.Error(codes.Unavailable, "there is no address available")
|
||||
|
||||
type NotifyMsg int
|
||||
|
||||
const (
|
||||
NotifyReset NotifyMsg = iota
|
||||
NotifyNext
|
||||
)
|
||||
|
||||
// GRPC17Health does the bare minimum to expose multiple eps
|
||||
// to the grpc reconnection code path
|
||||
type GRPC17Health struct {
|
||||
// addrs are the client's endpoint addresses for grpc
|
||||
addrs []grpc.Address
|
||||
|
||||
// eps holds the raw endpoints from the client
|
||||
eps []string
|
||||
|
||||
// notifyCh notifies grpc of the set of addresses for connecting
|
||||
notifyCh chan []grpc.Address
|
||||
|
||||
// readyc closes once the first connection is up
|
||||
readyc chan struct{}
|
||||
readyOnce sync.Once
|
||||
|
||||
// healthCheck checks an endpoint's health.
|
||||
healthCheck func(ep string) (bool, error)
|
||||
healthCheckTimeout time.Duration
|
||||
|
||||
unhealthyMu sync.RWMutex
|
||||
unhealthyHostPorts map[string]time.Time
|
||||
|
||||
// mu protects all fields below.
|
||||
mu sync.RWMutex
|
||||
|
||||
// upc closes when pinAddr transitions from empty to non-empty or the balancer closes.
|
||||
upc chan struct{}
|
||||
|
||||
// downc closes when grpc calls down() on pinAddr
|
||||
downc chan struct{}
|
||||
|
||||
// stopc is closed to signal updateNotifyLoop should stop.
|
||||
stopc chan struct{}
|
||||
stopOnce sync.Once
|
||||
wg sync.WaitGroup
|
||||
|
||||
// donec closes when all goroutines are exited
|
||||
donec chan struct{}
|
||||
|
||||
// updateAddrsC notifies updateNotifyLoop to update addrs.
|
||||
updateAddrsC chan NotifyMsg
|
||||
|
||||
// grpc issues TLS cert checks using the string passed into dial so
|
||||
// that string must be the host. To recover the full scheme://host URL,
|
||||
// have a map from hosts to the original endpoint.
|
||||
hostPort2ep map[string]string
|
||||
|
||||
// pinAddr is the currently pinned address; set to the empty string on
|
||||
// initialization and shutdown.
|
||||
pinAddr string
|
||||
|
||||
closed bool
|
||||
}
|
||||
|
||||
// DialFunc defines gRPC dial function.
|
||||
type DialFunc func(ep string, dopts ...grpc.DialOption) (*grpc.ClientConn, error)
|
||||
|
||||
// NewGRPC17Health returns a new health balancer with gRPC v1.7.
|
||||
func NewGRPC17Health(
|
||||
eps []string,
|
||||
timeout time.Duration,
|
||||
dialFunc DialFunc,
|
||||
) *GRPC17Health {
|
||||
notifyCh := make(chan []grpc.Address)
|
||||
addrs := eps2addrs(eps)
|
||||
hb := &GRPC17Health{
|
||||
addrs: addrs,
|
||||
eps: eps,
|
||||
notifyCh: notifyCh,
|
||||
readyc: make(chan struct{}),
|
||||
healthCheck: func(ep string) (bool, error) { return grpcHealthCheck(ep, dialFunc) },
|
||||
unhealthyHostPorts: make(map[string]time.Time),
|
||||
upc: make(chan struct{}),
|
||||
stopc: make(chan struct{}),
|
||||
downc: make(chan struct{}),
|
||||
donec: make(chan struct{}),
|
||||
updateAddrsC: make(chan NotifyMsg),
|
||||
hostPort2ep: getHostPort2ep(eps),
|
||||
}
|
||||
if timeout < minHealthRetryDuration {
|
||||
timeout = minHealthRetryDuration
|
||||
}
|
||||
hb.healthCheckTimeout = timeout
|
||||
|
||||
close(hb.downc)
|
||||
go hb.updateNotifyLoop()
|
||||
hb.wg.Add(1)
|
||||
go func() {
|
||||
defer hb.wg.Done()
|
||||
hb.updateUnhealthy()
|
||||
}()
|
||||
return hb
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) Start(target string, config grpc.BalancerConfig) error { return nil }
|
||||
|
||||
func (b *GRPC17Health) ConnectNotify() <-chan struct{} {
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
return b.upc
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) UpdateAddrsC() chan NotifyMsg { return b.updateAddrsC }
|
||||
func (b *GRPC17Health) StopC() chan struct{} { return b.stopc }
|
||||
|
||||
func (b *GRPC17Health) Ready() <-chan struct{} { return b.readyc }
|
||||
|
||||
func (b *GRPC17Health) Endpoint(hostPort string) string {
|
||||
b.mu.RLock()
|
||||
defer b.mu.RUnlock()
|
||||
return b.hostPort2ep[hostPort]
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) Pinned() string {
|
||||
b.mu.RLock()
|
||||
defer b.mu.RUnlock()
|
||||
return b.pinAddr
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) HostPortError(hostPort string, err error) {
|
||||
if b.Endpoint(hostPort) == "" {
|
||||
lg.Infof("clientv3/balancer: %q is stale (skip marking as unhealthy on %q)", hostPort, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
b.unhealthyMu.Lock()
|
||||
b.unhealthyHostPorts[hostPort] = time.Now()
|
||||
b.unhealthyMu.Unlock()
|
||||
lg.Infof("clientv3/balancer: %q is marked unhealthy (%q)", hostPort, err.Error())
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) removeUnhealthy(hostPort, msg string) {
|
||||
if b.Endpoint(hostPort) == "" {
|
||||
lg.Infof("clientv3/balancer: %q was not in unhealthy (%q)", hostPort, msg)
|
||||
return
|
||||
}
|
||||
|
||||
b.unhealthyMu.Lock()
|
||||
delete(b.unhealthyHostPorts, hostPort)
|
||||
b.unhealthyMu.Unlock()
|
||||
lg.Infof("clientv3/balancer: %q is removed from unhealthy (%q)", hostPort, msg)
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) countUnhealthy() (count int) {
|
||||
b.unhealthyMu.RLock()
|
||||
count = len(b.unhealthyHostPorts)
|
||||
b.unhealthyMu.RUnlock()
|
||||
return count
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) isUnhealthy(hostPort string) (unhealthy bool) {
|
||||
b.unhealthyMu.RLock()
|
||||
_, unhealthy = b.unhealthyHostPorts[hostPort]
|
||||
b.unhealthyMu.RUnlock()
|
||||
return unhealthy
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) cleanupUnhealthy() {
|
||||
b.unhealthyMu.Lock()
|
||||
for k, v := range b.unhealthyHostPorts {
|
||||
if time.Since(v) > b.healthCheckTimeout {
|
||||
delete(b.unhealthyHostPorts, k)
|
||||
lg.Infof("clientv3/balancer: removed %q from unhealthy after %v", k, b.healthCheckTimeout)
|
||||
}
|
||||
}
|
||||
b.unhealthyMu.Unlock()
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) liveAddrs() ([]grpc.Address, map[string]struct{}) {
|
||||
unhealthyCnt := b.countUnhealthy()
|
||||
|
||||
b.mu.RLock()
|
||||
defer b.mu.RUnlock()
|
||||
|
||||
hbAddrs := b.addrs
|
||||
if len(b.addrs) == 1 || unhealthyCnt == 0 || unhealthyCnt == len(b.addrs) {
|
||||
liveHostPorts := make(map[string]struct{}, len(b.hostPort2ep))
|
||||
for k := range b.hostPort2ep {
|
||||
liveHostPorts[k] = struct{}{}
|
||||
}
|
||||
return hbAddrs, liveHostPorts
|
||||
}
|
||||
|
||||
addrs := make([]grpc.Address, 0, len(b.addrs)-unhealthyCnt)
|
||||
liveHostPorts := make(map[string]struct{}, len(addrs))
|
||||
for _, addr := range b.addrs {
|
||||
if !b.isUnhealthy(addr.Addr) {
|
||||
addrs = append(addrs, addr)
|
||||
liveHostPorts[addr.Addr] = struct{}{}
|
||||
}
|
||||
}
|
||||
return addrs, liveHostPorts
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) updateUnhealthy() {
|
||||
for {
|
||||
select {
|
||||
case <-time.After(b.healthCheckTimeout):
|
||||
b.cleanupUnhealthy()
|
||||
pinned := b.Pinned()
|
||||
if pinned == "" || b.isUnhealthy(pinned) {
|
||||
select {
|
||||
case b.updateAddrsC <- NotifyNext:
|
||||
case <-b.stopc:
|
||||
return
|
||||
}
|
||||
}
|
||||
case <-b.stopc:
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NeedUpdate returns true if all connections are down or
|
||||
// addresses do not include current pinned address.
|
||||
func (b *GRPC17Health) NeedUpdate() bool {
|
||||
// updating notifyCh can trigger new connections,
|
||||
// need update addrs if all connections are down
|
||||
// or addrs does not include pinAddr.
|
||||
b.mu.RLock()
|
||||
update := !hasAddr(b.addrs, b.pinAddr)
|
||||
b.mu.RUnlock()
|
||||
return update
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) UpdateAddrs(eps ...string) {
|
||||
np := getHostPort2ep(eps)
|
||||
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
|
||||
match := len(np) == len(b.hostPort2ep)
|
||||
if match {
|
||||
for k, v := range np {
|
||||
if b.hostPort2ep[k] != v {
|
||||
match = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if match {
|
||||
// same endpoints, so no need to update address
|
||||
return
|
||||
}
|
||||
|
||||
b.hostPort2ep = np
|
||||
b.addrs, b.eps = eps2addrs(eps), eps
|
||||
|
||||
b.unhealthyMu.Lock()
|
||||
b.unhealthyHostPorts = make(map[string]time.Time)
|
||||
b.unhealthyMu.Unlock()
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) Next() {
|
||||
b.mu.RLock()
|
||||
downc := b.downc
|
||||
b.mu.RUnlock()
|
||||
select {
|
||||
case b.updateAddrsC <- NotifyNext:
|
||||
case <-b.stopc:
|
||||
}
|
||||
// wait until disconnect so new RPCs are not issued on old connection
|
||||
select {
|
||||
case <-downc:
|
||||
case <-b.stopc:
|
||||
}
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) updateNotifyLoop() {
|
||||
defer close(b.donec)
|
||||
|
||||
for {
|
||||
b.mu.RLock()
|
||||
upc, downc, addr := b.upc, b.downc, b.pinAddr
|
||||
b.mu.RUnlock()
|
||||
// downc or upc should be closed
|
||||
select {
|
||||
case <-downc:
|
||||
downc = nil
|
||||
default:
|
||||
}
|
||||
select {
|
||||
case <-upc:
|
||||
upc = nil
|
||||
default:
|
||||
}
|
||||
switch {
|
||||
case downc == nil && upc == nil:
|
||||
// stale
|
||||
select {
|
||||
case <-b.stopc:
|
||||
return
|
||||
default:
|
||||
}
|
||||
case downc == nil:
|
||||
b.notifyAddrs(NotifyReset)
|
||||
select {
|
||||
case <-upc:
|
||||
case msg := <-b.updateAddrsC:
|
||||
b.notifyAddrs(msg)
|
||||
case <-b.stopc:
|
||||
return
|
||||
}
|
||||
case upc == nil:
|
||||
select {
|
||||
// close connections that are not the pinned address
|
||||
case b.notifyCh <- []grpc.Address{{Addr: addr}}:
|
||||
case <-downc:
|
||||
case <-b.stopc:
|
||||
return
|
||||
}
|
||||
select {
|
||||
case <-downc:
|
||||
b.notifyAddrs(NotifyReset)
|
||||
case msg := <-b.updateAddrsC:
|
||||
b.notifyAddrs(msg)
|
||||
case <-b.stopc:
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) notifyAddrs(msg NotifyMsg) {
|
||||
if msg == NotifyNext {
|
||||
select {
|
||||
case b.notifyCh <- []grpc.Address{}:
|
||||
case <-b.stopc:
|
||||
return
|
||||
}
|
||||
}
|
||||
b.mu.RLock()
|
||||
pinAddr := b.pinAddr
|
||||
downc := b.downc
|
||||
b.mu.RUnlock()
|
||||
addrs, hostPorts := b.liveAddrs()
|
||||
|
||||
var waitDown bool
|
||||
if pinAddr != "" {
|
||||
_, ok := hostPorts[pinAddr]
|
||||
waitDown = !ok
|
||||
}
|
||||
|
||||
select {
|
||||
case b.notifyCh <- addrs:
|
||||
if waitDown {
|
||||
select {
|
||||
case <-downc:
|
||||
case <-b.stopc:
|
||||
}
|
||||
}
|
||||
case <-b.stopc:
|
||||
}
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) Up(addr grpc.Address) func(error) {
|
||||
if !b.mayPin(addr) {
|
||||
return func(err error) {}
|
||||
}
|
||||
|
||||
b.mu.Lock()
|
||||
defer b.mu.Unlock()
|
||||
|
||||
// gRPC might call Up after it called Close. We add this check
|
||||
// to "fix" it up at application layer. Otherwise, will panic
|
||||
// if b.upc is already closed.
|
||||
if b.closed {
|
||||
return func(err error) {}
|
||||
}
|
||||
|
||||
// gRPC might call Up on a stale address.
|
||||
// Prevent updating pinAddr with a stale address.
|
||||
if !hasAddr(b.addrs, addr.Addr) {
|
||||
return func(err error) {}
|
||||
}
|
||||
|
||||
if b.pinAddr != "" {
|
||||
lg.Infof("clientv3/balancer: %q is up but not pinned (already pinned %q)", addr.Addr, b.pinAddr)
|
||||
return func(err error) {}
|
||||
}
|
||||
|
||||
// notify waiting Get()s and pin first connected address
|
||||
close(b.upc)
|
||||
b.downc = make(chan struct{})
|
||||
b.pinAddr = addr.Addr
|
||||
lg.Infof("clientv3/balancer: pin %q", addr.Addr)
|
||||
|
||||
// notify client that a connection is up
|
||||
b.readyOnce.Do(func() { close(b.readyc) })
|
||||
|
||||
return func(err error) {
|
||||
// If connected to a black hole endpoint or a killed server, the gRPC ping
|
||||
// timeout will induce a network I/O error, and retrying until success;
|
||||
// finding healthy endpoint on retry could take several timeouts and redials.
|
||||
// To avoid wasting retries, gray-list unhealthy endpoints.
|
||||
b.HostPortError(addr.Addr, err)
|
||||
|
||||
b.mu.Lock()
|
||||
b.upc = make(chan struct{})
|
||||
close(b.downc)
|
||||
b.pinAddr = ""
|
||||
b.mu.Unlock()
|
||||
lg.Infof("clientv3/balancer: unpin %q (%q)", addr.Addr, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) mayPin(addr grpc.Address) bool {
|
||||
if b.Endpoint(addr.Addr) == "" { // stale host:port
|
||||
return false
|
||||
}
|
||||
|
||||
b.unhealthyMu.RLock()
|
||||
unhealthyCnt := len(b.unhealthyHostPorts)
|
||||
failedTime, bad := b.unhealthyHostPorts[addr.Addr]
|
||||
b.unhealthyMu.RUnlock()
|
||||
|
||||
b.mu.RLock()
|
||||
skip := len(b.addrs) == 1 || unhealthyCnt == 0 || len(b.addrs) == unhealthyCnt
|
||||
b.mu.RUnlock()
|
||||
if skip || !bad {
|
||||
return true
|
||||
}
|
||||
|
||||
// prevent isolated member's endpoint from being infinitely retried, as follows:
|
||||
// 1. keepalive pings detects GoAway with http2.ErrCodeEnhanceYourCalm
|
||||
// 2. balancer 'Up' unpins with grpc: failed with network I/O error
|
||||
// 3. grpc-healthcheck still SERVING, thus retry to pin
|
||||
// instead, return before grpc-healthcheck if failed within healthcheck timeout
|
||||
if elapsed := time.Since(failedTime); elapsed < b.healthCheckTimeout {
|
||||
lg.Infof("clientv3/balancer: %q is up but not pinned (failed %v ago, require minimum %v after failure)", addr.Addr, elapsed, b.healthCheckTimeout)
|
||||
return false
|
||||
}
|
||||
|
||||
if ok, _ := b.healthCheck(addr.Addr); ok {
|
||||
b.removeUnhealthy(addr.Addr, "health check success")
|
||||
return true
|
||||
}
|
||||
|
||||
b.HostPortError(addr.Addr, errors.New("health check failed"))
|
||||
return false
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) Get(ctx context.Context, opts grpc.BalancerGetOptions) (grpc.Address, func(), error) {
|
||||
var (
|
||||
addr string
|
||||
closed bool
|
||||
)
|
||||
|
||||
// If opts.BlockingWait is false (for fail-fast RPCs), it should return
|
||||
// an address it has notified via Notify immediately instead of blocking.
|
||||
if !opts.BlockingWait {
|
||||
b.mu.RLock()
|
||||
closed = b.closed
|
||||
addr = b.pinAddr
|
||||
b.mu.RUnlock()
|
||||
if closed {
|
||||
return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing
|
||||
}
|
||||
if addr == "" {
|
||||
return grpc.Address{Addr: ""}, nil, ErrNoAddrAvailable
|
||||
}
|
||||
return grpc.Address{Addr: addr}, func() {}, nil
|
||||
}
|
||||
|
||||
for {
|
||||
b.mu.RLock()
|
||||
ch := b.upc
|
||||
b.mu.RUnlock()
|
||||
select {
|
||||
case <-ch:
|
||||
case <-b.donec:
|
||||
return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing
|
||||
case <-ctx.Done():
|
||||
return grpc.Address{Addr: ""}, nil, ctx.Err()
|
||||
}
|
||||
b.mu.RLock()
|
||||
closed = b.closed
|
||||
addr = b.pinAddr
|
||||
b.mu.RUnlock()
|
||||
// Close() which sets b.closed = true can be called before Get(), Get() must exit if balancer is closed.
|
||||
if closed {
|
||||
return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing
|
||||
}
|
||||
if addr != "" {
|
||||
break
|
||||
}
|
||||
}
|
||||
return grpc.Address{Addr: addr}, func() {}, nil
|
||||
}
|
||||
|
||||
func (b *GRPC17Health) Notify() <-chan []grpc.Address { return b.notifyCh }
|
||||
|
||||
func (b *GRPC17Health) Close() error {
|
||||
b.mu.Lock()
|
||||
// In case gRPC calls close twice. TODO: remove the checking
|
||||
// when we are sure that gRPC wont call close twice.
|
||||
if b.closed {
|
||||
b.mu.Unlock()
|
||||
<-b.donec
|
||||
return nil
|
||||
}
|
||||
b.closed = true
|
||||
b.stopOnce.Do(func() { close(b.stopc) })
|
||||
b.pinAddr = ""
|
||||
|
||||
// In the case of following scenario:
|
||||
// 1. upc is not closed; no pinned address
|
||||
// 2. client issues an RPC, calling invoke(), which calls Get(), enters for loop, blocks
|
||||
// 3. client.conn.Close() calls balancer.Close(); closed = true
|
||||
// 4. for loop in Get() never exits since ctx is the context passed in by the client and may not be canceled
|
||||
// we must close upc so Get() exits from blocking on upc
|
||||
select {
|
||||
case <-b.upc:
|
||||
default:
|
||||
// terminate all waiting Get()s
|
||||
close(b.upc)
|
||||
}
|
||||
|
||||
b.mu.Unlock()
|
||||
b.wg.Wait()
|
||||
|
||||
// wait for updateNotifyLoop to finish
|
||||
<-b.donec
|
||||
close(b.notifyCh)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func grpcHealthCheck(ep string, dialFunc func(ep string, dopts ...grpc.DialOption) (*grpc.ClientConn, error)) (bool, error) {
|
||||
conn, err := dialFunc(ep)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
defer conn.Close()
|
||||
cli := healthpb.NewHealthClient(conn)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
|
||||
resp, err := cli.Check(ctx, &healthpb.HealthCheckRequest{})
|
||||
cancel()
|
||||
if err != nil {
|
||||
if s, ok := status.FromError(err); ok && s.Code() == codes.Unavailable {
|
||||
if s.Message() == unknownService { // etcd < v3.3.0
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
return resp.Status == healthpb.HealthCheckResponse_SERVING, nil
|
||||
}
|
||||
|
||||
func hasAddr(addrs []grpc.Address, targetAddr string) bool {
|
||||
for _, addr := range addrs {
|
||||
if targetAddr == addr.Addr {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func getHost(ep string) string {
|
||||
url, uerr := url.Parse(ep)
|
||||
if uerr != nil || !strings.Contains(ep, "://") {
|
||||
return ep
|
||||
}
|
||||
return url.Host
|
||||
}
|
||||
|
||||
func eps2addrs(eps []string) []grpc.Address {
|
||||
addrs := make([]grpc.Address, len(eps))
|
||||
for i := range eps {
|
||||
addrs[i].Addr = getHost(eps[i])
|
||||
}
|
||||
return addrs
|
||||
}
|
||||
|
||||
func getHostPort2ep(eps []string) map[string]string {
|
||||
hm := make(map[string]string, len(eps))
|
||||
for i := range eps {
|
||||
_, host, _ := parseEndpoint(eps[i])
|
||||
hm[host] = eps[i]
|
||||
}
|
||||
return hm
|
||||
}
|
||||
|
||||
func parseEndpoint(endpoint string) (proto string, host string, scheme string) {
|
||||
proto = "tcp"
|
||||
host = endpoint
|
||||
url, uerr := url.Parse(endpoint)
|
||||
if uerr != nil || !strings.Contains(endpoint, "://") {
|
||||
return proto, host, scheme
|
||||
}
|
||||
scheme = url.Scheme
|
||||
|
||||
// strip scheme:// prefix since grpc dials by host
|
||||
host = url.Host
|
||||
switch url.Scheme {
|
||||
case "http", "https":
|
||||
case "unix", "unixs":
|
||||
proto = "unix"
|
||||
host = url.Host + url.Path
|
||||
default:
|
||||
proto, host = "", ""
|
||||
}
|
||||
return proto, host, scheme
|
||||
}
|
@ -1,297 +0,0 @@
|
||||
// Copyright 2018 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package balancer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
|
||||
"go.etcd.io/etcd/pkg/testutil"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var endpoints = []string{"localhost:2379", "localhost:22379", "localhost:32379"}
|
||||
|
||||
func TestOldHealthBalancerGetUnblocking(t *testing.T) {
|
||||
hb := NewGRPC17Health(endpoints, minHealthRetryDuration, func(ep string, dopts ...grpc.DialOption) (*grpc.ClientConn, error) { return nil, nil })
|
||||
defer hb.Close()
|
||||
if addrs := <-hb.Notify(); len(addrs) != len(endpoints) {
|
||||
t.Errorf("Initialize NewGRPC17Health should have triggered Notify() chan, but it didn't")
|
||||
}
|
||||
unblockingOpts := grpc.BalancerGetOptions{BlockingWait: false}
|
||||
|
||||
_, _, err := hb.Get(context.Background(), unblockingOpts)
|
||||
if err != ErrNoAddrAvailable {
|
||||
t.Errorf("Get() with no up endpoints should return ErrNoAddrAvailable, got: %v", err)
|
||||
}
|
||||
|
||||
down1 := hb.Up(grpc.Address{Addr: endpoints[1]})
|
||||
if addrs := <-hb.Notify(); len(addrs) != 1 {
|
||||
t.Errorf("first Up() should have triggered balancer to send the first connected address via Notify chan so that other connections can be closed")
|
||||
}
|
||||
down2 := hb.Up(grpc.Address{Addr: endpoints[2]})
|
||||
addrFirst, putFun, err := hb.Get(context.Background(), unblockingOpts)
|
||||
if err != nil {
|
||||
t.Errorf("Get() with up endpoints should success, got %v", err)
|
||||
}
|
||||
if addrFirst.Addr != endpoints[1] {
|
||||
t.Errorf("Get() didn't return expected address, got %v", addrFirst)
|
||||
}
|
||||
if putFun == nil {
|
||||
t.Errorf("Get() returned unexpected nil put function")
|
||||
}
|
||||
addrSecond, _, _ := hb.Get(context.Background(), unblockingOpts)
|
||||
if addrFirst.Addr != addrSecond.Addr {
|
||||
t.Errorf("Get() didn't return the same address as previous call, got %v and %v", addrFirst, addrSecond)
|
||||
}
|
||||
|
||||
down1(errors.New("error"))
|
||||
if addrs := <-hb.Notify(); len(addrs) != len(endpoints)-1 { // we call down on one endpoint
|
||||
t.Errorf("closing the only connection should triggered balancer to send the %d endpoints via Notify chan so that we can establish a connection", len(endpoints)-1)
|
||||
}
|
||||
down2(errors.New("error"))
|
||||
_, _, err = hb.Get(context.Background(), unblockingOpts)
|
||||
if err != ErrNoAddrAvailable {
|
||||
t.Errorf("Get() with no up endpoints should return ErrNoAddrAvailable, got: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOldHealthBalancerGetBlocking(t *testing.T) {
|
||||
hb := NewGRPC17Health(endpoints, minHealthRetryDuration, func(ep string, dopts ...grpc.DialOption) (*grpc.ClientConn, error) { return nil, nil })
|
||||
defer hb.Close()
|
||||
if addrs := <-hb.Notify(); len(addrs) != len(endpoints) {
|
||||
t.Errorf("Initialize NewGRPC17Health should have triggered Notify() chan, but it didn't")
|
||||
}
|
||||
blockingOpts := grpc.BalancerGetOptions{BlockingWait: true}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*100)
|
||||
_, _, err := hb.Get(ctx, blockingOpts)
|
||||
cancel()
|
||||
if err != context.DeadlineExceeded {
|
||||
t.Errorf("Get() with no up endpoints should timeout, got %v", err)
|
||||
}
|
||||
|
||||
downC := make(chan func(error), 1)
|
||||
|
||||
go func() {
|
||||
// ensure hb.Up() will be called after hb.Get() to see if Up() releases blocking Get()
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
f := hb.Up(grpc.Address{Addr: endpoints[1]})
|
||||
if addrs := <-hb.Notify(); len(addrs) != 1 {
|
||||
t.Errorf("first Up() should have triggered balancer to send the first connected address via Notify chan so that other connections can be closed")
|
||||
}
|
||||
downC <- f
|
||||
}()
|
||||
addrFirst, putFun, err := hb.Get(context.Background(), blockingOpts)
|
||||
if err != nil {
|
||||
t.Errorf("Get() with up endpoints should success, got %v", err)
|
||||
}
|
||||
if addrFirst.Addr != endpoints[1] {
|
||||
t.Errorf("Get() didn't return expected address, got %v", addrFirst)
|
||||
}
|
||||
if putFun == nil {
|
||||
t.Errorf("Get() returned unexpected nil put function")
|
||||
}
|
||||
down1 := <-downC
|
||||
|
||||
down2 := hb.Up(grpc.Address{Addr: endpoints[2]})
|
||||
addrSecond, _, _ := hb.Get(context.Background(), blockingOpts)
|
||||
if addrFirst.Addr != addrSecond.Addr {
|
||||
t.Errorf("Get() didn't return the same address as previous call, got %v and %v", addrFirst, addrSecond)
|
||||
}
|
||||
|
||||
down1(errors.New("error"))
|
||||
if addrs := <-hb.Notify(); len(addrs) != len(endpoints)-1 { // we call down on one endpoint
|
||||
t.Errorf("closing the only connection should triggered balancer to send the %d endpoints via Notify chan so that we can establish a connection", len(endpoints)-1)
|
||||
}
|
||||
down2(errors.New("error"))
|
||||
ctx, cancel = context.WithTimeout(context.Background(), time.Millisecond*100)
|
||||
_, _, err = hb.Get(ctx, blockingOpts)
|
||||
cancel()
|
||||
if err != context.DeadlineExceeded {
|
||||
t.Errorf("Get() with no up endpoints should timeout, got %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// TestOldHealthBalancerGraylist checks one endpoint is tried after the other
|
||||
// due to gray listing.
|
||||
func TestOldHealthBalancerGraylist(t *testing.T) {
|
||||
var wg sync.WaitGroup
|
||||
// Use 3 endpoints so gray list doesn't fallback to all connections
|
||||
// after failing on 2 endpoints.
|
||||
lns, eps := make([]net.Listener, 3), make([]string, 3)
|
||||
wg.Add(3)
|
||||
connc := make(chan string, 2)
|
||||
for i := range eps {
|
||||
ln, err := net.Listen("tcp", ":0")
|
||||
testutil.AssertNil(t, err)
|
||||
lns[i], eps[i] = ln, ln.Addr().String()
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
for {
|
||||
conn, err := ln.Accept()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = conn.Read(make([]byte, 512))
|
||||
conn.Close()
|
||||
if err == nil {
|
||||
select {
|
||||
case connc <- ln.Addr().String():
|
||||
// sleep some so balancer catches up
|
||||
// before attempted next reconnect.
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
hb := NewGRPC17Health(eps, 5*time.Second, func(ep string, dopts ...grpc.DialOption) (*grpc.ClientConn, error) { return nil, nil })
|
||||
|
||||
conn, err := grpc.Dial("", grpc.WithInsecure(), grpc.WithBalancer(hb))
|
||||
testutil.AssertNil(t, err)
|
||||
defer conn.Close()
|
||||
|
||||
kvc := pb.NewKVClient(conn)
|
||||
<-hb.Ready()
|
||||
|
||||
kvc.Range(context.TODO(), &pb.RangeRequest{})
|
||||
ep1 := <-connc
|
||||
kvc.Range(context.TODO(), &pb.RangeRequest{})
|
||||
ep2 := <-connc
|
||||
for _, ln := range lns {
|
||||
ln.Close()
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
if ep1 == ep2 {
|
||||
t.Fatalf("expected %q != %q", ep1, ep2)
|
||||
}
|
||||
}
|
||||
|
||||
// TestBalancerDoNotBlockOnClose ensures that balancer and grpc don't deadlock each other
|
||||
// due to rapid open/close conn. The deadlock causes balancer.Close() to block forever.
|
||||
// See issue: https://github.com/etcd-io/etcd/issues/7283 for more detail.
|
||||
func TestOldHealthBalancerDoNotBlockOnClose(t *testing.T) {
|
||||
defer testutil.AfterTest(t)
|
||||
|
||||
kcl := newKillConnListener(t, 3)
|
||||
defer kcl.close()
|
||||
|
||||
for i := 0; i < 5; i++ {
|
||||
hb := NewGRPC17Health(kcl.endpoints(), minHealthRetryDuration, func(ep string, dopts ...grpc.DialOption) (*grpc.ClientConn, error) { return nil, nil })
|
||||
conn, err := grpc.Dial("", grpc.WithInsecure(), grpc.WithBalancer(hb))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
kvc := pb.NewKVClient(conn)
|
||||
<-hb.readyc
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(100)
|
||||
cctx, cancel := context.WithCancel(context.TODO())
|
||||
for j := 0; j < 100; j++ {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
kvc.Range(cctx, &pb.RangeRequest{}, grpc.FailFast(false))
|
||||
}()
|
||||
}
|
||||
// balancer.Close() might block
|
||||
// if balancer and grpc deadlock each other.
|
||||
bclosec, cclosec := make(chan struct{}), make(chan struct{})
|
||||
go func() {
|
||||
defer close(bclosec)
|
||||
hb.Close()
|
||||
}()
|
||||
go func() {
|
||||
defer close(cclosec)
|
||||
conn.Close()
|
||||
}()
|
||||
select {
|
||||
case <-bclosec:
|
||||
case <-time.After(3 * time.Second):
|
||||
testutil.FatalStack(t, "balancer close timeout")
|
||||
}
|
||||
select {
|
||||
case <-cclosec:
|
||||
case <-time.After(3 * time.Second):
|
||||
t.Fatal("grpc conn close timeout")
|
||||
}
|
||||
|
||||
cancel()
|
||||
wg.Wait()
|
||||
}
|
||||
}
|
||||
|
||||
// killConnListener listens incoming conn and kills it immediately.
|
||||
type killConnListener struct {
|
||||
wg sync.WaitGroup
|
||||
eps []string
|
||||
stopc chan struct{}
|
||||
t *testing.T
|
||||
}
|
||||
|
||||
func newKillConnListener(t *testing.T, size int) *killConnListener {
|
||||
kcl := &killConnListener{stopc: make(chan struct{}), t: t}
|
||||
|
||||
for i := 0; i < size; i++ {
|
||||
ln, err := net.Listen("tcp", ":0")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
kcl.eps = append(kcl.eps, ln.Addr().String())
|
||||
kcl.wg.Add(1)
|
||||
go kcl.listen(ln)
|
||||
}
|
||||
return kcl
|
||||
}
|
||||
|
||||
func (kcl *killConnListener) endpoints() []string {
|
||||
return kcl.eps
|
||||
}
|
||||
|
||||
func (kcl *killConnListener) listen(l net.Listener) {
|
||||
go func() {
|
||||
defer kcl.wg.Done()
|
||||
for {
|
||||
conn, err := l.Accept()
|
||||
select {
|
||||
case <-kcl.stopc:
|
||||
return
|
||||
default:
|
||||
}
|
||||
if err != nil {
|
||||
kcl.t.Error(err)
|
||||
}
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
conn.Close()
|
||||
}
|
||||
}()
|
||||
<-kcl.stopc
|
||||
l.Close()
|
||||
}
|
||||
|
||||
func (kcl *killConnListener) close() {
|
||||
close(kcl.stopc)
|
||||
kcl.wg.Wait()
|
||||
}
|
@ -22,13 +22,18 @@ import (
|
||||
|
||||
// NewErr returns a picker that always returns err on "Pick".
|
||||
func NewErr(err error) Picker {
|
||||
return &errPicker{err: err}
|
||||
return &errPicker{p: Error, err: err}
|
||||
}
|
||||
|
||||
type errPicker struct {
|
||||
p Policy
|
||||
err error
|
||||
}
|
||||
|
||||
func (p *errPicker) Pick(context.Context, balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) {
|
||||
return nil, nil, p.err
|
||||
func (ep *errPicker) String() string {
|
||||
return ep.p.String()
|
||||
}
|
||||
|
||||
func (ep *errPicker) Pick(context.Context, balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) {
|
||||
return nil, nil, ep.err
|
||||
}
|
||||
|
@ -15,10 +15,77 @@
|
||||
package picker
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc/balancer"
|
||||
"google.golang.org/grpc/resolver"
|
||||
)
|
||||
|
||||
// Picker defines balancer Picker methods.
|
||||
type Picker interface {
|
||||
balancer.Picker
|
||||
String() string
|
||||
}
|
||||
|
||||
// Config defines picker configuration.
|
||||
type Config struct {
|
||||
// Policy specifies etcd clientv3's built in balancer policy.
|
||||
Policy Policy
|
||||
|
||||
// Logger defines picker logging object.
|
||||
Logger *zap.Logger
|
||||
|
||||
// SubConnToResolverAddress maps each gRPC sub-connection to an address.
|
||||
// Basically, it is a list of addresses that the Picker can pick from.
|
||||
SubConnToResolverAddress map[balancer.SubConn]resolver.Address
|
||||
}
|
||||
|
||||
// Policy defines balancer picker policy.
|
||||
type Policy uint8
|
||||
|
||||
const (
|
||||
// Error is error picker policy.
|
||||
Error Policy = iota
|
||||
|
||||
// RoundrobinBalanced balances loads over multiple endpoints
|
||||
// and implements failover in roundrobin fashion.
|
||||
RoundrobinBalanced
|
||||
|
||||
// Custom defines custom balancer picker.
|
||||
// TODO: custom picker is not supported yet.
|
||||
Custom
|
||||
)
|
||||
|
||||
func (p Policy) String() string {
|
||||
switch p {
|
||||
case Error:
|
||||
return "picker-error"
|
||||
|
||||
case RoundrobinBalanced:
|
||||
return "picker-roundrobin-balanced"
|
||||
|
||||
case Custom:
|
||||
panic("'custom' picker policy is not supported yet")
|
||||
|
||||
default:
|
||||
panic(fmt.Errorf("invalid balancer picker policy (%d)", p))
|
||||
}
|
||||
}
|
||||
|
||||
// New creates a new Picker.
|
||||
func New(cfg Config) Picker {
|
||||
switch cfg.Policy {
|
||||
case Error:
|
||||
panic("'error' picker policy is not supported here; use 'picker.NewErr'")
|
||||
|
||||
case RoundrobinBalanced:
|
||||
return newRoundrobinBalanced(cfg)
|
||||
|
||||
case Custom:
|
||||
panic("'custom' picker policy is not supported yet")
|
||||
|
||||
default:
|
||||
panic(fmt.Errorf("invalid balancer picker policy (%d)", cfg.Policy))
|
||||
}
|
||||
}
|
||||
|
@ -1,49 +0,0 @@
|
||||
// Copyright 2018 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package picker
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Policy defines balancer picker policy.
|
||||
type Policy uint8
|
||||
|
||||
const (
|
||||
// TODO: custom picker is not supported yet.
|
||||
// custom defines custom balancer picker.
|
||||
custom Policy = iota
|
||||
|
||||
// RoundrobinBalanced balance loads over multiple endpoints
|
||||
// and implements failover in roundrobin fashion.
|
||||
RoundrobinBalanced Policy = iota
|
||||
|
||||
// TODO: only send loads to pinned address "RoundrobinFailover"
|
||||
// just like how 3.3 client works
|
||||
//
|
||||
// TODO: prioritize leader
|
||||
// TODO: health-check
|
||||
// TODO: weighted roundrobin
|
||||
// TODO: power of two random choice
|
||||
)
|
||||
|
||||
func (p Policy) String() string {
|
||||
switch p {
|
||||
case custom:
|
||||
panic("'custom' picker policy is not supported yet")
|
||||
case RoundrobinBalanced:
|
||||
return "etcd-client-roundrobin-balanced"
|
||||
default:
|
||||
panic(fmt.Errorf("invalid balancer picker policy (%d)", p))
|
||||
}
|
||||
}
|
@ -24,32 +24,33 @@ import (
|
||||
"google.golang.org/grpc/resolver"
|
||||
)
|
||||
|
||||
// NewRoundrobinBalanced returns a new roundrobin balanced picker.
|
||||
func NewRoundrobinBalanced(
|
||||
lg *zap.Logger,
|
||||
scs []balancer.SubConn,
|
||||
addrToSc map[resolver.Address]balancer.SubConn,
|
||||
scToAddr map[balancer.SubConn]resolver.Address,
|
||||
) Picker {
|
||||
// newRoundrobinBalanced returns a new roundrobin balanced picker.
|
||||
func newRoundrobinBalanced(cfg Config) Picker {
|
||||
scs := make([]balancer.SubConn, 0, len(cfg.SubConnToResolverAddress))
|
||||
for sc := range cfg.SubConnToResolverAddress {
|
||||
scs = append(scs, sc)
|
||||
}
|
||||
return &rrBalanced{
|
||||
lg: lg,
|
||||
p: RoundrobinBalanced,
|
||||
lg: cfg.Logger,
|
||||
scs: scs,
|
||||
addrToSc: addrToSc,
|
||||
scToAddr: scToAddr,
|
||||
scToAddr: cfg.SubConnToResolverAddress,
|
||||
}
|
||||
}
|
||||
|
||||
type rrBalanced struct {
|
||||
p Policy
|
||||
|
||||
lg *zap.Logger
|
||||
|
||||
mu sync.RWMutex
|
||||
next int
|
||||
scs []balancer.SubConn
|
||||
|
||||
addrToSc map[resolver.Address]balancer.SubConn
|
||||
mu sync.RWMutex
|
||||
next int
|
||||
scs []balancer.SubConn
|
||||
scToAddr map[balancer.SubConn]resolver.Address
|
||||
}
|
||||
|
||||
func (rb *rrBalanced) String() string { return rb.p.String() }
|
||||
|
||||
// Pick is called for every client request.
|
||||
func (rb *rrBalanced) Pick(ctx context.Context, opts balancer.PickOptions) (balancer.SubConn, func(balancer.DoneInfo), error) {
|
||||
rb.mu.RLock()
|
||||
@ -68,6 +69,7 @@ func (rb *rrBalanced) Pick(ctx context.Context, opts balancer.PickOptions) (bala
|
||||
|
||||
rb.lg.Debug(
|
||||
"picked",
|
||||
zap.String("picker", rb.p.String()),
|
||||
zap.String("address", picked),
|
||||
zap.Int("subconn-index", cur),
|
||||
zap.Int("subconn-size", n),
|
||||
@ -77,6 +79,7 @@ func (rb *rrBalanced) Pick(ctx context.Context, opts balancer.PickOptions) (bala
|
||||
// TODO: error handling?
|
||||
fss := []zapcore.Field{
|
||||
zap.Error(info.Err),
|
||||
zap.String("picker", rb.p.String()),
|
||||
zap.String("address", picked),
|
||||
zap.Bool("success", info.Err == nil),
|
||||
zap.Bool("bytes-sent", info.BytesSent),
|
||||
|
@ -29,9 +29,9 @@ func scToString(sc balancer.SubConn) string {
|
||||
return fmt.Sprintf("%p", sc)
|
||||
}
|
||||
|
||||
func scsToStrings(scs map[resolver.Address]balancer.SubConn) (ss []string) {
|
||||
func scsToStrings(scs map[balancer.SubConn]resolver.Address) (ss []string) {
|
||||
ss = make([]string, 0, len(scs))
|
||||
for a, sc := range scs {
|
||||
for sc, a := range scs {
|
||||
ss = append(ss, fmt.Sprintf("%s (%s)", a.Addr, scToString(sc)))
|
||||
}
|
||||
sort.Strings(ss)
|
||||
|
@ -16,7 +16,6 @@ package clientv3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
@ -30,12 +29,13 @@ import (
|
||||
"go.etcd.io/etcd/clientv3/balancer"
|
||||
"go.etcd.io/etcd/clientv3/balancer/picker"
|
||||
"go.etcd.io/etcd/clientv3/balancer/resolver/endpoint"
|
||||
"go.etcd.io/etcd/clientv3/credentials"
|
||||
"go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
|
||||
"go.etcd.io/etcd/pkg/logutil"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials"
|
||||
grpccredentials "google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
@ -51,12 +51,17 @@ var (
|
||||
func init() {
|
||||
lg := zap.NewNop()
|
||||
if os.Getenv("ETCD_CLIENT_DEBUG") != "" {
|
||||
lcfg := logutil.DefaultZapLoggerConfig
|
||||
lcfg.Level = zap.NewAtomicLevelAt(zap.DebugLevel)
|
||||
|
||||
var err error
|
||||
lg, err = zap.NewProductionConfig().Build() // info level logging
|
||||
lg, err = lcfg.Build() // info level logging
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: support custom balancer
|
||||
balancer.RegisterBuilder(balancer.Config{
|
||||
Policy: picker.RoundrobinBalanced,
|
||||
Name: roundRobinBalancerName,
|
||||
@ -76,7 +81,7 @@ type Client struct {
|
||||
conn *grpc.ClientConn
|
||||
|
||||
cfg Config
|
||||
creds *credentials.TransportCredentials
|
||||
creds grpccredentials.TransportCredentials
|
||||
resolverGroup *endpoint.ResolverGroup
|
||||
mu *sync.RWMutex
|
||||
|
||||
@ -86,9 +91,8 @@ type Client struct {
|
||||
// Username is a user name for authentication.
|
||||
Username string
|
||||
// Password is a password for authentication.
|
||||
Password string
|
||||
// tokenCred is an instance of WithPerRPCCredentials()'s argument
|
||||
tokenCred *authTokenCredential
|
||||
Password string
|
||||
authTokenBundle credentials.Bundle
|
||||
|
||||
callOpts []grpc.CallOption
|
||||
|
||||
@ -193,24 +197,7 @@ func (c *Client) autoSync() {
|
||||
}
|
||||
}
|
||||
|
||||
type authTokenCredential struct {
|
||||
token string
|
||||
tokenMu *sync.RWMutex
|
||||
}
|
||||
|
||||
func (cred authTokenCredential) RequireTransportSecurity() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (cred authTokenCredential) GetRequestMetadata(ctx context.Context, s ...string) (map[string]string, error) {
|
||||
cred.tokenMu.RLock()
|
||||
defer cred.tokenMu.RUnlock()
|
||||
return map[string]string{
|
||||
rpctypes.TokenFieldNameGRPC: cred.token,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *Client) processCreds(scheme string) (creds *credentials.TransportCredentials) {
|
||||
func (c *Client) processCreds(scheme string) (creds grpccredentials.TransportCredentials) {
|
||||
creds = c.creds
|
||||
switch scheme {
|
||||
case "unix":
|
||||
@ -220,9 +207,7 @@ func (c *Client) processCreds(scheme string) (creds *credentials.TransportCreden
|
||||
if creds != nil {
|
||||
break
|
||||
}
|
||||
tlsconfig := &tls.Config{}
|
||||
emptyCreds := credentials.NewTLS(tlsconfig)
|
||||
creds = &emptyCreds
|
||||
creds = credentials.NewBundle(credentials.Config{}).TransportCredentials()
|
||||
default:
|
||||
creds = nil
|
||||
}
|
||||
@ -230,7 +215,7 @@ func (c *Client) processCreds(scheme string) (creds *credentials.TransportCreden
|
||||
}
|
||||
|
||||
// dialSetupOpts gives the dial opts prior to any authentication.
|
||||
func (c *Client) dialSetupOpts(creds *credentials.TransportCredentials, dopts ...grpc.DialOption) (opts []grpc.DialOption, err error) {
|
||||
func (c *Client) dialSetupOpts(creds grpccredentials.TransportCredentials, dopts ...grpc.DialOption) (opts []grpc.DialOption, err error) {
|
||||
if c.cfg.DialKeepAliveTime > 0 {
|
||||
params := keepalive.ClientParameters{
|
||||
Time: c.cfg.DialKeepAliveTime,
|
||||
@ -255,7 +240,7 @@ func (c *Client) dialSetupOpts(creds *credentials.TransportCredentials, dopts ..
|
||||
opts = append(opts, grpc.WithDialer(f))
|
||||
|
||||
if creds != nil {
|
||||
opts = append(opts, grpc.WithTransportCredentials(*creds))
|
||||
opts = append(opts, grpc.WithTransportCredentials(creds))
|
||||
} else {
|
||||
opts = append(opts, grpc.WithInsecure())
|
||||
}
|
||||
@ -318,10 +303,7 @@ func (c *Client) getToken(ctx context.Context) error {
|
||||
continue
|
||||
}
|
||||
|
||||
c.tokenCred.tokenMu.Lock()
|
||||
c.tokenCred.token = resp.Token
|
||||
c.tokenCred.tokenMu.Unlock()
|
||||
|
||||
c.authTokenBundle.UpdateAuthToken(resp.Token)
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -338,16 +320,14 @@ func (c *Client) dialWithBalancer(ep string, dopts ...grpc.DialOption) (*grpc.Cl
|
||||
}
|
||||
|
||||
// dial configures and dials any grpc balancer target.
|
||||
func (c *Client) dial(target string, creds *credentials.TransportCredentials, dopts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
||||
func (c *Client) dial(target string, creds grpccredentials.TransportCredentials, dopts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
||||
opts, err := c.dialSetupOpts(creds, dopts...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to configure dialer: %v", err)
|
||||
}
|
||||
|
||||
if c.Username != "" && c.Password != "" {
|
||||
c.tokenCred = &authTokenCredential{
|
||||
tokenMu: &sync.RWMutex{},
|
||||
}
|
||||
c.authTokenBundle = credentials.NewBundle(credentials.Config{})
|
||||
|
||||
ctx, cancel := c.ctx, func() {}
|
||||
if c.cfg.DialTimeout > 0 {
|
||||
@ -364,7 +344,7 @@ func (c *Client) dial(target string, creds *credentials.TransportCredentials, do
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
opts = append(opts, grpc.WithPerRPCCredentials(c.tokenCred))
|
||||
opts = append(opts, grpc.WithPerRPCCredentials(c.authTokenBundle.PerRPCCredentials()))
|
||||
}
|
||||
cancel()
|
||||
}
|
||||
@ -385,26 +365,25 @@ func (c *Client) dial(target string, creds *credentials.TransportCredentials, do
|
||||
return conn, nil
|
||||
}
|
||||
|
||||
func (c *Client) directDialCreds(ep string) *credentials.TransportCredentials {
|
||||
func (c *Client) directDialCreds(ep string) grpccredentials.TransportCredentials {
|
||||
_, hostPort, scheme := endpoint.ParseEndpoint(ep)
|
||||
creds := c.creds
|
||||
if len(scheme) != 0 {
|
||||
creds = c.processCreds(scheme)
|
||||
if creds != nil {
|
||||
c := *creds
|
||||
clone := c.Clone()
|
||||
clone := creds.Clone()
|
||||
// Set the server name must to the endpoint hostname without port since grpc
|
||||
// otherwise attempts to check if x509 cert is valid for the full endpoint
|
||||
// including the scheme and port, which fails.
|
||||
host, _ := endpoint.ParseHostPort(hostPort)
|
||||
clone.OverrideServerName(host)
|
||||
creds = &clone
|
||||
creds = clone
|
||||
}
|
||||
}
|
||||
return creds
|
||||
}
|
||||
|
||||
func (c *Client) dialWithBalancerCreds(ep string) *credentials.TransportCredentials {
|
||||
func (c *Client) dialWithBalancerCreds(ep string) grpccredentials.TransportCredentials {
|
||||
_, _, scheme := endpoint.ParseEndpoint(ep)
|
||||
creds := c.creds
|
||||
if len(scheme) != 0 {
|
||||
@ -424,10 +403,9 @@ func newClient(cfg *Config) (*Client, error) {
|
||||
if cfg == nil {
|
||||
cfg = &Config{}
|
||||
}
|
||||
var creds *credentials.TransportCredentials
|
||||
var creds grpccredentials.TransportCredentials
|
||||
if cfg.TLS != nil {
|
||||
c := credentials.NewTLS(cfg.TLS)
|
||||
creds = &c
|
||||
creds = credentials.NewBundle(credentials.Config{TLSConfig: cfg.TLS}).TransportCredentials()
|
||||
}
|
||||
|
||||
// use a temporary skeleton client to bootstrap first connection
|
||||
|
@ -81,4 +81,6 @@ type Config struct {
|
||||
|
||||
// PermitWithoutStream when set will allow client to send keepalive pings to server without any active streams(RPCs).
|
||||
PermitWithoutStream bool `json:"permit-without-stream"`
|
||||
|
||||
// TODO: support custom balancer picker
|
||||
}
|
||||
|
155
clientv3/credentials/credentials.go
Normal file
155
clientv3/credentials/credentials.go
Normal file
@ -0,0 +1,155 @@
|
||||
// Copyright 2019 The etcd Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package credentials implements gRPC credential interface with etcd specific logic.
|
||||
// e.g., client handshake with custom authority parameter
|
||||
package credentials
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
"go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
|
||||
grpccredentials "google.golang.org/grpc/credentials"
|
||||
)
|
||||
|
||||
// Config defines gRPC credential configuration.
|
||||
type Config struct {
|
||||
TLSConfig *tls.Config
|
||||
}
|
||||
|
||||
// Bundle defines gRPC credential interface.
|
||||
type Bundle interface {
|
||||
grpccredentials.Bundle
|
||||
UpdateAuthToken(token string)
|
||||
}
|
||||
|
||||
// NewBundle constructs a new gRPC credential bundle.
|
||||
func NewBundle(cfg Config) Bundle {
|
||||
return &bundle{
|
||||
tc: newTransportCredential(cfg.TLSConfig),
|
||||
rc: newPerRPCCredential(),
|
||||
}
|
||||
}
|
||||
|
||||
// bundle implements "grpccredentials.Bundle" interface.
|
||||
type bundle struct {
|
||||
tc *transportCredential
|
||||
rc *perRPCCredential
|
||||
}
|
||||
|
||||
func (b *bundle) TransportCredentials() grpccredentials.TransportCredentials {
|
||||
return b.tc
|
||||
}
|
||||
|
||||
func (b *bundle) PerRPCCredentials() grpccredentials.PerRPCCredentials {
|
||||
return b.rc
|
||||
}
|
||||
|
||||
func (b *bundle) NewWithMode(mode string) (grpccredentials.Bundle, error) {
|
||||
// no-op
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// transportCredential implements "grpccredentials.TransportCredentials" interface.
|
||||
type transportCredential struct {
|
||||
gtc grpccredentials.TransportCredentials
|
||||
}
|
||||
|
||||
func newTransportCredential(cfg *tls.Config) *transportCredential {
|
||||
return &transportCredential{
|
||||
gtc: grpccredentials.NewTLS(cfg),
|
||||
}
|
||||
}
|
||||
|
||||
func (tc *transportCredential) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) {
|
||||
// Only overwrite when authority is an IP address!
|
||||
// Let's say, a server runs SRV records on "etcd.local" that resolves
|
||||
// to "m1.etcd.local", and its SAN field also includes "m1.etcd.local".
|
||||
// But what if SAN does not include its resolved IP address (e.g. 127.0.0.1)?
|
||||
// Then, the server should only authenticate using its DNS hostname "m1.etcd.local",
|
||||
// instead of overwriting it with its IP address.
|
||||
// And we do not overwrite "localhost" either. Only overwrite IP addresses!
|
||||
if isIP(authority) {
|
||||
target := rawConn.RemoteAddr().String()
|
||||
if authority != target {
|
||||
// When user dials with "grpc.WithDialer", "grpc.DialContext" "cc.parsedTarget"
|
||||
// update only happens once. This is problematic, because when TLS is enabled,
|
||||
// retries happen through "grpc.WithDialer" with static "cc.parsedTarget" from
|
||||
// the initial dial call.
|
||||
// If the server authenticates by IP addresses, we want to set a new endpoint as
|
||||
// a new authority. Otherwise
|
||||
// "transport: authentication handshake failed: x509: certificate is valid for 127.0.0.1, 192.168.121.180, not 192.168.223.156"
|
||||
// when the new dial target is "192.168.121.180" whose certificate host name is also "192.168.121.180"
|
||||
// but client tries to authenticate with previously set "cc.parsedTarget" field "192.168.223.156"
|
||||
authority = target
|
||||
}
|
||||
}
|
||||
return tc.gtc.ClientHandshake(ctx, authority, rawConn)
|
||||
}
|
||||
|
||||
// return true if given string is an IP.
|
||||
func isIP(ep string) bool {
|
||||
return net.ParseIP(ep) != nil
|
||||
}
|
||||
|
||||
func (tc *transportCredential) ServerHandshake(rawConn net.Conn) (net.Conn, grpccredentials.AuthInfo, error) {
|
||||
return tc.gtc.ServerHandshake(rawConn)
|
||||
}
|
||||
|
||||
func (tc *transportCredential) Info() grpccredentials.ProtocolInfo {
|
||||
return tc.gtc.Info()
|
||||
}
|
||||
|
||||
func (tc *transportCredential) Clone() grpccredentials.TransportCredentials {
|
||||
return &transportCredential{
|
||||
gtc: tc.gtc.Clone(),
|
||||
}
|
||||
}
|
||||
|
||||
func (tc *transportCredential) OverrideServerName(serverNameOverride string) error {
|
||||
return tc.gtc.OverrideServerName(serverNameOverride)
|
||||
}
|
||||
|
||||
// perRPCCredential implements "grpccredentials.PerRPCCredentials" interface.
|
||||
type perRPCCredential struct {
|
||||
authToken string
|
||||
authTokenMu sync.RWMutex
|
||||
}
|
||||
|
||||
func newPerRPCCredential() *perRPCCredential { return &perRPCCredential{} }
|
||||
|
||||
func (rc *perRPCCredential) RequireTransportSecurity() bool { return false }
|
||||
|
||||
func (rc *perRPCCredential) GetRequestMetadata(ctx context.Context, s ...string) (map[string]string, error) {
|
||||
rc.authTokenMu.RLock()
|
||||
authToken := rc.authToken
|
||||
rc.authTokenMu.RUnlock()
|
||||
return map[string]string{rpctypes.TokenFieldNameGRPC: authToken}, nil
|
||||
}
|
||||
|
||||
func (b *bundle) UpdateAuthToken(token string) {
|
||||
if b.rc == nil {
|
||||
return
|
||||
}
|
||||
b.rc.UpdateAuthToken(token)
|
||||
}
|
||||
|
||||
func (rc *perRPCCredential) UpdateAuthToken(token string) {
|
||||
rc.authTokenMu.Lock()
|
||||
rc.authToken = token
|
||||
rc.authTokenMu.Unlock()
|
||||
}
|
@ -36,7 +36,7 @@ func TestBalancerUnderBlackholeKeepAliveWatch(t *testing.T) {
|
||||
|
||||
clus := integration.NewClusterV3(t, &integration.ClusterConfig{
|
||||
Size: 2,
|
||||
GRPCKeepAliveMinTime: 1 * time.Millisecond, // avoid too_many_pings
|
||||
GRPCKeepAliveMinTime: time.Millisecond, // avoid too_many_pings
|
||||
})
|
||||
defer clus.Terminate(t)
|
||||
|
||||
@ -44,9 +44,9 @@ func TestBalancerUnderBlackholeKeepAliveWatch(t *testing.T) {
|
||||
|
||||
ccfg := clientv3.Config{
|
||||
Endpoints: []string{eps[0]},
|
||||
DialTimeout: 1 * time.Second,
|
||||
DialTimeout: time.Second,
|
||||
DialOptions: []grpc.DialOption{grpc.WithBlock()},
|
||||
DialKeepAliveTime: 1 * time.Second,
|
||||
DialKeepAliveTime: time.Second,
|
||||
DialKeepAliveTimeout: 500 * time.Millisecond,
|
||||
}
|
||||
|
||||
@ -72,6 +72,9 @@ func TestBalancerUnderBlackholeKeepAliveWatch(t *testing.T) {
|
||||
// endpoint can switch to eps[1] when it detects the failure of eps[0]
|
||||
cli.SetEndpoints(eps...)
|
||||
|
||||
// give enough time for balancer resolution
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
clus.Members[0].Blackhole()
|
||||
|
||||
if _, err = clus.Client(1).Put(context.TODO(), "foo", "bar"); err != nil {
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"go.etcd.io/etcd/clientv3/credentials"
|
||||
"go.etcd.io/etcd/etcdserver"
|
||||
"go.etcd.io/etcd/etcdserver/api/v3client"
|
||||
"go.etcd.io/etcd/etcdserver/api/v3election"
|
||||
@ -43,7 +44,6 @@ import (
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/net/trace"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
)
|
||||
|
||||
type serveCtx struct {
|
||||
@ -163,8 +163,8 @@ func (sctx *serveCtx) serve(
|
||||
dtls := tlscfg.Clone()
|
||||
// trust local server
|
||||
dtls.InsecureSkipVerify = true
|
||||
creds := credentials.NewTLS(dtls)
|
||||
opts := []grpc.DialOption{grpc.WithTransportCredentials(creds)}
|
||||
bundle := credentials.NewBundle(credentials.Config{TLSConfig: dtls})
|
||||
opts := []grpc.DialOption{grpc.WithTransportCredentials(bundle.TransportCredentials())}
|
||||
gwmux, err = sctx.registerGateway(opts)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -21,10 +21,10 @@ import (
|
||||
"go.etcd.io/etcd/etcdserver"
|
||||
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
|
||||
|
||||
"github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
"github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||
"go.etcd.io/etcd/clientv3/credentials"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/health"
|
||||
healthpb "google.golang.org/grpc/health/grpc_health_v1"
|
||||
)
|
||||
@ -39,7 +39,8 @@ func Server(s *etcdserver.EtcdServer, tls *tls.Config, gopts ...grpc.ServerOptio
|
||||
var opts []grpc.ServerOption
|
||||
opts = append(opts, grpc.CustomCodec(&codec{}))
|
||||
if tls != nil {
|
||||
opts = append(opts, grpc.Creds(credentials.NewTLS(tls)))
|
||||
bundle := credentials.NewBundle(credentials.Config{TLSConfig: tls})
|
||||
opts = append(opts, grpc.Creds(bundle.TransportCredentials()))
|
||||
}
|
||||
opts = append(opts, grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
|
||||
newLogUnaryInterceptor(s),
|
||||
|
9
go.mod
9
go.mod
@ -11,7 +11,6 @@ require (
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
|
||||
github.com/fatih/color v1.7.0 // indirect
|
||||
github.com/gogo/protobuf v1.2.1
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/google/btree v1.0.0
|
||||
@ -40,12 +39,10 @@ require (
|
||||
go.uber.org/atomic v1.3.2 // indirect
|
||||
go.uber.org/multierr v1.1.0 // indirect
|
||||
go.uber.org/zap v1.10.0
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a
|
||||
golang.org/x/text v0.3.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
|
||||
google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80 // indirect
|
||||
google.golang.org/grpc v1.14.0
|
||||
google.golang.org/grpc v1.22.1
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25
|
||||
gopkg.in/yaml.v2 v2.2.2
|
||||
sigs.k8s.io/yaml v1.1.0
|
||||
|
26
go.sum
26
go.sum
@ -1,3 +1,5 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
|
||||
@ -6,6 +8,7 @@ github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190531201743-edce55837238 h1:uNljlOxtOHrPnRoPPx+JanqjAGZpNiqAGVBfGskd/pg=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190531201743-edce55837238/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
|
||||
@ -36,6 +39,7 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekf
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
|
||||
@ -44,6 +48,7 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@ -131,22 +136,34 @@ go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a h1:gOpx8G595UYyvj8UK4+OFyY4rx037g3fmfhe5SasG3U=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5 h1:mzjBh+S5frKOsOBobWIMAbXavqjmgO17k/2puhcFR94=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80 h1:GL7nK1hkDKrkor0eVOYcMdIsUGErFnaC2gpBOVC+vbI=
|
||||
google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/grpc v1.22.1 h1:/7cs52RnTJmD43s3uxzlq2U7nqVTd/37viQwMrMNlOM=
|
||||
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@ -155,5 +172,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
|
@ -85,8 +85,8 @@ func TestV3KVInflightRangeRequests(t *testing.T) {
|
||||
if err != nil {
|
||||
errCode := status.Convert(err).Code()
|
||||
errDesc := rpctypes.ErrorDesc(err)
|
||||
if err != nil && !(errDesc == context.Canceled.Error() || errCode == codes.Unavailable) {
|
||||
t.Errorf("inflight request should be canceled with '%v' or code Unavailable, got '%v' with code '%s'", context.Canceled.Error(), errDesc, errCode)
|
||||
if err != nil && !(errDesc == context.Canceled.Error() || errCode == codes.Canceled || errCode == codes.Unavailable) {
|
||||
t.Errorf("inflight request should be canceled with '%v' or code Canceled or Unavailable, got '%v' with code '%s'", context.Canceled.Error(), errDesc, errCode)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
8
vendor/golang.org/x/crypto/blowfish/cipher.go
generated
vendored
8
vendor/golang.org/x/crypto/blowfish/cipher.go
generated
vendored
@ -3,6 +3,14 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
|
||||
//
|
||||
// Blowfish is a legacy cipher and its short block size makes it vulnerable to
|
||||
// birthday bound attacks (see https://sweet32.info). It should only be used
|
||||
// where compatibility with legacy systems, not security, is the goal.
|
||||
//
|
||||
// Deprecated: any new system should use AES (from crypto/aes, if necessary in
|
||||
// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
|
||||
// golang.org/x/crypto/chacha20poly1305).
|
||||
package blowfish // import "golang.org/x/crypto/blowfish"
|
||||
|
||||
// The code is a port of Bruce Schneier's C implementation.
|
||||
|
4
vendor/golang.org/x/crypto/ssh/terminal/terminal.go
generated
vendored
4
vendor/golang.org/x/crypto/ssh/terminal/terminal.go
generated
vendored
@ -159,6 +159,10 @@ func bytesToKey(b []byte, pasteActive bool) (rune, []byte) {
|
||||
return keyClearScreen, b[1:]
|
||||
case 23: // ^W
|
||||
return keyDeleteWord, b[1:]
|
||||
case 14: // ^N
|
||||
return keyDown, b[1:]
|
||||
case 16: // ^P
|
||||
return keyUp, b[1:]
|
||||
}
|
||||
}
|
||||
|
||||
|
4
vendor/golang.org/x/crypto/ssh/terminal/util.go
generated
vendored
4
vendor/golang.org/x/crypto/ssh/terminal/util.go
generated
vendored
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd
|
||||
// +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd
|
||||
|
||||
// Package terminal provides support functions for dealing with terminals, as
|
||||
// commonly found on UNIX systems.
|
||||
@ -25,7 +25,7 @@ type State struct {
|
||||
termios unix.Termios
|
||||
}
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
// IsTerminal returns whether the given file descriptor is a terminal.
|
||||
func IsTerminal(fd int) bool {
|
||||
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
|
||||
return err == nil
|
||||
|
12
vendor/golang.org/x/crypto/ssh/terminal/util_aix.go
generated
vendored
Normal file
12
vendor/golang.org/x/crypto/ssh/terminal/util_aix.go
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright 2018 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 aix
|
||||
|
||||
package terminal
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const ioctlReadTermios = unix.TCGETS
|
||||
const ioctlWriteTermios = unix.TCSETS
|
2
vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go
generated
vendored
2
vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go
generated
vendored
@ -21,7 +21,7 @@ import (
|
||||
|
||||
type State struct{}
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
// IsTerminal returns whether the given file descriptor is a terminal.
|
||||
func IsTerminal(fd int) bool {
|
||||
return false
|
||||
}
|
||||
|
2
vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go
generated
vendored
2
vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go
generated
vendored
@ -17,7 +17,7 @@ type State struct {
|
||||
termios unix.Termios
|
||||
}
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
// IsTerminal returns whether the given file descriptor is a terminal.
|
||||
func IsTerminal(fd int) bool {
|
||||
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
|
||||
return err == nil
|
||||
|
8
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
8
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
@ -26,7 +26,7 @@ type State struct {
|
||||
mode uint32
|
||||
}
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
// IsTerminal returns whether the given file descriptor is a terminal.
|
||||
func IsTerminal(fd int) bool {
|
||||
var st uint32
|
||||
err := windows.GetConsoleMode(windows.Handle(fd), &st)
|
||||
@ -64,13 +64,15 @@ func Restore(fd int, state *State) error {
|
||||
return windows.SetConsoleMode(windows.Handle(fd), state.mode)
|
||||
}
|
||||
|
||||
// GetSize returns the dimensions of the given terminal.
|
||||
// GetSize returns the visible dimensions of the given terminal.
|
||||
//
|
||||
// These dimensions don't include any scrollback buffer height.
|
||||
func GetSize(fd int) (width, height int, err error) {
|
||||
var info windows.ConsoleScreenBufferInfo
|
||||
if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
return int(info.Size.X), int(info.Size.Y), nil
|
||||
return int(info.Window.Right - info.Window.Left + 1), int(info.Window.Bottom - info.Window.Top + 1), nil
|
||||
}
|
||||
|
||||
// ReadPassword reads a line of input from a terminal without local echo. This
|
||||
|
2
vendor/golang.org/x/net/http2/frame.go
generated
vendored
2
vendor/golang.org/x/net/http2/frame.go
generated
vendored
@ -643,7 +643,7 @@ func (f *Framer) WriteData(streamID uint32, endStream bool, data []byte) error {
|
||||
return f.WriteDataPadded(streamID, endStream, data, nil)
|
||||
}
|
||||
|
||||
// WriteData writes a DATA frame with optional padding.
|
||||
// WriteDataPadded writes a DATA frame with optional padding.
|
||||
//
|
||||
// If pad is nil, the padding bit is not sent.
|
||||
// The length of pad must not exceed 255 bytes.
|
||||
|
10
vendor/golang.org/x/net/http2/hpack/hpack.go
generated
vendored
10
vendor/golang.org/x/net/http2/hpack/hpack.go
generated
vendored
@ -92,6 +92,8 @@ type Decoder struct {
|
||||
// saveBuf is previous data passed to Write which we weren't able
|
||||
// to fully parse before. Unlike buf, we own this data.
|
||||
saveBuf bytes.Buffer
|
||||
|
||||
firstField bool // processing the first field of the header block
|
||||
}
|
||||
|
||||
// NewDecoder returns a new decoder with the provided maximum dynamic
|
||||
@ -101,6 +103,7 @@ func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decod
|
||||
d := &Decoder{
|
||||
emit: emitFunc,
|
||||
emitEnabled: true,
|
||||
firstField: true,
|
||||
}
|
||||
d.dynTab.table.init()
|
||||
d.dynTab.allowedMaxSize = maxDynamicTableSize
|
||||
@ -226,11 +229,15 @@ func (d *Decoder) DecodeFull(p []byte) ([]HeaderField, error) {
|
||||
return hf, nil
|
||||
}
|
||||
|
||||
// Close declares that the decoding is complete and resets the Decoder
|
||||
// to be reused again for a new header block. If there is any remaining
|
||||
// data in the decoder's buffer, Close returns an error.
|
||||
func (d *Decoder) Close() error {
|
||||
if d.saveBuf.Len() > 0 {
|
||||
d.saveBuf.Reset()
|
||||
return DecodingError{errors.New("truncated headers")}
|
||||
}
|
||||
d.firstField = true
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -266,6 +273,7 @@ func (d *Decoder) Write(p []byte) (n int, err error) {
|
||||
d.saveBuf.Write(d.buf)
|
||||
return len(p), nil
|
||||
}
|
||||
d.firstField = false
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
@ -391,7 +399,7 @@ func (d *Decoder) callEmit(hf HeaderField) error {
|
||||
func (d *Decoder) parseDynamicTableSizeUpdate() error {
|
||||
// RFC 7541, sec 4.2: This dynamic table size update MUST occur at the
|
||||
// beginning of the first header block following the change to the dynamic table size.
|
||||
if d.dynTab.size > 0 {
|
||||
if !d.firstField && d.dynTab.size > 0 {
|
||||
return DecodingError{errors.New("dynamic table size update MUST occur at the beginning of a header block")}
|
||||
}
|
||||
|
||||
|
6
vendor/golang.org/x/net/http2/server.go
generated
vendored
6
vendor/golang.org/x/net/http2/server.go
generated
vendored
@ -1594,12 +1594,6 @@ func (sc *serverConn) processData(f *DataFrame) error {
|
||||
// type PROTOCOL_ERROR."
|
||||
return ConnectionError(ErrCodeProtocol)
|
||||
}
|
||||
// RFC 7540, sec 6.1: If a DATA frame is received whose stream is not in
|
||||
// "open" or "half-closed (local)" state, the recipient MUST respond with a
|
||||
// stream error (Section 5.4.2) of type STREAM_CLOSED.
|
||||
if state == stateClosed {
|
||||
return streamError(id, ErrCodeStreamClosed)
|
||||
}
|
||||
if st == nil || state != stateOpen || st.gotTrailerHeader || st.resetQueued {
|
||||
// This includes sending a RST_STREAM if the stream is
|
||||
// in stateHalfClosedLocal (which currently means that
|
||||
|
25
vendor/golang.org/x/net/http2/transport.go
generated
vendored
25
vendor/golang.org/x/net/http2/transport.go
generated
vendored
@ -97,6 +97,16 @@ type Transport struct {
|
||||
// to mean no limit.
|
||||
MaxHeaderListSize uint32
|
||||
|
||||
// StrictMaxConcurrentStreams controls whether the server's
|
||||
// SETTINGS_MAX_CONCURRENT_STREAMS should be respected
|
||||
// globally. If false, new TCP connections are created to the
|
||||
// server as needed to keep each under the per-connection
|
||||
// SETTINGS_MAX_CONCURRENT_STREAMS limit. If true, the
|
||||
// server's SETTINGS_MAX_CONCURRENT_STREAMS is interpreted as
|
||||
// a global limit and callers of RoundTrip block when needed,
|
||||
// waiting for their turn.
|
||||
StrictMaxConcurrentStreams bool
|
||||
|
||||
// t1, if non-nil, is the standard library Transport using
|
||||
// this transport. Its settings are used (but not its
|
||||
// RoundTrip method, etc).
|
||||
@ -711,8 +721,19 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
|
||||
if cc.singleUse && cc.nextStreamID > 1 {
|
||||
return
|
||||
}
|
||||
st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing &&
|
||||
int64(cc.nextStreamID)+int64(cc.pendingRequests) < math.MaxInt32
|
||||
var maxConcurrentOkay bool
|
||||
if cc.t.StrictMaxConcurrentStreams {
|
||||
// We'll tell the caller we can take a new request to
|
||||
// prevent the caller from dialing a new TCP
|
||||
// connection, but then we'll block later before
|
||||
// writing it.
|
||||
maxConcurrentOkay = true
|
||||
} else {
|
||||
maxConcurrentOkay = int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams)
|
||||
}
|
||||
|
||||
st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay &&
|
||||
int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32
|
||||
st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest
|
||||
return
|
||||
}
|
||||
|
14
vendor/golang.org/x/net/trace/trace.go
generated
vendored
14
vendor/golang.org/x/net/trace/trace.go
generated
vendored
@ -86,6 +86,12 @@ import (
|
||||
// FOR DEBUGGING ONLY. This will slow down the program.
|
||||
var DebugUseAfterFinish = false
|
||||
|
||||
// HTTP ServeMux paths.
|
||||
const (
|
||||
debugRequestsPath = "/debug/requests"
|
||||
debugEventsPath = "/debug/events"
|
||||
)
|
||||
|
||||
// AuthRequest determines whether a specific request is permitted to load the
|
||||
// /debug/requests or /debug/events pages.
|
||||
//
|
||||
@ -112,8 +118,8 @@ var AuthRequest = func(req *http.Request) (any, sensitive bool) {
|
||||
}
|
||||
|
||||
func init() {
|
||||
_, pat := http.DefaultServeMux.Handler(&http.Request{URL: &url.URL{Path: "/debug/requests"}})
|
||||
if pat != "" {
|
||||
_, pat := http.DefaultServeMux.Handler(&http.Request{URL: &url.URL{Path: debugRequestsPath}})
|
||||
if pat == debugRequestsPath {
|
||||
panic("/debug/requests is already registered. You may have two independent copies of " +
|
||||
"golang.org/x/net/trace in your binary, trying to maintain separate state. This may " +
|
||||
"involve a vendored copy of golang.org/x/net/trace.")
|
||||
@ -121,8 +127,8 @@ func init() {
|
||||
|
||||
// TODO(jbd): Serve Traces from /debug/traces in the future?
|
||||
// There is no requirement for a request to be present to have traces.
|
||||
http.HandleFunc("/debug/requests", Traces)
|
||||
http.HandleFunc("/debug/events", Events)
|
||||
http.HandleFunc(debugRequestsPath, Traces)
|
||||
http.HandleFunc(debugEventsPath, Events)
|
||||
}
|
||||
|
||||
// NewContext returns a copy of the parent context
|
||||
|
29
vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
generated
vendored
Normal file
29
vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright 2018 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 !gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System call support for ARM64, FreeBSD
|
||||
//
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||
JMP syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
29
vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
generated
vendored
Normal file
29
vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright 2019 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 !gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System call support for ARM64, NetBSD
|
||||
//
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
B syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
B syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||
B syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
B syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
B syscall·RawSyscall6(SB)
|
2
vendor/golang.org/x/sys/unix/fcntl.go
generated
vendored
2
vendor/golang.org/x/sys/unix/fcntl.go
generated
vendored
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd
|
||||
// +build dragonfly freebsd linux netbsd openbsd
|
||||
|
||||
package unix
|
||||
|
||||
|
18
vendor/golang.org/x/sys/unix/fcntl_darwin.go
generated
vendored
Normal file
18
vendor/golang.org/x/sys/unix/fcntl_darwin.go
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright 2019 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.
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
|
||||
func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
|
||||
return fcntl(int(fd), cmd, arg)
|
||||
}
|
||||
|
||||
// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
|
||||
func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
|
||||
_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
|
||||
return err
|
||||
}
|
61
vendor/golang.org/x/sys/unix/mkasm_darwin.go
generated
vendored
Normal file
61
vendor/golang.org/x/sys/unix/mkasm_darwin.go
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
// Copyright 2018 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 ignore
|
||||
|
||||
// mkasm_darwin.go generates assembly trampolines to call libSystem routines from Go.
|
||||
//This program must be run after mksyscall.go.
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
in1, err := ioutil.ReadFile("syscall_darwin.go")
|
||||
if err != nil {
|
||||
log.Fatalf("can't open syscall_darwin.go: %s", err)
|
||||
}
|
||||
arch := os.Args[1]
|
||||
in2, err := ioutil.ReadFile(fmt.Sprintf("syscall_darwin_%s.go", arch))
|
||||
if err != nil {
|
||||
log.Fatalf("can't open syscall_darwin_%s.go: %s", arch, err)
|
||||
}
|
||||
in3, err := ioutil.ReadFile(fmt.Sprintf("zsyscall_darwin_%s.go", arch))
|
||||
if err != nil {
|
||||
log.Fatalf("can't open zsyscall_darwin_%s.go: %s", arch, err)
|
||||
}
|
||||
in := string(in1) + string(in2) + string(in3)
|
||||
|
||||
trampolines := map[string]bool{}
|
||||
|
||||
var out bytes.Buffer
|
||||
|
||||
fmt.Fprintf(&out, "// go run mkasm_darwin.go %s\n", strings.Join(os.Args[1:], " "))
|
||||
fmt.Fprintf(&out, "// Code generated by the command above; DO NOT EDIT.\n")
|
||||
fmt.Fprintf(&out, "\n")
|
||||
fmt.Fprintf(&out, "// +build go1.12\n")
|
||||
fmt.Fprintf(&out, "\n")
|
||||
fmt.Fprintf(&out, "#include \"textflag.h\"\n")
|
||||
for _, line := range strings.Split(in, "\n") {
|
||||
if !strings.HasPrefix(line, "func ") || !strings.HasSuffix(line, "_trampoline()") {
|
||||
continue
|
||||
}
|
||||
fn := line[5 : len(line)-13]
|
||||
if !trampolines[fn] {
|
||||
trampolines[fn] = true
|
||||
fmt.Fprintf(&out, "TEXT ·%s_trampoline(SB),NOSPLIT,$0-0\n", fn)
|
||||
fmt.Fprintf(&out, "\tJMP\t%s(SB)\n", fn)
|
||||
}
|
||||
}
|
||||
err = ioutil.WriteFile(fmt.Sprintf("zsyscall_darwin_%s.s", arch), out.Bytes(), 0644)
|
||||
if err != nil {
|
||||
log.Fatalf("can't write zsyscall_darwin_%s.s: %s", arch, err)
|
||||
}
|
||||
}
|
6
vendor/golang.org/x/sys/unix/mkpost.go
generated
vendored
6
vendor/golang.org/x/sys/unix/mkpost.go
generated
vendored
@ -28,10 +28,10 @@ func main() {
|
||||
if goarch == "" {
|
||||
goarch = os.Getenv("GOARCH")
|
||||
}
|
||||
// Check that we are using the new build system if we should be.
|
||||
if goos == "linux" && goarch != "sparc64" {
|
||||
// Check that we are using the Docker-based build system if we should be.
|
||||
if goos == "linux" {
|
||||
if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
|
||||
os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n")
|
||||
os.Stderr.WriteString("In the Docker-based build system, mkpost should not be called directly.\n")
|
||||
os.Stderr.WriteString("See README.md\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
402
vendor/golang.org/x/sys/unix/mksyscall.go
generated
vendored
Normal file
402
vendor/golang.org/x/sys/unix/mksyscall.go
generated
vendored
Normal file
@ -0,0 +1,402 @@
|
||||
// Copyright 2018 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 ignore
|
||||
|
||||
/*
|
||||
This program reads a file containing function prototypes
|
||||
(like syscall_darwin.go) and generates system call bodies.
|
||||
The prototypes are marked by lines beginning with "//sys"
|
||||
and read like func declarations if //sys is replaced by func, but:
|
||||
* The parameter lists must give a name for each argument.
|
||||
This includes return parameters.
|
||||
* The parameter lists must give a type for each argument:
|
||||
the (x, y, z int) shorthand is not allowed.
|
||||
* If the return parameter is an error number, it must be named errno.
|
||||
|
||||
A line beginning with //sysnb is like //sys, except that the
|
||||
goroutine will not be suspended during the execution of the system
|
||||
call. This must only be used for system calls which can never
|
||||
block, as otherwise the system call could cause all goroutines to
|
||||
hang.
|
||||
*/
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
b32 = flag.Bool("b32", false, "32bit big-endian")
|
||||
l32 = flag.Bool("l32", false, "32bit little-endian")
|
||||
plan9 = flag.Bool("plan9", false, "plan9")
|
||||
openbsd = flag.Bool("openbsd", false, "openbsd")
|
||||
netbsd = flag.Bool("netbsd", false, "netbsd")
|
||||
dragonfly = flag.Bool("dragonfly", false, "dragonfly")
|
||||
arm = flag.Bool("arm", false, "arm") // 64-bit value should use (even, odd)-pair
|
||||
tags = flag.String("tags", "", "build tags")
|
||||
filename = flag.String("output", "", "output file name (standard output if omitted)")
|
||||
)
|
||||
|
||||
// cmdLine returns this programs's commandline arguments
|
||||
func cmdLine() string {
|
||||
return "go run mksyscall.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
func buildTags() string {
|
||||
return *tags
|
||||
}
|
||||
|
||||
// Param is function parameter
|
||||
type Param struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// usage prints the program usage
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: go run mksyscall.go [-b32 | -l32] [-tags x,y] [file ...]\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// parseParamList parses parameter list and returns a slice of parameters
|
||||
func parseParamList(list string) []string {
|
||||
list = strings.TrimSpace(list)
|
||||
if list == "" {
|
||||
return []string{}
|
||||
}
|
||||
return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
|
||||
}
|
||||
|
||||
// parseParam splits a parameter into name and type
|
||||
func parseParam(p string) Param {
|
||||
ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
|
||||
if ps == nil {
|
||||
fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
|
||||
os.Exit(1)
|
||||
}
|
||||
return Param{ps[1], ps[2]}
|
||||
}
|
||||
|
||||
func main() {
|
||||
// Get the OS and architecture (using GOARCH_TARGET if it exists)
|
||||
goos := os.Getenv("GOOS")
|
||||
if goos == "" {
|
||||
fmt.Fprintln(os.Stderr, "GOOS not defined in environment")
|
||||
os.Exit(1)
|
||||
}
|
||||
goarch := os.Getenv("GOARCH_TARGET")
|
||||
if goarch == "" {
|
||||
goarch = os.Getenv("GOARCH")
|
||||
}
|
||||
|
||||
// Check that we are using the Docker-based build system if we should
|
||||
if goos == "linux" {
|
||||
if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
|
||||
fmt.Fprintf(os.Stderr, "In the Docker-based build system, mksyscall should not be called directly.\n")
|
||||
fmt.Fprintf(os.Stderr, "See README.md\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
if len(flag.Args()) <= 0 {
|
||||
fmt.Fprintf(os.Stderr, "no files to parse provided\n")
|
||||
usage()
|
||||
}
|
||||
|
||||
endianness := ""
|
||||
if *b32 {
|
||||
endianness = "big-endian"
|
||||
} else if *l32 {
|
||||
endianness = "little-endian"
|
||||
}
|
||||
|
||||
libc := false
|
||||
if goos == "darwin" && strings.Contains(buildTags(), ",go1.12") {
|
||||
libc = true
|
||||
}
|
||||
trampolines := map[string]bool{}
|
||||
|
||||
text := ""
|
||||
for _, path := range flag.Args() {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
s := bufio.NewScanner(file)
|
||||
for s.Scan() {
|
||||
t := s.Text()
|
||||
t = strings.TrimSpace(t)
|
||||
t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
|
||||
nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
|
||||
if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Line must be of the form
|
||||
// func Open(path string, mode int, perm int) (fd int, errno error)
|
||||
// Split into name, in params, out params.
|
||||
f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$`).FindStringSubmatch(t)
|
||||
if f == nil {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
|
||||
os.Exit(1)
|
||||
}
|
||||
funct, inps, outps, sysname := f[2], f[3], f[4], f[5]
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
|
||||
// Try in vain to keep people from editing this file.
|
||||
// The theory is that they jump into the middle of the file
|
||||
// without reading the header.
|
||||
text += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
|
||||
// Go function header.
|
||||
outDecl := ""
|
||||
if len(out) > 0 {
|
||||
outDecl = fmt.Sprintf(" (%s)", strings.Join(out, ", "))
|
||||
}
|
||||
text += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outDecl)
|
||||
|
||||
// Check if err return available
|
||||
errvar := ""
|
||||
for _, param := range out {
|
||||
p := parseParam(param)
|
||||
if p.Type == "error" {
|
||||
errvar = p.Name
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare arguments to Syscall.
|
||||
var args []string
|
||||
n := 0
|
||||
for _, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
args = append(args, "uintptr(unsafe.Pointer("+p.Name+"))")
|
||||
} else if p.Type == "string" && errvar != "" {
|
||||
text += fmt.Sprintf("\tvar _p%d *byte\n", n)
|
||||
text += fmt.Sprintf("\t_p%d, %s = BytePtrFromString(%s)\n", n, errvar, p.Name)
|
||||
text += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
n++
|
||||
} else if p.Type == "string" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
|
||||
text += fmt.Sprintf("\tvar _p%d *byte\n", n)
|
||||
text += fmt.Sprintf("\t_p%d, _ = BytePtrFromString(%s)\n", n, p.Name)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
n++
|
||||
} else if regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type) != nil {
|
||||
// Convert slice into pointer, length.
|
||||
// Have to be careful not to take address of &a[0] if len == 0:
|
||||
// pass dummy pointer in that case.
|
||||
// Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
|
||||
text += fmt.Sprintf("\tvar _p%d unsafe.Pointer\n", n)
|
||||
text += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = unsafe.Pointer(&%s[0])\n\t}", p.Name, n, p.Name)
|
||||
text += fmt.Sprintf(" else {\n\t\t_p%d = unsafe.Pointer(&_zero)\n\t}\n", n)
|
||||
args = append(args, fmt.Sprintf("uintptr(_p%d)", n), fmt.Sprintf("uintptr(len(%s))", p.Name))
|
||||
n++
|
||||
} else if p.Type == "int64" && (*openbsd || *netbsd) {
|
||||
args = append(args, "0")
|
||||
if endianness == "big-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
} else if endianness == "little-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
}
|
||||
} else if p.Type == "int64" && *dragonfly {
|
||||
if regexp.MustCompile(`^(?i)extp(read|write)`).FindStringSubmatch(funct) == nil {
|
||||
args = append(args, "0")
|
||||
}
|
||||
if endianness == "big-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
} else if endianness == "little-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
}
|
||||
} else if p.Type == "int64" && endianness != "" {
|
||||
if len(args)%2 == 1 && *arm {
|
||||
// arm abi specifies 64-bit argument uses
|
||||
// (even, odd) pair
|
||||
args = append(args, "0")
|
||||
}
|
||||
if endianness == "big-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
|
||||
}
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
}
|
||||
}
|
||||
|
||||
// Determine which form to use; pad args with zeros.
|
||||
asm := "Syscall"
|
||||
if nonblock != nil {
|
||||
if errvar == "" && goos == "linux" {
|
||||
asm = "RawSyscallNoError"
|
||||
} else {
|
||||
asm = "RawSyscall"
|
||||
}
|
||||
} else {
|
||||
if errvar == "" && goos == "linux" {
|
||||
asm = "SyscallNoError"
|
||||
}
|
||||
}
|
||||
if len(args) <= 3 {
|
||||
for len(args) < 3 {
|
||||
args = append(args, "0")
|
||||
}
|
||||
} else if len(args) <= 6 {
|
||||
asm += "6"
|
||||
for len(args) < 6 {
|
||||
args = append(args, "0")
|
||||
}
|
||||
} else if len(args) <= 9 {
|
||||
asm += "9"
|
||||
for len(args) < 9 {
|
||||
args = append(args, "0")
|
||||
}
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s too many arguments to system call\n", path, funct)
|
||||
}
|
||||
|
||||
// System call number.
|
||||
if sysname == "" {
|
||||
sysname = "SYS_" + funct
|
||||
sysname = regexp.MustCompile(`([a-z])([A-Z])`).ReplaceAllString(sysname, `${1}_$2`)
|
||||
sysname = strings.ToUpper(sysname)
|
||||
}
|
||||
|
||||
var libcFn string
|
||||
if libc {
|
||||
asm = "syscall_" + strings.ToLower(asm[:1]) + asm[1:] // internal syscall call
|
||||
sysname = strings.TrimPrefix(sysname, "SYS_") // remove SYS_
|
||||
sysname = strings.ToLower(sysname) // lowercase
|
||||
if sysname == "getdirentries64" {
|
||||
// Special case - libSystem name and
|
||||
// raw syscall name don't match.
|
||||
sysname = "__getdirentries64"
|
||||
}
|
||||
libcFn = sysname
|
||||
sysname = "funcPC(libc_" + sysname + "_trampoline)"
|
||||
}
|
||||
|
||||
// Actual call.
|
||||
arglist := strings.Join(args, ", ")
|
||||
call := fmt.Sprintf("%s(%s, %s)", asm, sysname, arglist)
|
||||
|
||||
// Assign return values.
|
||||
body := ""
|
||||
ret := []string{"_", "_", "_"}
|
||||
doErrno := false
|
||||
for i := 0; i < len(out); i++ {
|
||||
p := parseParam(out[i])
|
||||
reg := ""
|
||||
if p.Name == "err" && !*plan9 {
|
||||
reg = "e1"
|
||||
ret[2] = reg
|
||||
doErrno = true
|
||||
} else if p.Name == "err" && *plan9 {
|
||||
ret[0] = "r0"
|
||||
ret[2] = "e1"
|
||||
break
|
||||
} else {
|
||||
reg = fmt.Sprintf("r%d", i)
|
||||
ret[i] = reg
|
||||
}
|
||||
if p.Type == "bool" {
|
||||
reg = fmt.Sprintf("%s != 0", reg)
|
||||
}
|
||||
if p.Type == "int64" && endianness != "" {
|
||||
// 64-bit number in r1:r0 or r0:r1.
|
||||
if i+2 > len(out) {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s not enough registers for int64 return\n", path, funct)
|
||||
}
|
||||
if endianness == "big-endian" {
|
||||
reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i, i+1)
|
||||
} else {
|
||||
reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i+1, i)
|
||||
}
|
||||
ret[i] = fmt.Sprintf("r%d", i)
|
||||
ret[i+1] = fmt.Sprintf("r%d", i+1)
|
||||
}
|
||||
if reg != "e1" || *plan9 {
|
||||
body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
|
||||
}
|
||||
}
|
||||
if ret[0] == "_" && ret[1] == "_" && ret[2] == "_" {
|
||||
text += fmt.Sprintf("\t%s\n", call)
|
||||
} else {
|
||||
if errvar == "" && goos == "linux" {
|
||||
// raw syscall without error on Linux, see golang.org/issue/22924
|
||||
text += fmt.Sprintf("\t%s, %s := %s\n", ret[0], ret[1], call)
|
||||
} else {
|
||||
text += fmt.Sprintf("\t%s, %s, %s := %s\n", ret[0], ret[1], ret[2], call)
|
||||
}
|
||||
}
|
||||
text += body
|
||||
|
||||
if *plan9 && ret[2] == "e1" {
|
||||
text += "\tif int32(r0) == -1 {\n"
|
||||
text += "\t\terr = e1\n"
|
||||
text += "\t}\n"
|
||||
} else if doErrno {
|
||||
text += "\tif e1 != 0 {\n"
|
||||
text += "\t\terr = errnoErr(e1)\n"
|
||||
text += "\t}\n"
|
||||
}
|
||||
text += "\treturn\n"
|
||||
text += "}\n\n"
|
||||
|
||||
if libc && !trampolines[libcFn] {
|
||||
// some system calls share a trampoline, like read and readlen.
|
||||
trampolines[libcFn] = true
|
||||
// Declare assembly trampoline.
|
||||
text += fmt.Sprintf("func libc_%s_trampoline()\n", libcFn)
|
||||
// Assembly trampoline calls the libc_* function, which this magic
|
||||
// redirects to use the function from libSystem.
|
||||
text += fmt.Sprintf("//go:linkname libc_%s libc_%s\n", libcFn, libcFn)
|
||||
text += fmt.Sprintf("//go:cgo_import_dynamic libc_%s %s \"/usr/lib/libSystem.B.dylib\"\n", libcFn, libcFn)
|
||||
text += "\n"
|
||||
}
|
||||
}
|
||||
if err := s.Err(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
fmt.Printf(srcTemplate, cmdLine(), buildTags(), text)
|
||||
}
|
||||
|
||||
const srcTemplate = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ syscall.Errno
|
||||
|
||||
%s
|
||||
`
|
404
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.go
generated
vendored
Normal file
404
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.go
generated
vendored
Normal file
@ -0,0 +1,404 @@
|
||||
// Copyright 2019 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 ignore
|
||||
|
||||
/*
|
||||
This program reads a file containing function prototypes
|
||||
(like syscall_aix.go) and generates system call bodies.
|
||||
The prototypes are marked by lines beginning with "//sys"
|
||||
and read like func declarations if //sys is replaced by func, but:
|
||||
* The parameter lists must give a name for each argument.
|
||||
This includes return parameters.
|
||||
* The parameter lists must give a type for each argument:
|
||||
the (x, y, z int) shorthand is not allowed.
|
||||
* If the return parameter is an error number, it must be named err.
|
||||
* If go func name needs to be different than its libc name,
|
||||
* or the function is not in libc, name could be specified
|
||||
* at the end, after "=" sign, like
|
||||
//sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
||||
*/
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
b32 = flag.Bool("b32", false, "32bit big-endian")
|
||||
l32 = flag.Bool("l32", false, "32bit little-endian")
|
||||
aix = flag.Bool("aix", false, "aix")
|
||||
tags = flag.String("tags", "", "build tags")
|
||||
)
|
||||
|
||||
// cmdLine returns this programs's commandline arguments
|
||||
func cmdLine() string {
|
||||
return "go run mksyscall_aix_ppc.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
func buildTags() string {
|
||||
return *tags
|
||||
}
|
||||
|
||||
// Param is function parameter
|
||||
type Param struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// usage prints the program usage
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: go run mksyscall_aix_ppc.go [-b32 | -l32] [-tags x,y] [file ...]\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// parseParamList parses parameter list and returns a slice of parameters
|
||||
func parseParamList(list string) []string {
|
||||
list = strings.TrimSpace(list)
|
||||
if list == "" {
|
||||
return []string{}
|
||||
}
|
||||
return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
|
||||
}
|
||||
|
||||
// parseParam splits a parameter into name and type
|
||||
func parseParam(p string) Param {
|
||||
ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
|
||||
if ps == nil {
|
||||
fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
|
||||
os.Exit(1)
|
||||
}
|
||||
return Param{ps[1], ps[2]}
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
if len(flag.Args()) <= 0 {
|
||||
fmt.Fprintf(os.Stderr, "no files to parse provided\n")
|
||||
usage()
|
||||
}
|
||||
|
||||
endianness := ""
|
||||
if *b32 {
|
||||
endianness = "big-endian"
|
||||
} else if *l32 {
|
||||
endianness = "little-endian"
|
||||
}
|
||||
|
||||
pack := ""
|
||||
text := ""
|
||||
cExtern := "/*\n#include <stdint.h>\n#include <stddef.h>\n"
|
||||
for _, path := range flag.Args() {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
s := bufio.NewScanner(file)
|
||||
for s.Scan() {
|
||||
t := s.Text()
|
||||
t = strings.TrimSpace(t)
|
||||
t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
|
||||
if p := regexp.MustCompile(`^package (\S+)$`).FindStringSubmatch(t); p != nil && pack == "" {
|
||||
pack = p[1]
|
||||
}
|
||||
nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
|
||||
if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Line must be of the form
|
||||
// func Open(path string, mode int, perm int) (fd int, err error)
|
||||
// Split into name, in params, out params.
|
||||
f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$`).FindStringSubmatch(t)
|
||||
if f == nil {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
|
||||
os.Exit(1)
|
||||
}
|
||||
funct, inps, outps, modname, sysname := f[2], f[3], f[4], f[5], f[6]
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
|
||||
inps = strings.Join(in, ", ")
|
||||
outps = strings.Join(out, ", ")
|
||||
|
||||
// Try in vain to keep people from editing this file.
|
||||
// The theory is that they jump into the middle of the file
|
||||
// without reading the header.
|
||||
text += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
|
||||
// Check if value return, err return available
|
||||
errvar := ""
|
||||
retvar := ""
|
||||
rettype := ""
|
||||
for _, param := range out {
|
||||
p := parseParam(param)
|
||||
if p.Type == "error" {
|
||||
errvar = p.Name
|
||||
} else {
|
||||
retvar = p.Name
|
||||
rettype = p.Type
|
||||
}
|
||||
}
|
||||
|
||||
// System call name.
|
||||
if sysname == "" {
|
||||
sysname = funct
|
||||
}
|
||||
sysname = regexp.MustCompile(`([a-z])([A-Z])`).ReplaceAllString(sysname, `${1}_$2`)
|
||||
sysname = strings.ToLower(sysname) // All libc functions are lowercase.
|
||||
|
||||
cRettype := ""
|
||||
if rettype == "unsafe.Pointer" {
|
||||
cRettype = "uintptr_t"
|
||||
} else if rettype == "uintptr" {
|
||||
cRettype = "uintptr_t"
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(rettype) != nil {
|
||||
cRettype = "uintptr_t"
|
||||
} else if rettype == "int" {
|
||||
cRettype = "int"
|
||||
} else if rettype == "int32" {
|
||||
cRettype = "int"
|
||||
} else if rettype == "int64" {
|
||||
cRettype = "long long"
|
||||
} else if rettype == "uint32" {
|
||||
cRettype = "unsigned int"
|
||||
} else if rettype == "uint64" {
|
||||
cRettype = "unsigned long long"
|
||||
} else {
|
||||
cRettype = "int"
|
||||
}
|
||||
if sysname == "exit" {
|
||||
cRettype = "void"
|
||||
}
|
||||
|
||||
// Change p.Types to c
|
||||
var cIn []string
|
||||
for _, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "string" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t", "size_t")
|
||||
} else if p.Type == "unsafe.Pointer" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "uintptr" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "int" {
|
||||
cIn = append(cIn, "int")
|
||||
} else if p.Type == "int32" {
|
||||
cIn = append(cIn, "int")
|
||||
} else if p.Type == "int64" {
|
||||
cIn = append(cIn, "long long")
|
||||
} else if p.Type == "uint32" {
|
||||
cIn = append(cIn, "unsigned int")
|
||||
} else if p.Type == "uint64" {
|
||||
cIn = append(cIn, "unsigned long long")
|
||||
} else {
|
||||
cIn = append(cIn, "int")
|
||||
}
|
||||
}
|
||||
|
||||
if funct != "fcntl" && funct != "FcntlInt" && funct != "readlen" && funct != "writelen" {
|
||||
// Imports of system calls from libc
|
||||
cExtern += fmt.Sprintf("%s %s", cRettype, sysname)
|
||||
cIn := strings.Join(cIn, ", ")
|
||||
cExtern += fmt.Sprintf("(%s);\n", cIn)
|
||||
}
|
||||
|
||||
// So file name.
|
||||
if *aix {
|
||||
if modname == "" {
|
||||
modname = "libc.a/shr_64.o"
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s: only syscall using libc are available\n", funct)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
strconvfunc := "C.CString"
|
||||
|
||||
// Go function header.
|
||||
if outps != "" {
|
||||
outps = fmt.Sprintf(" (%s)", outps)
|
||||
}
|
||||
if text != "" {
|
||||
text += "\n"
|
||||
}
|
||||
|
||||
text += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outps)
|
||||
|
||||
// Prepare arguments to Syscall.
|
||||
var args []string
|
||||
n := 0
|
||||
argN := 0
|
||||
for _, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
args = append(args, "C.uintptr_t(uintptr(unsafe.Pointer("+p.Name+")))")
|
||||
} else if p.Type == "string" && errvar != "" {
|
||||
text += fmt.Sprintf("\t_p%d := uintptr(unsafe.Pointer(%s(%s)))\n", n, strconvfunc, p.Name)
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(_p%d)", n))
|
||||
n++
|
||||
} else if p.Type == "string" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
|
||||
text += fmt.Sprintf("\t_p%d := uintptr(unsafe.Pointer(%s(%s)))\n", n, strconvfunc, p.Name)
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(_p%d)", n))
|
||||
n++
|
||||
} else if m := regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type); m != nil {
|
||||
// Convert slice into pointer, length.
|
||||
// Have to be careful not to take address of &a[0] if len == 0:
|
||||
// pass nil in that case.
|
||||
text += fmt.Sprintf("\tvar _p%d *%s\n", n, m[1])
|
||||
text += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = &%s[0]\n\t}\n", p.Name, n, p.Name)
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(uintptr(unsafe.Pointer(_p%d)))", n))
|
||||
n++
|
||||
text += fmt.Sprintf("\tvar _p%d int\n", n)
|
||||
text += fmt.Sprintf("\t_p%d = len(%s)\n", n, p.Name)
|
||||
args = append(args, fmt.Sprintf("C.size_t(_p%d)", n))
|
||||
n++
|
||||
} else if p.Type == "int64" && endianness != "" {
|
||||
if endianness == "big-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
|
||||
}
|
||||
n++
|
||||
} else if p.Type == "bool" {
|
||||
text += fmt.Sprintf("\tvar _p%d uint32\n", n)
|
||||
text += fmt.Sprintf("\tif %s {\n\t\t_p%d = 1\n\t} else {\n\t\t_p%d = 0\n\t}\n", p.Name, n, n)
|
||||
args = append(args, fmt.Sprintf("_p%d", n))
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil {
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(uintptr(%s))", p.Name))
|
||||
} else if p.Type == "unsafe.Pointer" {
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(uintptr(%s))", p.Name))
|
||||
} else if p.Type == "int" {
|
||||
if (argN == 2) && ((funct == "readlen") || (funct == "writelen")) {
|
||||
args = append(args, fmt.Sprintf("C.size_t(%s)", p.Name))
|
||||
} else if argN == 0 && funct == "fcntl" {
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else if (argN == 2) && ((funct == "fcntl") || (funct == "FcntlInt")) {
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
}
|
||||
} else if p.Type == "int32" {
|
||||
args = append(args, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
} else if p.Type == "int64" {
|
||||
args = append(args, fmt.Sprintf("C.longlong(%s)", p.Name))
|
||||
} else if p.Type == "uint32" {
|
||||
args = append(args, fmt.Sprintf("C.uint(%s)", p.Name))
|
||||
} else if p.Type == "uint64" {
|
||||
args = append(args, fmt.Sprintf("C.ulonglong(%s)", p.Name))
|
||||
} else if p.Type == "uintptr" {
|
||||
args = append(args, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
}
|
||||
argN++
|
||||
}
|
||||
|
||||
// Actual call.
|
||||
arglist := strings.Join(args, ", ")
|
||||
call := ""
|
||||
if sysname == "exit" {
|
||||
if errvar != "" {
|
||||
call += "er :="
|
||||
} else {
|
||||
call += ""
|
||||
}
|
||||
} else if errvar != "" {
|
||||
call += "r0,er :="
|
||||
} else if retvar != "" {
|
||||
call += "r0,_ :="
|
||||
} else {
|
||||
call += ""
|
||||
}
|
||||
call += fmt.Sprintf("C.%s(%s)", sysname, arglist)
|
||||
|
||||
// Assign return values.
|
||||
body := ""
|
||||
for i := 0; i < len(out); i++ {
|
||||
p := parseParam(out[i])
|
||||
reg := ""
|
||||
if p.Name == "err" {
|
||||
reg = "e1"
|
||||
} else {
|
||||
reg = "r0"
|
||||
}
|
||||
if reg != "e1" {
|
||||
body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
|
||||
}
|
||||
}
|
||||
|
||||
// verify return
|
||||
if sysname != "exit" && errvar != "" {
|
||||
if regexp.MustCompile(`^uintptr`).FindStringSubmatch(cRettype) != nil {
|
||||
body += "\tif (uintptr(r0) ==^uintptr(0) && er != nil) {\n"
|
||||
body += fmt.Sprintf("\t\t%s = er\n", errvar)
|
||||
body += "\t}\n"
|
||||
} else {
|
||||
body += "\tif (r0 ==-1 && er != nil) {\n"
|
||||
body += fmt.Sprintf("\t\t%s = er\n", errvar)
|
||||
body += "\t}\n"
|
||||
}
|
||||
} else if errvar != "" {
|
||||
body += "\tif (er != nil) {\n"
|
||||
body += fmt.Sprintf("\t\t%s = er\n", errvar)
|
||||
body += "\t}\n"
|
||||
}
|
||||
|
||||
text += fmt.Sprintf("\t%s\n", call)
|
||||
text += body
|
||||
|
||||
text += "\treturn\n"
|
||||
text += "}\n"
|
||||
}
|
||||
if err := s.Err(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
imp := ""
|
||||
if pack != "unix" {
|
||||
imp = "import \"golang.org/x/sys/unix\"\n"
|
||||
|
||||
}
|
||||
fmt.Printf(srcTemplate, cmdLine(), buildTags(), pack, cExtern, imp, text)
|
||||
}
|
||||
|
||||
const srcTemplate = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
|
||||
package %s
|
||||
|
||||
|
||||
%s
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
||||
%s
|
||||
|
||||
%s
|
||||
`
|
602
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.go
generated
vendored
Normal file
602
vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.go
generated
vendored
Normal file
@ -0,0 +1,602 @@
|
||||
// Copyright 2019 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 ignore
|
||||
|
||||
/*
|
||||
This program reads a file containing function prototypes
|
||||
(like syscall_aix.go) and generates system call bodies.
|
||||
The prototypes are marked by lines beginning with "//sys"
|
||||
and read like func declarations if //sys is replaced by func, but:
|
||||
* The parameter lists must give a name for each argument.
|
||||
This includes return parameters.
|
||||
* The parameter lists must give a type for each argument:
|
||||
the (x, y, z int) shorthand is not allowed.
|
||||
* If the return parameter is an error number, it must be named err.
|
||||
* If go func name needs to be different than its libc name,
|
||||
* or the function is not in libc, name could be specified
|
||||
* at the end, after "=" sign, like
|
||||
//sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
||||
|
||||
|
||||
This program will generate three files and handle both gc and gccgo implementation:
|
||||
- zsyscall_aix_ppc64.go: the common part of each implementation (error handler, pointer creation)
|
||||
- zsyscall_aix_ppc64_gc.go: gc part with //go_cgo_import_dynamic and a call to syscall6
|
||||
- zsyscall_aix_ppc64_gccgo.go: gccgo part with C function and conversion to C type.
|
||||
|
||||
The generated code looks like this
|
||||
|
||||
zsyscall_aix_ppc64.go
|
||||
func asyscall(...) (n int, err error) {
|
||||
// Pointer Creation
|
||||
r1, e1 := callasyscall(...)
|
||||
// Type Conversion
|
||||
// Error Handler
|
||||
return
|
||||
}
|
||||
|
||||
zsyscall_aix_ppc64_gc.go
|
||||
//go:cgo_import_dynamic libc_asyscall asyscall "libc.a/shr_64.o"
|
||||
//go:linkname libc_asyscall libc_asyscall
|
||||
var asyscall syscallFunc
|
||||
|
||||
func callasyscall(...) (r1 uintptr, e1 Errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_asyscall)), "nb_args", ... )
|
||||
return
|
||||
}
|
||||
|
||||
zsyscall_aix_ppc64_ggcgo.go
|
||||
|
||||
// int asyscall(...)
|
||||
|
||||
import "C"
|
||||
|
||||
func callasyscall(...) (r1 uintptr, e1 Errno) {
|
||||
r1 = uintptr(C.asyscall(...))
|
||||
e1 = syscall.GetErrno()
|
||||
return
|
||||
}
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
b32 = flag.Bool("b32", false, "32bit big-endian")
|
||||
l32 = flag.Bool("l32", false, "32bit little-endian")
|
||||
aix = flag.Bool("aix", false, "aix")
|
||||
tags = flag.String("tags", "", "build tags")
|
||||
)
|
||||
|
||||
// cmdLine returns this programs's commandline arguments
|
||||
func cmdLine() string {
|
||||
return "go run mksyscall_aix_ppc64.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
func buildTags() string {
|
||||
return *tags
|
||||
}
|
||||
|
||||
// Param is function parameter
|
||||
type Param struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// usage prints the program usage
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: go run mksyscall_aix_ppc64.go [-b32 | -l32] [-tags x,y] [file ...]\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// parseParamList parses parameter list and returns a slice of parameters
|
||||
func parseParamList(list string) []string {
|
||||
list = strings.TrimSpace(list)
|
||||
if list == "" {
|
||||
return []string{}
|
||||
}
|
||||
return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
|
||||
}
|
||||
|
||||
// parseParam splits a parameter into name and type
|
||||
func parseParam(p string) Param {
|
||||
ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
|
||||
if ps == nil {
|
||||
fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
|
||||
os.Exit(1)
|
||||
}
|
||||
return Param{ps[1], ps[2]}
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
if len(flag.Args()) <= 0 {
|
||||
fmt.Fprintf(os.Stderr, "no files to parse provided\n")
|
||||
usage()
|
||||
}
|
||||
|
||||
endianness := ""
|
||||
if *b32 {
|
||||
endianness = "big-endian"
|
||||
} else if *l32 {
|
||||
endianness = "little-endian"
|
||||
}
|
||||
|
||||
pack := ""
|
||||
// GCCGO
|
||||
textgccgo := ""
|
||||
cExtern := "/*\n#include <stdint.h>\n"
|
||||
// GC
|
||||
textgc := ""
|
||||
dynimports := ""
|
||||
linknames := ""
|
||||
var vars []string
|
||||
// COMMON
|
||||
textcommon := ""
|
||||
for _, path := range flag.Args() {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
s := bufio.NewScanner(file)
|
||||
for s.Scan() {
|
||||
t := s.Text()
|
||||
t = strings.TrimSpace(t)
|
||||
t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
|
||||
if p := regexp.MustCompile(`^package (\S+)$`).FindStringSubmatch(t); p != nil && pack == "" {
|
||||
pack = p[1]
|
||||
}
|
||||
nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
|
||||
if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Line must be of the form
|
||||
// func Open(path string, mode int, perm int) (fd int, err error)
|
||||
// Split into name, in params, out params.
|
||||
f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$`).FindStringSubmatch(t)
|
||||
if f == nil {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
|
||||
os.Exit(1)
|
||||
}
|
||||
funct, inps, outps, modname, sysname := f[2], f[3], f[4], f[5], f[6]
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
|
||||
inps = strings.Join(in, ", ")
|
||||
outps = strings.Join(out, ", ")
|
||||
|
||||
if sysname == "" {
|
||||
sysname = funct
|
||||
}
|
||||
|
||||
onlyCommon := false
|
||||
if funct == "readlen" || funct == "writelen" || funct == "FcntlInt" || funct == "FcntlFlock" {
|
||||
// This function call another syscall which is already implemented.
|
||||
// Therefore, the gc and gccgo part must not be generated.
|
||||
onlyCommon = true
|
||||
}
|
||||
|
||||
// Try in vain to keep people from editing this file.
|
||||
// The theory is that they jump into the middle of the file
|
||||
// without reading the header.
|
||||
|
||||
textcommon += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
if !onlyCommon {
|
||||
textgccgo += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
textgc += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
}
|
||||
|
||||
// Check if value return, err return available
|
||||
errvar := ""
|
||||
rettype := ""
|
||||
for _, param := range out {
|
||||
p := parseParam(param)
|
||||
if p.Type == "error" {
|
||||
errvar = p.Name
|
||||
} else {
|
||||
rettype = p.Type
|
||||
}
|
||||
}
|
||||
|
||||
sysname = regexp.MustCompile(`([a-z])([A-Z])`).ReplaceAllString(sysname, `${1}_$2`)
|
||||
sysname = strings.ToLower(sysname) // All libc functions are lowercase.
|
||||
|
||||
// GCCGO Prototype return type
|
||||
cRettype := ""
|
||||
if rettype == "unsafe.Pointer" {
|
||||
cRettype = "uintptr_t"
|
||||
} else if rettype == "uintptr" {
|
||||
cRettype = "uintptr_t"
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(rettype) != nil {
|
||||
cRettype = "uintptr_t"
|
||||
} else if rettype == "int" {
|
||||
cRettype = "int"
|
||||
} else if rettype == "int32" {
|
||||
cRettype = "int"
|
||||
} else if rettype == "int64" {
|
||||
cRettype = "long long"
|
||||
} else if rettype == "uint32" {
|
||||
cRettype = "unsigned int"
|
||||
} else if rettype == "uint64" {
|
||||
cRettype = "unsigned long long"
|
||||
} else {
|
||||
cRettype = "int"
|
||||
}
|
||||
if sysname == "exit" {
|
||||
cRettype = "void"
|
||||
}
|
||||
|
||||
// GCCGO Prototype arguments type
|
||||
var cIn []string
|
||||
for i, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "string" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t", "size_t")
|
||||
} else if p.Type == "unsafe.Pointer" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "uintptr" {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil {
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else if p.Type == "int" {
|
||||
if (i == 0 || i == 2) && funct == "fcntl" {
|
||||
// These fcntl arguments needs to be uintptr to be able to call FcntlInt and FcntlFlock
|
||||
cIn = append(cIn, "uintptr_t")
|
||||
} else {
|
||||
cIn = append(cIn, "int")
|
||||
}
|
||||
|
||||
} else if p.Type == "int32" {
|
||||
cIn = append(cIn, "int")
|
||||
} else if p.Type == "int64" {
|
||||
cIn = append(cIn, "long long")
|
||||
} else if p.Type == "uint32" {
|
||||
cIn = append(cIn, "unsigned int")
|
||||
} else if p.Type == "uint64" {
|
||||
cIn = append(cIn, "unsigned long long")
|
||||
} else {
|
||||
cIn = append(cIn, "int")
|
||||
}
|
||||
}
|
||||
|
||||
if !onlyCommon {
|
||||
// GCCGO Prototype Generation
|
||||
// Imports of system calls from libc
|
||||
cExtern += fmt.Sprintf("%s %s", cRettype, sysname)
|
||||
cIn := strings.Join(cIn, ", ")
|
||||
cExtern += fmt.Sprintf("(%s);\n", cIn)
|
||||
}
|
||||
// GC Library name
|
||||
if modname == "" {
|
||||
modname = "libc.a/shr_64.o"
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s: only syscall using libc are available\n", funct)
|
||||
os.Exit(1)
|
||||
}
|
||||
sysvarname := fmt.Sprintf("libc_%s", sysname)
|
||||
|
||||
if !onlyCommon {
|
||||
// GC Runtime import of function to allow cross-platform builds.
|
||||
dynimports += fmt.Sprintf("//go:cgo_import_dynamic %s %s \"%s\"\n", sysvarname, sysname, modname)
|
||||
// GC Link symbol to proc address variable.
|
||||
linknames += fmt.Sprintf("//go:linkname %s %s\n", sysvarname, sysvarname)
|
||||
// GC Library proc address variable.
|
||||
vars = append(vars, sysvarname)
|
||||
}
|
||||
|
||||
strconvfunc := "BytePtrFromString"
|
||||
strconvtype := "*byte"
|
||||
|
||||
// Go function header.
|
||||
if outps != "" {
|
||||
outps = fmt.Sprintf(" (%s)", outps)
|
||||
}
|
||||
if textcommon != "" {
|
||||
textcommon += "\n"
|
||||
}
|
||||
|
||||
textcommon += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outps)
|
||||
|
||||
// Prepare arguments tocall.
|
||||
var argscommon []string // Arguments in the common part
|
||||
var argscall []string // Arguments for call prototype
|
||||
var argsgc []string // Arguments for gc call (with syscall6)
|
||||
var argsgccgo []string // Arguments for gccgo call (with C.name_of_syscall)
|
||||
n := 0
|
||||
argN := 0
|
||||
for _, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(%s))", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else if p.Type == "string" && errvar != "" {
|
||||
textcommon += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
textcommon += fmt.Sprintf("\t_p%d, %s = %s(%s)\n", n, errvar, strconvfunc, p.Name)
|
||||
textcommon += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
|
||||
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
argscall = append(argscall, fmt.Sprintf("_p%d uintptr ", n))
|
||||
argsgc = append(argsgc, fmt.Sprintf("_p%d", n))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(_p%d)", n))
|
||||
n++
|
||||
} else if p.Type == "string" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
|
||||
textcommon += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
textcommon += fmt.Sprintf("\t_p%d, %s = %s(%s)\n", n, errvar, strconvfunc, p.Name)
|
||||
textcommon += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
|
||||
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
argscall = append(argscall, fmt.Sprintf("_p%d uintptr", n))
|
||||
argsgc = append(argsgc, fmt.Sprintf("_p%d", n))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(_p%d)", n))
|
||||
n++
|
||||
} else if m := regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type); m != nil {
|
||||
// Convert slice into pointer, length.
|
||||
// Have to be careful not to take address of &a[0] if len == 0:
|
||||
// pass nil in that case.
|
||||
textcommon += fmt.Sprintf("\tvar _p%d *%s\n", n, m[1])
|
||||
textcommon += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = &%s[0]\n\t}\n", p.Name, n, p.Name)
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n), fmt.Sprintf("len(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("_p%d uintptr", n), fmt.Sprintf("_lenp%d int", n))
|
||||
argsgc = append(argsgc, fmt.Sprintf("_p%d", n), fmt.Sprintf("uintptr(_lenp%d)", n))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(_p%d)", n), fmt.Sprintf("C.size_t(_lenp%d)", n))
|
||||
n++
|
||||
} else if p.Type == "int64" && endianness != "" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses int64 with 32 bits mode. Case not yet implemented\n")
|
||||
} else if p.Type == "bool" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses bool. Case not yet implemented\n")
|
||||
} else if regexp.MustCompile(`^_`).FindStringSubmatch(p.Type) != nil || p.Type == "unsafe.Pointer" {
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else if p.Type == "int" {
|
||||
if (argN == 0 || argN == 2) && ((funct == "fcntl") || (funct == "FcntlInt") || (funct == "FcntlFlock")) {
|
||||
// These fcntl arguments need to be uintptr to be able to call FcntlInt and FcntlFlock
|
||||
argscommon = append(argscommon, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
|
||||
} else {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s int", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
}
|
||||
} else if p.Type == "int32" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s int32", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
} else if p.Type == "int64" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s int64", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.longlong(%s)", p.Name))
|
||||
} else if p.Type == "uint32" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s uint32", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uint(%s)", p.Name))
|
||||
} else if p.Type == "uint64" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s uint64", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.ulonglong(%s)", p.Name))
|
||||
} else if p.Type == "uintptr" {
|
||||
argscommon = append(argscommon, p.Name)
|
||||
argscall = append(argscall, fmt.Sprintf("%s uintptr", p.Name))
|
||||
argsgc = append(argsgc, p.Name)
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.uintptr_t(%s)", p.Name))
|
||||
} else {
|
||||
argscommon = append(argscommon, fmt.Sprintf("int(%s)", p.Name))
|
||||
argscall = append(argscall, fmt.Sprintf("%s int", p.Name))
|
||||
argsgc = append(argsgc, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
argsgccgo = append(argsgccgo, fmt.Sprintf("C.int(%s)", p.Name))
|
||||
}
|
||||
argN++
|
||||
}
|
||||
nargs := len(argsgc)
|
||||
|
||||
// COMMON function generation
|
||||
argscommonlist := strings.Join(argscommon, ", ")
|
||||
callcommon := fmt.Sprintf("call%s(%s)", sysname, argscommonlist)
|
||||
ret := []string{"_", "_"}
|
||||
body := ""
|
||||
doErrno := false
|
||||
for i := 0; i < len(out); i++ {
|
||||
p := parseParam(out[i])
|
||||
reg := ""
|
||||
if p.Name == "err" {
|
||||
reg = "e1"
|
||||
ret[1] = reg
|
||||
doErrno = true
|
||||
} else {
|
||||
reg = "r0"
|
||||
ret[0] = reg
|
||||
}
|
||||
if p.Type == "bool" {
|
||||
reg = fmt.Sprintf("%s != 0", reg)
|
||||
}
|
||||
if reg != "e1" {
|
||||
body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
|
||||
}
|
||||
}
|
||||
if ret[0] == "_" && ret[1] == "_" {
|
||||
textcommon += fmt.Sprintf("\t%s\n", callcommon)
|
||||
} else {
|
||||
textcommon += fmt.Sprintf("\t%s, %s := %s\n", ret[0], ret[1], callcommon)
|
||||
}
|
||||
textcommon += body
|
||||
|
||||
if doErrno {
|
||||
textcommon += "\tif e1 != 0 {\n"
|
||||
textcommon += "\t\terr = errnoErr(e1)\n"
|
||||
textcommon += "\t}\n"
|
||||
}
|
||||
textcommon += "\treturn\n"
|
||||
textcommon += "}\n"
|
||||
|
||||
if onlyCommon {
|
||||
continue
|
||||
}
|
||||
|
||||
// CALL Prototype
|
||||
callProto := fmt.Sprintf("func call%s(%s) (r1 uintptr, e1 Errno) {\n", sysname, strings.Join(argscall, ", "))
|
||||
|
||||
// GC function generation
|
||||
asm := "syscall6"
|
||||
if nonblock != nil {
|
||||
asm = "rawSyscall6"
|
||||
}
|
||||
|
||||
if len(argsgc) <= 6 {
|
||||
for len(argsgc) < 6 {
|
||||
argsgc = append(argsgc, "0")
|
||||
}
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s: too many arguments to system call", funct)
|
||||
os.Exit(1)
|
||||
}
|
||||
argsgclist := strings.Join(argsgc, ", ")
|
||||
callgc := fmt.Sprintf("%s(uintptr(unsafe.Pointer(&%s)), %d, %s)", asm, sysvarname, nargs, argsgclist)
|
||||
|
||||
textgc += callProto
|
||||
textgc += fmt.Sprintf("\tr1, _, e1 = %s\n", callgc)
|
||||
textgc += "\treturn\n}\n"
|
||||
|
||||
// GCCGO function generation
|
||||
argsgccgolist := strings.Join(argsgccgo, ", ")
|
||||
callgccgo := fmt.Sprintf("C.%s(%s)", sysname, argsgccgolist)
|
||||
textgccgo += callProto
|
||||
textgccgo += fmt.Sprintf("\tr1 = uintptr(%s)\n", callgccgo)
|
||||
textgccgo += "\te1 = syscall.GetErrno()\n"
|
||||
textgccgo += "\treturn\n}\n"
|
||||
}
|
||||
if err := s.Err(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
imp := ""
|
||||
if pack != "unix" {
|
||||
imp = "import \"golang.org/x/sys/unix\"\n"
|
||||
|
||||
}
|
||||
|
||||
// Print zsyscall_aix_ppc64.go
|
||||
err := ioutil.WriteFile("zsyscall_aix_ppc64.go",
|
||||
[]byte(fmt.Sprintf(srcTemplate1, cmdLine(), buildTags(), pack, imp, textcommon)),
|
||||
0644)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Print zsyscall_aix_ppc64_gc.go
|
||||
vardecls := "\t" + strings.Join(vars, ",\n\t")
|
||||
vardecls += " syscallFunc"
|
||||
err = ioutil.WriteFile("zsyscall_aix_ppc64_gc.go",
|
||||
[]byte(fmt.Sprintf(srcTemplate2, cmdLine(), buildTags(), pack, imp, dynimports, linknames, vardecls, textgc)),
|
||||
0644)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Print zsyscall_aix_ppc64_gccgo.go
|
||||
err = ioutil.WriteFile("zsyscall_aix_ppc64_gccgo.go",
|
||||
[]byte(fmt.Sprintf(srcTemplate3, cmdLine(), buildTags(), pack, cExtern, imp, textgccgo)),
|
||||
0644)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
const srcTemplate1 = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
|
||||
package %s
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
||||
%s
|
||||
|
||||
%s
|
||||
`
|
||||
const srcTemplate2 = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
// +build !gccgo
|
||||
|
||||
package %s
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
type syscallFunc uintptr
|
||||
|
||||
var (
|
||||
%s
|
||||
)
|
||||
|
||||
// Implemented in runtime/syscall_aix.go.
|
||||
func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
|
||||
%s
|
||||
`
|
||||
const srcTemplate3 = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
// +build gccgo
|
||||
|
||||
package %s
|
||||
|
||||
%s
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
||||
%s
|
||||
|
||||
%s
|
||||
`
|
335
vendor/golang.org/x/sys/unix/mksyscall_solaris.go
generated
vendored
Normal file
335
vendor/golang.org/x/sys/unix/mksyscall_solaris.go
generated
vendored
Normal file
@ -0,0 +1,335 @@
|
||||
// Copyright 2019 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 ignore
|
||||
|
||||
/*
|
||||
This program reads a file containing function prototypes
|
||||
(like syscall_solaris.go) and generates system call bodies.
|
||||
The prototypes are marked by lines beginning with "//sys"
|
||||
and read like func declarations if //sys is replaced by func, but:
|
||||
* The parameter lists must give a name for each argument.
|
||||
This includes return parameters.
|
||||
* The parameter lists must give a type for each argument:
|
||||
the (x, y, z int) shorthand is not allowed.
|
||||
* If the return parameter is an error number, it must be named err.
|
||||
* If go func name needs to be different than its libc name,
|
||||
* or the function is not in libc, name could be specified
|
||||
* at the end, after "=" sign, like
|
||||
//sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
b32 = flag.Bool("b32", false, "32bit big-endian")
|
||||
l32 = flag.Bool("l32", false, "32bit little-endian")
|
||||
tags = flag.String("tags", "", "build tags")
|
||||
)
|
||||
|
||||
// cmdLine returns this programs's commandline arguments
|
||||
func cmdLine() string {
|
||||
return "go run mksyscall_solaris.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
func buildTags() string {
|
||||
return *tags
|
||||
}
|
||||
|
||||
// Param is function parameter
|
||||
type Param struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// usage prints the program usage
|
||||
func usage() {
|
||||
fmt.Fprintf(os.Stderr, "usage: go run mksyscall_solaris.go [-b32 | -l32] [-tags x,y] [file ...]\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// parseParamList parses parameter list and returns a slice of parameters
|
||||
func parseParamList(list string) []string {
|
||||
list = strings.TrimSpace(list)
|
||||
if list == "" {
|
||||
return []string{}
|
||||
}
|
||||
return regexp.MustCompile(`\s*,\s*`).Split(list, -1)
|
||||
}
|
||||
|
||||
// parseParam splits a parameter into name and type
|
||||
func parseParam(p string) Param {
|
||||
ps := regexp.MustCompile(`^(\S*) (\S*)$`).FindStringSubmatch(p)
|
||||
if ps == nil {
|
||||
fmt.Fprintf(os.Stderr, "malformed parameter: %s\n", p)
|
||||
os.Exit(1)
|
||||
}
|
||||
return Param{ps[1], ps[2]}
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
if len(flag.Args()) <= 0 {
|
||||
fmt.Fprintf(os.Stderr, "no files to parse provided\n")
|
||||
usage()
|
||||
}
|
||||
|
||||
endianness := ""
|
||||
if *b32 {
|
||||
endianness = "big-endian"
|
||||
} else if *l32 {
|
||||
endianness = "little-endian"
|
||||
}
|
||||
|
||||
pack := ""
|
||||
text := ""
|
||||
dynimports := ""
|
||||
linknames := ""
|
||||
var vars []string
|
||||
for _, path := range flag.Args() {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
s := bufio.NewScanner(file)
|
||||
for s.Scan() {
|
||||
t := s.Text()
|
||||
t = strings.TrimSpace(t)
|
||||
t = regexp.MustCompile(`\s+`).ReplaceAllString(t, ` `)
|
||||
if p := regexp.MustCompile(`^package (\S+)$`).FindStringSubmatch(t); p != nil && pack == "" {
|
||||
pack = p[1]
|
||||
}
|
||||
nonblock := regexp.MustCompile(`^\/\/sysnb `).FindStringSubmatch(t)
|
||||
if regexp.MustCompile(`^\/\/sys `).FindStringSubmatch(t) == nil && nonblock == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Line must be of the form
|
||||
// func Open(path string, mode int, perm int) (fd int, err error)
|
||||
// Split into name, in params, out params.
|
||||
f := regexp.MustCompile(`^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$`).FindStringSubmatch(t)
|
||||
if f == nil {
|
||||
fmt.Fprintf(os.Stderr, "%s:%s\nmalformed //sys declaration\n", path, t)
|
||||
os.Exit(1)
|
||||
}
|
||||
funct, inps, outps, modname, sysname := f[2], f[3], f[4], f[5], f[6]
|
||||
|
||||
// Split argument lists on comma.
|
||||
in := parseParamList(inps)
|
||||
out := parseParamList(outps)
|
||||
|
||||
inps = strings.Join(in, ", ")
|
||||
outps = strings.Join(out, ", ")
|
||||
|
||||
// Try in vain to keep people from editing this file.
|
||||
// The theory is that they jump into the middle of the file
|
||||
// without reading the header.
|
||||
text += "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"
|
||||
|
||||
// So file name.
|
||||
if modname == "" {
|
||||
modname = "libc"
|
||||
}
|
||||
|
||||
// System call name.
|
||||
if sysname == "" {
|
||||
sysname = funct
|
||||
}
|
||||
|
||||
// System call pointer variable name.
|
||||
sysvarname := fmt.Sprintf("proc%s", sysname)
|
||||
|
||||
strconvfunc := "BytePtrFromString"
|
||||
strconvtype := "*byte"
|
||||
|
||||
sysname = strings.ToLower(sysname) // All libc functions are lowercase.
|
||||
|
||||
// Runtime import of function to allow cross-platform builds.
|
||||
dynimports += fmt.Sprintf("//go:cgo_import_dynamic libc_%s %s \"%s.so\"\n", sysname, sysname, modname)
|
||||
// Link symbol to proc address variable.
|
||||
linknames += fmt.Sprintf("//go:linkname %s libc_%s\n", sysvarname, sysname)
|
||||
// Library proc address variable.
|
||||
vars = append(vars, sysvarname)
|
||||
|
||||
// Go function header.
|
||||
outlist := strings.Join(out, ", ")
|
||||
if outlist != "" {
|
||||
outlist = fmt.Sprintf(" (%s)", outlist)
|
||||
}
|
||||
if text != "" {
|
||||
text += "\n"
|
||||
}
|
||||
text += fmt.Sprintf("func %s(%s)%s {\n", funct, strings.Join(in, ", "), outlist)
|
||||
|
||||
// Check if err return available
|
||||
errvar := ""
|
||||
for _, param := range out {
|
||||
p := parseParam(param)
|
||||
if p.Type == "error" {
|
||||
errvar = p.Name
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare arguments to Syscall.
|
||||
var args []string
|
||||
n := 0
|
||||
for _, param := range in {
|
||||
p := parseParam(param)
|
||||
if regexp.MustCompile(`^\*`).FindStringSubmatch(p.Type) != nil {
|
||||
args = append(args, "uintptr(unsafe.Pointer("+p.Name+"))")
|
||||
} else if p.Type == "string" && errvar != "" {
|
||||
text += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
text += fmt.Sprintf("\t_p%d, %s = %s(%s)\n", n, errvar, strconvfunc, p.Name)
|
||||
text += fmt.Sprintf("\tif %s != nil {\n\t\treturn\n\t}\n", errvar)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
n++
|
||||
} else if p.Type == "string" {
|
||||
fmt.Fprintf(os.Stderr, path+":"+funct+" uses string arguments, but has no error return\n")
|
||||
text += fmt.Sprintf("\tvar _p%d %s\n", n, strconvtype)
|
||||
text += fmt.Sprintf("\t_p%d, _ = %s(%s)\n", n, strconvfunc, p.Name)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n))
|
||||
n++
|
||||
} else if s := regexp.MustCompile(`^\[\](.*)`).FindStringSubmatch(p.Type); s != nil {
|
||||
// Convert slice into pointer, length.
|
||||
// Have to be careful not to take address of &a[0] if len == 0:
|
||||
// pass nil in that case.
|
||||
text += fmt.Sprintf("\tvar _p%d *%s\n", n, s[1])
|
||||
text += fmt.Sprintf("\tif len(%s) > 0 {\n\t\t_p%d = &%s[0]\n\t}\n", p.Name, n, p.Name)
|
||||
args = append(args, fmt.Sprintf("uintptr(unsafe.Pointer(_p%d))", n), fmt.Sprintf("uintptr(len(%s))", p.Name))
|
||||
n++
|
||||
} else if p.Type == "int64" && endianness != "" {
|
||||
if endianness == "big-endian" {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s>>32)", p.Name), fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name), fmt.Sprintf("uintptr(%s>>32)", p.Name))
|
||||
}
|
||||
} else if p.Type == "bool" {
|
||||
text += fmt.Sprintf("\tvar _p%d uint32\n", n)
|
||||
text += fmt.Sprintf("\tif %s {\n\t\t_p%d = 1\n\t} else {\n\t\t_p%d = 0\n\t}\n", p.Name, n, n)
|
||||
args = append(args, fmt.Sprintf("uintptr(_p%d)", n))
|
||||
n++
|
||||
} else {
|
||||
args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
|
||||
}
|
||||
}
|
||||
nargs := len(args)
|
||||
|
||||
// Determine which form to use; pad args with zeros.
|
||||
asm := "sysvicall6"
|
||||
if nonblock != nil {
|
||||
asm = "rawSysvicall6"
|
||||
}
|
||||
if len(args) <= 6 {
|
||||
for len(args) < 6 {
|
||||
args = append(args, "0")
|
||||
}
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "%s: too many arguments to system call\n", path)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Actual call.
|
||||
arglist := strings.Join(args, ", ")
|
||||
call := fmt.Sprintf("%s(uintptr(unsafe.Pointer(&%s)), %d, %s)", asm, sysvarname, nargs, arglist)
|
||||
|
||||
// Assign return values.
|
||||
body := ""
|
||||
ret := []string{"_", "_", "_"}
|
||||
doErrno := false
|
||||
for i := 0; i < len(out); i++ {
|
||||
p := parseParam(out[i])
|
||||
reg := ""
|
||||
if p.Name == "err" {
|
||||
reg = "e1"
|
||||
ret[2] = reg
|
||||
doErrno = true
|
||||
} else {
|
||||
reg = fmt.Sprintf("r%d", i)
|
||||
ret[i] = reg
|
||||
}
|
||||
if p.Type == "bool" {
|
||||
reg = fmt.Sprintf("%d != 0", reg)
|
||||
}
|
||||
if p.Type == "int64" && endianness != "" {
|
||||
// 64-bit number in r1:r0 or r0:r1.
|
||||
if i+2 > len(out) {
|
||||
fmt.Fprintf(os.Stderr, "%s: not enough registers for int64 return\n", path)
|
||||
os.Exit(1)
|
||||
}
|
||||
if endianness == "big-endian" {
|
||||
reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i, i+1)
|
||||
} else {
|
||||
reg = fmt.Sprintf("int64(r%d)<<32 | int64(r%d)", i+1, i)
|
||||
}
|
||||
ret[i] = fmt.Sprintf("r%d", i)
|
||||
ret[i+1] = fmt.Sprintf("r%d", i+1)
|
||||
}
|
||||
if reg != "e1" {
|
||||
body += fmt.Sprintf("\t%s = %s(%s)\n", p.Name, p.Type, reg)
|
||||
}
|
||||
}
|
||||
if ret[0] == "_" && ret[1] == "_" && ret[2] == "_" {
|
||||
text += fmt.Sprintf("\t%s\n", call)
|
||||
} else {
|
||||
text += fmt.Sprintf("\t%s, %s, %s := %s\n", ret[0], ret[1], ret[2], call)
|
||||
}
|
||||
text += body
|
||||
|
||||
if doErrno {
|
||||
text += "\tif e1 != 0 {\n"
|
||||
text += "\t\terr = e1\n"
|
||||
text += "\t}\n"
|
||||
}
|
||||
text += "\treturn\n"
|
||||
text += "}\n"
|
||||
}
|
||||
if err := s.Err(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
file.Close()
|
||||
}
|
||||
imp := ""
|
||||
if pack != "unix" {
|
||||
imp = "import \"golang.org/x/sys/unix\"\n"
|
||||
|
||||
}
|
||||
vardecls := "\t" + strings.Join(vars, ",\n\t")
|
||||
vardecls += " syscallFunc"
|
||||
fmt.Printf(srcTemplate, cmdLine(), buildTags(), pack, imp, dynimports, linknames, vardecls, text)
|
||||
}
|
||||
|
||||
const srcTemplate = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
|
||||
package %s
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
var (
|
||||
%s
|
||||
)
|
||||
|
||||
%s
|
||||
`
|
190
vendor/golang.org/x/sys/unix/mksysnum.go
generated
vendored
Normal file
190
vendor/golang.org/x/sys/unix/mksysnum.go
generated
vendored
Normal file
@ -0,0 +1,190 @@
|
||||
// Copyright 2018 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 ignore
|
||||
|
||||
// Generate system call table for DragonFly, NetBSD,
|
||||
// FreeBSD, OpenBSD or Darwin from master list
|
||||
// (for example, /usr/src/sys/kern/syscalls.master or
|
||||
// sys/syscall.h).
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
goos, goarch string
|
||||
)
|
||||
|
||||
// cmdLine returns this programs's commandline arguments
|
||||
func cmdLine() string {
|
||||
return "go run mksysnum.go " + strings.Join(os.Args[1:], " ")
|
||||
}
|
||||
|
||||
// buildTags returns build tags
|
||||
func buildTags() string {
|
||||
return fmt.Sprintf("%s,%s", goarch, goos)
|
||||
}
|
||||
|
||||
func checkErr(err error) {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// source string and substring slice for regexp
|
||||
type re struct {
|
||||
str string // source string
|
||||
sub []string // matched sub-string
|
||||
}
|
||||
|
||||
// Match performs regular expression match
|
||||
func (r *re) Match(exp string) bool {
|
||||
r.sub = regexp.MustCompile(exp).FindStringSubmatch(r.str)
|
||||
if r.sub != nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// fetchFile fetches a text file from URL
|
||||
func fetchFile(URL string) io.Reader {
|
||||
resp, err := http.Get(URL)
|
||||
checkErr(err)
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
checkErr(err)
|
||||
return strings.NewReader(string(body))
|
||||
}
|
||||
|
||||
// readFile reads a text file from path
|
||||
func readFile(path string) io.Reader {
|
||||
file, err := os.Open(os.Args[1])
|
||||
checkErr(err)
|
||||
return file
|
||||
}
|
||||
|
||||
func format(name, num, proto string) string {
|
||||
name = strings.ToUpper(name)
|
||||
// There are multiple entries for enosys and nosys, so comment them out.
|
||||
nm := re{str: name}
|
||||
if nm.Match(`^SYS_E?NOSYS$`) {
|
||||
name = fmt.Sprintf("// %s", name)
|
||||
}
|
||||
if name == `SYS_SYS_EXIT` {
|
||||
name = `SYS_EXIT`
|
||||
}
|
||||
return fmt.Sprintf(" %s = %s; // %s\n", name, num, proto)
|
||||
}
|
||||
|
||||
func main() {
|
||||
// Get the OS (using GOOS_TARGET if it exist)
|
||||
goos = os.Getenv("GOOS_TARGET")
|
||||
if goos == "" {
|
||||
goos = os.Getenv("GOOS")
|
||||
}
|
||||
// Get the architecture (using GOARCH_TARGET if it exists)
|
||||
goarch = os.Getenv("GOARCH_TARGET")
|
||||
if goarch == "" {
|
||||
goarch = os.Getenv("GOARCH")
|
||||
}
|
||||
// Check if GOOS and GOARCH environment variables are defined
|
||||
if goarch == "" || goos == "" {
|
||||
fmt.Fprintf(os.Stderr, "GOARCH or GOOS not defined in environment\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
file := strings.TrimSpace(os.Args[1])
|
||||
var syscalls io.Reader
|
||||
if strings.HasPrefix(file, "https://") || strings.HasPrefix(file, "http://") {
|
||||
// Download syscalls.master file
|
||||
syscalls = fetchFile(file)
|
||||
} else {
|
||||
syscalls = readFile(file)
|
||||
}
|
||||
|
||||
var text, line string
|
||||
s := bufio.NewScanner(syscalls)
|
||||
for s.Scan() {
|
||||
t := re{str: line}
|
||||
if t.Match(`^(.*)\\$`) {
|
||||
// Handle continuation
|
||||
line = t.sub[1]
|
||||
line += strings.TrimLeft(s.Text(), " \t")
|
||||
} else {
|
||||
// New line
|
||||
line = s.Text()
|
||||
}
|
||||
t = re{str: line}
|
||||
if t.Match(`\\$`) {
|
||||
continue
|
||||
}
|
||||
t = re{str: line}
|
||||
|
||||
switch goos {
|
||||
case "dragonfly":
|
||||
if t.Match(`^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$`) {
|
||||
num, proto := t.sub[1], t.sub[2]
|
||||
name := fmt.Sprintf("SYS_%s", t.sub[3])
|
||||
text += format(name, num, proto)
|
||||
}
|
||||
case "freebsd":
|
||||
if t.Match(`^([0-9]+)\s+\S+\s+(?:NO)?STD\s+({ \S+\s+(\w+).*)$`) {
|
||||
num, proto := t.sub[1], t.sub[2]
|
||||
name := fmt.Sprintf("SYS_%s", t.sub[3])
|
||||
text += format(name, num, proto)
|
||||
}
|
||||
case "openbsd":
|
||||
if t.Match(`^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$`) {
|
||||
num, proto, name := t.sub[1], t.sub[3], t.sub[4]
|
||||
text += format(name, num, proto)
|
||||
}
|
||||
case "netbsd":
|
||||
if t.Match(`^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$`) {
|
||||
num, proto, compat := t.sub[1], t.sub[6], t.sub[8]
|
||||
name := t.sub[7] + "_" + t.sub[9]
|
||||
if t.sub[11] != "" {
|
||||
name = t.sub[7] + "_" + t.sub[11]
|
||||
}
|
||||
name = strings.ToUpper(name)
|
||||
if compat == "" || compat == "13" || compat == "30" || compat == "50" {
|
||||
text += fmt.Sprintf(" %s = %s; // %s\n", name, num, proto)
|
||||
}
|
||||
}
|
||||
case "darwin":
|
||||
if t.Match(`^#define\s+SYS_(\w+)\s+([0-9]+)`) {
|
||||
name, num := t.sub[1], t.sub[2]
|
||||
name = strings.ToUpper(name)
|
||||
text += fmt.Sprintf(" SYS_%s = %s;\n", name, num)
|
||||
}
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "unrecognized GOOS=%s\n", goos)
|
||||
os.Exit(1)
|
||||
|
||||
}
|
||||
}
|
||||
err := s.Err()
|
||||
checkErr(err)
|
||||
|
||||
fmt.Printf(template, cmdLine(), buildTags(), text)
|
||||
}
|
||||
|
||||
const template = `// %s
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build %s
|
||||
|
||||
package unix
|
||||
|
||||
const(
|
||||
%s)`
|
25
vendor/golang.org/x/sys/unix/sockcmsg_unix.go
generated
vendored
25
vendor/golang.org/x/sys/unix/sockcmsg_unix.go
generated
vendored
@ -8,17 +8,30 @@
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
import (
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// Round the length of a raw sockaddr up to align it properly.
|
||||
func cmsgAlignOf(salen int) int {
|
||||
salign := SizeofPtr
|
||||
// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
|
||||
// Solaris kernels still require 32-bit aligned access to
|
||||
// network subsystem.
|
||||
if darwin64Bit || dragonfly64Bit || solaris64Bit {
|
||||
salign = 4
|
||||
|
||||
switch runtime.GOOS {
|
||||
case "darwin", "dragonfly", "solaris":
|
||||
// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
|
||||
// Solaris kernels still require 32-bit aligned access to
|
||||
// network subsystem.
|
||||
if SizeofPtr == 8 {
|
||||
salign = 4
|
||||
}
|
||||
case "openbsd":
|
||||
// OpenBSD armv7 requires 64-bit alignment.
|
||||
if runtime.GOARCH == "arm" {
|
||||
salign = 8
|
||||
}
|
||||
}
|
||||
|
||||
return (salen + salign - 1) & ^(salign - 1)
|
||||
}
|
||||
|
||||
|
18
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
18
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
@ -13,10 +13,7 @@
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
import "unsafe"
|
||||
|
||||
/*
|
||||
* Wrapped
|
||||
@ -230,7 +227,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
|
||||
// Some versions of AIX have a bug in getsockname (see IV78655).
|
||||
// We can't rely on sa.Len being set correctly.
|
||||
n := SizeofSockaddrUnix - 3 // substract leading Family, Len, terminating NUL.
|
||||
n := SizeofSockaddrUnix - 3 // subtract leading Family, Len, terminating NUL.
|
||||
for i := 0; i < n; i++ {
|
||||
if pp.Path[i] == 0 {
|
||||
n = i
|
||||
@ -271,6 +268,13 @@ func Gettimeofday(tv *Timeval) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
// TODO
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
return -1, ENOSYS
|
||||
@ -385,10 +389,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
|
||||
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
||||
|
||||
func Flock(fd int, how int) (err error) {
|
||||
return syscall.Flock(fd, how)
|
||||
}
|
||||
|
||||
/*
|
||||
* Direct access
|
||||
*/
|
||||
|
63
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
63
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -108,17 +108,8 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
|
||||
return nil, err
|
||||
}
|
||||
|
||||
_, _, e1 := Syscall6(
|
||||
SYS_GETATTRLIST,
|
||||
uintptr(unsafe.Pointer(_p0)),
|
||||
uintptr(unsafe.Pointer(&attrList)),
|
||||
uintptr(unsafe.Pointer(&attrBuf[0])),
|
||||
uintptr(len(attrBuf)),
|
||||
uintptr(options),
|
||||
0,
|
||||
)
|
||||
if e1 != 0 {
|
||||
return nil, e1
|
||||
if err := getattrlist(_p0, unsafe.Pointer(&attrList), unsafe.Pointer(&attrBuf[0]), uintptr(len(attrBuf)), int(options)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
|
||||
|
||||
@ -151,6 +142,8 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
|
||||
return
|
||||
}
|
||||
|
||||
//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
@ -168,12 +161,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
return getfsstat(_p0, bufsize, flags)
|
||||
}
|
||||
|
||||
func xattrPointer(dest []byte) *byte {
|
||||
@ -298,21 +286,16 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
|
||||
if flags&AT_SYMLINK_NOFOLLOW != 0 {
|
||||
options |= FSOPT_NOFOLLOW
|
||||
}
|
||||
_, _, e1 := Syscall6(
|
||||
SYS_SETATTRLIST,
|
||||
uintptr(unsafe.Pointer(_p0)),
|
||||
uintptr(unsafe.Pointer(&attrList)),
|
||||
uintptr(unsafe.Pointer(&attributes)),
|
||||
uintptr(unsafe.Sizeof(attributes)),
|
||||
uintptr(options),
|
||||
0,
|
||||
)
|
||||
if e1 != 0 {
|
||||
return e1
|
||||
}
|
||||
return nil
|
||||
return setattrlist(
|
||||
_p0,
|
||||
unsafe.Pointer(&attrList),
|
||||
unsafe.Pointer(&attributes),
|
||||
unsafe.Sizeof(attributes),
|
||||
options)
|
||||
}
|
||||
|
||||
//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
|
||||
|
||||
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
|
||||
// Darwin doesn't support SYS_UTIMENSAT
|
||||
return ENOSYS
|
||||
@ -411,6 +394,18 @@ func Uname(uname *Utsname) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
var length = int64(count)
|
||||
err = sendfile(infd, outfd, *offset, &length, nil, 0)
|
||||
written = int(length)
|
||||
return
|
||||
}
|
||||
|
||||
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
@ -421,6 +416,7 @@ func Uname(uname *Utsname) error {
|
||||
//sys Chmod(path string, mode uint32) (err error)
|
||||
//sys Chown(path string, uid int, gid int) (err error)
|
||||
//sys Chroot(path string) (err error)
|
||||
//sys ClockGettime(clockid int32, time *Timespec) (err error)
|
||||
//sys Close(fd int) (err error)
|
||||
//sys Dup(fd int) (nfd int, err error)
|
||||
//sys Dup2(from int, to int) (err error)
|
||||
@ -435,12 +431,8 @@ func Uname(uname *Utsname) error {
|
||||
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||
//sys Flock(fd int, how int) (err error)
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
|
||||
//sys Getdtablesize() (size int)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (uid int)
|
||||
@ -460,7 +452,6 @@ func Uname(uname *Utsname) error {
|
||||
//sys Link(path string, link string) (err error)
|
||||
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
|
||||
//sys Listen(s int, backlog int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Mkdir(path string, mode uint32) (err error)
|
||||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||
//sys Mkfifo(path string, mode uint32) (err error)
|
||||
@ -492,8 +483,6 @@ func Uname(uname *Utsname) error {
|
||||
//sysnb Setsid() (pid int, err error)
|
||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||
//sysnb Setuid(uid int) (err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
||||
//sys Symlink(path string, link string) (err error)
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Sync() (err error)
|
||||
|
23
vendor/golang.org/x/sys/unix/syscall_darwin_386.go
generated
vendored
23
vendor/golang.org/x/sys/unix/syscall_darwin_386.go
generated
vendored
@ -8,7 +8,6 @@ package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
@ -48,21 +47,17 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
var length = uint64(count)
|
||||
|
||||
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
|
||||
|
||||
written = int(length)
|
||||
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of darwin/386 the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
||||
//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
|
||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
||||
|
23
vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
generated
vendored
23
vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
generated
vendored
@ -8,7 +8,6 @@ package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
@ -48,21 +47,17 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
var length = uint64(count)
|
||||
|
||||
_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
|
||||
|
||||
written = int(length)
|
||||
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
||||
//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
|
||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
||||
|
26
vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
generated
vendored
26
vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
generated
vendored
@ -6,7 +6,6 @@ package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
@ -46,21 +45,20 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
var length = uint64(count)
|
||||
|
||||
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
|
||||
|
||||
written = int(length)
|
||||
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of darwin/arm the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error)
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
return 0, ENOSYS
|
||||
}
|
||||
|
26
vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
generated
vendored
26
vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
generated
vendored
@ -8,7 +8,6 @@ package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
@ -48,21 +47,20 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
var length = uint64(count)
|
||||
|
||||
_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
|
||||
|
||||
written = int(length)
|
||||
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
|
||||
|
||||
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
|
||||
// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
|
||||
const SYS___SYSCTL = SYS_SYSCTL
|
||||
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error)
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
return 0, ENOSYS
|
||||
}
|
||||
|
31
vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
generated
vendored
Normal file
31
vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2018 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 darwin,go1.12
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// Implemented in the runtime package (runtime/sys_darwin.go)
|
||||
func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
||||
func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
|
||||
func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
||||
func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||
|
||||
//go:linkname syscall_syscall syscall.syscall
|
||||
//go:linkname syscall_syscall6 syscall.syscall6
|
||||
//go:linkname syscall_syscall6X syscall.syscall6X
|
||||
//go:linkname syscall_syscall9 syscall.syscall9
|
||||
//go:linkname syscall_rawSyscall syscall.rawSyscall
|
||||
//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
|
||||
|
||||
// Find the entry point for f. See comments in runtime/proc.go for the
|
||||
// function of the same name.
|
||||
//go:nosplit
|
||||
func funcPC(f func()) uintptr {
|
||||
return **(**uintptr)(unsafe.Pointer(&f))
|
||||
}
|
8
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
8
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
@ -234,6 +234,13 @@ func Uname(uname *Utsname) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
@ -297,6 +304,7 @@ func Uname(uname *Utsname) error {
|
||||
//sys read(fd int, p []byte) (n int, err error)
|
||||
//sys Readlink(path string, buf []byte) (n int, err error)
|
||||
//sys Rename(from string, to string) (err error)
|
||||
//sys Renameat(fromfd int, from string, tofd int, to string) (err error)
|
||||
//sys Revoke(path string) (err error)
|
||||
//sys Rmdir(path string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
|
||||
|
7
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
7
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
@ -500,6 +500,13 @@ func convertFromDirents11(buf []byte, old []byte) int {
|
||||
return dstPos
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
52
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
Normal file
52
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
// Copyright 2018 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 arm64,freebsd
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint64(fd)
|
||||
k.Filter = int16(mode)
|
||||
k.Flags = uint16(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
var writtenOut uint64 = 0
|
||||
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
|
||||
|
||||
written = int(writtenOut)
|
||||
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
111
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
111
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -12,6 +12,9 @@
|
||||
package unix
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"net"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
@ -55,6 +58,15 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
// ioctl itself should not be exposed directly, but additional get/set
|
||||
// functions for specific types are permissible.
|
||||
|
||||
// IoctlSetPointerInt performs an ioctl operation which sets an
|
||||
// integer value on fd, using the specified request number. The ioctl
|
||||
// argument is called with a pointer to the integer value, rather than
|
||||
// passing the integer value directly.
|
||||
func IoctlSetPointerInt(fd int, req uint, value int) error {
|
||||
v := int32(value)
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
|
||||
}
|
||||
|
||||
// IoctlSetInt performs an ioctl operation which sets an integer value
|
||||
// on fd, using the specified request number.
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
@ -69,6 +81,12 @@ func ioctlSetTermios(fd int, req uint, value *Termios) error {
|
||||
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func IoctlSetRTCTime(fd int, value *RTCTime) error {
|
||||
err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
|
||||
runtime.KeepAlive(value)
|
||||
return err
|
||||
}
|
||||
|
||||
// IoctlGetInt performs an ioctl operation which gets an integer value
|
||||
// from fd, using the specified request number.
|
||||
func IoctlGetInt(fd int, req uint) (int, error) {
|
||||
@ -89,6 +107,12 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
||||
return &value, err
|
||||
}
|
||||
|
||||
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
|
||||
var value RTCTime
|
||||
err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
|
||||
return &value, err
|
||||
}
|
||||
|
||||
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
||||
|
||||
func Link(oldpath string, newpath string) (err error) {
|
||||
@ -710,6 +734,51 @@ func (sa *SockaddrXDP) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrXDP, nil
|
||||
}
|
||||
|
||||
// This constant mirrors the #define of PX_PROTO_OE in
|
||||
// linux/if_pppox.h. We're defining this by hand here instead of
|
||||
// autogenerating through mkerrors.sh because including
|
||||
// linux/if_pppox.h causes some declaration conflicts with other
|
||||
// includes (linux/if_pppox.h includes linux/in.h, which conflicts
|
||||
// with netinet/in.h). Given that we only need a single zero constant
|
||||
// out of that file, it's cleaner to just define it by hand here.
|
||||
const px_proto_oe = 0
|
||||
|
||||
type SockaddrPPPoE struct {
|
||||
SID uint16
|
||||
Remote net.HardwareAddr
|
||||
Dev string
|
||||
raw RawSockaddrPPPoX
|
||||
}
|
||||
|
||||
func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
if len(sa.Remote) != 6 {
|
||||
return nil, 0, EINVAL
|
||||
}
|
||||
if len(sa.Dev) > IFNAMSIZ-1 {
|
||||
return nil, 0, EINVAL
|
||||
}
|
||||
|
||||
*(*uint16)(unsafe.Pointer(&sa.raw[0])) = AF_PPPOX
|
||||
// This next field is in host-endian byte order. We can't use the
|
||||
// same unsafe pointer cast as above, because this value is not
|
||||
// 32-bit aligned and some architectures don't allow unaligned
|
||||
// access.
|
||||
//
|
||||
// However, the value of px_proto_oe is 0, so we can use
|
||||
// encoding/binary helpers to write the bytes without worrying
|
||||
// about the ordering.
|
||||
binary.BigEndian.PutUint32(sa.raw[2:6], px_proto_oe)
|
||||
// This field is deliberately big-endian, unlike the previous
|
||||
// one. The kernel expects SID to be in network byte order.
|
||||
binary.BigEndian.PutUint16(sa.raw[6:8], sa.SID)
|
||||
copy(sa.raw[8:14], sa.Remote)
|
||||
for i := 14; i < 14+IFNAMSIZ; i++ {
|
||||
sa.raw[i] = 0
|
||||
}
|
||||
copy(sa.raw[14:], sa.Dev)
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil
|
||||
}
|
||||
|
||||
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
switch rsa.Addr.Family {
|
||||
case AF_NETLINK:
|
||||
@ -820,6 +889,22 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
SharedUmemFD: pp.Shared_umem_fd,
|
||||
}
|
||||
return sa, nil
|
||||
case AF_PPPOX:
|
||||
pp := (*RawSockaddrPPPoX)(unsafe.Pointer(rsa))
|
||||
if binary.BigEndian.Uint32(pp[2:6]) != px_proto_oe {
|
||||
return nil, EINVAL
|
||||
}
|
||||
sa := &SockaddrPPPoE{
|
||||
SID: binary.BigEndian.Uint16(pp[6:8]),
|
||||
Remote: net.HardwareAddr(pp[8:14]),
|
||||
}
|
||||
for i := 14; i < 14+IFNAMSIZ; i++ {
|
||||
if pp[i] == 0 {
|
||||
sa.Dev = string(pp[14:i])
|
||||
break
|
||||
}
|
||||
}
|
||||
return sa, nil
|
||||
}
|
||||
return nil, EAFNOSUPPORT
|
||||
}
|
||||
@ -1288,6 +1373,13 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
|
||||
return mount(source, target, fstype, flags, datap)
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
// Sendto
|
||||
// Recvfrom
|
||||
// Socketpair
|
||||
@ -1302,6 +1394,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
|
||||
//sys Chroot(path string) (err error)
|
||||
//sys ClockGetres(clockid int32, res *Timespec) (err error)
|
||||
//sys ClockGettime(clockid int32, time *Timespec) (err error)
|
||||
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
|
||||
//sys Close(fd int) (err error)
|
||||
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
||||
//sys DeleteModule(name string, flags int) (err error)
|
||||
@ -1362,7 +1455,6 @@ func Getpgrp() (pid int) {
|
||||
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
||||
//sys read(fd int, p []byte) (n int, err error)
|
||||
//sys Removexattr(path string, attr string) (err error)
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)
|
||||
//sys RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
|
||||
//sys Setdomainname(p []byte) (err error)
|
||||
@ -1387,6 +1479,7 @@ func Setgid(uid int) (err error) {
|
||||
|
||||
//sys Setpriority(which int, who int, prio int) (err error)
|
||||
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
|
||||
//sys Signalfd(fd int, mask *Sigset_t, flags int) = SYS_SIGNALFD4
|
||||
//sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
|
||||
//sys Sync()
|
||||
//sys Syncfs(fd int) (err error)
|
||||
@ -1431,15 +1524,12 @@ func Munmap(b []byte) (err error) {
|
||||
// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
|
||||
// using the specified flags.
|
||||
func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
||||
n, _, errno := Syscall6(
|
||||
SYS_VMSPLICE,
|
||||
uintptr(fd),
|
||||
uintptr(unsafe.Pointer(&iovs[0])),
|
||||
uintptr(len(iovs)),
|
||||
uintptr(flags),
|
||||
0,
|
||||
0,
|
||||
)
|
||||
var p unsafe.Pointer
|
||||
if len(iovs) > 0 {
|
||||
p = unsafe.Pointer(&iovs[0])
|
||||
}
|
||||
|
||||
n, _, errno := Syscall6(SYS_VMSPLICE, uintptr(fd), uintptr(p), uintptr(len(iovs)), uintptr(flags), 0, 0)
|
||||
if errno != 0 {
|
||||
return 0, syscall.Errno(errno)
|
||||
}
|
||||
@ -1606,7 +1696,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
// Shmdt
|
||||
// Shmget
|
||||
// Sigaltstack
|
||||
// Signalfd
|
||||
// Swapoff
|
||||
// Swapon
|
||||
// Sysfs
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_386.go
generated
vendored
@ -68,6 +68,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
|
||||
|
19
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
19
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
generated
vendored
@ -20,15 +20,30 @@ package unix
|
||||
//sysnb Getgid() (gid int)
|
||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||
//sysnb Getuid() (uid int)
|
||||
//sysnb InotifyInit() (fd int, err error)
|
||||
//sysnb inotifyInit() (fd int, err error)
|
||||
|
||||
func InotifyInit() (fd int, err error) {
|
||||
// First try inotify_init1, because Android's seccomp policy blocks the latter.
|
||||
fd, err = InotifyInit1(0)
|
||||
if err == ENOSYS {
|
||||
fd, err = inotifyInit()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//sys Ioperm(from int, num int, on int) (err error)
|
||||
//sys Iopl(level int) (err error)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
|
||||
func Lstat(path string, stat *Stat_t) (err error) {
|
||||
return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
|
9
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
9
vendor/golang.org/x/sys/unix/syscall_linux_arm.go
generated
vendored
@ -89,6 +89,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Pause() (err error)
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
@ -257,3 +258,11 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
}
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
|
||||
|
||||
func SyncFileRange(fd int, off int64, n int64, flags int) error {
|
||||
// The sync_file_range and arm_sync_file_range syscalls differ only in the
|
||||
// order of their arguments.
|
||||
return armSyncFileRange(fd, flags, off, n)
|
||||
}
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
@ -30,6 +30,7 @@ func EpollCreate(size int) (fd int, err error) {
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
|
10
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
10
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
generated
vendored
@ -12,7 +12,6 @@ package unix
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
@ -25,6 +24,7 @@ package unix
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
|
||||
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
||||
@ -148,6 +148,7 @@ type stat_t struct {
|
||||
}
|
||||
|
||||
//sys fstat(fd int, st *stat_t) (err error)
|
||||
//sys fstatat(dirfd int, path string, st *stat_t, flags int) (err error) = SYS_NEWFSTATAT
|
||||
//sys lstat(path string, st *stat_t) (err error)
|
||||
//sys stat(path string, st *stat_t) (err error)
|
||||
|
||||
@ -158,6 +159,13 @@ func Fstat(fd int, s *Stat_t) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func Fstatat(dirfd int, path string, s *Stat_t, flags int) (err error) {
|
||||
st := &stat_t{}
|
||||
err = fstatat(dirfd, path, st, flags)
|
||||
fillStat_t(s, st)
|
||||
return
|
||||
}
|
||||
|
||||
func Lstat(path string, s *Stat_t) (err error) {
|
||||
st := &stat_t{}
|
||||
err = lstat(path, st)
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
generated
vendored
@ -28,6 +28,7 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||
//sys Listen(s int, n int) (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
generated
vendored
@ -30,6 +30,7 @@ package unix
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
|
4
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
@ -207,3 +207,7 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
}
|
||||
return ppoll(&fds[0], len(fds), ts, nil)
|
||||
}
|
||||
|
||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
|
||||
}
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
generated
vendored
@ -30,6 +30,7 @@ import (
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
|
1
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
generated
vendored
@ -26,6 +26,7 @@ package unix
|
||||
//sys Pause() (err error)
|
||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
|
7
vendor/golang.org/x/sys/unix/syscall_netbsd.go
generated
vendored
7
vendor/golang.org/x/sys/unix/syscall_netbsd.go
generated
vendored
@ -244,6 +244,13 @@ func Uname(uname *Utsname) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
33
vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
generated
vendored
Normal file
33
vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright 2019 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 arm64,netbsd
|
||||
|
||||
package unix
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: int32(usec)}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint64(fd)
|
||||
k.Filter = uint32(mode)
|
||||
k.Flags = uint32(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
7
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
7
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
@ -94,6 +94,13 @@ func Getwd() (string, error) {
|
||||
return string(buf[:n]), nil
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
// TODO
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
return -1, ENOSYS
|
||||
|
7
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
7
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@ -585,6 +585,13 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
return poll(&fds[0], len(fds), timeout)
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
15
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
15
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@ -8,7 +8,6 @@ package unix
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"runtime"
|
||||
"sort"
|
||||
"sync"
|
||||
"syscall"
|
||||
@ -21,13 +20,6 @@ var (
|
||||
Stderr = 2
|
||||
)
|
||||
|
||||
const (
|
||||
darwin64Bit = runtime.GOOS == "darwin" && SizeofPtr == 8
|
||||
dragonfly64Bit = runtime.GOOS == "dragonfly" && SizeofPtr == 8
|
||||
netbsd32Bit = runtime.GOOS == "netbsd" && SizeofPtr == 4
|
||||
solaris64Bit = runtime.GOOS == "solaris" && SizeofPtr == 8
|
||||
)
|
||||
|
||||
// Do the interface allocations only once for common
|
||||
// Errno values.
|
||||
var (
|
||||
@ -359,13 +351,6 @@ func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
var ioSync int64
|
||||
|
||||
func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
|
||||
|
1794
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
generated
vendored
Normal file
1794
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
84
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -639,7 +639,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -707,6 +707,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -778,6 +779,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -913,6 +915,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -922,6 +929,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1101,6 +1112,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1244,6 +1256,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1293,6 +1306,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
PPPIOCDETACH = 0x4004743c
|
||||
PPPIOCDISCONN = 0x7439
|
||||
PPPIOCGASYNCMAP = 0x80047458
|
||||
PPPIOCGCHAN = 0x80047437
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8008743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x80047455
|
||||
PPPIOCGUNIT = 0x80047456
|
||||
PPPIOCGXASYNCMAP = 0x80207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x40087446
|
||||
PPPIOCSASYNCMAP = 0x40047457
|
||||
PPPIOCSCOMPRESS = 0x400c744d
|
||||
PPPIOCSDEBUG = 0x40047440
|
||||
PPPIOCSFLAGS = 0x40047459
|
||||
PPPIOCSMAXCID = 0x40047451
|
||||
PPPIOCSMRRU = 0x4004743b
|
||||
PPPIOCSMRU = 0x40047452
|
||||
PPPIOCSNPMODE = 0x4008744b
|
||||
PPPIOCSPASS = 0x40087447
|
||||
PPPIOCSRASYNCMAP = 0x40047454
|
||||
PPPIOCSXASYNCMAP = 0x4020744f
|
||||
PPPIOCXFERUNIT = 0x744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1394,6 +1437,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1495,6 +1539,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1696,11 +1747,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1751,6 +1805,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1859,6 +1916,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1978,7 +2046,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x540b
|
||||
TCGETA = 0x5405
|
||||
TCGETS = 0x5401
|
||||
@ -1992,6 +2060,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2006,6 +2075,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2025,6 +2095,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2039,6 +2112,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2055,6 +2129,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2062,6 +2137,7 @@ const (
|
||||
TIOCGETD = 0x5424
|
||||
TIOCGEXCL = 0x80045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x80285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGPGRP = 0x540f
|
||||
TIOCGPKT = 0x80045438
|
||||
@ -2115,6 +2191,7 @@ const (
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSPGRP = 0x5410
|
||||
TIOCSPTLCK = 0x40045431
|
||||
@ -2345,6 +2422,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -639,7 +639,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -707,6 +707,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -778,6 +779,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -913,6 +915,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -922,6 +929,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1101,6 +1112,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1244,6 +1256,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1293,6 +1306,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
PPPIOCDETACH = 0x4004743c
|
||||
PPPIOCDISCONN = 0x7439
|
||||
PPPIOCGASYNCMAP = 0x80047458
|
||||
PPPIOCGCHAN = 0x80047437
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x80047455
|
||||
PPPIOCGUNIT = 0x80047456
|
||||
PPPIOCGXASYNCMAP = 0x80207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x40107446
|
||||
PPPIOCSASYNCMAP = 0x40047457
|
||||
PPPIOCSCOMPRESS = 0x4010744d
|
||||
PPPIOCSDEBUG = 0x40047440
|
||||
PPPIOCSFLAGS = 0x40047459
|
||||
PPPIOCSMAXCID = 0x40047451
|
||||
PPPIOCSMRRU = 0x4004743b
|
||||
PPPIOCSMRU = 0x40047452
|
||||
PPPIOCSNPMODE = 0x4008744b
|
||||
PPPIOCSPASS = 0x40107447
|
||||
PPPIOCSRASYNCMAP = 0x40047454
|
||||
PPPIOCSXASYNCMAP = 0x4020744f
|
||||
PPPIOCXFERUNIT = 0x744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1394,6 +1437,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1496,6 +1540,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1697,11 +1748,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1752,6 +1806,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1860,6 +1917,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1979,7 +2047,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x540b
|
||||
TCGETA = 0x5405
|
||||
TCGETS = 0x5401
|
||||
@ -1993,6 +2061,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2007,6 +2076,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2026,6 +2096,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2040,6 +2113,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2056,6 +2130,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2063,6 +2138,7 @@ const (
|
||||
TIOCGETD = 0x5424
|
||||
TIOCGEXCL = 0x80045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x80285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGPGRP = 0x540f
|
||||
TIOCGPKT = 0x80045438
|
||||
@ -2116,6 +2192,7 @@ const (
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSPGRP = 0x5410
|
||||
TIOCSPTLCK = 0x40045431
|
||||
@ -2345,6 +2422,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1099,6 +1110,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1242,6 +1254,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1291,6 +1304,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
PPPIOCDETACH = 0x4004743c
|
||||
PPPIOCDISCONN = 0x7439
|
||||
PPPIOCGASYNCMAP = 0x80047458
|
||||
PPPIOCGCHAN = 0x80047437
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8008743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x80047455
|
||||
PPPIOCGUNIT = 0x80047456
|
||||
PPPIOCGXASYNCMAP = 0x80207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x40087446
|
||||
PPPIOCSASYNCMAP = 0x40047457
|
||||
PPPIOCSCOMPRESS = 0x400c744d
|
||||
PPPIOCSDEBUG = 0x40047440
|
||||
PPPIOCSFLAGS = 0x40047459
|
||||
PPPIOCSMAXCID = 0x40047451
|
||||
PPPIOCSMRRU = 0x4004743b
|
||||
PPPIOCSMRU = 0x40047452
|
||||
PPPIOCSNPMODE = 0x4008744b
|
||||
PPPIOCSPASS = 0x40087447
|
||||
PPPIOCSRASYNCMAP = 0x40047454
|
||||
PPPIOCSXASYNCMAP = 0x4020744f
|
||||
PPPIOCXFERUNIT = 0x744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1392,6 +1435,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1502,6 +1546,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1703,11 +1754,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1758,6 +1812,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1866,6 +1923,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1985,7 +2053,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x540b
|
||||
TCGETA = 0x5405
|
||||
TCGETS = 0x5401
|
||||
@ -1999,6 +2067,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2013,6 +2082,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2032,6 +2102,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2046,6 +2119,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2062,6 +2136,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2069,6 +2144,7 @@ const (
|
||||
TIOCGETD = 0x5424
|
||||
TIOCGEXCL = 0x80045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x80285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGPGRP = 0x540f
|
||||
TIOCGPKT = 0x80045438
|
||||
@ -2122,6 +2198,7 @@ const (
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSPGRP = 0x5410
|
||||
TIOCSPTLCK = 0x40045431
|
||||
@ -2351,6 +2428,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -641,7 +641,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -709,6 +709,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -780,6 +781,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -915,6 +917,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -924,6 +931,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1102,6 +1113,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1245,6 +1257,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1294,6 +1307,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
PPPIOCDETACH = 0x4004743c
|
||||
PPPIOCDISCONN = 0x7439
|
||||
PPPIOCGASYNCMAP = 0x80047458
|
||||
PPPIOCGCHAN = 0x80047437
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x80047455
|
||||
PPPIOCGUNIT = 0x80047456
|
||||
PPPIOCGXASYNCMAP = 0x80207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x40107446
|
||||
PPPIOCSASYNCMAP = 0x40047457
|
||||
PPPIOCSCOMPRESS = 0x4010744d
|
||||
PPPIOCSDEBUG = 0x40047440
|
||||
PPPIOCSFLAGS = 0x40047459
|
||||
PPPIOCSMAXCID = 0x40047451
|
||||
PPPIOCSMRRU = 0x4004743b
|
||||
PPPIOCSMRU = 0x40047452
|
||||
PPPIOCSNPMODE = 0x4008744b
|
||||
PPPIOCSPASS = 0x40107447
|
||||
PPPIOCSRASYNCMAP = 0x40047454
|
||||
PPPIOCSXASYNCMAP = 0x4020744f
|
||||
PPPIOCXFERUNIT = 0x744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1395,6 +1438,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1486,6 +1530,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1687,11 +1738,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1742,6 +1796,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1850,6 +1907,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1970,7 +2038,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x540b
|
||||
TCGETA = 0x5405
|
||||
TCGETS = 0x5401
|
||||
@ -1984,6 +2052,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -1998,6 +2067,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2017,6 +2087,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2031,6 +2104,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2047,6 +2121,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2054,6 +2129,7 @@ const (
|
||||
TIOCGETD = 0x5424
|
||||
TIOCGEXCL = 0x80045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x80285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGPGRP = 0x540f
|
||||
TIOCGPKT = 0x80045438
|
||||
@ -2107,6 +2183,7 @@ const (
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSPGRP = 0x5410
|
||||
TIOCSPTLCK = 0x40045431
|
||||
@ -2336,6 +2413,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1099,6 +1110,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1242,6 +1254,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1291,6 +1304,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
PPPIOCDETACH = 0x8004743c
|
||||
PPPIOCDISCONN = 0x20007439
|
||||
PPPIOCGASYNCMAP = 0x40047458
|
||||
PPPIOCGCHAN = 0x40047437
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4008743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x40047455
|
||||
PPPIOCGUNIT = 0x40047456
|
||||
PPPIOCGXASYNCMAP = 0x40207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x80087446
|
||||
PPPIOCSASYNCMAP = 0x80047457
|
||||
PPPIOCSCOMPRESS = 0x800c744d
|
||||
PPPIOCSDEBUG = 0x80047440
|
||||
PPPIOCSFLAGS = 0x80047459
|
||||
PPPIOCSMAXCID = 0x80047451
|
||||
PPPIOCSMRRU = 0x8004743b
|
||||
PPPIOCSMRU = 0x80047452
|
||||
PPPIOCSNPMODE = 0x8008744b
|
||||
PPPIOCSPASS = 0x80087447
|
||||
PPPIOCSRASYNCMAP = 0x80047454
|
||||
PPPIOCSXASYNCMAP = 0x8020744f
|
||||
PPPIOCXFERUNIT = 0x2000744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1392,6 +1435,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1495,6 +1539,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1696,11 +1747,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1751,6 +1805,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1859,6 +1916,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1979,7 +2047,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x5407
|
||||
TCGETA = 0x5401
|
||||
TCGETS = 0x540d
|
||||
@ -1992,6 +2060,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2006,6 +2075,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2025,6 +2095,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2039,6 +2112,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2052,6 +2126,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2060,6 +2135,7 @@ const (
|
||||
TIOCGETP = 0x7408
|
||||
TIOCGEXCL = 0x40045440
|
||||
TIOCGICOUNT = 0x5492
|
||||
TIOCGISO7816 = 0x40285442
|
||||
TIOCGLCKTRMIOS = 0x548b
|
||||
TIOCGLTC = 0x7474
|
||||
TIOCGPGRP = 0x40047477
|
||||
@ -2116,6 +2192,7 @@ const (
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
TIOCSIG = 0x80045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x548c
|
||||
TIOCSLTC = 0x7475
|
||||
TIOCSPGRP = 0x80047476
|
||||
@ -2347,6 +2424,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1099,6 +1110,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1242,6 +1254,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1291,6 +1304,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
PPPIOCDETACH = 0x8004743c
|
||||
PPPIOCDISCONN = 0x20007439
|
||||
PPPIOCGASYNCMAP = 0x40047458
|
||||
PPPIOCGCHAN = 0x40047437
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x40047455
|
||||
PPPIOCGUNIT = 0x40047456
|
||||
PPPIOCGXASYNCMAP = 0x40207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x80107446
|
||||
PPPIOCSASYNCMAP = 0x80047457
|
||||
PPPIOCSCOMPRESS = 0x8010744d
|
||||
PPPIOCSDEBUG = 0x80047440
|
||||
PPPIOCSFLAGS = 0x80047459
|
||||
PPPIOCSMAXCID = 0x80047451
|
||||
PPPIOCSMRRU = 0x8004743b
|
||||
PPPIOCSMRU = 0x80047452
|
||||
PPPIOCSNPMODE = 0x8008744b
|
||||
PPPIOCSPASS = 0x80107447
|
||||
PPPIOCSRASYNCMAP = 0x80047454
|
||||
PPPIOCSXASYNCMAP = 0x8020744f
|
||||
PPPIOCXFERUNIT = 0x2000744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1392,6 +1435,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1495,6 +1539,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1696,11 +1747,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1751,6 +1805,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1859,6 +1916,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1979,7 +2047,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x5407
|
||||
TCGETA = 0x5401
|
||||
TCGETS = 0x540d
|
||||
@ -1992,6 +2060,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2006,6 +2075,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2025,6 +2095,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2039,6 +2112,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2052,6 +2126,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2060,6 +2135,7 @@ const (
|
||||
TIOCGETP = 0x7408
|
||||
TIOCGEXCL = 0x40045440
|
||||
TIOCGICOUNT = 0x5492
|
||||
TIOCGISO7816 = 0x40285442
|
||||
TIOCGLCKTRMIOS = 0x548b
|
||||
TIOCGLTC = 0x7474
|
||||
TIOCGPGRP = 0x40047477
|
||||
@ -2116,6 +2192,7 @@ const (
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
TIOCSIG = 0x80045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x548c
|
||||
TIOCSLTC = 0x7475
|
||||
TIOCSPGRP = 0x80047476
|
||||
@ -2347,6 +2424,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1099,6 +1110,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1242,6 +1254,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1291,6 +1304,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
PPPIOCDETACH = 0x8004743c
|
||||
PPPIOCDISCONN = 0x20007439
|
||||
PPPIOCGASYNCMAP = 0x40047458
|
||||
PPPIOCGCHAN = 0x40047437
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x40047455
|
||||
PPPIOCGUNIT = 0x40047456
|
||||
PPPIOCGXASYNCMAP = 0x40207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x80107446
|
||||
PPPIOCSASYNCMAP = 0x80047457
|
||||
PPPIOCSCOMPRESS = 0x8010744d
|
||||
PPPIOCSDEBUG = 0x80047440
|
||||
PPPIOCSFLAGS = 0x80047459
|
||||
PPPIOCSMAXCID = 0x80047451
|
||||
PPPIOCSMRRU = 0x8004743b
|
||||
PPPIOCSMRU = 0x80047452
|
||||
PPPIOCSNPMODE = 0x8008744b
|
||||
PPPIOCSPASS = 0x80107447
|
||||
PPPIOCSRASYNCMAP = 0x80047454
|
||||
PPPIOCSXASYNCMAP = 0x8020744f
|
||||
PPPIOCXFERUNIT = 0x2000744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1392,6 +1435,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1495,6 +1539,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1696,11 +1747,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1751,6 +1805,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1859,6 +1916,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1979,7 +2047,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x5407
|
||||
TCGETA = 0x5401
|
||||
TCGETS = 0x540d
|
||||
@ -1992,6 +2060,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2006,6 +2075,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2025,6 +2095,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2039,6 +2112,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2052,6 +2126,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2060,6 +2135,7 @@ const (
|
||||
TIOCGETP = 0x7408
|
||||
TIOCGEXCL = 0x40045440
|
||||
TIOCGICOUNT = 0x5492
|
||||
TIOCGISO7816 = 0x40285442
|
||||
TIOCGLCKTRMIOS = 0x548b
|
||||
TIOCGLTC = 0x7474
|
||||
TIOCGPGRP = 0x40047477
|
||||
@ -2116,6 +2192,7 @@ const (
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
TIOCSIG = 0x80045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x548c
|
||||
TIOCSLTC = 0x7475
|
||||
TIOCSPGRP = 0x80047476
|
||||
@ -2347,6 +2424,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1099,6 +1110,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1242,6 +1254,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1291,6 +1304,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
PPPIOCDETACH = 0x8004743c
|
||||
PPPIOCDISCONN = 0x20007439
|
||||
PPPIOCGASYNCMAP = 0x40047458
|
||||
PPPIOCGCHAN = 0x40047437
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4008743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x40047455
|
||||
PPPIOCGUNIT = 0x40047456
|
||||
PPPIOCGXASYNCMAP = 0x40207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x80087446
|
||||
PPPIOCSASYNCMAP = 0x80047457
|
||||
PPPIOCSCOMPRESS = 0x800c744d
|
||||
PPPIOCSDEBUG = 0x80047440
|
||||
PPPIOCSFLAGS = 0x80047459
|
||||
PPPIOCSMAXCID = 0x80047451
|
||||
PPPIOCSMRRU = 0x8004743b
|
||||
PPPIOCSMRU = 0x80047452
|
||||
PPPIOCSNPMODE = 0x8008744b
|
||||
PPPIOCSPASS = 0x80087447
|
||||
PPPIOCSRASYNCMAP = 0x80047454
|
||||
PPPIOCSXASYNCMAP = 0x8020744f
|
||||
PPPIOCXFERUNIT = 0x2000744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1392,6 +1435,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1495,6 +1539,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1696,11 +1747,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x80
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1751,6 +1805,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1859,6 +1916,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x1029
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x1007
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1979,7 +2047,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x5407
|
||||
TCGETA = 0x5401
|
||||
TCGETS = 0x540d
|
||||
@ -1992,6 +2060,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2006,6 +2075,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2025,6 +2095,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2039,6 +2112,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x5410
|
||||
TCSBRK = 0x5405
|
||||
TCSBRKP = 0x5486
|
||||
@ -2052,6 +2126,7 @@ const (
|
||||
TCSETSW = 0x540f
|
||||
TCSETSW2 = 0x8030542c
|
||||
TCXONC = 0x5406
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x80047478
|
||||
TIOCEXCL = 0x740d
|
||||
@ -2060,6 +2135,7 @@ const (
|
||||
TIOCGETP = 0x7408
|
||||
TIOCGEXCL = 0x40045440
|
||||
TIOCGICOUNT = 0x5492
|
||||
TIOCGISO7816 = 0x40285442
|
||||
TIOCGLCKTRMIOS = 0x548b
|
||||
TIOCGLTC = 0x7474
|
||||
TIOCGPGRP = 0x40047477
|
||||
@ -2116,6 +2192,7 @@ const (
|
||||
TIOCSETN = 0x740a
|
||||
TIOCSETP = 0x7409
|
||||
TIOCSIG = 0x80045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x548c
|
||||
TIOCSLTC = 0x7475
|
||||
TIOCSPGRP = 0x80047476
|
||||
@ -2347,6 +2424,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
86
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
86
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1098,6 +1109,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1243,6 +1255,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1292,6 +1305,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
PPPIOCDETACH = 0x8004743c
|
||||
PPPIOCDISCONN = 0x20007439
|
||||
PPPIOCGASYNCMAP = 0x40047458
|
||||
PPPIOCGCHAN = 0x40047437
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x40047455
|
||||
PPPIOCGUNIT = 0x40047456
|
||||
PPPIOCGXASYNCMAP = 0x40207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x80107446
|
||||
PPPIOCSASYNCMAP = 0x80047457
|
||||
PPPIOCSCOMPRESS = 0x8010744d
|
||||
PPPIOCSDEBUG = 0x80047440
|
||||
PPPIOCSFLAGS = 0x80047459
|
||||
PPPIOCSMAXCID = 0x80047451
|
||||
PPPIOCSMRRU = 0x8004743b
|
||||
PPPIOCSMRU = 0x80047452
|
||||
PPPIOCSNPMODE = 0x8008744b
|
||||
PPPIOCSPASS = 0x80107447
|
||||
PPPIOCSRASYNCMAP = 0x80047454
|
||||
PPPIOCSXASYNCMAP = 0x8020744f
|
||||
PPPIOCXFERUNIT = 0x2000744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1394,6 +1437,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1472,6 +1516,8 @@ const (
|
||||
PTRACE_SINGLEBLOCK = 0x100
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_SYSCALL = 0x18
|
||||
PTRACE_SYSEMU = 0x1d
|
||||
PTRACE_SYSEMU_SINGLESTEP = 0x1e
|
||||
PTRACE_TRACEME = 0x0
|
||||
PT_CCR = 0x26
|
||||
PT_CTR = 0x23
|
||||
@ -1551,6 +1597,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1752,11 +1805,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1807,6 +1863,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1915,6 +1974,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2034,7 +2104,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x2000741f
|
||||
TCGETA = 0x40147417
|
||||
TCGETS = 0x402c7413
|
||||
@ -2046,6 +2116,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2060,6 +2131,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2079,6 +2151,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2093,6 +2168,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x2000741d
|
||||
TCSBRKP = 0x5425
|
||||
@ -2103,6 +2179,7 @@ const (
|
||||
TCSETSF = 0x802c7416
|
||||
TCSETSW = 0x802c7415
|
||||
TCXONC = 0x2000741e
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2112,6 +2189,7 @@ const (
|
||||
TIOCGETP = 0x40067408
|
||||
TIOCGEXCL = 0x40045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x40285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGLTC = 0x40067474
|
||||
TIOCGPGRP = 0x40047477
|
||||
@ -2172,6 +2250,7 @@ const (
|
||||
TIOCSETN = 0x8006740a
|
||||
TIOCSETP = 0x80067409
|
||||
TIOCSIG = 0x80045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSLTC = 0x80067475
|
||||
TIOCSPGRP = 0x80047476
|
||||
@ -2404,6 +2483,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0xc00
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
86
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
86
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1098,6 +1109,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1243,6 +1255,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1292,6 +1305,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
PPPIOCDETACH = 0x8004743c
|
||||
PPPIOCDISCONN = 0x20007439
|
||||
PPPIOCGASYNCMAP = 0x40047458
|
||||
PPPIOCGCHAN = 0x40047437
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x40047455
|
||||
PPPIOCGUNIT = 0x40047456
|
||||
PPPIOCGXASYNCMAP = 0x40207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x80107446
|
||||
PPPIOCSASYNCMAP = 0x80047457
|
||||
PPPIOCSCOMPRESS = 0x8010744d
|
||||
PPPIOCSDEBUG = 0x80047440
|
||||
PPPIOCSFLAGS = 0x80047459
|
||||
PPPIOCSMAXCID = 0x80047451
|
||||
PPPIOCSMRRU = 0x8004743b
|
||||
PPPIOCSMRU = 0x80047452
|
||||
PPPIOCSNPMODE = 0x8008744b
|
||||
PPPIOCSPASS = 0x80107447
|
||||
PPPIOCSRASYNCMAP = 0x80047454
|
||||
PPPIOCSXASYNCMAP = 0x8020744f
|
||||
PPPIOCXFERUNIT = 0x2000744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1394,6 +1437,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1472,6 +1516,8 @@ const (
|
||||
PTRACE_SINGLEBLOCK = 0x100
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_SYSCALL = 0x18
|
||||
PTRACE_SYSEMU = 0x1d
|
||||
PTRACE_SYSEMU_SINGLESTEP = 0x1e
|
||||
PTRACE_TRACEME = 0x0
|
||||
PT_CCR = 0x26
|
||||
PT_CTR = 0x23
|
||||
@ -1551,6 +1597,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x80085203
|
||||
RNDADDTOENTCNT = 0x80045201
|
||||
RNDCLEARPOOL = 0x20005206
|
||||
RNDGETENTCNT = 0x40045200
|
||||
RNDGETPOOL = 0x40085202
|
||||
RNDRESEEDCRNG = 0x20005207
|
||||
RNDZAPENTCNT = 0x20005204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1752,11 +1805,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1807,6 +1863,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1915,6 +1974,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2034,7 +2104,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x2000741f
|
||||
TCGETA = 0x40147417
|
||||
TCGETS = 0x402c7413
|
||||
@ -2046,6 +2116,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2060,6 +2131,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2079,6 +2151,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2093,6 +2168,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x2000741d
|
||||
TCSBRKP = 0x5425
|
||||
@ -2103,6 +2179,7 @@ const (
|
||||
TCSETSF = 0x802c7416
|
||||
TCSETSW = 0x802c7415
|
||||
TCXONC = 0x2000741e
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2112,6 +2189,7 @@ const (
|
||||
TIOCGETP = 0x40067408
|
||||
TIOCGEXCL = 0x40045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x40285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGLTC = 0x40067474
|
||||
TIOCGPGRP = 0x40047477
|
||||
@ -2172,6 +2250,7 @@ const (
|
||||
TIOCSETN = 0x8006740a
|
||||
TIOCSETP = 0x80067409
|
||||
TIOCSIG = 0x80045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSLTC = 0x80067475
|
||||
TIOCSPGRP = 0x80047476
|
||||
@ -2404,6 +2483,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0xc00
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1099,6 +1110,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1242,6 +1254,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1291,6 +1304,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
PPPIOCDETACH = 0x4004743c
|
||||
PPPIOCDISCONN = 0x7439
|
||||
PPPIOCGASYNCMAP = 0x80047458
|
||||
PPPIOCGCHAN = 0x80047437
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x80047455
|
||||
PPPIOCGUNIT = 0x80047456
|
||||
PPPIOCGXASYNCMAP = 0x80207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x40107446
|
||||
PPPIOCSASYNCMAP = 0x40047457
|
||||
PPPIOCSCOMPRESS = 0x4010744d
|
||||
PPPIOCSDEBUG = 0x40047440
|
||||
PPPIOCSFLAGS = 0x40047459
|
||||
PPPIOCSMAXCID = 0x40047451
|
||||
PPPIOCSMRRU = 0x4004743b
|
||||
PPPIOCSMRU = 0x40047452
|
||||
PPPIOCSNPMODE = 0x4008744b
|
||||
PPPIOCSPASS = 0x40107447
|
||||
PPPIOCSRASYNCMAP = 0x40047454
|
||||
PPPIOCSXASYNCMAP = 0x4020744f
|
||||
PPPIOCXFERUNIT = 0x744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1392,6 +1435,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1483,6 +1527,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1684,11 +1735,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1739,6 +1793,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1847,6 +1904,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -1966,7 +2034,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x540b
|
||||
TCGETA = 0x5405
|
||||
TCGETS = 0x5401
|
||||
@ -1980,6 +2048,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -1994,6 +2063,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2013,6 +2083,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2027,6 +2100,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2043,6 +2117,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2050,6 +2125,7 @@ const (
|
||||
TIOCGETD = 0x5424
|
||||
TIOCGEXCL = 0x80045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x80285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGPGRP = 0x540f
|
||||
TIOCGPKT = 0x80045438
|
||||
@ -2103,6 +2179,7 @@ const (
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSPGRP = 0x5410
|
||||
TIOCSPTLCK = 0x40045431
|
||||
@ -2332,6 +2409,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
84
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
@ -41,7 +41,7 @@ const (
|
||||
AF_KEY = 0xf
|
||||
AF_LLC = 0x1a
|
||||
AF_LOCAL = 0x1
|
||||
AF_MAX = 0x2c
|
||||
AF_MAX = 0x2d
|
||||
AF_MPLS = 0x1c
|
||||
AF_NETBEUI = 0xd
|
||||
AF_NETLINK = 0x10
|
||||
@ -638,7 +638,7 @@ const (
|
||||
IFA_F_STABLE_PRIVACY = 0x800
|
||||
IFA_F_TEMPORARY = 0x1
|
||||
IFA_F_TENTATIVE = 0x40
|
||||
IFA_MAX = 0x9
|
||||
IFA_MAX = 0xa
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ATTACH_QUEUE = 0x200
|
||||
IFF_AUTOMEDIA = 0x4000
|
||||
@ -706,6 +706,7 @@ const (
|
||||
IN_ISDIR = 0x40000000
|
||||
IN_LOOPBACKNET = 0x7f
|
||||
IN_MASK_ADD = 0x20000000
|
||||
IN_MASK_CREATE = 0x10000000
|
||||
IN_MODIFY = 0x2
|
||||
IN_MOVE = 0xc0
|
||||
IN_MOVED_FROM = 0x40
|
||||
@ -777,6 +778,7 @@ const (
|
||||
IPV6_MINHOPCOUNT = 0x49
|
||||
IPV6_MTU = 0x18
|
||||
IPV6_MTU_DISCOVER = 0x17
|
||||
IPV6_MULTICAST_ALL = 0x1d
|
||||
IPV6_MULTICAST_HOPS = 0x12
|
||||
IPV6_MULTICAST_IF = 0x11
|
||||
IPV6_MULTICAST_LOOP = 0x13
|
||||
@ -912,6 +914,11 @@ const (
|
||||
KEYCTL_JOIN_SESSION_KEYRING = 0x1
|
||||
KEYCTL_LINK = 0x8
|
||||
KEYCTL_NEGATE = 0xd
|
||||
KEYCTL_PKEY_DECRYPT = 0x1a
|
||||
KEYCTL_PKEY_ENCRYPT = 0x19
|
||||
KEYCTL_PKEY_QUERY = 0x18
|
||||
KEYCTL_PKEY_SIGN = 0x1b
|
||||
KEYCTL_PKEY_VERIFY = 0x1c
|
||||
KEYCTL_READ = 0xb
|
||||
KEYCTL_REJECT = 0x13
|
||||
KEYCTL_RESTRICT_KEYRING = 0x1d
|
||||
@ -921,6 +928,10 @@ const (
|
||||
KEYCTL_SETPERM = 0x5
|
||||
KEYCTL_SET_REQKEY_KEYRING = 0xe
|
||||
KEYCTL_SET_TIMEOUT = 0xf
|
||||
KEYCTL_SUPPORTS_DECRYPT = 0x2
|
||||
KEYCTL_SUPPORTS_ENCRYPT = 0x1
|
||||
KEYCTL_SUPPORTS_SIGN = 0x4
|
||||
KEYCTL_SUPPORTS_VERIFY = 0x8
|
||||
KEYCTL_UNLINK = 0x9
|
||||
KEYCTL_UPDATE = 0x2
|
||||
KEY_REQKEY_DEFL_DEFAULT = 0x0
|
||||
@ -1099,6 +1110,7 @@ const (
|
||||
NETLINK_FIB_LOOKUP = 0xa
|
||||
NETLINK_FIREWALL = 0x3
|
||||
NETLINK_GENERIC = 0x10
|
||||
NETLINK_GET_STRICT_CHK = 0xc
|
||||
NETLINK_INET_DIAG = 0x4
|
||||
NETLINK_IP6_FW = 0xd
|
||||
NETLINK_ISCSI = 0x8
|
||||
@ -1242,6 +1254,7 @@ const (
|
||||
PACKET_FASTROUTE = 0x6
|
||||
PACKET_HDRLEN = 0xb
|
||||
PACKET_HOST = 0x0
|
||||
PACKET_IGNORE_OUTGOING = 0x17
|
||||
PACKET_KERNEL = 0x7
|
||||
PACKET_LOOPBACK = 0x5
|
||||
PACKET_LOSS = 0xe
|
||||
@ -1291,6 +1304,36 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
PPPIOCDETACH = 0x4004743c
|
||||
PPPIOCDISCONN = 0x7439
|
||||
PPPIOCGASYNCMAP = 0x80047458
|
||||
PPPIOCGCHAN = 0x80047437
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
PPPIOCGRASYNCMAP = 0x80047455
|
||||
PPPIOCGUNIT = 0x80047456
|
||||
PPPIOCGXASYNCMAP = 0x80207450
|
||||
PPPIOCNEWUNIT = 0xc004743e
|
||||
PPPIOCSACTIVE = 0x40107446
|
||||
PPPIOCSASYNCMAP = 0x40047457
|
||||
PPPIOCSCOMPRESS = 0x4010744d
|
||||
PPPIOCSDEBUG = 0x40047440
|
||||
PPPIOCSFLAGS = 0x40047459
|
||||
PPPIOCSMAXCID = 0x40047451
|
||||
PPPIOCSMRRU = 0x4004743b
|
||||
PPPIOCSMRU = 0x40047452
|
||||
PPPIOCSNPMODE = 0x4008744b
|
||||
PPPIOCSPASS = 0x40107447
|
||||
PPPIOCSRASYNCMAP = 0x40047454
|
||||
PPPIOCSXASYNCMAP = 0x4020744f
|
||||
PPPIOCXFERUNIT = 0x744e
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1392,6 +1435,7 @@ const (
|
||||
PR_SPEC_DISABLE = 0x4
|
||||
PR_SPEC_ENABLE = 0x2
|
||||
PR_SPEC_FORCE_DISABLE = 0x8
|
||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||
PR_SPEC_NOT_AFFECTED = 0x0
|
||||
PR_SPEC_PRCTL = 0x1
|
||||
PR_SPEC_STORE_BYPASS = 0x0
|
||||
@ -1556,6 +1600,13 @@ const (
|
||||
RLIMIT_SIGPENDING = 0xb
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0xffffffffffffffff
|
||||
RNDADDENTROPY = 0x40085203
|
||||
RNDADDTOENTCNT = 0x40045201
|
||||
RNDCLEARPOOL = 0x5206
|
||||
RNDGETENTCNT = 0x80045200
|
||||
RNDGETPOOL = 0x80085202
|
||||
RNDRESEEDCRNG = 0x5207
|
||||
RNDZAPENTCNT = 0x5204
|
||||
RTAX_ADVMSS = 0x8
|
||||
RTAX_CC_ALGO = 0x10
|
||||
RTAX_CWND = 0x7
|
||||
@ -1757,11 +1808,14 @@ const (
|
||||
SCM_TIMESTAMPNS = 0x23
|
||||
SCM_TXTIME = 0x3d
|
||||
SCM_WIFI_STATUS = 0x29
|
||||
SC_LOG_FLUSH = 0x100000
|
||||
SECCOMP_MODE_DISABLED = 0x0
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SFD_CLOEXEC = 0x80000
|
||||
SFD_NONBLOCK = 0x800
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
SHUT_WR = 0x1
|
||||
@ -1812,6 +1866,9 @@ const (
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGPPPCSTATS = 0x89f2
|
||||
SIOCGPPPSTATS = 0x89f0
|
||||
SIOCGPPPVER = 0x89f1
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
@ -1920,6 +1977,17 @@ const (
|
||||
SO_DETACH_FILTER = 0x1b
|
||||
SO_DOMAIN = 0x27
|
||||
SO_DONTROUTE = 0x5
|
||||
SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
|
||||
SO_EE_CODE_TXTIME_MISSED = 0x2
|
||||
SO_EE_CODE_ZEROCOPY_COPIED = 0x1
|
||||
SO_EE_ORIGIN_ICMP = 0x2
|
||||
SO_EE_ORIGIN_ICMP6 = 0x3
|
||||
SO_EE_ORIGIN_LOCAL = 0x1
|
||||
SO_EE_ORIGIN_NONE = 0x0
|
||||
SO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
SO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
SO_EE_ORIGIN_TXTIME = 0x6
|
||||
SO_EE_ORIGIN_ZEROCOPY = 0x5
|
||||
SO_ERROR = 0x4
|
||||
SO_GET_FILTER = 0x1a
|
||||
SO_INCOMING_CPU = 0x31
|
||||
@ -2039,7 +2107,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0x8
|
||||
TASKSTATS_VERSION = 0x9
|
||||
TCFLSH = 0x540b
|
||||
TCGETA = 0x5405
|
||||
TCGETS = 0x5401
|
||||
@ -2053,6 +2121,7 @@ const (
|
||||
TCOOFF = 0x0
|
||||
TCOON = 0x1
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
TCP_COOKIE_IN_ALWAYS = 0x1
|
||||
TCP_COOKIE_MAX = 0x10
|
||||
@ -2067,6 +2136,7 @@ const (
|
||||
TCP_FASTOPEN_KEY = 0x21
|
||||
TCP_FASTOPEN_NO_COOKIE = 0x22
|
||||
TCP_INFO = 0xb
|
||||
TCP_INQ = 0x24
|
||||
TCP_KEEPCNT = 0x6
|
||||
TCP_KEEPIDLE = 0x4
|
||||
TCP_KEEPINTVL = 0x5
|
||||
@ -2086,6 +2156,9 @@ const (
|
||||
TCP_QUEUE_SEQ = 0x15
|
||||
TCP_QUICKACK = 0xc
|
||||
TCP_REPAIR = 0x13
|
||||
TCP_REPAIR_OFF = 0x0
|
||||
TCP_REPAIR_OFF_NO_WP = -0x1
|
||||
TCP_REPAIR_ON = 0x1
|
||||
TCP_REPAIR_OPTIONS = 0x16
|
||||
TCP_REPAIR_QUEUE = 0x14
|
||||
TCP_REPAIR_WINDOW = 0x1d
|
||||
@ -2100,6 +2173,7 @@ const (
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TCSAFLUSH = 0x2
|
||||
TCSBRK = 0x5409
|
||||
TCSBRKP = 0x5425
|
||||
@ -2116,6 +2190,7 @@ const (
|
||||
TCSETXF = 0x5434
|
||||
TCSETXW = 0x5435
|
||||
TCXONC = 0x540a
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIOCCBRK = 0x5428
|
||||
TIOCCONS = 0x541d
|
||||
TIOCEXCL = 0x540c
|
||||
@ -2123,6 +2198,7 @@ const (
|
||||
TIOCGETD = 0x5424
|
||||
TIOCGEXCL = 0x80045440
|
||||
TIOCGICOUNT = 0x545d
|
||||
TIOCGISO7816 = 0x80285442
|
||||
TIOCGLCKTRMIOS = 0x5456
|
||||
TIOCGPGRP = 0x540f
|
||||
TIOCGPKT = 0x80045438
|
||||
@ -2176,6 +2252,7 @@ const (
|
||||
TIOCSER_TEMT = 0x1
|
||||
TIOCSETD = 0x5423
|
||||
TIOCSIG = 0x40045436
|
||||
TIOCSISO7816 = 0xc0285443
|
||||
TIOCSLCKTRMIOS = 0x5457
|
||||
TIOCSPGRP = 0x5410
|
||||
TIOCSPTLCK = 0x40045431
|
||||
@ -2405,6 +2482,7 @@ const (
|
||||
XDP_UMEM_REG = 0x4
|
||||
XDP_ZEROCOPY = 0x4
|
||||
XENFS_SUPER_MAGIC = 0xabba1974
|
||||
XFS_SUPER_MAGIC = 0x58465342
|
||||
XTABS = 0x1800
|
||||
ZSMALLOC_MAGIC = 0x58295829
|
||||
)
|
||||
|
4240
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
4240
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
File diff suppressed because it is too large
Load Diff
1762
vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
generated
vendored
Normal file
1762
vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// mksyscall_aix_ppc.pl -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go
|
||||
// go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build aix,ppc
|
||||
|
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build aix,ppc64
|
||||
|
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build aix,ppc64
|
||||
|
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// mksyscall_aix_ppc64.pl -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build aix,ppc64
|
||||
|
1810
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
generated
vendored
Normal file
1810
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1180
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
generated
vendored
1180
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
generated
vendored
File diff suppressed because it is too large
Load Diff
284
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
generated
vendored
Normal file
284
vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
generated
vendored
Normal file
@ -0,0 +1,284 @@
|
||||
// go run mkasm_darwin.go 386
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
// +build go1.12
|
||||
|
||||
#include "textflag.h"
|
||||
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgroups(SB)
|
||||
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_wait4(SB)
|
||||
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_accept(SB)
|
||||
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_bind(SB)
|
||||
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_connect(SB)
|
||||
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_socket(SB)
|
||||
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockopt(SB)
|
||||
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsockopt(SB)
|
||||
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpeername(SB)
|
||||
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockname(SB)
|
||||
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_shutdown(SB)
|
||||
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_socketpair(SB)
|
||||
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvfrom(SB)
|
||||
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendto(SB)
|
||||
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvmsg(SB)
|
||||
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendmsg(SB)
|
||||
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_madvise(SB)
|
||||
TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlock(SB)
|
||||
TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlockall(SB)
|
||||
TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mprotect(SB)
|
||||
TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_msync(SB)
|
||||
TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlock(SB)
|
||||
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getattrlist(SB)
|
||||
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe(SB)
|
||||
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getxattr(SB)
|
||||
TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fgetxattr(SB)
|
||||
TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setxattr(SB)
|
||||
TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsetxattr(SB)
|
||||
TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_removexattr(SB)
|
||||
TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fremovexattr(SB)
|
||||
TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_listxattr(SB)
|
||||
TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flistxattr(SB)
|
||||
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setattrlist(SB)
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendfile(SB)
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_access(SB)
|
||||
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_adjtime(SB)
|
||||
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chdir(SB)
|
||||
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chflags(SB)
|
||||
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chmod(SB)
|
||||
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup(SB)
|
||||
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup2(SB)
|
||||
TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_exchangedata(SB)
|
||||
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_exit(SB)
|
||||
TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_faccessat(SB)
|
||||
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchdir(SB)
|
||||
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchflags(SB)
|
||||
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmod(SB)
|
||||
TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmodat(SB)
|
||||
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchown(SB)
|
||||
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchownat(SB)
|
||||
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flock(SB)
|
||||
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fpathconf(SB)
|
||||
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsync(SB)
|
||||
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ftruncate(SB)
|
||||
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getdtablesize(SB)
|
||||
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getegid(SB)
|
||||
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_geteuid(SB)
|
||||
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgid(SB)
|
||||
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgid(SB)
|
||||
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgrp(SB)
|
||||
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpid(SB)
|
||||
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getppid(SB)
|
||||
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpriority(SB)
|
||||
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrlimit(SB)
|
||||
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrusage(SB)
|
||||
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsid(SB)
|
||||
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getuid(SB)
|
||||
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_issetugid(SB)
|
||||
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kqueue(SB)
|
||||
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lchown(SB)
|
||||
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_link(SB)
|
||||
TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_linkat(SB)
|
||||
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_listen(SB)
|
||||
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdir(SB)
|
||||
TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdirat(SB)
|
||||
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkfifo(SB)
|
||||
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mknod(SB)
|
||||
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_open(SB)
|
||||
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_openat(SB)
|
||||
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pathconf(SB)
|
||||
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pread(SB)
|
||||
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pwrite(SB)
|
||||
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_read(SB)
|
||||
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlink(SB)
|
||||
TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlinkat(SB)
|
||||
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_rename(SB)
|
||||
TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_renameat(SB)
|
||||
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_revoke(SB)
|
||||
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_rmdir(SB)
|
||||
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lseek(SB)
|
||||
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_select(SB)
|
||||
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setegid(SB)
|
||||
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_seteuid(SB)
|
||||
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgid(SB)
|
||||
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setlogin(SB)
|
||||
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpgid(SB)
|
||||
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpriority(SB)
|
||||
TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setprivexec(SB)
|
||||
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setregid(SB)
|
||||
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setreuid(SB)
|
||||
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setrlimit(SB)
|
||||
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsid(SB)
|
||||
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_settimeofday(SB)
|
||||
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setuid(SB)
|
||||
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlink(SB)
|
||||
TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlinkat(SB)
|
||||
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sync(SB)
|
||||
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_truncate(SB)
|
||||
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_umask(SB)
|
||||
TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_undelete(SB)
|
||||
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlink(SB)
|
||||
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlinkat(SB)
|
||||
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unmount(SB)
|
||||
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_write(SB)
|
||||
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mmap(SB)
|
||||
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munmap(SB)
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_gettimeofday(SB)
|
||||
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstat64(SB)
|
||||
TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatat64(SB)
|
||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatfs64(SB)
|
||||
TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___getdirentries64(SB)
|
||||
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getfsstat64(SB)
|
||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lstat64(SB)
|
||||
TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_stat64(SB)
|
||||
TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_statfs64(SB)
|
1810
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
generated
vendored
Normal file
1810
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1195
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
1195
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
File diff suppressed because it is too large
Load Diff
286
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
Normal file
286
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
Normal file
@ -0,0 +1,286 @@
|
||||
// go run mkasm_darwin.go amd64
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
// +build go1.12
|
||||
|
||||
#include "textflag.h"
|
||||
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgroups(SB)
|
||||
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_wait4(SB)
|
||||
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_accept(SB)
|
||||
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_bind(SB)
|
||||
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_connect(SB)
|
||||
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_socket(SB)
|
||||
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockopt(SB)
|
||||
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsockopt(SB)
|
||||
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpeername(SB)
|
||||
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockname(SB)
|
||||
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_shutdown(SB)
|
||||
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_socketpair(SB)
|
||||
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvfrom(SB)
|
||||
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendto(SB)
|
||||
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvmsg(SB)
|
||||
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendmsg(SB)
|
||||
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_madvise(SB)
|
||||
TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlock(SB)
|
||||
TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlockall(SB)
|
||||
TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mprotect(SB)
|
||||
TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_msync(SB)
|
||||
TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlock(SB)
|
||||
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getattrlist(SB)
|
||||
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe(SB)
|
||||
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getxattr(SB)
|
||||
TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fgetxattr(SB)
|
||||
TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setxattr(SB)
|
||||
TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsetxattr(SB)
|
||||
TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_removexattr(SB)
|
||||
TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fremovexattr(SB)
|
||||
TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_listxattr(SB)
|
||||
TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flistxattr(SB)
|
||||
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setattrlist(SB)
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendfile(SB)
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_access(SB)
|
||||
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_adjtime(SB)
|
||||
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chdir(SB)
|
||||
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chflags(SB)
|
||||
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chmod(SB)
|
||||
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_clock_gettime(SB)
|
||||
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup(SB)
|
||||
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup2(SB)
|
||||
TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_exchangedata(SB)
|
||||
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_exit(SB)
|
||||
TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_faccessat(SB)
|
||||
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchdir(SB)
|
||||
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchflags(SB)
|
||||
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmod(SB)
|
||||
TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmodat(SB)
|
||||
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchown(SB)
|
||||
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchownat(SB)
|
||||
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flock(SB)
|
||||
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fpathconf(SB)
|
||||
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsync(SB)
|
||||
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ftruncate(SB)
|
||||
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getdtablesize(SB)
|
||||
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getegid(SB)
|
||||
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_geteuid(SB)
|
||||
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgid(SB)
|
||||
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgid(SB)
|
||||
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgrp(SB)
|
||||
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpid(SB)
|
||||
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getppid(SB)
|
||||
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpriority(SB)
|
||||
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrlimit(SB)
|
||||
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrusage(SB)
|
||||
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsid(SB)
|
||||
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getuid(SB)
|
||||
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_issetugid(SB)
|
||||
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kqueue(SB)
|
||||
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lchown(SB)
|
||||
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_link(SB)
|
||||
TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_linkat(SB)
|
||||
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_listen(SB)
|
||||
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdir(SB)
|
||||
TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdirat(SB)
|
||||
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkfifo(SB)
|
||||
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mknod(SB)
|
||||
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_open(SB)
|
||||
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_openat(SB)
|
||||
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pathconf(SB)
|
||||
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pread(SB)
|
||||
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pwrite(SB)
|
||||
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_read(SB)
|
||||
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlink(SB)
|
||||
TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlinkat(SB)
|
||||
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_rename(SB)
|
||||
TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_renameat(SB)
|
||||
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_revoke(SB)
|
||||
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_rmdir(SB)
|
||||
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lseek(SB)
|
||||
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_select(SB)
|
||||
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setegid(SB)
|
||||
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_seteuid(SB)
|
||||
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgid(SB)
|
||||
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setlogin(SB)
|
||||
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpgid(SB)
|
||||
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpriority(SB)
|
||||
TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setprivexec(SB)
|
||||
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setregid(SB)
|
||||
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setreuid(SB)
|
||||
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setrlimit(SB)
|
||||
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsid(SB)
|
||||
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_settimeofday(SB)
|
||||
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setuid(SB)
|
||||
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlink(SB)
|
||||
TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlinkat(SB)
|
||||
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sync(SB)
|
||||
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_truncate(SB)
|
||||
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_umask(SB)
|
||||
TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_undelete(SB)
|
||||
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlink(SB)
|
||||
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlinkat(SB)
|
||||
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unmount(SB)
|
||||
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_write(SB)
|
||||
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mmap(SB)
|
||||
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munmap(SB)
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_gettimeofday(SB)
|
||||
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstat64(SB)
|
||||
TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatat64(SB)
|
||||
TEXT ·libc_fstatfs64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatfs64(SB)
|
||||
TEXT ·libc___getdirentries64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___getdirentries64(SB)
|
||||
TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getfsstat64(SB)
|
||||
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lstat64(SB)
|
||||
TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_stat64(SB)
|
||||
TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_statfs64(SB)
|
1793
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
generated
vendored
Normal file
1793
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1158
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
generated
vendored
1158
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
generated
vendored
File diff suppressed because it is too large
Load Diff
282
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
generated
vendored
Normal file
282
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
generated
vendored
Normal file
@ -0,0 +1,282 @@
|
||||
// go run mkasm_darwin.go arm
|
||||
// Code generated by the command above; DO NOT EDIT.
|
||||
|
||||
// +build go1.12
|
||||
|
||||
#include "textflag.h"
|
||||
TEXT ·libc_getgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgroups(SB)
|
||||
TEXT ·libc_setgroups_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgroups(SB)
|
||||
TEXT ·libc_wait4_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_wait4(SB)
|
||||
TEXT ·libc_accept_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_accept(SB)
|
||||
TEXT ·libc_bind_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_bind(SB)
|
||||
TEXT ·libc_connect_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_connect(SB)
|
||||
TEXT ·libc_socket_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_socket(SB)
|
||||
TEXT ·libc_getsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockopt(SB)
|
||||
TEXT ·libc_setsockopt_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsockopt(SB)
|
||||
TEXT ·libc_getpeername_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpeername(SB)
|
||||
TEXT ·libc_getsockname_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsockname(SB)
|
||||
TEXT ·libc_shutdown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_shutdown(SB)
|
||||
TEXT ·libc_socketpair_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_socketpair(SB)
|
||||
TEXT ·libc_recvfrom_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvfrom(SB)
|
||||
TEXT ·libc_sendto_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendto(SB)
|
||||
TEXT ·libc_recvmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_recvmsg(SB)
|
||||
TEXT ·libc_sendmsg_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendmsg(SB)
|
||||
TEXT ·libc_kevent_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kevent(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_madvise(SB)
|
||||
TEXT ·libc_mlock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlock(SB)
|
||||
TEXT ·libc_mlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mlockall(SB)
|
||||
TEXT ·libc_mprotect_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mprotect(SB)
|
||||
TEXT ·libc_msync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_msync(SB)
|
||||
TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlock(SB)
|
||||
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getattrlist(SB)
|
||||
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pipe(SB)
|
||||
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getxattr(SB)
|
||||
TEXT ·libc_fgetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fgetxattr(SB)
|
||||
TEXT ·libc_setxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setxattr(SB)
|
||||
TEXT ·libc_fsetxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsetxattr(SB)
|
||||
TEXT ·libc_removexattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_removexattr(SB)
|
||||
TEXT ·libc_fremovexattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fremovexattr(SB)
|
||||
TEXT ·libc_listxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_listxattr(SB)
|
||||
TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flistxattr(SB)
|
||||
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setattrlist(SB)
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendfile(SB)
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_access(SB)
|
||||
TEXT ·libc_adjtime_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_adjtime(SB)
|
||||
TEXT ·libc_chdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chdir(SB)
|
||||
TEXT ·libc_chflags_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chflags(SB)
|
||||
TEXT ·libc_chmod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chmod(SB)
|
||||
TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup(SB)
|
||||
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_dup2(SB)
|
||||
TEXT ·libc_exchangedata_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_exchangedata(SB)
|
||||
TEXT ·libc_exit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_exit(SB)
|
||||
TEXT ·libc_faccessat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_faccessat(SB)
|
||||
TEXT ·libc_fchdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchdir(SB)
|
||||
TEXT ·libc_fchflags_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchflags(SB)
|
||||
TEXT ·libc_fchmod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmod(SB)
|
||||
TEXT ·libc_fchmodat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchmodat(SB)
|
||||
TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchown(SB)
|
||||
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fchownat(SB)
|
||||
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flock(SB)
|
||||
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fpathconf(SB)
|
||||
TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fsync(SB)
|
||||
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ftruncate(SB)
|
||||
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getdtablesize(SB)
|
||||
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getegid(SB)
|
||||
TEXT ·libc_geteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_geteuid(SB)
|
||||
TEXT ·libc_getgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getgid(SB)
|
||||
TEXT ·libc_getpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgid(SB)
|
||||
TEXT ·libc_getpgrp_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpgrp(SB)
|
||||
TEXT ·libc_getpid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpid(SB)
|
||||
TEXT ·libc_getppid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getppid(SB)
|
||||
TEXT ·libc_getpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getpriority(SB)
|
||||
TEXT ·libc_getrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrlimit(SB)
|
||||
TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getrusage(SB)
|
||||
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getsid(SB)
|
||||
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getuid(SB)
|
||||
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_issetugid(SB)
|
||||
TEXT ·libc_kqueue_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kqueue(SB)
|
||||
TEXT ·libc_lchown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lchown(SB)
|
||||
TEXT ·libc_link_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_link(SB)
|
||||
TEXT ·libc_linkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_linkat(SB)
|
||||
TEXT ·libc_listen_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_listen(SB)
|
||||
TEXT ·libc_mkdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdir(SB)
|
||||
TEXT ·libc_mkdirat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkdirat(SB)
|
||||
TEXT ·libc_mkfifo_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mkfifo(SB)
|
||||
TEXT ·libc_mknod_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mknod(SB)
|
||||
TEXT ·libc_open_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_open(SB)
|
||||
TEXT ·libc_openat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_openat(SB)
|
||||
TEXT ·libc_pathconf_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pathconf(SB)
|
||||
TEXT ·libc_pread_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pread(SB)
|
||||
TEXT ·libc_pwrite_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_pwrite(SB)
|
||||
TEXT ·libc_read_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_read(SB)
|
||||
TEXT ·libc_readlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlink(SB)
|
||||
TEXT ·libc_readlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_readlinkat(SB)
|
||||
TEXT ·libc_rename_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_rename(SB)
|
||||
TEXT ·libc_renameat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_renameat(SB)
|
||||
TEXT ·libc_revoke_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_revoke(SB)
|
||||
TEXT ·libc_rmdir_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_rmdir(SB)
|
||||
TEXT ·libc_lseek_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lseek(SB)
|
||||
TEXT ·libc_select_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_select(SB)
|
||||
TEXT ·libc_setegid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setegid(SB)
|
||||
TEXT ·libc_seteuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_seteuid(SB)
|
||||
TEXT ·libc_setgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setgid(SB)
|
||||
TEXT ·libc_setlogin_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setlogin(SB)
|
||||
TEXT ·libc_setpgid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpgid(SB)
|
||||
TEXT ·libc_setpriority_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setpriority(SB)
|
||||
TEXT ·libc_setprivexec_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setprivexec(SB)
|
||||
TEXT ·libc_setregid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setregid(SB)
|
||||
TEXT ·libc_setreuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setreuid(SB)
|
||||
TEXT ·libc_setrlimit_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setrlimit(SB)
|
||||
TEXT ·libc_setsid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setsid(SB)
|
||||
TEXT ·libc_settimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_settimeofday(SB)
|
||||
TEXT ·libc_setuid_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setuid(SB)
|
||||
TEXT ·libc_symlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlink(SB)
|
||||
TEXT ·libc_symlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_symlinkat(SB)
|
||||
TEXT ·libc_sync_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sync(SB)
|
||||
TEXT ·libc_truncate_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_truncate(SB)
|
||||
TEXT ·libc_umask_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_umask(SB)
|
||||
TEXT ·libc_undelete_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_undelete(SB)
|
||||
TEXT ·libc_unlink_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlink(SB)
|
||||
TEXT ·libc_unlinkat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unlinkat(SB)
|
||||
TEXT ·libc_unmount_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_unmount(SB)
|
||||
TEXT ·libc_write_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_write(SB)
|
||||
TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_mmap(SB)
|
||||
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munmap(SB)
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_gettimeofday(SB)
|
||||
TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstat(SB)
|
||||
TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatat(SB)
|
||||
TEXT ·libc_fstatfs_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstatfs(SB)
|
||||
TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getfsstat(SB)
|
||||
TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_lstat(SB)
|
||||
TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_stat(SB)
|
||||
TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_statfs(SB)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user