summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-12-12 00:05:15 +0100
committerGitHub <noreply@github.com>2021-12-12 00:05:15 +0100
commit3893a035be347a7687a41d2054dd1b274d3a0504 (patch)
treedfe4a3bf72a0a6356e51bd8fc2e88e9a26e52331 /vendor
parent658bdd9faa835660ae407331732e9d93d8f6443b (diff)
downloadmatterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.gz
matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.bz2
matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.zip
Update dependencies/vendor (#1659)
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/Rhymen/go-whatsapp/README.md2
-rw-r--r--vendor/github.com/Rhymen/go-whatsapp/session.go2
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml7
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/.travis.yml20
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md2
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/README.md249
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/api/errors.go48
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/api/execute.go3
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/api/market.go16
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/api/marusia.go103
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/api/upload.go54
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/doc.go2
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/object/market.go2
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/object/marusia.go52
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/object/messages.go13
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/object/stories.go35
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/object/video.go1
-rw-r--r--vendor/github.com/d5/tengo/v2/README.md4
-rw-r--r--vendor/github.com/d5/tengo/v2/compiler.go70
-rw-r--r--vendor/github.com/d5/tengo/v2/modules.go5
-rw-r--r--vendor/github.com/d5/tengo/v2/script.go16
-rw-r--r--vendor/github.com/d5/tengo/v2/tengo.go3
-rw-r--r--vendor/github.com/d5/tengo/v2/vm.go2
-rw-r--r--vendor/github.com/gomarkdown/markdown/parser/block.go67
-rw-r--r--vendor/github.com/gomarkdown/markdown/parser/block_table.go18
-rw-r--r--vendor/github.com/gomarkdown/markdown/parser/inline.go17
-rw-r--r--vendor/github.com/google/uuid/null.go118
-rw-r--r--vendor/github.com/google/uuid/uuid.go45
-rw-r--r--vendor/github.com/google/uuid/version4.go27
-rw-r--r--vendor/github.com/json-iterator/go/README.md2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go27
-rw-r--r--vendor/github.com/klauspost/cpuid/v2/.travis.yml67
-rw-r--r--vendor/github.com/klauspost/cpuid/v2/cpuid.go69
-rw-r--r--vendor/github.com/klauspost/cpuid/v2/detect_x86.go2
-rw-r--r--vendor/github.com/klauspost/cpuid/v2/featureid_string.go198
-rw-r--r--vendor/github.com/lrstanley/girc/builtin.go5
-rw-r--r--vendor/github.com/lrstanley/girc/client.go3
-rw-r--r--vendor/github.com/matterbridge/matterclient/matterclient.go14
-rw-r--r--vendor/github.com/mattermost/logr/v2/buffer.go28
-rw-r--r--vendor/github.com/mattermost/logr/v2/config/config.go8
-rw-r--r--vendor/github.com/mattermost/logr/v2/field.go2
-rw-r--r--vendor/github.com/mattermost/logr/v2/filterstd.go6
-rw-r--r--vendor/github.com/mattermost/logr/v2/sugar.go78
-rw-r--r--vendor/github.com/mattermost/logr/v2/targets/testing.go72
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go7
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/bot.go20
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/channel.go1
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/channel_member.go6
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/client4.go16
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/cloud.go9
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/config.go43
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go27
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/integration_action.go8
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/post_embed.go1
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/session.go22
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/shared_channel.go1
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/team_member.go6
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/user.go7
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/utils.go26
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/model/version.go3
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v6/shared/mlog/mlog.go32
-rw-r--r--vendor/github.com/mattn/go-colorable/.travis.yml15
-rw-r--r--vendor/github.com/mattn/go-colorable/README.md2
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_appengine.go1
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_others.go4
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_windows.go14
-rw-r--r--vendor/github.com/mattn/go-colorable/noncolorable.go10
-rw-r--r--vendor/github.com/minio/minio-go/v7/README.md10
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-bucket-replication.go51
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-compose-object.go12
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-datatypes.go24
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-get-object-acl.go39
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-list.go91
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go5
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go4
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-put-object.go15
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-remove.go48
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-restore.go182
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-select.go15
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-stat.go4
-rw-r--r--vendor/github.com/minio/minio-go/v7/api.go92
-rw-r--r--vendor/github.com/minio/minio-go/v7/constants.go9
-rw-r--r--vendor/github.com/minio/minio-go/v7/core.go10
-rw-r--r--vendor/github.com/minio/minio-go/v7/functional_tests.go342
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/credentials/credentials.go20
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go13
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go96
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go9
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go107
-rw-r--r--vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go97
-rw-r--r--vendor/github.com/minio/minio-go/v7/utils.go167
-rw-r--r--vendor/github.com/modern-go/reflect2/.travis.yml2
-rw-r--r--vendor/github.com/modern-go/reflect2/Gopkg.lock8
-rw-r--r--vendor/github.com/modern-go/reflect2/Gopkg.toml4
-rw-r--r--vendor/github.com/modern-go/reflect2/go_above_118.go23
-rw-r--r--vendor/github.com/modern-go/reflect2/go_above_17.go8
-rw-r--r--vendor/github.com/modern-go/reflect2/go_above_19.go3
-rw-r--r--vendor/github.com/modern-go/reflect2/go_below_118.go21
-rw-r--r--vendor/github.com/modern-go/reflect2/go_below_17.go9
-rw-r--r--vendor/github.com/modern-go/reflect2/go_below_19.go14
-rw-r--r--vendor/github.com/modern-go/reflect2/reflect2.go20
-rw-r--r--vendor/github.com/modern-go/reflect2/test.sh12
-rw-r--r--vendor/github.com/modern-go/reflect2/type_map.go51
-rw-r--r--vendor/github.com/modern-go/reflect2/unsafe_link.go26
-rw-r--r--vendor/github.com/modern-go/reflect2/unsafe_map.go8
-rw-r--r--vendor/github.com/slack-go/slack/block.go17
-rw-r--r--vendor/github.com/slack-go/slack/block_conv.go2
-rw-r--r--vendor/github.com/slack-go/slack/block_element.go19
-rw-r--r--vendor/github.com/slack-go/slack/block_rich_text.go383
-rw-r--r--vendor/github.com/slack-go/slack/chat.go7
-rw-r--r--vendor/github.com/slack-go/slack/messages.go32
-rw-r--r--vendor/github.com/slack-go/slack/misc.go10
-rw-r--r--vendor/github.com/slack-go/slack/oauth.go22
-rw-r--r--vendor/github.com/slack-go/slack/users.go4
-rw-r--r--vendor/github.com/slack-go/slack/webhooks.go3
-rw-r--r--vendor/go.uber.org/atomic/CHANGELOG.md40
-rw-r--r--vendor/go.uber.org/atomic/bool.go18
-rw-r--r--vendor/go.uber.org/atomic/bool_ext.go2
-rw-r--r--vendor/go.uber.org/atomic/duration.go18
-rw-r--r--vendor/go.uber.org/atomic/duration_ext.go8
-rw-r--r--vendor/go.uber.org/atomic/error.go10
-rw-r--r--vendor/go.uber.org/atomic/float64.go17
-rw-r--r--vendor/go.uber.org/atomic/float64_ext.go34
-rw-r--r--vendor/go.uber.org/atomic/int32.go22
-rw-r--r--vendor/go.uber.org/atomic/int64.go22
-rw-r--r--vendor/go.uber.org/atomic/string.go10
-rw-r--r--vendor/go.uber.org/atomic/string_ext.go2
-rw-r--r--vendor/go.uber.org/atomic/time.go55
-rw-r--r--vendor/go.uber.org/atomic/time_ext.go36
-rw-r--r--vendor/go.uber.org/atomic/uint32.go22
-rw-r--r--vendor/go.uber.org/atomic/uint64.go22
-rw-r--r--vendor/go.uber.org/atomic/uintptr.go22
-rw-r--r--vendor/go.uber.org/atomic/unsafe_pointer.go14
-rw-r--r--vendor/golang.org/x/crypto/acme/acme.go2
-rw-r--r--vendor/golang.org/x/crypto/acme/rfc8555.go26
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go (renamed from vendor/golang.org/x/crypto/poly1305/bits_compat.go)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go (renamed from vendor/golang.org/x/crypto/poly1305/bits_go1.13.go)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go (renamed from vendor/golang.org/x/crypto/poly1305/mac_noasm.go)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/poly1305.go (renamed from vendor/golang.org/x/crypto/poly1305/poly1305.go)2
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go (renamed from vendor/golang.org/x/crypto/poly1305/sum_amd64.go)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s (renamed from vendor/golang.org/x/crypto/poly1305/sum_amd64.s)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go (renamed from vendor/golang.org/x/crypto/poly1305/sum_generic.go)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go (renamed from vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s (renamed from vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go (renamed from vendor/golang.org/x/crypto/poly1305/sum_s390x.go)0
-rw-r--r--vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s (renamed from vendor/golang.org/x/crypto/poly1305/sum_s390x.s)2
-rw-r--r--vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go2
-rw-r--r--vendor/golang.org/x/crypto/ssh/cipher.go2
-rw-r--r--vendor/golang.org/x/net/http2/client_conn_pool.go47
-rw-r--r--vendor/golang.org/x/net/http2/errors.go7
-rw-r--r--vendor/golang.org/x/net/http2/frame.go60
-rw-r--r--vendor/golang.org/x/net/http2/pipe.go11
-rw-r--r--vendor/golang.org/x/net/http2/server.go101
-rw-r--r--vendor/golang.org/x/net/http2/transport.go1157
-rw-r--r--vendor/golang.org/x/sys/unix/mkerrors.sh7
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.go40
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux.go49
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_386.go37
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_amd64.go37
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm.go37
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm64.go47
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go35
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go34
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc.go37
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go37
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go47
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_s390x.go35
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go36
-rw-r--r--vendor/golang.org/x/sys/unix/sysvshm_linux.go21
-rw-r--r--vendor/golang.org/x/sys/unix/sysvshm_unix.go61
-rw-r--r--vendor/golang.org/x/sys/unix/sysvshm_unix_other.go14
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go3126
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go3126
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go59
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s24
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go59
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s24
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux.go47
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_386.go42
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go42
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go42
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go44
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go32
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go32
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go44
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go42
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go42
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go42
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go32
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go31
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go127
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go127
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux.go20
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_386.go29
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm.go29
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips.go28
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go26
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go28
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go30
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go25
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go25
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go25
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go25
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go5
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows.go14
-rw-r--r--vendor/golang.org/x/sys/windows/zsyscall_windows.go45
-rw-r--r--vendor/modules.txt50
212 files changed, 8553 insertions, 5582 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/README.md b/vendor/github.com/Rhymen/go-whatsapp/README.md
index 7f12dd72..ea66f5bb 100644
--- a/vendor/github.com/Rhymen/go-whatsapp/README.md
+++ b/vendor/github.com/Rhymen/go-whatsapp/README.md
@@ -70,7 +70,7 @@ func (myHandler) HandleContactMessage(message whatsapp.ContactMessage) {
fmt.Println(message)
}
-func (myHandler) HandleBatteryMessage(msg whatsapp.BatteryMessage) {
+func (myHandler) HandleBatteryMessage(message whatsapp.BatteryMessage) {
fmt.Println(message)
}
diff --git a/vendor/github.com/Rhymen/go-whatsapp/session.go b/vendor/github.com/Rhymen/go-whatsapp/session.go
index 63a6905c..215fb599 100644
--- a/vendor/github.com/Rhymen/go-whatsapp/session.go
+++ b/vendor/github.com/Rhymen/go-whatsapp/session.go
@@ -526,5 +526,7 @@ func (wac *Conn) Logout() error {
return fmt.Errorf("error writing logout: %v\n", err)
}
+ wac.loggedIn = false
+
return nil
}
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml b/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml
index 95108696..cb8abdca 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml
+++ b/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml
@@ -48,6 +48,11 @@ linters:
- nilerr
- revive
- wastedassign
+ - bidichk
+ - contextcheck
+ - ireturn
+ - nilnil
+ - tenv
# - wrapcheck # TODO: v3 Fix
# - testpackage # TODO: Fix testpackage
@@ -75,6 +80,8 @@ linters:
# - cyclop
# - promlinter
# - tagliatelle
+# - errname
+# - varnamelen
# depricated
# - maligned
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/.travis.yml b/vendor/github.com/SevereCloud/vksdk/v2/.travis.yml
deleted file mode 100644
index 47727020..00000000
--- a/vendor/github.com/SevereCloud/vksdk/v2/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-language: go
-
-cache:
- directories:
- - $HOME/.cache/go-build
- - $HOME/gopath/pkg/mod
-
-go:
- - 1.x
-
-before_script:
- - git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- - git describe --tags $(git rev-list --tags --max-count=1) --always
-
-script:
- - go test -v -race -coverprofile=coverage.txt -covermode=atomic -p=1 ./...
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md b/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md
index e78a83ea..7606cad8 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md
+++ b/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md
@@ -39,6 +39,7 @@ golangci-lint run
# CLIENT_SECRET=""
# USER_TOKEN=""
# WIDGET_TOKEN=""
+# MARUSIA_TOKEN=""
# CLIENT_ID="123456"
# GROUP_ID="123456"
# ACCOUNT_ID="123456"
@@ -56,6 +57,7 @@ go test ./...
"go.testEnvVars": {
"SERVICE_TOKEN": "",
"WIDGET_TOKEN": "",
+ "MARUSIA_TOKEN": "",
"GROUP_TOKEN": "",
"CLIENT_SECRET": "",
"USER_TOKEN": "",
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/README.md b/vendor/github.com/SevereCloud/vksdk/v2/README.md
index c3ddd2d3..60e89dd4 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/README.md
+++ b/vendor/github.com/SevereCloud/vksdk/v2/README.md
@@ -1,125 +1,124 @@
-# VK SDK for Golang
-
-[![Build Status](https://travis-ci.com/SevereCloud/vksdk.svg?branch=master)](https://travis-ci.com/SevereCloud/vksdk)
-[![PkgGoDev](https://pkg.go.dev/badge/github.com/SevereCloud/vksdk/v2/v2)](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2?tab=subdirectories)
-[![VK Developers](https://img.shields.io/badge/developers-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.com/dev/)
-[![codecov](https://codecov.io/gh/SevereCloud/vksdk/branch/master/graph/badge.svg)](https://codecov.io/gh/SevereCloud/vksdk)
-[![VK chat](https://img.shields.io/badge/VK%20chat-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.me/join/AJQ1d6Or8Q00Y_CSOESfbqGt)
-[![release](https://img.shields.io/github/v/tag/SevereCloud/vksdk?label=release)](https://github.com/SevereCloud/vksdk/releases)
-[![license](https://img.shields.io/github/license/SevereCloud/vksdk.svg?maxAge=2592000)](https://github.com/SevereCloud/vksdk/blob/master/LICENSE)
-
-**VK SDK for Golang** ready implementation of the main VK API functions for Go.
-
-[Russian documentation](https://github.com/SevereCloud/vksdk/wiki)
-
-## Features
-
-Version API 5.131.
-
-- [API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/api)
- - 400+ methods
- - Ability to change the request handler
- - Ability to modify HTTP client
- - Request Limiter
- - Token pool
-- [Callback API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/callback)
- - Tracking tool for users activity in your VK communities
- - Supports all events
- - Auto setting callback
-- [Bots Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-bot)
- - Allows you to work with community events in real time
- - Supports all events
- - Ability to modify HTTP client
-- [User Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-user)
- - Allows you to work with user events in real time
- - Ability to modify HTTP client
-- [Streaming API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/streaming)
- - Receiving public data from VK by specified keywords
- - Ability to modify HTTP client
-- [FOAF](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/foaf)
- - Machine-readable ontology describing persons
- - Works with users and groups
- - The only place to get page creation date
-- [Games](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/games)
- - Checking launch parameters
- - Intermediate http handler
-- [VK Mini Apps](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/vkapps)
- - Checking launch parameters
- - Intermediate http handler
-- [Payments API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/payments)
- - Processes payment notifications
-- [Marusia Skills](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/marusia)
- - For creating Marusia Skills
- - Support SSML
-
-## Install
-
-```bash
-# go mod init mymodulename
-go get github.com/SevereCloud/vksdk/v2@latest
-```
-
-## Use by
-
-- [Joe](https://github.com/go-joe/joe) adapter: <https://github.com/tdakkota/joe-vk-adapter>
-- [Logrus](https://github.com/sirupsen/logrus) hook: <https://github.com/SevereCloud/vkrus>
-
-### Example
-
-```go
-package main
-
-import (
- "context"
- "log"
-
- "github.com/SevereCloud/vksdk/v2/api"
- "github.com/SevereCloud/vksdk/v2/api/params"
- "github.com/SevereCloud/vksdk/v2/events"
- "github.com/SevereCloud/vksdk/v2/longpoll-bot"
-)
-
-func main() {
- token := "<TOKEN>" // use os.Getenv("TOKEN")
- vk := api.NewVK(token)
-
- // get information about the group
- group, err := vk.GroupsGetByID(nil)
- if err != nil {
- log.Fatal(err)
- }
-
- // Initializing Long Poll
- lp, err := longpoll.NewLongPoll(vk, group[0].ID)
- if err != nil {
- log.Fatal(err)
- }
-
- // New message event
- lp.MessageNew(func(_ context.Context, obj events.MessageNewObject) {
- log.Printf("%d: %s", obj.Message.PeerID, obj.Message.Text)
-
- if obj.Message.Text == "ping" {
- b := params.NewMessagesSendBuilder()
- b.Message("pong")
- b.RandomID(0)
- b.PeerID(obj.Message.PeerID)
-
- _, err := vk.MessagesSend(b.Params)
- if err != nil {
- log.Fatal(err)
- }
- }
- })
-
- // Run Bots Long Poll
- log.Println("Start Long Poll")
- if err := lp.Run(); err != nil {
- log.Fatal(err)
- }
-}
-```
-
-## LICENSE
-
-[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk?ref=badge_large)
+# VK SDK for Golang
+
+[![PkgGoDev](https://pkg.go.dev/badge/github.com/SevereCloud/vksdk/v2/v2)](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2?tab=subdirectories)
+[![VK Developers](https://img.shields.io/badge/developers-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.com/dev/)
+[![codecov](https://codecov.io/gh/SevereCloud/vksdk/branch/master/graph/badge.svg)](https://codecov.io/gh/SevereCloud/vksdk)
+[![VK chat](https://img.shields.io/badge/VK%20chat-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.me/join/AJQ1d6Or8Q00Y_CSOESfbqGt)
+[![release](https://img.shields.io/github/v/tag/SevereCloud/vksdk?label=release)](https://github.com/SevereCloud/vksdk/releases)
+[![license](https://img.shields.io/github/license/SevereCloud/vksdk.svg?maxAge=2592000)](https://github.com/SevereCloud/vksdk/blob/master/LICENSE)
+
+**VK SDK for Golang** ready implementation of the main VK API functions for Go.
+
+[Russian documentation](https://github.com/SevereCloud/vksdk/wiki)
+
+## Features
+
+Version API 5.131.
+
+- [API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/api)
+ - 400+ methods
+ - Ability to change the request handler
+ - Ability to modify HTTP client
+ - Request Limiter
+ - Token pool
+- [Callback API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/callback)
+ - Tracking tool for users activity in your VK communities
+ - Supports all events
+ - Auto setting callback
+- [Bots Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-bot)
+ - Allows you to work with community events in real time
+ - Supports all events
+ - Ability to modify HTTP client
+- [User Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-user)
+ - Allows you to work with user events in real time
+ - Ability to modify HTTP client
+- [Streaming API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/streaming)
+ - Receiving public data from VK by specified keywords
+ - Ability to modify HTTP client
+- [FOAF](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/foaf)
+ - Machine-readable ontology describing persons
+ - Works with users and groups
+ - The only place to get page creation date
+- [Games](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/games)
+ - Checking launch parameters
+ - Intermediate http handler
+- [VK Mini Apps](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/vkapps)
+ - Checking launch parameters
+ - Intermediate http handler
+- [Payments API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/payments)
+ - Processes payment notifications
+- [Marusia Skills](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/marusia)
+ - For creating Marusia Skills
+ - Support SSML
+
+## Install
+
+```bash
+# go mod init mymodulename
+go get github.com/SevereCloud/vksdk/v2@latest
+```
+
+## Use by
+
+- [Joe](https://github.com/go-joe/joe) adapter: <https://github.com/tdakkota/joe-vk-adapter>
+- [Logrus](https://github.com/sirupsen/logrus) hook: <https://github.com/SevereCloud/vkrus>
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "log"
+
+ "github.com/SevereCloud/vksdk/v2/api"
+ "github.com/SevereCloud/vksdk/v2/api/params"
+ "github.com/SevereCloud/vksdk/v2/events"
+ "github.com/SevereCloud/vksdk/v2/longpoll-bot"
+)
+
+func main() {
+ token := "<TOKEN>" // use os.Getenv("TOKEN")
+ vk := api.NewVK(token)
+
+ // get information about the group
+ group, err := vk.GroupsGetByID(nil)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // Initializing Long Poll
+ lp, err := longpoll.NewLongPoll(vk, group[0].ID)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // New message event
+ lp.MessageNew(func(_ context.Context, obj events.MessageNewObject) {
+ log.Printf("%d: %s", obj.Message.PeerID, obj.Message.Text)
+
+ if obj.Message.Text == "ping" {
+ b := params.NewMessagesSendBuilder()
+ b.Message("pong")
+ b.RandomID(0)
+ b.PeerID(obj.Message.PeerID)
+
+ _, err := vk.MessagesSend(b.Params)
+ if err != nil {
+ log.Fatal(err)
+ }
+ }
+ })
+
+ // Run Bots Long Poll
+ log.Println("Start Long Poll")
+ if err := lp.Run(); err != nil {
+ log.Fatal(err)
+ }
+}
+```
+
+## LICENSE
+
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk?ref=badge_large)
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go b/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go
index e9ea1310..03032aa6 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go
@@ -159,6 +159,9 @@ const (
ErrRateLimit ErrorType = 29
ErrPrivateProfile ErrorType = 30 // This profile is private
+ // Client version deprecated.
+ ErrClientVersionDeprecated ErrorType = 34
+
// Method execution was interrupted due to timeout.
ErrExecutionTimeout ErrorType = 36
@@ -177,6 +180,9 @@ const (
// Additional signup required.
ErrAdditionalSignupRequired ErrorType = 41
+ // IP is not allowed.
+ ErrIPNotAllowed ErrorType = 42
+
// One of the parameters specified was missing or invalid
//
// Check the required parameters list and their format on a method
@@ -586,6 +592,12 @@ const (
// Can't send message, reply timed out.
ErrMessagesReplyTimedOut ErrorType = 950
+ // You can't access donut chat without subscription.
+ ErrMessagesAccessDonutChat ErrorType = 962
+
+ // This user can't be added to the work chat, as they aren't an employe.
+ ErrMessagesAccessWorkChat ErrorType = 967
+
// Invalid phone number.
ErrParamPhone ErrorType = 1000
@@ -598,6 +610,12 @@ const (
// Processing.. Try later.
ErrAuthDelay ErrorType = 1112
+ // Anonymous token has expired.
+ ErrAnonymousTokenExpired ErrorType = 1114
+
+ // Anonymous token is invalid.
+ ErrAnonymousTokenInvalid ErrorType = 1116
+
// Invalid document id.
ErrParamDocID ErrorType = 1150
@@ -724,6 +742,9 @@ const (
// Market was already disabled in this group.
ErrMarketAlreadyDisabled ErrorType = 1432
+ // Main album can not be hidden.
+ ErrMainAlbumCantHidden ErrorType = 1446
+
// Story has already expired.
ErrStoryExpired ErrorType = 1600
@@ -783,6 +804,33 @@ const (
// Can't set AliExpress tag to this type of object.
ErrAliExpressTag ErrorType = 3800
+
+ // Invalid upload response.
+ ErrInvalidUploadResponse ErrorType = 5701
+
+ // Invalid upload hash.
+ ErrInvalidUploadHash ErrorType = 5702
+
+ // Invalid upload user.
+ ErrInvalidUploadUser ErrorType = 5703
+
+ // Invalid upload group.
+ ErrInvalidUploadGroup ErrorType = 5704
+
+ // Invalid crop data.
+ ErrInvalidCropData ErrorType = 5705
+
+ // To small avatar.
+ ErrToSmallAvatar ErrorType = 5706
+
+ // Photo not found.
+ ErrPhotoNotFound ErrorType = 5708
+
+ // Invalid Photo.
+ ErrInvalidPhoto ErrorType = 5709
+
+ // Invalid hash.
+ ErrInvalidHash ErrorType = 5710
)
// ErrorSubtype is the subtype of an error.
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go b/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go
index 5bee205a..cc52cd0d 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go
@@ -22,6 +22,9 @@ func (vk *VK) ExecuteWithArgs(code string, params Params, obj interface{}) error
}
resp, err := vk.Handler("execute", params, reqParams)
+ if err != nil {
+ return err
+ }
jsonErr := json.Unmarshal(resp.Response, &obj)
if jsonErr != nil {
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/market.go b/vendor/github.com/SevereCloud/vksdk/v2/api/market.go
index f78a068d..0bb35687 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/api/market.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/api/market.go
@@ -318,3 +318,19 @@ func (vk *VK) MarketSearch(params Params) (response MarketSearchResponse, err er
err = vk.RequestUnmarshal("market.search", &response, params)
return
}
+
+// MarketSearchItemsResponse struct.
+type MarketSearchItemsResponse struct {
+ Count int `json:"count"`
+ ViewType int `json:"view_type"`
+ Items []object.MarketMarketItem `json:"items"`
+ Groups []object.GroupsGroup `json:"groups,omitempty"`
+}
+
+// MarketSearchItems method.
+//
+// https://vk.com/dev/market.searchItems
+func (vk *VK) MarketSearchItems(params Params) (response MarketSearchItemsResponse, err error) {
+ err = vk.RequestUnmarshal("market.searchItems", &response, params)
+ return
+}
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/marusia.go b/vendor/github.com/SevereCloud/vksdk/v2/api/marusia.go
new file mode 100644
index 00000000..729dbc80
--- /dev/null
+++ b/vendor/github.com/SevereCloud/vksdk/v2/api/marusia.go
@@ -0,0 +1,103 @@
+package api // import "github.com/SevereCloud/vksdk/v2/api"
+
+import (
+ "github.com/SevereCloud/vksdk/v2/object"
+)
+
+// MarusiaGetPictureUploadLinkResponse struct.
+type MarusiaGetPictureUploadLinkResponse struct {
+ PictureUploadLink string `json:"picture_upload_link"` // Link
+}
+
+// MarusiaGetPictureUploadLink method.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaGetPictureUploadLink(params Params) (response MarusiaGetPictureUploadLinkResponse, err error) {
+ err = vk.RequestUnmarshal("marusia.getPictureUploadLink", &response, params)
+ return
+}
+
+// MarusiaSavePictureResponse struct.
+type MarusiaSavePictureResponse struct {
+ AppID int `json:"app_id"`
+ PhotoID int `json:"photo_id"`
+}
+
+// MarusiaSavePicture method.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaSavePicture(params Params) (response MarusiaSavePictureResponse, err error) {
+ err = vk.RequestUnmarshal("marusia.savePicture", &response, params)
+ return
+}
+
+// MarusiaGetPicturesResponse struct.
+type MarusiaGetPicturesResponse struct {
+ Count int `json:"count"`
+ Items []object.MarusiaPicture `json:"items"`
+}
+
+// MarusiaGetPictures method.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaGetPictures(params Params) (response MarusiaGetPicturesResponse, err error) {
+ err = vk.RequestUnmarshal("marusia.getPictures", &response, params)
+ return
+}
+
+// MarusiaDeletePicture delete picture.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaDeletePicture(params Params) (response int, err error) {
+ err = vk.RequestUnmarshal("marusia.deletePicture", &response, params)
+ return
+}
+
+// MarusiaGetAudioUploadLinkResponse struct.
+type MarusiaGetAudioUploadLinkResponse struct {
+ AudioUploadLink string `json:"audio_upload_link"` // Link
+}
+
+// MarusiaGetAudioUploadLink method.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaGetAudioUploadLink(params Params) (response MarusiaGetAudioUploadLinkResponse, err error) {
+ err = vk.RequestUnmarshal("marusia.getAudioUploadLink", &response, params)
+ return
+}
+
+// MarusiaCreateAudioResponse struct.
+type MarusiaCreateAudioResponse struct {
+ ID int `json:"id"`
+ Title string `json:"title"`
+}
+
+// MarusiaCreateAudio method.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaCreateAudio(params Params) (response MarusiaCreateAudioResponse, err error) {
+ err = vk.RequestUnmarshal("marusia.createAudio", &response, params)
+ return
+}
+
+// MarusiaGetAudiosResponse struct.
+type MarusiaGetAudiosResponse struct {
+ Count int `json:"count"`
+ Audios []object.MarusiaAudio `json:"audios"`
+}
+
+// MarusiaGetAudios method.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaGetAudios(params Params) (response MarusiaGetAudiosResponse, err error) {
+ err = vk.RequestUnmarshal("marusia.getAudios", &response, params)
+ return
+}
+
+// MarusiaDeleteAudio delete audio.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) MarusiaDeleteAudio(params Params) (response int, err error) {
+ err = vk.RequestUnmarshal("marusia.deleteAudio", &response, params)
+ return
+}
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go b/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go
index 2c947c5d..59f65460 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go
@@ -959,3 +959,57 @@ func (vk *VK) UploadGroupImage(imageType string, file io.Reader) (response objec
return
}
+
+// UploadMarusiaPicture uploading picture.
+//
+// Limits: height not more than 600 px,
+// aspect ratio of at least 2:1.
+func (vk *VK) UploadMarusiaPicture(file io.Reader) (response MarusiaSavePictureResponse, err error) {
+ uploadServer, err := vk.MarusiaGetPictureUploadLink(nil)
+ if err != nil {
+ return
+ }
+
+ bodyContent, err := vk.UploadFile(uploadServer.PictureUploadLink, file, "photo", "photo.jpg")
+ if err != nil {
+ return
+ }
+
+ var handler object.MarusiaPictureUploadResponse
+
+ err = json.Unmarshal(bodyContent, &handler)
+ if err != nil {
+ return
+ }
+
+ photo, _ := json.Marshal(handler.Photo)
+
+ response, err = vk.MarusiaSavePicture(Params{
+ "server": handler.Server,
+ "photo": string(photo),
+ "hash": handler.Hash,
+ })
+
+ return
+}
+
+// UploadMarusiaAudio uploading audio.
+//
+// https://vk.com/dev/marusia_skill_docs10
+func (vk *VK) UploadMarusiaAudio(file io.Reader) (response MarusiaCreateAudioResponse, err error) {
+ uploadServer, err := vk.MarusiaGetAudioUploadLink(nil)
+ if err != nil {
+ return
+ }
+
+ bodyContent, err := vk.UploadFile(uploadServer.AudioUploadLink, file, "file", "audio.mp3")
+ if err != nil {
+ return
+ }
+
+ response, err = vk.MarusiaCreateAudio(Params{
+ "audio_meta": string(bodyContent),
+ })
+
+ return
+}
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/doc.go b/vendor/github.com/SevereCloud/vksdk/v2/doc.go
index 1be7800e..61e19efe 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/doc.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/doc.go
@@ -7,6 +7,6 @@ package vksdk
// Module constants.
const (
- Version = "2.10.0"
+ Version = "2.11.0"
API = "5.131"
)
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/market.go b/vendor/github.com/SevereCloud/vksdk/v2/object/market.go
index a74f8b83..a1d75213 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/object/market.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/object/market.go
@@ -28,6 +28,8 @@ type MarketMarketAlbum struct {
Photo PhotosPhoto `json:"photo"`
Title string `json:"title"` // Market album title
UpdatedTime int `json:"updated_time"` // Date when album has been updated last time in Unixtime
+ IsMain BaseBoolInt `json:"is_main"`
+ IsHidden BaseBoolInt `json:"is_hidden"`
}
// ToAttachment return attachment format.
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/marusia.go b/vendor/github.com/SevereCloud/vksdk/v2/object/marusia.go
new file mode 100644
index 00000000..a6671d4d
--- /dev/null
+++ b/vendor/github.com/SevereCloud/vksdk/v2/object/marusia.go
@@ -0,0 +1,52 @@
+package object // import "github.com/SevereCloud/vksdk/v2/object"
+
+import (
+ "encoding/json"
+)
+
+// MarusiaPicture struct.
+type MarusiaPicture struct {
+ ID int `json:"id"`
+ OwnerID int `json:"owner_id"`
+}
+
+// MarusiaPictureUploadResponse struct.
+type MarusiaPictureUploadResponse struct {
+ Hash string `json:"hash"` // Uploading hash
+ Photo json.RawMessage `json:"photo"` // Uploaded photo data
+ Server int `json:"server"` // Upload server number
+ AID int `json:"aid"`
+ MessageCode int `json:"message_code"`
+}
+
+// MarusiaAudio struct.
+type MarusiaAudio struct {
+ ID int `json:"id"`
+ Title string `json:"title"`
+ OwnerID int `json:"owner_id"`
+}
+
+// MarusiaAudioUploadResponse struct.
+type MarusiaAudioUploadResponse struct {
+ Sha string `json:"sha"`
+ Secret string `json:"secret"`
+ Meta MarusiaAudioMeta `json:"meta"`
+ Hash string `json:"hash"`
+ Server string `json:"server"`
+ UserID int `json:"user_id"`
+ RequestID string `json:"request_id"`
+}
+
+// MarusiaAudioMeta struct.
+type MarusiaAudioMeta struct {
+ Album string `json:"album"`
+ Artist string `json:"artist"`
+ Bitrate string `json:"bitrate"`
+ Duration string `json:"duration"`
+ Genre string `json:"genre"`
+ Kad string `json:"kad"`
+ Md5 string `json:"md5"`
+ Md5DataSize string `json:"md5_data_size"`
+ Samplerate string `json:"samplerate"`
+ Title string `json:"title"`
+}
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go b/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go
index c6fcf5d8..4c553486 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go
@@ -375,17 +375,17 @@ type MessagesTemplateElement struct {
// MessagesTemplateElementCarousel struct.
type MessagesTemplateElementCarousel struct {
- Title string `json:"title"`
- Action MessagesTemplateElementCarouselAction `json:"action"`
- Description string `json:"description"`
- Photo PhotosPhoto `json:"photo"`
- Buttons []MessagesKeyboardButton `json:"buttons"`
+ Title string `json:"title,omitempty"`
+ Action MessagesTemplateElementCarouselAction `json:"action,omitempty"`
+ Description string `json:"description,omitempty"`
+ Photo *PhotosPhoto `json:"photo,omitempty"`
+ Buttons []MessagesKeyboardButton `json:"buttons,omitempty"`
}
// MessagesTemplateElementCarouselAction struct.
type MessagesTemplateElementCarouselAction struct {
Type string `json:"type"`
- Link string `json:"link"`
+ Link string `json:"link,omitempty"`
}
// MessageContentSourceMessage ...
@@ -443,6 +443,7 @@ type MessagesChat struct {
AdminID int `json:"admin_id"` // Chat creator ID
ID int `json:"id"` // Chat ID
IsDefaultPhoto BaseBoolInt `json:"is_default_photo"`
+ IsGroupChannel BaseBoolInt `json:"is_group_channel"`
Photo100 string `json:"photo_100"` // URL of the preview image with 100 px in width
Photo200 string `json:"photo_200"` // URL of the preview image with 200 px in width
Photo50 string `json:"photo_50"` // URL of the preview image with 50 px in width
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go b/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go
index 248fd8c0..c04ab653 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go
@@ -251,8 +251,10 @@ type StoriesClickableSticker struct { // nolint: maligned
StickerID int `json:"sticker_id,omitempty"`
StickerPackID int `json:"sticker_pack_id,omitempty"`
- // type=place
+ // type=place or geo
PlaceID int `json:"place_id,omitempty"`
+ // Title
+ CategoryID int `json:"category_id,omitempty"`
// type=question
Question string `json:"question,omitempty"`
@@ -267,8 +269,14 @@ type StoriesClickableSticker struct { // nolint: maligned
Hashtag string `json:"hashtag,omitempty"`
// type=link
- LinkObject BaseLink `json:"link_object,omitempty"`
- TooltipText string `json:"tooltip_text,omitempty"`
+ LinkObject BaseLink `json:"link_object,omitempty"`
+ TooltipText string `json:"tooltip_text,omitempty"`
+ TooltipTextKey string `json:"tooltip_text_key,omitempty"`
+
+ // type=time
+ TimestampMs int64 `json:"timestamp_ms,omitempty"`
+ Date string `json:"date,omitempty"`
+ Title string `json:"title,omitempty"`
// type=market_item
Subtype string `json:"subtype,omitempty"`
@@ -290,10 +298,19 @@ type StoriesClickableSticker struct { // nolint: maligned
AudioStartTime int `json:"audio_start_time,omitempty"`
// type=app
- App AppsApp `json:"app"`
- AppContext string `json:"app_context"`
- HasNewInteractions BaseBoolInt `json:"has_new_interactions"`
- IsBroadcastNotifyAllowed BaseBoolInt `json:"is_broadcast_notify_allowed"`
+ App AppsApp `json:"app,omitempty"`
+ AppContext string `json:"app_context,omitempty"`
+ HasNewInteractions BaseBoolInt `json:"has_new_interactions,omitempty"`
+ IsBroadcastNotifyAllowed BaseBoolInt `json:"is_broadcast_notify_allowed,omitempty"`
+
+ // type=emoji
+ Emoji string `json:"emoji,omitempty"`
+
+ // type=text
+ Text string `json:"text,omitempty"`
+ BackgroundStyle string `json:"background_style,omitempty"`
+ Alignment string `json:"alignment,omitempty"`
+ SelectionColor string `json:"selection_color,omitempty"`
}
// TODO: сделать несколько структур для кликабельного стикера
@@ -313,6 +330,10 @@ const (
ClickableStickerPoll = "poll"
ClickableStickerMusic = "music"
ClickableStickerApp = "app"
+ ClickableStickerTime = "time"
+ ClickableStickerEmoji = "emoji"
+ ClickableStickerGeo = "geo"
+ ClickableStickerText = "text"
)
// Subtype of clickable sticker.
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/video.go b/vendor/github.com/SevereCloud/vksdk/v2/object/video.go
index 0816af24..5a7e9e8d 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/object/video.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/object/video.go
@@ -213,6 +213,7 @@ type VideoVideoFull struct {
Description string `json:"description"` // Video description
Duration int `json:"duration"` // Video duration in seconds
Files VideoVideoFiles `json:"files"`
+ Trailer VideoVideoFiles `json:"trailer"`
ID int `json:"id"` // Video ID
Likes BaseLikes `json:"likes"`
Live int `json:"live"` // Returns if the video is live translation
diff --git a/vendor/github.com/d5/tengo/v2/README.md b/vendor/github.com/d5/tengo/v2/README.md
index fd214cd9..c19c5699 100644
--- a/vendor/github.com/d5/tengo/v2/README.md
+++ b/vendor/github.com/d5/tengo/v2/README.md
@@ -1,7 +1,3 @@
-<p align="center">
- <img src="https://raw.githubusercontent.com/d5/tengolang-share/master/logo_400.png" width="200" height="200">
-</p>
-
# The Tengo Language
[![GoDoc](https://godoc.org/github.com/d5/tengo/v2?status.svg)](https://godoc.org/github.com/d5/tengo/v2)
diff --git a/vendor/github.com/d5/tengo/v2/compiler.go b/vendor/github.com/d5/tengo/v2/compiler.go
index 53cc7d38..e4e04303 100644
--- a/vendor/github.com/d5/tengo/v2/compiler.go
+++ b/vendor/github.com/d5/tengo/v2/compiler.go
@@ -1,9 +1,11 @@
package tengo
import (
+ "errors"
"fmt"
"io"
"io/ioutil"
+ "os"
"path/filepath"
"reflect"
"strings"
@@ -45,11 +47,12 @@ type Compiler struct {
parent *Compiler
modulePath string
importDir string
+ importFileExt []string
constants []Object
symbolTable *SymbolTable
scopes []compilationScope
scopeIndex int
- modules *ModuleMap
+ modules ModuleGetter
compiledModules map[string]*CompiledFunction
allowFileImport bool
loops []*loop
@@ -63,7 +66,7 @@ func NewCompiler(
file *parser.SourceFile,
symbolTable *SymbolTable,
constants []Object,
- modules *ModuleMap,
+ modules ModuleGetter,
trace io.Writer,
) *Compiler {
mainScope := compilationScope{
@@ -96,6 +99,7 @@ func NewCompiler(
trace: trace,
modules: modules,
compiledModules: make(map[string]*CompiledFunction),
+ importFileExt: []string{SourceFileExtDefault},
}
}
@@ -538,12 +542,8 @@ func (c *Compiler) Compile(node parser.Node) error {
}
} else if c.allowFileImport {
moduleName := node.ModuleName
- if !strings.HasSuffix(moduleName, ".tengo") {
- moduleName += ".tengo"
- }
- modulePath, err := filepath.Abs(
- filepath.Join(c.importDir, moduleName))
+ modulePath, err := c.getPathModule(moduleName)
if err != nil {
return c.errorf(node, "module file path error: %s",
err.Error())
@@ -640,6 +640,39 @@ func (c *Compiler) SetImportDir(dir string) {
c.importDir = dir
}
+// SetImportFileExt sets the extension name of the source file for loading
+// local module files.
+//
+// Use this method if you want other source file extension than ".tengo".
+//
+// // this will search for *.tengo, *.foo, *.bar
+// err := c.SetImportFileExt(".tengo", ".foo", ".bar")
+//
+// This function requires at least one argument, since it will replace the
+// current list of extension name.
+func (c *Compiler) SetImportFileExt(exts ...string) error {
+ if len(exts) == 0 {
+ return fmt.Errorf("missing arg: at least one argument is required")
+ }
+
+ for _, ext := range exts {
+ if ext != filepath.Ext(ext) || ext == "" {
+ return fmt.Errorf("invalid file extension: %s", ext)
+ }
+ }
+
+ c.importFileExt = exts // Replace the hole current extension list
+
+ return nil
+}
+
+// GetImportFileExt returns the current list of extension name.
+// Thease are the complementary suffix of the source file to search and load
+// local module files.
+func (c *Compiler) GetImportFileExt() []string {
+ return c.importFileExt
+}
+
func (c *Compiler) compileAssign(
node parser.Node,
lhs, rhs []parser.Expr,
@@ -1098,6 +1131,7 @@ func (c *Compiler) fork(
child.parent = c // parent to set to current compiler
child.allowFileImport = c.allowFileImport
child.importDir = c.importDir
+ child.importFileExt = c.importFileExt
if isFile && c.importDir != "" {
child.importDir = filepath.Dir(modulePath)
}
@@ -1287,6 +1321,28 @@ func (c *Compiler) printTrace(a ...interface{}) {
_, _ = fmt.Fprintln(c.trace, a...)
}
+func (c *Compiler) getPathModule(moduleName string) (pathFile string, err error) {
+ for _, ext := range c.importFileExt {
+ nameFile := moduleName
+
+ if !strings.HasSuffix(nameFile, ext) {
+ nameFile += ext
+ }
+
+ pathFile, err = filepath.Abs(filepath.Join(c.importDir, nameFile))
+ if err != nil {
+ continue
+ }
+
+ // Check if file exists
+ if _, err := os.Stat(pathFile); !errors.Is(err, os.ErrNotExist) {
+ return pathFile, nil
+ }
+ }
+
+ return "", fmt.Errorf("module '%s' not found at: %s", moduleName, pathFile)
+}
+
func resolveAssignLHS(
expr parser.Expr,
) (name string, selectors []parser.Expr) {
diff --git a/vendor/github.com/d5/tengo/v2/modules.go b/vendor/github.com/d5/tengo/v2/modules.go
index c8fcde7f..dadd5a3b 100644
--- a/vendor/github.com/d5/tengo/v2/modules.go
+++ b/vendor/github.com/d5/tengo/v2/modules.go
@@ -6,6 +6,11 @@ type Importable interface {
Import(moduleName string) (interface{}, error)
}
+// ModuleGetter enables implementing dynamic module loading.
+type ModuleGetter interface {
+ Get(name string) Importable
+}
+
// ModuleMap represents a set of named modules. Use NewModuleMap to create a
// new module map.
type ModuleMap struct {
diff --git a/vendor/github.com/d5/tengo/v2/script.go b/vendor/github.com/d5/tengo/v2/script.go
index 46e48029..82b02f52 100644
--- a/vendor/github.com/d5/tengo/v2/script.go
+++ b/vendor/github.com/d5/tengo/v2/script.go
@@ -12,7 +12,7 @@ import (
// Script can simplify compilation and execution of embedded scripts.
type Script struct {
variables map[string]*Variable
- modules *ModuleMap
+ modules ModuleGetter
input []byte
maxAllocs int64
maxConstObjects int
@@ -54,7 +54,7 @@ func (s *Script) Remove(name string) bool {
}
// SetImports sets import modules.
-func (s *Script) SetImports(modules *ModuleMap) {
+func (s *Script) SetImports(modules ModuleGetter) {
s.modules = modules
}
@@ -219,6 +219,18 @@ func (c *Compiled) RunContext(ctx context.Context) (err error) {
v := NewVM(c.bytecode, c.globals, c.maxAllocs)
ch := make(chan error, 1)
go func() {
+ defer func() {
+ if r := recover(); r != nil {
+ switch e := r.(type) {
+ case string:
+ ch <- fmt.Errorf(e)
+ case error:
+ ch <- e
+ default:
+ ch <- fmt.Errorf("unknown panic: %v", e)
+ }
+ }
+ }()
ch <- v.Run()
}()
diff --git a/vendor/github.com/d5/tengo/v2/tengo.go b/vendor/github.com/d5/tengo/v2/tengo.go
index 098a1970..490e9aed 100644
--- a/vendor/github.com/d5/tengo/v2/tengo.go
+++ b/vendor/github.com/d5/tengo/v2/tengo.go
@@ -26,6 +26,9 @@ const (
// MaxFrames is the maximum number of function frames for a VM.
MaxFrames = 1024
+
+ // SourceFileExtDefault is the default extension for source files.
+ SourceFileExtDefault = ".tengo"
)
// CallableFunc is a function signature for the callable functions.
diff --git a/vendor/github.com/d5/tengo/v2/vm.go b/vendor/github.com/d5/tengo/v2/vm.go
index 811ecef9..c8365252 100644
--- a/vendor/github.com/d5/tengo/v2/vm.go
+++ b/vendor/github.com/d5/tengo/v2/vm.go
@@ -293,7 +293,7 @@ func (v *VM) run() {
case parser.OpMap:
v.ip += 2
numElements := int(v.curInsts[v.ip]) | int(v.curInsts[v.ip-1])<<8
- kv := make(map[string]Object)
+ kv := make(map[string]Object, numElements)
for i := v.sp - numElements; i < v.sp; i += 2 {
key := v.stack[i]
value := v.stack[i+1]
diff --git a/vendor/github.com/gomarkdown/markdown/parser/block.go b/vendor/github.com/gomarkdown/markdown/parser/block.go
index 7d7e9f9c..32194d9f 100644
--- a/vendor/github.com/gomarkdown/markdown/parser/block.go
+++ b/vendor/github.com/gomarkdown/markdown/parser/block.go
@@ -17,6 +17,12 @@ const (
escapable = "[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]"
)
+const (
+ captionTable = "Table: "
+ captionFigure = "Figure: "
+ captionQuote = "Quote: "
+)
+
var (
reBackslashOrAmp = regexp.MustCompile("[\\&]")
reEntityOrEscapedChar = regexp.MustCompile("(?i)\\\\" + escapable + "|" + charEntity)
@@ -125,6 +131,16 @@ func (p *Parser) block(data []byte) {
}
if consumed > 0 {
included := f(p.includeStack.Last(), path, address)
+
+ // if we find a caption below this, we need to include it in 'included', so
+ // that the caption will be part of the include text. (+1 to skip newline)
+ for _, caption := range []string{captionFigure, captionTable, captionQuote} {
+ if _, _, capcon := p.caption(data[consumed+1:], []byte(caption)); capcon > 0 {
+ included = append(included, data[consumed+1:consumed+1+capcon]...)
+ consumed += 1 + capcon
+ break // there can only be 1 caption.
+ }
+ }
p.includeStack.Push(path)
p.block(included)
p.includeStack.Pop()
@@ -295,7 +311,7 @@ func (p *Parser) block(data []byte) {
//
// also works with + or -
if p.uliPrefix(data) > 0 {
- data = data[p.list(data, 0, 0):]
+ data = data[p.list(data, 0, 0, '.'):]
continue
}
@@ -305,14 +321,18 @@ func (p *Parser) block(data []byte) {
// 2. Item 2
if i := p.oliPrefix(data); i > 0 {
start := 0
- if i > 2 && p.extensions&OrderedListStart != 0 {
- s := string(data[:i-2])
- start, _ = strconv.Atoi(s)
- if start == 1 {
- start = 0
+ delim := byte('.')
+ if i > 2 {
+ if p.extensions&OrderedListStart != 0 {
+ s := string(data[:i-2])
+ start, _ = strconv.Atoi(s)
+ if start == 1 {
+ start = 0
+ }
}
+ delim = data[i-2]
}
- data = data[p.list(data, ast.ListTypeOrdered, start):]
+ data = data[p.list(data, ast.ListTypeOrdered, start, delim):]
continue
}
@@ -326,7 +346,7 @@ func (p *Parser) block(data []byte) {
// : Definition c
if p.extensions&DefinitionLists != 0 {
if p.dliPrefix(data) > 0 {
- data = data[p.list(data, ast.ListTypeDefinition, 0):]
+ data = data[p.list(data, ast.ListTypeDefinition, 0, '.'):]
continue
}
}
@@ -950,7 +970,7 @@ func (p *Parser) fencedCodeBlock(data []byte, doRender bool) int {
}
// Check for caption and if found make it a figure.
- if captionContent, id, consumed := p.caption(data[beg:], []byte("Figure: ")); consumed > 0 {
+ if captionContent, id, consumed := p.caption(data[beg:], []byte(captionFigure)); consumed > 0 {
figure := &ast.CaptionFigure{}
caption := &ast.Caption{}
figure.HeadingID = id
@@ -1070,7 +1090,7 @@ func (p *Parser) quote(data []byte) int {
return end
}
- if captionContent, id, consumed := p.caption(data[end:], []byte("Quote: ")); consumed > 0 {
+ if captionContent, id, consumed := p.caption(data[end:], []byte(captionQuote)); consumed > 0 {
figure := &ast.CaptionFigure{}
caption := &ast.Caption{}
figure.HeadingID = id
@@ -1190,7 +1210,7 @@ func (p *Parser) oliPrefix(data []byte) int {
}
// we need >= 1 digits followed by a dot and a space or a tab
- if data[i] != '.' || !(data[i+1] == ' ' || data[i+1] == '\t') {
+ if data[i] != '.' && data[i] != ')' || !(data[i+1] == ' ' || data[i+1] == '\t') {
return 0
}
return i + 2
@@ -1210,13 +1230,14 @@ func (p *Parser) dliPrefix(data []byte) int {
}
// parse ordered or unordered list block
-func (p *Parser) list(data []byte, flags ast.ListType, start int) int {
+func (p *Parser) list(data []byte, flags ast.ListType, start int, delim byte) int {
i := 0
flags |= ast.ListItemBeginningOfList
list := &ast.List{
ListFlags: flags,
Tight: true,
Start: start,
+ Delimiter: delim,
}
block := p.addBlock(list)
@@ -1305,10 +1326,16 @@ func (p *Parser) listItem(data []byte, flags *ast.ListType) int {
}
}
- var bulletChar byte = '*'
+ var (
+ bulletChar byte = '*'
+ delimiter byte = '.'
+ )
i := p.uliPrefix(data)
if i == 0 {
i = p.oliPrefix(data)
+ if i > 0 {
+ delimiter = data[i-2]
+ }
} else {
bulletChar = data[i-2]
}
@@ -1468,7 +1495,7 @@ gatherlines:
ListFlags: *flags,
Tight: false,
BulletChar: bulletChar,
- Delimiter: '.', // Only '.' is possible in Markdown, but ')' will also be possible in CommonMark
+ Delimiter: delimiter,
}
p.addBlock(listItem)
@@ -1574,7 +1601,7 @@ func (p *Parser) paragraph(data []byte) int {
// did this blank line followed by a definition list item?
if p.extensions&DefinitionLists != 0 {
if i < len(data)-1 && data[i+1] == ':' {
- listLen := p.list(data[prev:], ast.ListTypeDefinition, 0)
+ listLen := p.list(data[prev:], ast.ListTypeDefinition, 0, '.')
return prev + listLen
}
}
@@ -1645,10 +1672,18 @@ func (p *Parser) paragraph(data []byte) int {
}
}
+ // if there's a table, paragraph is over
+ if p.extensions&Tables != 0 {
+ if j, _, _ := p.tableHeader(current, false); j > 0 {
+ p.renderParagraph(data[:i])
+ return i
+ }
+ }
+
// if there's a definition list item, prev line is a definition term
if p.extensions&DefinitionLists != 0 {
if p.dliPrefix(current) != 0 {
- ret := p.list(data[prev:], ast.ListTypeDefinition, 0)
+ ret := p.list(data[prev:], ast.ListTypeDefinition, 0, '.')
return ret + prev
}
}
diff --git a/vendor/github.com/gomarkdown/markdown/parser/block_table.go b/vendor/github.com/gomarkdown/markdown/parser/block_table.go
index f6c06dff..53fbd471 100644
--- a/vendor/github.com/gomarkdown/markdown/parser/block_table.go
+++ b/vendor/github.com/gomarkdown/markdown/parser/block_table.go
@@ -105,7 +105,7 @@ func (p *Parser) tableFooter(data []byte) bool {
}
// tableHeaders parses the header. If recognized it will also add a table.
-func (p *Parser) tableHeader(data []byte) (size int, columns []ast.CellAlignFlags, table ast.Node) {
+func (p *Parser) tableHeader(data []byte, doRender bool) (size int, columns []ast.CellAlignFlags, table ast.Node) {
i := 0
colCount := 1
headerIsUnderline := true
@@ -236,11 +236,13 @@ func (p *Parser) tableHeader(data []byte) (size int, columns []ast.CellAlignFlag
return
}
- table = &ast.Table{}
- p.addBlock(table)
- if header != nil {
- p.addBlock(&ast.TableHeader{})
- p.tableRow(header, columns, true)
+ if doRender {
+ table = &ast.Table{}
+ p.addBlock(table)
+ if header != nil {
+ p.addBlock(&ast.TableHeader{})
+ p.tableRow(header, columns, true)
+ }
}
size = skipCharN(data, i, '\n', 1)
return
@@ -255,7 +257,7 @@ Bob | 31 | 555-1234
Alice | 27 | 555-4321
*/
func (p *Parser) table(data []byte) int {
- i, columns, table := p.tableHeader(data)
+ i, columns, table := p.tableHeader(data, true)
if i == 0 {
return 0
}
@@ -284,7 +286,7 @@ func (p *Parser) table(data []byte) int {
p.tableRow(data[rowStart:i], columns, false)
}
- if captionContent, id, consumed := p.caption(data[i:], []byte("Table: ")); consumed > 0 {
+ if captionContent, id, consumed := p.caption(data[i:], []byte(captionTable)); consumed > 0 {
caption := &ast.Caption{}
p.Inline(caption, captionContent)
diff --git a/vendor/github.com/gomarkdown/markdown/parser/inline.go b/vendor/github.com/gomarkdown/markdown/parser/inline.go
index bc30326d..d68983f7 100644
--- a/vendor/github.com/gomarkdown/markdown/parser/inline.go
+++ b/vendor/github.com/gomarkdown/markdown/parser/inline.go
@@ -766,7 +766,22 @@ func entity(p *Parser, data []byte, offset int) (int, ast.Node) {
// undo &amp; escaping or it will be converted to &amp;amp; by another
// escaper in the renderer
if bytes.Equal(ent, []byte("&amp;")) {
- ent = []byte{'&'}
+ return end, newTextNode([]byte{'&'})
+ }
+ if len(ent) < 4 {
+ return end, newTextNode(ent)
+ }
+
+ // if ent consists solely out of numbers (hex or decimal) convert that unicode codepoint to actual rune
+ codepoint := uint64(0)
+ var err error
+ if ent[2] == 'x' || ent[2] == 'X' { // hexadecimal
+ codepoint, err = strconv.ParseUint(string(ent[3:len(ent)-1]), 16, 64)
+ } else {
+ codepoint, err = strconv.ParseUint(string(ent[2:len(ent)-1]), 10, 64)
+ }
+ if err == nil { // only if conversion was valid return here.
+ return end, newTextNode([]byte(string(codepoint)))
}
return end, newTextNode(ent)
diff --git a/vendor/github.com/google/uuid/null.go b/vendor/github.com/google/uuid/null.go
new file mode 100644
index 00000000..d7fcbf28
--- /dev/null
+++ b/vendor/github.com/google/uuid/null.go
@@ -0,0 +1,118 @@
+// Copyright 2021 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "bytes"
+ "database/sql/driver"
+ "encoding/json"
+ "fmt"
+)
+
+var jsonNull = []byte("null")
+
+// NullUUID represents a UUID that may be null.
+// NullUUID implements the SQL driver.Scanner interface so
+// it can be used as a scan destination:
+//
+// var u uuid.NullUUID
+// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u)
+// ...
+// if u.Valid {
+// // use u.UUID
+// } else {
+// // NULL value
+// }
+//
+type NullUUID struct {
+ UUID UUID
+ Valid bool // Valid is true if UUID is not NULL
+}
+
+// Scan implements the SQL driver.Scanner interface.
+func (nu *NullUUID) Scan(value interface{}) error {
+ if value == nil {
+ nu.UUID, nu.Valid = Nil, false
+ return nil
+ }
+
+ err := nu.UUID.Scan(value)
+ if err != nil {
+ nu.Valid = false
+ return err
+ }
+
+ nu.Valid = true
+ return nil
+}
+
+// Value implements the driver Valuer interface.
+func (nu NullUUID) Value() (driver.Value, error) {
+ if !nu.Valid {
+ return nil, nil
+ }
+ // Delegate to UUID Value function
+ return nu.UUID.Value()
+}
+
+// MarshalBinary implements encoding.BinaryMarshaler.
+func (nu NullUUID) MarshalBinary() ([]byte, error) {
+ if nu.Valid {
+ return nu.UUID[:], nil
+ }
+
+ return []byte(nil), nil
+}
+
+// UnmarshalBinary implements encoding.BinaryUnmarshaler.
+func (nu *NullUUID) UnmarshalBinary(data []byte) error {
+ if len(data) != 16 {
+ return fmt.Errorf("invalid UUID (got %d bytes)", len(data))
+ }
+ copy(nu.UUID[:], data)
+ nu.Valid = true
+ return nil
+}
+
+// MarshalText implements encoding.TextMarshaler.
+func (nu NullUUID) MarshalText() ([]byte, error) {
+ if nu.Valid {
+ return nu.UUID.MarshalText()
+ }
+
+ return jsonNull, nil
+}
+
+// UnmarshalText implements encoding.TextUnmarshaler.
+func (nu *NullUUID) UnmarshalText(data []byte) error {
+ id, err := ParseBytes(data)
+ if err != nil {
+ nu.Valid = false
+ return err
+ }
+ nu.UUID = id
+ nu.Valid = true
+ return nil
+}
+
+// MarshalJSON implements json.Marshaler.
+func (nu NullUUID) MarshalJSON() ([]byte, error) {
+ if nu.Valid {
+ return json.Marshal(nu.UUID)
+ }
+
+ return jsonNull, nil
+}
+
+// UnmarshalJSON implements json.Unmarshaler.
+func (nu *NullUUID) UnmarshalJSON(data []byte) error {
+ if bytes.Equal(data, jsonNull) {
+ *nu = NullUUID{}
+ return nil // valid null UUID
+ }
+ err := json.Unmarshal(data, &nu.UUID)
+ nu.Valid = err == nil
+ return err
+}
diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go
index 60d26bb5..a57207ae 100644
--- a/vendor/github.com/google/uuid/uuid.go
+++ b/vendor/github.com/google/uuid/uuid.go
@@ -12,6 +12,7 @@ import (
"fmt"
"io"
"strings"
+ "sync"
)
// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
@@ -33,7 +34,15 @@ const (
Future // Reserved for future definition.
)
-var rander = rand.Reader // random function
+const randPoolSize = 16 * 16
+
+var (
+ rander = rand.Reader // random function
+ poolEnabled = false
+ poolMu sync.Mutex
+ poolPos = randPoolSize // protected with poolMu
+ pool [randPoolSize]byte // protected with poolMu
+)
type invalidLengthError struct{ len int }
@@ -41,6 +50,12 @@ func (err invalidLengthError) Error() string {
return fmt.Sprintf("invalid UUID length: %d", err.len)
}
+// IsInvalidLengthError is matcher function for custom error invalidLengthError
+func IsInvalidLengthError(err error) bool {
+ _, ok := err.(invalidLengthError)
+ return ok
+}
+
// Parse decodes s into a UUID or returns an error. Both the standard UUID
// forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the
@@ -249,3 +264,31 @@ func SetRand(r io.Reader) {
}
rander = r
}
+
+// EnableRandPool enables internal randomness pool used for Random
+// (Version 4) UUID generation. The pool contains random bytes read from
+// the random number generator on demand in batches. Enabling the pool
+// may improve the UUID generation throughput significantly.
+//
+// Since the pool is stored on the Go heap, this feature may be a bad fit
+// for security sensitive applications.
+//
+// Both EnableRandPool and DisableRandPool are not thread-safe and should
+// only be called when there is no possibility that New or any other
+// UUID Version 4 generation function will be called concurrently.
+func EnableRandPool() {
+ poolEnabled = true
+}
+
+// DisableRandPool disables the randomness pool if it was previously
+// enabled with EnableRandPool.
+//
+// Both EnableRandPool and DisableRandPool are not thread-safe and should
+// only be called when there is no possibility that New or any other
+// UUID Version 4 generation function will be called concurrently.
+func DisableRandPool() {
+ poolEnabled = false
+ defer poolMu.Unlock()
+ poolMu.Lock()
+ poolPos = randPoolSize
+}
diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go
index 86160fbd..7697802e 100644
--- a/vendor/github.com/google/uuid/version4.go
+++ b/vendor/github.com/google/uuid/version4.go
@@ -27,6 +27,8 @@ func NewString() string {
// The strength of the UUIDs is based on the strength of the crypto/rand
// package.
//
+// Uses the randomness pool if it was enabled with EnableRandPool.
+//
// A note about uniqueness derived from the UUID Wikipedia entry:
//
// Randomly generated UUIDs have 122 random bits. One's annual risk of being
@@ -35,7 +37,10 @@ func NewString() string {
// equivalent to the odds of creating a few tens of trillions of UUIDs in a
// year and having one duplicate.
func NewRandom() (UUID, error) {
- return NewRandomFromReader(rander)
+ if !poolEnabled {
+ return NewRandomFromReader(rander)
+ }
+ return newRandomFromPool()
}
// NewRandomFromReader returns a UUID based on bytes read from a given io.Reader.
@@ -49,3 +54,23 @@ func NewRandomFromReader(r io.Reader) (UUID, error) {
uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
return uuid, nil
}
+
+func newRandomFromPool() (UUID, error) {
+ var uuid UUID
+ poolMu.Lock()
+ if poolPos == randPoolSize {
+ _, err := io.ReadFull(rander, pool[:])
+ if err != nil {
+ poolMu.Unlock()
+ return Nil, err
+ }
+ poolPos = 0
+ }
+ copy(uuid[:], pool[poolPos:(poolPos+16)])
+ poolPos += 16
+ poolMu.Unlock()
+
+ uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4
+ uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
+ return uuid, nil
+}
diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md
index 52b111d5..c589addf 100644
--- a/vendor/github.com/json-iterator/go/README.md
+++ b/vendor/github.com/json-iterator/go/README.md
@@ -8,8 +8,6 @@
A high-performance 100% compatible drop-in replacement of "encoding/json"
-You can also use thrift like JSON using [thrift-iterator](https://github.com/thrift-iterator/go)
-
# Benchmark
![benchmark](http://jsoniter.com/benchmarks/go-benchmark.png)
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go
index 68c8ca70..886cfff2 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go
@@ -9,6 +9,7 @@ import (
"io/ioutil"
"os"
"os/exec"
+ "runtime"
"sync"
"time"
@@ -207,7 +208,9 @@ func (a *API) getUsername(runOpts RunOptions) (username string, err error) {
if err != nil {
return "", err
}
- p.ExtraFiles = []*os.File{output.(*os.File)}
+ if runtime.GOOS != "windows" {
+ p.ExtraFiles = []*os.File{output.(*os.File)}
+ }
if err = p.Start(); err != nil {
return "", err
}
@@ -282,7 +285,7 @@ func (a *API) startPipes() (err error) {
defer a.Unlock()
if a.apiCmd != nil {
if err := a.apiCmd.Process.Kill(); err != nil {
- return err
+ return fmt.Errorf("unable to kill previous API command %v", err)
}
}
a.apiCmd = nil
@@ -290,30 +293,32 @@ func (a *API) startPipes() (err error) {
if a.runOpts.StartService {
args := []string{fmt.Sprintf("-enable-bot-lite-mode=%v", a.runOpts.DisableBotLiteMode), "service"}
if err := a.runOpts.Command(args...).Start(); err != nil {
- return err
+ return fmt.Errorf("unable to start service %v", err)
}
}
if a.username, err = a.auth(); err != nil {
- return err
+ return fmt.Errorf("unable to auth: %v", err)
}
cmd := a.runOpts.Command("chat", "notification-settings", fmt.Sprintf("-disable-typing=%v", !a.runOpts.EnableTyping))
if err = cmd.Run(); err != nil {
- return err
+ return fmt.Errorf("unable to set notifiation settings %v", err)
}
a.apiCmd = a.runOpts.Command("chat", "api")
if a.apiInput, err = a.apiCmd.StdinPipe(); err != nil {
- return err
+ return fmt.Errorf("unable to get api stdin: %v", err)
}
output, err := a.apiCmd.StdoutPipe()
if err != nil {
- return err
+ return fmt.Errorf("unabel to get api stdout: %v", err)
+ }
+ if runtime.GOOS != "windows" {
+ a.apiCmd.ExtraFiles = []*os.File{output.(*os.File)}
}
- a.apiCmd.ExtraFiles = []*os.File{output.(*os.File)}
if err := a.apiCmd.Start(); err != nil {
- return err
+ return fmt.Errorf("unable to run chat api cmd: %v", err)
}
a.apiOutput = bufio.NewReader(output)
return nil
@@ -508,7 +513,9 @@ func (a *API) Listen(opts ListenOptions) (*Subscription, error) {
time.Sleep(pause)
continue
}
- p.ExtraFiles = []*os.File{stderr.(*os.File), output.(*os.File)}
+ if runtime.GOOS != "windows" {
+ p.ExtraFiles = []*os.File{stderr.(*os.File), output.(*os.File)}
+ }
boutput := bufio.NewScanner(output)
if err := p.Start(); err != nil {
diff --git a/vendor/github.com/klauspost/cpuid/v2/.travis.yml b/vendor/github.com/klauspost/cpuid/v2/.travis.yml
deleted file mode 100644
index aa9bad7e..00000000
--- a/vendor/github.com/klauspost/cpuid/v2/.travis.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-language: go
-
-os:
- - linux
- - osx
- - windows
-
-arch:
- - amd64
- - arm64
-
-go:
- - 1.13.x
- - 1.14.x
- - 1.15.x
- - 1.16.x
- - master
-
-env:
- - CGO_ENABLED=0
-
-script:
- - go vet ./...
- - go test -test.v -test.run ^TestCPUID$
- - CGO_ENABLED=1 go test -race ./...
- - go test -tags=nounsafe -test.v -test.run ^TestCPUID$
- - go test -tags=noasm ./...
- - go run ./cmd/cpuid/main.go
- - go run ./cmd/cpuid/main.go -json
-
-matrix:
- allow_failures:
- - go: 'master'
- fast_finish: true
- include:
- - stage: other
- go: 1.16.x
- os: linux
- arch: amd64
- script:
- - diff <(gofmt -d .) <(printf "")
- - diff <(gofmt -d ./private) <(printf "")
- - curl -sfL https://git.io/goreleaser | VERSION=v0.157.0 sh -s -- check # check goreleaser config for deprecations
- - curl -sL https://git.io/goreleaser | VERSION=v0.157.0 sh -s -- --snapshot --skip-publish --rm-dist
- - go get github.com/klauspost/asmfmt&&go install github.com/klauspost/asmfmt/cmd/asmfmt
- - diff <(asmfmt -d .) <(printf "")
- - GOOS=linux GOARCH=386 go test .
- - ./test-architectures.sh
- - stage: other
- go: 1.15.x
- os: linux
- arch: amd64
- script:
- - ./test-architectures.sh
-
-deploy:
- - provider: script
- skip_cleanup: true
- script: curl -sL https://git.io/goreleaser | VERSION=v0.157.0 bash || true
- on:
- tags: true
- condition: ($TRAVIS_OS_NAME = linux) && ($TRAVIS_CPU_ARCH = amd64)
- go: 1.16.x
-branches:
- only:
- - master
- - /^v\d+\.\d+(\.\d+)?(-\S*)?$/
diff --git a/vendor/github.com/klauspost/cpuid/v2/cpuid.go b/vendor/github.com/klauspost/cpuid/v2/cpuid.go
index 43e9cc17..1d88736b 100644
--- a/vendor/github.com/klauspost/cpuid/v2/cpuid.go
+++ b/vendor/github.com/klauspost/cpuid/v2/cpuid.go
@@ -83,6 +83,7 @@ const (
AVX512DQ // AVX-512 Doubleword and Quadword Instructions
AVX512ER // AVX-512 Exponential and Reciprocal Instructions
AVX512F // AVX-512 Foundation
+ AVX512FP16 // AVX-512 FP16 Instructions
AVX512IFMA // AVX-512 Integer Fused Multiply-Add Instructions
AVX512PF // AVX-512 Prefetch Instructions
AVX512VBMI // AVX-512 Vector Bit Manipulation Instructions
@@ -96,7 +97,9 @@ const (
BMI2 // Bit Manipulation Instruction Set 2
CLDEMOTE // Cache Line Demote
CLMUL // Carry-less Multiplication
+ CLZERO // CLZERO instruction supported
CMOV // i686 CMOV
+ CPBOOST // Core Performance Boost
CX16 // CMPXCHG16B Instruction
ENQCMD // Enqueue Command
ERMS // Enhanced REP MOVSB/STOSB
@@ -106,6 +109,7 @@ const (
GFNI // Galois Field New Instructions
HLE // Hardware Lock Elision
HTT // Hyperthreading (enabled)
+ HWA // Hardware assert supported. Indicates support for MSRC001_10
HYPERVISOR // This bit has been reserved by Intel & AMD for use by hypervisors
IBPB // Indirect Branch Restricted Speculation (IBRS) and Indirect Branch Predictor Barrier (IBPB)
IBS // Instruction Based Sampling (AMD)
@@ -117,18 +121,25 @@ const (
IBSOPSAM // Instruction Based Sampling Feature (AMD)
IBSRDWROPCNT // Instruction Based Sampling Feature (AMD)
IBSRIPINVALIDCHK // Instruction Based Sampling Feature (AMD)
+ INT_WBINVD // WBINVD/WBNOINVD are interruptible.
+ INVLPGB // NVLPGB and TLBSYNC instruction supported
LZCNT // LZCNT instruction
+ MCAOVERFLOW // MCA overflow recovery support.
+ MCOMMIT // MCOMMIT instruction supported
MMX // standard MMX
MMXEXT // SSE integer functions or AMD MMX ext
MOVDIR64B // Move 64 Bytes as Direct Store
MOVDIRI // Move Doubleword as Direct Store
MPX // Intel MPX (Memory Protection Extensions)
+ MSRIRC // Instruction Retired Counter MSR available
NX // NX (No-Execute) bit
POPCNT // POPCNT instruction
+ RDPRU // RDPRU instruction supported
RDRAND // RDRAND instruction is available
RDSEED // RDSEED instruction is available
RDTSCP // RDTSCP Instruction
RTM // Restricted Transactional Memory
+ RTM_ALWAYS_ABORT // Indicates that the loaded microcode is forcing RTM abort.
SERIALIZE // Serialize Instruction Execution
SGX // Software Guard Extensions
SGXLC // Software Guard Extensions Launch Control
@@ -141,6 +152,7 @@ const (
SSE4A // AMD Barcelona microarchitecture SSE4a instructions
SSSE3 // Conroe SSSE3 functions
STIBP // Single Thread Indirect Branch Predictors
+ SUCCOR // Software uncorrectable error containment and recovery capability.
TBM // AMD Trailing Bit Manipulation
TSXLDTRK // Intel TSX Suspend Load Address Tracking
VAES // Vector AES
@@ -194,7 +206,8 @@ type CPUInfo struct {
Family int // CPU family number
Model int // CPU model number
CacheLine int // Cache line size in bytes. Will be 0 if undetectable.
- Hz int64 // Clock speed, if known, 0 otherwise
+ Hz int64 // Clock speed, if known, 0 otherwise. Will attempt to contain base clock speed.
+ BoostFreq int64 // Max clock speed, if known, 0 otherwise
Cache struct {
L1I int // L1 Instruction Cache (per core or shared). Will be -1 if undetected
L1D int // L1 Data Cache (per core or shared). Will be -1 if undetected
@@ -363,25 +376,42 @@ func (c CPUInfo) LogicalCPU() int {
return int(ebx >> 24)
}
-// hertz tries to compute the clock speed of the CPU. If leaf 15 is
+// frequencies tries to compute the clock speed of the CPU. If leaf 15 is
// supported, use it, otherwise parse the brand string. Yes, really.
-func hertz(model string) int64 {
+func (c *CPUInfo) frequencies() {
+ c.Hz, c.BoostFreq = 0, 0
mfi := maxFunctionID()
if mfi >= 0x15 {
eax, ebx, ecx, _ := cpuid(0x15)
if eax != 0 && ebx != 0 && ecx != 0 {
- return int64((int64(ecx) * int64(ebx)) / int64(eax))
+ c.Hz = (int64(ecx) * int64(ebx)) / int64(eax)
}
}
+ if mfi >= 0x16 {
+ a, b, _, _ := cpuid(0x16)
+ // Base...
+ if a&0xffff > 0 {
+ c.Hz = int64(a&0xffff) * 1_000_000
+ }
+ // Boost...
+ if b&0xffff > 0 {
+ c.BoostFreq = int64(b&0xffff) * 1_000_000
+ }
+ }
+ if c.Hz > 0 {
+ return
+ }
+
// computeHz determines the official rated speed of a CPU from its brand
// string. This insanity is *actually the official documented way to do
// this according to Intel*, prior to leaf 0x15 existing. The official
// documentation only shows this working for exactly `x.xx` or `xxxx`
// cases, e.g., `2.50GHz` or `1300MHz`; this parser will accept other
// sizes.
+ model := c.BrandName
hz := strings.LastIndex(model, "Hz")
if hz < 3 {
- return 0
+ return
}
var multiplier int64
switch model[hz-1] {
@@ -393,7 +423,7 @@ func hertz(model string) int64 {
multiplier = 1000 * 1000 * 1000 * 1000
}
if multiplier == 0 {
- return 0
+ return
}
freq := int64(0)
divisor := int64(0)
@@ -405,21 +435,22 @@ func hertz(model string) int64 {
decimalShift *= 10
} else if model[i] == '.' {
if divisor != 0 {
- return 0
+ return
}
divisor = decimalShift
} else {
- return 0
+ return
}
}
// we didn't find a space
if i < 0 {
- return 0
+ return
}
if divisor != 0 {
- return (freq * multiplier) / divisor
+ c.Hz = (freq * multiplier) / divisor
+ return
}
- return freq * multiplier
+ c.Hz = freq * multiplier
}
// VM Will return true if the cpu id indicates we are in
@@ -911,6 +942,7 @@ func support() flagSet {
fs.setIf(ecx&(1<<29) != 0, ENQCMD)
fs.setIf(ecx&(1<<30) != 0, SGXLC)
// CPUID.(EAX=7, ECX=0).EDX
+ fs.setIf(edx&(1<<11) != 0, RTM_ALWAYS_ABORT)
fs.setIf(edx&(1<<14) != 0, SERIALIZE)
fs.setIf(edx&(1<<16) != 0, TSXLDTRK)
fs.setIf(edx&(1<<26) != 0, IBPB)
@@ -949,6 +981,7 @@ func support() flagSet {
// edx
fs.setIf(edx&(1<<8) != 0, AVX512VP2INTERSECT)
fs.setIf(edx&(1<<22) != 0, AMXBF16)
+ fs.setIf(edx&(1<<23) != 0, AVX512FP16)
fs.setIf(edx&(1<<24) != 0, AMXTILE)
fs.setIf(edx&(1<<25) != 0, AMXINT8)
// eax1 = CPUID.(EAX=7, ECX=1).EAX
@@ -980,9 +1013,23 @@ func support() flagSet {
}
}
+ if maxExtendedFunction() >= 0x80000007 {
+ _, b, _, d := cpuid(0x80000007)
+ fs.setIf((b&(1<<0)) != 0, MCAOVERFLOW)
+ fs.setIf((b&(1<<1)) != 0, SUCCOR)
+ fs.setIf((b&(1<<2)) != 0, HWA)
+ fs.setIf((d&(1<<9)) != 0, CPBOOST)
+ }
+
if maxExtendedFunction() >= 0x80000008 {
_, b, _, _ := cpuid(0x80000008)
fs.setIf((b&(1<<9)) != 0, WBNOINVD)
+ fs.setIf((b&(1<<8)) != 0, MCOMMIT)
+ fs.setIf((b&(1<<13)) != 0, INT_WBINVD)
+ fs.setIf((b&(1<<4)) != 0, RDPRU)
+ fs.setIf((b&(1<<3)) != 0, INVLPGB)
+ fs.setIf((b&(1<<1)) != 0, MSRIRC)
+ fs.setIf((b&(1<<0)) != 0, CLZERO)
}
if maxExtendedFunction() >= 0x8000001b && fs.inSet(IBS) {
diff --git a/vendor/github.com/klauspost/cpuid/v2/detect_x86.go b/vendor/github.com/klauspost/cpuid/v2/detect_x86.go
index 93bc20f4..367c35c8 100644
--- a/vendor/github.com/klauspost/cpuid/v2/detect_x86.go
+++ b/vendor/github.com/klauspost/cpuid/v2/detect_x86.go
@@ -30,6 +30,6 @@ func addInfo(c *CPUInfo, safe bool) {
c.LogicalCores = logicalCores()
c.PhysicalCores = physicalCores()
c.VendorID, c.VendorString = vendorID()
- c.Hz = hertz(c.BrandName)
c.cacheSize()
+ c.frequencies()
}
diff --git a/vendor/github.com/klauspost/cpuid/v2/featureid_string.go b/vendor/github.com/klauspost/cpuid/v2/featureid_string.go
index 0e764f90..b1fe42e4 100644
--- a/vendor/github.com/klauspost/cpuid/v2/featureid_string.go
+++ b/vendor/github.com/klauspost/cpuid/v2/featureid_string.go
@@ -24,103 +24,115 @@ func _() {
_ = x[AVX512DQ-14]
_ = x[AVX512ER-15]
_ = x[AVX512F-16]
- _ = x[AVX512IFMA-17]
- _ = x[AVX512PF-18]
- _ = x[AVX512VBMI-19]
- _ = x[AVX512VBMI2-20]
- _ = x[AVX512VL-21]
- _ = x[AVX512VNNI-22]
- _ = x[AVX512VP2INTERSECT-23]
- _ = x[AVX512VPOPCNTDQ-24]
- _ = x[AVXSLOW-25]
- _ = x[BMI1-26]
- _ = x[BMI2-27]
- _ = x[CLDEMOTE-28]
- _ = x[CLMUL-29]
- _ = x[CMOV-30]
- _ = x[CX16-31]
- _ = x[ENQCMD-32]
- _ = x[ERMS-33]
- _ = x[F16C-34]
- _ = x[FMA3-35]
- _ = x[FMA4-36]
- _ = x[GFNI-37]
- _ = x[HLE-38]
- _ = x[HTT-39]
- _ = x[HYPERVISOR-40]
- _ = x[IBPB-41]
- _ = x[IBS-42]
- _ = x[IBSBRNTRGT-43]
- _ = x[IBSFETCHSAM-44]
- _ = x[IBSFFV-45]
- _ = x[IBSOPCNT-46]
- _ = x[IBSOPCNTEXT-47]
- _ = x[IBSOPSAM-48]
- _ = x[IBSRDWROPCNT-49]
- _ = x[IBSRIPINVALIDCHK-50]
- _ = x[LZCNT-51]
- _ = x[MMX-52]
- _ = x[MMXEXT-53]
- _ = x[MOVDIR64B-54]
- _ = x[MOVDIRI-55]
- _ = x[MPX-56]
- _ = x[NX-57]
- _ = x[POPCNT-58]
- _ = x[RDRAND-59]
- _ = x[RDSEED-60]
- _ = x[RDTSCP-61]
- _ = x[RTM-62]
- _ = x[SERIALIZE-63]
- _ = x[SGX-64]
- _ = x[SGXLC-65]
- _ = x[SHA-66]
- _ = x[SSE-67]
- _ = x[SSE2-68]
- _ = x[SSE3-69]
- _ = x[SSE4-70]
- _ = x[SSE42-71]
- _ = x[SSE4A-72]
- _ = x[SSSE3-73]
- _ = x[STIBP-74]
- _ = x[TBM-75]
- _ = x[TSXLDTRK-76]
- _ = x[VAES-77]
- _ = x[VMX-78]
- _ = x[VPCLMULQDQ-79]
- _ = x[WAITPKG-80]
- _ = x[WBNOINVD-81]
- _ = x[XOP-82]
- _ = x[AESARM-83]
- _ = x[ARMCPUID-84]
- _ = x[ASIMD-85]
- _ = x[ASIMDDP-86]
- _ = x[ASIMDHP-87]
- _ = x[ASIMDRDM-88]
- _ = x[ATOMICS-89]
- _ = x[CRC32-90]
- _ = x[DCPOP-91]
- _ = x[EVTSTRM-92]
- _ = x[FCMA-93]
- _ = x[FP-94]
- _ = x[FPHP-95]
- _ = x[GPA-96]
- _ = x[JSCVT-97]
- _ = x[LRCPC-98]
- _ = x[PMULL-99]
- _ = x[SHA1-100]
- _ = x[SHA2-101]
- _ = x[SHA3-102]
- _ = x[SHA512-103]
- _ = x[SM3-104]
- _ = x[SM4-105]
- _ = x[SVE-106]
- _ = x[lastID-107]
+ _ = x[AVX512FP16-17]
+ _ = x[AVX512IFMA-18]
+ _ = x[AVX512PF-19]
+ _ = x[AVX512VBMI-20]
+ _ = x[AVX512VBMI2-21]
+ _ = x[AVX512VL-22]
+ _ = x[AVX512VNNI-23]
+ _ = x[AVX512VP2INTERSECT-24]
+ _ = x[AVX512VPOPCNTDQ-25]
+ _ = x[AVXSLOW-26]
+ _ = x[BMI1-27]
+ _ = x[BMI2-28]
+ _ = x[CLDEMOTE-29]
+ _ = x[CLMUL-30]
+ _ = x[CLZERO-31]
+ _ = x[CMOV-32]
+ _ = x[CPBOOST-33]
+ _ = x[CX16-34]
+ _ = x[ENQCMD-35]
+ _ = x[ERMS-36]
+ _ = x[F16C-37]
+ _ = x[FMA3-38]
+ _ = x[FMA4-39]
+ _ = x[GFNI-40]
+ _ = x[HLE-41]
+ _ = x[HTT-42]
+ _ = x[HWA-43]
+ _ = x[HYPERVISOR-44]
+ _ = x[IBPB-45]
+ _ = x[IBS-46]
+ _ = x[IBSBRNTRGT-47]
+ _ = x[IBSFETCHSAM-48]
+ _ = x[IBSFFV-49]
+ _ = x[IBSOPCNT-50]
+ _ = x[IBSOPCNTEXT-51]
+ _ = x[IBSOPSAM-52]
+ _ = x[IBSRDWROPCNT-53]
+ _ = x[IBSRIPINVALIDCHK-54]
+ _ = x[INT_WBINVD-55]
+ _ = x[INVLPGB-56]
+ _ = x[LZCNT-57]
+ _ = x[MCAOVERFLOW-58]
+ _ = x[MCOMMIT-59]
+ _ = x[MMX-60]
+ _ = x[MMXEXT-61]
+ _ = x[MOVDIR64B-62]
+ _ = x[MOVDIRI-63]
+ _ = x[MPX-64]
+ _ = x[MSRIRC-65]
+ _ = x[NX-66]
+ _ = x[POPCNT-67]
+ _ = x[RDPRU-68]
+ _ = x[RDRAND-69]
+ _ = x[RDSEED-70]
+ _ = x[RDTSCP-71]
+ _ = x[RTM-72]
+ _ = x[RTM_ALWAYS_ABORT-73]
+ _ = x[SERIALIZE-74]
+ _ = x[SGX-75]
+ _ = x[SGXLC-76]
+ _ = x[SHA-77]
+ _ = x[SSE-78]
+ _ = x[SSE2-79]
+ _ = x[SSE3-80]
+ _ = x[SSE4-81]
+ _ = x[SSE42-82]
+ _ = x[SSE4A-83]
+ _ = x[SSSE3-84]
+ _ = x[STIBP-85]
+ _ = x[SUCCOR-86]
+ _ = x[TBM-87]
+ _ = x[TSXLDTRK-88]
+ _ = x[VAES-89]
+ _ = x[VMX-90]
+ _ = x[VPCLMULQDQ-91]
+ _ = x[WAITPKG-92]
+ _ = x[WBNOINVD-93]
+ _ = x[XOP-94]
+ _ = x[AESARM-95]
+ _ = x[ARMCPUID-96]
+ _ = x[ASIMD-97]
+ _ = x[ASIMDDP-98]
+ _ = x[ASIMDHP-99]
+ _ = x[ASIMDRDM-100]
+ _ = x[ATOMICS-101]
+ _ = x[CRC32-102]
+ _ = x[DCPOP-103]
+ _ = x[EVTSTRM-104]
+ _ = x[FCMA-105]
+ _ = x[FP-106]
+ _ = x[FPHP-107]
+ _ = x[GPA-108]
+ _ = x[JSCVT-109]
+ _ = x[LRCPC-110]
+ _ = x[PMULL-111]
+ _ = x[SHA1-112]
+ _ = x[SHA2-113]
+ _ = x[SHA3-114]
+ _ = x[SHA512-115]
+ _ = x[SM3-116]
+ _ = x[SM4-117]
+ _ = x[SVE-118]
+ _ = x[lastID-119]
_ = x[firstID-0]
}
-const _FeatureID_name = "firstIDADXAESNIAMD3DNOWAMD3DNOWEXTAMXBF16AMXINT8AMXTILEAVXAVX2AVX512BF16AVX512BITALGAVX512BWAVX512CDAVX512DQAVX512ERAVX512FAVX512IFMAAVX512PFAVX512VBMIAVX512VBMI2AVX512VLAVX512VNNIAVX512VP2INTERSECTAVX512VPOPCNTDQAVXSLOWBMI1BMI2CLDEMOTECLMULCMOVCX16ENQCMDERMSF16CFMA3FMA4GFNIHLEHTTHYPERVISORIBPBIBSIBSBRNTRGTIBSFETCHSAMIBSFFVIBSOPCNTIBSOPCNTEXTIBSOPSAMIBSRDWROPCNTIBSRIPINVALIDCHKLZCNTMMXMMXEXTMOVDIR64BMOVDIRIMPXNXPOPCNTRDRANDRDSEEDRDTSCPRTMSERIALIZESGXSGXLCSHASSESSE2SSE3SSE4SSE42SSE4ASSSE3STIBPTBMTSXLDTRKVAESVMXVPCLMULQDQWAITPKGWBNOINVDXOPAESARMARMCPUIDASIMDASIMDDPASIMDHPASIMDRDMATOMICSCRC32DCPOPEVTSTRMFCMAFPFPHPGPAJSCVTLRCPCPMULLSHA1SHA2SHA3SHA512SM3SM4SVElastID"
+const _FeatureID_name = "firstIDADXAESNIAMD3DNOWAMD3DNOWEXTAMXBF16AMXINT8AMXTILEAVXAVX2AVX512BF16AVX512BITALGAVX512BWAVX512CDAVX512DQAVX512ERAVX512FAVX512FP16AVX512IFMAAVX512PFAVX512VBMIAVX512VBMI2AVX512VLAVX512VNNIAVX512VP2INTERSECTAVX512VPOPCNTDQAVXSLOWBMI1BMI2CLDEMOTECLMULCLZEROCMOVCPBOOSTCX16ENQCMDERMSF16CFMA3FMA4GFNIHLEHTTHWAHYPERVISORIBPBIBSIBSBRNTRGTIBSFETCHSAMIBSFFVIBSOPCNTIBSOPCNTEXTIBSOPSAMIBSRDWROPCNTIBSRIPINVALIDCHKINT_WBINVDINVLPGBLZCNTMCAOVERFLOWMCOMMITMMXMMXEXTMOVDIR64BMOVDIRIMPXMSRIRCNXPOPCNTRDPRURDRANDRDSEEDRDTSCPRTMRTM_ALWAYS_ABORTSERIALIZESGXSGXLCSHASSESSE2SSE3SSE4SSE42SSE4ASSSE3STIBPSUCCORTBMTSXLDTRKVAESVMXVPCLMULQDQWAITPKGWBNOINVDXOPAESARMARMCPUIDASIMDASIMDDPASIMDHPASIMDRDMATOMICSCRC32DCPOPEVTSTRMFCMAFPFPHPGPAJSCVTLRCPCPMULLSHA1SHA2SHA3SHA512SM3SM4SVElastID"
-var _FeatureID_index = [...]uint16{0, 7, 10, 15, 23, 34, 41, 48, 55, 58, 62, 72, 84, 92, 100, 108, 116, 123, 133, 141, 151, 162, 170, 180, 198, 213, 220, 224, 228, 236, 241, 245, 249, 255, 259, 263, 267, 271, 275, 278, 281, 291, 295, 298, 308, 319, 325, 333, 344, 352, 364, 380, 385, 388, 394, 403, 410, 413, 415, 421, 427, 433, 439, 442, 451, 454, 459, 462, 465, 469, 473, 477, 482, 487, 492, 497, 500, 508, 512, 515, 525, 532, 540, 543, 549, 557, 562, 569, 576, 584, 591, 596, 601, 608, 612, 614, 618, 621, 626, 631, 636, 640, 644, 648, 654, 657, 660, 663, 669}
+var _FeatureID_index = [...]uint16{0, 7, 10, 15, 23, 34, 41, 48, 55, 58, 62, 72, 84, 92, 100, 108, 116, 123, 133, 143, 151, 161, 172, 180, 190, 208, 223, 230, 234, 238, 246, 251, 257, 261, 268, 272, 278, 282, 286, 290, 294, 298, 301, 304, 307, 317, 321, 324, 334, 345, 351, 359, 370, 378, 390, 406, 416, 423, 428, 439, 446, 449, 455, 464, 471, 474, 480, 482, 488, 493, 499, 505, 511, 514, 530, 539, 542, 547, 550, 553, 557, 561, 565, 570, 575, 580, 585, 591, 594, 602, 606, 609, 619, 626, 634, 637, 643, 651, 656, 663, 670, 678, 685, 690, 695, 702, 706, 708, 712, 715, 720, 725, 730, 734, 738, 742, 748, 751, 754, 757, 763}
func (i FeatureID) String() string {
if i < 0 || i >= FeatureID(len(_FeatureID_index)-1) {
diff --git a/vendor/github.com/lrstanley/girc/builtin.go b/vendor/github.com/lrstanley/girc/builtin.go
index 778a5c68..081e9465 100644
--- a/vendor/github.com/lrstanley/girc/builtin.go
+++ b/vendor/github.com/lrstanley/girc/builtin.go
@@ -108,7 +108,10 @@ func nickCollisionHandler(c *Client, e Event) {
return
}
- c.Cmd.Nick(c.Config.HandleNickCollide(c.GetNick()))
+ newNick := c.Config.HandleNickCollide(c.GetNick())
+ if newNick != "" {
+ c.Cmd.Nick(newNick)
+ }
}
// handlePING helps respond to ping requests from the server.
diff --git a/vendor/github.com/lrstanley/girc/client.go b/vendor/github.com/lrstanley/girc/client.go
index f8035755..3308b399 100644
--- a/vendor/github.com/lrstanley/girc/client.go
+++ b/vendor/github.com/lrstanley/girc/client.go
@@ -168,6 +168,9 @@ type Config struct {
// an invalid nickname. For example, if "test" is already in use, or is
// blocked by the network/a service, the client will try and use "test_",
// then it will attempt "test__", "test___", and so on.
+ //
+ // If HandleNickCollide returns an empty string, the client will not
+ // attempt to fix nickname collisions, and you must handle this yourself.
HandleNickCollide func(oldNick string) (newNick string)
}
diff --git a/vendor/github.com/matterbridge/matterclient/matterclient.go b/vendor/github.com/matterbridge/matterclient/matterclient.go
index a32219fe..3a89e141 100644
--- a/vendor/github.com/matterbridge/matterclient/matterclient.go
+++ b/vendor/github.com/matterbridge/matterclient/matterclient.go
@@ -71,6 +71,7 @@ type Client struct {
WsConnected bool
OnWsConnect func()
reconnectBusy bool
+ Timeout int
logger *logrus.Entry
rootLogger *logrus.Logger
@@ -80,6 +81,8 @@ type Client struct {
lastPong time.Time
}
+var Matterircd bool
+
func New(login string, pass string, team string, server string, mfatoken string) *Client {
rootLogger := logrus.New()
rootLogger.SetFormatter(&prefixed.TextFormatter{
@@ -229,7 +232,12 @@ func (m *Client) initClient(b *backoff.Backoff) error {
},
Proxy: http.ProxyFromEnvironment,
}
- m.Client.HTTPClient.Timeout = time.Second * 10
+
+ if m.Timeout == 0 {
+ m.Timeout = 10
+ }
+
+ m.Client.HTTPClient.Timeout = time.Second * time.Duration(m.Timeout)
// handle MMAUTHTOKEN and personal token
if err := m.handleLoginToken(); err != nil {
@@ -613,7 +621,9 @@ func (m *Client) WsReceiver(ctx context.Context) {
Team: m.Credentials.Team,
}
- m.parseMessage(msg)
+ if !Matterircd {
+ m.parseMessage(msg)
+ }
m.MessageChan <- msg
case response := <-m.WsClient.ResponseChannel:
diff --git a/vendor/github.com/mattermost/logr/v2/buffer.go b/vendor/github.com/mattermost/logr/v2/buffer.go
new file mode 100644
index 00000000..42bf5255
--- /dev/null
+++ b/vendor/github.com/mattermost/logr/v2/buffer.go
@@ -0,0 +1,28 @@
+package logr
+
+import (
+ "bytes"
+ "sync"
+)
+
+// Buffer provides a thread-safe buffer useful for logging to memory in unit tests.
+type Buffer struct {
+ buf bytes.Buffer
+ mux sync.Mutex
+}
+
+func (b *Buffer) Read(p []byte) (n int, err error) {
+ b.mux.Lock()
+ defer b.mux.Unlock()
+ return b.buf.Read(p)
+}
+func (b *Buffer) Write(p []byte) (n int, err error) {
+ b.mux.Lock()
+ defer b.mux.Unlock()
+ return b.buf.Write(p)
+}
+func (b *Buffer) String() string {
+ b.mux.Lock()
+ defer b.mux.Unlock()
+ return b.buf.String()
+}
diff --git a/vendor/github.com/mattermost/logr/v2/config/config.go b/vendor/github.com/mattermost/logr/v2/config/config.go
index a93b7a25..e01a5514 100644
--- a/vendor/github.com/mattermost/logr/v2/config/config.go
+++ b/vendor/github.com/mattermost/logr/v2/config/config.go
@@ -31,8 +31,8 @@ type TargetFactory func(targetType string, options json.RawMessage) (logr.Target
type FormatterFactory func(format string, options json.RawMessage) (logr.Formatter, error)
type Factories struct {
- targetFactory TargetFactory // can be nil
- formatterFactory FormatterFactory // can be nil
+ TargetFactory TargetFactory // can be nil
+ FormatterFactory FormatterFactory // can be nil
}
var removeAll = func(ti logr.TargetInfo) bool { return true }
@@ -56,7 +56,7 @@ func ConfigureTargets(lgr *logr.Logr, config map[string]TargetCfg, factories *Fa
}
for name, tcfg := range config {
- target, err := newTarget(tcfg.Type, tcfg.Options, factories.targetFactory)
+ target, err := newTarget(tcfg.Type, tcfg.Options, factories.TargetFactory)
if err != nil {
return fmt.Errorf("error creating log target %s: %w", name, err)
}
@@ -65,7 +65,7 @@ func ConfigureTargets(lgr *logr.Logr, config map[string]TargetCfg, factories *Fa
continue
}
- formatter, err := newFormatter(tcfg.Format, tcfg.FormatOptions, factories.formatterFactory)
+ formatter, err := newFormatter(tcfg.Format, tcfg.FormatOptions, factories.FormatterFactory)
if err != nil {
return fmt.Errorf("error creating formatter for log target %s: %w", name, err)
}
diff --git a/vendor/github.com/mattermost/logr/v2/field.go b/vendor/github.com/mattermost/logr/v2/field.go
index 5725d0a1..33342870 100644
--- a/vendor/github.com/mattermost/logr/v2/field.go
+++ b/vendor/github.com/mattermost/logr/v2/field.go
@@ -15,7 +15,7 @@ var (
Space = []byte{' '}
Newline = []byte{'\n'}
Quote = []byte{'"'}
- Colon = []byte{'"'}
+ Colon = []byte{':'}
)
// LogCloner is implemented by `Any` types that require a clone to be provided
diff --git a/vendor/github.com/mattermost/logr/v2/filterstd.go b/vendor/github.com/mattermost/logr/v2/filterstd.go
index 7f38a332..fe917fe5 100644
--- a/vendor/github.com/mattermost/logr/v2/filterstd.go
+++ b/vendor/github.com/mattermost/logr/v2/filterstd.go
@@ -11,6 +11,7 @@ type StdFilter struct {
// is enabled for this filter.
func (lt StdFilter) GetEnabledLevel(level Level) (Level, bool) {
enabled := level.ID <= lt.Lvl.ID
+ stackTrace := level.ID <= lt.Stacktrace.ID
var levelEnabled Level
if enabled {
@@ -33,6 +34,11 @@ func (lt StdFilter) GetEnabledLevel(level Level) (Level, bool) {
levelEnabled = level
}
}
+
+ if stackTrace {
+ levelEnabled.Stacktrace = true
+ }
+
return levelEnabled, enabled
}
diff --git a/vendor/github.com/mattermost/logr/v2/sugar.go b/vendor/github.com/mattermost/logr/v2/sugar.go
index f4f300ee..882f0fd5 100644
--- a/vendor/github.com/mattermost/logr/v2/sugar.go
+++ b/vendor/github.com/mattermost/logr/v2/sugar.go
@@ -117,3 +117,81 @@ func (s Sugar) Fatalf(format string, args ...interface{}) {
func (s Sugar) Panicf(format string, args ...interface{}) {
s.Logf(Panic, format, args...)
}
+
+//
+// K/V style
+//
+
+// With returns a new Sugar logger with the specified key/value pairs added to the
+// fields list.
+func (s Sugar) With(keyValuePairs ...interface{}) Sugar {
+ return s.logger.With(s.argsToFields(keyValuePairs)...).Sugar()
+}
+
+// Tracew outputs at trace level with the specified key/value pairs converted to fields.
+func (s Sugar) Tracew(msg string, keyValuePairs ...interface{}) {
+ s.logger.Log(Trace, msg, s.argsToFields(keyValuePairs)...)
+}
+
+// Debugw outputs at debug level with the specified key/value pairs converted to fields.
+func (s Sugar) Debugw(msg string, keyValuePairs ...interface{}) {
+ s.logger.Log(Debug, msg, s.argsToFields(keyValuePairs)...)
+}
+
+// Infow outputs at info level with the specified key/value pairs converted to fields.
+func (s Sugar) Infow(msg string, keyValuePairs ...interface{}) {
+ s.logger.Log(Info, msg, s.argsToFields(keyValuePairs)...)
+}
+
+// Warnw outputs at warn level with the specified key/value pairs converted to fields.
+func (s Sugar) Warnw(msg string, keyValuePairs ...interface{}) {
+ s.logger.Log(Warn, msg, s.argsToFields(keyValuePairs)...)
+}
+
+// Errorw outputs at error level with the specified key/value pairs converted to fields.
+func (s Sugar) Errorw(msg string, keyValuePairs ...interface{}) {
+ s.logger.Log(Error, msg, s.argsToFields(keyValuePairs)...)
+}
+
+// Fatalw outputs at fatal level with the specified key/value pairs converted to fields.
+func (s Sugar) Fatalw(msg string, keyValuePairs ...interface{}) {
+ s.logger.Log(Fatal, msg, s.argsToFields(keyValuePairs)...)
+}
+
+// Panicw outputs at panic level with the specified key/value pairs converted to fields.
+func (s Sugar) Panicw(msg string, keyValuePairs ...interface{}) {
+ s.logger.Log(Panic, msg, s.argsToFields(keyValuePairs)...)
+}
+
+// argsToFields converts an array of args, possibly containing name/value pairs
+// into a []Field.
+func (s Sugar) argsToFields(keyValuePairs []interface{}) []Field {
+ if len(keyValuePairs) == 0 {
+ return nil
+ }
+
+ fields := make([]Field, 0, len(keyValuePairs))
+ count := len(keyValuePairs)
+
+ for i := 0; i < count; {
+ if fld, ok := keyValuePairs[i].(Field); ok {
+ fields = append(fields, fld)
+ i++
+ continue
+ }
+
+ if i == count-1 {
+ s.logger.Error("invalid key/value pair", Any("arg", keyValuePairs[i]))
+ break
+ }
+
+ // we should have a key/value pair now. The key must be a string.
+ if key, ok := keyValuePairs[i].(string); !ok {
+ s.logger.Error("invalid key for key/value pair", Int("pos", i))
+ } else {
+ fields = append(fields, Any(key, keyValuePairs[i+1]))
+ }
+ i += 2
+ }
+ return fields
+}
diff --git a/vendor/github.com/mattermost/logr/v2/targets/testing.go b/vendor/github.com/mattermost/logr/v2/targets/testing.go
new file mode 100644
index 00000000..ea3df70c
--- /dev/null
+++ b/vendor/github.com/mattermost/logr/v2/targets/testing.go
@@ -0,0 +1,72 @@
+package targets
+
+import (
+ "strings"
+ "sync"
+ "testing"
+
+ "github.com/mattermost/logr/v2"
+ "github.com/mattermost/logr/v2/formatters"
+)
+
+// Testing is a simple log target that writes to a (*testing.T) log.
+type Testing struct {
+ mux sync.Mutex
+ t *testing.T
+}
+
+func NewTestingTarget(t *testing.T) *Testing {
+ return &Testing{
+ t: t,
+ }
+}
+
+// Init is called once to initialize the target.
+func (tt *Testing) Init() error {
+ return nil
+}
+
+// Write outputs bytes to this file target.
+func (tt *Testing) Write(p []byte, rec *logr.LogRec) (int, error) {
+ tt.mux.Lock()
+ defer tt.mux.Unlock()
+
+ if tt.t != nil {
+ s := strings.TrimSpace(string(p))
+ tt.t.Log(s)
+ }
+ return len(p), nil
+}
+
+// Shutdown is called once to free/close any resources.
+// Target queue is already drained when this is called.
+func (tt *Testing) Shutdown() error {
+ tt.mux.Lock()
+ defer tt.mux.Unlock()
+
+ tt.t = nil
+ return nil
+}
+
+// CreateTestLogger creates a logger for unit tests. Log records are output to `(*testing.T).Log`.
+// A new logger is returned along with a method to shutdown the new logger.
+func CreateTestLogger(t *testing.T, levels ...logr.Level) (logger logr.Logger, shutdown func() error) {
+ lgr, _ := logr.New()
+ filter := logr.NewCustomFilter(levels...)
+ formatter := &formatters.Plain{EnableCaller: true}
+ target := NewTestingTarget(t)
+
+ if err := lgr.AddTarget(target, "test", filter, formatter, 1000); err != nil {
+ t.Fail()
+ }
+ shutdown = func() error {
+ err := lgr.Shutdown()
+ if err != nil {
+ target.mux.Lock()
+ target.t.Error("error shutting down test logger", err)
+ target.mux.Unlock()
+ }
+ return err
+ }
+ return lgr.NewLogger(), shutdown
+}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go b/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go
index 8de21124..1bcb2363 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/auditconv.go
@@ -4,6 +4,8 @@
package model
import (
+ "strings"
+
"github.com/francoispqt/gojay"
)
@@ -268,7 +270,10 @@ func newAuditCommandArgs(ca *CommandArgs) auditCommandArgs {
cmdargs.ChannelID = ca.ChannelId
cmdargs.TeamID = ca.TeamId
cmdargs.TriggerID = ca.TriggerId
- cmdargs.Command = ca.Command
+ cmdFields := strings.Fields(ca.Command)
+ if len(cmdFields) > 0 {
+ cmdargs.Command = cmdFields[0]
+ }
}
return cmdargs
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/bot.go b/vendor/github.com/mattermost/mattermost-server/v6/model/bot.go
index fe9b9078..7b581089 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/bot.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/bot.go
@@ -63,12 +63,8 @@ func (b *Bot) Clone() *Bot {
return &copy
}
-// IsValid validates the bot and returns an error if it isn't configured correctly.
-func (b *Bot) IsValid() *AppError {
- if !IsValidId(b.UserId) {
- return NewAppError("Bot.IsValid", "model.bot.is_valid.user_id.app_error", b.Trace(), "", http.StatusBadRequest)
- }
-
+// IsValidCreate validates bot for Create call. This skips validations of fields that are auto-filled on Create
+func (b *Bot) IsValidCreate() *AppError {
if !IsValidUsername(b.Username) {
return NewAppError("Bot.IsValid", "model.bot.is_valid.username.app_error", b.Trace(), "", http.StatusBadRequest)
}
@@ -85,6 +81,15 @@ func (b *Bot) IsValid() *AppError {
return NewAppError("Bot.IsValid", "model.bot.is_valid.creator_id.app_error", b.Trace(), "", http.StatusBadRequest)
}
+ return nil
+}
+
+// IsValid validates the bot and returns an error if it isn't configured correctly.
+func (b *Bot) IsValid() *AppError {
+ if !IsValidId(b.UserId) {
+ return NewAppError("Bot.IsValid", "model.bot.is_valid.user_id.app_error", b.Trace(), "", http.StatusBadRequest)
+ }
+
if b.CreateAt == 0 {
return NewAppError("Bot.IsValid", "model.bot.is_valid.create_at.app_error", b.Trace(), "", http.StatusBadRequest)
}
@@ -92,8 +97,7 @@ func (b *Bot) IsValid() *AppError {
if b.UpdateAt == 0 {
return NewAppError("Bot.IsValid", "model.bot.is_valid.update_at.app_error", b.Trace(), "", http.StatusBadRequest)
}
-
- return nil
+ return b.IsValidCreate()
}
// PreSave should be run before saving a new bot to the database.
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go b/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go
index 75fc2680..20604700 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/channel.go
@@ -56,6 +56,7 @@ type Channel struct {
Shared *bool `json:"shared"`
TotalMsgCountRoot int64 `json:"total_msg_count_root"`
PolicyID *string `json:"policy_id" db:"-"`
+ LastRootPostAt int64 `json:"last_root_post_at"`
}
type ChannelWithTeamData struct {
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/channel_member.go b/vendor/github.com/mattermost/mattermost-server/v6/model/channel_member.go
index 82bc84ae..d0bfc4a5 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/channel_member.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/channel_member.go
@@ -69,7 +69,6 @@ type ChannelMemberForExport struct {
}
func (o *ChannelMember) IsValid() *AppError {
-
if !IsValidId(o.ChannelId) {
return NewAppError("ChannelMember.IsValid", "model.channel_member.is_valid.channel_id.app_error", nil, "", http.StatusBadRequest)
}
@@ -106,6 +105,11 @@ func (o *ChannelMember) IsValid() *AppError {
}
}
+ if len(o.Roles) > UserRolesMaxLength {
+ return NewAppError("ChannelMember.IsValid", "model.channel_member.is_valid.roles_limit.app_error",
+ map[string]interface{}{"Limit": UserRolesMaxLength}, "", http.StatusBadRequest)
+ }
+
return nil
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go b/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go
index 615b1264..7bbc98e7 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/client4.go
@@ -3899,7 +3899,13 @@ func (c *Client4) SearchPostsWithParams(teamId string, params *SearchParameter)
if jsonErr != nil {
return nil, nil, NewAppError("SearchFilesWithParams", "api.marshal_error", nil, jsonErr.Error(), http.StatusInternalServerError)
}
- r, err := c.DoAPIPost(c.teamRoute(teamId)+"/posts/search", string(js))
+ var route string
+ if teamId == "" {
+ route = c.postsRoute() + "/search"
+ } else {
+ route = c.teamRoute(teamId) + "/posts/search"
+ }
+ r, err := c.DoAPIPost(route, string(js))
if err != nil {
return nil, BuildResponse(r), err
}
@@ -3917,7 +3923,13 @@ func (c *Client4) SearchPostsWithParams(teamId string, params *SearchParameter)
// SearchPostsWithMatches returns any posts with matching terms string, including.
func (c *Client4) SearchPostsWithMatches(teamId string, terms string, isOrSearch bool) (*PostSearchResults, *Response, error) {
requestBody := map[string]interface{}{"terms": terms, "is_or_search": isOrSearch}
- r, err := c.DoAPIPost(c.teamRoute(teamId)+"/posts/search", StringInterfaceToJSON(requestBody))
+ var route string
+ if teamId == "" {
+ route = c.postsRoute() + "/search"
+ } else {
+ route = c.teamRoute(teamId) + "/posts/search"
+ }
+ r, err := c.DoAPIPost(route, StringInterfaceToJSON(requestBody))
if err != nil {
return nil, BuildResponse(r), err
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/cloud.go b/vendor/github.com/mattermost/mattermost-server/v6/model/cloud.go
index ffd85a2a..7c63c138 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/cloud.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/cloud.go
@@ -20,8 +20,9 @@ var MockCWS string
type BillingScheme string
const (
- BillingSchemePerSeat = BillingScheme("per_seat")
- BillingSchemeFlatFee = BillingScheme("flat_fee")
+ BillingSchemePerSeat = BillingScheme("per_seat")
+ BillingSchemeFlatFee = BillingScheme("flat_fee")
+ BillingSchemeSalesServe = BillingScheme("sales_serve")
)
type RecurringInterval string
@@ -104,7 +105,7 @@ type Address struct {
// PaymentMethod represents methods of payment for a customer.
type PaymentMethod struct {
Type string `json:"type"`
- LastFour int `json:"last_four"`
+ LastFour string `json:"last_four"`
ExpMonth int `json:"exp_month"`
ExpYear int `json:"exp_year"`
CardBrand string `json:"card_brand"`
@@ -169,7 +170,7 @@ type CWSWebhookPayload struct {
type FailedPayment struct {
CardBrand string `json:"card_brand"`
- LastFour int `json:"last_four"`
+ LastFour string `json:"last_four"`
FailureMessage string `json:"failure_message"`
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/config.go b/vendor/github.com/mattermost/mattermost-server/v6/model/config.go
index 39cdb893..a2eda9ff 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/config.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/config.go
@@ -352,6 +352,7 @@ type ServiceSettings struct {
EnableBotAccountCreation *bool `access:"integrations_bot_accounts"`
EnableSVGs *bool `access:"site_posts"`
EnableLatex *bool `access:"site_posts"`
+ EnableInlineLatex *bool `access:"site_posts"`
EnableAPIChannelDeletion *bool
EnableLocalMode *bool
LocalModeSocketLocation *string // telemetry: none
@@ -736,6 +737,10 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
}
}
+ if s.EnableInlineLatex == nil {
+ s.EnableInlineLatex = NewBool(true)
+ }
+
if s.EnableLocalMode == nil {
s.EnableLocalMode = NewBool(false)
}
@@ -2610,8 +2615,9 @@ func (s *DataRetentionSettings) SetDefaults() {
}
type JobSettings struct {
- RunJobs *bool `access:"write_restrictable,cloud_restrictable"`
- RunScheduler *bool `access:"write_restrictable,cloud_restrictable"`
+ RunJobs *bool `access:"write_restrictable,cloud_restrictable"`
+ RunScheduler *bool `access:"write_restrictable,cloud_restrictable"`
+ CleanupJobsThresholdDays *int `access:"write_restrictable,cloud_restrictable"`
}
func (s *JobSettings) SetDefaults() {
@@ -2622,6 +2628,10 @@ func (s *JobSettings) SetDefaults() {
if s.RunScheduler == nil {
s.RunScheduler = NewBool(true)
}
+
+ if s.CleanupJobsThresholdDays == nil {
+ s.CleanupJobsThresholdDays = NewInt(-1)
+ }
}
type CloudSettings struct {
@@ -3736,9 +3746,11 @@ func (o *Config) Sanitize() {
*o.LdapSettings.BindPassword = FakeSetting
}
- *o.FileSettings.PublicLinkSalt = FakeSetting
+ if o.FileSettings.PublicLinkSalt != nil {
+ *o.FileSettings.PublicLinkSalt = FakeSetting
+ }
- if *o.FileSettings.AmazonS3SecretAccessKey != "" {
+ if o.FileSettings.AmazonS3SecretAccessKey != nil && *o.FileSettings.AmazonS3SecretAccessKey != "" {
*o.FileSettings.AmazonS3SecretAccessKey = FakeSetting
}
@@ -3746,7 +3758,7 @@ func (o *Config) Sanitize() {
*o.EmailSettings.SMTPPassword = FakeSetting
}
- if *o.GitLabSettings.Secret != "" {
+ if o.GitLabSettings.Secret != nil && *o.GitLabSettings.Secret != "" {
*o.GitLabSettings.Secret = FakeSetting
}
@@ -3762,10 +3774,17 @@ func (o *Config) Sanitize() {
*o.OpenIdSettings.Secret = FakeSetting
}
- *o.SqlSettings.DataSource = FakeSetting
- *o.SqlSettings.AtRestEncryptKey = FakeSetting
+ if o.SqlSettings.DataSource != nil {
+ *o.SqlSettings.DataSource = FakeSetting
+ }
- *o.ElasticsearchSettings.Password = FakeSetting
+ if o.SqlSettings.AtRestEncryptKey != nil {
+ *o.SqlSettings.AtRestEncryptKey = FakeSetting
+ }
+
+ if o.ElasticsearchSettings.Password != nil {
+ *o.ElasticsearchSettings.Password = FakeSetting
+ }
for i := range o.SqlSettings.DataSourceReplicas {
o.SqlSettings.DataSourceReplicas[i] = FakeSetting
@@ -3775,7 +3794,9 @@ func (o *Config) Sanitize() {
o.SqlSettings.DataSourceSearchReplicas[i] = FakeSetting
}
- if o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != nil && *o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != "" {
+ if o.MessageExportSettings.GlobalRelaySettings != nil &&
+ o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != nil &&
+ *o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != "" {
*o.MessageExportSettings.GlobalRelaySettings.SMTPPassword = FakeSetting
}
@@ -3783,7 +3804,9 @@ func (o *Config) Sanitize() {
*o.ServiceSettings.GfycatAPISecret = FakeSetting
}
- *o.ServiceSettings.SplitKey = FakeSetting
+ if o.ServiceSettings.SplitKey != nil {
+ *o.ServiceSettings.SplitKey = FakeSetting
+ }
}
// structToMapFilteredByTag converts a struct into a map removing those fields that has the tag passed
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go b/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go
index a341c254..81b62172 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/feature_flags.go
@@ -33,9 +33,6 @@ type FeatureFlags struct {
PluginApps string `plugin_id:"com.mattermost.apps"`
PluginFocalboard string `plugin_id:"focalboard"`
- // Enable timed dnd support for user status
- TimedDND bool
-
PermalinkPreviews bool
// Enable the Global Header
@@ -43,6 +40,23 @@ type FeatureFlags struct {
// Enable different team menu button treatments, possible values = ("none", "by_team_name", "inverted_sidebar_bg_color")
AddChannelButton string
+
+ // Enable different treatments for first time users, possible values = ("none", "tour_point", "around_input")
+ PrewrittenMessages string
+
+ // Enable different treatments for first time users, possible values = ("none", "tips_and_next_steps")
+ DownloadAppsCTA string
+
+ // Determine whether when a user gets created, they'll have noisy notifications e.g. Send desktop notifications for all activity
+ NewAccountNoisy bool
+ // Enable Boards Unfurl Preview
+ BoardsUnfurl bool
+
+ // Enable Calls plugin support in the mobile app
+ CallsMobile bool
+
+ // Start A/B tour tips automatically, possible values = ("none", "auto")
+ AutoTour string
}
func (f *FeatureFlags) SetDefaults() {
@@ -54,10 +68,15 @@ func (f *FeatureFlags) SetDefaults() {
f.AppsEnabled = false
f.PluginApps = ""
f.PluginFocalboard = ""
- f.TimedDND = false
f.PermalinkPreviews = true
f.GlobalHeader = true
f.AddChannelButton = "by_team_name"
+ f.PrewrittenMessages = "tour_point"
+ f.DownloadAppsCTA = "tips_and_next_steps"
+ f.NewAccountNoisy = false
+ f.BoardsUnfurl = true
+ f.CallsMobile = false
+ f.AutoTour = "none"
}
func (f *FeatureFlags) Plugins() map[string]string {
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/integration_action.go b/vendor/github.com/mattermost/mattermost-server/v6/model/integration_action.go
index c61cc6d4..4c645d02 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/integration_action.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/integration_action.go
@@ -115,6 +115,14 @@ func (p *PostAction) Equals(input *PostAction) bool {
}
// Compare PostActionIntegration
+
+ // If input is nil, then return true if original is also nil.
+ // Else return false.
+ if input.Integration == nil {
+ return p.Integration == nil
+ }
+
+ // Both are unequal and not nil.
if p.Integration.URL != input.Integration.URL {
return false
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/post_embed.go b/vendor/github.com/mattermost/mattermost-server/v6/model/post_embed.go
index ea3e2c5b..b72ae6e1 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/post_embed.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/post_embed.go
@@ -9,6 +9,7 @@ const (
PostEmbedOpengraph PostEmbedType = "opengraph"
PostEmbedLink PostEmbedType = "link"
PostEmbedPermalink PostEmbedType = "permalink"
+ PostEmbedBoards PostEmbedType = "boards"
)
type PostEmbedType string
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/session.go b/vendor/github.com/mattermost/mattermost-server/v6/model/session.go
index d3bbc6e4..72f8d646 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/session.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/session.go
@@ -4,6 +4,7 @@
package model
import (
+ "net/http"
"strconv"
"strings"
@@ -78,6 +79,27 @@ func (s *Session) DeepCopy() *Session {
return &copySession
}
+func (s *Session) IsValid() *AppError {
+ if !IsValidId(s.Id) {
+ return NewAppError("Session.IsValid", "model.session.is_valid.id.app_error", nil, "", http.StatusBadRequest)
+ }
+
+ if !IsValidId(s.UserId) {
+ return NewAppError("Session.IsValid", "model.session.is_valid.user_id.app_error", nil, "", http.StatusBadRequest)
+ }
+
+ if s.CreateAt == 0 {
+ return NewAppError("Session.IsValid", "model.session.is_valid.create_at.app_error", nil, "", http.StatusBadRequest)
+ }
+
+ if len(s.Roles) > UserRolesMaxLength {
+ return NewAppError("Session.IsValid", "model.session.is_valid.roles_limit.app_error",
+ map[string]interface{}{"Limit": UserRolesMaxLength}, "session_id="+s.Id, http.StatusBadRequest)
+ }
+
+ return nil
+}
+
func (s *Session) PreSave() {
if s.Id == "" {
s.Id = NewId()
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/shared_channel.go b/vendor/github.com/mattermost/mattermost-server/v6/model/shared_channel.go
index 08a29292..ed069b28 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/shared_channel.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/shared_channel.go
@@ -238,6 +238,7 @@ func (scf *SharedChannelAttachment) IsValid() *AppError {
type SharedChannelFilterOpts struct {
TeamId string
CreatorId string
+ MemberId string
ExcludeHome bool
ExcludeRemote bool
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/team_member.go b/vendor/github.com/mattermost/mattermost-server/v6/model/team_member.go
index 2c928d2d..c0b3772c 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/team_member.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/team_member.go
@@ -98,7 +98,6 @@ func TeamMemberWithErrorToString(o *TeamMemberWithError) string {
}
func (o *TeamMember) IsValid() *AppError {
-
if !IsValidId(o.TeamId) {
return NewAppError("TeamMember.IsValid", "model.team_member.is_valid.team_id.app_error", nil, "", http.StatusBadRequest)
}
@@ -107,6 +106,11 @@ func (o *TeamMember) IsValid() *AppError {
return NewAppError("TeamMember.IsValid", "model.team_member.is_valid.user_id.app_error", nil, "", http.StatusBadRequest)
}
+ if len(o.Roles) > UserRolesMaxLength {
+ return NewAppError("TeamMember.IsValid", "model.team_member.is_valid.roles_limit.app_error",
+ map[string]interface{}{"Limit": UserRolesMaxLength}, "", http.StatusBadRequest)
+ }
+
return nil
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/user.go b/vendor/github.com/mattermost/mattermost-server/v6/model/user.go
index 2e843ea1..271ccd81 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/user.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/user.go
@@ -60,6 +60,7 @@ const (
UserPasswordMaxLength = 72
UserLocaleMaxLength = 5
UserTimezoneMaxRunes = 256
+ UserRolesMaxLength = 256
)
//msgp:tuple User
@@ -261,7 +262,6 @@ func (u *User) DeepCopy() *User {
// IsValid validates the user and returns an error if it isn't configured
// correctly.
func (u *User) IsValid() *AppError {
-
if !IsValidId(u.Id) {
return InvalidUserError("id", "")
}
@@ -332,6 +332,11 @@ func (u *User) IsValid() *AppError {
}
}
+ if len(u.Roles) > UserRolesMaxLength {
+ return NewAppError("User.IsValid", "model.user.is_valid.roles_limit.app_error",
+ map[string]interface{}{"Limit": UserRolesMaxLength}, "user_id="+u.Id, http.StatusBadRequest)
+ }
+
return nil
}
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/utils.go b/vendor/github.com/mattermost/mattermost-server/v6/model/utils.go
index fab3f494..c57716f7 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/utils.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/utils.go
@@ -6,6 +6,7 @@ package model
import (
"bytes"
"crypto/rand"
+ "database/sql/driver"
"encoding/base32"
"encoding/json"
"fmt"
@@ -24,6 +25,7 @@ import (
"github.com/mattermost/mattermost-server/v6/shared/i18n"
"github.com/pborman/uuid"
+ "github.com/pkg/errors"
)
const (
@@ -72,6 +74,30 @@ func (sa StringArray) Equals(input StringArray) bool {
return true
}
+// Value converts StringArray to database value
+func (sa StringArray) Value() (driver.Value, error) {
+ return json.Marshal(sa)
+}
+
+// Scan converts database column value to StringArray
+func (sa *StringArray) Scan(value interface{}) error {
+ if value == nil {
+ return nil
+ }
+
+ buf, ok := value.([]byte)
+ if ok {
+ return json.Unmarshal(buf, sa)
+ }
+
+ str, ok := value.(string)
+ if ok {
+ return json.Unmarshal([]byte(str), sa)
+ }
+
+ return errors.New("received value is neither a byte slice nor string")
+}
+
var translateFunc i18n.TranslateFunc
var translateFuncOnce sync.Once
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/version.go b/vendor/github.com/mattermost/mattermost-server/v6/model/version.go
index 13170dc5..4e578887 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/model/version.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/model/version.go
@@ -13,8 +13,7 @@ import (
// It should be maintained in chronological order with most current
// release at the front of the list.
var versions = []string{
- "6.0.2",
- "6.0.1",
+ "6.1.0",
"6.0.0",
"5.39.0",
"5.38.0",
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/shared/mlog/mlog.go b/vendor/github.com/mattermost/mattermost-server/v6/shared/mlog/mlog.go
index ac56362c..0f4cc1fe 100644
--- a/vendor/github.com/mattermost/mattermost-server/v6/shared/mlog/mlog.go
+++ b/vendor/github.com/mattermost/mattermost-server/v6/shared/mlog/mlog.go
@@ -49,6 +49,9 @@ type LogRec = logr.LogRec
type LogCloner = logr.LogCloner
type MetricsCollector = logr.MetricsCollector
type TargetCfg = logrcfg.TargetCfg
+type TargetFactory = logrcfg.TargetFactory
+type FormatterFactory = logrcfg.FormatterFactory
+type Factories = logrcfg.Factories
type Sugar = logr.Sugar
// LoggerConfiguration is a map of LogTarget configurations.
@@ -179,7 +182,10 @@ func NewLogger(options ...Option) (*Logger, error) {
// For each case JSON containing log targets is provided. Target name collisions are resolved
// using the following precedence:
// cfgFile > cfgEscaped
-func (l *Logger) Configure(cfgFile string, cfgEscaped string) error {
+//
+// An optional set of factories can be provided which will be called to create any target
+// types or formatters not built-in.
+func (l *Logger) Configure(cfgFile string, cfgEscaped string, factories *Factories) error {
if atomic.LoadInt32(l.lockConfig) != 0 {
return ErrConfigurationLock
}
@@ -213,16 +219,18 @@ func (l *Logger) Configure(cfgFile string, cfgEscaped string) error {
return nil
}
- return logrcfg.ConfigureTargets(l.log.Logr(), cfgMap.toTargetCfg(), nil)
+ return logrcfg.ConfigureTargets(l.log.Logr(), cfgMap.toTargetCfg(), factories)
}
// ConfigureTargets provides a new configuration for this logger via a `LoggerConfig` map.
// Typically `mlog.Configure` is used instead which accepts JSON formatted configuration.
-func (l *Logger) ConfigureTargets(cfg LoggerConfiguration) error {
+// An optional set of factories can be provided which will be called to create any target
+// types or formatters not built-in.
+func (l *Logger) ConfigureTargets(cfg LoggerConfiguration, factories *Factories) error {
if atomic.LoadInt32(l.lockConfig) != 0 {
return ErrConfigurationLock
}
- return logrcfg.ConfigureTargets(l.log.Logr(), cfg.toTargetCfg(), nil)
+ return logrcfg.ConfigureTargets(l.log.Logr(), cfg.toTargetCfg(), factories)
}
// LockConfiguration disallows further configuration changes until `UnlockConfiguration`
@@ -405,6 +413,22 @@ func GetPackageName(f string) string {
return f
}
+// ShouldQuote returns true if val contains any characters that might be unsafe
+// when injecting log output into an aggregator, viewer or report.
+// Returning true means that val should be surrounded by quotation marks before being
+// output into logs.
+func ShouldQuote(val string) bool {
+ for _, c := range val {
+ if !((c >= '0' && c <= '9') ||
+ (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ c == '-' || c == '.' || c == '_' || c == '/' || c == '@' || c == '^' || c == '+') {
+ return true
+ }
+ }
+ return false
+}
+
type logWriter struct {
logger *Logger
}
diff --git a/vendor/github.com/mattn/go-colorable/.travis.yml b/vendor/github.com/mattn/go-colorable/.travis.yml
deleted file mode 100644
index 7942c565..00000000
--- a/vendor/github.com/mattn/go-colorable/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-sudo: false
-go:
- - 1.13.x
- - tip
-
-before_install:
- - go get -t -v ./...
-
-script:
- - ./go.test.sh
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
-
diff --git a/vendor/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md
index e055952b..ca048371 100644
--- a/vendor/github.com/mattn/go-colorable/README.md
+++ b/vendor/github.com/mattn/go-colorable/README.md
@@ -1,6 +1,6 @@
# go-colorable
-[![Build Status](https://travis-ci.org/mattn/go-colorable.svg?branch=master)](https://travis-ci.org/mattn/go-colorable)
+[![Build Status](https://github.com/mattn/go-colorable/workflows/test/badge.svg)](https://github.com/mattn/go-colorable/actions?query=workflow%3Atest)
[![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable)
[![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable)
[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable)
diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go
index 1f7806fe..416d1bbb 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_appengine.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_appengine.go
@@ -1,3 +1,4 @@
+//go:build appengine
// +build appengine
package colorable
diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go
index 08cbd1e0..766d9460 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_others.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_others.go
@@ -1,5 +1,5 @@
-// +build !windows
-// +build !appengine
+//go:build !windows && !appengine
+// +build !windows,!appengine
package colorable
diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go
index 41215d7f..1846ad5a 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_windows.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go
@@ -1,5 +1,5 @@
-// +build windows
-// +build !appengine
+//go:build windows && !appengine
+// +build windows,!appengine
package colorable
@@ -452,18 +452,22 @@ func (w *Writer) Write(data []byte) (n int, err error) {
} else {
er = bytes.NewReader(data)
}
- var bw [1]byte
+ var plaintext bytes.Buffer
loop:
for {
c1, err := er.ReadByte()
if err != nil {
+ plaintext.WriteTo(w.out)
break loop
}
if c1 != 0x1b {
- bw[0] = c1
- w.out.Write(bw[:])
+ plaintext.WriteByte(c1)
continue
}
+ _, err = plaintext.WriteTo(w.out)
+ if err != nil {
+ break loop
+ }
c2, err := er.ReadByte()
if err != nil {
break loop
diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go
index 95f2c6be..3df68f36 100644
--- a/vendor/github.com/mattn/go-colorable/noncolorable.go
+++ b/vendor/github.com/mattn/go-colorable/noncolorable.go
@@ -18,18 +18,22 @@ func NewNonColorable(w io.Writer) io.Writer {
// Write writes data on console
func (w *NonColorable) Write(data []byte) (n int, err error) {
er := bytes.NewReader(data)
- var bw [1]byte
+ var plaintext bytes.Buffer
loop:
for {
c1, err := er.ReadByte()
if err != nil {
+ plaintext.WriteTo(w.out)
break loop
}
if c1 != 0x1b {
- bw[0] = c1
- w.out.Write(bw[:])
+ plaintext.WriteByte(c1)
continue
}
+ _, err = plaintext.WriteTo(w.out)
+ if err != nil {
+ break loop
+ }
c2, err := er.ReadByte()
if err != nil {
break loop
diff --git a/vendor/github.com/minio/minio-go/v7/README.md b/vendor/github.com/minio/minio-go/v7/README.md
index b5c26d53..3ba174f4 100644
--- a/vendor/github.com/minio/minio-go/v7/README.md
+++ b/vendor/github.com/minio/minio-go/v7/README.md
@@ -1,4 +1,4 @@
-# MinIO Go Client SDK for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Sourcegraph](https://sourcegraph.com/github.com/minio/minio-go/-/badge.svg)](https://sourcegraph.com/github.com/minio/minio-go?badge) [![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/minio/minio-go/blob/master/LICENSE)
+# MinIO Go Client SDK for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Sourcegraph](https://sourcegraph.com/github.com/minio/minio-go/-/badge.svg)](https://sourcegraph.com/github.com/minio/minio-go?badge) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/minio/minio-go/blob/master/LICENSE)
The MinIO Go Client SDK provides simple APIs to access any Amazon S3 compatible object storage.
@@ -171,9 +171,9 @@ The full API Reference is available here.
* [`PresignedPostPolicy`](https://docs.min.io/docs/golang-client-api-reference#PresignedPostPolicy)
### API Reference : Client custom settings
-* [`SetAppInfo`](http://docs.min.io/docs/golang-client-api-reference#SetAppInfo)
-* [`TraceOn`](http://docs.min.io/docs/golang-client-api-reference#TraceOn)
-* [`TraceOff`](http://docs.min.io/docs/golang-client-api-reference#TraceOff)
+* [`SetAppInfo`](https://docs.min.io/docs/golang-client-api-reference#SetAppInfo)
+* [`TraceOn`](https://docs.min.io/docs/golang-client-api-reference#TraceOn)
+* [`TraceOff`](https://docs.min.io/docs/golang-client-api-reference#TraceOff)
## Full Examples
@@ -248,4 +248,4 @@ The full API Reference is available here.
[Contributors Guide](https://github.com/minio/minio-go/blob/master/CONTRIBUTING.md)
## License
-This SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see [LICENSE](https://github.com/minio/minio-go/blob/master/LICENSE) and [NOTICE](https://github.com/minio/minio-go/blob/master/NOTICE) for more information.
+This SDK is distributed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0), see [LICENSE](https://github.com/minio/minio-go/blob/master/LICENSE) and [NOTICE](https://github.com/minio/minio-go/blob/master/NOTICE) for more information.
diff --git a/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go b/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go
index 41054e13..0b357d3e 100644
--- a/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go
+++ b/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go
@@ -27,6 +27,7 @@ import (
"net/url"
"time"
+ "github.com/google/uuid"
"github.com/minio/minio-go/v7/pkg/replication"
"github.com/minio/minio-go/v7/pkg/s3utils"
)
@@ -187,12 +188,39 @@ func (c Client) GetBucketReplicationMetrics(ctx context.Context, bucketName stri
return s, nil
}
+// mustGetUUID - get a random UUID.
+func mustGetUUID() string {
+ u, err := uuid.NewRandom()
+ if err != nil {
+ return ""
+ }
+ return u.String()
+}
+
// ResetBucketReplication kicks off replication of previously replicated objects if ExistingObjectReplication
// is enabled in the replication config
-func (c Client) ResetBucketReplication(ctx context.Context, bucketName string, olderThan time.Duration) (resetID string, err error) {
+func (c Client) ResetBucketReplication(ctx context.Context, bucketName string, olderThan time.Duration) (rID string, err error) {
+ rID = mustGetUUID()
+ _, err = c.resetBucketReplicationOnTarget(ctx, bucketName, olderThan, "", rID)
+ if err != nil {
+ return rID, err
+ }
+ return rID, nil
+}
+
+// ResetBucketReplication kicks off replication of previously replicated objects if ExistingObjectReplication
+// is enabled in the replication config
+func (c Client) ResetBucketReplicationOnTarget(ctx context.Context, bucketName string, olderThan time.Duration, tgtArn string) (rinfo replication.ResyncTargetsInfo, err error) {
+ rID := mustGetUUID()
+ return c.resetBucketReplicationOnTarget(ctx, bucketName, olderThan, tgtArn, rID)
+}
+
+// ResetBucketReplication kicks off replication of previously replicated objects if ExistingObjectReplication
+// is enabled in the replication config
+func (c Client) resetBucketReplicationOnTarget(ctx context.Context, bucketName string, olderThan time.Duration, tgtArn string, resetID string) (rinfo replication.ResyncTargetsInfo, err error) {
// Input validation.
- if err := s3utils.CheckValidBucketName(bucketName); err != nil {
- return "", err
+ if err = s3utils.CheckValidBucketName(bucketName); err != nil {
+ return
}
// Get resources properly escaped and lined up before
// using them in http request.
@@ -201,7 +229,10 @@ func (c Client) ResetBucketReplication(ctx context.Context, bucketName string, o
if olderThan > 0 {
urlValues.Set("older-than", olderThan.String())
}
-
+ if tgtArn != "" {
+ urlValues.Set("arn", tgtArn)
+ }
+ urlValues.Set("reset-id", resetID)
// Execute GET on bucket to get replication config.
resp, err := c.executeMethod(ctx, http.MethodPut, requestMetadata{
bucketName: bucketName,
@@ -210,19 +241,19 @@ func (c Client) ResetBucketReplication(ctx context.Context, bucketName string, o
defer closeResponse(resp)
if err != nil {
- return "", err
+ return rinfo, err
}
if resp.StatusCode != http.StatusOK {
- return "", httpRespToErrorResponse(resp, bucketName, "")
+ return rinfo, httpRespToErrorResponse(resp, bucketName, "")
}
respBytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
- return "", err
+ return rinfo, err
}
- if err := json.Unmarshal(respBytes, &resetID); err != nil {
- return "", err
+ if err := json.Unmarshal(respBytes, &rinfo); err != nil {
+ return rinfo, err
}
- return resetID, nil
+ return rinfo, nil
}
diff --git a/vendor/github.com/minio/minio-go/v7/api-compose-object.go b/vendor/github.com/minio/minio-go/v7/api-compose-object.go
index dd597e46..19a72ac3 100644
--- a/vendor/github.com/minio/minio-go/v7/api-compose-object.go
+++ b/vendor/github.com/minio/minio-go/v7/api-compose-object.go
@@ -223,6 +223,16 @@ func (c Client) copyObjectDo(ctx context.Context, srcBucket, srcObject, destBuck
if dstOpts.Internal.ReplicationRequest {
headers.Set(minIOBucketReplicationRequest, "")
}
+ if !dstOpts.Internal.LegalholdTimestamp.IsZero() {
+ headers.Set(minIOBucketReplicationObjectLegalHoldTimestamp, dstOpts.Internal.LegalholdTimestamp.Format(time.RFC3339Nano))
+ }
+ if !dstOpts.Internal.RetentionTimestamp.IsZero() {
+ headers.Set(minIOBucketReplicationObjectRetentionTimestamp, dstOpts.Internal.RetentionTimestamp.Format(time.RFC3339Nano))
+ }
+ if !dstOpts.Internal.TaggingTimestamp.IsZero() {
+ headers.Set(minIOBucketReplicationTaggingTimestamp, dstOpts.Internal.TaggingTimestamp.Format(time.RFC3339Nano))
+ }
+
if len(dstOpts.UserTags) != 0 {
headers.Set(amzTaggingHeader, s3utils.TagEncode(dstOpts.UserTags))
}
@@ -513,7 +523,7 @@ func (c Client) ComposeObject(ctx context.Context, dst CopyDestOptions, srcs ...
// 4. Make final complete-multipart request.
uploadInfo, err := c.completeMultipartUpload(ctx, dst.Bucket, dst.Object, uploadID,
- completeMultipartUpload{Parts: objParts})
+ completeMultipartUpload{Parts: objParts}, PutObjectOptions{})
if err != nil {
return UploadInfo{}, err
}
diff --git a/vendor/github.com/minio/minio-go/v7/api-datatypes.go b/vendor/github.com/minio/minio-go/v7/api-datatypes.go
index 970e1fa5..2f5912f3 100644
--- a/vendor/github.com/minio/minio-go/v7/api-datatypes.go
+++ b/vendor/github.com/minio/minio-go/v7/api-datatypes.go
@@ -64,8 +64,9 @@ func (m *StringMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
// Owner name.
type Owner struct {
- DisplayName string `json:"name"`
- ID string `json:"id"`
+ XMLName xml.Name `xml:"Owner" json:"owner"`
+ DisplayName string `xml:"ID" json:"name"`
+ ID string `xml:"DisplayName" json:"id"`
}
// UploadInfo contains information about the
@@ -85,6 +86,14 @@ type UploadInfo struct {
ExpirationRuleID string
}
+// RestoreInfo contains information of the restore operation of an archived object
+type RestoreInfo struct {
+ // Is the restoring operation is still ongoing
+ OngoingRestore bool
+ // When the restored copy of the archived object will be removed
+ ExpiryTime time.Time
+}
+
// ObjectInfo container for object metadata.
type ObjectInfo struct {
// An ETag is optionally set to md5sum of an object. In case of multipart objects,
@@ -115,14 +124,7 @@ type ObjectInfo struct {
Owner Owner
// ACL grant.
- Grant []struct {
- Grantee struct {
- ID string `xml:"ID"`
- DisplayName string `xml:"DisplayName"`
- URI string `xml:"URI"`
- } `xml:"Grantee"`
- Permission string `xml:"Permission"`
- } `xml:"Grant"`
+ Grant []Grant
// The class of storage used to store the object.
StorageClass string `json:"storageClass"`
@@ -144,6 +146,8 @@ type ObjectInfo struct {
Expiration time.Time
ExpirationRuleID string
+ Restore *RestoreInfo
+
// Error
Err error `json:"-"`
}
diff --git a/vendor/github.com/minio/minio-go/v7/api-get-object-acl.go b/vendor/github.com/minio/minio-go/v7/api-get-object-acl.go
index afa53079..031aa32e 100644
--- a/vendor/github.com/minio/minio-go/v7/api-get-object-acl.go
+++ b/vendor/github.com/minio/minio-go/v7/api-get-object-acl.go
@@ -19,25 +19,36 @@ package minio
import (
"context"
+ "encoding/xml"
"net/http"
"net/url"
)
+// Grantee represents the person being granted permissions.
+type Grantee struct {
+ XMLName xml.Name `xml:"Grantee"`
+ ID string `xml:"ID"`
+ DisplayName string `xml:"DisplayName"`
+ URI string `xml:"URI"`
+}
+
+// Grant holds grant information
+type Grant struct {
+ XMLName xml.Name `xml:"Grant"`
+ Grantee Grantee
+ Permission string `xml:"Permission"`
+}
+
+// AccessControlList contains the set of grantees and the permissions assigned to each grantee.
+type AccessControlList struct {
+ XMLName xml.Name `xml:"AccessControlList"`
+ Grant []Grant
+ Permission string `xml:"Permission"`
+}
+
type accessControlPolicy struct {
- Owner struct {
- ID string `xml:"ID"`
- DisplayName string `xml:"DisplayName"`
- } `xml:"Owner"`
- AccessControlList struct {
- Grant []struct {
- Grantee struct {
- ID string `xml:"ID"`
- DisplayName string `xml:"DisplayName"`
- URI string `xml:"URI"`
- } `xml:"Grantee"`
- Permission string `xml:"Permission"`
- } `xml:"Grant"`
- } `xml:"AccessControlList"`
+ Owner
+ AccessControlList
}
// GetObjectACL get object ACLs
diff --git a/vendor/github.com/minio/minio-go/v7/api-list.go b/vendor/github.com/minio/minio-go/v7/api-list.go
index 7996c11e..431bae54 100644
--- a/vendor/github.com/minio/minio-go/v7/api-list.go
+++ b/vendor/github.com/minio/minio-go/v7/api-list.go
@@ -56,14 +56,13 @@ func (c Client) ListBuckets(ctx context.Context) ([]BucketInfo, error) {
return listAllMyBucketsResult.Buckets.Bucket, nil
}
-/// Bucket Read Operations.
-
-func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix string, recursive, metadata bool, maxKeys int) <-chan ObjectInfo {
+/// Bucket List Operations.
+func (c Client) listObjectsV2(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo {
// Allocate new list objects channel.
objectStatCh := make(chan ObjectInfo, 1)
// Default listing is delimited at "/"
delimiter := "/"
- if recursive {
+ if opts.Recursive {
// If recursive we do not delimit.
delimiter = ""
}
@@ -81,7 +80,7 @@ func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix stri
}
// Validate incoming object prefix.
- if err := s3utils.CheckValidObjectNamePrefix(objectPrefix); err != nil {
+ if err := s3utils.CheckValidObjectNamePrefix(opts.Prefix); err != nil {
defer close(objectStatCh)
objectStatCh <- ObjectInfo{
Err: err,
@@ -96,8 +95,8 @@ func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix stri
var continuationToken string
for {
// Get list of objects a maximum of 1000 per request.
- result, err := c.listObjectsV2Query(ctx, bucketName, objectPrefix, continuationToken,
- fetchOwner, metadata, delimiter, maxKeys)
+ result, err := c.listObjectsV2Query(ctx, bucketName, opts.Prefix, continuationToken,
+ fetchOwner, opts.WithMetadata, delimiter, opts.StartAfter, opts.MaxKeys, opts.headers)
if err != nil {
objectStatCh <- ObjectInfo{
Err: err,
@@ -148,12 +147,13 @@ func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix stri
// You can use the request parameters as selection criteria to return a subset of the objects in a bucket.
// request parameters :-
// ---------
+// ?prefix - Limits the response to keys that begin with the specified prefix.
// ?continuation-token - Used to continue iterating over a set of objects
+// ?metadata - Specifies if we want metadata for the objects as part of list operation.
// ?delimiter - A delimiter is a character you use to group keys.
-// ?prefix - Limits the response to keys that begin with the specified prefix.
+// ?start-after - Sets a marker to start listing lexically at this key onwards.
// ?max-keys - Sets the maximum number of keys returned in the response body.
-// ?metadata - Specifies if we want metadata for the objects as part of list operation.
-func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix, continuationToken string, fetchOwner, metadata bool, delimiter string, maxkeys int) (ListBucketV2Result, error) {
+func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix, continuationToken string, fetchOwner, metadata bool, delimiter string, startAfter string, maxkeys int, headers http.Header) (ListBucketV2Result, error) {
// Validate bucket name.
if err := s3utils.CheckValidBucketName(bucketName); err != nil {
return ListBucketV2Result{}, err
@@ -173,6 +173,11 @@ func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix
urlValues.Set("metadata", "true")
}
+ // Set this conditionally if asked
+ if startAfter != "" {
+ urlValues.Set("start-after", startAfter)
+ }
+
// Always set encoding-type in ListObjects V2
urlValues.Set("encoding-type", "url")
@@ -202,6 +207,7 @@ func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix
bucketName: bucketName,
queryValues: urlValues,
contentSHA256Hex: emptySHA256Hex,
+ customHeader: headers,
})
defer closeResponse(resp)
if err != nil {
@@ -246,12 +252,12 @@ func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix
return listBucketResult, nil
}
-func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string, recursive bool, maxKeys int) <-chan ObjectInfo {
+func (c Client) listObjects(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo {
// Allocate new list objects channel.
objectStatCh := make(chan ObjectInfo, 1)
// Default listing is delimited at "/"
delimiter := "/"
- if recursive {
+ if opts.Recursive {
// If recursive we do not delimit.
delimiter = ""
}
@@ -264,7 +270,7 @@ func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string
return objectStatCh
}
// Validate incoming object prefix.
- if err := s3utils.CheckValidObjectNamePrefix(objectPrefix); err != nil {
+ if err := s3utils.CheckValidObjectNamePrefix(opts.Prefix); err != nil {
defer close(objectStatCh)
objectStatCh <- ObjectInfo{
Err: err,
@@ -276,10 +282,10 @@ func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string
go func(objectStatCh chan<- ObjectInfo) {
defer close(objectStatCh)
- marker := ""
+ marker := opts.StartAfter
for {
// Get list of objects a maximum of 1000 per request.
- result, err := c.listObjectsQuery(ctx, bucketName, objectPrefix, marker, delimiter, maxKeys)
+ result, err := c.listObjectsQuery(ctx, bucketName, opts.Prefix, marker, delimiter, opts.MaxKeys, opts.headers)
if err != nil {
objectStatCh <- ObjectInfo{
Err: err,
@@ -326,12 +332,12 @@ func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string
return objectStatCh
}
-func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix string, recursive bool, maxKeys int) <-chan ObjectInfo {
+func (c Client) listObjectVersions(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo {
// Allocate new list objects channel.
resultCh := make(chan ObjectInfo, 1)
// Default listing is delimited at "/"
delimiter := "/"
- if recursive {
+ if opts.Recursive {
// If recursive we do not delimit.
delimiter = ""
}
@@ -346,7 +352,7 @@ func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix strin
}
// Validate incoming object prefix.
- if err := s3utils.CheckValidObjectNamePrefix(prefix); err != nil {
+ if err := s3utils.CheckValidObjectNamePrefix(opts.Prefix); err != nil {
defer close(resultCh)
resultCh <- ObjectInfo{
Err: err,
@@ -365,7 +371,7 @@ func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix strin
for {
// Get list of objects a maximum of 1000 per request.
- result, err := c.listObjectVersionsQuery(ctx, bucketName, prefix, keyMarker, versionIDMarker, delimiter, maxKeys)
+ result, err := c.listObjectVersionsQuery(ctx, bucketName, opts.Prefix, keyMarker, versionIDMarker, delimiter, opts.MaxKeys, opts.headers)
if err != nil {
resultCh <- ObjectInfo{
Err: err,
@@ -376,15 +382,14 @@ func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix strin
// If contents are available loop through and send over channel.
for _, version := range result.Versions {
info := ObjectInfo{
- ETag: trimEtag(version.ETag),
- Key: version.Key,
- LastModified: version.LastModified,
- Size: version.Size,
- Owner: version.Owner,
- StorageClass: version.StorageClass,
- IsLatest: version.IsLatest,
- VersionID: version.VersionID,
-
+ ETag: trimEtag(version.ETag),
+ Key: version.Key,
+ LastModified: version.LastModified,
+ Size: version.Size,
+ Owner: version.Owner,
+ StorageClass: version.StorageClass,
+ IsLatest: version.IsLatest,
+ VersionID: version.VersionID,
IsDeleteMarker: version.isDeleteMarker,
}
select {
@@ -438,7 +443,7 @@ func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix strin
// ?delimiter - A delimiter is a character you use to group keys.
// ?prefix - Limits the response to keys that begin with the specified prefix.
// ?max-keys - Sets the maximum number of keys returned in the response body.
-func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix, keyMarker, versionIDMarker, delimiter string, maxkeys int) (ListVersionsResult, error) {
+func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix, keyMarker, versionIDMarker, delimiter string, maxkeys int, headers http.Header) (ListVersionsResult, error) {
// Validate bucket name.
if err := s3utils.CheckValidBucketName(bucketName); err != nil {
return ListVersionsResult{}, err
@@ -483,6 +488,7 @@ func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix,
bucketName: bucketName,
queryValues: urlValues,
contentSHA256Hex: emptySHA256Hex,
+ customHeader: headers,
})
defer closeResponse(resp)
if err != nil {
@@ -534,7 +540,7 @@ func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix,
// ?delimiter - A delimiter is a character you use to group keys.
// ?prefix - Limits the response to keys that begin with the specified prefix.
// ?max-keys - Sets the maximum number of keys returned in the response body.
-func (c Client) listObjectsQuery(ctx context.Context, bucketName, objectPrefix, objectMarker, delimiter string, maxkeys int) (ListBucketResult, error) {
+func (c Client) listObjectsQuery(ctx context.Context, bucketName, objectPrefix, objectMarker, delimiter string, maxkeys int, headers http.Header) (ListBucketResult, error) {
// Validate bucket name.
if err := s3utils.CheckValidBucketName(bucketName); err != nil {
return ListBucketResult{}, err
@@ -571,6 +577,7 @@ func (c Client) listObjectsQuery(ctx context.Context, bucketName, objectPrefix,
bucketName: bucketName,
queryValues: urlValues,
contentSHA256Hex: emptySHA256Hex,
+ customHeader: headers,
})
defer closeResponse(resp)
if err != nil {
@@ -626,9 +633,25 @@ type ListObjectsOptions struct {
// batch, advanced use-case not useful for most
// applications
MaxKeys int
+ // StartAfter start listing lexically at this
+ // object onwards, this value can also be set
+ // for Marker when `UseV1` is set to true.
+ StartAfter string
// Use the deprecated list objects V1 API
UseV1 bool
+
+ headers http.Header
+}
+
+// Set adds a key value pair to the options. The
+// key-value pair will be part of the HTTP GET request
+// headers.
+func (o *ListObjectsOptions) Set(key, value string) {
+ if o.headers == nil {
+ o.headers = make(http.Header)
+ }
+ o.headers.Set(key, value)
}
// ListObjects returns objects list after evaluating the passed options.
@@ -640,22 +663,22 @@ type ListObjectsOptions struct {
//
func (c Client) ListObjects(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo {
if opts.WithVersions {
- return c.listObjectVersions(ctx, bucketName, opts.Prefix, opts.Recursive, opts.MaxKeys)
+ return c.listObjectVersions(ctx, bucketName, opts)
}
// Use legacy list objects v1 API
if opts.UseV1 {
- return c.listObjects(ctx, bucketName, opts.Prefix, opts.Recursive, opts.MaxKeys)
+ return c.listObjects(ctx, bucketName, opts)
}
// Check whether this is snowball region, if yes ListObjectsV2 doesn't work, fallback to listObjectsV1.
if location, ok := c.bucketLocCache.Get(bucketName); ok {
if location == "snowball" {
- return c.listObjects(ctx, bucketName, opts.Prefix, opts.Recursive, opts.MaxKeys)
+ return c.listObjects(ctx, bucketName, opts)
}
}
- return c.listObjectsV2(ctx, bucketName, opts.Prefix, opts.Recursive, opts.WithMetadata, opts.MaxKeys)
+ return c.listObjectsV2(ctx, bucketName, opts)
}
// ListIncompleteUploads - List incompletely uploaded multipart objects.
diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go b/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go
index a70d7054..873ec387 100644
--- a/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go
+++ b/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go
@@ -176,7 +176,7 @@ func (c Client) putObjectMultipartNoStream(ctx context.Context, bucketName, obje
// Sort all completed parts.
sort.Sort(completedParts(complMultipartUpload.Parts))
- uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload)
+ uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{})
if err != nil {
return UploadInfo{}, err
}
@@ -309,7 +309,7 @@ func (c Client) uploadPart(ctx context.Context, bucketName, objectName, uploadID
// completeMultipartUpload - Completes a multipart upload by assembling previously uploaded parts.
func (c Client) completeMultipartUpload(ctx context.Context, bucketName, objectName, uploadID string,
- complete completeMultipartUpload) (UploadInfo, error) {
+ complete completeMultipartUpload, opts PutObjectOptions) (UploadInfo, error) {
// Input validation.
if err := s3utils.CheckValidBucketName(bucketName); err != nil {
return UploadInfo{}, err
@@ -336,6 +336,7 @@ func (c Client) completeMultipartUpload(ctx context.Context, bucketName, objectN
contentBody: completeMultipartUploadBuffer,
contentLength: int64(len(completeMultipartUploadBytes)),
contentSHA256Hex: sum256Hex(completeMultipartUploadBytes),
+ customHeader: opts.Header(),
}
// Execute POST to complete multipart upload for an objectName.
diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go b/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
index 39e381e9..f1cc9fbb 100644
--- a/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
+++ b/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go
@@ -231,7 +231,7 @@ func (c Client) putObjectMultipartStreamFromReadAt(ctx context.Context, bucketNa
// Sort all completed parts.
sort.Sort(completedParts(complMultipartUpload.Parts))
- uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload)
+ uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{})
if err != nil {
return UploadInfo{}, err
}
@@ -358,7 +358,7 @@ func (c Client) putObjectMultipartStreamOptionalChecksum(ctx context.Context, bu
// Sort all completed parts.
sort.Sort(completedParts(complMultipartUpload.Parts))
- uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload)
+ uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{})
if err != nil {
return UploadInfo{}, err
}
diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object.go b/vendor/github.com/minio/minio-go/v7/api-put-object.go
index 247e40a6..f669b7d1 100644
--- a/vendor/github.com/minio/minio-go/v7/api-put-object.go
+++ b/vendor/github.com/minio/minio-go/v7/api-put-object.go
@@ -60,6 +60,9 @@ type AdvancedPutOptions struct {
ReplicationStatus ReplicationStatus
SourceMTime time.Time
ReplicationRequest bool
+ RetentionTimestamp time.Time
+ TaggingTimestamp time.Time
+ LegalholdTimestamp time.Time
}
// PutObjectOptions represents options specified by user for PutObject call
@@ -156,6 +159,16 @@ func (opts PutObjectOptions) Header() (header http.Header) {
if opts.Internal.ReplicationRequest {
header.Set(minIOBucketReplicationRequest, "")
}
+ if !opts.Internal.LegalholdTimestamp.IsZero() {
+ header.Set(minIOBucketReplicationObjectLegalHoldTimestamp, opts.Internal.LegalholdTimestamp.Format(time.RFC3339Nano))
+ }
+ if !opts.Internal.RetentionTimestamp.IsZero() {
+ header.Set(minIOBucketReplicationObjectRetentionTimestamp, opts.Internal.RetentionTimestamp.Format(time.RFC3339Nano))
+ }
+ if !opts.Internal.TaggingTimestamp.IsZero() {
+ header.Set(minIOBucketReplicationTaggingTimestamp, opts.Internal.TaggingTimestamp.Format(time.RFC3339Nano))
+ }
+
if len(opts.UserTags) != 0 {
header.Set(amzTaggingHeader, s3utils.TagEncode(opts.UserTags))
}
@@ -360,7 +373,7 @@ func (c Client) putObjectMultipartStreamNoLength(ctx context.Context, bucketName
// Sort all completed parts.
sort.Sort(completedParts(complMultipartUpload.Parts))
- uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload)
+ uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{})
if err != nil {
return UploadInfo{}, err
}
diff --git a/vendor/github.com/minio/minio-go/v7/api-remove.go b/vendor/github.com/minio/minio-go/v7/api-remove.go
index f21a72c9..24e4d3f5 100644
--- a/vendor/github.com/minio/minio-go/v7/api-remove.go
+++ b/vendor/github.com/minio/minio-go/v7/api-remove.go
@@ -29,6 +29,50 @@ import (
"github.com/minio/minio-go/v7/pkg/s3utils"
)
+// BucketOptions special headers to purge buckets, only
+// useful when endpoint is MinIO
+type BucketOptions struct {
+ ForceDelete bool
+}
+
+// RemoveBucketWithOptions deletes the bucket name.
+//
+// All objects (including all object versions and delete markers)
+// in the bucket will be deleted forcibly if bucket options set
+// ForceDelete to 'true'.
+func (c Client) RemoveBucketWithOptions(ctx context.Context, bucketName string, opts BucketOptions) error {
+ // Input validation.
+ if err := s3utils.CheckValidBucketName(bucketName); err != nil {
+ return err
+ }
+
+ // Build headers.
+ headers := make(http.Header)
+ if opts.ForceDelete {
+ headers.Set(minIOForceDelete, "true")
+ }
+
+ // Execute DELETE on bucket.
+ resp, err := c.executeMethod(ctx, http.MethodDelete, requestMetadata{
+ bucketName: bucketName,
+ contentSHA256Hex: emptySHA256Hex,
+ customHeader: headers,
+ })
+ defer closeResponse(resp)
+ if err != nil {
+ return err
+ }
+ if resp != nil {
+ if resp.StatusCode != http.StatusNoContent {
+ return httpRespToErrorResponse(resp, bucketName, "")
+ }
+ }
+
+ // Remove the location from cache on a successful delete.
+ c.bucketLocCache.Delete(bucketName)
+ return nil
+}
+
// RemoveBucket deletes the bucket name.
//
// All objects (including all object versions and delete markers).
@@ -69,6 +113,7 @@ type AdvancedRemoveOptions struct {
// RemoveObjectOptions represents options specified by user for RemoveObject call
type RemoveObjectOptions struct {
+ ForceDelete bool
GovernanceBypass bool
VersionID string
Internal AdvancedRemoveOptions
@@ -116,6 +161,9 @@ func (c Client) removeObject(ctx context.Context, bucketName, objectName string,
if opts.Internal.ReplicationRequest {
headers.Set(minIOBucketReplicationRequest, "")
}
+ if opts.ForceDelete {
+ headers.Set(minIOForceDelete, "true")
+ }
// Execute DELETE on objectName.
resp, err := c.executeMethod(ctx, http.MethodDelete, requestMetadata{
bucketName: bucketName,
diff --git a/vendor/github.com/minio/minio-go/v7/api-restore.go b/vendor/github.com/minio/minio-go/v7/api-restore.go
new file mode 100644
index 00000000..dd7ce7a3
--- /dev/null
+++ b/vendor/github.com/minio/minio-go/v7/api-restore.go
@@ -0,0 +1,182 @@
+/*
+ * MinIO Go Library for Amazon S3 Compatible Cloud Storage
+ * (C) 2018-2021 MinIO, Inc.
+ *
+ * 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 minio
+
+import (
+ "bytes"
+ "context"
+ "encoding/xml"
+ "net/http"
+ "net/url"
+
+ "github.com/minio/minio-go/v7/pkg/s3utils"
+ "github.com/minio/minio-go/v7/pkg/tags"
+)
+
+// RestoreType represents the restore request type
+type RestoreType string
+
+const (
+ // RestoreSelect represents the restore SELECT operation
+ RestoreSelect = RestoreType("SELECT")
+)
+
+// TierType represents a retrieval tier
+type TierType string
+
+const (
+ // TierStandard is the standard retrieval tier
+ TierStandard = TierType("Standard")
+ // TierBulk is the bulk retrieval tier
+ TierBulk = TierType("Bulk")
+ // TierExpedited is the expedited retrieval tier
+ TierExpedited = TierType("Expedited")
+)
+
+// GlacierJobParameters represents the retrieval tier parameter
+type GlacierJobParameters struct {
+ Tier TierType
+}
+
+// Encryption contains the type of server-side encryption used during object retrieval
+type Encryption struct {
+ EncryptionType string
+ KMSContext string
+ KMSKeyID string `xml:"KMSKeyId"`
+}
+
+// MetadataEntry represents a metadata information of the restored object.
+type MetadataEntry struct {
+ Name string
+ Value string
+}
+
+// S3 holds properties of the copy of the archived object
+type S3 struct {
+ AccessControlList *AccessControlList `xml:"AccessControlList,omiempty"`
+ BucketName string
+ Prefix string
+ CannedACL *string `xml:"CannedACL,omitempty"`
+ Encryption *Encryption `xml:"Encryption,omitempty"`
+ StorageClass *string `xml:"StorageClass,omitempty"`
+ Tagging *tags.Tags `xml:"Tagging,omitempty"`
+ UserMetadata *MetadataEntry `xml:"UserMetadata,omitempty"`
+}
+
+// SelectParameters holds the select request parameters
+type SelectParameters struct {
+ XMLName xml.Name `xml:"SelectParameters"`
+ ExpressionType QueryExpressionType
+ Expression string
+ InputSerialization SelectObjectInputSerialization
+ OutputSerialization SelectObjectOutputSerialization
+}
+
+// OutputLocation holds properties of the copy of the archived object
+type OutputLocation struct {
+ XMLName xml.Name `xml:"OutputLocation"`
+ S3 S3 `xml:"S3"`
+}
+
+// RestoreRequest holds properties of the restore object request
+type RestoreRequest struct {
+ XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ RestoreRequest"`
+ Type *RestoreType `xml:"Type,omitempty"`
+ Tier *TierType `xml:"Tier,omitempty"`
+ Days *int `xml:"Days,omitempty"`
+ GlacierJobParameters *GlacierJobParameters `xml:"GlacierJobParameters,omitempty"`
+ Description *string `xml:"Description,omitempty"`
+ SelectParameters *SelectParameters `xml:"SelectParameters,omitempty"`
+ OutputLocation *OutputLocation `xml:"OutputLocation,omitempty"`
+}
+
+// SetDays sets the days parameter of the restore request
+func (r *RestoreRequest) SetDays(v int) {
+ r.Days = &v
+}
+
+// SetDays sets the GlacierJobParameters of the restore request
+func (r *RestoreRequest) SetGlacierJobParameters(v GlacierJobParameters) {
+ r.GlacierJobParameters = &v
+}
+
+// SetType sets the type of the restore request
+func (r *RestoreRequest) SetType(v RestoreType) {
+ r.Type = &v
+}
+
+// SetTier sets the retrieval tier of the restore request
+func (r *RestoreRequest) SetTier(v TierType) {
+ r.Tier = &v
+}
+
+// SetDescription sets the description of the restore request
+func (r *RestoreRequest) SetDescription(v string) {
+ r.Description = &v
+}
+
+// SetSelectParameters sets SelectParameters of the restore select request
+func (r *RestoreRequest) SetSelectParameters(v SelectParameters) {
+ r.SelectParameters = &v
+}
+
+// SetOutputLocation sets the properties of the copy of the archived object
+func (r *RestoreRequest) SetOutputLocation(v OutputLocation) {
+ r.OutputLocation = &v
+}
+
+// RestoreObject is a implementation of https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html AWS S3 API
+func (c Client) RestoreObject(ctx context.Context, bucketName, objectName, versionID string, req RestoreRequest) error {
+ // Input validation.
+ if err := s3utils.CheckValidBucketName(bucketName); err != nil {
+ return err
+ }
+ if err := s3utils.CheckValidObjectName(objectName); err != nil {
+ return err
+ }
+
+ restoreRequestBytes, err := xml.Marshal(req)
+ if err != nil {
+ return err
+ }
+
+ urlValues := make(url.Values)
+ urlValues.Set("restore", "")
+ if versionID != "" {
+ urlValues.Set("versionId", versionID)
+ }
+
+ // Execute POST on bucket/object.
+ resp, err := c.executeMethod(ctx, http.MethodPost, requestMetadata{
+ bucketName: bucketName,
+ objectName: objectName,
+ queryValues: urlValues,
+ contentMD5Base64: sumMD5Base64(restoreRequestBytes),
+ contentSHA256Hex: sum256Hex(restoreRequestBytes),
+ contentBody: bytes.NewReader(restoreRequestBytes),
+ contentLength: int64(len(restoreRequestBytes)),
+ })
+ defer closeResponse(resp)
+ if err != nil {
+ return err
+ }
+ if resp.StatusCode != http.StatusAccepted {
+ return httpRespToErrorResponse(resp, bucketName, "")
+ }
+ return nil
+}
diff --git a/vendor/github.com/minio/minio-go/v7/api-select.go b/vendor/github.com/minio/minio-go/v7/api-select.go
index e35cf02b..c5e6d309 100644
--- a/vendor/github.com/minio/minio-go/v7/api-select.go
+++ b/vendor/github.com/minio/minio-go/v7/api-select.go
@@ -54,6 +54,13 @@ const (
SelectCompressionNONE SelectCompressionType = "NONE"
SelectCompressionGZIP = "GZIP"
SelectCompressionBZIP = "BZIP2"
+
+ // Non-standard compression schemes, supported by MinIO hosts:
+
+ SelectCompressionZSTD = "ZSTD" // Zstandard compression.
+ SelectCompressionLZ4 = "LZ4" // LZ4 Stream
+ SelectCompressionS2 = "S2" // S2 Stream
+ SelectCompressionSNAPPY = "SNAPPY" // Snappy stream
)
// CSVQuoteFields - is the parameter for how CSV fields are quoted.
@@ -330,10 +337,10 @@ func (j JSONOutputOptions) MarshalXML(e *xml.Encoder, start xml.StartElement) er
// SelectObjectInputSerialization - input serialization parameters
type SelectObjectInputSerialization struct {
- CompressionType SelectCompressionType
- Parquet *ParquetInputOptions `xml:"Parquet,omitempty"`
- CSV *CSVInputOptions `xml:"CSV,omitempty"`
- JSON *JSONInputOptions `xml:"JSON,omitempty"`
+ CompressionType SelectCompressionType `xml:"CompressionType,omitempty"`
+ Parquet *ParquetInputOptions `xml:"Parquet,omitempty"`
+ CSV *CSVInputOptions `xml:"CSV,omitempty"`
+ JSON *JSONInputOptions `xml:"JSON,omitempty"`
}
// SelectObjectOutputSerialization - output serialization parameters.
diff --git a/vendor/github.com/minio/minio-go/v7/api-stat.go b/vendor/github.com/minio/minio-go/v7/api-stat.go
index aa81cc43..12a1bf93 100644
--- a/vendor/github.com/minio/minio-go/v7/api-stat.go
+++ b/vendor/github.com/minio/minio-go/v7/api-stat.go
@@ -99,11 +99,11 @@ func (c Client) statObject(ctx context.Context, bucketName, objectName string, o
if err != nil {
return ObjectInfo{}, err
}
- deleteMarker := resp.Header.Get(amzDeleteMarker) == "true"
if resp != nil {
+ deleteMarker := resp.Header.Get(amzDeleteMarker) == "true"
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusPartialContent {
- if resp.StatusCode == http.StatusBadRequest && opts.VersionID != "" && deleteMarker {
+ if resp.StatusCode == http.StatusMethodNotAllowed && opts.VersionID != "" && deleteMarker {
errResp := ErrorResponse{
StatusCode: resp.StatusCode,
Code: "MethodNotAllowed",
diff --git a/vendor/github.com/minio/minio-go/v7/api.go b/vendor/github.com/minio/minio-go/v7/api.go
index 44660ab6..c8550ef1 100644
--- a/vendor/github.com/minio/minio-go/v7/api.go
+++ b/vendor/github.com/minio/minio-go/v7/api.go
@@ -34,6 +34,7 @@ import (
"runtime"
"strings"
"sync"
+ "sync/atomic"
"time"
md5simd "github.com/minio/md5-simd"
@@ -90,6 +91,10 @@ type Client struct {
// Factory for MD5 hash functions.
md5Hasher func() md5simd.Hasher
sha256Hasher func() md5simd.Hasher
+
+ healthCheckCh chan struct{}
+ healthCheck int32
+ lastOnline time.Time
}
// Options for New method
@@ -108,7 +113,7 @@ type Options struct {
// Global constants.
const (
libraryName = "minio-go"
- libraryVersion = "v7.0.11"
+ libraryVersion = "v7.0.14"
)
// User Agent should always following the below style.
@@ -305,6 +310,10 @@ func privateNew(endpoint string, opts *Options) (*Client, error) {
// Sets bucket lookup style, whether server accepts DNS or Path lookup. Default is Auto - determined
// by the SDK. When Auto is specified, DNS lookup is used for Amazon/Google cloud endpoints and Path for all other endpoints.
clnt.lookup = opts.BucketLookup
+
+ // healthcheck is not initialized
+ clnt.healthCheck = unknown
+
// Return.
return clnt, nil
}
@@ -387,6 +396,72 @@ func (c *Client) hashMaterials(isMd5Requested bool) (hashAlgos map[string]md5sim
return hashAlgos, hashSums
}
+const (
+ unknown = -1
+ offline = 0
+ online = 1
+)
+
+// IsOnline returns true if healthcheck enabled and client is online
+func (c *Client) IsOnline() bool {
+ switch atomic.LoadInt32(&c.healthCheck) {
+ case online, unknown:
+ return true
+ }
+ return false
+}
+
+// IsOffline returns true if healthcheck enabled and client is offline
+func (c *Client) IsOffline() bool {
+ return !c.IsOnline()
+}
+
+// HealthCheck starts a healthcheck to see if endpoint is up. Returns a context cancellation function
+// and and error if health check is already started
+func (c *Client) HealthCheck(hcDuration time.Duration) (context.CancelFunc, error) {
+ if atomic.LoadInt32(&c.healthCheck) == online {
+ return nil, fmt.Errorf("health check running already")
+ }
+ if hcDuration < 1*time.Second {
+ return nil, fmt.Errorf("health check duration should be atleast 1 second")
+ }
+ ctx, cancelFn := context.WithCancel(context.Background())
+ c.healthCheckCh = make(chan struct{})
+ atomic.StoreInt32(&c.healthCheck, online)
+ probeBucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "probe-health-")
+ go func(duration time.Duration) {
+ timer := time.NewTimer(duration)
+ defer timer.Stop()
+ for {
+ select {
+ case <-ctx.Done():
+ close(c.healthCheckCh)
+ atomic.StoreInt32(&c.healthCheck, unknown)
+ return
+ case <-timer.C:
+
+ timer.Reset(duration)
+ // Do health check the first time and ONLY if the connection is marked offline
+ if c.IsOffline() || c.lastOnline.IsZero() {
+ _, err := c.getBucketLocation(context.Background(), probeBucketName)
+ if err != nil && IsNetworkOrHostDown(err, false) {
+ atomic.StoreInt32(&c.healthCheck, offline)
+ }
+ switch ToErrorResponse(err).Code {
+ case "NoSuchBucket", "AccessDenied", "":
+ c.lastOnline = time.Now()
+ atomic.StoreInt32(&c.healthCheck, online)
+ }
+ }
+ case <-c.healthCheckCh:
+ // set offline if client saw a network error
+ atomic.StoreInt32(&c.healthCheck, offline)
+ }
+ }
+ }(hcDuration)
+ return cancelFn, nil
+}
+
// requestMetadata - is container for all the values to make a request.
type requestMetadata struct {
// If set newRequest presigns the URL.
@@ -565,12 +640,25 @@ func (c Client) executeMethod(ctx context.Context, method string, metadata reque
if isS3CodeRetryable(errResponse.Code) {
continue // Retry.
}
+
+ if atomic.LoadInt32(&c.healthCheck) != unknown && IsNetworkOrHostDown(err, false) {
+ select {
+ case c.healthCheckCh <- struct{}{}:
+ default:
+ }
+ }
return nil, err
}
-
// Initiate the request.
res, err = c.do(req)
if err != nil {
+ if atomic.LoadInt32(&c.healthCheck) != unknown && IsNetworkOrHostDown(err, false) {
+ select {
+ case c.healthCheckCh <- struct{}{}:
+ default:
+ }
+ }
+
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return nil, err
}
diff --git a/vendor/github.com/minio/minio-go/v7/constants.go b/vendor/github.com/minio/minio-go/v7/constants.go
index 2a2e6a0d..7caa42d9 100644
--- a/vendor/github.com/minio/minio-go/v7/constants.go
+++ b/vendor/github.com/minio/minio-go/v7/constants.go
@@ -69,6 +69,7 @@ const (
amzVersionID = "X-Amz-Version-Id"
amzTaggingCount = "X-Amz-Tagging-Count"
amzExpiration = "X-Amz-Expiration"
+ amzRestore = "X-Amz-Restore"
amzReplicationStatus = "X-Amz-Replication-Status"
amzDeleteMarker = "X-Amz-Delete-Marker"
@@ -89,4 +90,12 @@ const (
minIOBucketReplicationDeleteMarker = "X-Minio-Source-DeleteMarker"
minIOBucketReplicationProxyRequest = "X-Minio-Source-Proxy-Request"
minIOBucketReplicationRequest = "X-Minio-Source-Replication-Request"
+ // Header indicates last tag update time on source
+ minIOBucketReplicationTaggingTimestamp = "X-Minio-Source-Replication-Tagging-Timestamp"
+ // Header indicates last retention update time on source
+ minIOBucketReplicationObjectRetentionTimestamp = "X-Minio-Source-Replication-Retention-Timestamp"
+ // Header indicates last legalhold update time on source
+ minIOBucketReplicationObjectLegalHoldTimestamp = "X-Minio-Source-Replication-LegalHold-Timestamp"
+
+ minIOForceDelete = "x-minio-force-delete"
)
diff --git a/vendor/github.com/minio/minio-go/v7/core.go b/vendor/github.com/minio/minio-go/v7/core.go
index 2bf4edf0..7bef7497 100644
--- a/vendor/github.com/minio/minio-go/v7/core.go
+++ b/vendor/github.com/minio/minio-go/v7/core.go
@@ -46,13 +46,13 @@ func NewCore(endpoint string, opts *Options) (*Core, error) {
// ListObjects - List all the objects at a prefix, optionally with marker and delimiter
// you can further filter the results.
func (c Core) ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (result ListBucketResult, err error) {
- return c.listObjectsQuery(context.Background(), bucket, prefix, marker, delimiter, maxKeys)
+ return c.listObjectsQuery(context.Background(), bucket, prefix, marker, delimiter, maxKeys, nil)
}
// ListObjectsV2 - Lists all the objects at a prefix, similar to ListObjects() but uses
// continuationToken instead of marker to support iteration over the results.
-func (c Core) ListObjectsV2(bucketName, objectPrefix, continuationToken string, fetchOwner bool, delimiter string, maxkeys int) (ListBucketV2Result, error) {
- return c.listObjectsV2Query(context.Background(), bucketName, objectPrefix, continuationToken, fetchOwner, false, delimiter, maxkeys)
+func (c Core) ListObjectsV2(bucketName, objectPrefix, startAfter, continuationToken, delimiter string, maxkeys int) (ListBucketV2Result, error) {
+ return c.listObjectsV2Query(context.Background(), bucketName, objectPrefix, continuationToken, true, false, delimiter, startAfter, maxkeys, nil)
}
// CopyObject - copies an object from source object to destination object on server side.
@@ -97,10 +97,10 @@ func (c Core) ListObjectParts(ctx context.Context, bucket, object, uploadID stri
}
// CompleteMultipartUpload - Concatenate uploaded parts and commit to an object.
-func (c Core) CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, parts []CompletePart) (string, error) {
+func (c Core) CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, parts []CompletePart, opts PutObjectOptions) (string, error) {
res, err := c.completeMultipartUpload(ctx, bucket, object, uploadID, completeMultipartUpload{
Parts: parts,
- })
+ }, opts)
return res.ETag, err
}
diff --git a/vendor/github.com/minio/minio-go/v7/functional_tests.go b/vendor/github.com/minio/minio-go/v7/functional_tests.go
index ba7ff577..7a168993 100644
--- a/vendor/github.com/minio/minio-go/v7/functional_tests.go
+++ b/vendor/github.com/minio/minio-go/v7/functional_tests.go
@@ -38,6 +38,7 @@ import (
"sort"
"strconv"
"strings"
+ "sync"
"time"
"github.com/dustin/go-humanize"
@@ -1054,6 +1055,153 @@ func testGetObjectWithVersioning() {
successLogger(testName, function, args, startTime).Info()
}
+func testPutObjectWithVersioning() {
+ // initialize logging params
+ startTime := time.Now()
+ testName := getFuncName()
+ function := "GetObject()"
+ args := map[string]interface{}{}
+
+ // Seed random based on current time.
+ rand.Seed(time.Now().Unix())
+
+ // Instantiate new minio client object.
+ c, err := minio.New(os.Getenv(serverEndpoint),
+ &minio.Options{
+ Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""),
+ Secure: mustParseBool(os.Getenv(enableHTTPS)),
+ })
+ if err != nil {
+ logError(testName, function, args, startTime, "", "MinIO client object creation failed", err)
+ return
+ }
+
+ // Enable tracing, write to stderr.
+ // c.TraceOn(os.Stderr)
+
+ // Set user agent.
+ c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0")
+
+ // Generate a new random bucket name.
+ bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-")
+ args["bucketName"] = bucketName
+
+ // Make a new bucket.
+ err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true})
+ if err != nil {
+ logError(testName, function, args, startTime, "", "Make bucket failed", err)
+ return
+ }
+
+ err = c.EnableVersioning(context.Background(), bucketName)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "Enable versioning failed", err)
+ return
+ }
+
+ objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
+ args["objectName"] = objectName
+
+ const n = 10
+ // Read input...
+
+ // Save the data concurrently.
+ var wg sync.WaitGroup
+ wg.Add(n)
+ var buffers = make([][]byte, n)
+ var errs [n]error
+ for i := 0; i < n; i++ {
+ r := newRandomReader(int64((1<<20)*i+i), int64(i))
+ buf, err := ioutil.ReadAll(r)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "unexpected failure", err)
+ return
+ }
+ buffers[i] = buf
+
+ go func(i int) {
+ defer wg.Done()
+ _, errs[i] = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{PartSize: 5 << 20})
+ }(i)
+ }
+ wg.Wait()
+ for _, err := range errs {
+ if err != nil {
+ logError(testName, function, args, startTime, "", "PutObject failed", err)
+ return
+ }
+ }
+
+ objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true})
+ var results []minio.ObjectInfo
+ for info := range objectsInfo {
+ if info.Err != nil {
+ logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err)
+ return
+ }
+ results = append(results, info)
+ }
+
+ if len(results) != n {
+ logError(testName, function, args, startTime, "", "Unexpected number of Version elements in listing objects", nil)
+ return
+ }
+
+ sort.Slice(results, func(i, j int) bool {
+ return results[i].Size < results[j].Size
+ })
+
+ sort.Slice(buffers, func(i, j int) bool {
+ return len(buffers[i]) < len(buffers[j])
+ })
+
+ for i := 0; i < len(results); i++ {
+ opts := minio.GetObjectOptions{VersionID: results[i].VersionID}
+ reader, err := c.GetObject(context.Background(), bucketName, objectName, opts)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "error during GET object", err)
+ return
+ }
+ statInfo, err := reader.Stat()
+ if err != nil {
+ logError(testName, function, args, startTime, "", "error during calling reader.Stat()", err)
+ return
+ }
+ if statInfo.ETag != results[i].ETag {
+ logError(testName, function, args, startTime, "", "error during HEAD object, unexpected ETag", err)
+ return
+ }
+ if statInfo.LastModified.Unix() != results[i].LastModified.Unix() {
+ logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Last-Modified", err)
+ return
+ }
+ if statInfo.Size != results[i].Size {
+ logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Content-Length", err)
+ return
+ }
+
+ tmpBuffer := bytes.NewBuffer([]byte{})
+ _, err = io.Copy(tmpBuffer, reader)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "unexpected io.Copy()", err)
+ return
+ }
+
+ if !bytes.Equal(tmpBuffer.Bytes(), buffers[i]) {
+ logError(testName, function, args, startTime, "", "unexpected content of GetObject()", err)
+ return
+ }
+ }
+
+ // Delete all objects and their versions as long as the bucket itself
+ if err = cleanupVersionedBucket(bucketName, c); err != nil {
+ logError(testName, function, args, startTime, "", "CleanupBucket failed", err)
+ return
+ }
+
+ successLogger(testName, function, args, startTime).Info()
+}
+
func testCopyObjectWithVersioning() {
// initialize logging params
startTime := time.Now()
@@ -1191,6 +1339,166 @@ func testCopyObjectWithVersioning() {
successLogger(testName, function, args, startTime).Info()
}
+func testConcurrentCopyObjectWithVersioning() {
+ // initialize logging params
+ startTime := time.Now()
+ testName := getFuncName()
+ function := "CopyObject()"
+ args := map[string]interface{}{}
+
+ // Seed random based on current time.
+ rand.Seed(time.Now().Unix())
+
+ // Instantiate new minio client object.
+ c, err := minio.New(os.Getenv(serverEndpoint),
+ &minio.Options{
+ Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""),
+ Secure: mustParseBool(os.Getenv(enableHTTPS)),
+ })
+ if err != nil {
+ logError(testName, function, args, startTime, "", "MinIO client object creation failed", err)
+ return
+ }
+
+ // Enable tracing, write to stderr.
+ // c.TraceOn(os.Stderr)
+
+ // Set user agent.
+ c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0")
+
+ // Generate a new random bucket name.
+ bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-")
+ args["bucketName"] = bucketName
+
+ // Make a new bucket.
+ err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true})
+ if err != nil {
+ logError(testName, function, args, startTime, "", "Make bucket failed", err)
+ return
+ }
+
+ err = c.EnableVersioning(context.Background(), bucketName)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "Enable versioning failed", err)
+ return
+ }
+
+ objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "")
+ args["objectName"] = objectName
+
+ var testFiles = []string{"datafile-10-kB"}
+ for _, testFile := range testFiles {
+ r := getDataReader(testFile)
+ buf, err := ioutil.ReadAll(r)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "unexpected failure", err)
+ return
+ }
+ r.Close()
+ _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{})
+ if err != nil {
+ logError(testName, function, args, startTime, "", "PutObject failed", err)
+ return
+ }
+ }
+
+ objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true})
+ var infos []minio.ObjectInfo
+ for info := range objectsInfo {
+ if info.Err != nil {
+ logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err)
+ return
+ }
+ infos = append(infos, info)
+ }
+
+ sort.Slice(infos, func(i, j int) bool {
+ return infos[i].Size < infos[j].Size
+ })
+
+ reader, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{VersionID: infos[0].VersionID})
+ if err != nil {
+ logError(testName, function, args, startTime, "", "GetObject of the oldest version content failed", err)
+ return
+ }
+
+ oldestContent, err := ioutil.ReadAll(reader)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "Reading the oldest object version failed", err)
+ return
+ }
+
+ // Copy Source
+ srcOpts := minio.CopySrcOptions{
+ Bucket: bucketName,
+ Object: objectName,
+ VersionID: infos[0].VersionID,
+ }
+ args["src"] = srcOpts
+
+ dstOpts := minio.CopyDestOptions{
+ Bucket: bucketName,
+ Object: objectName + "-copy",
+ }
+ args["dst"] = dstOpts
+
+ // Perform the Copy concurrently
+ const n = 10
+ var wg sync.WaitGroup
+ wg.Add(n)
+ var errs [n]error
+ for i := 0; i < n; i++ {
+ go func(i int) {
+ defer wg.Done()
+ _, errs[i] = c.CopyObject(context.Background(), dstOpts, srcOpts)
+ }(i)
+ }
+ wg.Wait()
+ for _, err := range errs {
+ if err != nil {
+ logError(testName, function, args, startTime, "", "CopyObject failed", err)
+ return
+ }
+ }
+
+ objectsInfo = c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: false, Prefix: dstOpts.Object})
+ infos = []minio.ObjectInfo{}
+ for info := range objectsInfo {
+ // Destination object
+ readerCopy, err := c.GetObject(context.Background(), bucketName, objectName+"-copy", minio.GetObjectOptions{VersionID: info.VersionID})
+ if err != nil {
+ logError(testName, function, args, startTime, "", "GetObject failed", err)
+ return
+ }
+ defer readerCopy.Close()
+
+ newestContent, err := ioutil.ReadAll(readerCopy)
+ if err != nil {
+ logError(testName, function, args, startTime, "", "Reading from GetObject reader failed", err)
+ return
+ }
+
+ if len(newestContent) == 0 || !bytes.Equal(oldestContent, newestContent) {
+ logError(testName, function, args, startTime, "", "Unexpected destination object content", err)
+ return
+ }
+ infos = append(infos, info)
+ }
+
+ if len(infos) != n {
+ logError(testName, function, args, startTime, "", "Unexpected number of Version elements in listing objects", nil)
+ return
+ }
+
+ // Delete all objects and their versions as long as the bucket itself
+ if err = cleanupVersionedBucket(bucketName, c); err != nil {
+ logError(testName, function, args, startTime, "", "CleanupBucket failed", err)
+ return
+ }
+
+ successLogger(testName, function, args, startTime).Info()
+}
+
func testComposeObjectWithVersioning() {
// initialize logging params
startTime := time.Now()
@@ -7548,7 +7856,7 @@ func testSSECMultipartEncryptedToSSECCopyObjectPart() {
completeParts = append(completeParts, minio.CompletePart{PartNumber: part.PartNumber, ETag: part.ETag})
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), bucketName, objectName, uploadID, completeParts)
+ _, err = c.CompleteMultipartUpload(context.Background(), bucketName, objectName, uploadID, completeParts, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -7606,7 +7914,7 @@ func testSSECMultipartEncryptedToSSECCopyObjectPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -7783,7 +8091,7 @@ func testSSECEncryptedToSSECCopyObjectPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -7959,7 +8267,7 @@ func testSSECEncryptedToUnencryptedCopyPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -8138,7 +8446,7 @@ func testSSECEncryptedToSSES3CopyObjectPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -8312,7 +8620,7 @@ func testUnencryptedToSSECCopyObjectPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -8482,7 +8790,7 @@ func testUnencryptedToUnencryptedCopyPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -8654,7 +8962,7 @@ func testUnencryptedToSSES3CopyObjectPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -8829,7 +9137,7 @@ func testSSES3EncryptedToSSECCopyObjectPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -9000,7 +9308,7 @@ func testSSES3EncryptedToUnencryptedCopyPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -9174,7 +9482,7 @@ func testSSES3EncryptedToSSES3CopyObjectPart() {
}
// Complete the multipart upload
- _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart})
+ _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err)
return
@@ -11285,22 +11593,20 @@ func testRemoveObjects() {
var reader = getDataReader("datafile-129-MB")
defer reader.Close()
- n, err := c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{})
+ _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{})
if err != nil {
- log.Fatalln(err)
+ logError(testName, function, args, startTime, "", "Error uploading object", err)
}
- log.Println("Uploaded", objectName, " of size: ", n, "to bucket: ", bucketName, "Successfully.")
// Replace with smaller...
bufSize = dataFileMap["datafile-10-kB"]
reader = getDataReader("datafile-10-kB")
defer reader.Close()
- n, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{})
+ _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{})
if err != nil {
- log.Fatalln(err)
+ logError(testName, function, args, startTime, "", "Error uploading object", err)
}
- log.Println("Uploaded", objectName, " of size: ", n, "to bucket: ", bucketName, "Successfully.")
t := time.Date(2030, time.April, 25, 14, 0, 0, 0, time.UTC)
m := minio.RetentionMode(minio.Governance)
@@ -11416,6 +11722,7 @@ func main() {
testFPutObjectContextV2()
testFGetObjectContextV2()
testPutObjectContextV2()
+ testPutObjectWithVersioning()
testMakeBucketError()
testMakeBucketRegions()
testPutObjectWithMetadata()
@@ -11453,6 +11760,7 @@ func main() {
testStatObjectWithVersioning()
testGetObjectWithVersioning()
testCopyObjectWithVersioning()
+ testConcurrentCopyObjectWithVersioning()
testComposeObjectWithVersioning()
testRemoveObjectWithVersioning()
testRemoveObjectsWithVersioning()
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/credentials.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/credentials.go
index 62d1701e..6b93a27f 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/credentials.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/credentials.go
@@ -22,8 +22,13 @@ import (
"time"
)
-// STSVersion sts version string
-const STSVersion = "2011-06-15"
+const (
+ // STSVersion sts version string
+ STSVersion = "2011-06-15"
+
+ // How much duration to slash from the given expiration duration
+ defaultExpiryWindow = 0.8
+)
// A Value is the AWS credentials value for individual credential fields.
type Value struct {
@@ -82,10 +87,15 @@ type Expiry struct {
// the expiration time given to ensure no requests are made with expired
// tokens.
func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) {
- e.expiration = expiration
- if window > 0 {
- e.expiration = e.expiration.Add(-window)
+ if e.CurrentTime == nil {
+ e.CurrentTime = time.Now
+ }
+ cut := window
+ if cut < 0 {
+ expireIn := expiration.Sub(e.CurrentTime())
+ cut = time.Duration(float64(expireIn) * (1 - defaultExpiryWindow))
}
+ e.expiration = expiration.Add(-cut)
}
// IsExpired returns if the credentials are expired.
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go
index b532bcb6..bbd25ed8 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go
@@ -38,7 +38,10 @@ import (
// prior to the credentials actually expiring. This is beneficial
// so race conditions with expiring credentials do not cause
// request to fail unexpectedly due to ExpiredTokenException exceptions.
-const DefaultExpiryWindow = time.Second * 10 // 10 secs
+// DefaultExpiryWindow can be used as parameter to (*Expiry).SetExpiration.
+// When used the tokens refresh will be triggered when 80% of the elapsed
+// time until the actual expiration time is passed.
+const DefaultExpiryWindow = -1
// A IAM retrieves credentials from the EC2 service, and keeps track if
// those credentials are expired.
@@ -181,10 +184,6 @@ type ec2RoleCredRespBody struct {
// be sent to fetch the rolling access credentials.
// http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
func getIAMRoleURL(endpoint string) (*url.URL, error) {
- if endpoint == "" {
- endpoint = defaultIAMRoleEndpoint
- }
-
u, err := url.Parse(endpoint)
if err != nil {
return nil, err
@@ -281,6 +280,10 @@ func fetchIMDSToken(client *http.Client, endpoint string) (string, error) {
// If the credentials cannot be found, or there is an error
// reading the response an error will be returned.
func getCredentials(client *http.Client, endpoint string) (ec2RoleCredRespBody, error) {
+ if endpoint == "" {
+ endpoint = defaultIAMRoleEndpoint
+ }
+
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
token, _ := fetchIMDSToken(client, endpoint)
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go
index bcb3c36a..0fa5b55f 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go
@@ -1,6 +1,6 @@
/*
* MinIO Go Library for Amazon S3 Compatible Cloud Storage
- * Copyright 2019 MinIO, Inc.
+ * Copyright 2019-2021 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@ package credentials
import (
"encoding/xml"
"errors"
+ "fmt"
"net/http"
"net/url"
"time"
@@ -60,26 +61,86 @@ type LDAPIdentity struct {
// LDAP username/password used to fetch LDAP STS credentials.
LDAPUsername, LDAPPassword string
+
+ // Session policy to apply to the generated credentials. Leave empty to
+ // use the full access policy available to the user.
+ Policy string
+
+ // RequestedExpiry is the configured expiry duration for credentials
+ // requested from LDAP.
+ RequestedExpiry time.Duration
}
// NewLDAPIdentity returns new credentials object that uses LDAP
// Identity.
-func NewLDAPIdentity(stsEndpoint, ldapUsername, ldapPassword string) (*Credentials, error) {
+func NewLDAPIdentity(stsEndpoint, ldapUsername, ldapPassword string, optFuncs ...LDAPIdentityOpt) (*Credentials, error) {
+ l := LDAPIdentity{
+ Client: &http.Client{Transport: http.DefaultTransport},
+ STSEndpoint: stsEndpoint,
+ LDAPUsername: ldapUsername,
+ LDAPPassword: ldapPassword,
+ }
+ for _, optFunc := range optFuncs {
+ optFunc(&l)
+ }
+ return New(&l), nil
+}
+
+// LDAPIdentityOpt is a function type used to configured the LDAPIdentity
+// instance.
+type LDAPIdentityOpt func(*LDAPIdentity)
+
+// LDAPIdentityPolicyOpt sets the session policy for requested credentials.
+func LDAPIdentityPolicyOpt(policy string) LDAPIdentityOpt {
+ return func(k *LDAPIdentity) {
+ k.Policy = policy
+ }
+}
+
+// LDAPIdentityExpiryOpt sets the expiry duration for requested credentials.
+func LDAPIdentityExpiryOpt(d time.Duration) LDAPIdentityOpt {
+ return func(k *LDAPIdentity) {
+ k.RequestedExpiry = d
+ }
+}
+
+func stripPassword(err error) error {
+ urlErr, ok := err.(*url.Error)
+ if ok {
+ u, _ := url.Parse(urlErr.URL)
+ if u == nil {
+ return urlErr
+ }
+ values := u.Query()
+ values.Set("LDAPPassword", "xxxxx")
+ u.RawQuery = values.Encode()
+ urlErr.URL = u.String()
+ return urlErr
+ }
+ return err
+}
+
+// NewLDAPIdentityWithSessionPolicy returns new credentials object that uses
+// LDAP Identity with a specified session policy. The `policy` parameter must be
+// a JSON string specifying the policy document.
+//
+// DEPRECATED: Use the `LDAPIdentityPolicyOpt` with `NewLDAPIdentity` instead.
+func NewLDAPIdentityWithSessionPolicy(stsEndpoint, ldapUsername, ldapPassword, policy string) (*Credentials, error) {
return New(&LDAPIdentity{
Client: &http.Client{Transport: http.DefaultTransport},
STSEndpoint: stsEndpoint,
LDAPUsername: ldapUsername,
LDAPPassword: ldapPassword,
+ Policy: policy,
}), nil
}
// Retrieve gets the credential by calling the MinIO STS API for
// LDAP on the configured stsEndpoint.
func (k *LDAPIdentity) Retrieve() (value Value, err error) {
- u, kerr := url.Parse(k.STSEndpoint)
- if kerr != nil {
- err = kerr
- return
+ u, err := url.Parse(k.STSEndpoint)
+ if err != nil {
+ return value, err
}
v := url.Values{}
@@ -87,25 +148,28 @@ func (k *LDAPIdentity) Retrieve() (value Value, err error) {
v.Set("Version", STSVersion)
v.Set("LDAPUsername", k.LDAPUsername)
v.Set("LDAPPassword", k.LDAPPassword)
+ if k.Policy != "" {
+ v.Set("Policy", k.Policy)
+ }
+ if k.RequestedExpiry != 0 {
+ v.Set("DurationSeconds", fmt.Sprintf("%d", int(k.RequestedExpiry.Seconds())))
+ }
u.RawQuery = v.Encode()
- req, kerr := http.NewRequest(http.MethodPost, u.String(), nil)
- if kerr != nil {
- err = kerr
- return
+ req, err := http.NewRequest(http.MethodPost, u.String(), nil)
+ if err != nil {
+ return value, stripPassword(err)
}
- resp, kerr := k.Client.Do(req)
- if kerr != nil {
- err = kerr
- return
+ resp, err := k.Client.Do(req)
+ if err != nil {
+ return value, stripPassword(err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- err = errors.New(resp.Status)
- return
+ return value, errors.New(resp.Status)
}
r := AssumeRoleWithLDAPResponse{}
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go
index 161ffd36..c1109140 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go
@@ -54,8 +54,9 @@ type WebIdentityResult struct {
// WebIdentityToken - web identity token with expiry.
type WebIdentityToken struct {
- Token string
- Expiry int
+ Token string
+ AccessToken string
+ Expiry int
}
// A STSWebIdentity retrieves credentials from MinIO service, and keeps track if
@@ -121,6 +122,10 @@ func getWebIdentityCredentials(clnt *http.Client, endpoint, roleARN, roleSession
v.Set("RoleSessionName", roleSessionName)
}
v.Set("WebIdentityToken", idToken.Token)
+ if idToken.AccessToken != "" {
+ // Usually set when server is using extended userInfo endpoint.
+ v.Set("WebIdentityAccessToken", idToken.AccessToken)
+ }
if idToken.Expiry > 0 {
v.Set("DurationSeconds", fmt.Sprintf("%d", idToken.Expiry))
}
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go b/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go
index b6f9601b..83870a36 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go
@@ -19,6 +19,7 @@
package lifecycle
import (
+ "encoding/json"
"encoding/xml"
"time"
)
@@ -116,6 +117,26 @@ type Transition struct {
Days ExpirationDays `xml:"Days,omitempty" json:"Days,omitempty"`
}
+// MarshalJSON customizes json encoding by omitting empty values
+func (t Transition) MarshalJSON() ([]byte, error) {
+ type transition struct {
+ Date *ExpirationDate `json:"Date,omitempty"`
+ StorageClass string `json:"StorageClass,omitempty"`
+ Days *ExpirationDays `json:"Days,omitempty"`
+ }
+
+ newt := transition{
+ StorageClass: t.StorageClass,
+ }
+ if !t.IsDaysNull() {
+ newt.Days = &t.Days
+ }
+ if !t.IsDateNull() {
+ newt.Date = &t.Date
+ }
+ return json.Marshal(newt)
+}
+
// IsDaysNull returns true if days field is null
func (t Transition) IsDaysNull() bool {
return t.Days == ExpirationDays(0)
@@ -160,6 +181,31 @@ type Filter struct {
Tag Tag `xml:"Tag,omitempty" json:"Tag,omitempty"`
}
+// IsNull returns true if all Filter fields are empty.
+func (f Filter) IsNull() bool {
+ return f.Tag.IsEmpty() && f.And.IsEmpty() && f.Prefix == ""
+}
+
+// MarshalJSON customizes json encoding by removing empty values.
+func (f Filter) MarshalJSON() ([]byte, error) {
+ type filter struct {
+ And *And `json:"And,omitempty"`
+ Prefix string `json:"Prefix,omitempty"`
+ Tag *Tag `json:"Tag,omitempty"`
+ }
+
+ newf := filter{
+ Prefix: f.Prefix,
+ }
+ if !f.Tag.IsEmpty() {
+ newf.Tag = &f.Tag
+ }
+ if !f.And.IsEmpty() {
+ newf.And = &f.And
+ }
+ return json.Marshal(newf)
+}
+
// MarshalXML - produces the xml representation of the Filter struct
// only one of Prefix, And and Tag should be present in the output.
func (f Filter) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
@@ -238,6 +284,26 @@ type Expiration struct {
DeleteMarker ExpireDeleteMarker `xml:"ExpiredObjectDeleteMarker,omitempty"`
}
+// MarshalJSON customizes json encoding by removing empty day/date specification.
+func (e Expiration) MarshalJSON() ([]byte, error) {
+ type expiration struct {
+ Date *ExpirationDate `json:"Date,omitempty"`
+ Days *ExpirationDays `json:"Days,omitempty"`
+ DeleteMarker ExpireDeleteMarker
+ }
+
+ newexp := expiration{
+ DeleteMarker: e.DeleteMarker,
+ }
+ if !e.IsDaysNull() {
+ newexp.Days = &e.Days
+ }
+ if !e.IsDateNull() {
+ newexp.Date = &e.Date
+ }
+ return json.Marshal(newexp)
+}
+
// IsDaysNull returns true if days field is null
func (e Expiration) IsDaysNull() bool {
return e.Days == ExpirationDays(0)
@@ -267,6 +333,47 @@ func (e Expiration) MarshalXML(en *xml.Encoder, startElement xml.StartElement) e
return en.EncodeElement(expirationWrapper(e), startElement)
}
+// MarshalJSON customizes json encoding by omitting empty values
+func (r Rule) MarshalJSON() ([]byte, error) {
+ type rule struct {
+ AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `json:"AbortIncompleteMultipartUpload,omitempty"`
+ Expiration *Expiration `json:"Expiration,omitempty"`
+ ID string `json:"ID"`
+ RuleFilter *Filter `json:"Filter,omitempty"`
+ NoncurrentVersionExpiration *NoncurrentVersionExpiration `json:"NoncurrentVersionExpiration,omitempty"`
+ NoncurrentVersionTransition *NoncurrentVersionTransition `json:"NoncurrentVersionTransition,omitempty"`
+ Prefix string `json:"Prefix,omitempty"`
+ Status string `json:"Status"`
+ Transition *Transition `json:"Transition,omitempty"`
+ }
+ newr := rule{
+ Prefix: r.Prefix,
+ Status: r.Status,
+ ID: r.ID,
+ }
+
+ if !r.RuleFilter.IsNull() {
+ newr.RuleFilter = &r.RuleFilter
+ }
+ if !r.AbortIncompleteMultipartUpload.IsDaysNull() {
+ newr.AbortIncompleteMultipartUpload = &r.AbortIncompleteMultipartUpload
+ }
+ if !r.Expiration.IsNull() {
+ newr.Expiration = &r.Expiration
+ }
+ if !r.Transition.IsNull() {
+ newr.Transition = &r.Transition
+ }
+ if !r.NoncurrentVersionExpiration.IsDaysNull() {
+ newr.NoncurrentVersionExpiration = &r.NoncurrentVersionExpiration
+ }
+ if !r.NoncurrentVersionTransition.IsDaysNull() {
+ newr.NoncurrentVersionTransition = &r.NoncurrentVersionTransition
+ }
+
+ return json.Marshal(newr)
+}
+
// Rule represents a single rule in lifecycle configuration
type Rule struct {
XMLName xml.Name `xml:"Rule,omitempty" json:"-"`
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
index beacc71f..0211f1fb 100644
--- a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
+++ b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go
@@ -47,13 +47,13 @@ const (
// Options represents options to set a replication configuration rule
type Options struct {
Op OptionType
+ RoleArn string
ID string
Prefix string
RuleStatus string
Priority string
TagString string
StorageClass string
- RoleArn string
DestBucket string
IsTagSet bool
IsSCSet bool
@@ -103,9 +103,17 @@ func (c *Config) AddRule(opts Options) error {
if err != nil {
return err
}
- if opts.RoleArn != c.Role && c.Role != "" {
- return fmt.Errorf("role ARN does not match existing configuration")
+ if opts.RoleArn != "" {
+ tokens := strings.Split(opts.RoleArn, ":")
+ if len(tokens) != 6 {
+ return fmt.Errorf("invalid format for replication Role Arn: %v", opts.RoleArn)
+ }
+ if !strings.HasPrefix(opts.RoleArn, "arn:aws:iam") {
+ return fmt.Errorf("RoleArn invalid for AWS replication configuration: %v", opts.RoleArn)
+ }
+ c.Role = opts.RoleArn
}
+
var status Status
// toggle rule status for edit option
switch opts.RuleStatus {
@@ -139,28 +147,11 @@ func (c *Config) AddRule(opts Options) error {
if opts.ID == "" {
opts.ID = xid.New().String()
}
- arnStr := opts.RoleArn
- if opts.RoleArn == "" {
- arnStr = c.Role
- }
- if arnStr == "" {
- return fmt.Errorf("role ARN required")
- }
- tokens := strings.Split(arnStr, ":")
- if len(tokens) != 6 {
- return fmt.Errorf("invalid format for replication Arn")
- }
- if c.Role == "" {
- c.Role = arnStr
- }
+
destBucket := opts.DestBucket
// ref https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html
if btokens := strings.Split(destBucket, ":"); len(btokens) != 6 {
- if len(btokens) == 1 {
- destBucket = fmt.Sprintf("arn:aws:s3:::%s", destBucket)
- } else {
- return fmt.Errorf("destination bucket needs to be in Arn format")
- }
+ return fmt.Errorf("destination bucket needs to be in Arn format")
}
dmStatus := Disabled
if opts.ReplicateDeleteMarkers != "" {
@@ -236,13 +227,18 @@ func (c *Config) AddRule(opts Options) error {
if err := newRule.Validate(); err != nil {
return err
}
+ // if replication config uses RoleArn, migrate this to the destination element as target ARN for remote bucket for MinIO configuration
+ if c.Role != "" && !strings.HasPrefix(c.Role, "arn:aws:iam") {
+ for i := range c.Rules {
+ c.Rules[i].Destination.Bucket = c.Role
+ }
+ c.Role = ""
+ }
+
for _, rule := range c.Rules {
if rule.Priority == newRule.Priority {
return fmt.Errorf("priority must be unique. Replication configuration already has a rule with this priority")
}
- if rule.Destination.Bucket != newRule.Destination.Bucket {
- return fmt.Errorf("the destination bucket must be same for all rules")
- }
if rule.ID == newRule.ID {
return fmt.Errorf("a rule exists with this ID")
}
@@ -257,6 +253,14 @@ func (c *Config) EditRule(opts Options) error {
if opts.ID == "" {
return fmt.Errorf("rule ID missing")
}
+ // if replication config uses RoleArn, migrate this to the destination element as target ARN for remote bucket for non AWS.
+ if c.Role != "" && !strings.HasPrefix(c.Role, "arn:aws:iam") {
+ for i := range c.Rules {
+ c.Rules[i].Destination.Bucket = c.Role
+ }
+ c.Role = ""
+ }
+
rIdx := -1
var newRule Rule
for i, rule := range c.Rules {
@@ -351,7 +355,7 @@ func (c *Config) EditRule(opts Options) error {
return fmt.Errorf("replica metadata sync should be either [enable|disable]")
}
}
- fmt.Println("opts.ExistingObjectReplicate>", opts.ExistingObjectReplicate)
+
if opts.ExistingObjectReplicate != "" {
switch opts.ExistingObjectReplicate {
case "enable":
@@ -376,11 +380,7 @@ func (c *Config) EditRule(opts Options) error {
destBucket := opts.DestBucket
// ref https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html
if btokens := strings.Split(opts.DestBucket, ":"); len(btokens) != 6 {
- if len(btokens) == 1 {
- destBucket = fmt.Sprintf("arn:aws:s3:::%s", destBucket)
- } else {
- return fmt.Errorf("destination bucket needs to be in Arn format")
- }
+ return fmt.Errorf("destination bucket needs to be in Arn format")
}
newRule.Destination.Bucket = destBucket
}
@@ -393,8 +393,8 @@ func (c *Config) EditRule(opts Options) error {
if rule.Priority == newRule.Priority && rIdx != idx {
return fmt.Errorf("priority must be unique. Replication configuration already has a rule with this priority")
}
- if rule.Destination.Bucket != newRule.Destination.Bucket {
- return fmt.Errorf("the destination bucket must be same for all rules")
+ if rule.Destination.Bucket != newRule.Destination.Bucket && rule.ID == newRule.ID {
+ return fmt.Errorf("invalid destination bucket for this rule")
}
}
@@ -678,9 +678,9 @@ func (e ExistingObjectReplication) Validate() error {
return nil
}
-// Metrics represents inline replication metrics
-// such as pending, failed and completed bytes in total for a bucket
-type Metrics struct {
+// TargetMetrics represents inline replication metrics
+// such as pending, failed and completed bytes in total for a bucket remote target
+type TargetMetrics struct {
// Pending size in bytes
PendingSize uint64 `json:"pendingReplicationSize"`
// Completed size in bytes
@@ -694,3 +694,28 @@ type Metrics struct {
// Total number of failed operations including metadata updates
FailedCount uint64 `json:"failedReplicationCount"`
}
+
+// Metrics represents inline replication metrics for a bucket.
+type Metrics struct {
+ Stats map[string]TargetMetrics
+ // Total Pending size in bytes across targets
+ PendingSize uint64 `json:"pendingReplicationSize"`
+ // Completed size in bytes across targets
+ ReplicatedSize uint64 `json:"completedReplicationSize"`
+ // Total Replica size in bytes across targets
+ ReplicaSize uint64 `json:"replicaSize"`
+ // Failed size in bytes across targets
+ FailedSize uint64 `json:"failedReplicationSize"`
+ // Total number of pending operations including metadata updates across targets
+ PendingCount uint64 `json:"pendingReplicationCount"`
+ // Total number of failed operations including metadata updates across targets
+ FailedCount uint64 `json:"failedReplicationCount"`
+}
+
+type ResyncTargetsInfo struct {
+ Targets []ResyncTarget `json:"target,omitempty"`
+}
+type ResyncTarget struct {
+ Arn string `json:"arn"`
+ ResetID string `json:"resetid"`
+}
diff --git a/vendor/github.com/minio/minio-go/v7/utils.go b/vendor/github.com/minio/minio-go/v7/utils.go
index 4bdf1a3c..e7f90a3b 100644
--- a/vendor/github.com/minio/minio-go/v7/utils.go
+++ b/vendor/github.com/minio/minio-go/v7/utils.go
@@ -18,14 +18,17 @@
package minio
import (
+ "context"
"crypto/md5"
"encoding/base64"
"encoding/hex"
"encoding/xml"
+ "errors"
"fmt"
"hash"
"io"
"io/ioutil"
+ "math/rand"
"net"
"net/http"
"net/url"
@@ -58,6 +61,26 @@ func amzExpirationToExpiryDateRuleID(expiration string) (time.Time, string) {
return time.Time{}, ""
}
+var restoreRegex = regexp.MustCompile(`ongoing-request="(.*?)"(, expiry-date="(.*?)")?`)
+
+func amzRestoreToStruct(restore string) (ongoing bool, expTime time.Time, err error) {
+ matches := restoreRegex.FindStringSubmatch(restore)
+ if len(matches) != 4 {
+ return false, time.Time{}, errors.New("unexpected restore header")
+ }
+ ongoing, err = strconv.ParseBool(matches[1])
+ if err != nil {
+ return false, time.Time{}, err
+ }
+ if matches[3] != "" {
+ expTime, err = time.Parse(http.TimeFormat, matches[3])
+ if err != nil {
+ return false, time.Time{}, err
+ }
+ }
+ return
+}
+
// xmlDecoder provide decoded value in xml.
func xmlDecoder(body io.Reader, v interface{}) error {
d := xml.NewDecoder(body)
@@ -294,6 +317,16 @@ func ToObjectInfo(bucketName string, objectName string, h http.Header) (ObjectIn
}
}
+ // Nil if not found
+ var restore *RestoreInfo
+ if restoreHdr := h.Get(amzRestore); restoreHdr != "" {
+ ongoing, expTime, err := amzRestoreToStruct(restoreHdr)
+ if err != nil {
+ return ObjectInfo{}, err
+ }
+ restore = &RestoreInfo{OngoingRestore: ongoing, ExpiryTime: expTime}
+ }
+
// extract lifecycle expiry date and rule ID
expTime, ruleID := amzExpirationToExpiryDateRuleID(h.Get(amzExpiration))
@@ -319,6 +352,7 @@ func ToObjectInfo(bucketName string, objectName string, h http.Header) (ObjectIn
UserMetadata: userMetadata,
UserTags: userTags,
UserTagCount: tagCount,
+ Restore: restore,
}, nil
}
@@ -397,19 +431,20 @@ func getDefaultLocation(u url.URL, regionOverride string) (location string) {
return region
}
-var supportedHeaders = []string{
- "content-type",
- "cache-control",
- "content-encoding",
- "content-disposition",
- "content-language",
- "x-amz-website-redirect-location",
- "x-amz-object-lock-mode",
- "x-amz-metadata-directive",
- "x-amz-object-lock-retain-until-date",
- "expires",
- "x-amz-replication-status",
+var supportedHeaders = map[string]bool{
+ "content-type": true,
+ "cache-control": true,
+ "content-encoding": true,
+ "content-disposition": true,
+ "content-language": true,
+ "x-amz-website-redirect-location": true,
+ "x-amz-object-lock-mode": true,
+ "x-amz-metadata-directive": true,
+ "x-amz-object-lock-retain-until-date": true,
+ "expires": true,
+ "x-amz-replication-status": true,
// Add more supported headers here.
+ // Must be lower case.
}
// isStorageClassHeader returns true if the header is a supported storage class header
@@ -419,34 +454,24 @@ func isStorageClassHeader(headerKey string) bool {
// isStandardHeader returns true if header is a supported header and not a custom header
func isStandardHeader(headerKey string) bool {
- key := strings.ToLower(headerKey)
- for _, header := range supportedHeaders {
- if strings.ToLower(header) == key {
- return true
- }
- }
- return false
+ return supportedHeaders[strings.ToLower(headerKey)]
}
// sseHeaders is list of server side encryption headers
-var sseHeaders = []string{
- "x-amz-server-side-encryption",
- "x-amz-server-side-encryption-aws-kms-key-id",
- "x-amz-server-side-encryption-context",
- "x-amz-server-side-encryption-customer-algorithm",
- "x-amz-server-side-encryption-customer-key",
- "x-amz-server-side-encryption-customer-key-MD5",
+var sseHeaders = map[string]bool{
+ "x-amz-server-side-encryption": true,
+ "x-amz-server-side-encryption-aws-kms-key-id": true,
+ "x-amz-server-side-encryption-context": true,
+ "x-amz-server-side-encryption-customer-algorithm": true,
+ "x-amz-server-side-encryption-customer-key": true,
+ "x-amz-server-side-encryption-customer-key-md5": true,
+ // Add more supported headers here.
+ // Must be lower case.
}
// isSSEHeader returns true if header is a server side encryption header.
func isSSEHeader(headerKey string) bool {
- key := strings.ToLower(headerKey)
- for _, h := range sseHeaders {
- if strings.ToLower(h) == key {
- return true
- }
- }
- return false
+ return sseHeaders[strings.ToLower(headerKey)]
}
// isAmzHeader returns true if header is a x-amz-meta-* or x-amz-acl header.
@@ -486,3 +511,79 @@ func (m hashWrapper) Close() {
}
m.Hash = nil
}
+
+const letterBytes = "abcdefghijklmnopqrstuvwxyz01234569"
+const (
+ letterIdxBits = 6 // 6 bits to represent a letter index
+ letterIdxMask = 1<<letterIdxBits - 1 // All 1-bits, as many as letterIdxBits
+ letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits
+)
+
+// randString generates random names and prepends them with a known prefix.
+func randString(n int, src rand.Source, prefix string) string {
+ b := make([]byte, n)
+ // A rand.Int63() generates 63 random bits, enough for letterIdxMax letters!
+ for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; {
+ if remain == 0 {
+ cache, remain = src.Int63(), letterIdxMax
+ }
+ if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
+ b[i] = letterBytes[idx]
+ i--
+ }
+ cache >>= letterIdxBits
+ remain--
+ }
+ return prefix + string(b[0:30-len(prefix)])
+}
+
+// IsNetworkOrHostDown - if there was a network error or if the host is down.
+// expectTimeouts indicates that *context* timeouts are expected and does not
+// indicate a downed host. Other timeouts still returns down.
+func IsNetworkOrHostDown(err error, expectTimeouts bool) bool {
+ if err == nil {
+ return false
+ }
+
+ if errors.Is(err, context.Canceled) {
+ return false
+ }
+
+ if expectTimeouts && errors.Is(err, context.DeadlineExceeded) {
+ return false
+ }
+ // We need to figure if the error either a timeout
+ // or a non-temporary error.
+ urlErr := &url.Error{}
+ if errors.As(err, &urlErr) {
+ switch urlErr.Err.(type) {
+ case *net.DNSError, *net.OpError, net.UnknownNetworkError:
+ return true
+ }
+ }
+ var e net.Error
+ if errors.As(err, &e) {
+ if e.Timeout() {
+ return true
+ }
+ }
+
+ // Fallback to other mechanisms.
+ switch {
+ case strings.Contains(err.Error(), "Connection closed by foreign host"):
+ return true
+ case strings.Contains(err.Error(), "TLS handshake timeout"):
+ // If error is - tlsHandshakeTimeoutError.
+ return true
+ case strings.Contains(err.Error(), "i/o timeout"):
+ // If error is - tcp timeoutError.
+ return true
+ case strings.Contains(err.Error(), "connection timed out"):
+ // If err is a net.Dial timeout.
+ return true
+ case strings.Contains(strings.ToLower(err.Error()), "503 service unavailable"):
+ // Denial errors
+ return true
+ }
+ return false
+}
diff --git a/vendor/github.com/modern-go/reflect2/.travis.yml b/vendor/github.com/modern-go/reflect2/.travis.yml
index fbb43744..b097728d 100644
--- a/vendor/github.com/modern-go/reflect2/.travis.yml
+++ b/vendor/github.com/modern-go/reflect2/.travis.yml
@@ -1,7 +1,7 @@
language: go
go:
- - 1.8.x
+ - 1.9.x
- 1.x
before_install:
diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.lock b/vendor/github.com/modern-go/reflect2/Gopkg.lock
index 2a3a6989..10ef8111 100644
--- a/vendor/github.com/modern-go/reflect2/Gopkg.lock
+++ b/vendor/github.com/modern-go/reflect2/Gopkg.lock
@@ -1,15 +1,9 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-[[projects]]
- name = "github.com/modern-go/concurrent"
- packages = ["."]
- revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a"
- version = "1.0.0"
-
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7"
+ input-imports = []
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.toml b/vendor/github.com/modern-go/reflect2/Gopkg.toml
index 2f4f4dbd..a9bc5061 100644
--- a/vendor/github.com/modern-go/reflect2/Gopkg.toml
+++ b/vendor/github.com/modern-go/reflect2/Gopkg.toml
@@ -26,10 +26,6 @@
ignored = []
-[[constraint]]
- name = "github.com/modern-go/concurrent"
- version = "1.0.0"
-
[prune]
go-tests = true
unused-packages = true
diff --git a/vendor/github.com/modern-go/reflect2/go_above_118.go b/vendor/github.com/modern-go/reflect2/go_above_118.go
new file mode 100644
index 00000000..2b4116f6
--- /dev/null
+++ b/vendor/github.com/modern-go/reflect2/go_above_118.go
@@ -0,0 +1,23 @@
+//+build go1.18
+
+package reflect2
+
+import (
+ "unsafe"
+)
+
+// m escapes into the return value, but the caller of mapiterinit
+// doesn't let the return value escape.
+//go:noescape
+//go:linkname mapiterinit reflect.mapiterinit
+func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer, it *hiter)
+
+func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
+ var it hiter
+ mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj), &it)
+ return &UnsafeMapIterator{
+ hiter: &it,
+ pKeyRType: type2.pKeyRType,
+ pElemRType: type2.pElemRType,
+ }
+} \ No newline at end of file
diff --git a/vendor/github.com/modern-go/reflect2/go_above_17.go b/vendor/github.com/modern-go/reflect2/go_above_17.go
deleted file mode 100644
index 5c1cea86..00000000
--- a/vendor/github.com/modern-go/reflect2/go_above_17.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//+build go1.7
-
-package reflect2
-
-import "unsafe"
-
-//go:linkname resolveTypeOff reflect.resolveTypeOff
-func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
diff --git a/vendor/github.com/modern-go/reflect2/go_above_19.go b/vendor/github.com/modern-go/reflect2/go_above_19.go
index c7e3b780..974f7685 100644
--- a/vendor/github.com/modern-go/reflect2/go_above_19.go
+++ b/vendor/github.com/modern-go/reflect2/go_above_19.go
@@ -6,6 +6,9 @@ import (
"unsafe"
)
+//go:linkname resolveTypeOff reflect.resolveTypeOff
+func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
+
//go:linkname makemap reflect.makemap
func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer)
diff --git a/vendor/github.com/modern-go/reflect2/go_below_118.go b/vendor/github.com/modern-go/reflect2/go_below_118.go
new file mode 100644
index 00000000..00003dbd
--- /dev/null
+++ b/vendor/github.com/modern-go/reflect2/go_below_118.go
@@ -0,0 +1,21 @@
+//+build !go1.18
+
+package reflect2
+
+import (
+ "unsafe"
+)
+
+// m escapes into the return value, but the caller of mapiterinit
+// doesn't let the return value escape.
+//go:noescape
+//go:linkname mapiterinit reflect.mapiterinit
+func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) (val *hiter)
+
+func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
+ return &UnsafeMapIterator{
+ hiter: mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj)),
+ pKeyRType: type2.pKeyRType,
+ pElemRType: type2.pElemRType,
+ }
+} \ No newline at end of file
diff --git a/vendor/github.com/modern-go/reflect2/go_below_17.go b/vendor/github.com/modern-go/reflect2/go_below_17.go
deleted file mode 100644
index 65a93c88..00000000
--- a/vendor/github.com/modern-go/reflect2/go_below_17.go
+++ /dev/null
@@ -1,9 +0,0 @@
-//+build !go1.7
-
-package reflect2
-
-import "unsafe"
-
-func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
- return nil
-}
diff --git a/vendor/github.com/modern-go/reflect2/go_below_19.go b/vendor/github.com/modern-go/reflect2/go_below_19.go
deleted file mode 100644
index b050ef70..00000000
--- a/vendor/github.com/modern-go/reflect2/go_below_19.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//+build !go1.9
-
-package reflect2
-
-import (
- "unsafe"
-)
-
-//go:linkname makemap reflect.makemap
-func makemap(rtype unsafe.Pointer) (m unsafe.Pointer)
-
-func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer {
- return makemap(rtype)
-}
diff --git a/vendor/github.com/modern-go/reflect2/reflect2.go b/vendor/github.com/modern-go/reflect2/reflect2.go
index 63b49c79..c43c8b9d 100644
--- a/vendor/github.com/modern-go/reflect2/reflect2.go
+++ b/vendor/github.com/modern-go/reflect2/reflect2.go
@@ -1,8 +1,9 @@
package reflect2
import (
- "github.com/modern-go/concurrent"
"reflect"
+ "runtime"
+ "sync"
"unsafe"
)
@@ -130,13 +131,13 @@ var ConfigSafe = Config{UseSafeImplementation: true}.Froze()
type frozenConfig struct {
useSafeImplementation bool
- cache *concurrent.Map
+ cache *sync.Map
}
func (cfg Config) Froze() *frozenConfig {
return &frozenConfig{
useSafeImplementation: cfg.UseSafeImplementation,
- cache: concurrent.NewMap(),
+ cache: new(sync.Map),
}
}
@@ -288,11 +289,12 @@ func NoEscape(p unsafe.Pointer) unsafe.Pointer {
}
func UnsafeCastString(str string) []byte {
+ bytes := make([]byte, 0)
stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str))
- sliceHeader := &reflect.SliceHeader{
- Data: stringHeader.Data,
- Cap: stringHeader.Len,
- Len: stringHeader.Len,
- }
- return *(*[]byte)(unsafe.Pointer(sliceHeader))
+ sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&bytes))
+ sliceHeader.Data = stringHeader.Data
+ sliceHeader.Cap = stringHeader.Len
+ sliceHeader.Len = stringHeader.Len
+ runtime.KeepAlive(str)
+ return bytes
}
diff --git a/vendor/github.com/modern-go/reflect2/test.sh b/vendor/github.com/modern-go/reflect2/test.sh
deleted file mode 100644
index 3d2b9768..00000000
--- a/vendor/github.com/modern-go/reflect2/test.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-echo "" > coverage.txt
-
-for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do
- go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d
- if [ -f profile.out ]; then
- cat profile.out >> coverage.txt
- rm profile.out
- fi
-done
diff --git a/vendor/github.com/modern-go/reflect2/type_map.go b/vendor/github.com/modern-go/reflect2/type_map.go
index 3acfb558..4b13c315 100644
--- a/vendor/github.com/modern-go/reflect2/type_map.go
+++ b/vendor/github.com/modern-go/reflect2/type_map.go
@@ -1,17 +1,13 @@
+// +build !gccgo
+
package reflect2
import (
"reflect"
- "runtime"
- "strings"
"sync"
"unsafe"
)
-// typelinks1 for 1.5 ~ 1.6
-//go:linkname typelinks1 reflect.typelinks
-func typelinks1() [][]unsafe.Pointer
-
// typelinks2 for 1.7 ~
//go:linkname typelinks2 reflect.typelinks
func typelinks2() (sections []unsafe.Pointer, offset [][]int32)
@@ -27,49 +23,10 @@ func discoverTypes() {
types = make(map[string]reflect.Type)
packages = make(map[string]map[string]reflect.Type)
- ver := runtime.Version()
- if ver == "go1.5" || strings.HasPrefix(ver, "go1.5.") {
- loadGo15Types()
- } else if ver == "go1.6" || strings.HasPrefix(ver, "go1.6.") {
- loadGo15Types()
- } else {
- loadGo17Types()
- }
-}
-
-func loadGo15Types() {
- var obj interface{} = reflect.TypeOf(0)
- typePtrss := typelinks1()
- for _, typePtrs := range typePtrss {
- for _, typePtr := range typePtrs {
- (*emptyInterface)(unsafe.Pointer(&obj)).word = typePtr
- typ := obj.(reflect.Type)
- if typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Struct {
- loadedType := typ.Elem()
- pkgTypes := packages[loadedType.PkgPath()]
- if pkgTypes == nil {
- pkgTypes = map[string]reflect.Type{}
- packages[loadedType.PkgPath()] = pkgTypes
- }
- types[loadedType.String()] = loadedType
- pkgTypes[loadedType.Name()] = loadedType
- }
- if typ.Kind() == reflect.Slice && typ.Elem().Kind() == reflect.Ptr &&
- typ.Elem().Elem().Kind() == reflect.Struct {
- loadedType := typ.Elem().Elem()
- pkgTypes := packages[loadedType.PkgPath()]
- if pkgTypes == nil {
- pkgTypes = map[string]reflect.Type{}
- packages[loadedType.PkgPath()] = pkgTypes
- }
- types[loadedType.String()] = loadedType
- pkgTypes[loadedType.Name()] = loadedType
- }
- }
- }
+ loadGoTypes()
}
-func loadGo17Types() {
+func loadGoTypes() {
var obj interface{} = reflect.TypeOf(0)
sections, offset := typelinks2()
for i, offs := range offset {
diff --git a/vendor/github.com/modern-go/reflect2/unsafe_link.go b/vendor/github.com/modern-go/reflect2/unsafe_link.go
index 57229c8d..b49f614e 100644
--- a/vendor/github.com/modern-go/reflect2/unsafe_link.go
+++ b/vendor/github.com/modern-go/reflect2/unsafe_link.go
@@ -19,18 +19,12 @@ func typedslicecopy(elemType unsafe.Pointer, dst, src sliceHeader) int
//go:linkname mapassign reflect.mapassign
//go:noescape
-func mapassign(rtype unsafe.Pointer, m unsafe.Pointer, key, val unsafe.Pointer)
+func mapassign(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer, val unsafe.Pointer)
//go:linkname mapaccess reflect.mapaccess
//go:noescape
func mapaccess(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer)
-// m escapes into the return value, but the caller of mapiterinit
-// doesn't let the return value escape.
-//go:noescape
-//go:linkname mapiterinit reflect.mapiterinit
-func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) *hiter
-
//go:noescape
//go:linkname mapiternext reflect.mapiternext
func mapiternext(it *hiter)
@@ -42,9 +36,21 @@ func ifaceE2I(rtype unsafe.Pointer, src interface{}, dst unsafe.Pointer)
// If you modify hiter, also change cmd/internal/gc/reflect.go to indicate
// the layout of this structure.
type hiter struct {
- key unsafe.Pointer // Must be in first position. Write nil to indicate iteration end (see cmd/internal/gc/range.go).
- value unsafe.Pointer // Must be in second position (see cmd/internal/gc/range.go).
- // rest fields are ignored
+ key unsafe.Pointer
+ value unsafe.Pointer
+ t unsafe.Pointer
+ h unsafe.Pointer
+ buckets unsafe.Pointer
+ bptr unsafe.Pointer
+ overflow *[]unsafe.Pointer
+ oldoverflow *[]unsafe.Pointer
+ startBucket uintptr
+ offset uint8
+ wrapped bool
+ B uint8
+ i uint8
+ bucket uintptr
+ checkBucket uintptr
}
// add returns p+x.
diff --git a/vendor/github.com/modern-go/reflect2/unsafe_map.go b/vendor/github.com/modern-go/reflect2/unsafe_map.go
index f2e76e6b..37872da8 100644
--- a/vendor/github.com/modern-go/reflect2/unsafe_map.go
+++ b/vendor/github.com/modern-go/reflect2/unsafe_map.go
@@ -107,14 +107,6 @@ func (type2 *UnsafeMapType) Iterate(obj interface{}) MapIterator {
return type2.UnsafeIterate(objEFace.data)
}
-func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
- return &UnsafeMapIterator{
- hiter: mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj)),
- pKeyRType: type2.pKeyRType,
- pElemRType: type2.pElemRType,
- }
-}
-
type UnsafeMapIterator struct {
*hiter
pKeyRType unsafe.Pointer
diff --git a/vendor/github.com/slack-go/slack/block.go b/vendor/github.com/slack-go/slack/block.go
index 3686db85..240f5527 100644
--- a/vendor/github.com/slack-go/slack/block.go
+++ b/vendor/github.com/slack-go/slack/block.go
@@ -9,14 +9,15 @@ package slack
type MessageBlockType string
const (
- MBTSection MessageBlockType = "section"
- MBTDivider MessageBlockType = "divider"
- MBTImage MessageBlockType = "image"
- MBTAction MessageBlockType = "actions"
- MBTContext MessageBlockType = "context"
- MBTFile MessageBlockType = "file"
- MBTInput MessageBlockType = "input"
- MBTHeader MessageBlockType = "header"
+ MBTSection MessageBlockType = "section"
+ MBTDivider MessageBlockType = "divider"
+ MBTImage MessageBlockType = "image"
+ MBTAction MessageBlockType = "actions"
+ MBTContext MessageBlockType = "context"
+ MBTFile MessageBlockType = "file"
+ MBTInput MessageBlockType = "input"
+ MBTHeader MessageBlockType = "header"
+ MBTRichText MessageBlockType = "rich_text"
)
// Block defines an interface all block types should implement
diff --git a/vendor/github.com/slack-go/slack/block_conv.go b/vendor/github.com/slack-go/slack/block_conv.go
index 6936700a..c5378b60 100644
--- a/vendor/github.com/slack-go/slack/block_conv.go
+++ b/vendor/github.com/slack-go/slack/block_conv.go
@@ -65,6 +65,8 @@ func (b *Blocks) UnmarshalJSON(data []byte) error {
block = &ImageBlock{}
case "input":
block = &InputBlock{}
+ case "rich_text":
+ block = &RichTextBlock{}
case "section":
block = &SectionBlock{}
default:
diff --git a/vendor/github.com/slack-go/slack/block_element.go b/vendor/github.com/slack-go/slack/block_element.go
index bf068440..21abb018 100644
--- a/vendor/github.com/slack-go/slack/block_element.go
+++ b/vendor/github.com/slack-go/slack/block_element.go
@@ -389,13 +389,18 @@ func NewTimePickerBlockElement(actionID string) *TimePickerBlockElement {
//
// More Information: https://api.slack.com/reference/block-kit/block-elements#input
type PlainTextInputBlockElement struct {
- Type MessageElementType `json:"type"`
- ActionID string `json:"action_id,omitempty"`
- Placeholder *TextBlockObject `json:"placeholder,omitempty"`
- InitialValue string `json:"initial_value,omitempty"`
- Multiline bool `json:"multiline,omitempty"`
- MinLength int `json:"min_length,omitempty"`
- MaxLength int `json:"max_length,omitempty"`
+ Type MessageElementType `json:"type"`
+ ActionID string `json:"action_id,omitempty"`
+ Placeholder *TextBlockObject `json:"placeholder,omitempty"`
+ InitialValue string `json:"initial_value,omitempty"`
+ Multiline bool `json:"multiline,omitempty"`
+ MinLength int `json:"min_length,omitempty"`
+ MaxLength int `json:"max_length,omitempty"`
+ DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"`
+}
+
+type DispatchActionConfig struct {
+ TriggerActionsOn []string `json:"trigger_actions_on,omitempty"`
}
// ElementType returns the type of the Element
diff --git a/vendor/github.com/slack-go/slack/block_rich_text.go b/vendor/github.com/slack-go/slack/block_rich_text.go
new file mode 100644
index 00000000..281db213
--- /dev/null
+++ b/vendor/github.com/slack-go/slack/block_rich_text.go
@@ -0,0 +1,383 @@
+package slack
+
+import (
+ "encoding/json"
+)
+
+// RichTextBlock defines a new block of type rich_text.
+// More Information: https://api.slack.com/changelog/2019-09-what-they-see-is-what-you-get-and-more-and-less
+type RichTextBlock struct {
+ Type MessageBlockType `json:"type"`
+ BlockID string `json:"block_id,omitempty"`
+ Elements []RichTextElement `json:"elements"`
+}
+
+func (b RichTextBlock) BlockType() MessageBlockType {
+ return b.Type
+}
+
+func (e *RichTextBlock) UnmarshalJSON(b []byte) error {
+ var raw struct {
+ Type MessageBlockType `json:"type"`
+ BlockID string `json:"block_id"`
+ RawElements []json.RawMessage `json:"elements"`
+ }
+ if string(b) == "{}" {
+ return nil
+ }
+ if err := json.Unmarshal(b, &raw); err != nil {
+ return err
+ }
+ elems := make([]RichTextElement, 0, len(raw.RawElements))
+ for _, r := range raw.RawElements {
+ var s struct {
+ Type RichTextElementType `json:"type"`
+ }
+ if err := json.Unmarshal(r, &s); err != nil {
+ return err
+ }
+ var elem RichTextElement
+ switch s.Type {
+ case RTESection:
+ elem = &RichTextSection{}
+ default:
+ elems = append(elems, &RichTextUnknown{
+ Type: s.Type,
+ Raw: string(r),
+ })
+ continue
+ }
+ if err := json.Unmarshal(r, &elem); err != nil {
+ return err
+ }
+ elems = append(elems, elem)
+ }
+ *e = RichTextBlock{
+ Type: raw.Type,
+ BlockID: raw.BlockID,
+ Elements: elems,
+ }
+ return nil
+}
+
+// NewRichTextBlock returns a new instance of RichText Block.
+func NewRichTextBlock(blockID string, elements ...RichTextElement) *RichTextBlock {
+ return &RichTextBlock{
+ Type: MBTRichText,
+ BlockID: blockID,
+ Elements: elements,
+ }
+}
+
+type RichTextElementType string
+
+type RichTextElement interface {
+ RichTextElementType() RichTextElementType
+}
+
+const (
+ RTEList RichTextElementType = "rich_text_list"
+ RTEPreformatted RichTextElementType = "rich_text_preformatted"
+ RTEQuote RichTextElementType = "rich_text_quote"
+ RTESection RichTextElementType = "rich_text_section"
+ RTEUnknown RichTextElementType = "rich_text_unknown"
+)
+
+type RichTextUnknown struct {
+ Type RichTextElementType
+ Raw string
+}
+
+func (u RichTextUnknown) RichTextElementType() RichTextElementType {
+ return u.Type
+}
+
+type RichTextSection struct {
+ Type RichTextElementType `json:"type"`
+ Elements []RichTextSectionElement `json:"elements"`
+}
+
+// ElementType returns the type of the Element
+func (s RichTextSection) RichTextElementType() RichTextElementType {
+ return s.Type
+}
+
+func (e *RichTextSection) UnmarshalJSON(b []byte) error {
+ var raw struct {
+ RawElements []json.RawMessage `json:"elements"`
+ }
+ if string(b) == "{}" {
+ return nil
+ }
+ if err := json.Unmarshal(b, &raw); err != nil {
+ return err
+ }
+ elems := make([]RichTextSectionElement, 0, len(raw.RawElements))
+ for _, r := range raw.RawElements {
+ var s struct {
+ Type RichTextSectionElementType `json:"type"`
+ }
+ if err := json.Unmarshal(r, &s); err != nil {
+ return err
+ }
+ var elem RichTextSectionElement
+ switch s.Type {
+ case RTSEText:
+ elem = &RichTextSectionTextElement{}
+ case RTSEChannel:
+ elem = &RichTextSectionChannelElement{}
+ case RTSEUser:
+ elem = &RichTextSectionUserElement{}
+ case RTSEEmoji:
+ elem = &RichTextSectionEmojiElement{}
+ case RTSELink:
+ elem = &RichTextSectionLinkElement{}
+ case RTSETeam:
+ elem = &RichTextSectionTeamElement{}
+ case RTSEUserGroup:
+ elem = &RichTextSectionUserGroupElement{}
+ case RTSEDate:
+ elem = &RichTextSectionDateElement{}
+ case RTSEBroadcast:
+ elem = &RichTextSectionBroadcastElement{}
+ case RTSEColor:
+ elem = &RichTextSectionColorElement{}
+ default:
+ elems = append(elems, &RichTextSectionUnknownElement{
+ Type: s.Type,
+ Raw: string(r),
+ })
+ continue
+ }
+ if err := json.Unmarshal(r, elem); err != nil {
+ return err
+ }
+ elems = append(elems, elem)
+ }
+ *e = RichTextSection{
+ Type: RTESection,
+ Elements: elems,
+ }
+ return nil
+}
+
+// NewRichTextSectionBlockElement .
+func NewRichTextSection(elements ...RichTextSectionElement) *RichTextSection {
+ return &RichTextSection{
+ Type: RTESection,
+ Elements: elements,
+ }
+}
+
+type RichTextSectionElementType string
+
+const (
+ RTSEBroadcast RichTextSectionElementType = "broadcast"
+ RTSEChannel RichTextSectionElementType = "channel"
+ RTSEColor RichTextSectionElementType = "color"
+ RTSEDate RichTextSectionElementType = "date"
+ RTSEEmoji RichTextSectionElementType = "emoji"
+ RTSELink RichTextSectionElementType = "link"
+ RTSETeam RichTextSectionElementType = "team"
+ RTSEText RichTextSectionElementType = "text"
+ RTSEUser RichTextSectionElementType = "user"
+ RTSEUserGroup RichTextSectionElementType = "usergroup"
+
+ RTSEUnknown RichTextSectionElementType = "unknown"
+)
+
+type RichTextSectionElement interface {
+ RichTextSectionElementType() RichTextSectionElementType
+}
+
+type RichTextSectionTextStyle struct {
+ Bold bool `json:"bold,omitempty"`
+ Italic bool `json:"italic,omitempty"`
+ Strike bool `json:"strike,omitempty"`
+ Code bool `json:"code,omitempty"`
+}
+
+type RichTextSectionTextElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ Text string `json:"text"`
+ Style *RichTextSectionTextStyle `json:"style,omitempty"`
+}
+
+func (r RichTextSectionTextElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionTextElement(text string, style *RichTextSectionTextStyle) *RichTextSectionTextElement {
+ return &RichTextSectionTextElement{
+ Type: RTSEText,
+ Text: text,
+ Style: style,
+ }
+}
+
+type RichTextSectionChannelElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ ChannelID string `json:"channel_id"`
+ Style *RichTextSectionTextStyle `json:"style,omitempty"`
+}
+
+func (r RichTextSectionChannelElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionChannelElement(channelID string, style *RichTextSectionTextStyle) *RichTextSectionChannelElement {
+ return &RichTextSectionChannelElement{
+ Type: RTSEText,
+ ChannelID: channelID,
+ Style: style,
+ }
+}
+
+type RichTextSectionUserElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ UserID string `json:"user_id"`
+ Style *RichTextSectionTextStyle `json:"style,omitempty"`
+}
+
+func (r RichTextSectionUserElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionUserElement(userID string, style *RichTextSectionTextStyle) *RichTextSectionUserElement {
+ return &RichTextSectionUserElement{
+ Type: RTSEUser,
+ UserID: userID,
+ Style: style,
+ }
+}
+
+type RichTextSectionEmojiElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ Name string `json:"name"`
+ SkinTone int `json:"skin_tone"`
+ Style *RichTextSectionTextStyle `json:"style,omitempty"`
+}
+
+func (r RichTextSectionEmojiElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionEmojiElement(name string, skinTone int, style *RichTextSectionTextStyle) *RichTextSectionEmojiElement {
+ return &RichTextSectionEmojiElement{
+ Type: RTSEEmoji,
+ Name: name,
+ SkinTone: skinTone,
+ Style: style,
+ }
+}
+
+type RichTextSectionLinkElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ URL string `json:"url"`
+ Text string `json:"text"`
+ Style *RichTextSectionTextStyle `json:"style,omitempty"`
+}
+
+func (r RichTextSectionLinkElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionLinkElement(url, text string, style *RichTextSectionTextStyle) *RichTextSectionLinkElement {
+ return &RichTextSectionLinkElement{
+ Type: RTSELink,
+ URL: url,
+ Text: text,
+ Style: style,
+ }
+}
+
+type RichTextSectionTeamElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ TeamID string `json:"team_id"`
+ Style *RichTextSectionTextStyle `json:"style.omitempty"`
+}
+
+func (r RichTextSectionTeamElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionTeamElement(teamID string, style *RichTextSectionTextStyle) *RichTextSectionTeamElement {
+ return &RichTextSectionTeamElement{
+ Type: RTSETeam,
+ TeamID: teamID,
+ Style: style,
+ }
+}
+
+type RichTextSectionUserGroupElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ UsergroupID string `json:"usergroup_id"`
+}
+
+func (r RichTextSectionUserGroupElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionUserGroupElement(usergroupID string) *RichTextSectionUserGroupElement {
+ return &RichTextSectionUserGroupElement{
+ Type: RTSEUserGroup,
+ UsergroupID: usergroupID,
+ }
+}
+
+type RichTextSectionDateElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ Timestamp string `json:"timestamp"`
+}
+
+func (r RichTextSectionDateElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionDateElement(timestamp string) *RichTextSectionDateElement {
+ return &RichTextSectionDateElement{
+ Type: RTSEDate,
+ Timestamp: timestamp,
+ }
+}
+
+type RichTextSectionBroadcastElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ Range string `json:"range"`
+}
+
+func (r RichTextSectionBroadcastElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionBroadcastElement(rangeStr string) *RichTextSectionBroadcastElement {
+ return &RichTextSectionBroadcastElement{
+ Type: RTSEBroadcast,
+ Range: rangeStr,
+ }
+}
+
+type RichTextSectionColorElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ Value string `json:"value"`
+}
+
+func (r RichTextSectionColorElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
+
+func NewRichTextSectionColorElement(value string) *RichTextSectionColorElement {
+ return &RichTextSectionColorElement{
+ Type: RTSEColor,
+ Value: value,
+ }
+}
+
+type RichTextSectionUnknownElement struct {
+ Type RichTextSectionElementType `json:"type"`
+ Raw string
+}
+
+func (r RichTextSectionUnknownElement) RichTextSectionElementType() RichTextSectionElementType {
+ return r.Type
+}
diff --git a/vendor/github.com/slack-go/slack/chat.go b/vendor/github.com/slack-go/slack/chat.go
index 2a1e452e..493b65b6 100644
--- a/vendor/github.com/slack-go/slack/chat.go
+++ b/vendor/github.com/slack-go/slack/chat.go
@@ -188,7 +188,12 @@ func (api *Client) UpdateMessageContext(ctx context.Context, channelID, timestam
// UnfurlMessage unfurls a message in a channel
func (api *Client) UnfurlMessage(channelID, timestamp string, unfurls map[string]Attachment, options ...MsgOption) (string, string, string, error) {
- return api.SendMessageContext(context.Background(), channelID, MsgOptionUnfurl(timestamp, unfurls), MsgOptionCompose(options...))
+ return api.UnfurlMessageContext(context.Background(), channelID, timestamp, unfurls, options...)
+}
+
+// UnfurlMessageContext unfurls a message in a channel with a custom context
+func (api *Client) UnfurlMessageContext(ctx context.Context, channelID, timestamp string, unfurls map[string]Attachment, options ...MsgOption) (string, string, string, error) {
+ return api.SendMessageContext(ctx, channelID, MsgOptionUnfurl(timestamp, unfurls), MsgOptionCompose(options...))
}
// UnfurlMessageWithAuthURL sends an unfurl request containing an
diff --git a/vendor/github.com/slack-go/slack/messages.go b/vendor/github.com/slack-go/slack/messages.go
index 999df5d9..2f05f6d7 100644
--- a/vendor/github.com/slack-go/slack/messages.go
+++ b/vendor/github.com/slack-go/slack/messages.go
@@ -19,6 +19,38 @@ type Message struct {
PreviousMessage *Msg `json:"previous_message,omitempty"`
}
+// Msg SubTypes (https://api.slack.com/events/message)
+const (
+ MsgSubTypeBotMessage = "bot_message" // [Events API, RTM] A message was posted by an integration
+ MsgSubTypeMeMessage = "me_message" // [Events API, RTM] A /me message was sent
+ MsgSubTypeMessageChanged = "message_changed" // [Events API, RTM] A message was changed
+ MsgSubTypeMessageDeleted = "message_deleted" // [Events API, RTM] A message was deleted
+ MsgSubTypeMessageReplied = "message_replied" // [Events API, RTM] A message thread received a reply
+ MsgSubTypeReplyBroadcast = "reply_broadcast" // @Deprecated (No longer served) A message thread's reply was broadcast to a channel
+ MsgSubTypeThreadBroadcast = "thread_broadcast" // [Events API, RTM] A message thread's reply was broadcast to a channel
+ MsgSubTypeChannelJoin = "channel_join" // [Events API, RTM] A member joined a channel
+ MsgSubTypeChannelLeave = "channel_leave" // [Events API, RTM] A member left a channel
+ MsgSubTypeChannelTopic = "channel_topic" // [Events API, RTM] A channel topic was updated
+ MsgSubTypeChannelPurpose = "channel_purpose" // [Events API, RTM] A channel purpose was updated
+ MsgSubTypeChannelName = "channel_name" // [Events API, RTM] A channel was renamed
+ MsgSubTypeChannelArchive = "channel_archive" // [Events API, RTM] A channel was archived
+ MsgSubTypeChannelUnarchive = "channel_unarchive" // [Events API, RTM] A channel was unarchived
+ MsgSubTypeGroupJoin = "group_join" // [RTM] A member joined a group
+ MsgSubTypeGroupLeave = "group_leave" // [RTM] A member left a group
+ MsgSubTypeGroupTopic = "group_topic" // [RTM] A group topic was updated
+ MsgSubTypeGroupPurpose = "group_purpose" // [RTM] A group purpose was updated
+ MsgSubTypeGroupName = "group_name" // [RTM] A group was renamed
+ MsgSubTypeGroupArchive = "group_archive" // [RTM] A group was archived
+ MsgSubTypeGroupUnarchive = "group_unarchive" // [RTM] A group was unarchived
+ MsgSubTypeFileShare = "file_share" // [Events API, RTM] A file was shared into a channel
+ MsgSubTypeFileComment = "file_comment" // [RTM] A comment was added to a file
+ MsgSubTypeGileMention = "file_mention" // [RTM] A file was mentioned in a channel
+ MsgSubTypePinnedItem = "pinned_item" // [RTM] An item was pinned in a channel
+ MsgSubTypeUnpinnedItem = "unpinned_item" // [RTM] An item was unpinned from a channel
+ MsgSubTypeEkmAccessDenied = "ekm_access_denied" // [Events API, RTM] Message content redacted due to Enterprise Key Management (EKM)
+ MsgSubTypeChannelPostingPermissions = "channel_posting_permissions" // [Events API, RTM] The posting permissions for a channel changed
+)
+
// Msg contains information about a slack message
type Msg struct {
// Basic Message
diff --git a/vendor/github.com/slack-go/slack/misc.go b/vendor/github.com/slack-go/slack/misc.go
index 8c50305b..5272e7c4 100644
--- a/vendor/github.com/slack-go/slack/misc.go
+++ b/vendor/github.com/slack-go/slack/misc.go
@@ -41,9 +41,17 @@ func (t SlackResponse) Err() error {
return nil
}
- return errors.New(t.Error)
+ return SlackErrorResponse{Err: t.Error, ResponseMetadata: t.ResponseMetadata}
}
+// SlackErrorResponse brings along the metadata of errors returned by the Slack API.
+type SlackErrorResponse struct {
+ Err string
+ ResponseMetadata ResponseMetadata
+}
+
+func (r SlackErrorResponse) Error() string { return r.Err }
+
// RateLimitedError represents the rate limit respond from slack
type RateLimitedError struct {
RetryAfter time.Duration
diff --git a/vendor/github.com/slack-go/slack/oauth.go b/vendor/github.com/slack-go/slack/oauth.go
index 707ccc6b..d9aca5f3 100644
--- a/vendor/github.com/slack-go/slack/oauth.go
+++ b/vendor/github.com/slack-go/slack/oauth.go
@@ -42,6 +42,8 @@ type OAuthV2Response struct {
IncomingWebhook OAuthResponseIncomingWebhook `json:"incoming_webhook"`
Enterprise OAuthV2ResponseEnterprise `json:"enterprise"`
AuthedUser OAuthV2ResponseAuthedUser `json:"authed_user"`
+ RefreshToken string `json:"refresh_token"`
+ ExpiresIn int `json:"expires_in"`
SlackResponse
}
@@ -132,3 +134,23 @@ func GetOAuthV2ResponseContext(ctx context.Context, client httpClient, clientID,
}
return response, response.Err()
}
+
+// RefreshOAuthV2AccessContext with a context, gets a V2 OAuth access token response
+func RefreshOAuthV2Token(client httpClient, clientID, clientSecret, refreshToken string) (resp *OAuthV2Response, err error) {
+ return RefreshOAuthV2TokenContext(context.Background(), client, clientID, clientSecret, refreshToken)
+}
+
+// RefreshOAuthV2AccessContext with a context, gets a V2 OAuth access token response
+func RefreshOAuthV2TokenContext(ctx context.Context, client httpClient, clientID, clientSecret, refreshToken string) (resp *OAuthV2Response, err error) {
+ values := url.Values{
+ "client_id": {clientID},
+ "client_secret": {clientSecret},
+ "refresh_token": {refreshToken},
+ "grant_type": {"refresh_token"},
+ }
+ response := &OAuthV2Response{}
+ if err = postForm(ctx, client, APIURL+"oauth.v2.access", values, response, discard{}); err != nil {
+ return nil, err
+ }
+ return response, response.Err()
+}
diff --git a/vendor/github.com/slack-go/slack/users.go b/vendor/github.com/slack-go/slack/users.go
index 3696e37f..87311569 100644
--- a/vendor/github.com/slack-go/slack/users.go
+++ b/vendor/github.com/slack-go/slack/users.go
@@ -469,9 +469,7 @@ func (api *Client) SetUserPhoto(image string, params UserSetPhotoParams) error {
// SetUserPhotoContext changes the currently authenticated user's profile image using a custom context
func (api *Client) SetUserPhotoContext(ctx context.Context, image string, params UserSetPhotoParams) (err error) {
response := &SlackResponse{}
- values := url.Values{
- "token": {api.token},
- }
+ values := url.Values{}
if params.CropX != DEFAULT_USER_PHOTO_CROP_X {
values.Add("crop_x", strconv.Itoa(params.CropX))
}
diff --git a/vendor/github.com/slack-go/slack/webhooks.go b/vendor/github.com/slack-go/slack/webhooks.go
index 39fff441..97346e1c 100644
--- a/vendor/github.com/slack-go/slack/webhooks.go
+++ b/vendor/github.com/slack-go/slack/webhooks.go
@@ -15,6 +15,9 @@ type WebhookMessage struct {
Attachments []Attachment `json:"attachments,omitempty"`
Parse string `json:"parse,omitempty"`
Blocks *Blocks `json:"blocks,omitempty"`
+ ResponseType string `json:"response_type,omitempty"`
+ ReplaceOriginal bool `json:"replace_original,omitempty"`
+ DeleteOriginal bool `json:"delete_original,omitempty"`
}
func PostWebhook(url string, msg *WebhookMessage) error {
diff --git a/vendor/go.uber.org/atomic/CHANGELOG.md b/vendor/go.uber.org/atomic/CHANGELOG.md
index 3c3f2380..38f564e2 100644
--- a/vendor/go.uber.org/atomic/CHANGELOG.md
+++ b/vendor/go.uber.org/atomic/CHANGELOG.md
@@ -4,11 +4,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [1.9.0] - 2021-07-15
+### Added
+- Add `Float64.Swap` to match int atomic operations.
+- Add `atomic.Time` type for atomic operations on `time.Time` values.
+
+[1.9.0]: https://github.com/uber-go/atomic/compare/v1.8.0...v1.9.0
+
## [1.8.0] - 2021-06-09
### Added
- Add `atomic.Uintptr` type for atomic operations on `uintptr` values.
- Add `atomic.UnsafePointer` type for atomic operations on `unsafe.Pointer` values.
+[1.8.0]: https://github.com/uber-go/atomic/compare/v1.7.0...v1.8.0
+
## [1.7.0] - 2020-09-14
### Added
- Support JSON serialization and deserialization of primitive atomic types.
@@ -20,32 +29,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
- Remove dependency on `golang.org/x/{lint, tools}`.
+[1.7.0]: https://github.com/uber-go/atomic/compare/v1.6.0...v1.7.0
+
## [1.6.0] - 2020-02-24
### Changed
- Drop library dependency on `golang.org/x/{lint, tools}`.
+[1.6.0]: https://github.com/uber-go/atomic/compare/v1.5.1...v1.6.0
+
## [1.5.1] - 2019-11-19
- Fix bug where `Bool.CAS` and `Bool.Toggle` do work correctly together
causing `CAS` to fail even though the old value matches.
+[1.5.1]: https://github.com/uber-go/atomic/compare/v1.5.0...v1.5.1
+
## [1.5.0] - 2019-10-29
### Changed
- With Go modules, only the `go.uber.org/atomic` import path is supported now.
If you need to use the old import path, please add a `replace` directive to
your `go.mod`.
+[1.5.0]: https://github.com/uber-go/atomic/compare/v1.4.0...v1.5.0
+
## [1.4.0] - 2019-05-01
### Added
- Add `atomic.Error` type for atomic operations on `error` values.
+[1.4.0]: https://github.com/uber-go/atomic/compare/v1.3.2...v1.4.0
+
## [1.3.2] - 2018-05-02
### Added
- Add `atomic.Duration` type for atomic operations on `time.Duration` values.
+[1.3.2]: https://github.com/uber-go/atomic/compare/v1.3.1...v1.3.2
+
## [1.3.1] - 2017-11-14
### Fixed
- Revert optimization for `atomic.String.Store("")` which caused data races.
+[1.3.1]: https://github.com/uber-go/atomic/compare/v1.3.0...v1.3.1
+
## [1.3.0] - 2017-11-13
### Added
- Add `atomic.Bool.CAS` for compare-and-swap semantics on bools.
@@ -53,10 +76,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Optimize `atomic.String.Store("")` by avoiding an allocation.
+[1.3.0]: https://github.com/uber-go/atomic/compare/v1.2.0...v1.3.0
+
## [1.2.0] - 2017-04-12
### Added
- Shadow `atomic.Value` from `sync/atomic`.
+[1.2.0]: https://github.com/uber-go/atomic/compare/v1.1.0...v1.2.0
+
## [1.1.0] - 2017-03-10
### Added
- Add atomic `Float64` type.
@@ -64,19 +91,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Support new `go.uber.org/atomic` import path.
+[1.1.0]: https://github.com/uber-go/atomic/compare/v1.0.0...v1.1.0
+
## [1.0.0] - 2016-07-18
- Initial release.
-[1.8.0]: https://github.com/uber-go/atomic/compare/v1.7.0...v1.8.0
-[1.7.0]: https://github.com/uber-go/atomic/compare/v1.6.0...v1.7.0
-[1.6.0]: https://github.com/uber-go/atomic/compare/v1.5.1...v1.6.0
-[1.5.1]: https://github.com/uber-go/atomic/compare/v1.5.0...v1.5.1
-[1.5.0]: https://github.com/uber-go/atomic/compare/v1.4.0...v1.5.0
-[1.4.0]: https://github.com/uber-go/atomic/compare/v1.3.2...v1.4.0
-[1.3.2]: https://github.com/uber-go/atomic/compare/v1.3.1...v1.3.2
-[1.3.1]: https://github.com/uber-go/atomic/compare/v1.3.0...v1.3.1
-[1.3.0]: https://github.com/uber-go/atomic/compare/v1.2.0...v1.3.0
-[1.2.0]: https://github.com/uber-go/atomic/compare/v1.1.0...v1.2.0
-[1.1.0]: https://github.com/uber-go/atomic/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/uber-go/atomic/releases/tag/v1.0.0
diff --git a/vendor/go.uber.org/atomic/bool.go b/vendor/go.uber.org/atomic/bool.go
index de5f72ad..209df7bb 100644
--- a/vendor/go.uber.org/atomic/bool.go
+++ b/vendor/go.uber.org/atomic/bool.go
@@ -36,10 +36,10 @@ type Bool struct {
var _zeroBool bool
// NewBool creates a new Bool.
-func NewBool(v bool) *Bool {
+func NewBool(val bool) *Bool {
x := &Bool{}
- if v != _zeroBool {
- x.Store(v)
+ if val != _zeroBool {
+ x.Store(val)
}
return x
}
@@ -50,19 +50,19 @@ func (x *Bool) Load() bool {
}
// Store atomically stores the passed bool.
-func (x *Bool) Store(v bool) {
- x.v.Store(boolToInt(v))
+func (x *Bool) Store(val bool) {
+ x.v.Store(boolToInt(val))
}
// CAS is an atomic compare-and-swap for bool values.
-func (x *Bool) CAS(o, n bool) bool {
- return x.v.CAS(boolToInt(o), boolToInt(n))
+func (x *Bool) CAS(old, new bool) (swapped bool) {
+ return x.v.CAS(boolToInt(old), boolToInt(new))
}
// Swap atomically stores the given bool and returns the old
// value.
-func (x *Bool) Swap(o bool) bool {
- return truthy(x.v.Swap(boolToInt(o)))
+func (x *Bool) Swap(val bool) (old bool) {
+ return truthy(x.v.Swap(boolToInt(val)))
}
// MarshalJSON encodes the wrapped bool into JSON.
diff --git a/vendor/go.uber.org/atomic/bool_ext.go b/vendor/go.uber.org/atomic/bool_ext.go
index c7bf7a82..a2e60e98 100644
--- a/vendor/go.uber.org/atomic/bool_ext.go
+++ b/vendor/go.uber.org/atomic/bool_ext.go
@@ -38,7 +38,7 @@ func boolToInt(b bool) uint32 {
}
// Toggle atomically negates the Boolean and returns the previous value.
-func (b *Bool) Toggle() bool {
+func (b *Bool) Toggle() (old bool) {
for {
old := b.Load()
if b.CAS(old, !old) {
diff --git a/vendor/go.uber.org/atomic/duration.go b/vendor/go.uber.org/atomic/duration.go
index 2bad9c01..207594f5 100644
--- a/vendor/go.uber.org/atomic/duration.go
+++ b/vendor/go.uber.org/atomic/duration.go
@@ -37,10 +37,10 @@ type Duration struct {
var _zeroDuration time.Duration
// NewDuration creates a new Duration.
-func NewDuration(v time.Duration) *Duration {
+func NewDuration(val time.Duration) *Duration {
x := &Duration{}
- if v != _zeroDuration {
- x.Store(v)
+ if val != _zeroDuration {
+ x.Store(val)
}
return x
}
@@ -51,19 +51,19 @@ func (x *Duration) Load() time.Duration {
}
// Store atomically stores the passed time.Duration.
-func (x *Duration) Store(v time.Duration) {
- x.v.Store(int64(v))
+func (x *Duration) Store(val time.Duration) {
+ x.v.Store(int64(val))
}
// CAS is an atomic compare-and-swap for time.Duration values.
-func (x *Duration) CAS(o, n time.Duration) bool {
- return x.v.CAS(int64(o), int64(n))
+func (x *Duration) CAS(old, new time.Duration) (swapped bool) {
+ return x.v.CAS(int64(old), int64(new))
}
// Swap atomically stores the given time.Duration and returns the old
// value.
-func (x *Duration) Swap(o time.Duration) time.Duration {
- return time.Duration(x.v.Swap(int64(o)))
+func (x *Duration) Swap(val time.Duration) (old time.Duration) {
+ return time.Duration(x.v.Swap(int64(val)))
}
// MarshalJSON encodes the wrapped time.Duration into JSON.
diff --git a/vendor/go.uber.org/atomic/duration_ext.go b/vendor/go.uber.org/atomic/duration_ext.go
index 6273b66b..4c18b0a9 100644
--- a/vendor/go.uber.org/atomic/duration_ext.go
+++ b/vendor/go.uber.org/atomic/duration_ext.go
@@ -25,13 +25,13 @@ import "time"
//go:generate bin/gen-atomicwrapper -name=Duration -type=time.Duration -wrapped=Int64 -pack=int64 -unpack=time.Duration -cas -swap -json -imports time -file=duration.go
// Add atomically adds to the wrapped time.Duration and returns the new value.
-func (d *Duration) Add(n time.Duration) time.Duration {
- return time.Duration(d.v.Add(int64(n)))
+func (d *Duration) Add(delta time.Duration) time.Duration {
+ return time.Duration(d.v.Add(int64(delta)))
}
// Sub atomically subtracts from the wrapped time.Duration and returns the new value.
-func (d *Duration) Sub(n time.Duration) time.Duration {
- return time.Duration(d.v.Sub(int64(n)))
+func (d *Duration) Sub(delta time.Duration) time.Duration {
+ return time.Duration(d.v.Sub(int64(delta)))
}
// String encodes the wrapped value as a string.
diff --git a/vendor/go.uber.org/atomic/error.go b/vendor/go.uber.org/atomic/error.go
index fc529756..3be19c35 100644
--- a/vendor/go.uber.org/atomic/error.go
+++ b/vendor/go.uber.org/atomic/error.go
@@ -32,10 +32,10 @@ type Error struct {
var _zeroError error
// NewError creates a new Error.
-func NewError(v error) *Error {
+func NewError(val error) *Error {
x := &Error{}
- if v != _zeroError {
- x.Store(v)
+ if val != _zeroError {
+ x.Store(val)
}
return x
}
@@ -46,6 +46,6 @@ func (x *Error) Load() error {
}
// Store atomically stores the passed error.
-func (x *Error) Store(v error) {
- x.v.Store(packError(v))
+func (x *Error) Store(val error) {
+ x.v.Store(packError(val))
}
diff --git a/vendor/go.uber.org/atomic/float64.go b/vendor/go.uber.org/atomic/float64.go
index f833fd37..8a136718 100644
--- a/vendor/go.uber.org/atomic/float64.go
+++ b/vendor/go.uber.org/atomic/float64.go
@@ -37,10 +37,10 @@ type Float64 struct {
var _zeroFloat64 float64
// NewFloat64 creates a new Float64.
-func NewFloat64(v float64) *Float64 {
+func NewFloat64(val float64) *Float64 {
x := &Float64{}
- if v != _zeroFloat64 {
- x.Store(v)
+ if val != _zeroFloat64 {
+ x.Store(val)
}
return x
}
@@ -51,13 +51,14 @@ func (x *Float64) Load() float64 {
}
// Store atomically stores the passed float64.
-func (x *Float64) Store(v float64) {
- x.v.Store(math.Float64bits(v))
+func (x *Float64) Store(val float64) {
+ x.v.Store(math.Float64bits(val))
}
-// CAS is an atomic compare-and-swap for float64 values.
-func (x *Float64) CAS(o, n float64) bool {
- return x.v.CAS(math.Float64bits(o), math.Float64bits(n))
+// Swap atomically stores the given float64 and returns the old
+// value.
+func (x *Float64) Swap(val float64) (old float64) {
+ return math.Float64frombits(x.v.Swap(math.Float64bits(val)))
}
// MarshalJSON encodes the wrapped float64 into JSON.
diff --git a/vendor/go.uber.org/atomic/float64_ext.go b/vendor/go.uber.org/atomic/float64_ext.go
index 927b1add..df36b010 100644
--- a/vendor/go.uber.org/atomic/float64_ext.go
+++ b/vendor/go.uber.org/atomic/float64_ext.go
@@ -20,15 +20,18 @@
package atomic
-import "strconv"
+import (
+ "math"
+ "strconv"
+)
-//go:generate bin/gen-atomicwrapper -name=Float64 -type=float64 -wrapped=Uint64 -pack=math.Float64bits -unpack=math.Float64frombits -cas -json -imports math -file=float64.go
+//go:generate bin/gen-atomicwrapper -name=Float64 -type=float64 -wrapped=Uint64 -pack=math.Float64bits -unpack=math.Float64frombits -swap -json -imports math -file=float64.go
// Add atomically adds to the wrapped float64 and returns the new value.
-func (f *Float64) Add(s float64) float64 {
+func (f *Float64) Add(delta float64) float64 {
for {
old := f.Load()
- new := old + s
+ new := old + delta
if f.CAS(old, new) {
return new
}
@@ -36,8 +39,27 @@ func (f *Float64) Add(s float64) float64 {
}
// Sub atomically subtracts from the wrapped float64 and returns the new value.
-func (f *Float64) Sub(s float64) float64 {
- return f.Add(-s)
+func (f *Float64) Sub(delta float64) float64 {
+ return f.Add(-delta)
+}
+
+// CAS is an atomic compare-and-swap for float64 values.
+//
+// Note: CAS handles NaN incorrectly. NaN != NaN using Go's inbuilt operators
+// but CAS allows a stored NaN to compare equal to a passed in NaN.
+// This avoids typical CAS loops from blocking forever, e.g.,
+//
+// for {
+// old := atom.Load()
+// new = f(old)
+// if atom.CAS(old, new) {
+// break
+// }
+// }
+//
+// If CAS did not match NaN to match, then the above would loop forever.
+func (f *Float64) CAS(old, new float64) (swapped bool) {
+ return f.v.CAS(math.Float64bits(old), math.Float64bits(new))
}
// String encodes the wrapped value as a string.
diff --git a/vendor/go.uber.org/atomic/int32.go b/vendor/go.uber.org/atomic/int32.go
index a20fc998..640ea36a 100644
--- a/vendor/go.uber.org/atomic/int32.go
+++ b/vendor/go.uber.org/atomic/int32.go
@@ -36,8 +36,8 @@ type Int32 struct {
}
// NewInt32 creates a new Int32.
-func NewInt32(i int32) *Int32 {
- return &Int32{v: i}
+func NewInt32(val int32) *Int32 {
+ return &Int32{v: val}
}
// Load atomically loads the wrapped value.
@@ -46,13 +46,13 @@ func (i *Int32) Load() int32 {
}
// Add atomically adds to the wrapped int32 and returns the new value.
-func (i *Int32) Add(n int32) int32 {
- return atomic.AddInt32(&i.v, n)
+func (i *Int32) Add(delta int32) int32 {
+ return atomic.AddInt32(&i.v, delta)
}
// Sub atomically subtracts from the wrapped int32 and returns the new value.
-func (i *Int32) Sub(n int32) int32 {
- return atomic.AddInt32(&i.v, -n)
+func (i *Int32) Sub(delta int32) int32 {
+ return atomic.AddInt32(&i.v, -delta)
}
// Inc atomically increments the wrapped int32 and returns the new value.
@@ -66,18 +66,18 @@ func (i *Int32) Dec() int32 {
}
// CAS is an atomic compare-and-swap.
-func (i *Int32) CAS(old, new int32) bool {
+func (i *Int32) CAS(old, new int32) (swapped bool) {
return atomic.CompareAndSwapInt32(&i.v, old, new)
}
// Store atomically stores the passed value.
-func (i *Int32) Store(n int32) {
- atomic.StoreInt32(&i.v, n)
+func (i *Int32) Store(val int32) {
+ atomic.StoreInt32(&i.v, val)
}
// Swap atomically swaps the wrapped int32 and returns the old value.
-func (i *Int32) Swap(n int32) int32 {
- return atomic.SwapInt32(&i.v, n)
+func (i *Int32) Swap(val int32) (old int32) {
+ return atomic.SwapInt32(&i.v, val)
}
// MarshalJSON encodes the wrapped int32 into JSON.
diff --git a/vendor/go.uber.org/atomic/int64.go b/vendor/go.uber.org/atomic/int64.go
index f03ee009..9ab66b98 100644
--- a/vendor/go.uber.org/atomic/int64.go
+++ b/vendor/go.uber.org/atomic/int64.go
@@ -36,8 +36,8 @@ type Int64 struct {
}
// NewInt64 creates a new Int64.
-func NewInt64(i int64) *Int64 {
- return &Int64{v: i}
+func NewInt64(val int64) *Int64 {
+ return &Int64{v: val}
}
// Load atomically loads the wrapped value.
@@ -46,13 +46,13 @@ func (i *Int64) Load() int64 {
}
// Add atomically adds to the wrapped int64 and returns the new value.
-func (i *Int64) Add(n int64) int64 {
- return atomic.AddInt64(&i.v, n)
+func (i *Int64) Add(delta int64) int64 {
+ return atomic.AddInt64(&i.v, delta)
}
// Sub atomically subtracts from the wrapped int64 and returns the new value.
-func (i *Int64) Sub(n int64) int64 {
- return atomic.AddInt64(&i.v, -n)
+func (i *Int64) Sub(delta int64) int64 {
+ return atomic.AddInt64(&i.v, -delta)
}
// Inc atomically increments the wrapped int64 and returns the new value.
@@ -66,18 +66,18 @@ func (i *Int64) Dec() int64 {
}
// CAS is an atomic compare-and-swap.
-func (i *Int64) CAS(old, new int64) bool {
+func (i *Int64) CAS(old, new int64) (swapped bool) {
return atomic.CompareAndSwapInt64(&i.v, old, new)
}
// Store atomically stores the passed value.
-func (i *Int64) Store(n int64) {
- atomic.StoreInt64(&i.v, n)
+func (i *Int64) Store(val int64) {
+ atomic.StoreInt64(&i.v, val)
}
// Swap atomically swaps the wrapped int64 and returns the old value.
-func (i *Int64) Swap(n int64) int64 {
- return atomic.SwapInt64(&i.v, n)
+func (i *Int64) Swap(val int64) (old int64) {
+ return atomic.SwapInt64(&i.v, val)
}
// MarshalJSON encodes the wrapped int64 into JSON.
diff --git a/vendor/go.uber.org/atomic/string.go b/vendor/go.uber.org/atomic/string.go
index f8a6f339..80df93d0 100644
--- a/vendor/go.uber.org/atomic/string.go
+++ b/vendor/go.uber.org/atomic/string.go
@@ -32,10 +32,10 @@ type String struct {
var _zeroString string
// NewString creates a new String.
-func NewString(v string) *String {
+func NewString(val string) *String {
x := &String{}
- if v != _zeroString {
- x.Store(v)
+ if val != _zeroString {
+ x.Store(val)
}
return x
}
@@ -49,6 +49,6 @@ func (x *String) Load() string {
}
// Store atomically stores the passed string.
-func (x *String) Store(v string) {
- x.v.Store(v)
+func (x *String) Store(val string) {
+ x.v.Store(val)
}
diff --git a/vendor/go.uber.org/atomic/string_ext.go b/vendor/go.uber.org/atomic/string_ext.go
index 3a955821..83d92eda 100644
--- a/vendor/go.uber.org/atomic/string_ext.go
+++ b/vendor/go.uber.org/atomic/string_ext.go
@@ -21,6 +21,8 @@
package atomic
//go:generate bin/gen-atomicwrapper -name=String -type=string -wrapped=Value -file=string.go
+// Note: No Swap as String wraps Value, which wraps the stdlib sync/atomic.Value which
+// only supports Swap as of go1.17: https://github.com/golang/go/issues/39351
// String returns the wrapped value.
func (s *String) String() string {
diff --git a/vendor/go.uber.org/atomic/time.go b/vendor/go.uber.org/atomic/time.go
new file mode 100644
index 00000000..33460fc3
--- /dev/null
+++ b/vendor/go.uber.org/atomic/time.go
@@ -0,0 +1,55 @@
+// @generated Code generated by gen-atomicwrapper.
+
+// Copyright (c) 2020-2021 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+package atomic
+
+import (
+ "time"
+)
+
+// Time is an atomic type-safe wrapper for time.Time values.
+type Time struct {
+ _ nocmp // disallow non-atomic comparison
+
+ v Value
+}
+
+var _zeroTime time.Time
+
+// NewTime creates a new Time.
+func NewTime(val time.Time) *Time {
+ x := &Time{}
+ if val != _zeroTime {
+ x.Store(val)
+ }
+ return x
+}
+
+// Load atomically loads the wrapped time.Time.
+func (x *Time) Load() time.Time {
+ return unpackTime(x.v.Load())
+}
+
+// Store atomically stores the passed time.Time.
+func (x *Time) Store(val time.Time) {
+ x.v.Store(packTime(val))
+}
diff --git a/vendor/go.uber.org/atomic/time_ext.go b/vendor/go.uber.org/atomic/time_ext.go
new file mode 100644
index 00000000..1e3dc978
--- /dev/null
+++ b/vendor/go.uber.org/atomic/time_ext.go
@@ -0,0 +1,36 @@
+// Copyright (c) 2021 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+package atomic
+
+import "time"
+
+//go:generate bin/gen-atomicwrapper -name=Time -type=time.Time -wrapped=Value -pack=packTime -unpack=unpackTime -imports time -file=time.go
+
+func packTime(t time.Time) interface{} {
+ return t
+}
+
+func unpackTime(v interface{}) time.Time {
+ if t, ok := v.(time.Time); ok {
+ return t
+ }
+ return time.Time{}
+}
diff --git a/vendor/go.uber.org/atomic/uint32.go b/vendor/go.uber.org/atomic/uint32.go
index 0b517323..7859a9cc 100644
--- a/vendor/go.uber.org/atomic/uint32.go
+++ b/vendor/go.uber.org/atomic/uint32.go
@@ -36,8 +36,8 @@ type Uint32 struct {
}
// NewUint32 creates a new Uint32.
-func NewUint32(i uint32) *Uint32 {
- return &Uint32{v: i}
+func NewUint32(val uint32) *Uint32 {
+ return &Uint32{v: val}
}
// Load atomically loads the wrapped value.
@@ -46,13 +46,13 @@ func (i *Uint32) Load() uint32 {
}
// Add atomically adds to the wrapped uint32 and returns the new value.
-func (i *Uint32) Add(n uint32) uint32 {
- return atomic.AddUint32(&i.v, n)
+func (i *Uint32) Add(delta uint32) uint32 {
+ return atomic.AddUint32(&i.v, delta)
}
// Sub atomically subtracts from the wrapped uint32 and returns the new value.
-func (i *Uint32) Sub(n uint32) uint32 {
- return atomic.AddUint32(&i.v, ^(n - 1))
+func (i *Uint32) Sub(delta uint32) uint32 {
+ return atomic.AddUint32(&i.v, ^(delta - 1))
}
// Inc atomically increments the wrapped uint32 and returns the new value.
@@ -66,18 +66,18 @@ func (i *Uint32) Dec() uint32 {
}
// CAS is an atomic compare-and-swap.
-func (i *Uint32) CAS(old, new uint32) bool {
+func (i *Uint32) CAS(old, new uint32) (swapped bool) {
return atomic.CompareAndSwapUint32(&i.v, old, new)
}
// Store atomically stores the passed value.
-func (i *Uint32) Store(n uint32) {
- atomic.StoreUint32(&i.v, n)
+func (i *Uint32) Store(val uint32) {
+ atomic.StoreUint32(&i.v, val)
}
// Swap atomically swaps the wrapped uint32 and returns the old value.
-func (i *Uint32) Swap(n uint32) uint32 {
- return atomic.SwapUint32(&i.v, n)
+func (i *Uint32) Swap(val uint32) (old uint32) {
+ return atomic.SwapUint32(&i.v, val)
}
// MarshalJSON encodes the wrapped uint32 into JSON.
diff --git a/vendor/go.uber.org/atomic/uint64.go b/vendor/go.uber.org/atomic/uint64.go
index 71e3f324..2f2a7db6 100644
--- a/vendor/go.uber.org/atomic/uint64.go
+++ b/vendor/go.uber.org/atomic/uint64.go
@@ -36,8 +36,8 @@ type Uint64 struct {
}
// NewUint64 creates a new Uint64.
-func NewUint64(i uint64) *Uint64 {
- return &Uint64{v: i}
+func NewUint64(val uint64) *Uint64 {
+ return &Uint64{v: val}
}
// Load atomically loads the wrapped value.
@@ -46,13 +46,13 @@ func (i *Uint64) Load() uint64 {
}
// Add atomically adds to the wrapped uint64 and returns the new value.
-func (i *Uint64) Add(n uint64) uint64 {
- return atomic.AddUint64(&i.v, n)
+func (i *Uint64) Add(delta uint64) uint64 {
+ return atomic.AddUint64(&i.v, delta)
}
// Sub atomically subtracts from the wrapped uint64 and returns the new value.
-func (i *Uint64) Sub(n uint64) uint64 {
- return atomic.AddUint64(&i.v, ^(n - 1))
+func (i *Uint64) Sub(delta uint64) uint64 {
+ return atomic.AddUint64(&i.v, ^(delta - 1))
}
// Inc atomically increments the wrapped uint64 and returns the new value.
@@ -66,18 +66,18 @@ func (i *Uint64) Dec() uint64 {
}
// CAS is an atomic compare-and-swap.
-func (i *Uint64) CAS(old, new uint64) bool {
+func (i *Uint64) CAS(old, new uint64) (swapped bool) {
return atomic.CompareAndSwapUint64(&i.v, old, new)
}
// Store atomically stores the passed value.
-func (i *Uint64) Store(n uint64) {
- atomic.StoreUint64(&i.v, n)
+func (i *Uint64) Store(val uint64) {
+ atomic.StoreUint64(&i.v, val)
}
// Swap atomically swaps the wrapped uint64 and returns the old value.
-func (i *Uint64) Swap(n uint64) uint64 {
- return atomic.SwapUint64(&i.v, n)
+func (i *Uint64) Swap(val uint64) (old uint64) {
+ return atomic.SwapUint64(&i.v, val)
}
// MarshalJSON encodes the wrapped uint64 into JSON.
diff --git a/vendor/go.uber.org/atomic/uintptr.go b/vendor/go.uber.org/atomic/uintptr.go
index 6b363ada..ecf7a772 100644
--- a/vendor/go.uber.org/atomic/uintptr.go
+++ b/vendor/go.uber.org/atomic/uintptr.go
@@ -36,8 +36,8 @@ type Uintptr struct {
}
// NewUintptr creates a new Uintptr.
-func NewUintptr(i uintptr) *Uintptr {
- return &Uintptr{v: i}
+func NewUintptr(val uintptr) *Uintptr {
+ return &Uintptr{v: val}
}
// Load atomically loads the wrapped value.
@@ -46,13 +46,13 @@ func (i *Uintptr) Load() uintptr {
}
// Add atomically adds to the wrapped uintptr and returns the new value.
-func (i *Uintptr) Add(n uintptr) uintptr {
- return atomic.AddUintptr(&i.v, n)
+func (i *Uintptr) Add(delta uintptr) uintptr {
+ return atomic.AddUintptr(&i.v, delta)
}
// Sub atomically subtracts from the wrapped uintptr and returns the new value.
-func (i *Uintptr) Sub(n uintptr) uintptr {
- return atomic.AddUintptr(&i.v, ^(n - 1))
+func (i *Uintptr) Sub(delta uintptr) uintptr {
+ return atomic.AddUintptr(&i.v, ^(delta - 1))
}
// Inc atomically increments the wrapped uintptr and returns the new value.
@@ -66,18 +66,18 @@ func (i *Uintptr) Dec() uintptr {
}
// CAS is an atomic compare-and-swap.
-func (i *Uintptr) CAS(old, new uintptr) bool {
+func (i *Uintptr) CAS(old, new uintptr) (swapped bool) {
return atomic.CompareAndSwapUintptr(&i.v, old, new)
}
// Store atomically stores the passed value.
-func (i *Uintptr) Store(n uintptr) {
- atomic.StoreUintptr(&i.v, n)
+func (i *Uintptr) Store(val uintptr) {
+ atomic.StoreUintptr(&i.v, val)
}
// Swap atomically swaps the wrapped uintptr and returns the old value.
-func (i *Uintptr) Swap(n uintptr) uintptr {
- return atomic.SwapUintptr(&i.v, n)
+func (i *Uintptr) Swap(val uintptr) (old uintptr) {
+ return atomic.SwapUintptr(&i.v, val)
}
// MarshalJSON encodes the wrapped uintptr into JSON.
diff --git a/vendor/go.uber.org/atomic/unsafe_pointer.go b/vendor/go.uber.org/atomic/unsafe_pointer.go
index a3830c66..169f793d 100644
--- a/vendor/go.uber.org/atomic/unsafe_pointer.go
+++ b/vendor/go.uber.org/atomic/unsafe_pointer.go
@@ -33,8 +33,8 @@ type UnsafePointer struct {
}
// NewUnsafePointer creates a new UnsafePointer.
-func NewUnsafePointer(p unsafe.Pointer) *UnsafePointer {
- return &UnsafePointer{v: p}
+func NewUnsafePointer(val unsafe.Pointer) *UnsafePointer {
+ return &UnsafePointer{v: val}
}
// Load atomically loads the wrapped value.
@@ -43,16 +43,16 @@ func (p *UnsafePointer) Load() unsafe.Pointer {
}
// Store atomically stores the passed value.
-func (p *UnsafePointer) Store(q unsafe.Pointer) {
- atomic.StorePointer(&p.v, q)
+func (p *UnsafePointer) Store(val unsafe.Pointer) {
+ atomic.StorePointer(&p.v, val)
}
// Swap atomically swaps the wrapped unsafe.Pointer and returns the old value.
-func (p *UnsafePointer) Swap(q unsafe.Pointer) unsafe.Pointer {
- return atomic.SwapPointer(&p.v, q)
+func (p *UnsafePointer) Swap(val unsafe.Pointer) (old unsafe.Pointer) {
+ return atomic.SwapPointer(&p.v, val)
}
// CAS is an atomic compare-and-swap.
-func (p *UnsafePointer) CAS(old, new unsafe.Pointer) bool {
+func (p *UnsafePointer) CAS(old, new unsafe.Pointer) (swapped bool) {
return atomic.CompareAndSwapPointer(&p.v, old, new)
}
diff --git a/vendor/golang.org/x/crypto/acme/acme.go b/vendor/golang.org/x/crypto/acme/acme.go
index 174cfe8b..73b19ef3 100644
--- a/vendor/golang.org/x/crypto/acme/acme.go
+++ b/vendor/golang.org/x/crypto/acme/acme.go
@@ -4,7 +4,7 @@
// Package acme provides an implementation of the
// Automatic Certificate Management Environment (ACME) spec.
-// The intial implementation was based on ACME draft-02 and
+// The initial implementation was based on ACME draft-02 and
// is now being extended to comply with RFC 8555.
// See https://tools.ietf.org/html/draft-ietf-acme-acme-02
// and https://tools.ietf.org/html/rfc8555 for details.
diff --git a/vendor/golang.org/x/crypto/acme/rfc8555.go b/vendor/golang.org/x/crypto/acme/rfc8555.go
index 073cee58..f9d3011f 100644
--- a/vendor/golang.org/x/crypto/acme/rfc8555.go
+++ b/vendor/golang.org/x/crypto/acme/rfc8555.go
@@ -410,3 +410,29 @@ func isAlreadyRevoked(err error) bool {
e, ok := err.(*Error)
return ok && e.ProblemType == "urn:ietf:params:acme:error:alreadyRevoked"
}
+
+// ListCertAlternates retrieves any alternate certificate chain URLs for the
+// given certificate chain URL. These alternate URLs can be passed to FetchCert
+// in order to retrieve the alternate certificate chains.
+//
+// If there are no alternate issuer certificate chains, a nil slice will be
+// returned.
+func (c *Client) ListCertAlternates(ctx context.Context, url string) ([]string, error) {
+ if _, err := c.Discover(ctx); err != nil { // required by c.accountKID
+ return nil, err
+ }
+
+ res, err := c.postAsGet(ctx, url, wantStatus(http.StatusOK))
+ if err != nil {
+ return nil, err
+ }
+ defer res.Body.Close()
+
+ // We don't need the body but we need to discard it so we don't end up
+ // preventing keep-alive
+ if _, err := io.Copy(ioutil.Discard, res.Body); err != nil {
+ return nil, fmt.Errorf("acme: cert alternates response stream: %v", err)
+ }
+ alts := linkHeader(res.Header, "alternate")
+ return alts, nil
+}
diff --git a/vendor/golang.org/x/crypto/poly1305/bits_compat.go b/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go
index 45b5c966..45b5c966 100644
--- a/vendor/golang.org/x/crypto/poly1305/bits_compat.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go
diff --git a/vendor/golang.org/x/crypto/poly1305/bits_go1.13.go b/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go
index ed52b341..ed52b341 100644
--- a/vendor/golang.org/x/crypto/poly1305/bits_go1.13.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go
diff --git a/vendor/golang.org/x/crypto/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go
index f184b67d..f184b67d 100644
--- a/vendor/golang.org/x/crypto/poly1305/mac_noasm.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go
diff --git a/vendor/golang.org/x/crypto/poly1305/poly1305.go b/vendor/golang.org/x/crypto/internal/poly1305/poly1305.go
index 9d7a6af0..4aaea810 100644
--- a/vendor/golang.org/x/crypto/poly1305/poly1305.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/poly1305.go
@@ -15,7 +15,7 @@
// used with a fixed key in order to generate one-time keys from an nonce.
// However, in this package AES isn't used and the one-time key is specified
// directly.
-package poly1305 // import "golang.org/x/crypto/poly1305"
+package poly1305
import "crypto/subtle"
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go
index 6d522333..6d522333 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s
index 1d74f0f8..1d74f0f8 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_generic.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go
index c942a659..c942a659 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_generic.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_generic.go
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go
index 4a069941..4a069941 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s
index 58422aad..58422aad 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_s390x.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go
index 62cc9f84..62cc9f84 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_s390x.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_s390x.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s
index 69c64f84..aa9e0494 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_s390x.s
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s
@@ -18,7 +18,7 @@
// value. These limbs are, for the most part, zero extended and
// placed into 64-bit vector register elements. Each vector
// register is 128-bits wide and so holds 2 of these elements.
-// Using 26-bit limbs allows us plenty of headroom to accomodate
+// Using 26-bit limbs allows us plenty of headroom to accommodate
// accumulations before and after multiplication without
// overflowing either 32-bits (before multiplication) or 64-bits
// (after multiplication).
diff --git a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
index a98d1bd4..a2973e62 100644
--- a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
+++ b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
@@ -35,8 +35,8 @@ This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.
package secretbox // import "golang.org/x/crypto/nacl/secretbox"
import (
+ "golang.org/x/crypto/internal/poly1305"
"golang.org/x/crypto/internal/subtle"
- "golang.org/x/crypto/poly1305"
"golang.org/x/crypto/salsa20/salsa"
)
diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go
index 8bd6b3da..bddbde5d 100644
--- a/vendor/golang.org/x/crypto/ssh/cipher.go
+++ b/vendor/golang.org/x/crypto/ssh/cipher.go
@@ -18,7 +18,7 @@ import (
"io/ioutil"
"golang.org/x/crypto/chacha20"
- "golang.org/x/crypto/poly1305"
+ "golang.org/x/crypto/internal/poly1305"
)
const (
diff --git a/vendor/golang.org/x/net/http2/client_conn_pool.go b/vendor/golang.org/x/net/http2/client_conn_pool.go
index 652bc11a..c936843e 100644
--- a/vendor/golang.org/x/net/http2/client_conn_pool.go
+++ b/vendor/golang.org/x/net/http2/client_conn_pool.go
@@ -16,6 +16,12 @@ import (
// ClientConnPool manages a pool of HTTP/2 client connections.
type ClientConnPool interface {
+ // GetClientConn returns a specific HTTP/2 connection (usually
+ // a TLS-TCP connection) to an HTTP/2 server. On success, the
+ // returned ClientConn accounts for the upcoming RoundTrip
+ // call, so the caller should not omit it. If the caller needs
+ // to, ClientConn.RoundTrip can be called with a bogus
+ // new(http.Request) to release the stream reservation.
GetClientConn(req *http.Request, addr string) (*ClientConn, error)
MarkDead(*ClientConn)
}
@@ -42,7 +48,7 @@ type clientConnPool struct {
conns map[string][]*ClientConn // key is host:port
dialing map[string]*dialCall // currently in-flight dials
keys map[*ClientConn][]string
- addConnCalls map[string]*addConnCall // in-flight addConnIfNeede calls
+ addConnCalls map[string]*addConnCall // in-flight addConnIfNeeded calls
}
func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {
@@ -54,28 +60,8 @@ const (
noDialOnMiss = false
)
-// shouldTraceGetConn reports whether getClientConn should call any
-// ClientTrace.GetConn hook associated with the http.Request.
-//
-// This complexity is needed to avoid double calls of the GetConn hook
-// during the back-and-forth between net/http and x/net/http2 (when the
-// net/http.Transport is upgraded to also speak http2), as well as support
-// the case where x/net/http2 is being used directly.
-func (p *clientConnPool) shouldTraceGetConn(st clientConnIdleState) bool {
- // If our Transport wasn't made via ConfigureTransport, always
- // trace the GetConn hook if provided, because that means the
- // http2 package is being used directly and it's the one
- // dialing, as opposed to net/http.
- if _, ok := p.t.ConnPool.(noDialClientConnPool); !ok {
- return true
- }
- // Otherwise, only use the GetConn hook if this connection has
- // been used previously for other requests. For fresh
- // connections, the net/http package does the dialing.
- return !st.freshConn
-}
-
func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {
+ // TODO(dneil): Dial a new connection when t.DisableKeepAlives is set?
if isConnectionCloseRequest(req) && dialOnMiss {
// It gets its own connection.
traceGetConn(req, addr)
@@ -89,10 +75,14 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
for {
p.mu.Lock()
for _, cc := range p.conns[addr] {
- if st := cc.idleState(); st.canTakeNewRequest {
- if p.shouldTraceGetConn(st) {
+ if cc.ReserveNewRequest() {
+ // When a connection is presented to us by the net/http package,
+ // the GetConn hook has already been called.
+ // Don't call it a second time here.
+ if !cc.getConnCalled {
traceGetConn(req, addr)
}
+ cc.getConnCalled = false
p.mu.Unlock()
return cc, nil
}
@@ -108,7 +98,13 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
if shouldRetryDial(call, req) {
continue
}
- return call.res, call.err
+ cc, err := call.res, call.err
+ if err != nil {
+ return nil, err
+ }
+ if cc.ReserveNewRequest() {
+ return cc, nil
+ }
}
}
@@ -205,6 +201,7 @@ func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) {
if err != nil {
c.err = err
} else {
+ cc.getConnCalled = true // already called by the net/http package
p.addConnLocked(key, cc)
}
delete(p.addConnCalls, key)
diff --git a/vendor/golang.org/x/net/http2/errors.go b/vendor/golang.org/x/net/http2/errors.go
index c789fa33..2663e5d2 100644
--- a/vendor/golang.org/x/net/http2/errors.go
+++ b/vendor/golang.org/x/net/http2/errors.go
@@ -53,6 +53,13 @@ func (e ErrCode) String() string {
return fmt.Sprintf("unknown error code 0x%x", uint32(e))
}
+func (e ErrCode) stringToken() string {
+ if s, ok := errCodeName[e]; ok {
+ return s
+ }
+ return fmt.Sprintf("ERR_UNKNOWN_%d", uint32(e))
+}
+
// ConnectionError is an error that results in the termination of the
// entire connection.
type ConnectionError ErrCode
diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go
index b95d6f2d..96a74790 100644
--- a/vendor/golang.org/x/net/http2/frame.go
+++ b/vendor/golang.org/x/net/http2/frame.go
@@ -122,7 +122,7 @@ var flagName = map[FrameType]map[Flags]string{
// a frameParser parses a frame given its FrameHeader and payload
// bytes. The length of payload will always equal fh.Length (which
// might be 0).
-type frameParser func(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error)
+type frameParser func(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error)
var frameParsers = map[FrameType]frameParser{
FrameData: parseDataFrame,
@@ -267,6 +267,11 @@ type Framer struct {
lastFrame Frame
errDetail error
+ // countError is a non-nil func that's called on a frame parse
+ // error with some unique error path token. It's initialized
+ // from Transport.CountError or Server.CountError.
+ countError func(errToken string)
+
// lastHeaderStream is non-zero if the last frame was an
// unfinished HEADERS/CONTINUATION.
lastHeaderStream uint32
@@ -426,6 +431,7 @@ func NewFramer(w io.Writer, r io.Reader) *Framer {
fr := &Framer{
w: w,
r: r,
+ countError: func(string) {},
logReads: logFrameReads,
logWrites: logFrameWrites,
debugReadLoggerf: log.Printf,
@@ -500,7 +506,7 @@ func (fr *Framer) ReadFrame() (Frame, error) {
if _, err := io.ReadFull(fr.r, payload); err != nil {
return nil, err
}
- f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, payload)
+ f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, fr.countError, payload)
if err != nil {
if ce, ok := err.(connError); ok {
return nil, fr.connError(ce.Code, ce.Reason)
@@ -588,13 +594,14 @@ func (f *DataFrame) Data() []byte {
return f.data
}
-func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
+func parseDataFrame(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {
if fh.StreamID == 0 {
// DATA frames MUST be associated with a stream. If a
// DATA frame is received whose stream identifier
// field is 0x0, the recipient MUST respond with a
// connection error (Section 5.4.1) of type
// PROTOCOL_ERROR.
+ countError("frame_data_stream_0")
return nil, connError{ErrCodeProtocol, "DATA frame with stream ID 0"}
}
f := fc.getDataFrame()
@@ -605,6 +612,7 @@ func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, erro
var err error
payload, padSize, err = readByte(payload)
if err != nil {
+ countError("frame_data_pad_byte_short")
return nil, err
}
}
@@ -613,6 +621,7 @@ func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, erro
// length of the frame payload, the recipient MUST
// treat this as a connection error.
// Filed: https://github.com/http2/http2-spec/issues/610
+ countError("frame_data_pad_too_big")
return nil, connError{ErrCodeProtocol, "pad size larger than data payload"}
}
f.data = payload[:len(payload)-int(padSize)]
@@ -695,7 +704,7 @@ type SettingsFrame struct {
p []byte
}
-func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseSettingsFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if fh.Flags.Has(FlagSettingsAck) && fh.Length > 0 {
// When this (ACK 0x1) bit is set, the payload of the
// SETTINGS frame MUST be empty. Receipt of a
@@ -703,6 +712,7 @@ func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error)
// field value other than 0 MUST be treated as a
// connection error (Section 5.4.1) of type
// FRAME_SIZE_ERROR.
+ countError("frame_settings_ack_with_length")
return nil, ConnectionError(ErrCodeFrameSize)
}
if fh.StreamID != 0 {
@@ -713,14 +723,17 @@ func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error)
// field is anything other than 0x0, the endpoint MUST
// respond with a connection error (Section 5.4.1) of
// type PROTOCOL_ERROR.
+ countError("frame_settings_has_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
if len(p)%6 != 0 {
+ countError("frame_settings_mod_6")
// Expecting even number of 6 byte settings.
return nil, ConnectionError(ErrCodeFrameSize)
}
f := &SettingsFrame{FrameHeader: fh, p: p}
if v, ok := f.Value(SettingInitialWindowSize); ok && v > (1<<31)-1 {
+ countError("frame_settings_window_size_too_big")
// Values above the maximum flow control window size of 2^31 - 1 MUST
// be treated as a connection error (Section 5.4.1) of type
// FLOW_CONTROL_ERROR.
@@ -832,11 +845,13 @@ type PingFrame struct {
func (f *PingFrame) IsAck() bool { return f.Flags.Has(FlagPingAck) }
-func parsePingFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
+func parsePingFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {
if len(payload) != 8 {
+ countError("frame_ping_length")
return nil, ConnectionError(ErrCodeFrameSize)
}
if fh.StreamID != 0 {
+ countError("frame_ping_has_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
f := &PingFrame{FrameHeader: fh}
@@ -872,11 +887,13 @@ func (f *GoAwayFrame) DebugData() []byte {
return f.debugData
}
-func parseGoAwayFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseGoAwayFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if fh.StreamID != 0 {
+ countError("frame_goaway_has_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
if len(p) < 8 {
+ countError("frame_goaway_short")
return nil, ConnectionError(ErrCodeFrameSize)
}
return &GoAwayFrame{
@@ -912,7 +929,7 @@ func (f *UnknownFrame) Payload() []byte {
return f.p
}
-func parseUnknownFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseUnknownFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
return &UnknownFrame{fh, p}, nil
}
@@ -923,8 +940,9 @@ type WindowUpdateFrame struct {
Increment uint32 // never read with high bit set
}
-func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if len(p) != 4 {
+ countError("frame_windowupdate_bad_len")
return nil, ConnectionError(ErrCodeFrameSize)
}
inc := binary.BigEndian.Uint32(p[:4]) & 0x7fffffff // mask off high reserved bit
@@ -936,8 +954,10 @@ func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, err
// control window MUST be treated as a connection
// error (Section 5.4.1).
if fh.StreamID == 0 {
+ countError("frame_windowupdate_zero_inc_conn")
return nil, ConnectionError(ErrCodeProtocol)
}
+ countError("frame_windowupdate_zero_inc_stream")
return nil, streamError(fh.StreamID, ErrCodeProtocol)
}
return &WindowUpdateFrame{
@@ -988,7 +1008,7 @@ func (f *HeadersFrame) HasPriority() bool {
return f.FrameHeader.Flags.Has(FlagHeadersPriority)
}
-func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) {
+func parseHeadersFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) {
hf := &HeadersFrame{
FrameHeader: fh,
}
@@ -997,11 +1017,13 @@ func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err er
// is received whose stream identifier field is 0x0, the recipient MUST
// respond with a connection error (Section 5.4.1) of type
// PROTOCOL_ERROR.
+ countError("frame_headers_zero_stream")
return nil, connError{ErrCodeProtocol, "HEADERS frame with stream ID 0"}
}
var padLength uint8
if fh.Flags.Has(FlagHeadersPadded) {
if p, padLength, err = readByte(p); err != nil {
+ countError("frame_headers_pad_short")
return
}
}
@@ -1009,16 +1031,19 @@ func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err er
var v uint32
p, v, err = readUint32(p)
if err != nil {
+ countError("frame_headers_prio_short")
return nil, err
}
hf.Priority.StreamDep = v & 0x7fffffff
hf.Priority.Exclusive = (v != hf.Priority.StreamDep) // high bit was set
p, hf.Priority.Weight, err = readByte(p)
if err != nil {
+ countError("frame_headers_prio_weight_short")
return nil, err
}
}
if len(p)-int(padLength) < 0 {
+ countError("frame_headers_pad_too_big")
return nil, streamError(fh.StreamID, ErrCodeProtocol)
}
hf.headerFragBuf = p[:len(p)-int(padLength)]
@@ -1125,11 +1150,13 @@ func (p PriorityParam) IsZero() bool {
return p == PriorityParam{}
}
-func parsePriorityFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
+func parsePriorityFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {
if fh.StreamID == 0 {
+ countError("frame_priority_zero_stream")
return nil, connError{ErrCodeProtocol, "PRIORITY frame with stream ID 0"}
}
if len(payload) != 5 {
+ countError("frame_priority_bad_length")
return nil, connError{ErrCodeFrameSize, fmt.Sprintf("PRIORITY frame payload size was %d; want 5", len(payload))}
}
v := binary.BigEndian.Uint32(payload[:4])
@@ -1172,11 +1199,13 @@ type RSTStreamFrame struct {
ErrCode ErrCode
}
-func parseRSTStreamFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseRSTStreamFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if len(p) != 4 {
+ countError("frame_rststream_bad_len")
return nil, ConnectionError(ErrCodeFrameSize)
}
if fh.StreamID == 0 {
+ countError("frame_rststream_zero_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
return &RSTStreamFrame{fh, ErrCode(binary.BigEndian.Uint32(p[:4]))}, nil
@@ -1202,8 +1231,9 @@ type ContinuationFrame struct {
headerFragBuf []byte
}
-func parseContinuationFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseContinuationFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if fh.StreamID == 0 {
+ countError("frame_continuation_zero_stream")
return nil, connError{ErrCodeProtocol, "CONTINUATION frame with stream ID 0"}
}
return &ContinuationFrame{fh, p}, nil
@@ -1252,7 +1282,7 @@ func (f *PushPromiseFrame) HeadersEnded() bool {
return f.FrameHeader.Flags.Has(FlagPushPromiseEndHeaders)
}
-func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) {
+func parsePushPromise(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) {
pp := &PushPromiseFrame{
FrameHeader: fh,
}
@@ -1263,6 +1293,7 @@ func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err err
// with. If the stream identifier field specifies the value
// 0x0, a recipient MUST respond with a connection error
// (Section 5.4.1) of type PROTOCOL_ERROR.
+ countError("frame_pushpromise_zero_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
// The PUSH_PROMISE frame includes optional padding.
@@ -1270,18 +1301,21 @@ func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err err
var padLength uint8
if fh.Flags.Has(FlagPushPromisePadded) {
if p, padLength, err = readByte(p); err != nil {
+ countError("frame_pushpromise_pad_short")
return
}
}
p, pp.PromiseID, err = readUint32(p)
if err != nil {
+ countError("frame_pushpromise_promiseid_short")
return
}
pp.PromiseID = pp.PromiseID & (1<<31 - 1)
if int(padLength) > len(p) {
// like the DATA frame, error out if padding is longer than the body.
+ countError("frame_pushpromise_pad_too_big")
return nil, ConnectionError(ErrCodeProtocol)
}
pp.headerFragBuf = p[:len(p)-int(padLength)]
diff --git a/vendor/golang.org/x/net/http2/pipe.go b/vendor/golang.org/x/net/http2/pipe.go
index 2a5399ec..c15b8a77 100644
--- a/vendor/golang.org/x/net/http2/pipe.go
+++ b/vendor/golang.org/x/net/http2/pipe.go
@@ -30,6 +30,17 @@ type pipeBuffer interface {
io.Reader
}
+// setBuffer initializes the pipe buffer.
+// It has no effect if the pipe is already closed.
+func (p *pipe) setBuffer(b pipeBuffer) {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ if p.err != nil || p.breakErr != nil {
+ return
+ }
+ p.b = b
+}
+
func (p *pipe) Len() int {
p.mu.Lock()
defer p.mu.Unlock()
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index 19e449cf..c67e9b7f 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -130,6 +130,12 @@ type Server struct {
// If nil, a default scheduler is chosen.
NewWriteScheduler func() WriteScheduler
+ // CountError, if non-nil, is called on HTTP/2 server errors.
+ // It's intended to increment a metric for monitoring, such
+ // as an expvar or Prometheus metric.
+ // The errType consists of only ASCII word characters.
+ CountError func(errType string)
+
// Internal state. This is a pointer (rather than embedded directly)
// so that we don't embed a Mutex in this struct, which will make the
// struct non-copyable, which might break some callers.
@@ -405,6 +411,9 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf)
fr := NewFramer(sc.bw, c)
+ if s.CountError != nil {
+ fr.countError = s.CountError
+ }
fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
fr.MaxHeaderListSize = sc.maxHeaderListSize()
fr.SetMaxReadFrameSize(s.maxReadFrameSize())
@@ -1399,7 +1408,7 @@ func (sc *serverConn) processFrame(f Frame) error {
// First frame received must be SETTINGS.
if !sc.sawFirstSettings {
if _, ok := f.(*SettingsFrame); !ok {
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("first_settings", ConnectionError(ErrCodeProtocol))
}
sc.sawFirstSettings = true
}
@@ -1424,7 +1433,7 @@ func (sc *serverConn) processFrame(f Frame) error {
case *PushPromiseFrame:
// A client cannot push. Thus, servers MUST treat the receipt of a PUSH_PROMISE
// frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("push_promise", ConnectionError(ErrCodeProtocol))
default:
sc.vlogf("http2: server ignoring frame: %v", f.Header())
return nil
@@ -1444,7 +1453,7 @@ func (sc *serverConn) processPing(f *PingFrame) error {
// identifier field value other than 0x0, the recipient MUST
// respond with a connection error (Section 5.4.1) of type
// PROTOCOL_ERROR."
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("ping_on_stream", ConnectionError(ErrCodeProtocol))
}
if sc.inGoAway && sc.goAwayCode != ErrCodeNo {
return nil
@@ -1463,7 +1472,7 @@ func (sc *serverConn) processWindowUpdate(f *WindowUpdateFrame) error {
// or PRIORITY on a stream in this state MUST be
// treated as a connection error (Section 5.4.1) of
// type PROTOCOL_ERROR."
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("stream_idle", ConnectionError(ErrCodeProtocol))
}
if st == nil {
// "WINDOW_UPDATE can be sent by a peer that has sent a
@@ -1474,7 +1483,7 @@ func (sc *serverConn) processWindowUpdate(f *WindowUpdateFrame) error {
return nil
}
if !st.flow.add(int32(f.Increment)) {
- return streamError(f.StreamID, ErrCodeFlowControl)
+ return sc.countError("bad_flow", streamError(f.StreamID, ErrCodeFlowControl))
}
default: // connection-level flow control
if !sc.flow.add(int32(f.Increment)) {
@@ -1495,7 +1504,7 @@ func (sc *serverConn) processResetStream(f *RSTStreamFrame) error {
// identifying an idle stream is received, the
// recipient MUST treat this as a connection error
// (Section 5.4.1) of type PROTOCOL_ERROR.
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("reset_idle_stream", ConnectionError(ErrCodeProtocol))
}
if st != nil {
st.cancelCtx()
@@ -1547,7 +1556,7 @@ func (sc *serverConn) processSettings(f *SettingsFrame) error {
// Why is the peer ACKing settings we never sent?
// The spec doesn't mention this case, but
// hang up on them anyway.
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("ack_mystery", ConnectionError(ErrCodeProtocol))
}
return nil
}
@@ -1555,7 +1564,7 @@ func (sc *serverConn) processSettings(f *SettingsFrame) error {
// This isn't actually in the spec, but hang up on
// suspiciously large settings frames or those with
// duplicate entries.
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("settings_big_or_dups", ConnectionError(ErrCodeProtocol))
}
if err := f.ForeachSetting(sc.processSetting); err != nil {
return err
@@ -1622,7 +1631,7 @@ func (sc *serverConn) processSettingInitialWindowSize(val uint32) error {
// control window to exceed the maximum size as a
// connection error (Section 5.4.1) of type
// FLOW_CONTROL_ERROR."
- return ConnectionError(ErrCodeFlowControl)
+ return sc.countError("setting_win_size", ConnectionError(ErrCodeFlowControl))
}
}
return nil
@@ -1655,7 +1664,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
// or PRIORITY on a stream in this state MUST be
// treated as a connection error (Section 5.4.1) of
// type PROTOCOL_ERROR."
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("data_on_idle", ConnectionError(ErrCodeProtocol))
}
// "If a DATA frame is received whose stream is not in "open"
@@ -1672,7 +1681,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
// and return any flow control bytes since we're not going
// to consume them.
if sc.inflow.available() < int32(f.Length) {
- return streamError(id, ErrCodeFlowControl)
+ return sc.countError("data_flow", streamError(id, ErrCodeFlowControl))
}
// Deduct the flow control from inflow, since we're
// going to immediately add it back in
@@ -1685,7 +1694,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
// Already have a stream error in flight. Don't send another.
return nil
}
- return streamError(id, ErrCodeStreamClosed)
+ return sc.countError("closed", streamError(id, ErrCodeStreamClosed))
}
if st.body == nil {
panic("internal error: should have a body in this state")
@@ -1697,12 +1706,12 @@ func (sc *serverConn) processData(f *DataFrame) error {
// RFC 7540, sec 8.1.2.6: A request or response is also malformed if the
// value of a content-length header field does not equal the sum of the
// DATA frame payload lengths that form the body.
- return streamError(id, ErrCodeProtocol)
+ return sc.countError("send_too_much", streamError(id, ErrCodeProtocol))
}
if f.Length > 0 {
// Check whether the client has flow control quota.
if st.inflow.available() < int32(f.Length) {
- return streamError(id, ErrCodeFlowControl)
+ return sc.countError("flow_on_data_length", streamError(id, ErrCodeFlowControl))
}
st.inflow.take(int32(f.Length))
@@ -1710,7 +1719,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
wrote, err := st.body.Write(data)
if err != nil {
sc.sendWindowUpdate(nil, int(f.Length)-wrote)
- return streamError(id, ErrCodeStreamClosed)
+ return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed))
}
if wrote != len(data) {
panic("internal error: bad Writer")
@@ -1796,7 +1805,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// stream identifier MUST respond with a connection error
// (Section 5.4.1) of type PROTOCOL_ERROR.
if id%2 != 1 {
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("headers_even", ConnectionError(ErrCodeProtocol))
}
// A HEADERS frame can be used to create a new stream or
// send a trailer for an open one. If we already have a stream
@@ -1813,7 +1822,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// this state, it MUST respond with a stream error (Section 5.4.2) of
// type STREAM_CLOSED.
if st.state == stateHalfClosedRemote {
- return streamError(id, ErrCodeStreamClosed)
+ return sc.countError("headers_half_closed", streamError(id, ErrCodeStreamClosed))
}
return st.processTrailerHeaders(f)
}
@@ -1824,7 +1833,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// receives an unexpected stream identifier MUST respond with
// a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
if id <= sc.maxClientStreamID {
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("stream_went_down", ConnectionError(ErrCodeProtocol))
}
sc.maxClientStreamID = id
@@ -1841,14 +1850,14 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
if sc.curClientStreams+1 > sc.advMaxStreams {
if sc.unackedSettings == 0 {
// They should know better.
- return streamError(id, ErrCodeProtocol)
+ return sc.countError("over_max_streams", streamError(id, ErrCodeProtocol))
}
// Assume it's a network race, where they just haven't
// received our last SETTINGS update. But actually
// this can't happen yet, because we don't yet provide
// a way for users to adjust server parameters at
// runtime.
- return streamError(id, ErrCodeRefusedStream)
+ return sc.countError("over_max_streams_race", streamError(id, ErrCodeRefusedStream))
}
initialState := stateOpen
@@ -1858,7 +1867,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
st := sc.newStream(id, 0, initialState)
if f.HasPriority() {
- if err := checkPriority(f.StreamID, f.Priority); err != nil {
+ if err := sc.checkPriority(f.StreamID, f.Priority); err != nil {
return err
}
sc.writeSched.AdjustStream(st.id, f.Priority)
@@ -1902,15 +1911,15 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
sc := st.sc
sc.serveG.check()
if st.gotTrailerHeader {
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("dup_trailers", ConnectionError(ErrCodeProtocol))
}
st.gotTrailerHeader = true
if !f.StreamEnded() {
- return streamError(st.id, ErrCodeProtocol)
+ return sc.countError("trailers_not_ended", streamError(st.id, ErrCodeProtocol))
}
if len(f.PseudoFields()) > 0 {
- return streamError(st.id, ErrCodeProtocol)
+ return sc.countError("trailers_pseudo", streamError(st.id, ErrCodeProtocol))
}
if st.trailer != nil {
for _, hf := range f.RegularFields() {
@@ -1919,7 +1928,7 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
// TODO: send more details to the peer somehow. But http2 has
// no way to send debug data at a stream level. Discuss with
// HTTP folk.
- return streamError(st.id, ErrCodeProtocol)
+ return sc.countError("trailers_bogus", streamError(st.id, ErrCodeProtocol))
}
st.trailer[key] = append(st.trailer[key], hf.Value)
}
@@ -1928,13 +1937,13 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
return nil
}
-func checkPriority(streamID uint32, p PriorityParam) error {
+func (sc *serverConn) checkPriority(streamID uint32, p PriorityParam) error {
if streamID == p.StreamDep {
// Section 5.3.1: "A stream cannot depend on itself. An endpoint MUST treat
// this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR."
// Section 5.3.3 says that a stream can depend on one of its dependencies,
// so it's only self-dependencies that are forbidden.
- return streamError(streamID, ErrCodeProtocol)
+ return sc.countError("priority", streamError(streamID, ErrCodeProtocol))
}
return nil
}
@@ -1943,7 +1952,7 @@ func (sc *serverConn) processPriority(f *PriorityFrame) error {
if sc.inGoAway {
return nil
}
- if err := checkPriority(f.StreamID, f.PriorityParam); err != nil {
+ if err := sc.checkPriority(f.StreamID, f.PriorityParam); err != nil {
return err
}
sc.writeSched.AdjustStream(f.StreamID, f.PriorityParam)
@@ -2000,7 +2009,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
isConnect := rp.method == "CONNECT"
if isConnect {
if rp.path != "" || rp.scheme != "" || rp.authority == "" {
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
+ return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol))
}
} else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") {
// See 8.1.2.6 Malformed Requests and Responses:
@@ -2013,13 +2022,13 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
// "All HTTP/2 requests MUST include exactly one valid
// value for the :method, :scheme, and :path
// pseudo-header fields"
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
+ return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol))
}
bodyOpen := !f.StreamEnded()
if rp.method == "HEAD" && bodyOpen {
// HEAD requests can't have bodies
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
+ return nil, nil, sc.countError("head_body", streamError(f.StreamID, ErrCodeProtocol))
}
rp.header = make(http.Header)
@@ -2102,7 +2111,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r
var err error
url_, err = url.ParseRequestURI(rp.path)
if err != nil {
- return nil, nil, streamError(st.id, ErrCodeProtocol)
+ return nil, nil, sc.countError("bad_path", streamError(st.id, ErrCodeProtocol))
}
requestURI = rp.path
}
@@ -2985,3 +2994,31 @@ func h1ServerKeepAlivesDisabled(hs *http.Server) bool {
}
return false
}
+
+func (sc *serverConn) countError(name string, err error) error {
+ if sc == nil || sc.srv == nil {
+ return err
+ }
+ f := sc.srv.CountError
+ if f == nil {
+ return err
+ }
+ var typ string
+ var code ErrCode
+ switch e := err.(type) {
+ case ConnectionError:
+ typ = "conn"
+ code = ErrCode(e)
+ case StreamError:
+ typ = "stream"
+ code = ErrCode(e.Code)
+ default:
+ return err
+ }
+ codeStr := errCodeName[code]
+ if codeStr == "" {
+ codeStr = strconv.Itoa(int(code))
+ }
+ f(fmt.Sprintf("%s_%s_%s", typ, codeStr, name))
+ return err
+}
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index 74c76da5..653a1a0b 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -130,6 +130,12 @@ type Transport struct {
// Defaults to 15s.
PingTimeout time.Duration
+ // CountError, if non-nil, is called on HTTP/2 transport errors.
+ // It's intended to increment a metric for monitoring, such
+ // as an expvar or Prometheus metric.
+ // The errType consists of only ASCII word characters.
+ CountError func(errType string)
+
// t1, if non-nil, is the standard library Transport using
// this transport. Its settings are used (but not its
// RoundTrip method, etc).
@@ -236,11 +242,12 @@ func (t *Transport) initConnPool() {
// ClientConn is the state of a single HTTP/2 client connection to an
// HTTP/2 server.
type ClientConn struct {
- t *Transport
- tconn net.Conn // usually *tls.Conn, except specialized impls
- tlsState *tls.ConnectionState // nil only for specialized impls
- reused uint32 // whether conn is being reused; atomic
- singleUse bool // whether being used for a single http.Request
+ t *Transport
+ tconn net.Conn // usually *tls.Conn, except specialized impls
+ tlsState *tls.ConnectionState // nil only for specialized impls
+ reused uint32 // whether conn is being reused; atomic
+ singleUse bool // whether being used for a single http.Request
+ getConnCalled bool // used by clientConnPool
// readLoop goroutine fields:
readerDone chan struct{} // closed on error
@@ -261,25 +268,33 @@ type ClientConn struct {
goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received
goAwayDebug string // goAway frame's debug data, retained as a string
streams map[uint32]*clientStream // client-initiated
+ streamsReserved int // incr by ReserveNewRequest; decr on RoundTrip
nextStreamID uint32
pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams
pings map[[8]byte]chan struct{} // in flight ping data to notification channel
- bw *bufio.Writer
br *bufio.Reader
- fr *Framer
lastActive time.Time
lastIdle time.Time // time last idle
- // Settings from peer: (also guarded by mu)
+ // Settings from peer: (also guarded by wmu)
maxFrameSize uint32
maxConcurrentStreams uint32
peerMaxHeaderListSize uint64
initialWindowSize uint32
+ // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests.
+ // Write to reqHeaderMu to lock it, read from it to unlock.
+ // Lock reqmu BEFORE mu or wmu.
+ reqHeaderMu chan struct{}
+
+ // wmu is held while writing.
+ // Acquire BEFORE mu when holding both, to avoid blocking mu on network writes.
+ // Only acquire both at the same time when changing peer settings.
+ wmu sync.Mutex
+ bw *bufio.Writer
+ fr *Framer
+ werr error // first write error that has occurred
hbuf bytes.Buffer // HPACK encoder writes into this
henc *hpack.Encoder
-
- wmu sync.Mutex // held while writing; acquire AFTER mu if holding both
- werr error // first write error that has occurred
}
// clientStream is the state for a single HTTP/2 stream. One of these
@@ -289,52 +304,42 @@ type clientStream struct {
req *http.Request
trace *httptrace.ClientTrace // or nil
ID uint32
- resc chan resAndError
bufPipe pipe // buffered pipe with the flow-controlled response payload
- startedWrite bool // started request body write; guarded by cc.mu
requestedGzip bool
- on100 func() // optional code to run if get a 100 continue response
+
+ abortOnce sync.Once
+ abort chan struct{} // closed to signal stream should end immediately
+ abortErr error // set if abort is closed
+
+ peerClosed chan struct{} // closed when the peer sends an END_STREAM flag
+ donec chan struct{} // closed after the stream is in the closed state
+ on100 chan struct{} // buffered; written to if a 100 is received
+
+ respHeaderRecv chan struct{} // closed when headers are received
+ res *http.Response // set if respHeaderRecv is closed
flow flow // guarded by cc.mu
inflow flow // guarded by cc.mu
bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read
readErr error // sticky read error; owned by transportResponseBody.Read
stopReqBody error // if non-nil, stop writing req body; guarded by cc.mu
- didReset bool // whether we sent a RST_STREAM to the server; guarded by cc.mu
-
- peerReset chan struct{} // closed on peer reset
- resetErr error // populated before peerReset is closed
- done chan struct{} // closed when stream remove from cc.streams map; close calls guarded by cc.mu
+ // owned by writeRequest:
+ sentEndStream bool // sent an END_STREAM flag to the peer
+ sentHeaders bool
// owned by clientConnReadLoop:
firstByte bool // got the first response byte
pastHeaders bool // got first MetaHeadersFrame (actual headers)
pastTrailers bool // got optional second MetaHeadersFrame (trailers)
num1xx uint8 // number of 1xx responses seen
+ readClosed bool // peer sent an END_STREAM flag
+ readAborted bool // read loop reset the stream
trailer http.Header // accumulated trailers
resTrailer *http.Header // client's Response.Trailer
}
-// awaitRequestCancel waits for the user to cancel a request or for the done
-// channel to be signaled. A non-nil error is returned only if the request was
-// canceled.
-func awaitRequestCancel(req *http.Request, done <-chan struct{}) error {
- ctx := req.Context()
- if req.Cancel == nil && ctx.Done() == nil {
- return nil
- }
- select {
- case <-req.Cancel:
- return errRequestCanceled
- case <-ctx.Done():
- return ctx.Err()
- case <-done:
- return nil
- }
-}
-
var got1xxFuncForTests func(int, textproto.MIMEHeader) error
// get1xxTraceFunc returns the value of request's httptrace.ClientTrace.Got1xxResponse func,
@@ -346,50 +351,24 @@ func (cs *clientStream) get1xxTraceFunc() func(int, textproto.MIMEHeader) error
return traceGot1xxResponseFunc(cs.trace)
}
-// awaitRequestCancel waits for the user to cancel a request, its context to
-// expire, or for the request to be done (any way it might be removed from the
-// cc.streams map: peer reset, successful completion, TCP connection breakage,
-// etc). If the request is canceled, then cs will be canceled and closed.
-func (cs *clientStream) awaitRequestCancel(req *http.Request) {
- if err := awaitRequestCancel(req, cs.done); err != nil {
- cs.cancelStream()
- cs.bufPipe.CloseWithError(err)
- }
-}
-
-func (cs *clientStream) cancelStream() {
- cc := cs.cc
- cc.mu.Lock()
- didReset := cs.didReset
- cs.didReset = true
- cc.mu.Unlock()
-
- if !didReset {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- cc.forgetStreamID(cs.ID)
- }
+func (cs *clientStream) abortStream(err error) {
+ cs.cc.mu.Lock()
+ defer cs.cc.mu.Unlock()
+ cs.abortStreamLocked(err)
}
-// checkResetOrDone reports any error sent in a RST_STREAM frame by the
-// server, or errStreamClosed if the stream is complete.
-func (cs *clientStream) checkResetOrDone() error {
- select {
- case <-cs.peerReset:
- return cs.resetErr
- case <-cs.done:
- return errStreamClosed
- default:
- return nil
+func (cs *clientStream) abortStreamLocked(err error) {
+ cs.abortOnce.Do(func() {
+ cs.abortErr = err
+ close(cs.abort)
+ })
+ // TODO(dneil): Clean up tests where cs.cc.cond is nil.
+ if cs.cc.cond != nil {
+ // Wake up writeRequestBody if it is waiting on flow control.
+ cs.cc.cond.Broadcast()
}
}
-func (cs *clientStream) getStartedWrite() bool {
- cc := cs.cc
- cc.mu.Lock()
- defer cc.mu.Unlock()
- return cs.startedWrite
-}
-
func (cs *clientStream) abortRequestBodyWrite(err error) {
if err == nil {
panic("nil error")
@@ -398,9 +377,6 @@ func (cs *clientStream) abortRequestBodyWrite(err error) {
cc.mu.Lock()
if cs.stopReqBody == nil {
cs.stopReqBody = err
- if cs.req.Body != nil {
- cs.req.Body.Close()
- }
cc.cond.Broadcast()
}
cc.mu.Unlock()
@@ -490,10 +466,9 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
}
reused := !atomic.CompareAndSwapUint32(&cc.reused, 0, 1)
traceGotConn(req, cc, reused)
- body := req.Body
- res, gotErrAfterReqBodyWrite, err := cc.roundTrip(req)
+ res, err := cc.RoundTrip(req)
if err != nil && retry <= 6 {
- if req, err = shouldRetryRequest(req, err, gotErrAfterReqBodyWrite); err == nil {
+ if req, err = shouldRetryRequest(req, err); err == nil {
// After the first retry, do exponential backoff with 10% jitter.
if retry == 0 {
continue
@@ -510,11 +485,6 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
}
if err != nil {
t.vlogf("RoundTrip failure: %v", err)
- // If the error occurred after the body write started,
- // the body writer will close the body. Otherwise, do so here.
- if body != nil && !gotErrAfterReqBodyWrite {
- body.Close()
- }
return nil, err
}
return res, nil
@@ -540,7 +510,7 @@ var (
// response headers. It is always called with a non-nil error.
// It returns either a request to retry (either the same request, or a
// modified clone), or an error if the request can't be replayed.
-func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*http.Request, error) {
+func shouldRetryRequest(req *http.Request, err error) (*http.Request, error) {
if !canRetryError(err) {
return nil, err
}
@@ -553,7 +523,6 @@ func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*htt
// If the request body can be reset back to its original
// state via the optional req.GetBody, do that.
if req.GetBody != nil {
- req.Body.Close()
body, err := req.GetBody()
if err != nil {
return nil, err
@@ -565,10 +534,8 @@ func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*htt
// The Request.Body can't reset back to the beginning, but we
// don't seem to have started to read from it yet, so reuse
- // the request directly. The "afterBodyWrite" means the
- // bodyWrite process has started, which becomes true before
- // the first Read.
- if !afterBodyWrite {
+ // the request directly.
+ if err == errClientConnUnusable {
return req, nil
}
@@ -666,6 +633,7 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
singleUse: singleUse,
wantSettingsAck: true,
pings: make(map[[8]byte]chan struct{}),
+ reqHeaderMu: make(chan struct{}, 1),
}
if d := t.idleConnTimeout(); d != 0 {
cc.idleTimeout = d
@@ -683,6 +651,9 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
cc.bw = bufio.NewWriter(stickyErrWriter{c, &cc.werr})
cc.br = bufio.NewReader(c)
cc.fr = NewFramer(cc.bw, cc.br)
+ if t.CountError != nil {
+ cc.fr.countError = t.CountError
+ }
cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
cc.fr.MaxHeaderListSize = t.maxHeaderListSize()
@@ -759,27 +730,39 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) {
last := f.LastStreamID
for streamID, cs := range cc.streams {
if streamID > last {
- select {
- case cs.resc <- resAndError{err: errClientConnGotGoAway}:
- default:
- }
+ cs.abortStreamLocked(errClientConnGotGoAway)
}
}
}
// CanTakeNewRequest reports whether the connection can take a new request,
// meaning it has not been closed or received or sent a GOAWAY.
+//
+// If the caller is going to immediately make a new request on this
+// connection, use ReserveNewRequest instead.
func (cc *ClientConn) CanTakeNewRequest() bool {
cc.mu.Lock()
defer cc.mu.Unlock()
return cc.canTakeNewRequestLocked()
}
+// ReserveNewRequest is like CanTakeNewRequest but also reserves a
+// concurrent stream in cc. The reservation is decremented on the
+// next call to RoundTrip.
+func (cc *ClientConn) ReserveNewRequest() bool {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ if st := cc.idleStateLocked(); !st.canTakeNewRequest {
+ return false
+ }
+ cc.streamsReserved++
+ return true
+}
+
// clientConnIdleState describes the suitability of a client
// connection to initiate a new RoundTrip request.
type clientConnIdleState struct {
canTakeNewRequest bool
- freshConn bool // whether it's unused by any previous request
}
func (cc *ClientConn) idleState() clientConnIdleState {
@@ -800,14 +783,13 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
// writing it.
maxConcurrentOkay = true
} else {
- maxConcurrentOkay = int64(len(cc.streams)+1) <= int64(cc.maxConcurrentStreams)
+ maxConcurrentOkay = int64(len(cc.streams)+cc.streamsReserved+1) <= int64(cc.maxConcurrentStreams)
}
st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay &&
!cc.doNotReuse &&
int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 &&
!cc.tooIdleLocked()
- st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest
return
}
@@ -838,7 +820,7 @@ func (cc *ClientConn) onIdleTimeout() {
func (cc *ClientConn) closeIfIdle() {
cc.mu.Lock()
- if len(cc.streams) > 0 {
+ if len(cc.streams) > 0 || cc.streamsReserved > 0 {
cc.mu.Unlock()
return
}
@@ -853,9 +835,15 @@ func (cc *ClientConn) closeIfIdle() {
cc.tconn.Close()
}
+func (cc *ClientConn) isDoNotReuseAndIdle() bool {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ return cc.doNotReuse && len(cc.streams) == 0
+}
+
var shutdownEnterWaitStateHook = func() {}
-// Shutdown gracefully close the client connection, waiting for running streams to complete.
+// Shutdown gracefully closes the client connection, waiting for running streams to complete.
func (cc *ClientConn) Shutdown(ctx context.Context) error {
if err := cc.sendGoAway(); err != nil {
return err
@@ -894,15 +882,18 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
func (cc *ClientConn) sendGoAway() error {
cc.mu.Lock()
- defer cc.mu.Unlock()
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
- if cc.closing {
+ closing := cc.closing
+ cc.closing = true
+ maxStreamID := cc.nextStreamID
+ cc.mu.Unlock()
+ if closing {
// GOAWAY sent already
return nil
}
+
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
// Send a graceful shutdown frame to server
- maxStreamID := cc.nextStreamID
if err := cc.fr.WriteGoAway(maxStreamID, ErrCodeNo, nil); err != nil {
return err
}
@@ -910,7 +901,6 @@ func (cc *ClientConn) sendGoAway() error {
return err
}
// Prevent new requests
- cc.closing = true
return nil
}
@@ -918,17 +908,12 @@ func (cc *ClientConn) sendGoAway() error {
// err is sent to streams.
func (cc *ClientConn) closeForError(err error) error {
cc.mu.Lock()
+ cc.closed = true
+ for _, cs := range cc.streams {
+ cs.abortStreamLocked(err)
+ }
defer cc.cond.Broadcast()
defer cc.mu.Unlock()
- for id, cs := range cc.streams {
- select {
- case cs.resc <- resAndError{err: err}:
- default:
- }
- cs.bufPipe.CloseWithError(err)
- delete(cc.streams, id)
- }
- cc.closed = true
return cc.tconn.Close()
}
@@ -943,6 +928,9 @@ func (cc *ClientConn) Close() error {
// closes the client connection immediately. In-flight requests are interrupted.
func (cc *ClientConn) closeForLostPing() error {
err := errors.New("http2: client connection lost")
+ if f := cc.t.CountError; f != nil {
+ f("conn_close_lost_ping")
+ }
return cc.closeForError(err)
}
@@ -1007,37 +995,132 @@ func actualContentLength(req *http.Request) int64 {
return -1
}
-func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
- resp, _, err := cc.roundTrip(req)
- return resp, err
+func (cc *ClientConn) decrStreamReservations() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ cc.decrStreamReservationsLocked()
}
-func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAfterReqBodyWrite bool, err error) {
- if err := checkConnHeaders(req); err != nil {
- return nil, false, err
+func (cc *ClientConn) decrStreamReservationsLocked() {
+ if cc.streamsReserved > 0 {
+ cc.streamsReserved--
}
- if cc.idleTimer != nil {
- cc.idleTimer.Stop()
+}
+
+func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
+ ctx := req.Context()
+ cs := &clientStream{
+ cc: cc,
+ req: req,
+ trace: httptrace.ContextClientTrace(req.Context()),
+ peerClosed: make(chan struct{}),
+ abort: make(chan struct{}),
+ respHeaderRecv: make(chan struct{}),
+ donec: make(chan struct{}),
}
+ go cs.doRequest()
- trailers, err := commaSeparatedTrailers(req)
- if err != nil {
- return nil, false, err
+ waitDone := func() error {
+ select {
+ case <-cs.donec:
+ return nil
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-req.Cancel:
+ return errRequestCanceled
+ }
+ }
+
+ for {
+ select {
+ case <-cs.respHeaderRecv:
+ res := cs.res
+ if res.StatusCode > 299 {
+ // On error or status code 3xx, 4xx, 5xx, etc abort any
+ // ongoing write, assuming that the server doesn't care
+ // about our request body. If the server replied with 1xx or
+ // 2xx, however, then assume the server DOES potentially
+ // want our body (e.g. full-duplex streaming:
+ // golang.org/issue/13444). If it turns out the server
+ // doesn't, they'll RST_STREAM us soon enough. This is a
+ // heuristic to avoid adding knobs to Transport. Hopefully
+ // we can keep it.
+ cs.abortRequestBodyWrite(errStopReqBodyWrite)
+ }
+ res.Request = req
+ res.TLS = cc.tlsState
+ if res.Body == noBody && actualContentLength(req) == 0 {
+ // If there isn't a request or response body still being
+ // written, then wait for the stream to be closed before
+ // RoundTrip returns.
+ if err := waitDone(); err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+ case <-cs.abort:
+ waitDone()
+ return nil, cs.abortErr
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case <-req.Cancel:
+ return nil, errRequestCanceled
+ }
+ }
+}
+
+// doRequest runs for the duration of the request lifetime.
+//
+// It sends the request and performs post-request cleanup (closing Request.Body, etc.).
+func (cs *clientStream) doRequest() {
+ err := cs.writeRequest()
+ cs.cleanupWriteRequest(err)
+}
+
+// writeRequest sends a request.
+//
+// It returns nil after the request is written, the response read,
+// and the request stream is half-closed by the peer.
+//
+// It returns non-nil if the request ends otherwise.
+// If the returned error is StreamError, the error Code may be used in resetting the stream.
+func (cs *clientStream) writeRequest() (err error) {
+ cc := cs.cc
+ req := cs.req
+ ctx := req.Context()
+
+ if err := checkConnHeaders(cs.req); err != nil {
+ return err
+ }
+
+ // Acquire the new-request lock by writing to reqHeaderMu.
+ // This lock guards the critical section covering allocating a new stream ID
+ // (requires mu) and creating the stream (requires wmu).
+ if cc.reqHeaderMu == nil {
+ panic("RoundTrip on uninitialized ClientConn") // for tests
+ }
+ select {
+ case cc.reqHeaderMu <- struct{}{}:
+ case <-req.Cancel:
+ return errRequestCanceled
+ case <-ctx.Done():
+ return ctx.Err()
}
- hasTrailers := trailers != ""
cc.mu.Lock()
- if err := cc.awaitOpenSlotForRequest(req); err != nil {
+ if cc.idleTimer != nil {
+ cc.idleTimer.Stop()
+ }
+ cc.decrStreamReservationsLocked()
+ if err := cc.awaitOpenSlotForStreamLocked(cs); err != nil {
cc.mu.Unlock()
- return nil, false, err
+ <-cc.reqHeaderMu
+ return err
}
-
- body := req.Body
- contentLen := actualContentLength(req)
- hasBody := contentLen != 0
+ cc.addStreamLocked(cs) // assigns stream ID
+ cc.mu.Unlock()
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
- var requestedGzip bool
if !cc.t.disableCompression() &&
req.Header.Get("Accept-Encoding") == "" &&
req.Header.Get("Range") == "" &&
@@ -1054,184 +1137,218 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf
// We don't request gzip if the request is for a range, since
// auto-decoding a portion of a gzipped document will just fail
// anyway. See https://golang.org/issue/8923
- requestedGzip = true
+ cs.requestedGzip = true
}
- // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is
- // sent by writeRequestBody below, along with any Trailers,
- // again in form HEADERS{1}, CONTINUATION{0,})
- hdrs, err := cc.encodeHeaders(req, requestedGzip, trailers, contentLen)
- if err != nil {
- cc.mu.Unlock()
- return nil, false, err
+ continueTimeout := cc.t.expectContinueTimeout()
+ if continueTimeout != 0 &&
+ !httpguts.HeaderValuesContainsToken(
+ cs.req.Header["Expect"],
+ "100-continue") {
+ continueTimeout = 0
+ cs.on100 = make(chan struct{}, 1)
}
- cs := cc.newStream()
- cs.req = req
- cs.trace = httptrace.ContextClientTrace(req.Context())
- cs.requestedGzip = requestedGzip
- bodyWriter := cc.t.getBodyWriterState(cs, body)
- cs.on100 = bodyWriter.on100
+ err = cs.encodeAndWriteHeaders()
+ <-cc.reqHeaderMu
+ if err != nil {
+ return err
+ }
- defer func() {
- cc.wmu.Lock()
- werr := cc.werr
- cc.wmu.Unlock()
- if werr != nil {
- cc.Close()
+ hasBody := actualContentLength(cs.req) != 0
+ if !hasBody {
+ cs.sentEndStream = true
+ } else {
+ if continueTimeout != 0 {
+ traceWait100Continue(cs.trace)
+ timer := time.NewTimer(continueTimeout)
+ select {
+ case <-timer.C:
+ err = nil
+ case <-cs.on100:
+ err = nil
+ case <-cs.abort:
+ err = cs.abortErr
+ case <-ctx.Done():
+ err = ctx.Err()
+ case <-req.Cancel:
+ err = errRequestCanceled
+ }
+ timer.Stop()
+ if err != nil {
+ traceWroteRequest(cs.trace, err)
+ return err
+ }
}
- }()
- cc.wmu.Lock()
- endStream := !hasBody && !hasTrailers
- werr := cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs)
- cc.wmu.Unlock()
- traceWroteHeaders(cs.trace)
- cc.mu.Unlock()
-
- if werr != nil {
- if hasBody {
- bodyWriter.cancel()
+ if err = cs.writeRequestBody(req.Body); err != nil {
+ if err != errStopReqBodyWrite {
+ traceWroteRequest(cs.trace, err)
+ return err
+ }
+ } else {
+ cs.sentEndStream = true
}
- cc.forgetStreamID(cs.ID)
- // Don't bother sending a RST_STREAM (our write already failed;
- // no need to keep writing)
- traceWroteRequest(cs.trace, werr)
- // TODO(dneil): An error occurred while writing the headers.
- // Should we return an error indicating that this request can be retried?
- return nil, false, werr
}
+ traceWroteRequest(cs.trace, err)
+
var respHeaderTimer <-chan time.Time
- if hasBody {
- bodyWriter.scheduleBodyWrite()
- } else {
- traceWroteRequest(cs.trace, nil)
- if d := cc.responseHeaderTimeout(); d != 0 {
- timer := time.NewTimer(d)
- defer timer.Stop()
- respHeaderTimer = timer.C
+ var respHeaderRecv chan struct{}
+ if d := cc.responseHeaderTimeout(); d != 0 {
+ timer := time.NewTimer(d)
+ defer timer.Stop()
+ respHeaderTimer = timer.C
+ respHeaderRecv = cs.respHeaderRecv
+ }
+ // Wait until the peer half-closes its end of the stream,
+ // or until the request is aborted (via context, error, or otherwise),
+ // whichever comes first.
+ for {
+ select {
+ case <-cs.peerClosed:
+ return nil
+ case <-respHeaderTimer:
+ return errTimeout
+ case <-respHeaderRecv:
+ respHeaderTimer = nil // keep waiting for END_STREAM
+ case <-cs.abort:
+ return cs.abortErr
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-req.Cancel:
+ return errRequestCanceled
}
}
+}
- readLoopResCh := cs.resc
- bodyWritten := false
+func (cs *clientStream) encodeAndWriteHeaders() error {
+ cc := cs.cc
+ req := cs.req
ctx := req.Context()
- handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) {
- res := re.res
- if re.err != nil || res.StatusCode > 299 {
- // On error or status code 3xx, 4xx, 5xx, etc abort any
- // ongoing write, assuming that the server doesn't care
- // about our request body. If the server replied with 1xx or
- // 2xx, however, then assume the server DOES potentially
- // want our body (e.g. full-duplex streaming:
- // golang.org/issue/13444). If it turns out the server
- // doesn't, they'll RST_STREAM us soon enough. This is a
- // heuristic to avoid adding knobs to Transport. Hopefully
- // we can keep it.
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWrite)
- if hasBody && !bodyWritten {
- <-bodyWriter.resc
- }
- }
- if re.err != nil {
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), re.err
- }
- res.Request = req
- res.TLS = cc.tlsState
- return res, false, nil
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
+
+ // If the request was canceled while waiting for cc.mu, just quit.
+ select {
+ case <-cs.abort:
+ return cs.abortErr
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-req.Cancel:
+ return errRequestCanceled
+ default:
}
- handleError := func(err error) (*http.Response, bool, error) {
- if !hasBody || bodyWritten {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- } else {
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel)
- <-bodyWriter.resc
+ // Encode headers.
+ //
+ // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is
+ // sent by writeRequestBody below, along with any Trailers,
+ // again in form HEADERS{1}, CONTINUATION{0,})
+ trailers, err := commaSeparatedTrailers(cs.req)
+ if err != nil {
+ return err
+ }
+ hasTrailers := trailers != ""
+ contentLen := actualContentLength(cs.req)
+ hasBody := contentLen != 0
+ hdrs, err := cc.encodeHeaders(cs.req, cs.requestedGzip, trailers, contentLen)
+ if err != nil {
+ return err
+ }
+
+ // Write the request.
+ endStream := !hasBody && !hasTrailers
+ cs.sentHeaders = true
+ err = cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs)
+ traceWroteHeaders(cs.trace)
+ return err
+}
+
+// cleanupWriteRequest performs post-request tasks.
+//
+// If err (the result of writeRequest) is non-nil and the stream is not closed,
+// cleanupWriteRequest will send a reset to the peer.
+func (cs *clientStream) cleanupWriteRequest(err error) {
+ cc := cs.cc
+ req := cs.req
+
+ if cs.ID == 0 {
+ // We were canceled before creating the stream, so return our reservation.
+ cc.decrStreamReservations()
+ }
+
+ // TODO: write h12Compare test showing whether
+ // Request.Body is closed by the Transport,
+ // and in multiple cases: server replies <=299 and >299
+ // while still writing request body
+ if req.Body != nil {
+ if e := req.Body.Close(); err == nil {
+ err = e
}
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), err
}
- for {
+ if err != nil && cs.sentEndStream {
+ // If the connection is closed immediately after the response is read,
+ // we may be aborted before finishing up here. If the stream was closed
+ // cleanly on both sides, there is no error.
select {
- case re := <-readLoopResCh:
- return handleReadLoopResponse(re)
- case <-respHeaderTimer:
- return handleError(errTimeout)
- case <-ctx.Done():
- return handleError(ctx.Err())
- case <-req.Cancel:
- return handleError(errRequestCanceled)
- case <-cs.peerReset:
- // processResetStream already removed the
- // stream from the streams map; no need for
- // forgetStreamID.
- return nil, cs.getStartedWrite(), cs.resetErr
- case err := <-bodyWriter.resc:
- bodyWritten = true
- // Prefer the read loop's response, if available. Issue 16102.
- select {
- case re := <-readLoopResCh:
- return handleReadLoopResponse(re)
- default:
- }
- if err != nil {
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), err
- }
- if d := cc.responseHeaderTimeout(); d != 0 {
- timer := time.NewTimer(d)
- defer timer.Stop()
- respHeaderTimer = timer.C
+ case <-cs.peerClosed:
+ err = nil
+ default:
+ }
+ }
+ if err != nil {
+ cs.abortStream(err) // possibly redundant, but harmless
+ if cs.sentHeaders {
+ if se, ok := err.(StreamError); ok {
+ if se.Cause != errFromPeer {
+ cc.writeStreamReset(cs.ID, se.Code, err)
+ }
+ } else {
+ cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
}
}
+ cs.bufPipe.CloseWithError(err) // no-op if already closed
+ } else {
+ if cs.sentHeaders && !cs.sentEndStream {
+ cc.writeStreamReset(cs.ID, ErrCodeNo, nil)
+ }
+ cs.bufPipe.CloseWithError(errRequestCanceled)
+ }
+ if cs.ID != 0 {
+ cc.forgetStreamID(cs.ID)
+ }
+ close(cs.donec)
+
+ cc.wmu.Lock()
+ werr := cc.werr
+ cc.wmu.Unlock()
+ if werr != nil {
+ cc.Close()
}
}
-// awaitOpenSlotForRequest waits until len(streams) < maxConcurrentStreams.
+// awaitOpenSlotForStream waits until len(streams) < maxConcurrentStreams.
// Must hold cc.mu.
-func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error {
- var waitingForConn chan struct{}
- var waitingForConnErr error // guarded by cc.mu
+func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error {
for {
cc.lastActive = time.Now()
if cc.closed || !cc.canTakeNewRequestLocked() {
- if waitingForConn != nil {
- close(waitingForConn)
- }
return errClientConnUnusable
}
cc.lastIdle = time.Time{}
if int64(len(cc.streams)) < int64(cc.maxConcurrentStreams) {
- if waitingForConn != nil {
- close(waitingForConn)
- }
return nil
}
- // Unfortunately, we cannot wait on a condition variable and channel at
- // the same time, so instead, we spin up a goroutine to check if the
- // request is canceled while we wait for a slot to open in the connection.
- if waitingForConn == nil {
- waitingForConn = make(chan struct{})
- go func() {
- if err := awaitRequestCancel(req, waitingForConn); err != nil {
- cc.mu.Lock()
- waitingForConnErr = err
- cc.cond.Broadcast()
- cc.mu.Unlock()
- }
- }()
- }
cc.pendingRequests++
cc.cond.Wait()
cc.pendingRequests--
- if waitingForConnErr != nil {
- return waitingForConnErr
+ select {
+ case <-cs.abort:
+ return cs.abortErr
+ default:
}
}
}
@@ -1258,10 +1375,6 @@ func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, maxFrameSize
cc.fr.WriteContinuation(streamID, endHeaders, chunk)
}
}
- // TODO(bradfitz): this Flush could potentially block (as
- // could the WriteHeaders call(s) above), which means they
- // wouldn't respond to Request.Cancel being readable. That's
- // rare, but this should probably be in a goroutine.
cc.bw.Flush()
return cc.werr
}
@@ -1303,28 +1416,10 @@ func (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int {
var bufPool sync.Pool // of *[]byte
-func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (err error) {
+func (cs *clientStream) writeRequestBody(body io.Reader) (err error) {
cc := cs.cc
sentEnd := false // whether we sent the final DATA frame w/ END_STREAM
- defer func() {
- traceWroteRequest(cs.trace, err)
- // TODO: write h12Compare test showing whether
- // Request.Body is closed by the Transport,
- // and in multiple cases: server replies <=299 and >299
- // while still writing request body
- var cerr error
- cc.mu.Lock()
- if cs.stopReqBody == nil {
- cs.stopReqBody = errStopReqBodyWrite
- cerr = bodyCloser.Close()
- }
- cc.mu.Unlock()
- if err == nil {
- err = cerr
- }
- }()
-
req := cs.req
hasTrailers := req.Trailer != nil
remainLen := actualContentLength(req)
@@ -1365,7 +1460,6 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
}
if remainLen < 0 {
err = errReqBodyTooLong
- cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
return err
}
}
@@ -1373,7 +1467,6 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
sawEOF = true
err = nil
} else if err != nil {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
return err
}
@@ -1385,7 +1478,6 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
case err == errStopReqBodyWrite:
return err
case err == errStopReqBodyWriteAndCancel:
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
return err
case err != nil:
return err
@@ -1418,19 +1510,15 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
return nil
}
+ cc.wmu.Lock()
var trls []byte
if hasTrailers {
- cc.mu.Lock()
trls, err = cc.encodeTrailers(req)
- cc.mu.Unlock()
if err != nil {
- cc.writeStreamReset(cs.ID, ErrCodeInternal, err)
- cc.forgetStreamID(cs.ID)
+ cc.wmu.Unlock()
return err
}
}
-
- cc.wmu.Lock()
defer cc.wmu.Unlock()
// Two ways to send END_STREAM: either with trailers, or
@@ -1452,6 +1540,8 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
// if the stream is dead.
func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) {
cc := cs.cc
+ req := cs.req
+ ctx := req.Context()
cc.mu.Lock()
defer cc.mu.Unlock()
for {
@@ -1461,8 +1551,14 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
if cs.stopReqBody != nil {
return 0, cs.stopReqBody
}
- if err := cs.checkResetOrDone(); err != nil {
- return 0, err
+ select {
+ case <-cs.abort:
+ return 0, cs.abortErr
+ case <-ctx.Done():
+ return 0, ctx.Err()
+ case <-req.Cancel:
+ return 0, errRequestCanceled
+ default:
}
if a := cs.flow.available(); a > 0 {
take := a
@@ -1480,9 +1576,14 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
}
}
-// requires cc.mu be held.
+var errNilRequestURL = errors.New("http2: Request.URI is nil")
+
+// requires cc.wmu be held.
func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) {
cc.hbuf.Reset()
+ if req.URL == nil {
+ return nil, errNilRequestURL
+ }
host := req.Host
if host == "" {
@@ -1668,7 +1769,7 @@ func shouldSendReqContentLength(method string, contentLength int64) bool {
}
}
-// requires cc.mu be held.
+// requires cc.wmu be held.
func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) {
cc.hbuf.Reset()
@@ -1713,51 +1814,51 @@ type resAndError struct {
}
// requires cc.mu be held.
-func (cc *ClientConn) newStream() *clientStream {
- cs := &clientStream{
- cc: cc,
- ID: cc.nextStreamID,
- resc: make(chan resAndError, 1),
- peerReset: make(chan struct{}),
- done: make(chan struct{}),
- }
+func (cc *ClientConn) addStreamLocked(cs *clientStream) {
cs.flow.add(int32(cc.initialWindowSize))
cs.flow.setConnFlow(&cc.flow)
cs.inflow.add(transportDefaultStreamFlow)
cs.inflow.setConnFlow(&cc.inflow)
+ cs.ID = cc.nextStreamID
cc.nextStreamID += 2
cc.streams[cs.ID] = cs
- return cs
+ if cs.ID == 0 {
+ panic("assigned stream ID 0")
+ }
}
func (cc *ClientConn) forgetStreamID(id uint32) {
- cc.streamByID(id, true)
-}
-
-func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream {
cc.mu.Lock()
- defer cc.mu.Unlock()
- cs := cc.streams[id]
- if andRemove && cs != nil && !cc.closed {
- cc.lastActive = time.Now()
- delete(cc.streams, id)
- if len(cc.streams) == 0 && cc.idleTimer != nil {
- cc.idleTimer.Reset(cc.idleTimeout)
- cc.lastIdle = time.Now()
- }
- close(cs.done)
- // Wake up checkResetOrDone via clientStream.awaitFlowControl and
- // wake up RoundTrip if there is a pending request.
- cc.cond.Broadcast()
+ slen := len(cc.streams)
+ delete(cc.streams, id)
+ if len(cc.streams) != slen-1 {
+ panic("forgetting unknown stream id")
+ }
+ cc.lastActive = time.Now()
+ if len(cc.streams) == 0 && cc.idleTimer != nil {
+ cc.idleTimer.Reset(cc.idleTimeout)
+ cc.lastIdle = time.Now()
+ }
+ // Wake up writeRequestBody via clientStream.awaitFlowControl and
+ // wake up RoundTrip if there is a pending request.
+ cc.cond.Broadcast()
+
+ closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives()
+ if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
+ if VerboseLogs {
+ cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2)
+ }
+ cc.closed = true
+ defer cc.tconn.Close()
}
- return cs
+
+ cc.mu.Unlock()
}
// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop.
type clientConnReadLoop struct {
- _ incomparable
- cc *ClientConn
- closeWhenIdle bool
+ _ incomparable
+ cc *ClientConn
}
// readLoop runs in its own goroutine and reads and dispatches frames.
@@ -1817,23 +1918,43 @@ func (rl *clientConnReadLoop) cleanup() {
} else if err == io.EOF {
err = io.ErrUnexpectedEOF
}
+ cc.closed = true
for _, cs := range cc.streams {
- cs.bufPipe.CloseWithError(err) // no-op if already closed
- select {
- case cs.resc <- resAndError{err: err}:
- default:
- }
- close(cs.done)
+ cs.abortStreamLocked(err)
}
- cc.closed = true
cc.cond.Broadcast()
cc.mu.Unlock()
}
+// countReadFrameError calls Transport.CountError with a string
+// representing err.
+func (cc *ClientConn) countReadFrameError(err error) {
+ f := cc.t.CountError
+ if f == nil || err == nil {
+ return
+ }
+ if ce, ok := err.(ConnectionError); ok {
+ errCode := ErrCode(ce)
+ f(fmt.Sprintf("read_frame_conn_error_%s", errCode.stringToken()))
+ return
+ }
+ if errors.Is(err, io.EOF) {
+ f("read_frame_eof")
+ return
+ }
+ if errors.Is(err, io.ErrUnexpectedEOF) {
+ f("read_frame_unexpected_eof")
+ return
+ }
+ if errors.Is(err, ErrFrameTooLarge) {
+ f("read_frame_too_large")
+ return
+ }
+ f("read_frame_other")
+}
+
func (rl *clientConnReadLoop) run() error {
cc := rl.cc
- rl.closeWhenIdle = cc.t.disableKeepAlives() || cc.singleUse
- gotReply := false // ever saw a HEADERS reply
gotSettings := false
readIdleTimeout := cc.t.ReadIdleTimeout
var t *time.Timer
@@ -1850,9 +1971,7 @@ func (rl *clientConnReadLoop) run() error {
cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err)
}
if se, ok := err.(StreamError); ok {
- if cs := cc.streamByID(se.StreamID, false); cs != nil {
- cs.cc.writeStreamReset(cs.ID, se.Code, err)
- cs.cc.forgetStreamID(cs.ID)
+ if cs := rl.streamByID(se.StreamID); cs != nil {
if se.Cause == nil {
se.Cause = cc.fr.errDetail
}
@@ -1860,6 +1979,7 @@ func (rl *clientConnReadLoop) run() error {
}
continue
} else if err != nil {
+ cc.countReadFrameError(err)
return err
}
if VerboseLogs {
@@ -1872,22 +1992,16 @@ func (rl *clientConnReadLoop) run() error {
}
gotSettings = true
}
- maybeIdle := false // whether frame might transition us to idle
switch f := f.(type) {
case *MetaHeadersFrame:
err = rl.processHeaders(f)
- maybeIdle = true
- gotReply = true
case *DataFrame:
err = rl.processData(f)
- maybeIdle = true
case *GoAwayFrame:
err = rl.processGoAway(f)
- maybeIdle = true
case *RSTStreamFrame:
err = rl.processResetStream(f)
- maybeIdle = true
case *SettingsFrame:
err = rl.processSettings(f)
case *PushPromiseFrame:
@@ -1905,38 +2019,24 @@ func (rl *clientConnReadLoop) run() error {
}
return err
}
- if rl.closeWhenIdle && gotReply && maybeIdle {
- cc.closeIfIdle()
- }
}
}
func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
- cc := rl.cc
- cs := cc.streamByID(f.StreamID, false)
+ cs := rl.streamByID(f.StreamID)
if cs == nil {
// We'd get here if we canceled a request while the
// server had its response still in flight. So if this
// was just something we canceled, ignore it.
return nil
}
- if f.StreamEnded() {
- // Issue 20521: If the stream has ended, streamByID() causes
- // clientStream.done to be closed, which causes the request's bodyWriter
- // to be closed with an errStreamClosed, which may be received by
- // clientConn.RoundTrip before the result of processing these headers.
- // Deferring stream closure allows the header processing to occur first.
- // clientConn.RoundTrip may still receive the bodyWriter error first, but
- // the fix for issue 16102 prioritises any response.
- //
- // Issue 22413: If there is no request body, we should close the
- // stream before writing to cs.resc so that the stream is closed
- // immediately once RoundTrip returns.
- if cs.req.Body != nil {
- defer cc.forgetStreamID(f.StreamID)
- } else {
- cc.forgetStreamID(f.StreamID)
- }
+ if cs.readClosed {
+ rl.endStreamError(cs, StreamError{
+ StreamID: f.StreamID,
+ Code: ErrCodeProtocol,
+ Cause: errors.New("protocol error: headers after END_STREAM"),
+ })
+ return nil
}
if !cs.firstByte {
if cs.trace != nil {
@@ -1960,9 +2060,11 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
return err
}
// Any other error type is a stream error.
- cs.cc.writeStreamReset(f.StreamID, ErrCodeProtocol, err)
- cc.forgetStreamID(cs.ID)
- cs.resc <- resAndError{err: err}
+ rl.endStreamError(cs, StreamError{
+ StreamID: f.StreamID,
+ Code: ErrCodeProtocol,
+ Cause: err,
+ })
return nil // return nil from process* funcs to keep conn alive
}
if res == nil {
@@ -1970,7 +2072,11 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
return nil
}
cs.resTrailer = &res.Trailer
- cs.resc <- resAndError{res: res}
+ cs.res = res
+ close(cs.respHeaderRecv)
+ if f.StreamEnded() {
+ rl.endStream(cs)
+ }
return nil
}
@@ -2032,6 +2138,9 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
}
if statusCode >= 100 && statusCode <= 199 {
+ if f.StreamEnded() {
+ return nil, errors.New("1xx informational response with END_STREAM flag")
+ }
cs.num1xx++
const max1xxResponses = 5 // arbitrary bound on number of informational responses, same as net/http
if cs.num1xx > max1xxResponses {
@@ -2044,8 +2153,9 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
}
if statusCode == 100 {
traceGot100Continue(cs.trace)
- if cs.on100 != nil {
- cs.on100() // forces any write delay timer to fire
+ select {
+ case cs.on100 <- struct{}{}:
+ default:
}
}
cs.pastHeaders = false // do it all again
@@ -2074,10 +2184,9 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
return res, nil
}
- cs.bufPipe = pipe{b: &dataBuffer{expected: res.ContentLength}}
+ cs.bufPipe.setBuffer(&dataBuffer{expected: res.ContentLength})
cs.bytesRemain = res.ContentLength
res.Body = transportResponseBody{cs}
- go cs.awaitRequestCancel(cs.req)
if cs.requestedGzip && res.Header.Get("Content-Encoding") == "gzip" {
res.Header.Del("Content-Encoding")
@@ -2137,7 +2246,7 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) {
n = int(cs.bytesRemain)
if err == nil {
err = errors.New("net/http: server replied with more than declared Content-Length; truncated")
- cc.writeStreamReset(cs.ID, ErrCodeProtocol, err)
+ cs.abortStream(err)
}
cs.readErr = err
return int(cs.bytesRemain), err
@@ -2155,8 +2264,6 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) {
}
cc.mu.Lock()
- defer cc.mu.Unlock()
-
var connAdd, streamAdd int32
// Check the conn-level first, before the stream-level.
if v := cc.inflow.available(); v < transportDefaultConnFlow/2 {
@@ -2173,6 +2280,8 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) {
cs.inflow.add(streamAdd)
}
}
+ cc.mu.Unlock()
+
if connAdd != 0 || streamAdd != 0 {
cc.wmu.Lock()
defer cc.wmu.Unlock()
@@ -2193,34 +2302,40 @@ func (b transportResponseBody) Close() error {
cs := b.cs
cc := cs.cc
- serverSentStreamEnd := cs.bufPipe.Err() == io.EOF
unread := cs.bufPipe.Len()
-
- if unread > 0 || !serverSentStreamEnd {
+ if unread > 0 {
cc.mu.Lock()
- cc.wmu.Lock()
- if !serverSentStreamEnd {
- cc.fr.WriteRSTStream(cs.ID, ErrCodeCancel)
- cs.didReset = true
- }
// Return connection-level flow control.
if unread > 0 {
cc.inflow.add(int32(unread))
+ }
+ cc.mu.Unlock()
+
+ cc.wmu.Lock()
+ // Return connection-level flow control.
+ if unread > 0 {
cc.fr.WriteWindowUpdate(0, uint32(unread))
}
cc.bw.Flush()
cc.wmu.Unlock()
- cc.mu.Unlock()
}
cs.bufPipe.BreakWithError(errClosedResponseBody)
- cc.forgetStreamID(cs.ID)
+ cs.abortStream(errClosedResponseBody)
+
+ select {
+ case <-cs.donec:
+ case <-cs.req.Context().Done():
+ return cs.req.Context().Err()
+ case <-cs.req.Cancel:
+ return errRequestCanceled
+ }
return nil
}
func (rl *clientConnReadLoop) processData(f *DataFrame) error {
cc := rl.cc
- cs := cc.streamByID(f.StreamID, f.StreamEnded())
+ cs := rl.streamByID(f.StreamID)
data := f.Data()
if cs == nil {
cc.mu.Lock()
@@ -2249,6 +2364,14 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
}
return nil
}
+ if cs.readClosed {
+ cc.logf("protocol error: received DATA after END_STREAM")
+ rl.endStreamError(cs, StreamError{
+ StreamID: f.StreamID,
+ Code: ErrCodeProtocol,
+ })
+ return nil
+ }
if !cs.firstByte {
cc.logf("protocol error: received DATA before a HEADERS frame")
rl.endStreamError(cs, StreamError{
@@ -2280,30 +2403,39 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
if pad := int(f.Length) - len(data); pad > 0 {
refund += pad
}
- // Return len(data) now if the stream is already closed,
- // since data will never be read.
- didReset := cs.didReset
- if didReset {
- refund += len(data)
+
+ didReset := false
+ var err error
+ if len(data) > 0 {
+ if _, err = cs.bufPipe.Write(data); err != nil {
+ // Return len(data) now if the stream is already closed,
+ // since data will never be read.
+ didReset = true
+ refund += len(data)
+ }
}
+
if refund > 0 {
cc.inflow.add(int32(refund))
+ if !didReset {
+ cs.inflow.add(int32(refund))
+ }
+ }
+ cc.mu.Unlock()
+
+ if refund > 0 {
cc.wmu.Lock()
cc.fr.WriteWindowUpdate(0, uint32(refund))
if !didReset {
- cs.inflow.add(int32(refund))
cc.fr.WriteWindowUpdate(cs.ID, uint32(refund))
}
cc.bw.Flush()
cc.wmu.Unlock()
}
- cc.mu.Unlock()
- if len(data) > 0 && !didReset {
- if _, err := cs.bufPipe.Write(data); err != nil {
- rl.endStreamError(cs, err)
- return err
- }
+ if err != nil {
+ rl.endStreamError(cs, err)
+ return nil
}
}
@@ -2316,24 +2448,26 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
func (rl *clientConnReadLoop) endStream(cs *clientStream) {
// TODO: check that any declared content-length matches, like
// server.go's (*stream).endStream method.
- rl.endStreamError(cs, nil)
+ if !cs.readClosed {
+ cs.readClosed = true
+ cs.bufPipe.closeWithErrorAndCode(io.EOF, cs.copyTrailers)
+ close(cs.peerClosed)
+ }
}
func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) {
- var code func()
- if err == nil {
- err = io.EOF
- code = cs.copyTrailers
- }
- if isConnectionCloseRequest(cs.req) {
- rl.closeWhenIdle = true
- }
- cs.bufPipe.closeWithErrorAndCode(err, code)
+ cs.readAborted = true
+ cs.abortStream(err)
+}
- select {
- case cs.resc <- resAndError{err: err}:
- default:
+func (rl *clientConnReadLoop) streamByID(id uint32) *clientStream {
+ rl.cc.mu.Lock()
+ defer rl.cc.mu.Unlock()
+ cs := rl.cc.streams[id]
+ if cs != nil && !cs.readAborted {
+ return cs
}
+ return nil
}
func (cs *clientStream) copyTrailers() {
@@ -2352,6 +2486,10 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
if f.ErrCode != 0 {
// TODO: deal with GOAWAY more. particularly the error code
cc.vlogf("transport got GOAWAY with error code = %v", f.ErrCode)
+ if fn := cc.t.CountError; fn != nil {
+ fn("recv_goaway_" + f.ErrCode.stringToken())
+ }
+
}
cc.setGoAway(f)
return nil
@@ -2359,6 +2497,23 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {
cc := rl.cc
+ // Locking both mu and wmu here allows frame encoding to read settings with only wmu held.
+ // Acquiring wmu when f.IsAck() is unnecessary, but convenient and mostly harmless.
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
+
+ if err := rl.processSettingsNoWrite(f); err != nil {
+ return err
+ }
+ if !f.IsAck() {
+ cc.fr.WriteSettingsAck()
+ cc.bw.Flush()
+ }
+ return nil
+}
+
+func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error {
+ cc := rl.cc
cc.mu.Lock()
defer cc.mu.Unlock()
@@ -2420,17 +2575,12 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {
cc.seenSettings = true
}
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
-
- cc.fr.WriteSettingsAck()
- cc.bw.Flush()
- return cc.werr
+ return nil
}
func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
cc := rl.cc
- cs := cc.streamByID(f.StreamID, false)
+ cs := rl.streamByID(f.StreamID)
if f.StreamID != 0 && cs == nil {
return nil
}
@@ -2450,31 +2600,22 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
}
func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error {
- cs := rl.cc.streamByID(f.StreamID, true)
+ cs := rl.streamByID(f.StreamID)
if cs == nil {
- // TODO: return error if server tries to RST_STEAM an idle stream
+ // TODO: return error if server tries to RST_STREAM an idle stream
return nil
}
- select {
- case <-cs.peerReset:
- // Already reset.
- // This is the only goroutine
- // which closes this, so there
- // isn't a race.
- default:
- serr := streamError(cs.ID, f.ErrCode)
- if f.ErrCode == ErrCodeProtocol {
- rl.cc.SetDoNotReuse()
- serr.Cause = errFromPeer
- // TODO(bradfitz): increment a varz here, once Transport
- // takes an optional interface-typed field that expvar.Map.Add
- // implements.
- }
- cs.resetErr = serr
- close(cs.peerReset)
- cs.bufPipe.CloseWithError(serr)
- cs.cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl
+ serr := streamError(cs.ID, f.ErrCode)
+ serr.Cause = errFromPeer
+ if f.ErrCode == ErrCodeProtocol {
+ rl.cc.SetDoNotReuse()
+ }
+ if fn := cs.cc.t.CountError; fn != nil {
+ fn("recv_rststream_" + f.ErrCode.stringToken())
}
+ cs.abortStream(serr)
+
+ cs.bufPipe.CloseWithError(serr)
return nil
}
@@ -2496,19 +2637,24 @@ func (cc *ClientConn) Ping(ctx context.Context) error {
}
cc.mu.Unlock()
}
- cc.wmu.Lock()
- if err := cc.fr.WritePing(false, p); err != nil {
- cc.wmu.Unlock()
- return err
- }
- if err := cc.bw.Flush(); err != nil {
- cc.wmu.Unlock()
- return err
- }
- cc.wmu.Unlock()
+ errc := make(chan error, 1)
+ go func() {
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
+ if err := cc.fr.WritePing(false, p); err != nil {
+ errc <- err
+ return
+ }
+ if err := cc.bw.Flush(); err != nil {
+ errc <- err
+ return
+ }
+ }()
select {
case <-c:
return nil
+ case err := <-errc:
+ return err
case <-ctx.Done():
return ctx.Err()
case <-cc.readerDone:
@@ -2630,87 +2776,6 @@ type errorReader struct{ err error }
func (r errorReader) Read(p []byte) (int, error) { return 0, r.err }
-// bodyWriterState encapsulates various state around the Transport's writing
-// of the request body, particularly regarding doing delayed writes of the body
-// when the request contains "Expect: 100-continue".
-type bodyWriterState struct {
- cs *clientStream
- timer *time.Timer // if non-nil, we're doing a delayed write
- fnonce *sync.Once // to call fn with
- fn func() // the code to run in the goroutine, writing the body
- resc chan error // result of fn's execution
- delay time.Duration // how long we should delay a delayed write for
-}
-
-func (t *Transport) getBodyWriterState(cs *clientStream, body io.Reader) (s bodyWriterState) {
- s.cs = cs
- if body == nil {
- return
- }
- resc := make(chan error, 1)
- s.resc = resc
- s.fn = func() {
- cs.cc.mu.Lock()
- cs.startedWrite = true
- cs.cc.mu.Unlock()
- resc <- cs.writeRequestBody(body, cs.req.Body)
- }
- s.delay = t.expectContinueTimeout()
- if s.delay == 0 ||
- !httpguts.HeaderValuesContainsToken(
- cs.req.Header["Expect"],
- "100-continue") {
- return
- }
- s.fnonce = new(sync.Once)
-
- // Arm the timer with a very large duration, which we'll
- // intentionally lower later. It has to be large now because
- // we need a handle to it before writing the headers, but the
- // s.delay value is defined to not start until after the
- // request headers were written.
- const hugeDuration = 365 * 24 * time.Hour
- s.timer = time.AfterFunc(hugeDuration, func() {
- s.fnonce.Do(s.fn)
- })
- return
-}
-
-func (s bodyWriterState) cancel() {
- if s.timer != nil {
- if s.timer.Stop() {
- s.resc <- nil
- }
- }
-}
-
-func (s bodyWriterState) on100() {
- if s.timer == nil {
- // If we didn't do a delayed write, ignore the server's
- // bogus 100 continue response.
- return
- }
- s.timer.Stop()
- go func() { s.fnonce.Do(s.fn) }()
-}
-
-// scheduleBodyWrite starts writing the body, either immediately (in
-// the common case) or after the delay timeout. It should not be
-// called until after the headers have been written.
-func (s bodyWriterState) scheduleBodyWrite() {
- if s.timer == nil {
- // We're not doing a delayed write (see
- // getBodyWriterState), so just start the writing
- // goroutine immediately.
- go s.fn()
- return
- }
- traceWait100Continue(s.cs.trace)
- if s.timer.Stop() {
- s.timer.Reset(s.delay)
- }
-}
-
// isConnectionCloseRequest reports whether req should use its own
// connection for a single request and then close the connection.
func isConnectionCloseRequest(req *http.Request) bool {
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 850aafec..a74ef58f 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -54,7 +54,7 @@ includes_AIX='
includes_Darwin='
#define _DARWIN_C_SOURCE
-#define KERNEL
+#define KERNEL 1
#define _DARWIN_USE_64_BIT_INODE
#define __APPLE_USE_RFC_3542
#include <stdint.h>
@@ -75,6 +75,7 @@ includes_Darwin='
#include <sys/utsname.h>
#include <sys/wait.h>
#include <sys/xattr.h>
+#include <sys/vsock.h>
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -82,6 +83,9 @@ includes_Darwin='
#include <netinet/in.h>
#include <netinet/ip.h>
#include <termios.h>
+
+// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
+#define TIOCREMOTE 0x80047469
'
includes_DragonFly='
@@ -466,7 +470,6 @@ ccflags="$@"
$2 !~ /^EQUIV_/ &&
$2 !~ /^EXPR_/ &&
$2 !~ /^EVIOC/ &&
- $2 !~ /^EV_/ &&
$2 ~ /^E[A-Z0-9_]+$/ ||
$2 ~ /^B[0-9_]+$/ ||
$2 ~ /^(OLD|NEW)DEV$/ ||
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 23f6b576..a8c13317 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -48,6 +48,30 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
}
+// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
+// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
+// bidirectional communication between a hypervisor and its guest virtual
+// machines.
+type SockaddrVM struct {
+ // CID and Port specify a context ID and port address for a VM socket.
+ // Guests have a unique CID, and hosts may have a well-known CID of:
+ // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
+ // - VMADDR_CID_LOCAL: refers to local communication (loopback).
+ // - VMADDR_CID_HOST: refers to other processes on the host.
+ CID uint32
+ Port uint32
+ raw RawSockaddrVM
+}
+
+func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Len = SizeofSockaddrVM
+ sa.raw.Family = AF_VSOCK
+ sa.raw.Port = sa.Port
+ sa.raw.Cid = sa.CID
+
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
+}
+
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_SYSTEM:
@@ -58,6 +82,13 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Unit = pp.Sc_unit
return sa, nil
}
+ case AF_VSOCK:
+ pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
+ sa := &SockaddrVM{
+ CID: pp.Cid,
+ Port: pp.Port,
+ }
+ return sa, nil
}
return nil, EAFNOSUPPORT
}
@@ -433,6 +464,11 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
+//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
+//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
+//sys shmdt(addr uintptr) (err error)
+//sys shmget(key int, size int, flag int) (id int, err error)
+
/*
* Exposed directly
*/
@@ -590,10 +626,6 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
// Msgget
// Msgsnd
// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
// Shm_open
// Shm_unlink
// Sem_open
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index b90214d3..fff38a84 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -13,7 +13,6 @@ package unix
import (
"encoding/binary"
- "runtime"
"syscall"
"unsafe"
)
@@ -38,6 +37,13 @@ func Creat(path string, mode uint32) (fd int, err error) {
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
}
+func EpollCreate(size int) (fd int, err error) {
+ if size <= 0 {
+ return -1, EINVAL
+ }
+ return EpollCreate1(0)
+}
+
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
@@ -113,6 +119,23 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
return openat2(dirfd, path, how, SizeofOpenHow)
}
+func Pipe(p []int) error {
+ return Pipe2(p, 0)
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) error {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err := pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return err
+}
+
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
@@ -122,6 +145,15 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
return ppoll(&fds[0], len(fds), timeout, sigmask)
}
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ var ts *Timespec
+ if timeout >= 0 {
+ ts = new(Timespec)
+ *ts = NsecToTimespec(int64(timeout) * 1e6)
+ }
+ return Ppoll(fds, ts, nil)
+}
+
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1796,11 +1828,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Dup(oldfd int) (fd int, err error)
func Dup2(oldfd, newfd int) error {
- // Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
- if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
- return Dup3(oldfd, newfd, 0)
- }
- return dup2(oldfd, newfd)
+ return Dup3(oldfd, newfd, 0)
}
//sys Dup3(oldfd int, newfd int, flags int) (err error)
@@ -2291,6 +2319,11 @@ type RemoteIovec struct {
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
+//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
+//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
+//sys shmdt(addr uintptr) (err error)
+//sys shmget(key int, size int, flag int) (id int, err error)
+
/*
* Unimplemented
*/
@@ -2372,10 +2405,6 @@ type RemoteIovec struct {
// SetRobustList
// SetThreadArea
// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
// Sigaltstack
// Swapoff
// Swapon
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index 2df04e39..5f757e8a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -19,36 +19,8 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
// 64-bit file system and 32-bit uid calls
// (386 default is 32-bit file system and 16-bit uid).
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//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_64
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
@@ -380,12 +352,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index ff0acde6..4299125a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -7,8 +7,6 @@
package unix
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//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)
@@ -115,32 +113,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func (r *PtraceRegs) PC() uint64 { return r.Rip }
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
@@ -165,15 +137,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index 094aaadd..79edeb9c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -19,32 +19,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
newoffset, errno := seek(fd, offset, whence)
if errno != 0 {
@@ -72,8 +46,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// 64-bit file system and 32-bit uid calls
// (16-bit uid calls are not always supported in newer kernels)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -255,15 +227,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- 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 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index 3fb41f95..862890de 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -9,13 +9,6 @@ package unix
import "unsafe"
-func EpollCreate(size int) (fd int, err error) {
- if size <= 0 {
- return -1, EINVAL
- }
- return EpollCreate1(0)
-}
-
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -145,30 +138,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
}
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
// Getrlimit prefers the prlimit64 system call. See issue 38604.
func Getrlimit(resource int, rlim *Rlimit) error {
err := Prlimit(0, resource, nil, rlim)
@@ -211,27 +180,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-// dup2 exists because func Dup3 in syscall_linux.go references
-// it in an unreachable path. dup2 isn't available on arm64.
-func dup2(oldfd int, newfd int) error
-
func Pause() error {
_, err := ppoll(nil, 0, nil, nil)
return err
}
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- var ts *Timespec
- if timeout >= 0 {
- ts = new(Timespec)
- *ts = NsecToTimespec(int64(timeout) * 1e6)
- }
- if len(fds) == 0 {
- return ppoll(nil, 0, ts, nil)
- }
- return ppoll(&fds[0], len(fds), ts, nil)
-}
-
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index 7079b435..8932e34a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -8,8 +8,6 @@
package unix
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//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)
@@ -94,30 +92,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func Ioperm(from int, num int, on int) (err error) {
return ENOSYS
}
@@ -220,12 +194,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index 5bc171e6..7821c25d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -15,8 +15,6 @@ import (
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//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)
@@ -112,29 +110,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe() (p1 int, p2 int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
@@ -231,12 +206,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
index 1810a727..c5053a0f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -12,8 +12,6 @@ import (
"unsafe"
)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -217,41 +215,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
func SyncFileRange(fd int, off int64, n int64, flags int) error {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index b7662dea..25786c42 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -8,8 +8,6 @@
package unix
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//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)
@@ -103,41 +101,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
func SyncFileRange(fd int, off int64, n int64, flags int) error {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index e2ae1ec8..6f9f7104 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -9,13 +9,6 @@ package unix
import "unsafe"
-func EpollCreate(size int) (fd int, err error) {
- if size <= 0 {
- return -1, EINVAL
- }
- return EpollCreate1(0)
-}
-
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -144,30 +137,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
}
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func (r *PtraceRegs) PC() uint64 { return r.Pc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
@@ -197,18 +166,6 @@ func Pause() error {
return err
}
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- var ts *Timespec
- if timeout >= 0 {
- ts = new(Timespec)
- *ts = NsecToTimespec(int64(timeout) * 1e6)
- }
- if len(fds) == 0 {
- return ppoll(nil, 0, ts, nil)
- }
- 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)
}
@@ -225,7 +182,3 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}
-
-// dup2 exists because func Dup3 in syscall_linux.go references
-// it in an unreachable path. dup2 isn't available on arm64.
-func dup2(oldfd int, newfd int) error
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 646fde8e..6aa59cb2 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -11,8 +11,6 @@ import (
"unsafe"
)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//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)
@@ -76,30 +74,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func Ioperm(from int, num int, on int) (err error) {
return ENOSYS
}
@@ -323,15 +297,6 @@ func Shutdown(s, how int) error {
return nil
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index b9a25090..bbe8d174 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -9,7 +9,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 dup2(oldfd int, newfd int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
@@ -118,38 +117,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/sysvshm_linux.go b/vendor/golang.org/x/sys/unix/sysvshm_linux.go
new file mode 100644
index 00000000..2c3a4437
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sysvshm_linux.go
@@ -0,0 +1,21 @@
+// Copyright 2021 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.
+
+//go:build linux
+// +build linux
+
+package unix
+
+import "runtime"
+
+// SysvShmCtl performs control operations on the shared memory segment
+// specified by id.
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
+ if runtime.GOARCH == "arm" ||
+ runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
+ cmd |= ipc_64
+ }
+
+ return shmctl(id, cmd, desc)
+}
diff --git a/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/vendor/golang.org/x/sys/unix/sysvshm_unix.go
new file mode 100644
index 00000000..0bb4c8de
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sysvshm_unix.go
@@ -0,0 +1,61 @@
+// Copyright 2021 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.
+
+//go:build (darwin && !ios) || linux
+// +build darwin,!ios linux
+
+package unix
+
+import (
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
+)
+
+// SysvShmAttach attaches the Sysv shared memory segment associated with the
+// shared memory identifier id.
+func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
+ addr, errno := shmat(id, addr, flag)
+ if errno != nil {
+ return nil, errno
+ }
+
+ // Retrieve the size of the shared memory to enable slice creation
+ var info SysvShmDesc
+
+ _, err := SysvShmCtl(id, IPC_STAT, &info)
+ if err != nil {
+ // release the shared memory if we can't find the size
+
+ // ignoring error from shmdt as there's nothing sensible to return here
+ shmdt(addr)
+ return nil, err
+ }
+
+ // Use unsafe to convert addr into a []byte.
+ // TODO: convert to unsafe.Slice once we can assume Go 1.17
+ var b []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
+ hdr.Data = unsafe.Pointer(addr)
+ hdr.Cap = int(info.Segsz)
+ hdr.Len = int(info.Segsz)
+ return b, nil
+}
+
+// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
+//
+// It is not safe to use the slice after calling this function.
+func SysvShmDetach(data []byte) error {
+ if len(data) == 0 {
+ return EINVAL
+ }
+
+ return shmdt(uintptr(unsafe.Pointer(&data[0])))
+}
+
+// SysvShmGet returns the Sysv shared memory identifier associated with key.
+// If the IPC_CREAT flag is specified a new segment is created.
+func SysvShmGet(key, size, flag int) (id int, err error) {
+ return shmget(key, size, flag)
+}
diff --git a/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
new file mode 100644
index 00000000..71bddefd
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
@@ -0,0 +1,14 @@
+// Copyright 2021 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.
+
+//go:build darwin && !ios
+// +build darwin,!ios
+
+package unix
+
+// SysvShmCtl performs control operations on the shared memory segment
+// specified by id.
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
+ return shmctl(id, cmd, desc)
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index a3a45fec..476a1c7e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -12,1556 +12,1582 @@ package unix
import "syscall"
const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_SYS_CONTROL = 0x2
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- AF_VSOCK = 0x28
- ALTWERASE = 0x200
- ATTR_BIT_MAP_COUNT = 0x5
- ATTR_CMN_ACCESSMASK = 0x20000
- ATTR_CMN_ACCTIME = 0x1000
- ATTR_CMN_ADDEDTIME = 0x10000000
- ATTR_CMN_BKUPTIME = 0x2000
- ATTR_CMN_CHGTIME = 0x800
- ATTR_CMN_CRTIME = 0x200
- ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
- ATTR_CMN_DEVID = 0x2
- ATTR_CMN_DOCUMENT_ID = 0x100000
- ATTR_CMN_ERROR = 0x20000000
- ATTR_CMN_EXTENDED_SECURITY = 0x400000
- ATTR_CMN_FILEID = 0x2000000
- ATTR_CMN_FLAGS = 0x40000
- ATTR_CMN_FNDRINFO = 0x4000
- ATTR_CMN_FSID = 0x4
- ATTR_CMN_FULLPATH = 0x8000000
- ATTR_CMN_GEN_COUNT = 0x80000
- ATTR_CMN_GRPID = 0x10000
- ATTR_CMN_GRPUUID = 0x1000000
- ATTR_CMN_MODTIME = 0x400
- ATTR_CMN_NAME = 0x1
- ATTR_CMN_NAMEDATTRCOUNT = 0x80000
- ATTR_CMN_NAMEDATTRLIST = 0x100000
- ATTR_CMN_OBJID = 0x20
- ATTR_CMN_OBJPERMANENTID = 0x40
- ATTR_CMN_OBJTAG = 0x10
- ATTR_CMN_OBJTYPE = 0x8
- ATTR_CMN_OWNERID = 0x8000
- ATTR_CMN_PARENTID = 0x4000000
- ATTR_CMN_PAROBJID = 0x80
- ATTR_CMN_RETURNED_ATTRS = 0x80000000
- ATTR_CMN_SCRIPT = 0x100
- ATTR_CMN_SETMASK = 0x51c7ff00
- ATTR_CMN_USERACCESS = 0x200000
- ATTR_CMN_UUID = 0x800000
- ATTR_CMN_VALIDMASK = 0xffffffff
- ATTR_CMN_VOLSETMASK = 0x6700
- ATTR_FILE_ALLOCSIZE = 0x4
- ATTR_FILE_CLUMPSIZE = 0x10
- ATTR_FILE_DATAALLOCSIZE = 0x400
- ATTR_FILE_DATAEXTENTS = 0x800
- ATTR_FILE_DATALENGTH = 0x200
- ATTR_FILE_DEVTYPE = 0x20
- ATTR_FILE_FILETYPE = 0x40
- ATTR_FILE_FORKCOUNT = 0x80
- ATTR_FILE_FORKLIST = 0x100
- ATTR_FILE_IOBLOCKSIZE = 0x8
- ATTR_FILE_LINKCOUNT = 0x1
- ATTR_FILE_RSRCALLOCSIZE = 0x2000
- ATTR_FILE_RSRCEXTENTS = 0x4000
- ATTR_FILE_RSRCLENGTH = 0x1000
- ATTR_FILE_SETMASK = 0x20
- ATTR_FILE_TOTALSIZE = 0x2
- ATTR_FILE_VALIDMASK = 0x37ff
- ATTR_VOL_ALLOCATIONCLUMP = 0x40
- ATTR_VOL_ATTRIBUTES = 0x40000000
- ATTR_VOL_CAPABILITIES = 0x20000
- ATTR_VOL_DIRCOUNT = 0x400
- ATTR_VOL_ENCODINGSUSED = 0x10000
- ATTR_VOL_FILECOUNT = 0x200
- ATTR_VOL_FSTYPE = 0x1
- ATTR_VOL_INFO = 0x80000000
- ATTR_VOL_IOBLOCKSIZE = 0x80
- ATTR_VOL_MAXOBJCOUNT = 0x800
- ATTR_VOL_MINALLOCATION = 0x20
- ATTR_VOL_MOUNTEDDEVICE = 0x8000
- ATTR_VOL_MOUNTFLAGS = 0x4000
- ATTR_VOL_MOUNTPOINT = 0x1000
- ATTR_VOL_NAME = 0x2000
- ATTR_VOL_OBJCOUNT = 0x100
- ATTR_VOL_QUOTA_SIZE = 0x10000000
- ATTR_VOL_RESERVED_SIZE = 0x20000000
- ATTR_VOL_SETMASK = 0x80002000
- ATTR_VOL_SIGNATURE = 0x2
- ATTR_VOL_SIZE = 0x4
- ATTR_VOL_SPACEAVAIL = 0x10
- ATTR_VOL_SPACEFREE = 0x8
- ATTR_VOL_UUID = 0x40000
- ATTR_VOL_VALIDMASK = 0xf007ffff
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x8010427e
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLOCK_MONOTONIC = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_MONOTONIC_RAW_APPROX = 0x5
- CLOCK_PROCESS_CPUTIME_ID = 0xc
- CLOCK_REALTIME = 0x0
- CLOCK_THREAD_CPUTIME_ID = 0x10
- CLOCK_UPTIME_RAW = 0x8
- CLOCK_UPTIME_RAW_APPROX = 0x9
- CLONE_NOFOLLOW = 0x1
- CLONE_NOOWNERCOPY = 0x2
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x30000
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTLIOCGINFO = 0xc0644e03
- CTL_HW = 0x6
- CTL_KERN = 0x1
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x10a
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_DARWIN = 0x10a
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0xf
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x11
- EVFILT_THREADMARKER = 0x11
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DISPATCH2 = 0x180
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EV_UDATA_SPECIFIC = 0x100
- EV_VANISHED = 0x200
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSOPT_ATTR_CMN_EXTENDED = 0x20
- FSOPT_NOFOLLOW = 0x1
- FSOPT_NOINMEMUPDATE = 0x2
- FSOPT_PACK_INVAL_ATTRS = 0x8
- FSOPT_REPORT_FULLSIZE = 0x4
- FSOPT_RETURN_REALDEV = 0x200
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_INFO = 0x67
- F_ADDFILESIGS_RETURN = 0x61
- F_ADDFILESUPPL = 0x68
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_BARRIERFSYNC = 0x55
- F_CHECK_LV = 0x62
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPATH_NOFIRMLINK = 0x66
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GETSIGSINFO = 0x69
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_PUNCHHOLE = 0x63
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_SPECULATIVE_READ = 0x65
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_TRIM_ACTIVE_FILE = 0x64
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- HW_MACHINE = 0x1
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_6LOWPAN = 0x40
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_3542DSTOPTS = 0x32
- IPV6_3542HOPLIMIT = 0x2f
- IPV6_3542HOPOPTS = 0x31
- IPV6_3542NEXTHOP = 0x30
- IPV6_3542PKTINFO = 0x2e
- IPV6_3542RTHDR = 0x33
- IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
- IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
- IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x3000
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x3d
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x39
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x1c
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x1b
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- KERN_HOSTNAME = 0xa
- KERN_OSRELEASE = 0x2
- KERN_OSTYPE = 0x1
- KERN_VERSION = 0x4
- LOCAL_PEERCRED = 0x1
- LOCAL_PEEREPID = 0x3
- LOCAL_PEEREUUID = 0x5
- LOCAL_PEERPID = 0x2
- LOCAL_PEERTOKEN = 0x6
- LOCAL_PEERUUID = 0x4
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_32BIT = 0x8000
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESILIENT_CODESIGN = 0x2000
- MAP_RESILIENT_MEDIA = 0x4000
- MAP_SHARED = 0x1
- MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
- MAP_UNIX03 = 0x40000
- MCAST_BLOCK_SOURCE = 0x54
- MCAST_EXCLUDE = 0x2
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x50
- MCAST_JOIN_SOURCE_GROUP = 0x52
- MCAST_LEAVE_GROUP = 0x51
- MCAST_LEAVE_SOURCE_GROUP = 0x53
- MCAST_UNBLOCK_SOURCE = 0x55
- MCAST_UNDEFINED = 0x0
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_ASYNC = 0x40
- MNT_AUTOMOUNTED = 0x400000
- MNT_CMDFLAGS = 0xf0000
- MNT_CPROTECT = 0x80
- MNT_DEFWRITE = 0x2000000
- MNT_DONTBROWSE = 0x100000
- MNT_DOVOLFS = 0x8000
- MNT_DWAIT = 0x4
- MNT_EXPORTED = 0x100
- MNT_EXT_ROOT_DATA_VOL = 0x1
- MNT_FORCE = 0x80000
- MNT_IGNORE_OWNERSHIP = 0x200000
- MNT_JOURNALED = 0x800000
- MNT_LOCAL = 0x1000
- MNT_MULTILABEL = 0x4000000
- MNT_NOATIME = 0x10000000
- MNT_NOBLOCK = 0x20000
- MNT_NODEV = 0x10
- MNT_NOEXEC = 0x4
- MNT_NOSUID = 0x8
- MNT_NOUSERXATTR = 0x1000000
- MNT_NOWAIT = 0x2
- MNT_QUARANTINE = 0x400
- MNT_QUOTA = 0x2000
- MNT_RDONLY = 0x1
- MNT_RELOAD = 0x40000
- MNT_REMOVABLE = 0x200
- MNT_ROOTFS = 0x4000
- MNT_SNAPSHOT = 0x40000000
- MNT_STRICTATIME = 0x80000000
- MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
- MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0xd7f0f7ff
- MNT_WAIT = 0x1
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_NOSIGNAL = 0x80000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_FLAGS_PRIV = 0xa
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xb
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NFDBITS = 0x20
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLDLY = 0x300
- NOFLSH = 0x80000000
- NOKERNINFO = 0x2000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_FUNLOCK = 0x100
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_MACHTIME = 0x100
- NOTE_MACH_CONTINUOUS_TIME = 0x80
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- OXTABS = 0x4
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DP_GETRAWUNENCRYPTED = 0x2
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NOFOLLOW_ANY = 0x20000000
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_MEMLOCK = 0x6
- RLIMIT_NOFILE = 0x8
- RLIMIT_NPROC = 0x7
- RLIMIT_RSS = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DEAD = 0x20000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_GLOBAL = 0x40000000
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SEEK_CUR = 0x1
- SEEK_DATA = 0x4
- SEEK_END = 0x2
- SEEK_HOLE = 0x3
- SEEK_SET = 0x0
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIF6LOWPAN = 0xc02069c5
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFFUNCTIONALTYPE = 0xc02069ad
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGIFXMEDIA = 0xc02c6948
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIF6LOWPAN = 0x802069c4
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_LOCAL = 0x0
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NETSVC_MARKING_LEVEL = 0x1119
- SO_NET_SERVICE_TYPE = 0x1116
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0x4
- TABDLY = 0xc04
- TCIFLUSH = 0x1
- TCIOFF = 0x3
- TCIOFLUSH = 0x3
- TCION = 0x4
- TCOFLUSH = 0x2
- TCOOFF = 0x1
- TCOON = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_CONNECTION_INFO = 0x106
- TCP_ENABLE_ECN = 0x104
- TCP_FASTOPEN = 0x105
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VM_LOADAVG = 0x2
- VM_MACHFACTOR = 0x4
- VM_MAXID = 0x6
- VM_METER = 0x1
- VM_SWAPUSAGE = 0x5
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
- XATTR_CREATE = 0x2
- XATTR_NODEFAULT = 0x10
- XATTR_NOFOLLOW = 0x1
- XATTR_NOSECURITY = 0x8
- XATTR_REPLACE = 0x4
- XATTR_SHOWCOMPRESSION = 0x20
+ AF_APPLETALK = 0x10
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1c
+ AF_ECMA = 0x8
+ AF_HYLINK = 0xf
+ AF_IEEE80211 = 0x25
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x1e
+ AF_IPX = 0x17
+ AF_ISDN = 0x1c
+ AF_ISO = 0x7
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x29
+ AF_NATM = 0x1f
+ AF_NDRV = 0x1b
+ AF_NETBIOS = 0x21
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PPP = 0x22
+ AF_PUP = 0x4
+ AF_RESERVED_36 = 0x24
+ AF_ROUTE = 0x11
+ AF_SIP = 0x18
+ AF_SNA = 0xb
+ AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_UTUN = 0x26
+ AF_VSOCK = 0x28
+ ALTWERASE = 0x200
+ ATTR_BIT_MAP_COUNT = 0x5
+ ATTR_CMN_ACCESSMASK = 0x20000
+ ATTR_CMN_ACCTIME = 0x1000
+ ATTR_CMN_ADDEDTIME = 0x10000000
+ ATTR_CMN_BKUPTIME = 0x2000
+ ATTR_CMN_CHGTIME = 0x800
+ ATTR_CMN_CRTIME = 0x200
+ ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
+ ATTR_CMN_DEVID = 0x2
+ ATTR_CMN_DOCUMENT_ID = 0x100000
+ ATTR_CMN_ERROR = 0x20000000
+ ATTR_CMN_EXTENDED_SECURITY = 0x400000
+ ATTR_CMN_FILEID = 0x2000000
+ ATTR_CMN_FLAGS = 0x40000
+ ATTR_CMN_FNDRINFO = 0x4000
+ ATTR_CMN_FSID = 0x4
+ ATTR_CMN_FULLPATH = 0x8000000
+ ATTR_CMN_GEN_COUNT = 0x80000
+ ATTR_CMN_GRPID = 0x10000
+ ATTR_CMN_GRPUUID = 0x1000000
+ ATTR_CMN_MODTIME = 0x400
+ ATTR_CMN_NAME = 0x1
+ ATTR_CMN_NAMEDATTRCOUNT = 0x80000
+ ATTR_CMN_NAMEDATTRLIST = 0x100000
+ ATTR_CMN_OBJID = 0x20
+ ATTR_CMN_OBJPERMANENTID = 0x40
+ ATTR_CMN_OBJTAG = 0x10
+ ATTR_CMN_OBJTYPE = 0x8
+ ATTR_CMN_OWNERID = 0x8000
+ ATTR_CMN_PARENTID = 0x4000000
+ ATTR_CMN_PAROBJID = 0x80
+ ATTR_CMN_RETURNED_ATTRS = 0x80000000
+ ATTR_CMN_SCRIPT = 0x100
+ ATTR_CMN_SETMASK = 0x51c7ff00
+ ATTR_CMN_USERACCESS = 0x200000
+ ATTR_CMN_UUID = 0x800000
+ ATTR_CMN_VALIDMASK = 0xffffffff
+ ATTR_CMN_VOLSETMASK = 0x6700
+ ATTR_FILE_ALLOCSIZE = 0x4
+ ATTR_FILE_CLUMPSIZE = 0x10
+ ATTR_FILE_DATAALLOCSIZE = 0x400
+ ATTR_FILE_DATAEXTENTS = 0x800
+ ATTR_FILE_DATALENGTH = 0x200
+ ATTR_FILE_DEVTYPE = 0x20
+ ATTR_FILE_FILETYPE = 0x40
+ ATTR_FILE_FORKCOUNT = 0x80
+ ATTR_FILE_FORKLIST = 0x100
+ ATTR_FILE_IOBLOCKSIZE = 0x8
+ ATTR_FILE_LINKCOUNT = 0x1
+ ATTR_FILE_RSRCALLOCSIZE = 0x2000
+ ATTR_FILE_RSRCEXTENTS = 0x4000
+ ATTR_FILE_RSRCLENGTH = 0x1000
+ ATTR_FILE_SETMASK = 0x20
+ ATTR_FILE_TOTALSIZE = 0x2
+ ATTR_FILE_VALIDMASK = 0x37ff
+ ATTR_VOL_ALLOCATIONCLUMP = 0x40
+ ATTR_VOL_ATTRIBUTES = 0x40000000
+ ATTR_VOL_CAPABILITIES = 0x20000
+ ATTR_VOL_DIRCOUNT = 0x400
+ ATTR_VOL_ENCODINGSUSED = 0x10000
+ ATTR_VOL_FILECOUNT = 0x200
+ ATTR_VOL_FSTYPE = 0x1
+ ATTR_VOL_INFO = 0x80000000
+ ATTR_VOL_IOBLOCKSIZE = 0x80
+ ATTR_VOL_MAXOBJCOUNT = 0x800
+ ATTR_VOL_MINALLOCATION = 0x20
+ ATTR_VOL_MOUNTEDDEVICE = 0x8000
+ ATTR_VOL_MOUNTFLAGS = 0x4000
+ ATTR_VOL_MOUNTPOINT = 0x1000
+ ATTR_VOL_NAME = 0x2000
+ ATTR_VOL_OBJCOUNT = 0x100
+ ATTR_VOL_QUOTA_SIZE = 0x10000000
+ ATTR_VOL_RESERVED_SIZE = 0x20000000
+ ATTR_VOL_SETMASK = 0x80002000
+ ATTR_VOL_SIGNATURE = 0x2
+ ATTR_VOL_SIZE = 0x4
+ ATTR_VOL_SPACEAVAIL = 0x10
+ ATTR_VOL_SPACEFREE = 0x8
+ ATTR_VOL_SPACEUSED = 0x800000
+ ATTR_VOL_UUID = 0x40000
+ ATTR_VOL_VALIDMASK = 0xf087ffff
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc00c4279
+ BIOCGETIF = 0x4020426b
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044272
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSEESENT = 0x40044276
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDLT = 0x80044278
+ BIOCSETF = 0x80104267
+ BIOCSETFNR = 0x8010427e
+ BIOCSETIF = 0x8020426c
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044273
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCSSEESENT = 0x80044277
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIV = 0x30
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x80000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_MONOTONIC = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_MONOTONIC_RAW_APPROX = 0x5
+ CLOCK_PROCESS_CPUTIME_ID = 0xc
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x10
+ CLOCK_UPTIME_RAW = 0x8
+ CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
+ CR0 = 0x0
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CRTSCTS = 0x30000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0x14
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DLT_A429 = 0xb8
+ DLT_A653_ICM = 0xb9
+ DLT_AIRONET_HEADER = 0x78
+ DLT_AOS = 0xde
+ DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
+ DLT_ARCNET = 0x7
+ DLT_ARCNET_LINUX = 0x81
+ DLT_ATM_CLIP = 0x13
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AURORA = 0x7e
+ DLT_AX25 = 0x3
+ DLT_AX25_KISS = 0xca
+ DLT_BACNET_MS_TP = 0xa5
+ DLT_BLUETOOTH_HCI_H4 = 0xbb
+ DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
+ DLT_CAN20B = 0xbe
+ DLT_CAN_SOCKETCAN = 0xe3
+ DLT_CHAOS = 0x5
+ DLT_CHDLC = 0x68
+ DLT_CISCO_IOS = 0x76
+ DLT_C_HDLC = 0x68
+ DLT_C_HDLC_WITH_DIR = 0xcd
+ DLT_DBUS = 0xe7
+ DLT_DECT = 0xdd
+ DLT_DOCSIS = 0x8f
+ DLT_DVB_CI = 0xeb
+ DLT_ECONET = 0x73
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0x6d
+ DLT_ERF = 0xc5
+ DLT_ERF_ETH = 0xaf
+ DLT_ERF_POS = 0xb0
+ DLT_FC_2 = 0xe0
+ DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
+ DLT_FDDI = 0xa
+ DLT_FLEXRAY = 0xd2
+ DLT_FRELAY = 0x6b
+ DLT_FRELAY_WITH_DIR = 0xce
+ DLT_GCOM_SERIAL = 0xad
+ DLT_GCOM_T1E1 = 0xac
+ DLT_GPF_F = 0xab
+ DLT_GPF_T = 0xaa
+ DLT_GPRS_LLC = 0xa9
+ DLT_GSMTAP_ABIS = 0xda
+ DLT_GSMTAP_UM = 0xd9
+ DLT_HHDLC = 0x79
+ DLT_IBM_SN = 0x92
+ DLT_IBM_SP = 0x91
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_IEEE802_11_RADIO_AVS = 0xa3
+ DLT_IEEE802_15_4 = 0xc3
+ DLT_IEEE802_15_4_LINUX = 0xbf
+ DLT_IEEE802_15_4_NOFCS = 0xe6
+ DLT_IEEE802_15_4_NONASK_PHY = 0xd7
+ DLT_IEEE802_16_MAC_CPS = 0xbc
+ DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
+ DLT_IPFILTER = 0x74
+ DLT_IPMB = 0xc7
+ DLT_IPMB_LINUX = 0xd1
+ DLT_IPNET = 0xe2
+ DLT_IPOIB = 0xf2
+ DLT_IPV4 = 0xe4
+ DLT_IPV6 = 0xe5
+ DLT_IP_OVER_FC = 0x7a
+ DLT_JUNIPER_ATM1 = 0x89
+ DLT_JUNIPER_ATM2 = 0x87
+ DLT_JUNIPER_ATM_CEMIC = 0xee
+ DLT_JUNIPER_CHDLC = 0xb5
+ DLT_JUNIPER_ES = 0x84
+ DLT_JUNIPER_ETHER = 0xb2
+ DLT_JUNIPER_FIBRECHANNEL = 0xea
+ DLT_JUNIPER_FRELAY = 0xb4
+ DLT_JUNIPER_GGSN = 0x85
+ DLT_JUNIPER_ISM = 0xc2
+ DLT_JUNIPER_MFR = 0x86
+ DLT_JUNIPER_MLFR = 0x83
+ DLT_JUNIPER_MLPPP = 0x82
+ DLT_JUNIPER_MONITOR = 0xa4
+ DLT_JUNIPER_PIC_PEER = 0xae
+ DLT_JUNIPER_PPP = 0xb3
+ DLT_JUNIPER_PPPOE = 0xa7
+ DLT_JUNIPER_PPPOE_ATM = 0xa8
+ DLT_JUNIPER_SERVICES = 0x88
+ DLT_JUNIPER_SRX_E2E = 0xe9
+ DLT_JUNIPER_ST = 0xc8
+ DLT_JUNIPER_VP = 0xb7
+ DLT_JUNIPER_VS = 0xe8
+ DLT_LAPB_WITH_DIR = 0xcf
+ DLT_LAPD = 0xcb
+ DLT_LIN = 0xd4
+ DLT_LINUX_EVDEV = 0xd8
+ DLT_LINUX_IRDA = 0x90
+ DLT_LINUX_LAPD = 0xb1
+ DLT_LINUX_PPP_WITHDIRECTION = 0xa6
+ DLT_LINUX_SLL = 0x71
+ DLT_LOOP = 0x6c
+ DLT_LTALK = 0x72
+ DLT_MATCHING_MAX = 0x10a
+ DLT_MATCHING_MIN = 0x68
+ DLT_MFR = 0xb6
+ DLT_MOST = 0xd3
+ DLT_MPEG_2_TS = 0xf3
+ DLT_MPLS = 0xdb
+ DLT_MTP2 = 0x8c
+ DLT_MTP2_WITH_PHDR = 0x8b
+ DLT_MTP3 = 0x8d
+ DLT_MUX27010 = 0xec
+ DLT_NETANALYZER = 0xf0
+ DLT_NETANALYZER_TRANSPARENT = 0xf1
+ DLT_NFC_LLCP = 0xf5
+ DLT_NFLOG = 0xef
+ DLT_NG40 = 0xf4
+ DLT_NULL = 0x0
+ DLT_PCI_EXP = 0x7d
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPI = 0xc0
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_PPPD = 0xa6
+ DLT_PPP_SERIAL = 0x32
+ DLT_PPP_WITH_DIR = 0xcc
+ DLT_PPP_WITH_DIRECTION = 0xa6
+ DLT_PRISM_HEADER = 0x77
+ DLT_PRONET = 0x4
+ DLT_RAIF1 = 0xc6
+ DLT_RAW = 0xc
+ DLT_RIO = 0x7c
+ DLT_SCCP = 0x8e
+ DLT_SITA = 0xc4
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_STANAG_5066_D_PDU = 0xed
+ DLT_SUNATM = 0x7b
+ DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TZSP = 0x80
+ DLT_USB = 0xba
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_LINUX = 0xbd
+ DLT_USB_LINUX_MMAPPED = 0xdc
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DLT_WIHART = 0xdf
+ DLT_X2E_SERIAL = 0xd5
+ DLT_X2E_XORAYA = 0xd6
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EVFILT_AIO = -0x3
+ EVFILT_EXCEPT = -0xf
+ EVFILT_FS = -0x9
+ EVFILT_MACHPORT = -0x8
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x11
+ EVFILT_THREADMARKER = 0x11
+ EVFILT_TIMER = -0x7
+ EVFILT_USER = -0xa
+ EVFILT_VM = -0xc
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_DISPATCH2 = 0x180
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG0 = 0x1000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_OOBAND = 0x2000
+ EV_POLL = 0x1000
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf000
+ EV_UDATA_SPECIFIC = 0x100
+ EV_VANISHED = 0x200
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FLUSHO = 0x800000
+ FSOPT_ATTR_CMN_EXTENDED = 0x20
+ FSOPT_NOFOLLOW = 0x1
+ FSOPT_NOINMEMUPDATE = 0x2
+ FSOPT_PACK_INVAL_ATTRS = 0x8
+ FSOPT_REPORT_FULLSIZE = 0x4
+ FSOPT_RETURN_REALDEV = 0x200
+ F_ADDFILESIGS = 0x3d
+ F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
+ F_ADDFILESIGS_INFO = 0x67
+ F_ADDFILESIGS_RETURN = 0x61
+ F_ADDFILESUPPL = 0x68
+ F_ADDSIGS = 0x3b
+ F_ALLOCATEALL = 0x4
+ F_ALLOCATECONTIG = 0x2
+ F_BARRIERFSYNC = 0x55
+ F_CHECK_LV = 0x62
+ F_CHKCLEAN = 0x29
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x43
+ F_FINDSIGS = 0x4e
+ F_FLUSH_DATA = 0x28
+ F_FREEZE_FS = 0x35
+ F_FULLFSYNC = 0x33
+ F_GETCODEDIR = 0x48
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETLKPID = 0x42
+ F_GETNOSIGPIPE = 0x4a
+ F_GETOWN = 0x5
+ F_GETPATH = 0x32
+ F_GETPATH_MTMINFO = 0x47
+ F_GETPATH_NOFIRMLINK = 0x66
+ F_GETPROTECTIONCLASS = 0x3f
+ F_GETPROTECTIONLEVEL = 0x4d
+ F_GETSIGSINFO = 0x69
+ F_GLOBAL_NOCACHE = 0x37
+ F_LOG2PHYS = 0x31
+ F_LOG2PHYS_EXT = 0x41
+ F_NOCACHE = 0x30
+ F_NODIRECT = 0x3e
+ F_OK = 0x0
+ F_PATHPKG_CHECK = 0x34
+ F_PEOFPOSMODE = 0x3
+ F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
+ F_RDADVISE = 0x2c
+ F_RDAHEAD = 0x2d
+ F_RDLCK = 0x1
+ F_SETBACKINGSTORE = 0x46
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETLKWTIMEOUT = 0xa
+ F_SETNOSIGPIPE = 0x49
+ F_SETOWN = 0x6
+ F_SETPROTECTIONCLASS = 0x40
+ F_SETSIZE = 0x2b
+ F_SINGLE_WRITER = 0x4c
+ F_SPECULATIVE_READ = 0x65
+ F_THAW_FS = 0x36
+ F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
+ F_UNLCK = 0x2
+ F_VOLPOSMODE = 0x4
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFF_ALLMULTI = 0x200
+ IFF_ALTPHYS = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_NOTRAILERS = 0x20
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_6LOWPAN = 0x40
+ IFT_AAL5 = 0x31
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ATM = 0x25
+ IFT_BRIDGE = 0xd1
+ IFT_CARP = 0xf8
+ IFT_CELLULAR = 0xff
+ IFT_CEPT = 0x13
+ IFT_DS3 = 0x1e
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0x38
+ IFT_FDDI = 0xf
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_GIF = 0x37
+ IFT_HDH1822 = 0x3
+ IFT_HIPPI = 0x2f
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE8023ADLAG = 0x88
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88026 = 0xa
+ IFT_L2VLAN = 0x87
+ IFT_LAPB = 0x10
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_NSIP = 0x1b
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PDP = 0xff
+ IFT_PFLOG = 0xf5
+ IFT_PFSYNC = 0xf6
+ IFT_PKTAP = 0xfe
+ IFT_PPP = 0x17
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PTPSERIAL = 0x16
+ IFT_RS232 = 0x21
+ IFT_SDLC = 0x11
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_STARLAN = 0xb
+ IFT_STF = 0x39
+ IFT_T1 = 0x12
+ IFT_ULTRA = 0x1d
+ IFT_V35 = 0x2d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LINKLOCALNETNUM = 0xa9fe0000
+ IN_LOOPBACKNET = 0x7f
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
+ IPPROTO_3PC = 0x22
+ IPPROTO_ADFS = 0x44
+ IPPROTO_AH = 0x33
+ IPPROTO_AHIP = 0x3d
+ IPPROTO_APES = 0x63
+ IPPROTO_ARGUS = 0xd
+ IPPROTO_AX25 = 0x5d
+ IPPROTO_BHA = 0x31
+ IPPROTO_BLT = 0x1e
+ IPPROTO_BRSATMON = 0x4c
+ IPPROTO_CFTP = 0x3e
+ IPPROTO_CHAOS = 0x10
+ IPPROTO_CMTP = 0x26
+ IPPROTO_CPHB = 0x49
+ IPPROTO_CPNX = 0x48
+ IPPROTO_DDP = 0x25
+ IPPROTO_DGP = 0x56
+ IPPROTO_DIVERT = 0xfe
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_EMCON = 0xe
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GMTP = 0x64
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HELLO = 0x3f
+ IPPROTO_HMP = 0x14
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IDPR = 0x23
+ IPPROTO_IDRP = 0x2d
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IGP = 0x55
+ IPPROTO_IGRP = 0x58
+ IPPROTO_IL = 0x28
+ IPPROTO_INLSP = 0x34
+ IPPROTO_INP = 0x20
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPCV = 0x47
+ IPPROTO_IPEIP = 0x5e
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPPC = 0x43
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_IRTP = 0x1c
+ IPPROTO_KRYPTOLAN = 0x41
+ IPPROTO_LARP = 0x5b
+ IPPROTO_LEAF1 = 0x19
+ IPPROTO_LEAF2 = 0x1a
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x34
+ IPPROTO_MEAS = 0x13
+ IPPROTO_MHRP = 0x30
+ IPPROTO_MICP = 0x5f
+ IPPROTO_MTP = 0x5c
+ IPPROTO_MUX = 0x12
+ IPPROTO_ND = 0x4d
+ IPPROTO_NHRP = 0x36
+ IPPROTO_NONE = 0x3b
+ IPPROTO_NSP = 0x1f
+ IPPROTO_NVPII = 0xb
+ IPPROTO_OSPFIGP = 0x59
+ IPPROTO_PGM = 0x71
+ IPPROTO_PIGP = 0x9
+ IPPROTO_PIM = 0x67
+ IPPROTO_PRM = 0x15
+ IPPROTO_PUP = 0xc
+ IPPROTO_PVP = 0x4b
+ IPPROTO_RAW = 0xff
+ IPPROTO_RCCMON = 0xa
+ IPPROTO_RDP = 0x1b
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_RVD = 0x42
+ IPPROTO_SATEXPAK = 0x40
+ IPPROTO_SATMON = 0x45
+ IPPROTO_SCCSP = 0x60
+ IPPROTO_SCTP = 0x84
+ IPPROTO_SDRP = 0x2a
+ IPPROTO_SEP = 0x21
+ IPPROTO_SRPC = 0x5a
+ IPPROTO_ST = 0x7
+ IPPROTO_SVMTP = 0x52
+ IPPROTO_SWIPE = 0x35
+ IPPROTO_TCF = 0x57
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_TPXX = 0x27
+ IPPROTO_TRUNK1 = 0x17
+ IPPROTO_TRUNK2 = 0x18
+ IPPROTO_TTP = 0x54
+ IPPROTO_UDP = 0x11
+ IPPROTO_VINES = 0x53
+ IPPROTO_VISA = 0x46
+ IPPROTO_VMTP = 0x51
+ IPPROTO_WBEXPAK = 0x4f
+ IPPROTO_WBMON = 0x4e
+ IPPROTO_WSN = 0x4a
+ IPPROTO_XNET = 0xf
+ IPPROTO_XTP = 0x24
+ IPV6_2292DSTOPTS = 0x17
+ IPV6_2292HOPLIMIT = 0x14
+ IPV6_2292HOPOPTS = 0x16
+ IPV6_2292NEXTHOP = 0x15
+ IPV6_2292PKTINFO = 0x13
+ IPV6_2292PKTOPTIONS = 0x19
+ IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
+ IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
+ IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
+ IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_BINDV6ONLY = 0x1b
+ IPV6_BOUND_IF = 0x7d
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x3000
+ IPV6_FRAGTTL = 0x3c
+ IPV6_FW_ADD = 0x1e
+ IPV6_FW_DEL = 0x1f
+ IPV6_FW_FLUSH = 0x20
+ IPV6_FW_GET = 0x22
+ IPV6_FW_ZERO = 0x21
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPSEC_POLICY = 0x1c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXOPTHDR = 0x800
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MAX_GROUP_SRC_FILTER = 0x200
+ IPV6_MAX_MEMBERSHIPS = 0xfff
+ IPV6_MAX_SOCK_SRC_FILTER = 0x80
+ IPV6_MIN_MEMBERSHIPS = 0x1f
+ IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x24
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_ADD_SOURCE_MEMBERSHIP = 0x46
+ IP_BLOCK_SOURCE = 0x48
+ IP_BOUND_IF = 0x19
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DONTFRAG = 0x1c
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_DROP_SOURCE_MEMBERSHIP = 0x47
+ IP_DUMMYNET_CONFIGURE = 0x3c
+ IP_DUMMYNET_DEL = 0x3d
+ IP_DUMMYNET_FLUSH = 0x3e
+ IP_DUMMYNET_GET = 0x40
+ IP_FAITH = 0x16
+ IP_FW_ADD = 0x28
+ IP_FW_DEL = 0x29
+ IP_FW_FLUSH = 0x2a
+ IP_FW_GET = 0x2c
+ IP_FW_RESETLOG = 0x2d
+ IP_FW_ZERO = 0x2b
+ IP_HDRINCL = 0x2
+ IP_IPSEC_POLICY = 0x15
+ IP_MAXPACKET = 0xffff
+ IP_MAX_GROUP_SRC_FILTER = 0x200
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MAX_SOCK_MUTE_FILTER = 0x80
+ IP_MAX_SOCK_SRC_FILTER = 0x80
+ IP_MF = 0x2000
+ IP_MIN_MEMBERSHIPS = 0x1f
+ IP_MSFILTER = 0x4a
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_IFINDEX = 0x42
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_MULTICAST_VIF = 0xe
+ IP_NAT__XXX = 0x37
+ IP_OFFMASK = 0x1fff
+ IP_OLD_FW_ADD = 0x32
+ IP_OLD_FW_DEL = 0x33
+ IP_OLD_FW_FLUSH = 0x34
+ IP_OLD_FW_GET = 0x36
+ IP_OLD_FW_RESETLOG = 0x38
+ IP_OLD_FW_ZERO = 0x35
+ IP_OPTIONS = 0x1
+ IP_PKTINFO = 0x1a
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVIF = 0x14
+ IP_RECVOPTS = 0x5
+ IP_RECVPKTINFO = 0x1a
+ IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
+ IP_RECVTTL = 0x18
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RSVP_OFF = 0x10
+ IP_RSVP_ON = 0xf
+ IP_RSVP_VIF_OFF = 0x12
+ IP_RSVP_VIF_ON = 0x11
+ IP_STRIPHDR = 0x17
+ IP_TOS = 0x3
+ IP_TRAFFIC_MGT_BACKGROUND = 0x41
+ IP_TTL = 0x4
+ IP_UNBLOCK_SOURCE = 0x49
+ ISIG = 0x80
+ ISTRIP = 0x20
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LOCAL_PEERCRED = 0x1
+ LOCAL_PEEREPID = 0x3
+ LOCAL_PEEREUUID = 0x5
+ LOCAL_PEERPID = 0x2
+ LOCAL_PEERTOKEN = 0x6
+ LOCAL_PEERUUID = 0x4
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_CAN_REUSE = 0x9
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x5
+ MADV_FREE_REUSABLE = 0x7
+ MADV_FREE_REUSE = 0x8
+ MADV_NORMAL = 0x0
+ MADV_PAGEOUT = 0xa
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_WILLNEED = 0x3
+ MADV_ZERO_WIRED_PAGES = 0x6
+ MAP_32BIT = 0x8000
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_HASSEMAPHORE = 0x200
+ MAP_JIT = 0x800
+ MAP_NOCACHE = 0x400
+ MAP_NOEXTEND = 0x100
+ MAP_NORESERVE = 0x40
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x20
+ MAP_RESERVED0080 = 0x80
+ MAP_RESILIENT_CODESIGN = 0x2000
+ MAP_RESILIENT_MEDIA = 0x4000
+ MAP_SHARED = 0x1
+ MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
+ MAP_UNIX03 = 0x40000
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_AUTOMOUNTED = 0x400000
+ MNT_CMDFLAGS = 0xf0000
+ MNT_CPROTECT = 0x80
+ MNT_DEFWRITE = 0x2000000
+ MNT_DONTBROWSE = 0x100000
+ MNT_DOVOLFS = 0x8000
+ MNT_DWAIT = 0x4
+ MNT_EXPORTED = 0x100
+ MNT_EXT_ROOT_DATA_VOL = 0x1
+ MNT_FORCE = 0x80000
+ MNT_IGNORE_OWNERSHIP = 0x200000
+ MNT_JOURNALED = 0x800000
+ MNT_LOCAL = 0x1000
+ MNT_MULTILABEL = 0x4000000
+ MNT_NOATIME = 0x10000000
+ MNT_NOBLOCK = 0x20000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOUSERXATTR = 0x1000000
+ MNT_NOWAIT = 0x2
+ MNT_QUARANTINE = 0x400
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_REMOVABLE = 0x200
+ MNT_ROOTFS = 0x4000
+ MNT_SNAPSHOT = 0x40000000
+ MNT_STRICTATIME = 0x80000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UNION = 0x20
+ MNT_UNKNOWNPERMISSIONS = 0x200000
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0xd7f0f7ff
+ MNT_WAIT = 0x1
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOF = 0x100
+ MSG_EOR = 0x8
+ MSG_FLUSH = 0x400
+ MSG_HAVEMORE = 0x2000
+ MSG_HOLD = 0x800
+ MSG_NEEDSA = 0x10000
+ MSG_NOSIGNAL = 0x80000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_RCVMORE = 0x4000
+ MSG_SEND = 0x1000
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITSTREAM = 0x200
+ MS_ASYNC = 0x1
+ MS_DEACTIVATE = 0x8
+ MS_INVALIDATE = 0x2
+ MS_KILLPAGES = 0x4
+ MS_SYNC = 0x10
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_DUMP2 = 0x7
+ NET_RT_FLAGS = 0x2
+ NET_RT_FLAGS_PRIV = 0xa
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFLIST2 = 0x6
+ NET_RT_MAXID = 0xb
+ NET_RT_STAT = 0x4
+ NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
+ NL0 = 0x0
+ NL1 = 0x100
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ABSOLUTE = 0x8
+ NOTE_ATTRIB = 0x8
+ NOTE_BACKGROUND = 0x40
+ NOTE_CHILD = 0x4
+ NOTE_CRITICAL = 0x20
+ NOTE_DELETE = 0x1
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXITSTATUS = 0x4000000
+ NOTE_EXIT_CSERROR = 0x40000
+ NOTE_EXIT_DECRYPTFAIL = 0x10000
+ NOTE_EXIT_DETAIL = 0x2000000
+ NOTE_EXIT_DETAIL_MASK = 0x70000
+ NOTE_EXIT_MEMORY = 0x20000
+ NOTE_EXIT_REPARENTED = 0x80000
+ NOTE_EXTEND = 0x4
+ NOTE_FFAND = 0x40000000
+ NOTE_FFCOPY = 0xc0000000
+ NOTE_FFCTRLMASK = 0xc0000000
+ NOTE_FFLAGSMASK = 0xffffff
+ NOTE_FFNOP = 0x0
+ NOTE_FFOR = 0x80000000
+ NOTE_FORK = 0x40000000
+ NOTE_FUNLOCK = 0x100
+ NOTE_LEEWAY = 0x10
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_MACHTIME = 0x100
+ NOTE_MACH_CONTINUOUS_TIME = 0x80
+ NOTE_NONE = 0x80
+ NOTE_NSECONDS = 0x4
+ NOTE_OOB = 0x2
+ NOTE_PCTRLMASK = -0x100000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_REAP = 0x10000000
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_SECONDS = 0x1
+ NOTE_SIGNAL = 0x8000000
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRIGGER = 0x1000000
+ NOTE_USECONDS = 0x2
+ NOTE_VM_ERROR = 0x10000000
+ NOTE_VM_PRESSURE = 0x80000000
+ NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
+ NOTE_VM_PRESSURE_TERMINATE = 0x40000000
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OFDEL = 0x20000
+ OFILL = 0x80
+ ONLCR = 0x2
+ ONLRET = 0x40
+ ONOCR = 0x20
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_ALERT = 0x20000000
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x1000000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x100000
+ O_DP_GETRAWENCRYPTED = 0x1
+ O_DP_GETRAWUNENCRYPTED = 0x2
+ O_DSYNC = 0x400000
+ O_EVTONLY = 0x8000
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x20000
+ O_NOFOLLOW = 0x100
+ O_NOFOLLOW_ANY = 0x20000000
+ O_NONBLOCK = 0x4
+ O_POPUP = 0x80000000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_SHLOCK = 0x10
+ O_SYMLINK = 0x200000
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PT_ATTACH = 0xa
+ PT_ATTACHEXC = 0xe
+ PT_CONTINUE = 0x7
+ PT_DENY_ATTACH = 0x1f
+ PT_DETACH = 0xb
+ PT_FIRSTMACH = 0x20
+ PT_FORCEQUOTA = 0x1e
+ PT_KILL = 0x8
+ PT_READ_D = 0x2
+ PT_READ_I = 0x1
+ PT_READ_U = 0x3
+ PT_SIGEXC = 0xc
+ PT_STEP = 0x9
+ PT_THUPDATE = 0xd
+ PT_TRACE_ME = 0x0
+ PT_WRITE_D = 0x5
+ PT_WRITE_I = 0x4
+ PT_WRITE_U = 0x6
+ RLIMIT_AS = 0x5
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_CPU_USAGE_MONITOR = 0x2
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BRD = 0x7
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_MAX = 0x8
+ RTAX_NETMASK = 0x2
+ RTA_AUTHOR = 0x40
+ RTA_BRD = 0x80
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_NETMASK = 0x4
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CLONING = 0x100
+ RTF_CONDEMNED = 0x2000000
+ RTF_DEAD = 0x20000000
+ RTF_DELCLONE = 0x80
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_GATEWAY = 0x2
+ RTF_GLOBAL = 0x40000000
+ RTF_HOST = 0x4
+ RTF_IFREF = 0x4000000
+ RTF_IFSCOPE = 0x1000000
+ RTF_LLDATA = 0x400
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MULTICAST = 0x800000
+ RTF_NOIFREF = 0x2000
+ RTF_PINNED = 0x100000
+ RTF_PRCLONING = 0x10000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x40000
+ RTF_PROXY = 0x8000000
+ RTF_REJECT = 0x8
+ RTF_ROUTER = 0x10000000
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_WASCLONED = 0x20000
+ RTF_XRESOLVE = 0x200
+ RTM_ADD = 0x1
+ RTM_CHANGE = 0x3
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DELMADDR = 0x10
+ RTM_GET = 0x4
+ RTM_GET2 = 0x14
+ RTM_IFINFO = 0xe
+ RTM_IFINFO2 = 0x12
+ RTM_LOCK = 0x8
+ RTM_LOSING = 0x5
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_NEWMADDR = 0xf
+ RTM_NEWMADDR2 = 0x13
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_RTTUNIT = 0xf4240
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ SCM_CREDS = 0x3
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x2
+ SCM_TIMESTAMP_MONOTONIC = 0x4
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x4
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x3
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCARPIPLL = 0xc0206928
+ SIOCATMARK = 0x40047307
+ SIOCAUTOADDR = 0xc0206926
+ SIOCAUTONETMASK = 0x80206927
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFPHYADDR = 0x80206941
+ SIOCGDRVSPEC = 0xc028697b
+ SIOCGETVLAN = 0xc020697f
+ SIOCGHIWAT = 0x40047301
+ SIOCGIF6LOWPAN = 0xc02069c5
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFALTMTU = 0xc0206948
+ SIOCGIFASYNCMAP = 0xc020697c
+ SIOCGIFBOND = 0xc0206947
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCAP = 0xc020695b
+ SIOCGIFCONF = 0xc00c6924
+ SIOCGIFDEVMTU = 0xc0206944
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFFUNCTIONALTYPE = 0xc02069ad
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFKPI = 0xc0206987
+ SIOCGIFMAC = 0xc0206982
+ SIOCGIFMEDIA = 0xc02c6938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc0206933
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPDSTADDR = 0xc0206940
+ SIOCGIFPHYS = 0xc0206935
+ SIOCGIFPSRCADDR = 0xc020693f
+ SIOCGIFSTATUS = 0xc331693d
+ SIOCGIFVLAN = 0xc020697f
+ SIOCGIFWAKEFLAGS = 0xc0206988
+ SIOCGIFXMEDIA = 0xc02c6948
+ SIOCGLOWAT = 0x40047303
+ SIOCGPGRP = 0x40047309
+ SIOCIFCREATE = 0xc0206978
+ SIOCIFCREATE2 = 0xc020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106981
+ SIOCRSLVMULTI = 0xc010693b
+ SIOCSDRVSPEC = 0x8028697b
+ SIOCSETVLAN = 0x8020697e
+ SIOCSHIWAT = 0x80047300
+ SIOCSIF6LOWPAN = 0x802069c4
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFALTMTU = 0x80206945
+ SIOCSIFASYNCMAP = 0x8020697d
+ SIOCSIFBOND = 0x80206946
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFCAP = 0x8020695a
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFKPI = 0x80206986
+ SIOCSIFLLADDR = 0x8020693c
+ SIOCSIFMAC = 0x80206983
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x80206934
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPHYADDR = 0x8040693e
+ SIOCSIFPHYS = 0x80206936
+ SIOCSIFVLAN = 0x8020697e
+ SIOCSLOWAT = 0x80047302
+ SIOCSPGRP = 0x80047308
+ SOCK_DGRAM = 0x2
+ SOCK_MAXADDRLEN = 0xff
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DONTROUTE = 0x10
+ SO_DONTTRUNC = 0x2000
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LABEL = 0x1010
+ SO_LINGER = 0x80
+ SO_LINGER_SEC = 0x1080
+ SO_NETSVC_MARKING_LEVEL = 0x1119
+ SO_NET_SERVICE_TYPE = 0x1116
+ SO_NKE = 0x1021
+ SO_NOADDRERR = 0x1023
+ SO_NOSIGPIPE = 0x1022
+ SO_NOTIFYCONFLICT = 0x1026
+ SO_NP_EXTENSIONS = 0x1083
+ SO_NREAD = 0x1020
+ SO_NUMRCVPKT = 0x1112
+ SO_NWRITE = 0x1024
+ SO_OOBINLINE = 0x100
+ SO_PEERLABEL = 0x1011
+ SO_RANDOMPORT = 0x1082
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_REUSESHAREUID = 0x1025
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TIMESTAMP = 0x400
+ SO_TIMESTAMP_MONOTONIC = 0x800
+ SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
+ SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
+ SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
+ SO_TRACKER_TRANSPARENCY_VERSION = 0x3
+ SO_TYPE = 0x1008
+ SO_UPCALLCLOSEWAIT = 0x1027
+ SO_USELOOPBACK = 0x40
+ SO_WANTMORE = 0x4000
+ SO_WANTOOBFLAG = 0x8000
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IFWHT = 0xe000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0x4
+ TABDLY = 0xc04
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_CC = 0xb
+ TCPOPT_CCECHO = 0xd
+ TCPOPT_CCNEW = 0xc
+ TCPOPT_EOL = 0x0
+ TCPOPT_FASTOPEN = 0x22
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_CONNECTIONTIMEOUT = 0x20
+ TCP_CONNECTION_INFO = 0x106
+ TCP_ENABLE_ECN = 0x104
+ TCP_FASTOPEN = 0x105
+ TCP_KEEPALIVE = 0x10
+ TCP_KEEPCNT = 0x102
+ TCP_KEEPINTVL = 0x101
+ TCP_MAXHLEN = 0x3c
+ TCP_MAXOLEN = 0x28
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x4
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MINMSS = 0xd8
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOOPT = 0x8
+ TCP_NOPUSH = 0x4
+ TCP_NOTSENT_LOWAT = 0x201
+ TCP_RXT_CONNDROPTIME = 0x80
+ TCP_RXT_FINDROP = 0x100
+ TCP_SENDMOREACKS = 0x103
+ TCSAFLUSH = 0x2
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCONS = 0x80047462
+ TIOCDCDTIMESTAMP = 0x40107458
+ TIOCDRAIN = 0x2000745e
+ TIOCDSIMICROCODE = 0x20007455
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLUSH = 0x80047410
+ TIOCGDRAINWAIT = 0x40047456
+ TIOCGETA = 0x40487413
+ TIOCGETD = 0x4004741a
+ TIOCGPGRP = 0x40047477
+ TIOCGWINSZ = 0x40087468
+ TIOCIXOFF = 0x20007480
+ TIOCIXON = 0x20007481
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGDTRWAIT = 0x4004745a
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x40047403
+ TIOCMODS = 0x80047404
+ TIOCMSDTRWAIT = 0x8004745b
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCPTYGNAME = 0x40807453
+ TIOCPTYGRANT = 0x20007454
+ TIOCPTYUNLK = 0x20007452
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCONS = 0x20007463
+ TIOCSCTTY = 0x20007461
+ TIOCSDRAINWAIT = 0x80047457
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x80487414
+ TIOCSETAF = 0x80487416
+ TIOCSETAW = 0x80487415
+ TIOCSETD = 0x8004741b
+ TIOCSIG = 0x2000745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCTIMESTAMP = 0x40107459
+ TIOCUCNTL = 0x80047466
+ TOSTOP = 0x400000
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMADDR_CID_ANY = 0xffffffff
+ VMADDR_CID_HOST = 0x2
+ VMADDR_CID_HYPERVISOR = 0x0
+ VMADDR_CID_RESERVED = 0x1
+ VMADDR_PORT_ANY = 0xffffffff
+ VMIN = 0x10
+ VM_LOADAVG = 0x2
+ VM_MACHFACTOR = 0x4
+ VM_MAXID = 0x6
+ VM_METER = 0x1
+ VM_SWAPUSAGE = 0x5
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VT0 = 0x0
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x11
+ VWERASE = 0x4
+ WCONTINUED = 0x10
+ WCOREFLAG = 0x80
+ WEXITED = 0x4
+ WNOHANG = 0x1
+ WNOWAIT = 0x20
+ WORDSIZE = 0x40
+ WSTOPPED = 0x8
+ WUNTRACED = 0x2
+ XATTR_CREATE = 0x2
+ XATTR_NODEFAULT = 0x10
+ XATTR_NOFOLLOW = 0x1
+ XATTR_NOSECURITY = 0x8
+ XATTR_REPLACE = 0x4
+ XATTR_SHOWCOMPRESSION = 0x20
)
// Errors
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index 31009d7f..e36f5178 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -12,1556 +12,1582 @@ package unix
import "syscall"
const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_SYS_CONTROL = 0x2
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- AF_VSOCK = 0x28
- ALTWERASE = 0x200
- ATTR_BIT_MAP_COUNT = 0x5
- ATTR_CMN_ACCESSMASK = 0x20000
- ATTR_CMN_ACCTIME = 0x1000
- ATTR_CMN_ADDEDTIME = 0x10000000
- ATTR_CMN_BKUPTIME = 0x2000
- ATTR_CMN_CHGTIME = 0x800
- ATTR_CMN_CRTIME = 0x200
- ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
- ATTR_CMN_DEVID = 0x2
- ATTR_CMN_DOCUMENT_ID = 0x100000
- ATTR_CMN_ERROR = 0x20000000
- ATTR_CMN_EXTENDED_SECURITY = 0x400000
- ATTR_CMN_FILEID = 0x2000000
- ATTR_CMN_FLAGS = 0x40000
- ATTR_CMN_FNDRINFO = 0x4000
- ATTR_CMN_FSID = 0x4
- ATTR_CMN_FULLPATH = 0x8000000
- ATTR_CMN_GEN_COUNT = 0x80000
- ATTR_CMN_GRPID = 0x10000
- ATTR_CMN_GRPUUID = 0x1000000
- ATTR_CMN_MODTIME = 0x400
- ATTR_CMN_NAME = 0x1
- ATTR_CMN_NAMEDATTRCOUNT = 0x80000
- ATTR_CMN_NAMEDATTRLIST = 0x100000
- ATTR_CMN_OBJID = 0x20
- ATTR_CMN_OBJPERMANENTID = 0x40
- ATTR_CMN_OBJTAG = 0x10
- ATTR_CMN_OBJTYPE = 0x8
- ATTR_CMN_OWNERID = 0x8000
- ATTR_CMN_PARENTID = 0x4000000
- ATTR_CMN_PAROBJID = 0x80
- ATTR_CMN_RETURNED_ATTRS = 0x80000000
- ATTR_CMN_SCRIPT = 0x100
- ATTR_CMN_SETMASK = 0x51c7ff00
- ATTR_CMN_USERACCESS = 0x200000
- ATTR_CMN_UUID = 0x800000
- ATTR_CMN_VALIDMASK = 0xffffffff
- ATTR_CMN_VOLSETMASK = 0x6700
- ATTR_FILE_ALLOCSIZE = 0x4
- ATTR_FILE_CLUMPSIZE = 0x10
- ATTR_FILE_DATAALLOCSIZE = 0x400
- ATTR_FILE_DATAEXTENTS = 0x800
- ATTR_FILE_DATALENGTH = 0x200
- ATTR_FILE_DEVTYPE = 0x20
- ATTR_FILE_FILETYPE = 0x40
- ATTR_FILE_FORKCOUNT = 0x80
- ATTR_FILE_FORKLIST = 0x100
- ATTR_FILE_IOBLOCKSIZE = 0x8
- ATTR_FILE_LINKCOUNT = 0x1
- ATTR_FILE_RSRCALLOCSIZE = 0x2000
- ATTR_FILE_RSRCEXTENTS = 0x4000
- ATTR_FILE_RSRCLENGTH = 0x1000
- ATTR_FILE_SETMASK = 0x20
- ATTR_FILE_TOTALSIZE = 0x2
- ATTR_FILE_VALIDMASK = 0x37ff
- ATTR_VOL_ALLOCATIONCLUMP = 0x40
- ATTR_VOL_ATTRIBUTES = 0x40000000
- ATTR_VOL_CAPABILITIES = 0x20000
- ATTR_VOL_DIRCOUNT = 0x400
- ATTR_VOL_ENCODINGSUSED = 0x10000
- ATTR_VOL_FILECOUNT = 0x200
- ATTR_VOL_FSTYPE = 0x1
- ATTR_VOL_INFO = 0x80000000
- ATTR_VOL_IOBLOCKSIZE = 0x80
- ATTR_VOL_MAXOBJCOUNT = 0x800
- ATTR_VOL_MINALLOCATION = 0x20
- ATTR_VOL_MOUNTEDDEVICE = 0x8000
- ATTR_VOL_MOUNTFLAGS = 0x4000
- ATTR_VOL_MOUNTPOINT = 0x1000
- ATTR_VOL_NAME = 0x2000
- ATTR_VOL_OBJCOUNT = 0x100
- ATTR_VOL_QUOTA_SIZE = 0x10000000
- ATTR_VOL_RESERVED_SIZE = 0x20000000
- ATTR_VOL_SETMASK = 0x80002000
- ATTR_VOL_SIGNATURE = 0x2
- ATTR_VOL_SIZE = 0x4
- ATTR_VOL_SPACEAVAIL = 0x10
- ATTR_VOL_SPACEFREE = 0x8
- ATTR_VOL_UUID = 0x40000
- ATTR_VOL_VALIDMASK = 0xf007ffff
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x8010427e
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLOCK_MONOTONIC = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_MONOTONIC_RAW_APPROX = 0x5
- CLOCK_PROCESS_CPUTIME_ID = 0xc
- CLOCK_REALTIME = 0x0
- CLOCK_THREAD_CPUTIME_ID = 0x10
- CLOCK_UPTIME_RAW = 0x8
- CLOCK_UPTIME_RAW_APPROX = 0x9
- CLONE_NOFOLLOW = 0x1
- CLONE_NOOWNERCOPY = 0x2
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x30000
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTLIOCGINFO = 0xc0644e03
- CTL_HW = 0x6
- CTL_KERN = 0x1
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x10a
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_DARWIN = 0x10a
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0xf
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x11
- EVFILT_THREADMARKER = 0x11
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DISPATCH2 = 0x180
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EV_UDATA_SPECIFIC = 0x100
- EV_VANISHED = 0x200
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSOPT_ATTR_CMN_EXTENDED = 0x20
- FSOPT_NOFOLLOW = 0x1
- FSOPT_NOINMEMUPDATE = 0x2
- FSOPT_PACK_INVAL_ATTRS = 0x8
- FSOPT_REPORT_FULLSIZE = 0x4
- FSOPT_RETURN_REALDEV = 0x200
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_INFO = 0x67
- F_ADDFILESIGS_RETURN = 0x61
- F_ADDFILESUPPL = 0x68
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_BARRIERFSYNC = 0x55
- F_CHECK_LV = 0x62
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPATH_NOFIRMLINK = 0x66
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GETSIGSINFO = 0x69
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_PUNCHHOLE = 0x63
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_SPECULATIVE_READ = 0x65
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_TRIM_ACTIVE_FILE = 0x64
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- HW_MACHINE = 0x1
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_6LOWPAN = 0x40
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_3542DSTOPTS = 0x32
- IPV6_3542HOPLIMIT = 0x2f
- IPV6_3542HOPOPTS = 0x31
- IPV6_3542NEXTHOP = 0x30
- IPV6_3542PKTINFO = 0x2e
- IPV6_3542RTHDR = 0x33
- IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
- IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
- IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x3000
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x3d
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x39
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x1c
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x1b
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- KERN_HOSTNAME = 0xa
- KERN_OSRELEASE = 0x2
- KERN_OSTYPE = 0x1
- KERN_VERSION = 0x4
- LOCAL_PEERCRED = 0x1
- LOCAL_PEEREPID = 0x3
- LOCAL_PEEREUUID = 0x5
- LOCAL_PEERPID = 0x2
- LOCAL_PEERTOKEN = 0x6
- LOCAL_PEERUUID = 0x4
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_32BIT = 0x8000
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESILIENT_CODESIGN = 0x2000
- MAP_RESILIENT_MEDIA = 0x4000
- MAP_SHARED = 0x1
- MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
- MAP_UNIX03 = 0x40000
- MCAST_BLOCK_SOURCE = 0x54
- MCAST_EXCLUDE = 0x2
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x50
- MCAST_JOIN_SOURCE_GROUP = 0x52
- MCAST_LEAVE_GROUP = 0x51
- MCAST_LEAVE_SOURCE_GROUP = 0x53
- MCAST_UNBLOCK_SOURCE = 0x55
- MCAST_UNDEFINED = 0x0
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_ASYNC = 0x40
- MNT_AUTOMOUNTED = 0x400000
- MNT_CMDFLAGS = 0xf0000
- MNT_CPROTECT = 0x80
- MNT_DEFWRITE = 0x2000000
- MNT_DONTBROWSE = 0x100000
- MNT_DOVOLFS = 0x8000
- MNT_DWAIT = 0x4
- MNT_EXPORTED = 0x100
- MNT_EXT_ROOT_DATA_VOL = 0x1
- MNT_FORCE = 0x80000
- MNT_IGNORE_OWNERSHIP = 0x200000
- MNT_JOURNALED = 0x800000
- MNT_LOCAL = 0x1000
- MNT_MULTILABEL = 0x4000000
- MNT_NOATIME = 0x10000000
- MNT_NOBLOCK = 0x20000
- MNT_NODEV = 0x10
- MNT_NOEXEC = 0x4
- MNT_NOSUID = 0x8
- MNT_NOUSERXATTR = 0x1000000
- MNT_NOWAIT = 0x2
- MNT_QUARANTINE = 0x400
- MNT_QUOTA = 0x2000
- MNT_RDONLY = 0x1
- MNT_RELOAD = 0x40000
- MNT_REMOVABLE = 0x200
- MNT_ROOTFS = 0x4000
- MNT_SNAPSHOT = 0x40000000
- MNT_STRICTATIME = 0x80000000
- MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
- MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0xd7f0f7ff
- MNT_WAIT = 0x1
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_NOSIGNAL = 0x80000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_FLAGS_PRIV = 0xa
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xb
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NFDBITS = 0x20
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLDLY = 0x300
- NOFLSH = 0x80000000
- NOKERNINFO = 0x2000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_FUNLOCK = 0x100
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_MACHTIME = 0x100
- NOTE_MACH_CONTINUOUS_TIME = 0x80
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- OXTABS = 0x4
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DP_GETRAWUNENCRYPTED = 0x2
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NOFOLLOW_ANY = 0x20000000
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_MEMLOCK = 0x6
- RLIMIT_NOFILE = 0x8
- RLIMIT_NPROC = 0x7
- RLIMIT_RSS = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DEAD = 0x20000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_GLOBAL = 0x40000000
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SEEK_CUR = 0x1
- SEEK_DATA = 0x4
- SEEK_END = 0x2
- SEEK_HOLE = 0x3
- SEEK_SET = 0x0
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIF6LOWPAN = 0xc02069c5
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFFUNCTIONALTYPE = 0xc02069ad
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGIFXMEDIA = 0xc02c6948
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIF6LOWPAN = 0x802069c4
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_LOCAL = 0x0
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NETSVC_MARKING_LEVEL = 0x1119
- SO_NET_SERVICE_TYPE = 0x1116
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0x4
- TABDLY = 0xc04
- TCIFLUSH = 0x1
- TCIOFF = 0x3
- TCIOFLUSH = 0x3
- TCION = 0x4
- TCOFLUSH = 0x2
- TCOOFF = 0x1
- TCOON = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_CONNECTION_INFO = 0x106
- TCP_ENABLE_ECN = 0x104
- TCP_FASTOPEN = 0x105
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VM_LOADAVG = 0x2
- VM_MACHFACTOR = 0x4
- VM_MAXID = 0x6
- VM_METER = 0x1
- VM_SWAPUSAGE = 0x5
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
- XATTR_CREATE = 0x2
- XATTR_NODEFAULT = 0x10
- XATTR_NOFOLLOW = 0x1
- XATTR_NOSECURITY = 0x8
- XATTR_REPLACE = 0x4
- XATTR_SHOWCOMPRESSION = 0x20
+ AF_APPLETALK = 0x10
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1c
+ AF_ECMA = 0x8
+ AF_HYLINK = 0xf
+ AF_IEEE80211 = 0x25
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x1e
+ AF_IPX = 0x17
+ AF_ISDN = 0x1c
+ AF_ISO = 0x7
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x29
+ AF_NATM = 0x1f
+ AF_NDRV = 0x1b
+ AF_NETBIOS = 0x21
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PPP = 0x22
+ AF_PUP = 0x4
+ AF_RESERVED_36 = 0x24
+ AF_ROUTE = 0x11
+ AF_SIP = 0x18
+ AF_SNA = 0xb
+ AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_UTUN = 0x26
+ AF_VSOCK = 0x28
+ ALTWERASE = 0x200
+ ATTR_BIT_MAP_COUNT = 0x5
+ ATTR_CMN_ACCESSMASK = 0x20000
+ ATTR_CMN_ACCTIME = 0x1000
+ ATTR_CMN_ADDEDTIME = 0x10000000
+ ATTR_CMN_BKUPTIME = 0x2000
+ ATTR_CMN_CHGTIME = 0x800
+ ATTR_CMN_CRTIME = 0x200
+ ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
+ ATTR_CMN_DEVID = 0x2
+ ATTR_CMN_DOCUMENT_ID = 0x100000
+ ATTR_CMN_ERROR = 0x20000000
+ ATTR_CMN_EXTENDED_SECURITY = 0x400000
+ ATTR_CMN_FILEID = 0x2000000
+ ATTR_CMN_FLAGS = 0x40000
+ ATTR_CMN_FNDRINFO = 0x4000
+ ATTR_CMN_FSID = 0x4
+ ATTR_CMN_FULLPATH = 0x8000000
+ ATTR_CMN_GEN_COUNT = 0x80000
+ ATTR_CMN_GRPID = 0x10000
+ ATTR_CMN_GRPUUID = 0x1000000
+ ATTR_CMN_MODTIME = 0x400
+ ATTR_CMN_NAME = 0x1
+ ATTR_CMN_NAMEDATTRCOUNT = 0x80000
+ ATTR_CMN_NAMEDATTRLIST = 0x100000
+ ATTR_CMN_OBJID = 0x20
+ ATTR_CMN_OBJPERMANENTID = 0x40
+ ATTR_CMN_OBJTAG = 0x10
+ ATTR_CMN_OBJTYPE = 0x8
+ ATTR_CMN_OWNERID = 0x8000
+ ATTR_CMN_PARENTID = 0x4000000
+ ATTR_CMN_PAROBJID = 0x80
+ ATTR_CMN_RETURNED_ATTRS = 0x80000000
+ ATTR_CMN_SCRIPT = 0x100
+ ATTR_CMN_SETMASK = 0x51c7ff00
+ ATTR_CMN_USERACCESS = 0x200000
+ ATTR_CMN_UUID = 0x800000
+ ATTR_CMN_VALIDMASK = 0xffffffff
+ ATTR_CMN_VOLSETMASK = 0x6700
+ ATTR_FILE_ALLOCSIZE = 0x4
+ ATTR_FILE_CLUMPSIZE = 0x10
+ ATTR_FILE_DATAALLOCSIZE = 0x400
+ ATTR_FILE_DATAEXTENTS = 0x800
+ ATTR_FILE_DATALENGTH = 0x200
+ ATTR_FILE_DEVTYPE = 0x20
+ ATTR_FILE_FILETYPE = 0x40
+ ATTR_FILE_FORKCOUNT = 0x80
+ ATTR_FILE_FORKLIST = 0x100
+ ATTR_FILE_IOBLOCKSIZE = 0x8
+ ATTR_FILE_LINKCOUNT = 0x1
+ ATTR_FILE_RSRCALLOCSIZE = 0x2000
+ ATTR_FILE_RSRCEXTENTS = 0x4000
+ ATTR_FILE_RSRCLENGTH = 0x1000
+ ATTR_FILE_SETMASK = 0x20
+ ATTR_FILE_TOTALSIZE = 0x2
+ ATTR_FILE_VALIDMASK = 0x37ff
+ ATTR_VOL_ALLOCATIONCLUMP = 0x40
+ ATTR_VOL_ATTRIBUTES = 0x40000000
+ ATTR_VOL_CAPABILITIES = 0x20000
+ ATTR_VOL_DIRCOUNT = 0x400
+ ATTR_VOL_ENCODINGSUSED = 0x10000
+ ATTR_VOL_FILECOUNT = 0x200
+ ATTR_VOL_FSTYPE = 0x1
+ ATTR_VOL_INFO = 0x80000000
+ ATTR_VOL_IOBLOCKSIZE = 0x80
+ ATTR_VOL_MAXOBJCOUNT = 0x800
+ ATTR_VOL_MINALLOCATION = 0x20
+ ATTR_VOL_MOUNTEDDEVICE = 0x8000
+ ATTR_VOL_MOUNTFLAGS = 0x4000
+ ATTR_VOL_MOUNTPOINT = 0x1000
+ ATTR_VOL_NAME = 0x2000
+ ATTR_VOL_OBJCOUNT = 0x100
+ ATTR_VOL_QUOTA_SIZE = 0x10000000
+ ATTR_VOL_RESERVED_SIZE = 0x20000000
+ ATTR_VOL_SETMASK = 0x80002000
+ ATTR_VOL_SIGNATURE = 0x2
+ ATTR_VOL_SIZE = 0x4
+ ATTR_VOL_SPACEAVAIL = 0x10
+ ATTR_VOL_SPACEFREE = 0x8
+ ATTR_VOL_SPACEUSED = 0x800000
+ ATTR_VOL_UUID = 0x40000
+ ATTR_VOL_VALIDMASK = 0xf087ffff
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc00c4279
+ BIOCGETIF = 0x4020426b
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044272
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSEESENT = 0x40044276
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDLT = 0x80044278
+ BIOCSETF = 0x80104267
+ BIOCSETFNR = 0x8010427e
+ BIOCSETIF = 0x8020426c
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044273
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCSSEESENT = 0x80044277
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIV = 0x30
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x80000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_MONOTONIC = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_MONOTONIC_RAW_APPROX = 0x5
+ CLOCK_PROCESS_CPUTIME_ID = 0xc
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x10
+ CLOCK_UPTIME_RAW = 0x8
+ CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
+ CR0 = 0x0
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CRTSCTS = 0x30000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0x14
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DLT_A429 = 0xb8
+ DLT_A653_ICM = 0xb9
+ DLT_AIRONET_HEADER = 0x78
+ DLT_AOS = 0xde
+ DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
+ DLT_ARCNET = 0x7
+ DLT_ARCNET_LINUX = 0x81
+ DLT_ATM_CLIP = 0x13
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AURORA = 0x7e
+ DLT_AX25 = 0x3
+ DLT_AX25_KISS = 0xca
+ DLT_BACNET_MS_TP = 0xa5
+ DLT_BLUETOOTH_HCI_H4 = 0xbb
+ DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
+ DLT_CAN20B = 0xbe
+ DLT_CAN_SOCKETCAN = 0xe3
+ DLT_CHAOS = 0x5
+ DLT_CHDLC = 0x68
+ DLT_CISCO_IOS = 0x76
+ DLT_C_HDLC = 0x68
+ DLT_C_HDLC_WITH_DIR = 0xcd
+ DLT_DBUS = 0xe7
+ DLT_DECT = 0xdd
+ DLT_DOCSIS = 0x8f
+ DLT_DVB_CI = 0xeb
+ DLT_ECONET = 0x73
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0x6d
+ DLT_ERF = 0xc5
+ DLT_ERF_ETH = 0xaf
+ DLT_ERF_POS = 0xb0
+ DLT_FC_2 = 0xe0
+ DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
+ DLT_FDDI = 0xa
+ DLT_FLEXRAY = 0xd2
+ DLT_FRELAY = 0x6b
+ DLT_FRELAY_WITH_DIR = 0xce
+ DLT_GCOM_SERIAL = 0xad
+ DLT_GCOM_T1E1 = 0xac
+ DLT_GPF_F = 0xab
+ DLT_GPF_T = 0xaa
+ DLT_GPRS_LLC = 0xa9
+ DLT_GSMTAP_ABIS = 0xda
+ DLT_GSMTAP_UM = 0xd9
+ DLT_HHDLC = 0x79
+ DLT_IBM_SN = 0x92
+ DLT_IBM_SP = 0x91
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_IEEE802_11_RADIO_AVS = 0xa3
+ DLT_IEEE802_15_4 = 0xc3
+ DLT_IEEE802_15_4_LINUX = 0xbf
+ DLT_IEEE802_15_4_NOFCS = 0xe6
+ DLT_IEEE802_15_4_NONASK_PHY = 0xd7
+ DLT_IEEE802_16_MAC_CPS = 0xbc
+ DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
+ DLT_IPFILTER = 0x74
+ DLT_IPMB = 0xc7
+ DLT_IPMB_LINUX = 0xd1
+ DLT_IPNET = 0xe2
+ DLT_IPOIB = 0xf2
+ DLT_IPV4 = 0xe4
+ DLT_IPV6 = 0xe5
+ DLT_IP_OVER_FC = 0x7a
+ DLT_JUNIPER_ATM1 = 0x89
+ DLT_JUNIPER_ATM2 = 0x87
+ DLT_JUNIPER_ATM_CEMIC = 0xee
+ DLT_JUNIPER_CHDLC = 0xb5
+ DLT_JUNIPER_ES = 0x84
+ DLT_JUNIPER_ETHER = 0xb2
+ DLT_JUNIPER_FIBRECHANNEL = 0xea
+ DLT_JUNIPER_FRELAY = 0xb4
+ DLT_JUNIPER_GGSN = 0x85
+ DLT_JUNIPER_ISM = 0xc2
+ DLT_JUNIPER_MFR = 0x86
+ DLT_JUNIPER_MLFR = 0x83
+ DLT_JUNIPER_MLPPP = 0x82
+ DLT_JUNIPER_MONITOR = 0xa4
+ DLT_JUNIPER_PIC_PEER = 0xae
+ DLT_JUNIPER_PPP = 0xb3
+ DLT_JUNIPER_PPPOE = 0xa7
+ DLT_JUNIPER_PPPOE_ATM = 0xa8
+ DLT_JUNIPER_SERVICES = 0x88
+ DLT_JUNIPER_SRX_E2E = 0xe9
+ DLT_JUNIPER_ST = 0xc8
+ DLT_JUNIPER_VP = 0xb7
+ DLT_JUNIPER_VS = 0xe8
+ DLT_LAPB_WITH_DIR = 0xcf
+ DLT_LAPD = 0xcb
+ DLT_LIN = 0xd4
+ DLT_LINUX_EVDEV = 0xd8
+ DLT_LINUX_IRDA = 0x90
+ DLT_LINUX_LAPD = 0xb1
+ DLT_LINUX_PPP_WITHDIRECTION = 0xa6
+ DLT_LINUX_SLL = 0x71
+ DLT_LOOP = 0x6c
+ DLT_LTALK = 0x72
+ DLT_MATCHING_MAX = 0x10a
+ DLT_MATCHING_MIN = 0x68
+ DLT_MFR = 0xb6
+ DLT_MOST = 0xd3
+ DLT_MPEG_2_TS = 0xf3
+ DLT_MPLS = 0xdb
+ DLT_MTP2 = 0x8c
+ DLT_MTP2_WITH_PHDR = 0x8b
+ DLT_MTP3 = 0x8d
+ DLT_MUX27010 = 0xec
+ DLT_NETANALYZER = 0xf0
+ DLT_NETANALYZER_TRANSPARENT = 0xf1
+ DLT_NFC_LLCP = 0xf5
+ DLT_NFLOG = 0xef
+ DLT_NG40 = 0xf4
+ DLT_NULL = 0x0
+ DLT_PCI_EXP = 0x7d
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPI = 0xc0
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_PPPD = 0xa6
+ DLT_PPP_SERIAL = 0x32
+ DLT_PPP_WITH_DIR = 0xcc
+ DLT_PPP_WITH_DIRECTION = 0xa6
+ DLT_PRISM_HEADER = 0x77
+ DLT_PRONET = 0x4
+ DLT_RAIF1 = 0xc6
+ DLT_RAW = 0xc
+ DLT_RIO = 0x7c
+ DLT_SCCP = 0x8e
+ DLT_SITA = 0xc4
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_STANAG_5066_D_PDU = 0xed
+ DLT_SUNATM = 0x7b
+ DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TZSP = 0x80
+ DLT_USB = 0xba
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_LINUX = 0xbd
+ DLT_USB_LINUX_MMAPPED = 0xdc
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DLT_WIHART = 0xdf
+ DLT_X2E_SERIAL = 0xd5
+ DLT_X2E_XORAYA = 0xd6
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EVFILT_AIO = -0x3
+ EVFILT_EXCEPT = -0xf
+ EVFILT_FS = -0x9
+ EVFILT_MACHPORT = -0x8
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x11
+ EVFILT_THREADMARKER = 0x11
+ EVFILT_TIMER = -0x7
+ EVFILT_USER = -0xa
+ EVFILT_VM = -0xc
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_DISPATCH2 = 0x180
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG0 = 0x1000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_OOBAND = 0x2000
+ EV_POLL = 0x1000
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf000
+ EV_UDATA_SPECIFIC = 0x100
+ EV_VANISHED = 0x200
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FLUSHO = 0x800000
+ FSOPT_ATTR_CMN_EXTENDED = 0x20
+ FSOPT_NOFOLLOW = 0x1
+ FSOPT_NOINMEMUPDATE = 0x2
+ FSOPT_PACK_INVAL_ATTRS = 0x8
+ FSOPT_REPORT_FULLSIZE = 0x4
+ FSOPT_RETURN_REALDEV = 0x200
+ F_ADDFILESIGS = 0x3d
+ F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
+ F_ADDFILESIGS_INFO = 0x67
+ F_ADDFILESIGS_RETURN = 0x61
+ F_ADDFILESUPPL = 0x68
+ F_ADDSIGS = 0x3b
+ F_ALLOCATEALL = 0x4
+ F_ALLOCATECONTIG = 0x2
+ F_BARRIERFSYNC = 0x55
+ F_CHECK_LV = 0x62
+ F_CHKCLEAN = 0x29
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x43
+ F_FINDSIGS = 0x4e
+ F_FLUSH_DATA = 0x28
+ F_FREEZE_FS = 0x35
+ F_FULLFSYNC = 0x33
+ F_GETCODEDIR = 0x48
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETLKPID = 0x42
+ F_GETNOSIGPIPE = 0x4a
+ F_GETOWN = 0x5
+ F_GETPATH = 0x32
+ F_GETPATH_MTMINFO = 0x47
+ F_GETPATH_NOFIRMLINK = 0x66
+ F_GETPROTECTIONCLASS = 0x3f
+ F_GETPROTECTIONLEVEL = 0x4d
+ F_GETSIGSINFO = 0x69
+ F_GLOBAL_NOCACHE = 0x37
+ F_LOG2PHYS = 0x31
+ F_LOG2PHYS_EXT = 0x41
+ F_NOCACHE = 0x30
+ F_NODIRECT = 0x3e
+ F_OK = 0x0
+ F_PATHPKG_CHECK = 0x34
+ F_PEOFPOSMODE = 0x3
+ F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
+ F_RDADVISE = 0x2c
+ F_RDAHEAD = 0x2d
+ F_RDLCK = 0x1
+ F_SETBACKINGSTORE = 0x46
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETLKWTIMEOUT = 0xa
+ F_SETNOSIGPIPE = 0x49
+ F_SETOWN = 0x6
+ F_SETPROTECTIONCLASS = 0x40
+ F_SETSIZE = 0x2b
+ F_SINGLE_WRITER = 0x4c
+ F_SPECULATIVE_READ = 0x65
+ F_THAW_FS = 0x36
+ F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
+ F_UNLCK = 0x2
+ F_VOLPOSMODE = 0x4
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFF_ALLMULTI = 0x200
+ IFF_ALTPHYS = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_NOTRAILERS = 0x20
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_6LOWPAN = 0x40
+ IFT_AAL5 = 0x31
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ATM = 0x25
+ IFT_BRIDGE = 0xd1
+ IFT_CARP = 0xf8
+ IFT_CELLULAR = 0xff
+ IFT_CEPT = 0x13
+ IFT_DS3 = 0x1e
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0x38
+ IFT_FDDI = 0xf
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_GIF = 0x37
+ IFT_HDH1822 = 0x3
+ IFT_HIPPI = 0x2f
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE8023ADLAG = 0x88
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88026 = 0xa
+ IFT_L2VLAN = 0x87
+ IFT_LAPB = 0x10
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_NSIP = 0x1b
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PDP = 0xff
+ IFT_PFLOG = 0xf5
+ IFT_PFSYNC = 0xf6
+ IFT_PKTAP = 0xfe
+ IFT_PPP = 0x17
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PTPSERIAL = 0x16
+ IFT_RS232 = 0x21
+ IFT_SDLC = 0x11
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_STARLAN = 0xb
+ IFT_STF = 0x39
+ IFT_T1 = 0x12
+ IFT_ULTRA = 0x1d
+ IFT_V35 = 0x2d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LINKLOCALNETNUM = 0xa9fe0000
+ IN_LOOPBACKNET = 0x7f
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
+ IPPROTO_3PC = 0x22
+ IPPROTO_ADFS = 0x44
+ IPPROTO_AH = 0x33
+ IPPROTO_AHIP = 0x3d
+ IPPROTO_APES = 0x63
+ IPPROTO_ARGUS = 0xd
+ IPPROTO_AX25 = 0x5d
+ IPPROTO_BHA = 0x31
+ IPPROTO_BLT = 0x1e
+ IPPROTO_BRSATMON = 0x4c
+ IPPROTO_CFTP = 0x3e
+ IPPROTO_CHAOS = 0x10
+ IPPROTO_CMTP = 0x26
+ IPPROTO_CPHB = 0x49
+ IPPROTO_CPNX = 0x48
+ IPPROTO_DDP = 0x25
+ IPPROTO_DGP = 0x56
+ IPPROTO_DIVERT = 0xfe
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_EMCON = 0xe
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GMTP = 0x64
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HELLO = 0x3f
+ IPPROTO_HMP = 0x14
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IDPR = 0x23
+ IPPROTO_IDRP = 0x2d
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IGP = 0x55
+ IPPROTO_IGRP = 0x58
+ IPPROTO_IL = 0x28
+ IPPROTO_INLSP = 0x34
+ IPPROTO_INP = 0x20
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPCV = 0x47
+ IPPROTO_IPEIP = 0x5e
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPPC = 0x43
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_IRTP = 0x1c
+ IPPROTO_KRYPTOLAN = 0x41
+ IPPROTO_LARP = 0x5b
+ IPPROTO_LEAF1 = 0x19
+ IPPROTO_LEAF2 = 0x1a
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x34
+ IPPROTO_MEAS = 0x13
+ IPPROTO_MHRP = 0x30
+ IPPROTO_MICP = 0x5f
+ IPPROTO_MTP = 0x5c
+ IPPROTO_MUX = 0x12
+ IPPROTO_ND = 0x4d
+ IPPROTO_NHRP = 0x36
+ IPPROTO_NONE = 0x3b
+ IPPROTO_NSP = 0x1f
+ IPPROTO_NVPII = 0xb
+ IPPROTO_OSPFIGP = 0x59
+ IPPROTO_PGM = 0x71
+ IPPROTO_PIGP = 0x9
+ IPPROTO_PIM = 0x67
+ IPPROTO_PRM = 0x15
+ IPPROTO_PUP = 0xc
+ IPPROTO_PVP = 0x4b
+ IPPROTO_RAW = 0xff
+ IPPROTO_RCCMON = 0xa
+ IPPROTO_RDP = 0x1b
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_RVD = 0x42
+ IPPROTO_SATEXPAK = 0x40
+ IPPROTO_SATMON = 0x45
+ IPPROTO_SCCSP = 0x60
+ IPPROTO_SCTP = 0x84
+ IPPROTO_SDRP = 0x2a
+ IPPROTO_SEP = 0x21
+ IPPROTO_SRPC = 0x5a
+ IPPROTO_ST = 0x7
+ IPPROTO_SVMTP = 0x52
+ IPPROTO_SWIPE = 0x35
+ IPPROTO_TCF = 0x57
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_TPXX = 0x27
+ IPPROTO_TRUNK1 = 0x17
+ IPPROTO_TRUNK2 = 0x18
+ IPPROTO_TTP = 0x54
+ IPPROTO_UDP = 0x11
+ IPPROTO_VINES = 0x53
+ IPPROTO_VISA = 0x46
+ IPPROTO_VMTP = 0x51
+ IPPROTO_WBEXPAK = 0x4f
+ IPPROTO_WBMON = 0x4e
+ IPPROTO_WSN = 0x4a
+ IPPROTO_XNET = 0xf
+ IPPROTO_XTP = 0x24
+ IPV6_2292DSTOPTS = 0x17
+ IPV6_2292HOPLIMIT = 0x14
+ IPV6_2292HOPOPTS = 0x16
+ IPV6_2292NEXTHOP = 0x15
+ IPV6_2292PKTINFO = 0x13
+ IPV6_2292PKTOPTIONS = 0x19
+ IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
+ IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
+ IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
+ IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_BINDV6ONLY = 0x1b
+ IPV6_BOUND_IF = 0x7d
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x3000
+ IPV6_FRAGTTL = 0x3c
+ IPV6_FW_ADD = 0x1e
+ IPV6_FW_DEL = 0x1f
+ IPV6_FW_FLUSH = 0x20
+ IPV6_FW_GET = 0x22
+ IPV6_FW_ZERO = 0x21
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPSEC_POLICY = 0x1c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXOPTHDR = 0x800
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MAX_GROUP_SRC_FILTER = 0x200
+ IPV6_MAX_MEMBERSHIPS = 0xfff
+ IPV6_MAX_SOCK_SRC_FILTER = 0x80
+ IPV6_MIN_MEMBERSHIPS = 0x1f
+ IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x24
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_ADD_SOURCE_MEMBERSHIP = 0x46
+ IP_BLOCK_SOURCE = 0x48
+ IP_BOUND_IF = 0x19
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DONTFRAG = 0x1c
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_DROP_SOURCE_MEMBERSHIP = 0x47
+ IP_DUMMYNET_CONFIGURE = 0x3c
+ IP_DUMMYNET_DEL = 0x3d
+ IP_DUMMYNET_FLUSH = 0x3e
+ IP_DUMMYNET_GET = 0x40
+ IP_FAITH = 0x16
+ IP_FW_ADD = 0x28
+ IP_FW_DEL = 0x29
+ IP_FW_FLUSH = 0x2a
+ IP_FW_GET = 0x2c
+ IP_FW_RESETLOG = 0x2d
+ IP_FW_ZERO = 0x2b
+ IP_HDRINCL = 0x2
+ IP_IPSEC_POLICY = 0x15
+ IP_MAXPACKET = 0xffff
+ IP_MAX_GROUP_SRC_FILTER = 0x200
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MAX_SOCK_MUTE_FILTER = 0x80
+ IP_MAX_SOCK_SRC_FILTER = 0x80
+ IP_MF = 0x2000
+ IP_MIN_MEMBERSHIPS = 0x1f
+ IP_MSFILTER = 0x4a
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_IFINDEX = 0x42
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_MULTICAST_VIF = 0xe
+ IP_NAT__XXX = 0x37
+ IP_OFFMASK = 0x1fff
+ IP_OLD_FW_ADD = 0x32
+ IP_OLD_FW_DEL = 0x33
+ IP_OLD_FW_FLUSH = 0x34
+ IP_OLD_FW_GET = 0x36
+ IP_OLD_FW_RESETLOG = 0x38
+ IP_OLD_FW_ZERO = 0x35
+ IP_OPTIONS = 0x1
+ IP_PKTINFO = 0x1a
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVIF = 0x14
+ IP_RECVOPTS = 0x5
+ IP_RECVPKTINFO = 0x1a
+ IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
+ IP_RECVTTL = 0x18
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RSVP_OFF = 0x10
+ IP_RSVP_ON = 0xf
+ IP_RSVP_VIF_OFF = 0x12
+ IP_RSVP_VIF_ON = 0x11
+ IP_STRIPHDR = 0x17
+ IP_TOS = 0x3
+ IP_TRAFFIC_MGT_BACKGROUND = 0x41
+ IP_TTL = 0x4
+ IP_UNBLOCK_SOURCE = 0x49
+ ISIG = 0x80
+ ISTRIP = 0x20
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LOCAL_PEERCRED = 0x1
+ LOCAL_PEEREPID = 0x3
+ LOCAL_PEEREUUID = 0x5
+ LOCAL_PEERPID = 0x2
+ LOCAL_PEERTOKEN = 0x6
+ LOCAL_PEERUUID = 0x4
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_CAN_REUSE = 0x9
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x5
+ MADV_FREE_REUSABLE = 0x7
+ MADV_FREE_REUSE = 0x8
+ MADV_NORMAL = 0x0
+ MADV_PAGEOUT = 0xa
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_WILLNEED = 0x3
+ MADV_ZERO_WIRED_PAGES = 0x6
+ MAP_32BIT = 0x8000
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_HASSEMAPHORE = 0x200
+ MAP_JIT = 0x800
+ MAP_NOCACHE = 0x400
+ MAP_NOEXTEND = 0x100
+ MAP_NORESERVE = 0x40
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x20
+ MAP_RESERVED0080 = 0x80
+ MAP_RESILIENT_CODESIGN = 0x2000
+ MAP_RESILIENT_MEDIA = 0x4000
+ MAP_SHARED = 0x1
+ MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
+ MAP_UNIX03 = 0x40000
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_AUTOMOUNTED = 0x400000
+ MNT_CMDFLAGS = 0xf0000
+ MNT_CPROTECT = 0x80
+ MNT_DEFWRITE = 0x2000000
+ MNT_DONTBROWSE = 0x100000
+ MNT_DOVOLFS = 0x8000
+ MNT_DWAIT = 0x4
+ MNT_EXPORTED = 0x100
+ MNT_EXT_ROOT_DATA_VOL = 0x1
+ MNT_FORCE = 0x80000
+ MNT_IGNORE_OWNERSHIP = 0x200000
+ MNT_JOURNALED = 0x800000
+ MNT_LOCAL = 0x1000
+ MNT_MULTILABEL = 0x4000000
+ MNT_NOATIME = 0x10000000
+ MNT_NOBLOCK = 0x20000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOUSERXATTR = 0x1000000
+ MNT_NOWAIT = 0x2
+ MNT_QUARANTINE = 0x400
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_REMOVABLE = 0x200
+ MNT_ROOTFS = 0x4000
+ MNT_SNAPSHOT = 0x40000000
+ MNT_STRICTATIME = 0x80000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UNION = 0x20
+ MNT_UNKNOWNPERMISSIONS = 0x200000
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0xd7f0f7ff
+ MNT_WAIT = 0x1
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOF = 0x100
+ MSG_EOR = 0x8
+ MSG_FLUSH = 0x400
+ MSG_HAVEMORE = 0x2000
+ MSG_HOLD = 0x800
+ MSG_NEEDSA = 0x10000
+ MSG_NOSIGNAL = 0x80000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_RCVMORE = 0x4000
+ MSG_SEND = 0x1000
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITSTREAM = 0x200
+ MS_ASYNC = 0x1
+ MS_DEACTIVATE = 0x8
+ MS_INVALIDATE = 0x2
+ MS_KILLPAGES = 0x4
+ MS_SYNC = 0x10
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_DUMP2 = 0x7
+ NET_RT_FLAGS = 0x2
+ NET_RT_FLAGS_PRIV = 0xa
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFLIST2 = 0x6
+ NET_RT_MAXID = 0xb
+ NET_RT_STAT = 0x4
+ NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
+ NL0 = 0x0
+ NL1 = 0x100
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ABSOLUTE = 0x8
+ NOTE_ATTRIB = 0x8
+ NOTE_BACKGROUND = 0x40
+ NOTE_CHILD = 0x4
+ NOTE_CRITICAL = 0x20
+ NOTE_DELETE = 0x1
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXITSTATUS = 0x4000000
+ NOTE_EXIT_CSERROR = 0x40000
+ NOTE_EXIT_DECRYPTFAIL = 0x10000
+ NOTE_EXIT_DETAIL = 0x2000000
+ NOTE_EXIT_DETAIL_MASK = 0x70000
+ NOTE_EXIT_MEMORY = 0x20000
+ NOTE_EXIT_REPARENTED = 0x80000
+ NOTE_EXTEND = 0x4
+ NOTE_FFAND = 0x40000000
+ NOTE_FFCOPY = 0xc0000000
+ NOTE_FFCTRLMASK = 0xc0000000
+ NOTE_FFLAGSMASK = 0xffffff
+ NOTE_FFNOP = 0x0
+ NOTE_FFOR = 0x80000000
+ NOTE_FORK = 0x40000000
+ NOTE_FUNLOCK = 0x100
+ NOTE_LEEWAY = 0x10
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_MACHTIME = 0x100
+ NOTE_MACH_CONTINUOUS_TIME = 0x80
+ NOTE_NONE = 0x80
+ NOTE_NSECONDS = 0x4
+ NOTE_OOB = 0x2
+ NOTE_PCTRLMASK = -0x100000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_REAP = 0x10000000
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_SECONDS = 0x1
+ NOTE_SIGNAL = 0x8000000
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRIGGER = 0x1000000
+ NOTE_USECONDS = 0x2
+ NOTE_VM_ERROR = 0x10000000
+ NOTE_VM_PRESSURE = 0x80000000
+ NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
+ NOTE_VM_PRESSURE_TERMINATE = 0x40000000
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OFDEL = 0x20000
+ OFILL = 0x80
+ ONLCR = 0x2
+ ONLRET = 0x40
+ ONOCR = 0x20
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_ALERT = 0x20000000
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x1000000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x100000
+ O_DP_GETRAWENCRYPTED = 0x1
+ O_DP_GETRAWUNENCRYPTED = 0x2
+ O_DSYNC = 0x400000
+ O_EVTONLY = 0x8000
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x20000
+ O_NOFOLLOW = 0x100
+ O_NOFOLLOW_ANY = 0x20000000
+ O_NONBLOCK = 0x4
+ O_POPUP = 0x80000000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_SHLOCK = 0x10
+ O_SYMLINK = 0x200000
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PT_ATTACH = 0xa
+ PT_ATTACHEXC = 0xe
+ PT_CONTINUE = 0x7
+ PT_DENY_ATTACH = 0x1f
+ PT_DETACH = 0xb
+ PT_FIRSTMACH = 0x20
+ PT_FORCEQUOTA = 0x1e
+ PT_KILL = 0x8
+ PT_READ_D = 0x2
+ PT_READ_I = 0x1
+ PT_READ_U = 0x3
+ PT_SIGEXC = 0xc
+ PT_STEP = 0x9
+ PT_THUPDATE = 0xd
+ PT_TRACE_ME = 0x0
+ PT_WRITE_D = 0x5
+ PT_WRITE_I = 0x4
+ PT_WRITE_U = 0x6
+ RLIMIT_AS = 0x5
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_CPU_USAGE_MONITOR = 0x2
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BRD = 0x7
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_MAX = 0x8
+ RTAX_NETMASK = 0x2
+ RTA_AUTHOR = 0x40
+ RTA_BRD = 0x80
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_NETMASK = 0x4
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CLONING = 0x100
+ RTF_CONDEMNED = 0x2000000
+ RTF_DEAD = 0x20000000
+ RTF_DELCLONE = 0x80
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_GATEWAY = 0x2
+ RTF_GLOBAL = 0x40000000
+ RTF_HOST = 0x4
+ RTF_IFREF = 0x4000000
+ RTF_IFSCOPE = 0x1000000
+ RTF_LLDATA = 0x400
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MULTICAST = 0x800000
+ RTF_NOIFREF = 0x2000
+ RTF_PINNED = 0x100000
+ RTF_PRCLONING = 0x10000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x40000
+ RTF_PROXY = 0x8000000
+ RTF_REJECT = 0x8
+ RTF_ROUTER = 0x10000000
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_WASCLONED = 0x20000
+ RTF_XRESOLVE = 0x200
+ RTM_ADD = 0x1
+ RTM_CHANGE = 0x3
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DELMADDR = 0x10
+ RTM_GET = 0x4
+ RTM_GET2 = 0x14
+ RTM_IFINFO = 0xe
+ RTM_IFINFO2 = 0x12
+ RTM_LOCK = 0x8
+ RTM_LOSING = 0x5
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_NEWMADDR = 0xf
+ RTM_NEWMADDR2 = 0x13
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_RTTUNIT = 0xf4240
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ SCM_CREDS = 0x3
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x2
+ SCM_TIMESTAMP_MONOTONIC = 0x4
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x4
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x3
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCARPIPLL = 0xc0206928
+ SIOCATMARK = 0x40047307
+ SIOCAUTOADDR = 0xc0206926
+ SIOCAUTONETMASK = 0x80206927
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFPHYADDR = 0x80206941
+ SIOCGDRVSPEC = 0xc028697b
+ SIOCGETVLAN = 0xc020697f
+ SIOCGHIWAT = 0x40047301
+ SIOCGIF6LOWPAN = 0xc02069c5
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFALTMTU = 0xc0206948
+ SIOCGIFASYNCMAP = 0xc020697c
+ SIOCGIFBOND = 0xc0206947
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCAP = 0xc020695b
+ SIOCGIFCONF = 0xc00c6924
+ SIOCGIFDEVMTU = 0xc0206944
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFFUNCTIONALTYPE = 0xc02069ad
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFKPI = 0xc0206987
+ SIOCGIFMAC = 0xc0206982
+ SIOCGIFMEDIA = 0xc02c6938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc0206933
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPDSTADDR = 0xc0206940
+ SIOCGIFPHYS = 0xc0206935
+ SIOCGIFPSRCADDR = 0xc020693f
+ SIOCGIFSTATUS = 0xc331693d
+ SIOCGIFVLAN = 0xc020697f
+ SIOCGIFWAKEFLAGS = 0xc0206988
+ SIOCGIFXMEDIA = 0xc02c6948
+ SIOCGLOWAT = 0x40047303
+ SIOCGPGRP = 0x40047309
+ SIOCIFCREATE = 0xc0206978
+ SIOCIFCREATE2 = 0xc020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106981
+ SIOCRSLVMULTI = 0xc010693b
+ SIOCSDRVSPEC = 0x8028697b
+ SIOCSETVLAN = 0x8020697e
+ SIOCSHIWAT = 0x80047300
+ SIOCSIF6LOWPAN = 0x802069c4
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFALTMTU = 0x80206945
+ SIOCSIFASYNCMAP = 0x8020697d
+ SIOCSIFBOND = 0x80206946
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFCAP = 0x8020695a
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFKPI = 0x80206986
+ SIOCSIFLLADDR = 0x8020693c
+ SIOCSIFMAC = 0x80206983
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x80206934
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPHYADDR = 0x8040693e
+ SIOCSIFPHYS = 0x80206936
+ SIOCSIFVLAN = 0x8020697e
+ SIOCSLOWAT = 0x80047302
+ SIOCSPGRP = 0x80047308
+ SOCK_DGRAM = 0x2
+ SOCK_MAXADDRLEN = 0xff
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DONTROUTE = 0x10
+ SO_DONTTRUNC = 0x2000
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LABEL = 0x1010
+ SO_LINGER = 0x80
+ SO_LINGER_SEC = 0x1080
+ SO_NETSVC_MARKING_LEVEL = 0x1119
+ SO_NET_SERVICE_TYPE = 0x1116
+ SO_NKE = 0x1021
+ SO_NOADDRERR = 0x1023
+ SO_NOSIGPIPE = 0x1022
+ SO_NOTIFYCONFLICT = 0x1026
+ SO_NP_EXTENSIONS = 0x1083
+ SO_NREAD = 0x1020
+ SO_NUMRCVPKT = 0x1112
+ SO_NWRITE = 0x1024
+ SO_OOBINLINE = 0x100
+ SO_PEERLABEL = 0x1011
+ SO_RANDOMPORT = 0x1082
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_REUSESHAREUID = 0x1025
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TIMESTAMP = 0x400
+ SO_TIMESTAMP_MONOTONIC = 0x800
+ SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
+ SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
+ SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
+ SO_TRACKER_TRANSPARENCY_VERSION = 0x3
+ SO_TYPE = 0x1008
+ SO_UPCALLCLOSEWAIT = 0x1027
+ SO_USELOOPBACK = 0x40
+ SO_WANTMORE = 0x4000
+ SO_WANTOOBFLAG = 0x8000
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IFWHT = 0xe000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0x4
+ TABDLY = 0xc04
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_CC = 0xb
+ TCPOPT_CCECHO = 0xd
+ TCPOPT_CCNEW = 0xc
+ TCPOPT_EOL = 0x0
+ TCPOPT_FASTOPEN = 0x22
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_CONNECTIONTIMEOUT = 0x20
+ TCP_CONNECTION_INFO = 0x106
+ TCP_ENABLE_ECN = 0x104
+ TCP_FASTOPEN = 0x105
+ TCP_KEEPALIVE = 0x10
+ TCP_KEEPCNT = 0x102
+ TCP_KEEPINTVL = 0x101
+ TCP_MAXHLEN = 0x3c
+ TCP_MAXOLEN = 0x28
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x4
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MINMSS = 0xd8
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOOPT = 0x8
+ TCP_NOPUSH = 0x4
+ TCP_NOTSENT_LOWAT = 0x201
+ TCP_RXT_CONNDROPTIME = 0x80
+ TCP_RXT_FINDROP = 0x100
+ TCP_SENDMOREACKS = 0x103
+ TCSAFLUSH = 0x2
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCONS = 0x80047462
+ TIOCDCDTIMESTAMP = 0x40107458
+ TIOCDRAIN = 0x2000745e
+ TIOCDSIMICROCODE = 0x20007455
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLUSH = 0x80047410
+ TIOCGDRAINWAIT = 0x40047456
+ TIOCGETA = 0x40487413
+ TIOCGETD = 0x4004741a
+ TIOCGPGRP = 0x40047477
+ TIOCGWINSZ = 0x40087468
+ TIOCIXOFF = 0x20007480
+ TIOCIXON = 0x20007481
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGDTRWAIT = 0x4004745a
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x40047403
+ TIOCMODS = 0x80047404
+ TIOCMSDTRWAIT = 0x8004745b
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCPTYGNAME = 0x40807453
+ TIOCPTYGRANT = 0x20007454
+ TIOCPTYUNLK = 0x20007452
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCONS = 0x20007463
+ TIOCSCTTY = 0x20007461
+ TIOCSDRAINWAIT = 0x80047457
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x80487414
+ TIOCSETAF = 0x80487416
+ TIOCSETAW = 0x80487415
+ TIOCSETD = 0x8004741b
+ TIOCSIG = 0x2000745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCTIMESTAMP = 0x40107459
+ TIOCUCNTL = 0x80047466
+ TOSTOP = 0x400000
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMADDR_CID_ANY = 0xffffffff
+ VMADDR_CID_HOST = 0x2
+ VMADDR_CID_HYPERVISOR = 0x0
+ VMADDR_CID_RESERVED = 0x1
+ VMADDR_PORT_ANY = 0xffffffff
+ VMIN = 0x10
+ VM_LOADAVG = 0x2
+ VM_MACHFACTOR = 0x4
+ VM_MAXID = 0x6
+ VM_METER = 0x1
+ VM_SWAPUSAGE = 0x5
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VT0 = 0x0
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x11
+ VWERASE = 0x4
+ WCONTINUED = 0x10
+ WCOREFLAG = 0x80
+ WEXITED = 0x4
+ WNOHANG = 0x1
+ WNOWAIT = 0x20
+ WORDSIZE = 0x40
+ WSTOPPED = 0x8
+ WUNTRACED = 0x2
+ XATTR_CREATE = 0x2
+ XATTR_NODEFAULT = 0x10
+ XATTR_NOFOLLOW = 0x1
+ XATTR_NOSECURITY = 0x8
+ XATTR_REPLACE = 0x4
+ XATTR_SHOWCOMPRESSION = 0x20
)
// Errors
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index b959fe19..78d4b85e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -1397,6 +1397,8 @@ const (
MADV_NOHUGEPAGE = 0xf
MADV_NORMAL = 0x0
MADV_PAGEOUT = 0x15
+ MADV_POPULATE_READ = 0x16
+ MADV_POPULATE_WRITE = 0x17
MADV_RANDOM = 0x1
MADV_REMOVE = 0x9
MADV_SEQUENTIAL = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index d4efe8d4..0ae0ed4c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+ result = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmdt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
+ id = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmget_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index bc169c2a..eac6ca80 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
+TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmat(SB)
+
+GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
+
+TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmctl(SB)
+
+GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
+
+TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmdt(SB)
+
+GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
+
+TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmget(SB)
+
+GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
+
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index f2ee2bd3..cf71be3e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -734,6 +734,65 @@ var libc_sendfile_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+ result = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmdt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
+ id = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmget_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index 33e19776..4ebcf217 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
+TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmat(SB)
+
+GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
+
+TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmctl(SB)
+
+GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
+
+TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmdt(SB)
+
+GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
+
+TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmget(SB)
+
+GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
+
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index f98d2e36..4f5da1f5 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -110,6 +110,16 @@ func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -1967,8 +1977,41 @@ func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+ r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+ r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+ result = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+ r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
+ id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 716ce295..ff90c81e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -46,37 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -555,14 +524,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index c62e1d0f..fa7d3dbe 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -700,27 +679,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index e336dcf8..654f9153 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -46,16 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
@@ -235,27 +225,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -670,17 +639,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index a8aa7963..6d155288 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -695,18 +674,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (p1 int, p2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- p1 = int(r0)
- p2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
xaddr = uintptr(r0)
@@ -735,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index a134f9a4..1e20d72d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -717,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index b1fff2d9..82b5e2d9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -717,14 +696,3 @@ func stat(path string, st *stat_t) (err error) {
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 92ab46bc..a0440c1d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -695,18 +674,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (p1 int, p2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- p1 = int(r0)
- p2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
xaddr = uintptr(r0)
@@ -735,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
index 01520b5f..5864b9ca 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -706,27 +685,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index a289e993..beeb49e3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -752,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index 1072c722..53139b82 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -752,27 +731,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index 6875a51b..202add37 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -542,17 +521,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 5657375b..2ab268c3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -73,16 +73,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
@@ -707,24 +697,3 @@ func utimes(path string, times *[2]Timeval) (err error) {
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 4c8dc0ba..7efe5ccb 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
Sc_reserved [5]uint32
}
+type RawSockaddrVM struct {
+ Len uint8
+ Family uint8
+ Reserved1 uint16
+ Port uint32
+ Cid uint32
+}
+
+type XVSockPCB struct {
+ Xv_len uint32
+ Xv_vsockpp uint64
+ Xvp_local_cid uint32
+ Xvp_local_port uint32
+ Xvp_remote_cid uint32
+ Xvp_remote_port uint32
+ Xvp_rxcnt uint32
+ Xvp_txcnt uint32
+ Xvp_peer_rxhiwat uint32
+ Xvp_peer_rxcnt uint32
+ Xvp_last_pid int32
+ Xvp_gencnt uint64
+ Xv_socket XSocket
+ _ [4]byte
+}
+
+type XSocket struct {
+ Xso_len uint32
+ Xso_so uint32
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ So_pcb uint32
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSocket64 struct {
+ Xso_len uint32
+ _ [8]byte
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ _ [8]byte
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSockbuf struct {
+ Cc uint32
+ Hiwat uint32
+ Mbcnt uint32
+ Mbmax uint32
+ Lowat int32
+ Flags int16
+ Timeo int16
+}
+
+type XVSockPgen struct {
+ Len uint32
+ Count uint64
+ Gen uint64
+ Sogen uint64
+}
+
type _Socklen uint32
type Xucred struct {
@@ -287,6 +373,11 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofSockaddrCtl = 0x20
+ SizeofSockaddrVM = 0xc
+ SizeofXvsockpcb = 0xa8
+ SizeofXSocket = 0x64
+ SizeofXSockbuf = 0x18
+ SizeofXVSockPgen = 0x20
SizeofXucred = 0x4c
SizeofLinger = 0x8
SizeofIovec = 0x10
@@ -639,3 +730,39 @@ type Ucred struct {
Ngroups int16
Groups [16]uint32
}
+
+type SysvIpcPerm struct {
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ uint16
+ _ int32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Lpid int32
+ Cpid int32
+ Nattch uint16
+ _ [34]byte
+}
+
+const (
+ IPC_CREAT = 0x200
+ IPC_EXCL = 0x400
+ IPC_NOWAIT = 0x800
+ IPC_PRIVATE = 0x0
+)
+
+const (
+ IPC_RMID = 0x0
+ IPC_SET = 0x1
+ IPC_STAT = 0x2
+)
+
+const (
+ SHM_RDONLY = 0x1000
+ SHM_RND = 0x2000
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 96f0e6ae..b23a2efe 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
Sc_reserved [5]uint32
}
+type RawSockaddrVM struct {
+ Len uint8
+ Family uint8
+ Reserved1 uint16
+ Port uint32
+ Cid uint32
+}
+
+type XVSockPCB struct {
+ Xv_len uint32
+ Xv_vsockpp uint64
+ Xvp_local_cid uint32
+ Xvp_local_port uint32
+ Xvp_remote_cid uint32
+ Xvp_remote_port uint32
+ Xvp_rxcnt uint32
+ Xvp_txcnt uint32
+ Xvp_peer_rxhiwat uint32
+ Xvp_peer_rxcnt uint32
+ Xvp_last_pid int32
+ Xvp_gencnt uint64
+ Xv_socket XSocket
+ _ [4]byte
+}
+
+type XSocket struct {
+ Xso_len uint32
+ Xso_so uint32
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ So_pcb uint32
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSocket64 struct {
+ Xso_len uint32
+ _ [8]byte
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ _ [8]byte
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSockbuf struct {
+ Cc uint32
+ Hiwat uint32
+ Mbcnt uint32
+ Mbmax uint32
+ Lowat int32
+ Flags int16
+ Timeo int16
+}
+
+type XVSockPgen struct {
+ Len uint32
+ Count uint64
+ Gen uint64
+ Sogen uint64
+}
+
type _Socklen uint32
type Xucred struct {
@@ -287,6 +373,11 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofSockaddrCtl = 0x20
+ SizeofSockaddrVM = 0xc
+ SizeofXvsockpcb = 0xa8
+ SizeofXSocket = 0x64
+ SizeofXSockbuf = 0x18
+ SizeofXVSockPgen = 0x20
SizeofXucred = 0x4c
SizeofLinger = 0x8
SizeofIovec = 0x10
@@ -639,3 +730,39 @@ type Ucred struct {
Ngroups int16
Groups [16]uint32
}
+
+type SysvIpcPerm struct {
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ uint16
+ _ int32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Lpid int32
+ Cpid int32
+ Nattch uint16
+ _ [34]byte
+}
+
+const (
+ IPC_CREAT = 0x200
+ IPC_EXCL = 0x400
+ IPC_NOWAIT = 0x800
+ IPC_PRIVATE = 0x0
+)
+
+const (
+ IPC_RMID = 0x0
+ IPC_SET = 0x1
+ IPC_STAT = 0x2
+)
+
+const (
+ SHM_RDONLY = 0x1000
+ SHM_RND = 0x2000
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 06dcd787..249ecfcd 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -3936,3 +3936,23 @@ type LandlockPathBeneathAttr struct {
const (
LANDLOCK_RULE_PATH_BENEATH = 0x1
)
+
+const (
+ IPC_CREAT = 0x200
+ IPC_EXCL = 0x400
+ IPC_NOWAIT = 0x800
+ IPC_PRIVATE = 0x0
+
+ ipc_64 = 0x100
+)
+
+const (
+ IPC_RMID = 0x0
+ IPC_SET = 0x1
+ IPC_STAT = 0x2
+)
+
+const (
+ SHM_RDONLY = 0x1000
+ SHM_RND = 0x2000
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 3219aded..eeeb9aa3 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -639,3 +639,32 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ [2]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Atime_high uint32
+ Dtime uint32
+ Dtime_high uint32
+ Ctime uint32
+ Ctime_high uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ _ uint32
+ _ uint32
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 16acd3bc..d30e1155 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -657,3 +657,29 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index c4982a22..69d02975 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -634,3 +634,32 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ [2]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Atime_high uint32
+ Dtime uint32
+ Dtime_high uint32
+ Ctime uint32
+ Ctime_high uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ _ uint32
+ _ uint32
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 98bb8a41..28a0455b 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -636,3 +636,29 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index d5bfc356..64a84548 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -640,3 +640,31 @@ const (
const (
PIDFD_NONBLOCK = 0x80
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Dtime uint32
+ Ctime uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ Atime_high uint16
+ Dtime_high uint16
+ Ctime_high uint16
+ _ uint16
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index b52c568d..a1b7dee4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -639,3 +639,29 @@ const (
const (
PIDFD_NONBLOCK = 0x80
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index a340b84b..936fa6a2 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -639,3 +639,29 @@ const (
const (
PIDFD_NONBLOCK = 0x80
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index b43d8e2c..5dd546fb 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -640,3 +640,31 @@ const (
const (
PIDFD_NONBLOCK = 0x80
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Dtime uint32
+ Ctime uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ Atime_high uint16
+ Dtime_high uint16
+ Ctime_high uint16
+ _ uint16
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index efd7313a..947b32e4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -646,3 +646,33 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ Seq uint32
+ _ uint32
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime_high uint32
+ Atime uint32
+ Dtime_high uint32
+ Dtime uint32
+ Ctime_high uint32
+ Ctime uint32
+ _ uint32
+ Segsz uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ _ uint32
+ _ uint32
+ _ [4]byte
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 22cedda5..2a606151 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -646,3 +646,28 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ Seq uint32
+ _ uint32
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Segsz uint64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 452a76df..d0d735d0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -646,3 +646,28 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ Seq uint32
+ _ uint32
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Segsz uint64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 96c667df..95e3d6d0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -664,3 +664,29 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index af04ee17..cccf1ef2 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -660,3 +660,28 @@ const (
const (
PIDFD_NONBLOCK = 0x800
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ uint16
+ Seq uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 6f385cf6..44fcbe4e 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -641,3 +641,28 @@ const (
const (
PIDFD_NONBLOCK = 0x4000
)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ uint16
+ Seq uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Segsz uint64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index 1215b2ae..ff2d45d4 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -398,6 +398,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
// Process Status API (PSAPI)
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
+//sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
+//sys EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
+//sys GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
+//sys GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW
+//sys GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW
// NT Native APIs
//sys rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 17f03312..88e0ce5d 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -243,6 +243,14 @@ const (
)
const (
+ // flags for EnumProcessModulesEx
+ LIST_MODULES_32BIT = 0x01
+ LIST_MODULES_64BIT = 0x02
+ LIST_MODULES_ALL = 0x03
+ LIST_MODULES_DEFAULT = 0x00
+)
+
+const (
// filters for ReadDirectoryChangesW and FindFirstChangeNotificationW
FILE_NOTIFY_CHANGE_FILE_NAME = 0x001
FILE_NOTIFY_CHANGE_DIR_NAME = 0x002
@@ -2773,3 +2781,9 @@ const (
// Flag for QueryFullProcessImageName.
const PROCESS_NAME_NATIVE = 1
+
+type ModuleInfo struct {
+ BaseOfDll uintptr
+ SizeOfImage uint32
+ EntryPoint uintptr
+}
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 2083ec37..e282e246 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -377,7 +377,12 @@ var (
procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
procCoUninitialize = modole32.NewProc("CoUninitialize")
procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
+ procEnumProcessModules = modpsapi.NewProc("EnumProcessModules")
+ procEnumProcessModulesEx = modpsapi.NewProc("EnumProcessModulesEx")
procEnumProcesses = modpsapi.NewProc("EnumProcesses")
+ procGetModuleBaseNameW = modpsapi.NewProc("GetModuleBaseNameW")
+ procGetModuleFileNameExW = modpsapi.NewProc("GetModuleFileNameExW")
+ procGetModuleInformation = modpsapi.NewProc("GetModuleInformation")
procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications")
procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
@@ -3225,6 +3230,22 @@ func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
return
}
+func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procEnumProcessModules.Addr(), 4, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procEnumProcessModulesEx.Addr(), 5, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
var _p0 *uint32
if len(processIds) > 0 {
@@ -3237,6 +3258,30 @@ func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
return
}
+func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetModuleBaseNameW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetModuleFileNameExW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
ret = procSubscribeServiceChangeNotifications.Find()
if ret != nil {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index e8389fd9..fb39107b 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -34,7 +34,7 @@ github.com/Rhymen/go-whatsapp/binary/token
github.com/Rhymen/go-whatsapp/crypto/cbc
github.com/Rhymen/go-whatsapp/crypto/curve25519
github.com/Rhymen/go-whatsapp/crypto/hkdf
-# github.com/SevereCloud/vksdk/v2 v2.10.0
+# github.com/SevereCloud/vksdk/v2 v2.11.0
## explicit; go 1.13
github.com/SevereCloud/vksdk/v2
github.com/SevereCloud/vksdk/v2/api
@@ -51,7 +51,7 @@ github.com/av-elier/go-decimal-to-rational
# github.com/blang/semver v3.5.1+incompatible
## explicit
github.com/blang/semver
-# github.com/d5/tengo/v2 v2.8.0
+# github.com/d5/tengo/v2 v2.10.0
## explicit; go 1.13
github.com/d5/tengo/v2
github.com/d5/tengo/v2/parser
@@ -86,7 +86,7 @@ github.com/golang-jwt/jwt
## explicit; go 1.9
github.com/golang/protobuf/proto
github.com/golang/protobuf/protoc-gen-go/descriptor
-# github.com/gomarkdown/markdown v0.0.0-20210918233619-6c1113f12c4a
+# github.com/gomarkdown/markdown v0.0.0-20211207152620-5d6539fd8bfc
## explicit; go 1.12
github.com/gomarkdown/markdown
github.com/gomarkdown/markdown/ast
@@ -97,7 +97,7 @@ github.com/gomarkdown/markdown/parser
github.com/google/gops/agent
github.com/google/gops/internal
github.com/google/gops/signal
-# github.com/google/uuid v1.2.0
+# github.com/google/uuid v1.3.0
## explicit
github.com/google/uuid
# github.com/gopackage/ddp v0.0.3
@@ -134,20 +134,20 @@ github.com/hashicorp/hcl/json/token
# github.com/jpillora/backoff v1.0.0
## explicit; go 1.13
github.com/jpillora/backoff
-# github.com/json-iterator/go v1.1.11
+# github.com/json-iterator/go v1.1.12
## explicit; go 1.12
github.com/json-iterator/go
# github.com/kettek/apng v0.0.0-20191108220231-414630eed80f
## explicit
github.com/kettek/apng
-# github.com/keybase/go-keybase-chat-bot v0.0.0-20211004153716-fd2ee4d6be11
-## explicit; go 1.13
+# github.com/keybase/go-keybase-chat-bot v0.0.0-20211201215354-ee4b23828b55
+## explicit; go 1.17
github.com/keybase/go-keybase-chat-bot/kbchat
github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1
github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1
github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1
github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1
-# github.com/klauspost/cpuid/v2 v2.0.6
+# github.com/klauspost/cpuid/v2 v2.0.9
## explicit; go 1.13
github.com/klauspost/cpuid/v2
# github.com/kyokomi/emoji/v2 v2.2.8
@@ -163,7 +163,7 @@ github.com/labstack/gommon/bytes
github.com/labstack/gommon/color
github.com/labstack/gommon/log
github.com/labstack/gommon/random
-# github.com/lrstanley/girc v0.0.0-20210611213246-771323f1624b
+# github.com/lrstanley/girc v0.0.0-20211023233735-147f0ff77566
## explicit; go 1.12
github.com/lrstanley/girc
# github.com/magiconair/properties v1.8.5
@@ -189,7 +189,7 @@ github.com/matterbridge/gozulipbot
# github.com/matterbridge/logrus-prefixed-formatter v0.5.3-0.20200523233437-d971309a77ba
## explicit
github.com/matterbridge/logrus-prefixed-formatter
-# github.com/matterbridge/matterclient v0.0.0-20211024214211-22e762684b4a
+# github.com/matterbridge/matterclient v0.0.0-20211107234719-faca3cd42315
## explicit; go 1.16
github.com/matterbridge/matterclient
# github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404
@@ -206,7 +206,7 @@ github.com/mattermost/ldap
github.com/mattermost/logr
github.com/mattermost/logr/format
github.com/mattermost/logr/target
-# github.com/mattermost/logr/v2 v2.0.10
+# github.com/mattermost/logr/v2 v2.0.15
## explicit; go 1.12
github.com/mattermost/logr/v2
github.com/mattermost/logr/v2/config
@@ -221,8 +221,8 @@ github.com/mattermost/mattermost-server/v5/shared/i18n
github.com/mattermost/mattermost-server/v5/shared/markdown
github.com/mattermost/mattermost-server/v5/shared/mlog
github.com/mattermost/mattermost-server/v5/utils/jsonutils
-# github.com/mattermost/mattermost-server/v6 v6.0.2
-## explicit; go 1.15
+# github.com/mattermost/mattermost-server/v6 v6.1.0
+## explicit; go 1.16
github.com/mattermost/mattermost-server/v6/model
github.com/mattermost/mattermost-server/v6/services/timezones
github.com/mattermost/mattermost-server/v6/shared/filestore
@@ -230,7 +230,7 @@ github.com/mattermost/mattermost-server/v6/shared/i18n
github.com/mattermost/mattermost-server/v6/shared/markdown
github.com/mattermost/mattermost-server/v6/shared/mlog
github.com/mattermost/mattermost-server/v6/utils/jsonutils
-# github.com/mattn/go-colorable v0.1.8
+# github.com/mattn/go-colorable v0.1.11
## explicit; go 1.13
github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.14
@@ -248,7 +248,7 @@ github.com/mgutz/ansi
# github.com/minio/md5-simd v1.1.2
## explicit; go 1.14
github.com/minio/md5-simd
-# github.com/minio/minio-go/v7 v7.0.11
+# github.com/minio/minio-go/v7 v7.0.14
## explicit; go 1.14
github.com/minio/minio-go/v7
github.com/minio/minio-go/v7/pkg/credentials
@@ -276,8 +276,8 @@ github.com/mitchellh/mapstructure
# github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
## explicit
github.com/modern-go/concurrent
-# github.com/modern-go/reflect2 v1.0.1
-## explicit
+# github.com/modern-go/reflect2 v1.0.2
+## explicit; go 1.12
github.com/modern-go/reflect2
# github.com/monaco-io/request v1.0.5
## explicit; go 1.14
@@ -347,7 +347,7 @@ github.com/sizeofint/webpanimation
github.com/skip2/go-qrcode
github.com/skip2/go-qrcode/bitset
github.com/skip2/go-qrcode/reedsolomon
-# github.com/slack-go/slack v0.9.5
+# github.com/slack-go/slack v0.10.0
## explicit; go 1.16
github.com/slack-go/slack
github.com/slack-go/slack/internal/backoff
@@ -396,7 +396,7 @@ github.com/valyala/bytebufferpool
# github.com/valyala/fasttemplate v1.2.1
## explicit; go 1.12
github.com/valyala/fasttemplate
-# github.com/vincent-petithory/dataurl v0.0.0-20191104211930-d1553a71de50
+# github.com/vincent-petithory/dataurl v1.0.0
## explicit
github.com/vincent-petithory/dataurl
# github.com/wiggin77/cfg v1.0.2
@@ -421,7 +421,7 @@ github.com/yaegashi/msgraph.go/msauth
# github.com/zfjagann/golang-ring v0.0.0-20210116075443-7c86fdb43134
## explicit
github.com/zfjagann/golang-ring
-# go.uber.org/atomic v1.8.0
+# go.uber.org/atomic v1.9.0
## explicit; go 1.13
go.uber.org/atomic
# go.uber.org/multierr v1.7.0
@@ -435,7 +435,7 @@ go.uber.org/zap/internal/bufferpool
go.uber.org/zap/internal/color
go.uber.org/zap/internal/exit
go.uber.org/zap/zapcore
-# golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
+# golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
## explicit; go 1.17
golang.org/x/crypto/acme
golang.org/x/crypto/acme/autocert
@@ -449,10 +449,10 @@ golang.org/x/crypto/curve25519/internal/field
golang.org/x/crypto/ed25519
golang.org/x/crypto/ed25519/internal/edwards25519
golang.org/x/crypto/hkdf
+golang.org/x/crypto/internal/poly1305
golang.org/x/crypto/internal/subtle
golang.org/x/crypto/nacl/secretbox
golang.org/x/crypto/pbkdf2
-golang.org/x/crypto/poly1305
golang.org/x/crypto/salsa20/salsa
golang.org/x/crypto/scrypt
golang.org/x/crypto/ssh
@@ -464,7 +464,7 @@ golang.org/x/image/riff
golang.org/x/image/vp8
golang.org/x/image/vp8l
golang.org/x/image/webp
-# golang.org/x/net v0.0.0-20210913180222-943fd674d43e
+# golang.org/x/net v0.0.0-20211006190231-62292e806868
## explicit; go 1.17
golang.org/x/net/context
golang.org/x/net/context/ctxhttp
@@ -477,13 +477,13 @@ golang.org/x/net/http2/hpack
golang.org/x/net/idna
golang.org/x/net/publicsuffix
golang.org/x/net/websocket
-# golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5
+# golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
## explicit; go 1.11
golang.org/x/oauth2
golang.org/x/oauth2/clientcredentials
golang.org/x/oauth2/internal
golang.org/x/oauth2/microsoft
-# golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0
+# golang.org/x/sys v0.0.0-20211006225509-1a26e0398eed
## explicit; go 1.17
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader