⬆️ Upgraded go modules
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2466cb02f0
commit
c6699bb312
195 changed files with 13138 additions and 5650 deletions
32
go.mod
32
go.mod
|
@ -5,21 +5,21 @@ go 1.18
|
|||
require (
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0
|
||||
github.com/brianvoe/gofakeit/v6 v6.16.0
|
||||
github.com/fasthttp/router v1.4.10
|
||||
github.com/goccy/go-json v0.9.7
|
||||
github.com/fasthttp/router v1.4.11
|
||||
github.com/goccy/go-json v0.9.10
|
||||
github.com/jmoiron/sqlx v1.3.5
|
||||
github.com/lestrrat-go/jwx/v2 v2.0.3
|
||||
github.com/lestrrat-go/jwx/v2 v2.0.4
|
||||
github.com/spf13/viper v1.12.0
|
||||
github.com/stretchr/testify v1.7.4
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
|
||||
github.com/valyala/fasthttp v1.37.0
|
||||
github.com/valyala/fasthttp v1.38.0
|
||||
github.com/valyala/fasttemplate v1.2.1
|
||||
github.com/valyala/quicktemplate v1.7.0
|
||||
go.etcd.io/bbolt v1.3.6
|
||||
golang.org/x/text v0.3.7
|
||||
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f
|
||||
inet.af/netaddr v0.0.0-20220617031823-097006376321
|
||||
modernc.org/sqlite v1.17.3
|
||||
modernc.org/sqlite v1.18.0
|
||||
source.toby3d.me/toby3d/form v0.3.0
|
||||
source.toby3d.me/toby3d/middleware v0.9.2
|
||||
willnorris.com/go/microformats v1.1.1
|
||||
|
@ -29,16 +29,16 @@ require (
|
|||
github.com/andybalholm/brotli v1.0.4 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
|
||||
github.com/fasthttp/session/v2 v2.4.11 // indirect
|
||||
github.com/fasthttp/session/v2 v2.4.12 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.1 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/klauspost/compress v1.15.6 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
|
||||
github.com/lestrrat-go/httpcc v1.0.1 // indirect
|
||||
github.com/lestrrat-go/httprc v1.0.2 // indirect
|
||||
github.com/lestrrat-go/httprc v1.0.4 // indirect
|
||||
github.com/lestrrat-go/iter v1.0.2 // indirect
|
||||
github.com/lestrrat-go/option v1.0.0 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
|
@ -51,7 +51,7 @@ require (
|
|||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
|
||||
github.com/savsgio/dictpool v0.0.0-20220406081701-03de5edb2e6d // indirect
|
||||
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/afero v1.9.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
|
@ -60,18 +60,18 @@ require (
|
|||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect
|
||||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/net v0.0.0-20220621193019-9d032be2e588 // indirect
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
|
||||
golang.org/x/tools v0.1.11 // indirect
|
||||
golang.org/x/net v0.0.0-20220728181054-f92ba40d432d // indirect
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
lukechampine.com/uint128 v1.2.0 // indirect
|
||||
modernc.org/cc/v3 v3.36.0 // indirect
|
||||
modernc.org/ccgo/v3 v3.16.6 // indirect
|
||||
modernc.org/libc v1.16.10 // indirect
|
||||
modernc.org/ccgo/v3 v3.16.8 // indirect
|
||||
modernc.org/libc v1.16.17 // indirect
|
||||
modernc.org/mathutil v1.4.1 // indirect
|
||||
modernc.org/memory v1.1.1 // indirect
|
||||
modernc.org/opt v0.1.3 // indirect
|
||||
|
|
72
go.sum
72
go.sum
|
@ -74,10 +74,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
|
|||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fasthttp/router v1.4.10 h1:C8z6K1pTqhLjSv97/qCY9tZiiPT8JuFwDoO9E2HJFWQ=
|
||||
github.com/fasthttp/router v1.4.10/go.mod h1:FGSUOg9SQ/tU864SfD23kG/HwfD0akXqOqhTQ27gTFQ=
|
||||
github.com/fasthttp/session/v2 v2.4.11 h1:ZPiKk0pkBl7umMVq1nOdvRgjn9Kfc5RzusPjnYckP84=
|
||||
github.com/fasthttp/session/v2 v2.4.11/go.mod h1:mHFWv73p5vYJaTZQDPokykT4GVOxfOoHGag/DlX8FzU=
|
||||
github.com/fasthttp/router v1.4.11 h1:99BvgVxeS2oOZBHnKr/okpdPq1jkn8WvYA2trh/71LY=
|
||||
github.com/fasthttp/router v1.4.11/go.mod h1:luEEYkGBSAmYyPaMeIUGNgqY+FdHHYDOK9Kivaw7aNo=
|
||||
github.com/fasthttp/session/v2 v2.4.12 h1:uSDcAczBO42dvE24F2LH7CgDlSnZX7ka2EQT82j9e1E=
|
||||
github.com/fasthttp/session/v2 v2.4.12/go.mod h1:v/ptqGiqJCxsf//YmTuaGnvqdm03LJs18ylVOC04vD8=
|
||||
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
|
@ -92,8 +92,8 @@ github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq
|
|||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM=
|
||||
github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/goccy/go-json v0.9.10 h1:hCeNmprSNLB8B8vQKWl6DpuH0t60oEs+TAk9a7CScKc=
|
||||
github.com/goccy/go-json v0.9.10/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
|
@ -174,8 +174,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
|
|||
github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
|
||||
github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY=
|
||||
github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
||||
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
|
||||
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
||||
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
|
@ -188,12 +188,12 @@ github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3
|
|||
github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU=
|
||||
github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE=
|
||||
github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E=
|
||||
github.com/lestrrat-go/httprc v1.0.2 h1:1hPZNeBRt9cvvYFR83XTkoQQidSFmAj3dqgR3AuQj9U=
|
||||
github.com/lestrrat-go/httprc v1.0.2/go.mod h1:5Ml+nB++j6IC0e6LzefJnrpMQDKgDwDCaIQQzhbqhJM=
|
||||
github.com/lestrrat-go/httprc v1.0.4 h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJGdI8=
|
||||
github.com/lestrrat-go/httprc v1.0.4/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo=
|
||||
github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI=
|
||||
github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4=
|
||||
github.com/lestrrat-go/jwx/v2 v2.0.3 h1:9zeZGkbiVkiSuzRsy2SbQJdTuA/At1I2Hh9R/GonCKg=
|
||||
github.com/lestrrat-go/jwx/v2 v2.0.3/go.mod h1:4tnab1l/rJWhxmtVsAtc2kr+pWGg72IcnWFk8gM0tLM=
|
||||
github.com/lestrrat-go/jwx/v2 v2.0.4 h1:Mgdn8stExQXkahWoWX0qJGxkapvJyovbl6UqYSQoHss=
|
||||
github.com/lestrrat-go/jwx/v2 v2.0.4/go.mod h1:Wot5JT7sGDorqS+dBi6Cfu6MzsDZP+sAOnQbOJ8rpIA=
|
||||
github.com/lestrrat-go/option v1.0.0 h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4=
|
||||
github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
|
||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
|
@ -205,9 +205,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
|
|||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.13 h1:1tj15ngiFfcZzii7yd82foL+ks+ouQcj8j/TPq3fk1I=
|
||||
github.com/mattn/go-sqlite3 v1.14.13/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw=
|
||||
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
|
@ -241,8 +240,8 @@ github.com/savsgio/dictpool v0.0.0-20220406081701-03de5edb2e6d/go.mod h1:jrsy/bT
|
|||
github.com/savsgio/gotils v0.0.0-20220401102855-e56b59f40436/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4=
|
||||
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJxXMRqtUgUbTjI8/Ze8vu8GGyNFwo=
|
||||
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4=
|
||||
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
|
||||
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
|
||||
github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
|
||||
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
|
@ -260,8 +259,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.7.4 h1:wZRexSlwd7ZXfKINDLsO4r7WBt3gTKONc6K/VesHvHM=
|
||||
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs=
|
||||
github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo=
|
||||
github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw=
|
||||
|
@ -271,8 +270,8 @@ github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80/go.mod h1:iFy
|
|||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus=
|
||||
github.com/valyala/fasthttp v1.37.0 h1:7WHCyI7EAkQMVmrfBhWTCOaeROb1aCBiTopx63LkMbE=
|
||||
github.com/valyala/fasthttp v1.37.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
|
||||
github.com/valyala/fasthttp v1.38.0 h1:yTjSSNjuDi2PPvXY2836bIwLmiTS2T4T9p1coQshpco=
|
||||
github.com/valyala/fasthttp v1.38.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
|
||||
github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
|
||||
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTcjMJzCM=
|
||||
|
@ -306,8 +305,8 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5
|
|||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -382,8 +381,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT
|
|||
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220621193019-9d032be2e588 h1:9ubFuySsnAJYGyJrZ3koiEv8FyqofCBdz3G9Mbf2YFc=
|
||||
golang.org/x/net v0.0.0-20220621193019-9d032be2e588/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220728181054-f92ba40d432d h1:3iMzhioG3w6/URLOo7X7eZRkWoLdz9iWE/UsnXHNTfY=
|
||||
golang.org/x/net v0.0.0-20220728181054-f92ba40d432d/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -451,8 +450,8 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -517,8 +516,8 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f
|
|||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY=
|
||||
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
@ -647,9 +646,9 @@ modernc.org/cc/v3 v3.36.0 h1:0kmRkTmqNidmu3c7BNDSdVHCxXCkWLmWmCIVX4LUboo=
|
|||
modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
|
||||
modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc=
|
||||
modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw=
|
||||
modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ=
|
||||
modernc.org/ccgo/v3 v3.16.6 h1:3l18poV+iUemQ98O3X5OMr97LOqlzis+ytivU4NqGhA=
|
||||
modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ=
|
||||
modernc.org/ccgo/v3 v3.16.8 h1:G0QNlTqI5uVgczBWfGKs7B++EPwCfXPWGD2MdeKloDs=
|
||||
modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws=
|
||||
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
|
||||
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
|
||||
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
|
||||
|
@ -657,9 +656,8 @@ modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
|
|||
modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA=
|
||||
modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A=
|
||||
modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU=
|
||||
modernc.org/libc v1.16.7/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU=
|
||||
modernc.org/libc v1.16.10 h1:SRBpcdFf2eYY6B+MAJ4B5SbstLkd2y58ljZTLmAPLxU=
|
||||
modernc.org/libc v1.16.10/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU=
|
||||
modernc.org/libc v1.16.17 h1:rXo8IZJvP+QSN1KrlV23dtkM3XfGYXjx3RbLLzBtndM=
|
||||
modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU=
|
||||
modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8=
|
||||
modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
|
@ -668,17 +666,15 @@ modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw=
|
|||
modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
|
||||
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
|
||||
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
|
||||
modernc.org/sqlite v1.17.3 h1:iE+coC5g17LtByDYDWKpR6m2Z9022YrSh3bumwOnIrI=
|
||||
modernc.org/sqlite v1.17.3/go.mod h1:10hPVYar9C0kfXuTWGz8s0XtB8uAGymUy51ZzStYe3k=
|
||||
modernc.org/sqlite v1.18.0 h1:ef66qJSgKeyLyrF4kQ2RHw/Ue3V89fyFNbGL073aDjI=
|
||||
modernc.org/sqlite v1.18.0/go.mod h1:B9fRWZacNxJBHoCJZQr1R54zhVn3fjfl0aszflrTSxY=
|
||||
modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw=
|
||||
modernc.org/strutil v1.1.2 h1:iFBDH6j1Z0bN/Q9udJnnFoFpENA4252qe/7/5woE5MI=
|
||||
modernc.org/strutil v1.1.2/go.mod h1:OYajnUAcI/MX+XD/Wx7v1bbdvcQSvxgtb0gC+u3d3eg=
|
||||
modernc.org/tcl v1.13.1 h1:npxzTwFTZYM8ghWicVIX1cRWzj7Nd8i6AqqX2p+IYao=
|
||||
modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw=
|
||||
modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk=
|
||||
modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM=
|
||||
modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
|
47
vendor/github.com/goccy/go-json/CHANGELOG.md
generated
vendored
47
vendor/github.com/goccy/go-json/CHANGELOG.md
generated
vendored
|
@ -1,3 +1,50 @@
|
|||
# v0.9.10 - 2022/07/15
|
||||
|
||||
### Fix bugs
|
||||
|
||||
* Fix boundary exception of type caching ( #382 )
|
||||
|
||||
# v0.9.9 - 2022/07/15
|
||||
|
||||
### Fix bugs
|
||||
|
||||
* Fix encoding of directed interface with typed nil ( #377 )
|
||||
* Fix embedded primitive type encoding using alias ( #378 )
|
||||
* Fix slice/array type encoding with types implementing MarshalJSON ( #379 )
|
||||
* Fix unicode decoding when the expected buffer state is not met after reading ( #380 )
|
||||
|
||||
# v0.9.8 - 2022/06/30
|
||||
|
||||
### Fix bugs
|
||||
|
||||
* Fix decoding of surrogate-pair ( #365 )
|
||||
* Fix handling of embedded primitive type ( #366 )
|
||||
* Add validation of escape sequence for decoder ( #367 )
|
||||
* Fix stream tokenizing respecting UseNumber ( #369 )
|
||||
* Fix encoding when struct pointer type that implements Marshal JSON is embedded ( #375 )
|
||||
|
||||
### Improve performance
|
||||
|
||||
* Improve performance of linkRecursiveCode ( #368 )
|
||||
|
||||
# v0.9.7 - 2022/04/22
|
||||
|
||||
### Fix bugs
|
||||
|
||||
#### Encoder
|
||||
|
||||
* Add filtering process for encoding on slow path ( #355 )
|
||||
* Fix encoding of interface{} with pointer type ( #363 )
|
||||
|
||||
#### Decoder
|
||||
|
||||
* Fix map key decoder that implements UnmarshalJSON ( #353 )
|
||||
* Fix decoding of []uint8 type ( #361 )
|
||||
|
||||
### New features
|
||||
|
||||
* Add DebugWith option for encoder ( #356 )
|
||||
|
||||
# v0.9.6 - 2022/03/22
|
||||
|
||||
### Fix bugs
|
||||
|
|
20
vendor/github.com/goccy/go-json/internal/decoder/compile.go
generated
vendored
20
vendor/github.com/goccy/go-json/internal/decoder/compile.go
generated
vendored
|
@ -24,7 +24,7 @@ func init() {
|
|||
if typeAddr == nil {
|
||||
typeAddr = &runtime.TypeAddr{}
|
||||
}
|
||||
cachedDecoder = make([]Decoder, typeAddr.AddrRange>>typeAddr.AddrShift)
|
||||
cachedDecoder = make([]Decoder, typeAddr.AddrRange>>typeAddr.AddrShift+1)
|
||||
}
|
||||
|
||||
func loadDecoderMap() map[uintptr]Decoder {
|
||||
|
@ -393,7 +393,25 @@ func compileStruct(typ *runtime.Type, structName, fieldName string, structTypeTo
|
|||
}
|
||||
allFields = append(allFields, fieldSet)
|
||||
}
|
||||
} else {
|
||||
fieldSet := &structFieldSet{
|
||||
dec: pdec,
|
||||
offset: field.Offset,
|
||||
isTaggedKey: tag.IsTaggedKey,
|
||||
key: field.Name,
|
||||
keyLen: int64(len(field.Name)),
|
||||
}
|
||||
allFields = append(allFields, fieldSet)
|
||||
}
|
||||
} else {
|
||||
fieldSet := &structFieldSet{
|
||||
dec: dec,
|
||||
offset: field.Offset,
|
||||
isTaggedKey: tag.IsTaggedKey,
|
||||
key: field.Name,
|
||||
keyLen: int64(len(field.Name)),
|
||||
}
|
||||
allFields = append(allFields, fieldSet)
|
||||
}
|
||||
} else {
|
||||
if tag.IsString && isStringTagSupportedType(runtime.Type2RType(field.Type)) {
|
||||
|
|
7
vendor/github.com/goccy/go-json/internal/decoder/stream.go
generated
vendored
7
vendor/github.com/goccy/go-json/internal/decoder/stream.go
generated
vendored
|
@ -138,8 +138,11 @@ func (s *Stream) Token() (interface{}, error) {
|
|||
s.cursor++
|
||||
case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
|
||||
bytes := floatBytes(s)
|
||||
s := *(*string)(unsafe.Pointer(&bytes))
|
||||
f64, err := strconv.ParseFloat(s, 64)
|
||||
str := *(*string)(unsafe.Pointer(&bytes))
|
||||
if s.UseNumber {
|
||||
return json.Number(str), nil
|
||||
}
|
||||
f64, err := strconv.ParseFloat(str, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
44
vendor/github.com/goccy/go-json/internal/decoder/string.go
generated
vendored
44
vendor/github.com/goccy/go-json/internal/decoder/string.go
generated
vendored
|
@ -2,6 +2,7 @@ package decoder
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"unicode"
|
||||
"unicode/utf16"
|
||||
|
@ -94,24 +95,30 @@ func unicodeToRune(code []byte) rune {
|
|||
return r
|
||||
}
|
||||
|
||||
func readAtLeast(s *Stream, n int64, p *unsafe.Pointer) bool {
|
||||
for s.cursor+n >= s.length {
|
||||
if !s.read() {
|
||||
return false
|
||||
}
|
||||
*p = s.bufptr()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func decodeUnicodeRune(s *Stream, p unsafe.Pointer) (rune, int64, unsafe.Pointer, error) {
|
||||
const defaultOffset = 5
|
||||
const surrogateOffset = 11
|
||||
|
||||
if s.cursor+defaultOffset >= s.length {
|
||||
if !s.read() {
|
||||
return rune(0), 0, nil, errors.ErrInvalidCharacter(s.char(), "escaped string", s.totalOffset())
|
||||
}
|
||||
p = s.bufptr()
|
||||
if !readAtLeast(s, defaultOffset, &p) {
|
||||
return rune(0), 0, nil, errors.ErrInvalidCharacter(s.char(), "escaped string", s.totalOffset())
|
||||
}
|
||||
|
||||
r := unicodeToRune(s.buf[s.cursor+1 : s.cursor+defaultOffset])
|
||||
if utf16.IsSurrogate(r) {
|
||||
if s.cursor+surrogateOffset >= s.length {
|
||||
s.read()
|
||||
p = s.bufptr()
|
||||
if !readAtLeast(s, surrogateOffset, &p) {
|
||||
return unicode.ReplacementChar, defaultOffset, p, nil
|
||||
}
|
||||
if s.cursor+surrogateOffset >= s.length || s.buf[s.cursor+defaultOffset] != '\\' || s.buf[s.cursor+defaultOffset+1] != 'u' {
|
||||
if s.buf[s.cursor+defaultOffset] != '\\' || s.buf[s.cursor+defaultOffset+1] != 'u' {
|
||||
return unicode.ReplacementChar, defaultOffset, p, nil
|
||||
}
|
||||
r2 := unicodeToRune(s.buf[s.cursor+defaultOffset+2 : s.cursor+surrogateOffset])
|
||||
|
@ -323,6 +330,12 @@ func (d *stringDecoder) decodeByte(buf []byte, cursor int64) ([]byte, int64, err
|
|||
if cursor+5 >= buflen {
|
||||
return nil, 0, errors.ErrUnexpectedEndOfJSON("escaped string", cursor)
|
||||
}
|
||||
for i := int64(1); i <= 4; i++ {
|
||||
c := char(b, cursor+i)
|
||||
if !(('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F')) {
|
||||
return nil, 0, errors.ErrSyntax(fmt.Sprintf("json: invalid character %c in \\u hexadecimal character escape", c), cursor+i)
|
||||
}
|
||||
}
|
||||
cursor += 5
|
||||
default:
|
||||
return nil, 0, errors.ErrUnexpectedEndOfJSON("escaped string", cursor)
|
||||
|
@ -386,6 +399,19 @@ func unescapeString(buf []byte) int {
|
|||
v3 := hexToInt[char(src, 4)]
|
||||
v4 := hexToInt[char(src, 5)]
|
||||
code := rune((v1 << 12) | (v2 << 8) | (v3 << 4) | v4)
|
||||
if code >= 0xd800 && code < 0xdc00 && uintptr(unsafeAdd(src, 11)) < uintptr(end) {
|
||||
if char(src, 6) == '\\' && char(src, 7) == 'u' {
|
||||
v1 := hexToInt[char(src, 8)]
|
||||
v2 := hexToInt[char(src, 9)]
|
||||
v3 := hexToInt[char(src, 10)]
|
||||
v4 := hexToInt[char(src, 11)]
|
||||
lo := rune((v1 << 12) | (v2 << 8) | (v3 << 4) | v4)
|
||||
if lo >= 0xdc00 && lo < 0xe000 {
|
||||
code = (code-0xd800)<<10 | (lo - 0xdc00) + 0x10000
|
||||
src = unsafeAdd(src, 6)
|
||||
}
|
||||
}
|
||||
}
|
||||
var b [utf8.UTFMax]byte
|
||||
n := utf8.EncodeRune(b[:], code)
|
||||
switch n {
|
||||
|
|
16
vendor/github.com/goccy/go-json/internal/encoder/code.go
generated
vendored
16
vendor/github.com/goccy/go-json/internal/encoder/code.go
generated
vendored
|
@ -2,6 +2,7 @@ package encoder
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"unsafe"
|
||||
|
||||
"github.com/goccy/go-json/internal/runtime"
|
||||
|
@ -383,7 +384,7 @@ func (c *StructCode) Kind() CodeKind {
|
|||
}
|
||||
|
||||
func (c *StructCode) lastFieldCode(field *StructFieldCode, firstField *Opcode) *Opcode {
|
||||
if field.isAnonymous {
|
||||
if isEmbeddedStruct(field) {
|
||||
return c.lastAnonymousFieldCode(firstField)
|
||||
}
|
||||
lastField := firstField
|
||||
|
@ -436,7 +437,7 @@ func (c *StructCode) ToOpcode(ctx *compileContext) Opcodes {
|
|||
}
|
||||
if isEndField {
|
||||
endField := fieldCodes.Last()
|
||||
if field.isAnonymous {
|
||||
if isEmbeddedStruct(field) {
|
||||
firstField.End = endField
|
||||
lastField := c.lastAnonymousFieldCode(firstField)
|
||||
lastField.NextField = endField
|
||||
|
@ -1003,3 +1004,14 @@ func convertPtrOp(code *Opcode) OpType {
|
|||
}
|
||||
return code.Op
|
||||
}
|
||||
|
||||
func isEmbeddedStruct(field *StructFieldCode) bool {
|
||||
if !field.isAnonymous {
|
||||
return false
|
||||
}
|
||||
t := field.typ
|
||||
if t.Kind() == reflect.Ptr {
|
||||
t = t.Elem()
|
||||
}
|
||||
return t.Kind() == reflect.Struct
|
||||
}
|
||||
|
|
37
vendor/github.com/goccy/go-json/internal/encoder/compiler.go
generated
vendored
37
vendor/github.com/goccy/go-json/internal/encoder/compiler.go
generated
vendored
|
@ -31,7 +31,7 @@ func init() {
|
|||
if typeAddr == nil {
|
||||
typeAddr = &runtime.TypeAddr{}
|
||||
}
|
||||
cachedOpcodeSets = make([]*OpcodeSet, typeAddr.AddrRange>>typeAddr.AddrShift)
|
||||
cachedOpcodeSets = make([]*OpcodeSet, typeAddr.AddrRange>>typeAddr.AddrShift+1)
|
||||
}
|
||||
|
||||
func loadOpcodeMap() map[uintptr]*OpcodeSet {
|
||||
|
@ -487,7 +487,10 @@ func (c *Compiler) listElemCode(typ *runtime.Type) (Code, error) {
|
|||
case typ.Kind() == reflect.Map:
|
||||
return c.ptrCode(runtime.PtrTo(typ))
|
||||
default:
|
||||
code, err := c.typeToCodeWithPtr(typ, false)
|
||||
// isPtr was originally used to indicate whether the type of top level is pointer.
|
||||
// However, since the slice/array element is a specification that can get the pointer address, explicitly set isPtr to true.
|
||||
// See here for related issues: https://github.com/goccy/go-json/issues/370
|
||||
code, err := c.typeToCodeWithPtr(typ, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -853,6 +856,9 @@ func (c *Compiler) implementsMarshalText(typ *runtime.Type) bool {
|
|||
}
|
||||
|
||||
func (c *Compiler) isNilableType(typ *runtime.Type) bool {
|
||||
if !runtime.IfaceIndir(typ) {
|
||||
return true
|
||||
}
|
||||
switch typ.Kind() {
|
||||
case reflect.Ptr:
|
||||
return true
|
||||
|
@ -885,29 +891,40 @@ func (c *Compiler) codeToOpcode(ctx *compileContext, typ *runtime.Type, code Cod
|
|||
}
|
||||
|
||||
func (c *Compiler) linkRecursiveCode(ctx *compileContext) {
|
||||
recursiveCodes := map[uintptr]*CompiledCode{}
|
||||
for _, recursive := range *ctx.recursiveCodes {
|
||||
typeptr := uintptr(unsafe.Pointer(recursive.Type))
|
||||
codes := ctx.structTypeToCodes[typeptr]
|
||||
compiled := recursive.Jmp
|
||||
compiled.Code = copyOpcode(codes.First())
|
||||
code := compiled.Code
|
||||
code.End.Next = newEndOp(&compileContext{}, recursive.Type)
|
||||
code.Op = code.Op.PtrHeadToHead()
|
||||
if recursiveCode, ok := recursiveCodes[typeptr]; ok {
|
||||
*recursive.Jmp = *recursiveCode
|
||||
continue
|
||||
}
|
||||
|
||||
beforeLastCode := code.End
|
||||
lastCode := beforeLastCode.Next
|
||||
code := copyOpcode(codes.First())
|
||||
code.Op = code.Op.PtrHeadToHead()
|
||||
lastCode := newEndOp(&compileContext{}, recursive.Type)
|
||||
lastCode.Op = OpRecursiveEnd
|
||||
|
||||
// OpRecursiveEnd must set before call TotalLength
|
||||
code.End.Next = lastCode
|
||||
|
||||
totalLength := code.TotalLength()
|
||||
|
||||
// Idx, ElemIdx, Length must set after call TotalLength
|
||||
lastCode.Idx = uint32((totalLength + 1) * uintptrSize)
|
||||
lastCode.ElemIdx = lastCode.Idx + uintptrSize
|
||||
lastCode.Length = lastCode.Idx + 2*uintptrSize
|
||||
code.End.Next.Op = OpRecursiveEnd
|
||||
|
||||
// extend length to alloc slot for elemIdx + length
|
||||
curTotalLength := uintptr(recursive.TotalLength()) + 3
|
||||
nextTotalLength := uintptr(totalLength) + 3
|
||||
|
||||
compiled := recursive.Jmp
|
||||
compiled.Code = code
|
||||
compiled.CurLen = curTotalLength
|
||||
compiled.NextLen = nextTotalLength
|
||||
compiled.Linked = true
|
||||
|
||||
recursiveCodes[typeptr] = compiled
|
||||
}
|
||||
}
|
||||
|
|
10
vendor/github.com/goccy/go-json/internal/encoder/vm/vm.go
generated
vendored
10
vendor/github.com/goccy/go-json/internal/encoder/vm/vm.go
generated
vendored
|
@ -3,6 +3,7 @@ package vm
|
|||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sort"
|
||||
"unsafe"
|
||||
|
||||
|
@ -194,9 +195,12 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
typ = iface.typ
|
||||
}
|
||||
if ifacePtr == nil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
isDirectedNil := typ != nil && typ.Kind() == reflect.Struct && !runtime.IfaceIndir(typ)
|
||||
if !isDirectedNil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
}
|
||||
}
|
||||
ctx.KeepRefs = append(ctx.KeepRefs, up)
|
||||
ifaceCodeSet, err := encoder.CompileToGetCodeSet(ctx, uintptr(unsafe.Pointer(typ)))
|
||||
|
|
10
vendor/github.com/goccy/go-json/internal/encoder/vm_color/vm.go
generated
vendored
10
vendor/github.com/goccy/go-json/internal/encoder/vm_color/vm.go
generated
vendored
|
@ -3,6 +3,7 @@ package vm_color
|
|||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sort"
|
||||
"unsafe"
|
||||
|
||||
|
@ -194,9 +195,12 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
typ = iface.typ
|
||||
}
|
||||
if ifacePtr == nil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
isDirectedNil := typ != nil && typ.Kind() == reflect.Struct && !runtime.IfaceIndir(typ)
|
||||
if !isDirectedNil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
}
|
||||
}
|
||||
ctx.KeepRefs = append(ctx.KeepRefs, up)
|
||||
ifaceCodeSet, err := encoder.CompileToGetCodeSet(ctx, uintptr(unsafe.Pointer(typ)))
|
||||
|
|
10
vendor/github.com/goccy/go-json/internal/encoder/vm_color_indent/vm.go
generated
vendored
10
vendor/github.com/goccy/go-json/internal/encoder/vm_color_indent/vm.go
generated
vendored
|
@ -3,6 +3,7 @@ package vm_color_indent
|
|||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sort"
|
||||
"unsafe"
|
||||
|
||||
|
@ -194,9 +195,12 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
typ = iface.typ
|
||||
}
|
||||
if ifacePtr == nil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
isDirectedNil := typ != nil && typ.Kind() == reflect.Struct && !runtime.IfaceIndir(typ)
|
||||
if !isDirectedNil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
}
|
||||
}
|
||||
ctx.KeepRefs = append(ctx.KeepRefs, up)
|
||||
ifaceCodeSet, err := encoder.CompileToGetCodeSet(ctx, uintptr(unsafe.Pointer(typ)))
|
||||
|
|
10
vendor/github.com/goccy/go-json/internal/encoder/vm_indent/vm.go
generated
vendored
10
vendor/github.com/goccy/go-json/internal/encoder/vm_indent/vm.go
generated
vendored
|
@ -3,6 +3,7 @@ package vm_indent
|
|||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sort"
|
||||
"unsafe"
|
||||
|
||||
|
@ -194,9 +195,12 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]b
|
|||
typ = iface.typ
|
||||
}
|
||||
if ifacePtr == nil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
isDirectedNil := typ != nil && typ.Kind() == reflect.Struct && !runtime.IfaceIndir(typ)
|
||||
if !isDirectedNil {
|
||||
b = appendNullComma(ctx, b)
|
||||
code = code.Next
|
||||
break
|
||||
}
|
||||
}
|
||||
ctx.KeepRefs = append(ctx.KeepRefs, up)
|
||||
ifaceCodeSet, err := encoder.CompileToGetCodeSet(ctx, uintptr(unsafe.Pointer(typ)))
|
||||
|
|
6
vendor/github.com/goccy/go-json/internal/runtime/struct_field.go
generated
vendored
6
vendor/github.com/goccy/go-json/internal/runtime/struct_field.go
generated
vendored
|
@ -13,7 +13,11 @@ func getTag(field reflect.StructField) string {
|
|||
func IsIgnoredStructField(field reflect.StructField) bool {
|
||||
if field.PkgPath != "" {
|
||||
if field.Anonymous {
|
||||
if !(field.Type.Kind() == reflect.Ptr && field.Type.Elem().Kind() == reflect.Struct) && field.Type.Kind() != reflect.Struct {
|
||||
t := field.Type
|
||||
if t.Kind() == reflect.Ptr {
|
||||
t = t.Elem()
|
||||
}
|
||||
if t.Kind() != reflect.Struct {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
|
|
68
vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go
generated
vendored
68
vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go
generated
vendored
|
@ -169,7 +169,7 @@ func (w *huffmanBitWriter) canReuse(t *tokens) (ok bool) {
|
|||
b := w.offsetEncoding.codes
|
||||
b = b[:len(a)]
|
||||
for i, v := range a {
|
||||
if v != 0 && b[i].len == 0 {
|
||||
if v != 0 && b[i].zero() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ func (w *huffmanBitWriter) canReuse(t *tokens) (ok bool) {
|
|||
b = w.literalEncoding.codes[256:literalCount]
|
||||
b = b[:len(a)]
|
||||
for i, v := range a {
|
||||
if v != 0 && b[i].len == 0 {
|
||||
if v != 0 && b[i].zero() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ func (w *huffmanBitWriter) canReuse(t *tokens) (ok bool) {
|
|||
a = t.litHist[:256]
|
||||
b = w.literalEncoding.codes[:len(a)]
|
||||
for i, v := range a {
|
||||
if v != 0 && b[i].len == 0 {
|
||||
if v != 0 && b[i].zero() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -280,12 +280,12 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litE
|
|||
// Copy the concatenated code sizes to codegen. Put a marker at the end.
|
||||
cgnl := codegen[:numLiterals]
|
||||
for i := range cgnl {
|
||||
cgnl[i] = uint8(litEnc.codes[i].len)
|
||||
cgnl[i] = litEnc.codes[i].len()
|
||||
}
|
||||
|
||||
cgnl = codegen[numLiterals : numLiterals+numOffsets]
|
||||
for i := range cgnl {
|
||||
cgnl[i] = uint8(offEnc.codes[i].len)
|
||||
cgnl[i] = offEnc.codes[i].len()
|
||||
}
|
||||
codegen[numLiterals+numOffsets] = badCode
|
||||
|
||||
|
@ -428,8 +428,8 @@ func (w *huffmanBitWriter) storedSize(in []byte) (int, bool) {
|
|||
|
||||
func (w *huffmanBitWriter) writeCode(c hcode) {
|
||||
// The function does not get inlined if we "& 63" the shift.
|
||||
w.bits |= uint64(c.code) << (w.nbits & 63)
|
||||
w.nbits += c.len
|
||||
w.bits |= c.code64() << (w.nbits & 63)
|
||||
w.nbits += c.len()
|
||||
if w.nbits >= 48 {
|
||||
w.writeOutBits()
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, n
|
|||
w.writeBits(int32(numCodegens-4), 4)
|
||||
|
||||
for i := 0; i < numCodegens; i++ {
|
||||
value := uint(w.codegenEncoding.codes[codegenOrder[i]].len)
|
||||
value := uint(w.codegenEncoding.codes[codegenOrder[i]].len())
|
||||
w.writeBits(int32(value), 3)
|
||||
}
|
||||
|
||||
|
@ -670,7 +670,7 @@ func (w *huffmanBitWriter) writeBlockDynamic(tokens *tokens, eof bool, input []b
|
|||
// Estimate size for using a new table.
|
||||
// Use the previous header size as the best estimate.
|
||||
newSize := w.lastHeader + tokens.EstimatedBits()
|
||||
newSize += int(w.literalEncoding.codes[endBlockMarker].len) + newSize>>w.logNewTablePenalty
|
||||
newSize += int(w.literalEncoding.codes[endBlockMarker].len()) + newSize>>w.logNewTablePenalty
|
||||
|
||||
// The estimated size is calculated as an optimal table.
|
||||
// We add a penalty to make it more realistic and re-use a bit more.
|
||||
|
@ -854,8 +854,8 @@ func (w *huffmanBitWriter) writeTokens(tokens []token, leCodes, oeCodes []hcode)
|
|||
if t < 256 {
|
||||
//w.writeCode(lits[t.literal()])
|
||||
c := lits[t]
|
||||
bits |= uint64(c.code) << (nbits & 63)
|
||||
nbits += c.len
|
||||
bits |= c.code64() << (nbits & 63)
|
||||
nbits += c.len()
|
||||
if nbits >= 48 {
|
||||
binary.LittleEndian.PutUint64(w.bytes[nbytes:], bits)
|
||||
//*(*uint64)(unsafe.Pointer(&w.bytes[nbytes])) = bits
|
||||
|
@ -882,8 +882,8 @@ func (w *huffmanBitWriter) writeTokens(tokens []token, leCodes, oeCodes []hcode)
|
|||
} else {
|
||||
// inlined
|
||||
c := lengths[lengthCode]
|
||||
bits |= uint64(c.code) << (nbits & 63)
|
||||
nbits += c.len
|
||||
bits |= c.code64() << (nbits & 63)
|
||||
nbits += c.len()
|
||||
if nbits >= 48 {
|
||||
binary.LittleEndian.PutUint64(w.bytes[nbytes:], bits)
|
||||
//*(*uint64)(unsafe.Pointer(&w.bytes[nbytes])) = bits
|
||||
|
@ -931,8 +931,8 @@ func (w *huffmanBitWriter) writeTokens(tokens []token, leCodes, oeCodes []hcode)
|
|||
} else {
|
||||
// inlined
|
||||
c := offs[offsetCode]
|
||||
bits |= uint64(c.code) << (nbits & 63)
|
||||
nbits += c.len
|
||||
bits |= c.code64() << (nbits & 63)
|
||||
nbits += c.len()
|
||||
if nbits >= 48 {
|
||||
binary.LittleEndian.PutUint64(w.bytes[nbytes:], bits)
|
||||
//*(*uint64)(unsafe.Pointer(&w.bytes[nbytes])) = bits
|
||||
|
@ -1009,8 +1009,6 @@ func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte, sync bool) {
|
|||
}
|
||||
}
|
||||
|
||||
// Fill is rarely better...
|
||||
const fill = false
|
||||
const numLiterals = endBlockMarker + 1
|
||||
const numOffsets = 1
|
||||
|
||||
|
@ -1019,7 +1017,7 @@ func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte, sync bool) {
|
|||
// Assume header is around 70 bytes:
|
||||
// https://stackoverflow.com/a/25454430
|
||||
const guessHeaderSizeBits = 70 * 8
|
||||
histogram(input, w.literalFreq[:numLiterals], fill)
|
||||
histogram(input, w.literalFreq[:numLiterals])
|
||||
ssize, storable := w.storedSize(input)
|
||||
if storable && len(input) > 1024 {
|
||||
// Quick check for incompressible content.
|
||||
|
@ -1045,19 +1043,14 @@ func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte, sync bool) {
|
|||
}
|
||||
w.literalFreq[endBlockMarker] = 1
|
||||
w.tmpLitEncoding.generate(w.literalFreq[:numLiterals], 15)
|
||||
if fill {
|
||||
// Clear fill...
|
||||
for i := range w.literalFreq[:numLiterals] {
|
||||
w.literalFreq[i] = 0
|
||||
}
|
||||
histogram(input, w.literalFreq[:numLiterals], false)
|
||||
}
|
||||
estBits := w.tmpLitEncoding.canReuseBits(w.literalFreq[:numLiterals])
|
||||
estBits += w.lastHeader
|
||||
if w.lastHeader == 0 {
|
||||
estBits += guessHeaderSizeBits
|
||||
if estBits < math.MaxInt32 {
|
||||
estBits += w.lastHeader
|
||||
if w.lastHeader == 0 {
|
||||
estBits += guessHeaderSizeBits
|
||||
}
|
||||
estBits += estBits >> w.logNewTablePenalty
|
||||
}
|
||||
estBits += estBits >> w.logNewTablePenalty
|
||||
|
||||
// Store bytes, if we don't get a reasonable improvement.
|
||||
if storable && ssize <= estBits {
|
||||
|
@ -1134,12 +1127,12 @@ func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte, sync bool) {
|
|||
nbytes = 0
|
||||
}
|
||||
a, b := encoding[input[0]], encoding[input[1]]
|
||||
bits |= uint64(a.code) << (nbits & 63)
|
||||
bits |= uint64(b.code) << ((nbits + a.len) & 63)
|
||||
bits |= a.code64() << (nbits & 63)
|
||||
bits |= b.code64() << ((nbits + a.len()) & 63)
|
||||
c := encoding[input[2]]
|
||||
nbits += b.len + a.len
|
||||
bits |= uint64(c.code) << (nbits & 63)
|
||||
nbits += c.len
|
||||
nbits += b.len() + a.len()
|
||||
bits |= c.code64() << (nbits & 63)
|
||||
nbits += c.len()
|
||||
input = input[3:]
|
||||
}
|
||||
|
||||
|
@ -1165,10 +1158,11 @@ func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte, sync bool) {
|
|||
}
|
||||
// Bitwriting inlined, ~30% speedup
|
||||
c := encoding[t]
|
||||
bits |= uint64(c.code) << (nbits & 63)
|
||||
nbits += c.len
|
||||
bits |= c.code64() << (nbits & 63)
|
||||
|
||||
nbits += c.len()
|
||||
if debugDeflate {
|
||||
count += int(c.len)
|
||||
count += int(c.len())
|
||||
}
|
||||
}
|
||||
// Restore...
|
||||
|
|
74
vendor/github.com/klauspost/compress/flate/huffman_code.go
generated
vendored
74
vendor/github.com/klauspost/compress/flate/huffman_code.go
generated
vendored
|
@ -16,9 +16,18 @@ const (
|
|||
)
|
||||
|
||||
// hcode is a huffman code with a bit code and bit length.
|
||||
type hcode struct {
|
||||
code uint16
|
||||
len uint8
|
||||
type hcode uint32
|
||||
|
||||
func (h hcode) len() uint8 {
|
||||
return uint8(h)
|
||||
}
|
||||
|
||||
func (h hcode) code64() uint64 {
|
||||
return uint64(h >> 8)
|
||||
}
|
||||
|
||||
func (h hcode) zero() bool {
|
||||
return h == 0
|
||||
}
|
||||
|
||||
type huffmanEncoder struct {
|
||||
|
@ -58,8 +67,11 @@ type levelInfo struct {
|
|||
|
||||
// set sets the code and length of an hcode.
|
||||
func (h *hcode) set(code uint16, length uint8) {
|
||||
h.len = length
|
||||
h.code = code
|
||||
*h = hcode(length) | (hcode(code) << 8)
|
||||
}
|
||||
|
||||
func newhcode(code uint16, length uint8) hcode {
|
||||
return hcode(length) | (hcode(code) << 8)
|
||||
}
|
||||
|
||||
func reverseBits(number uint16, bitLength byte) uint16 {
|
||||
|
@ -100,7 +112,7 @@ func generateFixedLiteralEncoding() *huffmanEncoder {
|
|||
bits = ch + 192 - 280
|
||||
size = 8
|
||||
}
|
||||
codes[ch] = hcode{code: reverseBits(bits, size), len: size}
|
||||
codes[ch] = newhcode(reverseBits(bits, size), size)
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
@ -109,7 +121,7 @@ func generateFixedOffsetEncoding() *huffmanEncoder {
|
|||
h := newHuffmanEncoder(30)
|
||||
codes := h.codes
|
||||
for ch := range codes {
|
||||
codes[ch] = hcode{code: reverseBits(uint16(ch), 5), len: 5}
|
||||
codes[ch] = newhcode(reverseBits(uint16(ch), 5), 5)
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
@ -121,7 +133,7 @@ func (h *huffmanEncoder) bitLength(freq []uint16) int {
|
|||
var total int
|
||||
for i, f := range freq {
|
||||
if f != 0 {
|
||||
total += int(f) * int(h.codes[i].len)
|
||||
total += int(f) * int(h.codes[i].len())
|
||||
}
|
||||
}
|
||||
return total
|
||||
|
@ -130,7 +142,7 @@ func (h *huffmanEncoder) bitLength(freq []uint16) int {
|
|||
func (h *huffmanEncoder) bitLengthRaw(b []byte) int {
|
||||
var total int
|
||||
for _, f := range b {
|
||||
total += int(h.codes[f].len)
|
||||
total += int(h.codes[f].len())
|
||||
}
|
||||
return total
|
||||
}
|
||||
|
@ -141,10 +153,10 @@ func (h *huffmanEncoder) canReuseBits(freq []uint16) int {
|
|||
for i, f := range freq {
|
||||
if f != 0 {
|
||||
code := h.codes[i]
|
||||
if code.len == 0 {
|
||||
if code.zero() {
|
||||
return math.MaxInt32
|
||||
}
|
||||
total += int(f) * int(code.len)
|
||||
total += int(f) * int(code.len())
|
||||
}
|
||||
}
|
||||
return total
|
||||
|
@ -308,7 +320,7 @@ func (h *huffmanEncoder) assignEncodingAndSize(bitCount []int32, list []literalN
|
|||
|
||||
sortByLiteral(chunk)
|
||||
for _, node := range chunk {
|
||||
h.codes[node.literal] = hcode{code: reverseBits(code, uint8(n)), len: uint8(n)}
|
||||
h.codes[node.literal] = newhcode(reverseBits(code, uint8(n)), uint8(n))
|
||||
code++
|
||||
}
|
||||
list = list[0 : len(list)-int(bits)]
|
||||
|
@ -330,7 +342,7 @@ func (h *huffmanEncoder) generate(freq []uint16, maxBits int32) {
|
|||
list[count] = literalNode{uint16(i), f}
|
||||
count++
|
||||
} else {
|
||||
codes[i].len = 0
|
||||
codes[i] = 0
|
||||
}
|
||||
}
|
||||
list[count] = literalNode{}
|
||||
|
@ -364,21 +376,37 @@ func atLeastOne(v float32) float32 {
|
|||
return v
|
||||
}
|
||||
|
||||
// Unassigned values are assigned '1' in the histogram.
|
||||
func fillHist(b []uint16) {
|
||||
for i, v := range b {
|
||||
if v == 0 {
|
||||
b[i] = 1
|
||||
func histogram(b []byte, h []uint16) {
|
||||
if true && len(b) >= 8<<10 {
|
||||
// Split for bigger inputs
|
||||
histogramSplit(b, h)
|
||||
} else {
|
||||
h = h[:256]
|
||||
for _, t := range b {
|
||||
h[t]++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func histogram(b []byte, h []uint16, fill bool) {
|
||||
func histogramSplit(b []byte, h []uint16) {
|
||||
// Tested, and slightly faster than 2-way.
|
||||
// Writing to separate arrays and combining is also slightly slower.
|
||||
h = h[:256]
|
||||
for _, t := range b {
|
||||
h[t]++
|
||||
for len(b)&3 != 0 {
|
||||
h[b[0]]++
|
||||
b = b[1:]
|
||||
}
|
||||
if fill {
|
||||
fillHist(h)
|
||||
n := len(b) / 4
|
||||
x, y, z, w := b[:n], b[n:], b[n+n:], b[n+n+n:]
|
||||
y, z, w = y[:len(x)], z[:len(x)], w[:len(x)]
|
||||
for i, t := range x {
|
||||
v0 := &h[t]
|
||||
v1 := &h[y[i]]
|
||||
v3 := &h[w[i]]
|
||||
v2 := &h[z[i]]
|
||||
*v0++
|
||||
*v1++
|
||||
*v2++
|
||||
*v3++
|
||||
}
|
||||
}
|
||||
|
|
4
vendor/github.com/klauspost/compress/flate/stateless.go
generated
vendored
4
vendor/github.com/klauspost/compress/flate/stateless.go
generated
vendored
|
@ -59,9 +59,9 @@ var bitWriterPool = sync.Pool{
|
|||
},
|
||||
}
|
||||
|
||||
// StatelessDeflate allows to compress directly to a Writer without retaining state.
|
||||
// StatelessDeflate allows compressing directly to a Writer without retaining state.
|
||||
// When returning everything will be flushed.
|
||||
// Up to 8KB of an optional dictionary can be given which is presumed to presumed to precede the block.
|
||||
// Up to 8KB of an optional dictionary can be given which is presumed to precede the block.
|
||||
// Longer dictionaries will be truncated and will still produce valid output.
|
||||
// Sending nil dictionary is perfectly fine.
|
||||
func StatelessDeflate(out io.Writer, in []byte, eof bool, dict []byte) error {
|
||||
|
|
66
vendor/github.com/klauspost/compress/gzip/gunzip.go
generated
vendored
66
vendor/github.com/klauspost/compress/gzip/gunzip.go
generated
vendored
|
@ -252,42 +252,40 @@ func (z *Reader) Read(p []byte) (n int, err error) {
|
|||
return 0, z.err
|
||||
}
|
||||
|
||||
n, z.err = z.decompressor.Read(p)
|
||||
z.digest = crc32.Update(z.digest, crc32.IEEETable, p[:n])
|
||||
z.size += uint32(n)
|
||||
if z.err != io.EOF {
|
||||
// In the normal case we return here.
|
||||
return n, z.err
|
||||
for n == 0 {
|
||||
n, z.err = z.decompressor.Read(p)
|
||||
z.digest = crc32.Update(z.digest, crc32.IEEETable, p[:n])
|
||||
z.size += uint32(n)
|
||||
if z.err != io.EOF {
|
||||
// In the normal case we return here.
|
||||
return n, z.err
|
||||
}
|
||||
|
||||
// Finished file; check checksum and size.
|
||||
if _, err := io.ReadFull(z.r, z.buf[:8]); err != nil {
|
||||
z.err = noEOF(err)
|
||||
return n, z.err
|
||||
}
|
||||
digest := le.Uint32(z.buf[:4])
|
||||
size := le.Uint32(z.buf[4:8])
|
||||
if digest != z.digest || size != z.size {
|
||||
z.err = ErrChecksum
|
||||
return n, z.err
|
||||
}
|
||||
z.digest, z.size = 0, 0
|
||||
|
||||
// File is ok; check if there is another.
|
||||
if !z.multistream {
|
||||
return n, io.EOF
|
||||
}
|
||||
z.err = nil // Remove io.EOF
|
||||
|
||||
if _, z.err = z.readHeader(); z.err != nil {
|
||||
return n, z.err
|
||||
}
|
||||
}
|
||||
|
||||
// Finished file; check checksum and size.
|
||||
if _, err := io.ReadFull(z.r, z.buf[:8]); err != nil {
|
||||
z.err = noEOF(err)
|
||||
return n, z.err
|
||||
}
|
||||
digest := le.Uint32(z.buf[:4])
|
||||
size := le.Uint32(z.buf[4:8])
|
||||
if digest != z.digest || size != z.size {
|
||||
z.err = ErrChecksum
|
||||
return n, z.err
|
||||
}
|
||||
z.digest, z.size = 0, 0
|
||||
|
||||
// File is ok; check if there is another.
|
||||
if !z.multistream {
|
||||
return n, io.EOF
|
||||
}
|
||||
z.err = nil // Remove io.EOF
|
||||
|
||||
if _, z.err = z.readHeader(); z.err != nil {
|
||||
return n, z.err
|
||||
}
|
||||
|
||||
// Read from next file, if necessary.
|
||||
if n > 0 {
|
||||
return n, nil
|
||||
}
|
||||
return z.Read(p)
|
||||
return n, nil
|
||||
}
|
||||
|
||||
// Support the io.WriteTo interface for io.Copy and friends.
|
||||
|
|
2
vendor/github.com/lestrrat-go/httprc/.golangci.yml
generated
vendored
2
vendor/github.com/lestrrat-go/httprc/.golangci.yml
generated
vendored
|
@ -32,6 +32,7 @@ linters:
|
|||
- govet
|
||||
- interfacer # deprecated
|
||||
- ifshort
|
||||
- ireturn # No, I _LIKE_ returning interfaces
|
||||
- lll
|
||||
- maligned # deprecated
|
||||
- makezero
|
||||
|
@ -43,6 +44,7 @@ linters:
|
|||
- tagliatelle
|
||||
- testpackage
|
||||
- thelper
|
||||
- varnamelen # short names are ok
|
||||
- wrapcheck
|
||||
- wsl
|
||||
|
||||
|
|
6
vendor/github.com/lestrrat-go/httprc/Changes
generated
vendored
6
vendor/github.com/lestrrat-go/httprc/Changes
generated
vendored
|
@ -1,6 +1,12 @@
|
|||
Changes
|
||||
=======
|
||||
|
||||
v1.0.4 19 Jul 2022
|
||||
* Fix sloppy API breakage
|
||||
|
||||
v1.0.3 19 Jul 2022
|
||||
* Fix queue insertion in the middle of the queue (#7)
|
||||
|
||||
v1.0.2 13 Jun 2022
|
||||
* Properly release a lock when the fetch fails (#5)
|
||||
|
||||
|
|
17
vendor/github.com/lestrrat-go/httprc/queue.go
generated
vendored
17
vendor/github.com/lestrrat-go/httprc/queue.go
generated
vendored
|
@ -133,6 +133,17 @@ type queue struct {
|
|||
// when we get a new tick in the RQ loop, we process everything
|
||||
// that can be fired up to the point the tick was called
|
||||
list []*rqentry
|
||||
|
||||
// clock is really only used by testing
|
||||
clock interface {
|
||||
Now() time.Time
|
||||
}
|
||||
}
|
||||
|
||||
type clockFunc func() time.Time
|
||||
|
||||
func (cf clockFunc) Now() time.Time {
|
||||
return cf()
|
||||
}
|
||||
|
||||
func newQueue(ctx context.Context, window time.Duration, fetch Fetcher, errSink ErrSink) *queue {
|
||||
|
@ -142,6 +153,7 @@ func newQueue(ctx context.Context, window time.Duration, fetch Fetcher, errSink
|
|||
fetch: fetch,
|
||||
fetchCond: sync.NewCond(fetchLocker),
|
||||
registry: make(map[string]*entry),
|
||||
clock: clockFunc(time.Now),
|
||||
}
|
||||
|
||||
go rq.refreshLoop(ctx, errSink)
|
||||
|
@ -330,7 +342,7 @@ func (q *queue) fetchAndStore(ctx context.Context, e *entry) error {
|
|||
}
|
||||
|
||||
func (q *queue) Enqueue(u string, interval time.Duration) error {
|
||||
fireAt := time.Now().Add(interval).Round(time.Second)
|
||||
fireAt := q.clock.Now().Add(interval).Round(time.Second)
|
||||
|
||||
q.mu.Lock()
|
||||
defer q.mu.Unlock()
|
||||
|
@ -347,7 +359,8 @@ func (q *queue) Enqueue(u string, interval time.Duration) error {
|
|||
for i := 0; i < ll; i++ {
|
||||
if i == ll-1 || list[i].fireAt.After(fireAt) {
|
||||
// insert here
|
||||
list = append(append(list[:i], &rqentry{fireAt: fireAt, url: u}), list[i:]...)
|
||||
list = append(list[:i+1], list[i:]...)
|
||||
list[i] = &rqentry{fireAt: fireAt, url: u}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
30
vendor/github.com/lestrrat-go/jwx/v2/Changes
generated
vendored
30
vendor/github.com/lestrrat-go/jwx/v2/Changes
generated
vendored
|
@ -4,6 +4,36 @@ Changes
|
|||
v2 has many incompatibilities with v1. To see the full list of differences between
|
||||
v1 and v2, please read the Changes-v2.md file (https://github.com/lestrrat-go/jwx/blob/develop/v2/Changes-v2.md)
|
||||
|
||||
v2.0.4 - 19 Jul 2022
|
||||
[Bug Fixes]
|
||||
* [jwk] github.com/lestrrat-go/httprc, which jwk.Cache depends on,
|
||||
had a problem with inserting URLs to be re-fetched into its queue.
|
||||
As a result it could have been the case that some JWKS were not
|
||||
updated properly. Please upgrade if you use jwk.Cache.
|
||||
|
||||
* [jwk] cert.Get could fail with an out of bounds index look up
|
||||
|
||||
* [jwk] Fix doc buglet in `KeyType()` method
|
||||
|
||||
[New Features]
|
||||
* [jws] Add `jws.WithMultipleKeysPerKeyID()` sub-option to allow non-unique
|
||||
key IDs in a given JWK set. By default we assume that a key ID is unique
|
||||
within a key set, but enabling this option allows you to handle JWK sets
|
||||
that contain multiple keys that contain the same key ID.
|
||||
|
||||
* [jwt] Before v2.0.1, sub-second accuracy for time based fields
|
||||
(i.e. `iat`, `exp`, `nbf`) were not respected. Because of this the code
|
||||
to evaluate this code had always truncated any-subsecond portion
|
||||
of these fields, and therefore no sub-second comparisons worked.
|
||||
A new option for validation `jwt.WithTruncation()` has been added
|
||||
to workaround this. This option controls the value used to truncate
|
||||
the time fields. When set to 0, sub-second comparison would be
|
||||
possible.
|
||||
FIY, truncatation will still happen because we do not want to
|
||||
use the monotonic clocks when making comparisons. It's just that
|
||||
truncating using `0` as its argument effectively only strips out
|
||||
the monotonic clock
|
||||
|
||||
v2.0.3 - 13 Jun 2022
|
||||
[Bug Fixes]
|
||||
* [jwk] Update dependency on github.com/lestrrat-go/httprc to v1.0.2 to
|
||||
|
|
2
vendor/github.com/lestrrat-go/jwx/v2/cert/chain.go
generated
vendored
2
vendor/github.com/lestrrat-go/jwx/v2/cert/chain.go
generated
vendored
|
@ -48,7 +48,7 @@ func (cc *Chain) UnmarshalJSON(data []byte) error {
|
|||
// stored. `false` will be returned in the second argument if
|
||||
// the corresponding index is out of range.
|
||||
func (cc *Chain) Get(index int) ([]byte, bool) {
|
||||
if index < 0 || index > len(cc.certificates) {
|
||||
if index < 0 || index >= len(cc.certificates) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
|
|
2
vendor/github.com/lestrrat-go/jwx/v2/jwk/interface_gen.go
generated
vendored
2
vendor/github.com/lestrrat-go/jwx/v2/jwk/interface_gen.go
generated
vendored
|
@ -88,7 +88,7 @@ type Key interface {
|
|||
// If the key is already a public key, it returns a new copy minus the disallowed fields as above.
|
||||
PublicKey() (Key, error)
|
||||
|
||||
// KeyType returns the `kid` of a JWK
|
||||
// KeyType returns the `kty` of a JWK
|
||||
KeyType() jwa.KeyType
|
||||
// KeyUsage returns `use` of a JWK
|
||||
KeyUsage() string
|
||||
|
|
47
vendor/github.com/lestrrat-go/jwx/v2/jws/key_provider.go
generated
vendored
47
vendor/github.com/lestrrat-go/jwx/v2/jws/key_provider.go
generated
vendored
|
@ -102,10 +102,11 @@ func (kp *staticKeyProvider) FetchKeys(_ context.Context, sink KeySink, _ *Signa
|
|||
}
|
||||
|
||||
type keySetProvider struct {
|
||||
set jwk.Set
|
||||
requireKid bool // true if `kid` must be specified
|
||||
useDefault bool // true if the first key should be used iff there's exactly one key in set
|
||||
inferAlgorithm bool // true if the algorithm should be inferred from key type
|
||||
set jwk.Set
|
||||
requireKid bool // true if `kid` must be specified
|
||||
useDefault bool // true if the first key should be used iff there's exactly one key in set
|
||||
inferAlgorithm bool // true if the algorithm should be inferred from key type
|
||||
multipleKeysPerKeyID bool // true if we should attempt to match multiple keys per key ID. if false we assume that only one key exists for a given key ID
|
||||
}
|
||||
|
||||
func (kp *keySetProvider) selectKey(sink KeySink, key jwk.Key, sig *Signature, _ *Message) error {
|
||||
|
@ -151,8 +152,6 @@ func (kp *keySetProvider) selectKey(sink KeySink, key jwk.Key, sig *Signature, _
|
|||
|
||||
func (kp *keySetProvider) FetchKeys(_ context.Context, sink KeySink, sig *Signature, msg *Message) error {
|
||||
if kp.requireKid {
|
||||
var key jwk.Key
|
||||
|
||||
wantedKid := sig.ProtectedHeaders().KeyID()
|
||||
if wantedKid == "" {
|
||||
// If the kid is NOT specified... kp.useDefault needs to be true, and the
|
||||
|
@ -165,19 +164,43 @@ func (kp *keySetProvider) FetchKeys(_ context.Context, sink KeySink, sig *Signat
|
|||
|
||||
// if we got here, then useDefault == true AND there is exactly
|
||||
// one key in the set.
|
||||
key, _ = kp.set.Key(0)
|
||||
} else {
|
||||
// Otherwise we better be able to look up the key, baby.
|
||||
v, ok := kp.set.LookupKeyID(wantedKid)
|
||||
key, _ := kp.set.Key(0)
|
||||
return kp.selectKey(sink, key, sig, msg)
|
||||
}
|
||||
|
||||
// Otherwise we better be able to look up the key.
|
||||
// <= v2.0.3 backwards compatible case: only match a single key
|
||||
// whose key ID matches `wantedKid`
|
||||
if !kp.multipleKeysPerKeyID {
|
||||
key, ok := kp.set.LookupKeyID(wantedKid)
|
||||
if !ok {
|
||||
return fmt.Errorf(`failed to find key with key ID %q in key set`, wantedKid)
|
||||
}
|
||||
key = v
|
||||
return kp.selectKey(sink, key, sig, msg)
|
||||
}
|
||||
|
||||
return kp.selectKey(sink, key, sig, msg)
|
||||
// if multipleKeysPerKeyID is true, we attempt all keys whose key ID matches
|
||||
// the wantedKey
|
||||
var ok bool
|
||||
for i := 0; i < kp.set.Len(); i++ {
|
||||
key, _ := kp.set.Key(i)
|
||||
if key.KeyID() != wantedKid {
|
||||
continue
|
||||
}
|
||||
|
||||
if err := kp.selectKey(sink, key, sig, msg); err != nil {
|
||||
continue
|
||||
}
|
||||
ok = true
|
||||
// continue processing so that we try all keys with the same key ID
|
||||
}
|
||||
if !ok {
|
||||
return fmt.Errorf(`failed to find key with key ID %q in key set`, wantedKid)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Otherwise just try all keys
|
||||
for i := 0; i < kp.set.Len(); i++ {
|
||||
key, _ := kp.set.Key(i)
|
||||
if err := kp.selectKey(sink, key, sig, msg); err != nil {
|
||||
|
|
13
vendor/github.com/lestrrat-go/jwx/v2/jws/options.go
generated
vendored
13
vendor/github.com/lestrrat-go/jwx/v2/jws/options.go
generated
vendored
|
@ -119,7 +119,7 @@ func WithKey(alg jwa.KeyAlgorithm, key interface{}, options ...WithKeySuboption)
|
|||
// suboption types.
|
||||
func WithKeySet(set jwk.Set, options ...WithKeySetSuboption) VerifyOption {
|
||||
requireKid := true
|
||||
var useDefault, inferAlgorithm bool
|
||||
var useDefault, inferAlgorithm, multipleKeysPerKeyID bool
|
||||
for _, option := range options {
|
||||
//nolint:forcetypeassert
|
||||
switch option.Ident() {
|
||||
|
@ -127,16 +127,19 @@ func WithKeySet(set jwk.Set, options ...WithKeySetSuboption) VerifyOption {
|
|||
requireKid = option.Value().(bool)
|
||||
case identUseDefault{}:
|
||||
useDefault = option.Value().(bool)
|
||||
case identMultipleKeysPerKeyID{}:
|
||||
multipleKeysPerKeyID = option.Value().(bool)
|
||||
case identInferAlgorithmFromKey{}:
|
||||
inferAlgorithm = option.Value().(bool)
|
||||
}
|
||||
}
|
||||
|
||||
return WithKeyProvider(&keySetProvider{
|
||||
set: set,
|
||||
requireKid: requireKid,
|
||||
useDefault: useDefault,
|
||||
inferAlgorithm: inferAlgorithm,
|
||||
set: set,
|
||||
requireKid: requireKid,
|
||||
useDefault: useDefault,
|
||||
multipleKeysPerKeyID: multipleKeysPerKeyID,
|
||||
inferAlgorithm: inferAlgorithm,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
11
vendor/github.com/lestrrat-go/jwx/v2/jws/options.yaml
generated
vendored
11
vendor/github.com/lestrrat-go/jwx/v2/jws/options.yaml
generated
vendored
|
@ -117,9 +117,18 @@ options:
|
|||
interface: WithKeySetSuboption
|
||||
argument_type: bool
|
||||
comment: |
|
||||
WithrequiredKid specifies whether the keys in the jwk.Set should
|
||||
WithRequiredKid specifies whether the keys in the jwk.Set should
|
||||
only be matched if the target JWS message's Key ID and the Key ID
|
||||
in the given key matches.
|
||||
- ident: MultipleKeysPerKeyID
|
||||
interface: WithKeySetSuboption
|
||||
argument_type: bool
|
||||
comment: |
|
||||
WithMultipleKeysPerKeyID specifies if we should expect multiple keys
|
||||
to match against a key ID. By default it is assumed that key IDs are
|
||||
unique, i.e. for a given key ID, the key set only contains a single
|
||||
key that has the matching ID. When this option is set to true,
|
||||
multiple keys that match the same key ID in the set can be tried.
|
||||
- ident: Pretty
|
||||
interface: WithJSONSuboption
|
||||
argument_type: bool
|
||||
|
|
16
vendor/github.com/lestrrat-go/jwx/v2/jws/options_gen.go
generated
vendored
16
vendor/github.com/lestrrat-go/jwx/v2/jws/options_gen.go
generated
vendored
|
@ -132,6 +132,7 @@ type identKey struct{}
|
|||
type identKeyProvider struct{}
|
||||
type identKeyUsed struct{}
|
||||
type identMessage struct{}
|
||||
type identMultipleKeysPerKeyID struct{}
|
||||
type identPretty struct{}
|
||||
type identProtectedHeaders struct{}
|
||||
type identPublicHeaders struct{}
|
||||
|
@ -175,6 +176,10 @@ func (identMessage) String() string {
|
|||
return "WithMessage"
|
||||
}
|
||||
|
||||
func (identMultipleKeysPerKeyID) String() string {
|
||||
return "WithMultipleKeysPerKeyID"
|
||||
}
|
||||
|
||||
func (identPretty) String() string {
|
||||
return "WithPretty"
|
||||
}
|
||||
|
@ -268,6 +273,15 @@ func WithMessage(v *Message) VerifyOption {
|
|||
return &verifyOption{option.New(identMessage{}, v)}
|
||||
}
|
||||
|
||||
// WithMultipleKeysPerKeyID specifies if we should expect multiple keys
|
||||
// to match against a key ID. By default it is assumed that key IDs are
|
||||
// unique, i.e. for a given key ID, the key set only contains a single
|
||||
// key that has the matching ID. When this option is set to true,
|
||||
// multiple keys that match the same key ID in the set can be tried.
|
||||
func WithMultipleKeysPerKeyID(v bool) WithKeySetSuboption {
|
||||
return &withKeySetSuboption{option.New(identMultipleKeysPerKeyID{}, v)}
|
||||
}
|
||||
|
||||
// WithPretty specifies whether the JSON output should be formatted and
|
||||
// indented
|
||||
func WithPretty(v bool) WithJSONSuboption {
|
||||
|
@ -293,7 +307,7 @@ func WithPublicHeaders(v Headers) WithKeySuboption {
|
|||
return &withKeySuboption{option.New(identPublicHeaders{}, v)}
|
||||
}
|
||||
|
||||
// WithrequiredKid specifies whether the keys in the jwk.Set should
|
||||
// WithRequiredKid specifies whether the keys in the jwk.Set should
|
||||
// only be matched if the target JWS message's Key ID and the Key ID
|
||||
// in the given key matches.
|
||||
func WithRequireKid(v bool) WithKeySetSuboption {
|
||||
|
|
9
vendor/github.com/lestrrat-go/jwx/v2/jwt/options.yaml
generated
vendored
9
vendor/github.com/lestrrat-go/jwx/v2/jwt/options.yaml
generated
vendored
|
@ -47,6 +47,15 @@ options:
|
|||
comment: |
|
||||
WithAcceptableSkew specifies the duration in which exp and nbf
|
||||
claims may differ by. This value should be positive
|
||||
- ident: Truncation
|
||||
interface: ValidateOption
|
||||
argument_type: time.Duration
|
||||
comment: |
|
||||
WithTruncation speficies the amount that should be used when
|
||||
truncating time values used during time-based validation routines.
|
||||
By default time values are truncated down to second accuracy.
|
||||
If you want to use sub-second accuracy, you will need to set
|
||||
this value to 0.
|
||||
- ident: Clock
|
||||
interface: ValidateOption
|
||||
argument_type: Clock
|
||||
|
|
14
vendor/github.com/lestrrat-go/jwx/v2/jwt/options_gen.go
generated
vendored
14
vendor/github.com/lestrrat-go/jwx/v2/jwt/options_gen.go
generated
vendored
|
@ -137,6 +137,7 @@ type identNumericDateParsePrecision struct{}
|
|||
type identPedantic struct{}
|
||||
type identSignOption struct{}
|
||||
type identToken struct{}
|
||||
type identTruncation struct{}
|
||||
type identValidate struct{}
|
||||
type identValidator struct{}
|
||||
type identVerify struct{}
|
||||
|
@ -201,6 +202,10 @@ func (identToken) String() string {
|
|||
return "WithToken"
|
||||
}
|
||||
|
||||
func (identTruncation) String() string {
|
||||
return "WithTruncation"
|
||||
}
|
||||
|
||||
func (identValidate) String() string {
|
||||
return "WithValidate"
|
||||
}
|
||||
|
@ -329,6 +334,15 @@ func WithToken(v Token) ParseOption {
|
|||
return &parseOption{option.New(identToken{}, v)}
|
||||
}
|
||||
|
||||
// WithTruncation speficies the amount that should be used when
|
||||
// truncating time values used during time-based validation routines.
|
||||
// By default time values are truncated down to second accuracy.
|
||||
// If you want to use sub-second accuracy, you will need to set
|
||||
// this value to 0.
|
||||
func WithTruncation(v time.Duration) ValidateOption {
|
||||
return &validateOption{option.New(identTruncation{}, v)}
|
||||
}
|
||||
|
||||
// WithValidate is passed to `Parse()` method to denote that the
|
||||
// validation of the JWT token should be performed (or not) after
|
||||
// a successful parsing of the incoming payload.
|
||||
|
|
101
vendor/github.com/lestrrat-go/jwx/v2/jwt/validate.go
generated
vendored
101
vendor/github.com/lestrrat-go/jwx/v2/jwt/validate.go
generated
vendored
|
@ -3,6 +3,7 @@ package jwt
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
@ -44,6 +45,8 @@ func timeClaim(t Token, clock Clock, c string) time.Time {
|
|||
// that can control the behavior of this method.
|
||||
func Validate(t Token, options ...ValidateOption) error {
|
||||
ctx := context.Background()
|
||||
trunc := time.Second
|
||||
|
||||
var clock Clock = ClockFunc(time.Now)
|
||||
var skew time.Duration
|
||||
var validators = []Validator{
|
||||
|
@ -58,6 +61,8 @@ func Validate(t Token, options ...ValidateOption) error {
|
|||
clock = o.Value().(Clock)
|
||||
case identAcceptableSkew{}:
|
||||
skew = o.Value().(time.Duration)
|
||||
case identTruncation{}:
|
||||
trunc = o.Value().(time.Duration)
|
||||
case identContext{}:
|
||||
ctx = o.Value().(context.Context)
|
||||
case identValidator{}:
|
||||
|
@ -83,6 +88,7 @@ func Validate(t Token, options ...ValidateOption) error {
|
|||
|
||||
ctx = SetValidationCtxSkew(ctx, skew)
|
||||
ctx = SetValidationCtxClock(ctx, clock)
|
||||
ctx = SetValidationCtxTruncation(ctx, trunc)
|
||||
for _, v := range validators {
|
||||
if err := v.Validate(ctx, t); err != nil {
|
||||
return err
|
||||
|
@ -124,8 +130,8 @@ func (iitr *isInTimeRange) Validate(ctx context.Context, t Token) ValidationErro
|
|||
skew := ValidationCtxSkew(ctx) // MUST be populated
|
||||
// We don't check if the claims already exist, because we already did that
|
||||
// by piggybacking on `required` check.
|
||||
t1 := timeClaim(t, clock, iitr.c1).Truncate(time.Second)
|
||||
t2 := timeClaim(t, clock, iitr.c2).Truncate(time.Second)
|
||||
t1 := timeClaim(t, clock, iitr.c1)
|
||||
t2 := timeClaim(t, clock, iitr.c2)
|
||||
if iitr.less { // t1 - t2 <= iitr.dur
|
||||
// t1 - t2 < iitr.dur + skew
|
||||
if t1.Sub(t2) > iitr.dur+skew {
|
||||
|
@ -299,11 +305,20 @@ func (vf ValidatorFunc) Validate(ctx context.Context, tok Token) ValidationError
|
|||
|
||||
type identValidationCtxClock struct{}
|
||||
type identValidationCtxSkew struct{}
|
||||
type identValidationCtxTruncation struct{}
|
||||
|
||||
func SetValidationCtxClock(ctx context.Context, cl Clock) context.Context {
|
||||
return context.WithValue(ctx, identValidationCtxClock{}, cl)
|
||||
}
|
||||
|
||||
func SetValidationCtxTruncation(ctx context.Context, dur time.Duration) context.Context {
|
||||
return context.WithValue(ctx, identValidationCtxTruncation{}, dur)
|
||||
}
|
||||
|
||||
func SetValidationCtxSkew(ctx context.Context, dur time.Duration) context.Context {
|
||||
return context.WithValue(ctx, identValidationCtxSkew{}, dur)
|
||||
}
|
||||
|
||||
// ValidationCtxClock returns the Clock object associated with
|
||||
// the current validation context. This value will always be available
|
||||
// during validation of tokens.
|
||||
|
@ -312,15 +327,16 @@ func ValidationCtxClock(ctx context.Context) Clock {
|
|||
return ctx.Value(identValidationCtxClock{}).(Clock)
|
||||
}
|
||||
|
||||
func SetValidationCtxSkew(ctx context.Context, dur time.Duration) context.Context {
|
||||
return context.WithValue(ctx, identValidationCtxSkew{}, dur)
|
||||
}
|
||||
|
||||
func ValidationCtxSkew(ctx context.Context) time.Duration {
|
||||
//nolint:forcetypeassert
|
||||
return ctx.Value(identValidationCtxSkew{}).(time.Duration)
|
||||
}
|
||||
|
||||
func ValidationCtxTruncation(ctx context.Context) time.Duration {
|
||||
//nolint:forcetypeassert
|
||||
return ctx.Value(identValidationCtxTruncation{}).(time.Duration)
|
||||
}
|
||||
|
||||
// IsExpirationValid is one of the default validators that will be executed.
|
||||
// It does not need to be specified by users, but it exists as an
|
||||
// exported field so that you can check what it does.
|
||||
|
@ -333,14 +349,21 @@ func IsExpirationValid() Validator {
|
|||
}
|
||||
|
||||
func isExpirationValid(ctx context.Context, t Token) ValidationError {
|
||||
if tv := t.Expiration(); !tv.IsZero() && tv.Unix() != 0 {
|
||||
clock := ValidationCtxClock(ctx) // MUST be populated
|
||||
now := clock.Now().Truncate(time.Second)
|
||||
ttv := tv.Truncate(time.Second)
|
||||
skew := ValidationCtxSkew(ctx) // MUST be populated
|
||||
if !now.Before(ttv.Add(skew)) {
|
||||
return ErrTokenExpired()
|
||||
}
|
||||
tv := t.Expiration()
|
||||
if tv.IsZero() || tv.Unix() == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
clock := ValidationCtxClock(ctx) // MUST be populated
|
||||
skew := ValidationCtxSkew(ctx) // MUST be populated
|
||||
trunc := ValidationCtxTruncation(ctx) // MUST be populated
|
||||
|
||||
now := clock.Now().Truncate(trunc)
|
||||
ttv := tv.Truncate(trunc)
|
||||
|
||||
// expiration date must be after NOW
|
||||
if !now.Before(ttv.Add(skew)) {
|
||||
return ErrTokenExpired()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -357,14 +380,21 @@ func IsIssuedAtValid() Validator {
|
|||
}
|
||||
|
||||
func isIssuedAtValid(ctx context.Context, t Token) ValidationError {
|
||||
if tv := t.IssuedAt(); !tv.IsZero() && tv.Unix() != 0 {
|
||||
clock := ValidationCtxClock(ctx) // MUST be populated
|
||||
now := clock.Now().Truncate(time.Second)
|
||||
ttv := tv.Truncate(time.Second)
|
||||
skew := ValidationCtxSkew(ctx) // MUST be populated
|
||||
if now.Before(ttv.Add(-1 * skew)) {
|
||||
return ErrInvalidIssuedAt()
|
||||
}
|
||||
tv := t.IssuedAt()
|
||||
if tv.IsZero() || tv.Unix() == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
clock := ValidationCtxClock(ctx) // MUST be populated
|
||||
skew := ValidationCtxSkew(ctx) // MUST be populated
|
||||
trunc := ValidationCtxTruncation(ctx) // MUST be populated
|
||||
|
||||
now := clock.Now().Truncate(trunc)
|
||||
ttv := tv.Truncate(trunc)
|
||||
|
||||
log.Printf("now = %s, ttv = %s, skew = %s, trunc = %s", now.UTC(), ttv, skew, trunc)
|
||||
if now.Before(ttv.Add(-1 * skew)) {
|
||||
return ErrInvalidIssuedAt()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -381,15 +411,24 @@ func IsNbfValid() Validator {
|
|||
}
|
||||
|
||||
func isNbfValid(ctx context.Context, t Token) ValidationError {
|
||||
if tv := t.NotBefore(); !tv.IsZero() && tv.Unix() != 0 {
|
||||
clock := ValidationCtxClock(ctx) // MUST be populated
|
||||
now := clock.Now().Truncate(time.Second)
|
||||
ttv := tv.Truncate(time.Second)
|
||||
skew := ValidationCtxSkew(ctx) // MUST be populated
|
||||
// now cannot be before t, so we check for now > t - skew
|
||||
if !now.Equal(ttv) && !now.After(ttv.Add(-1*skew)) {
|
||||
return ErrTokenNotYetValid()
|
||||
}
|
||||
tv := t.NotBefore()
|
||||
if tv.IsZero() || tv.Unix() == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
clock := ValidationCtxClock(ctx) // MUST be populated
|
||||
skew := ValidationCtxSkew(ctx) // MUST be populated
|
||||
trunc := ValidationCtxTruncation(ctx) // MUST be populated
|
||||
|
||||
// Truncation always happens even for trunc = 0 because
|
||||
// we also use this to strip monotonic clocks
|
||||
now := clock.Now().Truncate(trunc)
|
||||
ttv := tv.Truncate(trunc)
|
||||
|
||||
// "now" cannot be before t - skew, so we check for now > t - skew
|
||||
ttv = ttv.Add(-1 * skew)
|
||||
if now.Before(ttv) {
|
||||
return ErrTokenNotYetValid()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
26
vendor/github.com/spf13/afero/.travis.yml
generated
vendored
26
vendor/github.com/spf13/afero/.travis.yml
generated
vendored
|
@ -1,26 +0,0 @@
|
|||
sudo: false
|
||||
language: go
|
||||
arch:
|
||||
- amd64
|
||||
- ppc64e
|
||||
|
||||
go:
|
||||
- "1.14"
|
||||
- "1.15"
|
||||
- "1.16"
|
||||
- tip
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- go: tip
|
||||
fast_finish: true
|
||||
|
||||
script:
|
||||
- go build -v ./...
|
||||
- go test -count=1 -cover -race -v ./...
|
||||
- go vet ./...
|
||||
- FILES=$(gofmt -s -l . zipfs sftpfs mem tarfs); if [[ -n "${FILES}" ]]; then echo "You have go format errors; gofmt your changes"; exit 1; fi
|
2
vendor/github.com/spf13/afero/README.md
generated
vendored
2
vendor/github.com/spf13/afero/README.md
generated
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
A FileSystem Abstraction System for Go
|
||||
|
||||
[](https://travis-ci.org/spf13/afero) [](https://ci.appveyor.com/project/spf13/afero) [](https://godoc.org/github.com/spf13/afero) [](https://gitter.im/spf13/afero?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://github.com/spf13/afero/actions/workflows/test.yml) [](https://godoc.org/github.com/spf13/afero) [](https://gitter.im/spf13/afero?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# Overview
|
||||
|
||||
|
|
4
vendor/github.com/spf13/afero/afero.go
generated
vendored
4
vendor/github.com/spf13/afero/afero.go
generated
vendored
|
@ -103,8 +103,8 @@ type Fs interface {
|
|||
|
||||
var (
|
||||
ErrFileClosed = errors.New("File is closed")
|
||||
ErrOutOfRange = errors.New("Out of range")
|
||||
ErrTooLarge = errors.New("Too large")
|
||||
ErrOutOfRange = errors.New("out of range")
|
||||
ErrTooLarge = errors.New("too large")
|
||||
ErrFileNotFound = os.ErrNotExist
|
||||
ErrFileExists = os.ErrExist
|
||||
ErrDestinationExists = os.ErrExist
|
||||
|
|
9
vendor/github.com/spf13/afero/appveyor.yml
generated
vendored
9
vendor/github.com/spf13/afero/appveyor.yml
generated
vendored
|
@ -1,3 +1,5 @@
|
|||
# This currently does nothing. We have moved to GitHub action, but this is kept
|
||||
# until spf13 has disabled this project in AppVeyor.
|
||||
version: '{build}'
|
||||
clone_folder: C:\gopath\src\github.com\spf13\afero
|
||||
environment:
|
||||
|
@ -6,10 +8,3 @@ build_script:
|
|||
- cmd: >-
|
||||
go version
|
||||
|
||||
go env
|
||||
|
||||
go get -v github.com/spf13/afero/...
|
||||
|
||||
go build -v github.com/spf13/afero/...
|
||||
test_script:
|
||||
- cmd: go test -count=1 -cover -race -v github.com/spf13/afero/...
|
||||
|
|
14
vendor/github.com/spf13/afero/basepath.go
generated
vendored
14
vendor/github.com/spf13/afero/basepath.go
generated
vendored
|
@ -1,6 +1,7 @@
|
|||
package afero
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
@ -8,7 +9,10 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
var _ Lstater = (*BasePathFs)(nil)
|
||||
var (
|
||||
_ Lstater = (*BasePathFs)(nil)
|
||||
_ fs.ReadDirFile = (*BasePathFile)(nil)
|
||||
)
|
||||
|
||||
// The BasePathFs restricts all operations to a given path within an Fs.
|
||||
// The given file name to the operations on this Fs will be prepended with
|
||||
|
@ -33,6 +37,14 @@ func (f *BasePathFile) Name() string {
|
|||
return strings.TrimPrefix(sourcename, filepath.Clean(f.path))
|
||||
}
|
||||
|
||||
func (f *BasePathFile) ReadDir(n int) ([]fs.DirEntry, error) {
|
||||
if rdf, ok := f.File.(fs.ReadDirFile); ok {
|
||||
return rdf.ReadDir(n)
|
||||
|
||||
}
|
||||
return readDirFile{f.File}.ReadDir(n)
|
||||
}
|
||||
|
||||
func NewBasePathFs(source Fs, path string) Fs {
|
||||
return &BasePathFs{source: source, path: path}
|
||||
}
|
||||
|
|
1
vendor/github.com/spf13/afero/const_bsds.go
generated
vendored
1
vendor/github.com/spf13/afero/const_bsds.go
generated
vendored
|
@ -11,6 +11,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:build aix || darwin || openbsd || freebsd || netbsd || dragonfly
|
||||
// +build aix darwin openbsd freebsd netbsd dragonfly
|
||||
|
||||
package afero
|
||||
|
|
8
vendor/github.com/spf13/afero/const_win_unix.go
generated
vendored
8
vendor/github.com/spf13/afero/const_win_unix.go
generated
vendored
|
@ -10,12 +10,8 @@
|
|||
// 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.
|
||||
// +build !darwin
|
||||
// +build !openbsd
|
||||
// +build !freebsd
|
||||
// +build !dragonfly
|
||||
// +build !netbsd
|
||||
// +build !aix
|
||||
//go:build !darwin && !openbsd && !freebsd && !dragonfly && !netbsd && !aix
|
||||
// +build !darwin,!openbsd,!freebsd,!dragonfly,!netbsd,!aix
|
||||
|
||||
package afero
|
||||
|
||||
|
|
2
vendor/github.com/spf13/afero/httpFs.go
generated
vendored
2
vendor/github.com/spf13/afero/httpFs.go
generated
vendored
|
@ -29,7 +29,7 @@ type httpDir struct {
|
|||
}
|
||||
|
||||
func (d httpDir) Open(name string) (http.File, error) {
|
||||
if filepath.Separator != '/' && strings.IndexRune(name, filepath.Separator) >= 0 ||
|
||||
if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) ||
|
||||
strings.Contains(name, "\x00") {
|
||||
return nil, errors.New("http: invalid character in file path")
|
||||
}
|
||||
|
|
27
vendor/github.com/spf13/afero/internal/common/adapters.go
generated
vendored
Normal file
27
vendor/github.com/spf13/afero/internal/common/adapters.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright © 2022 Steve Francia <spf@spf13.com>.
|
||||
//
|
||||
// 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 common
|
||||
|
||||
import "io/fs"
|
||||
|
||||
// FileInfoDirEntry provides an adapter from os.FileInfo to fs.DirEntry
|
||||
type FileInfoDirEntry struct {
|
||||
fs.FileInfo
|
||||
}
|
||||
|
||||
var _ fs.DirEntry = FileInfoDirEntry{}
|
||||
|
||||
func (d FileInfoDirEntry) Type() fs.FileMode { return d.FileInfo.Mode().Type() }
|
||||
|
||||
func (d FileInfoDirEntry) Info() (fs.FileInfo, error) { return d.FileInfo, nil }
|
38
vendor/github.com/spf13/afero/iofs.go
generated
vendored
38
vendor/github.com/spf13/afero/iofs.go
generated
vendored
|
@ -1,3 +1,4 @@
|
|||
//go:build go1.16
|
||||
// +build go1.16
|
||||
|
||||
package afero
|
||||
|
@ -7,7 +8,10 @@ import (
|
|||
"io/fs"
|
||||
"os"
|
||||
"path"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/afero/internal/common"
|
||||
)
|
||||
|
||||
// IOFS adopts afero.Fs to stdlib io/fs.FS
|
||||
|
@ -66,14 +70,31 @@ func (iofs IOFS) Glob(pattern string) ([]string, error) {
|
|||
}
|
||||
|
||||
func (iofs IOFS) ReadDir(name string) ([]fs.DirEntry, error) {
|
||||
items, err := ReadDir(iofs.Fs, name)
|
||||
f, err := iofs.Fs.Open(name)
|
||||
if err != nil {
|
||||
return nil, iofs.wrapError("readdir", name, err)
|
||||
}
|
||||
|
||||
defer f.Close()
|
||||
|
||||
if rdf, ok := f.(fs.ReadDirFile); ok {
|
||||
items, err := rdf.ReadDir(-1)
|
||||
if err != nil {
|
||||
return nil, iofs.wrapError("readdir", name, err)
|
||||
}
|
||||
sort.Slice(items, func(i, j int) bool { return items[i].Name() < items[j].Name() })
|
||||
return items, nil
|
||||
}
|
||||
|
||||
items, err := f.Readdir(-1)
|
||||
if err != nil {
|
||||
return nil, iofs.wrapError("readdir", name, err)
|
||||
}
|
||||
sort.Sort(byName(items))
|
||||
|
||||
ret := make([]fs.DirEntry, len(items))
|
||||
for i := range items {
|
||||
ret[i] = dirEntry{items[i]}
|
||||
ret[i] = common.FileInfoDirEntry{FileInfo: items[i]}
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
|
@ -108,17 +129,6 @@ func (IOFS) wrapError(op, path string, err error) error {
|
|||
}
|
||||
}
|
||||
|
||||
// dirEntry provides adapter from os.FileInfo to fs.DirEntry
|
||||
type dirEntry struct {
|
||||
fs.FileInfo
|
||||
}
|
||||
|
||||
var _ fs.DirEntry = dirEntry{}
|
||||
|
||||
func (d dirEntry) Type() fs.FileMode { return d.FileInfo.Mode().Type() }
|
||||
|
||||
func (d dirEntry) Info() (fs.FileInfo, error) { return d.FileInfo, nil }
|
||||
|
||||
// readDirFile provides adapter from afero.File to fs.ReadDirFile needed for correct Open
|
||||
type readDirFile struct {
|
||||
File
|
||||
|
@ -134,7 +144,7 @@ func (r readDirFile) ReadDir(n int) ([]fs.DirEntry, error) {
|
|||
|
||||
ret := make([]fs.DirEntry, len(items))
|
||||
for i := range items {
|
||||
ret[i] = dirEntry{items[i]}
|
||||
ret[i] = common.FileInfoDirEntry{FileInfo: items[i]}
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
|
|
10
vendor/github.com/spf13/afero/ioutil.go
generated
vendored
10
vendor/github.com/spf13/afero/ioutil.go
generated
vendored
|
@ -141,7 +141,7 @@ func WriteFile(fs Fs, filename string, data []byte, perm os.FileMode) error {
|
|||
// We generate random temporary file names so that there's a good
|
||||
// chance the file doesn't exist yet - keeps the number of tries in
|
||||
// TempFile to a minimum.
|
||||
var rand uint32
|
||||
var randNum uint32
|
||||
var randmu sync.Mutex
|
||||
|
||||
func reseed() uint32 {
|
||||
|
@ -150,12 +150,12 @@ func reseed() uint32 {
|
|||
|
||||
func nextRandom() string {
|
||||
randmu.Lock()
|
||||
r := rand
|
||||
r := randNum
|
||||
if r == 0 {
|
||||
r = reseed()
|
||||
}
|
||||
r = r*1664525 + 1013904223 // constants from Numerical Recipes
|
||||
rand = r
|
||||
randNum = r
|
||||
randmu.Unlock()
|
||||
return strconv.Itoa(int(1e9 + r%1e9))[1:]
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ func TempFile(fs Fs, dir, pattern string) (f File, err error) {
|
|||
if os.IsExist(err) {
|
||||
if nconflict++; nconflict > 10 {
|
||||
randmu.Lock()
|
||||
rand = reseed()
|
||||
randNum = reseed()
|
||||
randmu.Unlock()
|
||||
}
|
||||
continue
|
||||
|
@ -226,7 +226,7 @@ func TempDir(fs Fs, dir, prefix string) (name string, err error) {
|
|||
if os.IsExist(err) {
|
||||
if nconflict++; nconflict > 10 {
|
||||
randmu.Lock()
|
||||
rand = reseed()
|
||||
randNum = reseed()
|
||||
randmu.Unlock()
|
||||
}
|
||||
continue
|
||||
|
|
30
vendor/github.com/spf13/afero/mem/file.go
generated
vendored
30
vendor/github.com/spf13/afero/mem/file.go
generated
vendored
|
@ -18,15 +18,20 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"io"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/afero/internal/common"
|
||||
)
|
||||
|
||||
const FilePathSeparator = string(filepath.Separator)
|
||||
|
||||
var _ fs.ReadDirFile = &File{}
|
||||
|
||||
type File struct {
|
||||
// atomic requires 64-bit alignment for struct field access
|
||||
at int64
|
||||
|
@ -183,10 +188,23 @@ func (f *File) Readdirnames(n int) (names []string, err error) {
|
|||
return names, err
|
||||
}
|
||||
|
||||
// Implements fs.ReadDirFile
|
||||
func (f *File) ReadDir(n int) ([]fs.DirEntry, error) {
|
||||
fi, err := f.Readdir(n)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
di := make([]fs.DirEntry, len(fi))
|
||||
for i, f := range fi {
|
||||
di[i] = common.FileInfoDirEntry{FileInfo: f}
|
||||
}
|
||||
return di, nil
|
||||
}
|
||||
|
||||
func (f *File) Read(b []byte) (n int, err error) {
|
||||
f.fileData.Lock()
|
||||
defer f.fileData.Unlock()
|
||||
if f.closed == true {
|
||||
if f.closed {
|
||||
return 0, ErrFileClosed
|
||||
}
|
||||
if len(b) > 0 && int(f.at) == len(f.fileData.data) {
|
||||
|
@ -214,7 +232,7 @@ func (f *File) ReadAt(b []byte, off int64) (n int, err error) {
|
|||
}
|
||||
|
||||
func (f *File) Truncate(size int64) error {
|
||||
if f.closed == true {
|
||||
if f.closed {
|
||||
return ErrFileClosed
|
||||
}
|
||||
if f.readOnly {
|
||||
|
@ -236,7 +254,7 @@ func (f *File) Truncate(size int64) error {
|
|||
}
|
||||
|
||||
func (f *File) Seek(offset int64, whence int) (int64, error) {
|
||||
if f.closed == true {
|
||||
if f.closed {
|
||||
return 0, ErrFileClosed
|
||||
}
|
||||
switch whence {
|
||||
|
@ -251,7 +269,7 @@ func (f *File) Seek(offset int64, whence int) (int64, error) {
|
|||
}
|
||||
|
||||
func (f *File) Write(b []byte) (n int, err error) {
|
||||
if f.closed == true {
|
||||
if f.closed {
|
||||
return 0, ErrFileClosed
|
||||
}
|
||||
if f.readOnly {
|
||||
|
@ -330,8 +348,8 @@ func (s *FileInfo) Size() int64 {
|
|||
|
||||
var (
|
||||
ErrFileClosed = errors.New("File is closed")
|
||||
ErrOutOfRange = errors.New("Out of range")
|
||||
ErrTooLarge = errors.New("Too large")
|
||||
ErrOutOfRange = errors.New("out of range")
|
||||
ErrTooLarge = errors.New("too large")
|
||||
ErrFileNotFound = os.ErrNotExist
|
||||
ErrFileExists = os.ErrExist
|
||||
ErrDestinationExists = os.ErrExist
|
||||
|
|
2
vendor/github.com/spf13/afero/unionFile.go
generated
vendored
2
vendor/github.com/spf13/afero/unionFile.go
generated
vendored
|
@ -65,7 +65,7 @@ func (f *UnionFile) ReadAt(s []byte, o int64) (int, error) {
|
|||
if f.Layer != nil {
|
||||
n, err := f.Layer.ReadAt(s, o)
|
||||
if (err == nil || err == io.EOF) && f.Base != nil {
|
||||
_, err = f.Base.Seek(o+int64(n), os.SEEK_SET)
|
||||
_, err = f.Base.Seek(o+int64(n), io.SeekStart)
|
||||
}
|
||||
return n, err
|
||||
}
|
||||
|
|
10
vendor/github.com/spf13/afero/util.go
generated
vendored
10
vendor/github.com/spf13/afero/util.go
generated
vendored
|
@ -25,6 +25,7 @@ import (
|
|||
"strings"
|
||||
"unicode"
|
||||
|
||||
"golang.org/x/text/runes"
|
||||
"golang.org/x/text/transform"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
)
|
||||
|
@ -158,16 +159,12 @@ func UnicodeSanitize(s string) string {
|
|||
|
||||
// Transform characters with accents into plain forms.
|
||||
func NeuterAccents(s string) string {
|
||||
t := transform.Chain(norm.NFD, transform.RemoveFunc(isMn), norm.NFC)
|
||||
t := transform.Chain(norm.NFD, runes.Remove(runes.In(unicode.Mn)), norm.NFC)
|
||||
result, _, _ := transform.String(t, string(s))
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
func isMn(r rune) bool {
|
||||
return unicode.Is(unicode.Mn, r) // Mn: nonspacing marks
|
||||
}
|
||||
|
||||
func (a Afero) FileContainsBytes(filename string, subslice []byte) (bool, error) {
|
||||
return FileContainsBytes(a.Fs, filename, subslice)
|
||||
}
|
||||
|
@ -299,6 +296,9 @@ func IsEmpty(fs Fs, path string) (bool, error) {
|
|||
}
|
||||
defer f.Close()
|
||||
list, err := f.Readdir(-1)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return len(list) == 0, nil
|
||||
}
|
||||
return fi.Size() == 0, nil
|
||||
|
|
24
vendor/github.com/stretchr/testify/assert/assertion_compare.go
generated
vendored
24
vendor/github.com/stretchr/testify/assert/assertion_compare.go
generated
vendored
|
@ -1,6 +1,7 @@
|
|||
package assert
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"time"
|
||||
|
@ -32,7 +33,8 @@ var (
|
|||
|
||||
stringType = reflect.TypeOf("")
|
||||
|
||||
timeType = reflect.TypeOf(time.Time{})
|
||||
timeType = reflect.TypeOf(time.Time{})
|
||||
bytesType = reflect.TypeOf([]byte{})
|
||||
)
|
||||
|
||||
func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
|
||||
|
@ -323,6 +325,26 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
|
|||
|
||||
return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64)
|
||||
}
|
||||
case reflect.Slice:
|
||||
{
|
||||
// We only care about the []byte type.
|
||||
if !canConvert(obj1Value, bytesType) {
|
||||
break
|
||||
}
|
||||
|
||||
// []byte can be compared!
|
||||
bytesObj1, ok := obj1.([]byte)
|
||||
if !ok {
|
||||
bytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte)
|
||||
|
||||
}
|
||||
bytesObj2, ok := obj2.([]byte)
|
||||
if !ok {
|
||||
bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte)
|
||||
}
|
||||
|
||||
return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true
|
||||
}
|
||||
}
|
||||
|
||||
return compareEqual, false
|
||||
|
|
10
vendor/github.com/stretchr/testify/assert/assertion_format.go
generated
vendored
10
vendor/github.com/stretchr/testify/assert/assertion_format.go
generated
vendored
|
@ -736,6 +736,16 @@ func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta tim
|
|||
return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...)
|
||||
}
|
||||
|
||||
// WithinRangef asserts that a time is within a time range (inclusive).
|
||||
//
|
||||
// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")
|
||||
func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool {
|
||||
if h, ok := t.(tHelper); ok {
|
||||
h.Helper()
|
||||
}
|
||||
return WithinRange(t, actual, start, end, append([]interface{}{msg}, args...)...)
|
||||
}
|
||||
|
||||
// YAMLEqf asserts that two YAML strings are equivalent.
|
||||
func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool {
|
||||
if h, ok := t.(tHelper); ok {
|
||||
|
|
20
vendor/github.com/stretchr/testify/assert/assertion_forward.go
generated
vendored
20
vendor/github.com/stretchr/testify/assert/assertion_forward.go
generated
vendored
|
@ -1461,6 +1461,26 @@ func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta
|
|||
return WithinDurationf(a.t, expected, actual, delta, msg, args...)
|
||||
}
|
||||
|
||||
// WithinRange asserts that a time is within a time range (inclusive).
|
||||
//
|
||||
// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))
|
||||
func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) bool {
|
||||
if h, ok := a.t.(tHelper); ok {
|
||||
h.Helper()
|
||||
}
|
||||
return WithinRange(a.t, actual, start, end, msgAndArgs...)
|
||||
}
|
||||
|
||||
// WithinRangef asserts that a time is within a time range (inclusive).
|
||||
//
|
||||
// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")
|
||||
func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool {
|
||||
if h, ok := a.t.(tHelper); ok {
|
||||
h.Helper()
|
||||
}
|
||||
return WithinRangef(a.t, actual, start, end, msg, args...)
|
||||
}
|
||||
|
||||
// YAMLEq asserts that two YAML strings are equivalent.
|
||||
func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool {
|
||||
if h, ok := a.t.(tHelper); ok {
|
||||
|
|
71
vendor/github.com/stretchr/testify/assert/assertions.go
generated
vendored
71
vendor/github.com/stretchr/testify/assert/assertions.go
generated
vendored
|
@ -8,6 +8,7 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"runtime"
|
||||
|
@ -144,7 +145,8 @@ func CallerInfo() []string {
|
|||
if len(parts) > 1 {
|
||||
dir := parts[len(parts)-2]
|
||||
if (dir != "assert" && dir != "mock" && dir != "require") || file == "mock_test.go" {
|
||||
callers = append(callers, fmt.Sprintf("%s:%d", file, line))
|
||||
path, _ := filepath.Abs(file)
|
||||
callers = append(callers, fmt.Sprintf("%s:%d", path, line))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -816,7 +818,6 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok
|
|||
return true // we consider nil to be equal to the nil set
|
||||
}
|
||||
|
||||
subsetValue := reflect.ValueOf(subset)
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
ok = false
|
||||
|
@ -826,14 +827,32 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok
|
|||
listKind := reflect.TypeOf(list).Kind()
|
||||
subsetKind := reflect.TypeOf(subset).Kind()
|
||||
|
||||
if listKind != reflect.Array && listKind != reflect.Slice {
|
||||
if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {
|
||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
|
||||
}
|
||||
|
||||
if subsetKind != reflect.Array && subsetKind != reflect.Slice {
|
||||
if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map {
|
||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
|
||||
}
|
||||
|
||||
subsetValue := reflect.ValueOf(subset)
|
||||
if subsetKind == reflect.Map && listKind == reflect.Map {
|
||||
listValue := reflect.ValueOf(list)
|
||||
subsetKeys := subsetValue.MapKeys()
|
||||
|
||||
for i := 0; i < len(subsetKeys); i++ {
|
||||
subsetKey := subsetKeys[i]
|
||||
subsetElement := subsetValue.MapIndex(subsetKey).Interface()
|
||||
listElement := listValue.MapIndex(subsetKey).Interface()
|
||||
|
||||
if !ObjectsAreEqual(subsetElement, listElement) {
|
||||
return Fail(t, fmt.Sprintf("\"%s\" does not contain \"%s\"", list, subsetElement), msgAndArgs...)
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
for i := 0; i < subsetValue.Len(); i++ {
|
||||
element := subsetValue.Index(i).Interface()
|
||||
ok, found := containsElement(list, element)
|
||||
|
@ -860,7 +879,6 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
|
|||
return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...)
|
||||
}
|
||||
|
||||
subsetValue := reflect.ValueOf(subset)
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
ok = false
|
||||
|
@ -870,14 +888,32 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
|
|||
listKind := reflect.TypeOf(list).Kind()
|
||||
subsetKind := reflect.TypeOf(subset).Kind()
|
||||
|
||||
if listKind != reflect.Array && listKind != reflect.Slice {
|
||||
if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map {
|
||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...)
|
||||
}
|
||||
|
||||
if subsetKind != reflect.Array && subsetKind != reflect.Slice {
|
||||
if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map {
|
||||
return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...)
|
||||
}
|
||||
|
||||
subsetValue := reflect.ValueOf(subset)
|
||||
if subsetKind == reflect.Map && listKind == reflect.Map {
|
||||
listValue := reflect.ValueOf(list)
|
||||
subsetKeys := subsetValue.MapKeys()
|
||||
|
||||
for i := 0; i < len(subsetKeys); i++ {
|
||||
subsetKey := subsetKeys[i]
|
||||
subsetElement := subsetValue.MapIndex(subsetKey).Interface()
|
||||
listElement := listValue.MapIndex(subsetKey).Interface()
|
||||
|
||||
if !ObjectsAreEqual(subsetElement, listElement) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...)
|
||||
}
|
||||
|
||||
for i := 0; i < subsetValue.Len(); i++ {
|
||||
element := subsetValue.Index(i).Interface()
|
||||
ok, found := containsElement(list, element)
|
||||
|
@ -1110,6 +1146,27 @@ func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration,
|
|||
return true
|
||||
}
|
||||
|
||||
// WithinRange asserts that a time is within a time range (inclusive).
|
||||
//
|
||||
// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))
|
||||
func WithinRange(t TestingT, actual, start, end time.Time, msgAndArgs ...interface{}) bool {
|
||||
if h, ok := t.(tHelper); ok {
|
||||
h.Helper()
|
||||
}
|
||||
|
||||
if end.Before(start) {
|
||||
return Fail(t, "Start should be before end", msgAndArgs...)
|
||||
}
|
||||
|
||||
if actual.Before(start) {
|
||||
return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is before the range", actual, start, end), msgAndArgs...)
|
||||
} else if actual.After(end) {
|
||||
return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is after the range", actual, start, end), msgAndArgs...)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func toFloat(x interface{}) (float64, bool) {
|
||||
var xf float64
|
||||
xok := true
|
||||
|
|
1
vendor/github.com/valyala/fasthttp/.gitignore
generated
vendored
1
vendor/github.com/valyala/fasthttp/.gitignore
generated
vendored
|
@ -3,5 +3,6 @@ tags
|
|||
*.fasthttp.gz
|
||||
*.fasthttp.br
|
||||
.idea
|
||||
.vscode
|
||||
.DS_Store
|
||||
vendor/
|
||||
|
|
2
vendor/github.com/valyala/fasthttp/args.go
generated
vendored
2
vendor/github.com/valyala/fasthttp/args.go
generated
vendored
|
@ -343,7 +343,7 @@ func (a *Args) GetUfloatOrZero(key string) float64 {
|
|||
// true is returned for "1", "t", "T", "true", "TRUE", "True", "y", "yes", "Y", "YES", "Yes",
|
||||
// otherwise false is returned.
|
||||
func (a *Args) GetBool(key string) bool {
|
||||
switch b2s(a.Peek(key)) {
|
||||
switch string(a.Peek(key)) {
|
||||
// Support the same true cases as strconv.ParseBool
|
||||
// See: https://github.com/golang/go/blob/4e1b11e2c9bdb0ddea1141eed487be1a626ff5be/src/strconv/atob.go#L12
|
||||
// and Y and Yes versions.
|
||||
|
|
4
vendor/github.com/valyala/fasthttp/client.go
generated
vendored
4
vendor/github.com/valyala/fasthttp/client.go
generated
vendored
|
@ -297,6 +297,9 @@ type Client struct {
|
|||
// By default will use isIdempotent function
|
||||
RetryIf RetryIfFunc
|
||||
|
||||
// Connection pool strategy. Can be either LIFO or FIFO (default).
|
||||
ConnPoolStrategy ConnPoolStrategyType
|
||||
|
||||
// ConfigureClient configures the fasthttp.HostClient.
|
||||
ConfigureClient func(hc *HostClient) error
|
||||
|
||||
|
@ -510,6 +513,7 @@ func (c *Client) Do(req *Request, resp *Response) error {
|
|||
DisablePathNormalizing: c.DisablePathNormalizing,
|
||||
MaxConnWaitTimeout: c.MaxConnWaitTimeout,
|
||||
RetryIf: c.RetryIf,
|
||||
ConnPoolStrategy: c.ConnPoolStrategy,
|
||||
clientReaderPool: &c.readerPool,
|
||||
clientWriterPool: &c.writerPool,
|
||||
}
|
||||
|
|
8
vendor/github.com/valyala/fasthttp/fs.go
generated
vendored
8
vendor/github.com/valyala/fasthttp/fs.go
generated
vendored
|
@ -898,16 +898,16 @@ func (h *fsHandler) handleRequest(ctx *RequestCtx) {
|
|||
hdr := &ctx.Response.Header
|
||||
if ff.compressed {
|
||||
if fileEncoding == "br" {
|
||||
hdr.SetCanonical(strContentEncoding, strBr)
|
||||
hdr.SetContentEncodingBytes(strBr)
|
||||
} else if fileEncoding == "gzip" {
|
||||
hdr.SetCanonical(strContentEncoding, strGzip)
|
||||
hdr.SetContentEncodingBytes(strGzip)
|
||||
}
|
||||
}
|
||||
|
||||
statusCode := StatusOK
|
||||
contentLength := ff.contentLength
|
||||
if h.acceptByteRange {
|
||||
hdr.SetCanonical(strAcceptRanges, strBytes)
|
||||
hdr.setNonSpecial(strAcceptRanges, strBytes)
|
||||
if len(byteRange) > 0 {
|
||||
startPos, endPos, err := ParseByteRange(byteRange, contentLength)
|
||||
if err != nil {
|
||||
|
@ -930,7 +930,7 @@ func (h *fsHandler) handleRequest(ctx *RequestCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
hdr.SetCanonical(strLastModified, ff.lastModifiedStr)
|
||||
hdr.setNonSpecial(strLastModified, ff.lastModifiedStr)
|
||||
if !ctx.IsHead() {
|
||||
ctx.SetBodyStream(r, contentLength)
|
||||
} else {
|
||||
|
|
86
vendor/github.com/valyala/fasthttp/header.go
generated
vendored
86
vendor/github.com/valyala/fasthttp/header.go
generated
vendored
|
@ -39,8 +39,9 @@ type ResponseHeader struct {
|
|||
contentLengthBytes []byte
|
||||
secureErrorLogMessage bool
|
||||
|
||||
contentType []byte
|
||||
server []byte
|
||||
contentType []byte
|
||||
contentEncoding []byte
|
||||
server []byte
|
||||
|
||||
h []argsKV
|
||||
trailer []argsKV
|
||||
|
@ -103,7 +104,7 @@ func (h *ResponseHeader) SetContentRange(startPos, endPos, contentLength int) {
|
|||
b = AppendUint(b, contentLength)
|
||||
h.bufKV.value = b
|
||||
|
||||
h.SetCanonical(strContentRange, h.bufKV.value)
|
||||
h.setNonSpecial(strContentRange, h.bufKV.value)
|
||||
}
|
||||
|
||||
// SetByteRange sets 'Range: bytes=startPos-endPos' header.
|
||||
|
@ -125,7 +126,7 @@ func (h *RequestHeader) SetByteRange(startPos, endPos int) {
|
|||
}
|
||||
h.bufKV.value = b
|
||||
|
||||
h.SetCanonical(strRange, h.bufKV.value)
|
||||
h.setNonSpecial(strRange, h.bufKV.value)
|
||||
}
|
||||
|
||||
// StatusCode returns response status code.
|
||||
|
@ -167,7 +168,7 @@ func (h *ResponseHeader) SetProtocol(protocol []byte) {
|
|||
// SetLastModified sets 'Last-Modified' header to the given value.
|
||||
func (h *ResponseHeader) SetLastModified(t time.Time) {
|
||||
h.bufKV.value = AppendHTTPDate(h.bufKV.value[:0], t)
|
||||
h.SetCanonical(strLastModified, h.bufKV.value)
|
||||
h.setNonSpecial(strLastModified, h.bufKV.value)
|
||||
}
|
||||
|
||||
// ConnectionClose returns true if 'Connection: close' header is set.
|
||||
|
@ -325,6 +326,21 @@ func (h *ResponseHeader) SetContentTypeBytes(contentType []byte) {
|
|||
h.contentType = append(h.contentType[:0], contentType...)
|
||||
}
|
||||
|
||||
// ContentEncoding returns Content-Encoding header value.
|
||||
func (h *ResponseHeader) ContentEncoding() []byte {
|
||||
return h.contentEncoding
|
||||
}
|
||||
|
||||
// SetContentEncoding sets Content-Encoding header value.
|
||||
func (h *ResponseHeader) SetContentEncoding(contentEncoding string) {
|
||||
h.contentEncoding = append(h.contentEncoding[:0], contentEncoding...)
|
||||
}
|
||||
|
||||
// SetContentEncodingBytes sets Content-Encoding header value.
|
||||
func (h *ResponseHeader) SetContentEncodingBytes(contentEncoding []byte) {
|
||||
h.contentEncoding = append(h.contentEncoding[:0], contentEncoding...)
|
||||
}
|
||||
|
||||
// Server returns Server header value.
|
||||
func (h *ResponseHeader) Server() []byte {
|
||||
return h.server
|
||||
|
@ -355,6 +371,21 @@ func (h *RequestHeader) SetContentTypeBytes(contentType []byte) {
|
|||
h.contentType = append(h.contentType[:0], contentType...)
|
||||
}
|
||||
|
||||
// ContentEncoding returns Content-Encoding header value.
|
||||
func (h *RequestHeader) ContentEncoding() []byte {
|
||||
return peekArgBytes(h.h, strContentEncoding)
|
||||
}
|
||||
|
||||
// SetContentEncoding sets Content-Encoding header value.
|
||||
func (h *RequestHeader) SetContentEncoding(contentEncoding string) {
|
||||
h.SetBytesK(strContentEncoding, contentEncoding)
|
||||
}
|
||||
|
||||
// SetContentEncodingBytes sets Content-Encoding header value.
|
||||
func (h *RequestHeader) SetContentEncodingBytes(contentEncoding []byte) {
|
||||
h.setNonSpecial(strContentEncoding, contentEncoding)
|
||||
}
|
||||
|
||||
// SetMultipartFormBoundary sets the following Content-Type:
|
||||
// 'multipart/form-data; boundary=...'
|
||||
// where ... is substituted by the given boundary.
|
||||
|
@ -570,7 +601,7 @@ func (h *RequestHeader) SetUserAgentBytes(userAgent []byte) {
|
|||
|
||||
// Referer returns Referer header value.
|
||||
func (h *RequestHeader) Referer() []byte {
|
||||
return h.PeekBytes(strReferer)
|
||||
return peekArgBytes(h.h, strReferer)
|
||||
}
|
||||
|
||||
// SetReferer sets Referer header value.
|
||||
|
@ -580,7 +611,7 @@ func (h *RequestHeader) SetReferer(referer string) {
|
|||
|
||||
// SetRefererBytes sets Referer header value.
|
||||
func (h *RequestHeader) SetRefererBytes(referer []byte) {
|
||||
h.SetCanonical(strReferer, referer)
|
||||
h.setNonSpecial(strReferer, referer)
|
||||
}
|
||||
|
||||
// Method returns HTTP request method.
|
||||
|
@ -937,6 +968,7 @@ func (h *ResponseHeader) resetSkipNormalize() {
|
|||
h.contentLengthBytes = h.contentLengthBytes[:0]
|
||||
|
||||
h.contentType = h.contentType[:0]
|
||||
h.contentEncoding = h.contentEncoding[:0]
|
||||
h.server = h.server[:0]
|
||||
|
||||
h.h = h.h[:0]
|
||||
|
@ -994,6 +1026,7 @@ func (h *ResponseHeader) CopyTo(dst *ResponseHeader) {
|
|||
dst.contentLength = h.contentLength
|
||||
dst.contentLengthBytes = append(dst.contentLengthBytes, h.contentLengthBytes...)
|
||||
dst.contentType = append(dst.contentType, h.contentType...)
|
||||
dst.contentEncoding = append(dst.contentEncoding, h.contentEncoding...)
|
||||
dst.server = append(dst.server, h.server...)
|
||||
dst.h = copyArgs(dst.h, h.h)
|
||||
dst.cookies = copyArgs(dst.cookies, h.cookies)
|
||||
|
@ -1035,6 +1068,10 @@ func (h *ResponseHeader) VisitAll(f func(key, value []byte)) {
|
|||
if len(contentType) > 0 {
|
||||
f(strContentType, contentType)
|
||||
}
|
||||
contentEncoding := h.ContentEncoding()
|
||||
if len(contentEncoding) > 0 {
|
||||
f(strContentEncoding, contentEncoding)
|
||||
}
|
||||
server := h.Server()
|
||||
if len(server) > 0 {
|
||||
f(strServer, server)
|
||||
|
@ -1158,6 +1195,8 @@ func (h *ResponseHeader) del(key []byte) {
|
|||
switch string(key) {
|
||||
case HeaderContentType:
|
||||
h.contentType = h.contentType[:0]
|
||||
case HeaderContentEncoding:
|
||||
h.contentEncoding = h.contentEncoding[:0]
|
||||
case HeaderServer:
|
||||
h.server = h.server[:0]
|
||||
case HeaderSetCookie:
|
||||
|
@ -1224,12 +1263,15 @@ func (h *ResponseHeader) setSpecialHeader(key, value []byte) bool {
|
|||
h.contentLengthBytes = append(h.contentLengthBytes[:0], value...)
|
||||
}
|
||||
return true
|
||||
} else if caseInsensitiveCompare(strContentEncoding, key) {
|
||||
h.SetContentEncodingBytes(value)
|
||||
return true
|
||||
} else if caseInsensitiveCompare(strConnection, key) {
|
||||
if bytes.Equal(strClose, value) {
|
||||
h.SetConnectionClose()
|
||||
} else {
|
||||
h.ResetConnectionClose()
|
||||
h.h = setArgBytes(h.h, key, value, argsHasValue)
|
||||
h.setNonSpecial(key, value)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -1262,6 +1304,11 @@ func (h *ResponseHeader) setSpecialHeader(key, value []byte) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// setNonSpecial directly put into map i.e. not a basic header
|
||||
func (h *ResponseHeader) setNonSpecial(key []byte, value []byte) {
|
||||
h.h = setArgBytes(h.h, key, value, argsHasValue)
|
||||
}
|
||||
|
||||
// setSpecialHeader handles special headers and return true when a header is processed.
|
||||
func (h *RequestHeader) setSpecialHeader(key, value []byte) bool {
|
||||
if len(key) == 0 {
|
||||
|
@ -1284,7 +1331,7 @@ func (h *RequestHeader) setSpecialHeader(key, value []byte) bool {
|
|||
h.SetConnectionClose()
|
||||
} else {
|
||||
h.ResetConnectionClose()
|
||||
h.h = setArgBytes(h.h, key, value, argsHasValue)
|
||||
h.setNonSpecial(key, value)
|
||||
}
|
||||
return true
|
||||
} else if caseInsensitiveCompare(strCookie, key) {
|
||||
|
@ -1315,6 +1362,11 @@ func (h *RequestHeader) setSpecialHeader(key, value []byte) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// setNonSpecial directly put into map i.e. not a basic header
|
||||
func (h *RequestHeader) setNonSpecial(key []byte, value []byte) {
|
||||
h.h = setArgBytes(h.h, key, value, argsHasValue)
|
||||
}
|
||||
|
||||
// Add adds the given 'key: value' header.
|
||||
//
|
||||
// Multiple headers with the same key may be added with this function.
|
||||
|
@ -1434,8 +1486,7 @@ func (h *ResponseHeader) SetCanonical(key, value []byte) {
|
|||
if h.setSpecialHeader(key, value) {
|
||||
return
|
||||
}
|
||||
|
||||
h.h = setArgBytes(h.h, key, value, argsHasValue)
|
||||
h.setNonSpecial(key, value)
|
||||
}
|
||||
|
||||
// SetCookie sets the given response cookie.
|
||||
|
@ -1646,8 +1697,7 @@ func (h *RequestHeader) SetCanonical(key, value []byte) {
|
|||
if h.setSpecialHeader(key, value) {
|
||||
return
|
||||
}
|
||||
|
||||
h.h = setArgBytes(h.h, key, value, argsHasValue)
|
||||
h.setNonSpecial(key, value)
|
||||
}
|
||||
|
||||
// Peek returns header value for the given key.
|
||||
|
@ -1696,6 +1746,8 @@ func (h *ResponseHeader) peek(key []byte) []byte {
|
|||
switch string(key) {
|
||||
case HeaderContentType:
|
||||
return h.ContentType()
|
||||
case HeaderContentEncoding:
|
||||
return h.ContentEncoding()
|
||||
case HeaderServer:
|
||||
return h.Server()
|
||||
case HeaderConnection:
|
||||
|
@ -2151,6 +2203,10 @@ func (h *ResponseHeader) AppendBytes(dst []byte) []byte {
|
|||
dst = appendHeaderLine(dst, strContentType, contentType)
|
||||
}
|
||||
}
|
||||
contentEncoding := h.ContentEncoding()
|
||||
if len(contentEncoding) > 0 {
|
||||
dst = appendHeaderLine(dst, strContentEncoding, contentEncoding)
|
||||
}
|
||||
|
||||
if len(h.contentLengthBytes) > 0 {
|
||||
dst = appendHeaderLine(dst, strContentLength, h.contentLengthBytes)
|
||||
|
@ -2616,6 +2672,10 @@ func (h *ResponseHeader) parseHeaders(buf []byte) (int, error) {
|
|||
h.contentType = append(h.contentType[:0], s.value...)
|
||||
continue
|
||||
}
|
||||
if caseInsensitiveCompare(s.key, strContentEncoding) {
|
||||
h.contentEncoding = append(h.contentEncoding[:0], s.value...)
|
||||
continue
|
||||
}
|
||||
if caseInsensitiveCompare(s.key, strContentLength) {
|
||||
if h.contentLength != -1 {
|
||||
if h.contentLength, err = parseContentLength(s.value); err != nil {
|
||||
|
|
54
vendor/github.com/valyala/fasthttp/http.go
generated
vendored
54
vendor/github.com/valyala/fasthttp/http.go
generated
vendored
|
@ -486,6 +486,48 @@ func inflateData(p []byte) ([]byte, error) {
|
|||
return bb.B, nil
|
||||
}
|
||||
|
||||
var ErrContentEncodingUnsupported = errors.New("unsupported Content-Encoding")
|
||||
|
||||
// BodyUncompressed returns body data and if needed decompress it from gzip, deflate or Brotli.
|
||||
//
|
||||
// This method may be used if the response header contains
|
||||
// 'Content-Encoding' for reading uncompressed request body.
|
||||
// Use Body for reading the raw request body.
|
||||
func (req *Request) BodyUncompressed() ([]byte, error) {
|
||||
switch string(req.Header.ContentEncoding()) {
|
||||
case "":
|
||||
return req.Body(), nil
|
||||
case "deflate":
|
||||
return req.BodyInflate()
|
||||
case "gzip":
|
||||
return req.BodyGunzip()
|
||||
case "br":
|
||||
return req.BodyUnbrotli()
|
||||
default:
|
||||
return nil, ErrContentEncodingUnsupported
|
||||
}
|
||||
}
|
||||
|
||||
// BodyUncompressed returns body data and if needed decompress it from gzip, deflate or Brotli.
|
||||
//
|
||||
// This method may be used if the response header contains
|
||||
// 'Content-Encoding' for reading uncompressed response body.
|
||||
// Use Body for reading the raw response body.
|
||||
func (resp *Response) BodyUncompressed() ([]byte, error) {
|
||||
switch string(resp.Header.ContentEncoding()) {
|
||||
case "":
|
||||
return resp.Body(), nil
|
||||
case "deflate":
|
||||
return resp.BodyInflate()
|
||||
case "gzip":
|
||||
return resp.BodyGunzip()
|
||||
case "br":
|
||||
return resp.BodyUnbrotli()
|
||||
default:
|
||||
return nil, ErrContentEncodingUnsupported
|
||||
}
|
||||
}
|
||||
|
||||
// BodyWriteTo writes request body to w.
|
||||
func (req *Request) BodyWriteTo(w io.Writer) error {
|
||||
if req.bodyStream != nil {
|
||||
|
@ -1568,7 +1610,7 @@ func (resp *Response) WriteDeflateLevel(w *bufio.Writer, level int) error {
|
|||
}
|
||||
|
||||
func (resp *Response) brotliBody(level int) error {
|
||||
if len(resp.Header.peek(strContentEncoding)) > 0 {
|
||||
if len(resp.Header.ContentEncoding()) > 0 {
|
||||
// It looks like the body is already compressed.
|
||||
// Do not compress it again.
|
||||
return nil
|
||||
|
@ -1618,12 +1660,12 @@ func (resp *Response) brotliBody(level int) error {
|
|||
resp.body = w
|
||||
resp.bodyRaw = nil
|
||||
}
|
||||
resp.Header.SetCanonical(strContentEncoding, strBr)
|
||||
resp.Header.SetContentEncodingBytes(strBr)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (resp *Response) gzipBody(level int) error {
|
||||
if len(resp.Header.peek(strContentEncoding)) > 0 {
|
||||
if len(resp.Header.ContentEncoding()) > 0 {
|
||||
// It looks like the body is already compressed.
|
||||
// Do not compress it again.
|
||||
return nil
|
||||
|
@ -1673,12 +1715,12 @@ func (resp *Response) gzipBody(level int) error {
|
|||
resp.body = w
|
||||
resp.bodyRaw = nil
|
||||
}
|
||||
resp.Header.SetCanonical(strContentEncoding, strGzip)
|
||||
resp.Header.SetContentEncodingBytes(strGzip)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (resp *Response) deflateBody(level int) error {
|
||||
if len(resp.Header.peek(strContentEncoding)) > 0 {
|
||||
if len(resp.Header.ContentEncoding()) > 0 {
|
||||
// It looks like the body is already compressed.
|
||||
// Do not compress it again.
|
||||
return nil
|
||||
|
@ -1728,7 +1770,7 @@ func (resp *Response) deflateBody(level int) error {
|
|||
resp.body = w
|
||||
resp.bodyRaw = nil
|
||||
}
|
||||
resp.Header.SetCanonical(strContentEncoding, strDeflate)
|
||||
resp.Header.SetContentEncodingBytes(strDeflate)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
93
vendor/github.com/valyala/fasthttp/server.go
generated
vendored
93
vendor/github.com/valyala/fasthttp/server.go
generated
vendored
|
@ -1305,7 +1305,7 @@ func (ctx *RequestCtx) RedirectBytes(uri []byte, statusCode int) {
|
|||
}
|
||||
|
||||
func (ctx *RequestCtx) redirect(uri []byte, statusCode int) {
|
||||
ctx.Response.Header.SetCanonical(strLocation, uri)
|
||||
ctx.Response.Header.setNonSpecial(strLocation, uri)
|
||||
statusCode = getRedirectStatusCode(statusCode)
|
||||
ctx.Response.SetStatusCode(statusCode)
|
||||
}
|
||||
|
@ -1554,34 +1554,6 @@ func (s *Server) getNextProto(c net.Conn) (proto string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
|
||||
// connections. It's used by ListenAndServe, ListenAndServeTLS and
|
||||
// ListenAndServeTLSEmbed so dead TCP connections (e.g. closing laptop mid-download)
|
||||
// eventually go away.
|
||||
type tcpKeepaliveListener struct {
|
||||
*net.TCPListener
|
||||
keepalive bool
|
||||
keepalivePeriod time.Duration
|
||||
}
|
||||
|
||||
func (ln tcpKeepaliveListener) Accept() (net.Conn, error) {
|
||||
tc, err := ln.AcceptTCP()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := tc.SetKeepAlive(ln.keepalive); err != nil {
|
||||
tc.Close() //nolint:errcheck
|
||||
return nil, err
|
||||
}
|
||||
if ln.keepalivePeriod > 0 {
|
||||
if err := tc.SetKeepAlivePeriod(ln.keepalivePeriod); err != nil {
|
||||
tc.Close() //nolint:errcheck
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return tc, nil
|
||||
}
|
||||
|
||||
// ListenAndServe serves HTTP requests from the given TCP4 addr.
|
||||
//
|
||||
// Pass custom listener to Serve if you need listening on non-TCP4 media
|
||||
|
@ -1593,13 +1565,6 @@ func (s *Server) ListenAndServe(addr string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if tcpln, ok := ln.(*net.TCPListener); ok {
|
||||
return s.Serve(tcpKeepaliveListener{
|
||||
TCPListener: tcpln,
|
||||
keepalive: s.TCPKeepalive,
|
||||
keepalivePeriod: s.TCPKeepalivePeriod,
|
||||
})
|
||||
}
|
||||
return s.Serve(ln)
|
||||
}
|
||||
|
||||
|
@ -1638,13 +1603,6 @@ func (s *Server) ListenAndServeTLS(addr, certFile, keyFile string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if tcpln, ok := ln.(*net.TCPListener); ok {
|
||||
return s.ServeTLS(tcpKeepaliveListener{
|
||||
TCPListener: tcpln,
|
||||
keepalive: s.TCPKeepalive,
|
||||
keepalivePeriod: s.TCPKeepalivePeriod,
|
||||
}, certFile, keyFile)
|
||||
}
|
||||
return s.ServeTLS(ln, certFile, keyFile)
|
||||
}
|
||||
|
||||
|
@ -1664,13 +1622,6 @@ func (s *Server) ListenAndServeTLSEmbed(addr string, certData, keyData []byte) e
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if tcpln, ok := ln.(*net.TCPListener); ok {
|
||||
return s.ServeTLSEmbed(tcpKeepaliveListener{
|
||||
TCPListener: tcpln,
|
||||
keepalive: s.TCPKeepalive,
|
||||
keepalivePeriod: s.TCPKeepalivePeriod,
|
||||
}, certData, keyData)
|
||||
}
|
||||
return s.ServeTLSEmbed(ln, certData, keyData)
|
||||
}
|
||||
|
||||
|
@ -1910,7 +1861,27 @@ func (s *Server) Shutdown() error {
|
|||
|
||||
func acceptConn(s *Server, ln net.Listener, lastPerIPErrorTime *time.Time) (net.Conn, error) {
|
||||
for {
|
||||
c, err := ln.Accept()
|
||||
var c net.Conn
|
||||
var err error
|
||||
if tl, ok := ln.(*net.TCPListener); ok && s.TCPKeepalive {
|
||||
tc, err := tl.AcceptTCP()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := tc.SetKeepAlive(s.TCPKeepalive); err != nil {
|
||||
tc.Close() //nolint:errcheck
|
||||
return nil, err
|
||||
}
|
||||
if s.TCPKeepalivePeriod > 0 {
|
||||
if err := tc.SetKeepAlivePeriod(s.TCPKeepalivePeriod); err != nil {
|
||||
tc.Close() //nolint:errcheck
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
c = tc
|
||||
} else {
|
||||
c, err = ln.Accept()
|
||||
}
|
||||
if err != nil {
|
||||
if c != nil {
|
||||
panic("BUG: net.Listener returned non-nil conn and non-nil error")
|
||||
|
@ -2127,7 +2098,6 @@ func (s *Server) serveConn(c net.Conn) (err error) {
|
|||
hijackNoResponse bool
|
||||
|
||||
connectionClose bool
|
||||
isHTTP11 bool
|
||||
|
||||
continueReadingRequest bool = true
|
||||
)
|
||||
|
@ -2323,8 +2293,8 @@ func (s *Server) serveConn(c net.Conn) (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
// store req.ConnectionClose so even if it was changed inside of handler
|
||||
connectionClose = s.DisableKeepalive || ctx.Request.Header.ConnectionClose()
|
||||
isHTTP11 = ctx.Request.Header.IsHTTP11()
|
||||
|
||||
if serverName != nil {
|
||||
ctx.Response.Header.SetServerBytes(serverName)
|
||||
|
@ -2354,10 +2324,6 @@ func (s *Server) serveConn(c net.Conn) (err error) {
|
|||
hijackNoResponse = ctx.hijackNoResponse && hijackHandler != nil
|
||||
ctx.hijackNoResponse = false
|
||||
|
||||
if s.MaxRequestsPerConn > 0 && connRequestNum >= uint64(s.MaxRequestsPerConn) {
|
||||
ctx.SetConnectionClose()
|
||||
}
|
||||
|
||||
if writeTimeout > 0 {
|
||||
if err := c.SetWriteDeadline(time.Now().Add(writeTimeout)); err != nil {
|
||||
panic(fmt.Sprintf("BUG: error in SetWriteDeadline(%v): %v", writeTimeout, err))
|
||||
|
@ -2371,14 +2337,17 @@ func (s *Server) serveConn(c net.Conn) (err error) {
|
|||
previousWriteTimeout = 0
|
||||
}
|
||||
|
||||
connectionClose = connectionClose || ctx.Response.ConnectionClose() || (s.CloseOnShutdown && atomic.LoadInt32(&s.stop) == 1)
|
||||
connectionClose = connectionClose ||
|
||||
(s.MaxRequestsPerConn > 0 && connRequestNum >= uint64(s.MaxRequestsPerConn)) ||
|
||||
ctx.Response.Header.ConnectionClose() ||
|
||||
(s.CloseOnShutdown && atomic.LoadInt32(&s.stop) == 1)
|
||||
if connectionClose {
|
||||
ctx.Response.Header.SetCanonical(strConnection, strClose)
|
||||
} else if !isHTTP11 {
|
||||
// Set 'Connection: keep-alive' response header for non-HTTP/1.1 request.
|
||||
ctx.Response.Header.SetConnectionClose()
|
||||
} else if !ctx.Request.Header.IsHTTP11() {
|
||||
// Set 'Connection: keep-alive' response header for HTTP/1.0 request.
|
||||
// There is no need in setting this header for http/1.1, since in http/1.1
|
||||
// connections are keep-alive by default.
|
||||
ctx.Response.Header.SetCanonical(strConnection, strKeepAlive)
|
||||
ctx.Response.Header.setNonSpecial(strConnection, strKeepAlive)
|
||||
}
|
||||
|
||||
if serverName != nil && len(ctx.Response.Header.Server()) == 0 {
|
||||
|
|
3
vendor/golang.org/x/crypto/AUTHORS
generated
vendored
3
vendor/golang.org/x/crypto/AUTHORS
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at https://tip.golang.org/AUTHORS.
|
3
vendor/golang.org/x/crypto/CONTRIBUTORS
generated
vendored
3
vendor/golang.org/x/crypto/CONTRIBUTORS
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at https://tip.golang.org/CONTRIBUTORS.
|
9
vendor/golang.org/x/crypto/curve25519/curve25519.go
generated
vendored
9
vendor/golang.org/x/crypto/curve25519/curve25519.go
generated
vendored
|
@ -9,7 +9,8 @@ package curve25519 // import "golang.org/x/crypto/curve25519"
|
|||
|
||||
import (
|
||||
"crypto/subtle"
|
||||
"fmt"
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
"golang.org/x/crypto/curve25519/internal/field"
|
||||
)
|
||||
|
@ -124,10 +125,10 @@ func X25519(scalar, point []byte) ([]byte, error) {
|
|||
func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
|
||||
var in [32]byte
|
||||
if l := len(scalar); l != 32 {
|
||||
return nil, fmt.Errorf("bad scalar length: %d, expected %d", l, 32)
|
||||
return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32")
|
||||
}
|
||||
if l := len(point); l != 32 {
|
||||
return nil, fmt.Errorf("bad point length: %d, expected %d", l, 32)
|
||||
return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32")
|
||||
}
|
||||
copy(in[:], scalar)
|
||||
if &point[0] == &Basepoint[0] {
|
||||
|
@ -138,7 +139,7 @@ func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
|
|||
copy(base[:], point)
|
||||
ScalarMult(dst, &in, &base)
|
||||
if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 {
|
||||
return nil, fmt.Errorf("bad input point: low order point")
|
||||
return nil, errors.New("bad input point: low order point")
|
||||
}
|
||||
}
|
||||
return dst[:], nil
|
||||
|
|
3
vendor/golang.org/x/net/AUTHORS
generated
vendored
3
vendor/golang.org/x/net/AUTHORS
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/AUTHORS.
|
3
vendor/golang.org/x/net/CONTRIBUTORS
generated
vendored
3
vendor/golang.org/x/net/CONTRIBUTORS
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
4
vendor/golang.org/x/net/html/render.go
generated
vendored
4
vendor/golang.org/x/net/html/render.go
generated
vendored
|
@ -85,7 +85,7 @@ func render1(w writer, n *Node) error {
|
|||
if _, err := w.WriteString("<!--"); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := w.WriteString(n.Data); err != nil {
|
||||
if err := escape(w, n.Data); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := w.WriteString("-->"); err != nil {
|
||||
|
@ -96,7 +96,7 @@ func render1(w writer, n *Node) error {
|
|||
if _, err := w.WriteString("<!DOCTYPE "); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := w.WriteString(n.Data); err != nil {
|
||||
if err := escape(w, n.Data); err != nil {
|
||||
return err
|
||||
}
|
||||
if n.Attr != nil {
|
||||
|
|
4
vendor/golang.org/x/net/html/token.go
generated
vendored
4
vendor/golang.org/x/net/html/token.go
generated
vendored
|
@ -110,9 +110,9 @@ func (t Token) String() string {
|
|||
case SelfClosingTagToken:
|
||||
return "<" + t.tagString() + "/>"
|
||||
case CommentToken:
|
||||
return "<!--" + t.Data + "-->"
|
||||
return "<!--" + EscapeString(t.Data) + "-->"
|
||||
case DoctypeToken:
|
||||
return "<!DOCTYPE " + t.Data + ">"
|
||||
return "<!DOCTYPE " + EscapeString(t.Data) + ">"
|
||||
}
|
||||
return "Invalid(" + strconv.Itoa(int(t.Type)) + ")"
|
||||
}
|
||||
|
|
3
vendor/golang.org/x/sys/AUTHORS
generated
vendored
3
vendor/golang.org/x/sys/AUTHORS
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/AUTHORS.
|
3
vendor/golang.org/x/sys/CONTRIBUTORS
generated
vendored
3
vendor/golang.org/x/sys/CONTRIBUTORS
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
29
vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
generated
vendored
Normal file
29
vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// 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 || freebsd || netbsd || openbsd) && gc
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
// +build gc
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// System call support for RISCV64 BSD
|
||||
|
||||
// Just jump to package syscall's implementation for all these functions.
|
||||
// The runtime may know about them.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||
JMP syscall·Syscall9(SB)
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
233
vendor/golang.org/x/sys/unix/errors_freebsd_386.go
generated
vendored
233
vendor/golang.org/x/sys/unix/errors_freebsd_386.go
generated
vendored
|
@ -1,233 +0,0 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IFF_SMART = 0x20
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_IPXIP = 0xf9
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_FAITH = 0x16
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
SIOCADDRT = 0x8030720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8030720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
233
vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
generated
vendored
233
vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
generated
vendored
|
@ -1,233 +0,0 @@
|
|||
// Copyright 2017 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IFF_SMART = 0x20
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_IPXIP = 0xf9
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_FAITH = 0x16
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
SIOCADDRT = 0x8040720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8040720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
226
vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
generated
vendored
226
vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
generated
vendored
|
@ -1,226 +0,0 @@
|
|||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
|
||||
// missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
|
||||
IFF_SMART = 0x20
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_IPXIP = 0xf9
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IP_FAITH = 0x16
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
SIOCADDRT = 0x8030720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8030720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
17
vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
generated
vendored
17
vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
generated
vendored
|
@ -1,17 +0,0 @@
|
|||
// Copyright 2020 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
)
|
13
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
13
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
|
@ -89,25 +89,30 @@ dragonfly_amd64)
|
|||
freebsd_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="go run mksyscall.go -l32"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
freebsd_amd64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
freebsd_arm)
|
||||
mkerrors="$mkerrors"
|
||||
mksyscall="go run mksyscall.go -l32 -arm"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
freebsd_arm64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
freebsd_riscv64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
netbsd_386)
|
||||
|
|
10
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
10
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
|
@ -128,6 +128,7 @@ includes_FreeBSD='
|
|||
#include <sys/mount.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_types.h>
|
||||
|
@ -202,6 +203,7 @@ struct ltchars {
|
|||
#include <sys/timerfd.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <linux/audit.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/can.h>
|
||||
#include <linux/can/error.h>
|
||||
|
@ -295,6 +297,10 @@ struct ltchars {
|
|||
#define SOL_NETLINK 270
|
||||
#endif
|
||||
|
||||
#ifndef SOL_SMC
|
||||
#define SOL_SMC 286
|
||||
#endif
|
||||
|
||||
#ifdef SOL_BLUETOOTH
|
||||
// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
|
||||
// but it is already in bluetooth_linux.go
|
||||
|
@ -529,7 +535,7 @@ ccflags="$@"
|
|||
$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
|
||||
$2 ~ /^NS_GET_/ ||
|
||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
|
||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ ||
|
||||
$2 ~ /^KEXEC_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
|
||||
|
@ -553,6 +559,7 @@ ccflags="$@"
|
|||
$2 ~ /^CLONE_[A-Z_]+/ ||
|
||||
$2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
|
||||
$2 ~ /^(BPF|DLT)_/ ||
|
||||
$2 ~ /^AUDIT_/ ||
|
||||
$2 ~ /^(CLOCK|TIMER)_/ ||
|
||||
$2 ~ /^CAN_/ ||
|
||||
$2 ~ /^CAP_/ ||
|
||||
|
@ -575,7 +582,6 @@ ccflags="$@"
|
|||
$2 ~ /^SEEK_/ ||
|
||||
$2 ~ /^SPLICE_/ ||
|
||||
$2 ~ /^SYNC_FILE_RANGE_/ ||
|
||||
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
|
||||
$2 !~ /IOC_MAGIC/ &&
|
||||
$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
|
||||
$2 ~ /^(VM|VMADDR)_/ ||
|
||||
|
|
61
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
61
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
|
@ -217,14 +217,63 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
// Recvmsg not implemented on AIX
|
||||
return -1, -1, -1, ENOSYS
|
||||
func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
// receive at least one normal byte
|
||||
if emptyIovecs(iov) {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = recvmsg(fd, &msg, flags); n == -1 {
|
||||
return
|
||||
}
|
||||
oobn = int(msg.Controllen)
|
||||
recvflags = int(msg.Flags)
|
||||
return
|
||||
}
|
||||
|
||||
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
// SendmsgN not implemented on AIX
|
||||
return -1, ENOSYS
|
||||
func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||
msg.Namelen = uint32(salen)
|
||||
var dummy byte
|
||||
var empty bool
|
||||
if len(oob) > 0 {
|
||||
// send at least one normal byte
|
||||
empty := emptyIovecs(iov)
|
||||
if empty {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = sendmsg(fd, &msg, flags); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if len(oob) > 0 && empty {
|
||||
n = 0
|
||||
}
|
||||
return n, nil
|
||||
}
|
||||
|
||||
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
|
|
46
vendor/golang.org/x/sys/unix/syscall_bsd.go
generated
vendored
46
vendor/golang.org/x/sys/unix/syscall_bsd.go
generated
vendored
|
@ -325,27 +325,26 @@ func GetsockoptString(fd, level, opt int) (string, error) {
|
|||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
|
||||
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*byte)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
// receive at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
if emptyIovecs(iov) {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = recvmsg(fd, &msg, flags); err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -356,31 +355,32 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
|||
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
|
||||
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*byte)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
var empty bool
|
||||
if len(oob) > 0 {
|
||||
// send at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
empty := emptyIovecs(iov)
|
||||
if empty {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = sendmsg(fd, &msg, flags); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if len(oob) > 0 && len(p) == 0 {
|
||||
if len(oob) > 0 && empty {
|
||||
n = 0
|
||||
}
|
||||
return n, nil
|
||||
|
|
325
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
325
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
|
@ -17,25 +17,12 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
SYS_FSTAT_FREEBSD12 = 551 // { int fstat(int fd, _Out_ struct stat *sb); }
|
||||
SYS_FSTATAT_FREEBSD12 = 552 // { int fstatat(int fd, _In_z_ char *path, \
|
||||
SYS_GETDIRENTRIES_FREEBSD12 = 554 // { ssize_t getdirentries(int fd, \
|
||||
SYS_STATFS_FREEBSD12 = 555 // { int statfs(_In_z_ char *path, \
|
||||
SYS_FSTATFS_FREEBSD12 = 556 // { int fstatfs(int fd, \
|
||||
SYS_GETFSSTAT_FREEBSD12 = 557 // { int getfsstat( \
|
||||
SYS_MKNODAT_FREEBSD12 = 559 // { int mknodat(int fd, _In_z_ char *path, \
|
||||
)
|
||||
|
||||
// See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html.
|
||||
var (
|
||||
osreldateOnce sync.Once
|
||||
osreldate uint32
|
||||
)
|
||||
|
||||
// INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h
|
||||
const _ino64First = 1200031
|
||||
|
||||
func supportsABI(ver uint32) bool {
|
||||
osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
|
||||
return osreldate >= ver
|
||||
|
@ -159,38 +146,18 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
|
|||
|
||||
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
var (
|
||||
_p0 unsafe.Pointer
|
||||
bufsize uintptr
|
||||
oldBuf []statfs_freebsd11_t
|
||||
needsConvert bool
|
||||
_p0 unsafe.Pointer
|
||||
bufsize uintptr
|
||||
)
|
||||
|
||||
if len(buf) > 0 {
|
||||
if supportsABI(_ino64First) {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
} else {
|
||||
n := len(buf)
|
||||
oldBuf = make([]statfs_freebsd11_t, n)
|
||||
_p0 = unsafe.Pointer(&oldBuf[0])
|
||||
bufsize = unsafe.Sizeof(statfs_freebsd11_t{}) * uintptr(n)
|
||||
needsConvert = true
|
||||
}
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
}
|
||||
var sysno uintptr = SYS_GETFSSTAT
|
||||
if supportsABI(_ino64First) {
|
||||
sysno = SYS_GETFSSTAT_FREEBSD12
|
||||
}
|
||||
r0, _, e1 := Syscall(sysno, uintptr(_p0), bufsize, uintptr(flags))
|
||||
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
if e1 == 0 && needsConvert {
|
||||
for i := range oldBuf {
|
||||
buf[i].convertFrom(&oldBuf[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -245,87 +212,11 @@ func Uname(uname *Utsname) error {
|
|||
}
|
||||
|
||||
func Stat(path string, st *Stat_t) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatat_freebsd12(AT_FDCWD, path, st, 0)
|
||||
}
|
||||
err = stat(path, &oldStat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
return Fstatat(AT_FDCWD, path, st, 0)
|
||||
}
|
||||
|
||||
func Lstat(path string, st *Stat_t) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatat_freebsd12(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
err = lstat(path, &oldStat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Fstat(fd int, st *Stat_t) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstat_freebsd12(fd, st)
|
||||
}
|
||||
err = fstat(fd, &oldStat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Fstatat(fd int, path string, st *Stat_t, flags int) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatat_freebsd12(fd, path, st, flags)
|
||||
}
|
||||
err = fstatat(fd, path, &oldStat, flags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Statfs(path string, st *Statfs_t) (err error) {
|
||||
var oldStatfs statfs_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return statfs_freebsd12(path, st)
|
||||
}
|
||||
err = statfs(path, &oldStatfs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStatfs)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Fstatfs(fd int, st *Statfs_t) (err error) {
|
||||
var oldStatfs statfs_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatfs_freebsd12(fd, st)
|
||||
}
|
||||
err = fstatfs(fd, &oldStatfs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStatfs)
|
||||
return nil
|
||||
return Fstatat(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
|
@ -333,162 +224,25 @@ func Getdents(fd int, buf []byte) (n int, err error) {
|
|||
}
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
if supportsABI(_ino64First) {
|
||||
if basep == nil || unsafe.Sizeof(*basep) == 8 {
|
||||
return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep)))
|
||||
}
|
||||
// The freebsd12 syscall needs a 64-bit base. On 32-bit machines
|
||||
// we can't just use the basep passed in. See #32498.
|
||||
var base uint64 = uint64(*basep)
|
||||
n, err = getdirentries_freebsd12(fd, buf, &base)
|
||||
*basep = uintptr(base)
|
||||
if base>>32 != 0 {
|
||||
// We can't stuff the base back into a uintptr, so any
|
||||
// future calls would be suspect. Generate an error.
|
||||
// EIO is allowed by getdirentries.
|
||||
err = EIO
|
||||
}
|
||||
return
|
||||
if basep == nil || unsafe.Sizeof(*basep) == 8 {
|
||||
return getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep)))
|
||||
}
|
||||
|
||||
// The old syscall entries are smaller than the new. Use 1/4 of the original
|
||||
// buffer size rounded up to DIRBLKSIZ (see /usr/src/lib/libc/sys/getdirentries.c).
|
||||
oldBufLen := roundup(len(buf)/4, _dirblksiz)
|
||||
oldBuf := make([]byte, oldBufLen)
|
||||
n, err = getdirentries(fd, oldBuf, basep)
|
||||
if err == nil && n > 0 {
|
||||
n = convertFromDirents11(buf, oldBuf[:n])
|
||||
// The syscall needs a 64-bit base. On 32-bit machines
|
||||
// we can't just use the basep passed in. See #32498.
|
||||
var base uint64 = uint64(*basep)
|
||||
n, err = getdirentries(fd, buf, &base)
|
||||
*basep = uintptr(base)
|
||||
if base>>32 != 0 {
|
||||
// We can't stuff the base back into a uintptr, so any
|
||||
// future calls would be suspect. Generate an error.
|
||||
// EIO is allowed by getdirentries.
|
||||
err = EIO
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Mknod(path string, mode uint32, dev uint64) (err error) {
|
||||
var oldDev int
|
||||
if supportsABI(_ino64First) {
|
||||
return mknodat_freebsd12(AT_FDCWD, path, mode, dev)
|
||||
}
|
||||
oldDev = int(dev)
|
||||
return mknod(path, mode, oldDev)
|
||||
}
|
||||
|
||||
func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var oldDev int
|
||||
if supportsABI(_ino64First) {
|
||||
return mknodat_freebsd12(fd, path, mode, dev)
|
||||
}
|
||||
oldDev = int(dev)
|
||||
return mknodat(fd, path, mode, oldDev)
|
||||
}
|
||||
|
||||
// round x to the nearest multiple of y, larger or equal to x.
|
||||
//
|
||||
// from /usr/include/sys/param.h Macros for counting and rounding.
|
||||
// #define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
|
||||
func roundup(x, y int) int {
|
||||
return ((x + y - 1) / y) * y
|
||||
}
|
||||
|
||||
func (s *Stat_t) convertFrom(old *stat_freebsd11_t) {
|
||||
*s = Stat_t{
|
||||
Dev: uint64(old.Dev),
|
||||
Ino: uint64(old.Ino),
|
||||
Nlink: uint64(old.Nlink),
|
||||
Mode: old.Mode,
|
||||
Uid: old.Uid,
|
||||
Gid: old.Gid,
|
||||
Rdev: uint64(old.Rdev),
|
||||
Atim: old.Atim,
|
||||
Mtim: old.Mtim,
|
||||
Ctim: old.Ctim,
|
||||
Btim: old.Btim,
|
||||
Size: old.Size,
|
||||
Blocks: old.Blocks,
|
||||
Blksize: old.Blksize,
|
||||
Flags: old.Flags,
|
||||
Gen: uint64(old.Gen),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Statfs_t) convertFrom(old *statfs_freebsd11_t) {
|
||||
*s = Statfs_t{
|
||||
Version: _statfsVersion,
|
||||
Type: old.Type,
|
||||
Flags: old.Flags,
|
||||
Bsize: old.Bsize,
|
||||
Iosize: old.Iosize,
|
||||
Blocks: old.Blocks,
|
||||
Bfree: old.Bfree,
|
||||
Bavail: old.Bavail,
|
||||
Files: old.Files,
|
||||
Ffree: old.Ffree,
|
||||
Syncwrites: old.Syncwrites,
|
||||
Asyncwrites: old.Asyncwrites,
|
||||
Syncreads: old.Syncreads,
|
||||
Asyncreads: old.Asyncreads,
|
||||
// Spare
|
||||
Namemax: old.Namemax,
|
||||
Owner: old.Owner,
|
||||
Fsid: old.Fsid,
|
||||
// Charspare
|
||||
// Fstypename
|
||||
// Mntfromname
|
||||
// Mntonname
|
||||
}
|
||||
|
||||
sl := old.Fstypename[:]
|
||||
n := clen(*(*[]byte)(unsafe.Pointer(&sl)))
|
||||
copy(s.Fstypename[:], old.Fstypename[:n])
|
||||
|
||||
sl = old.Mntfromname[:]
|
||||
n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
|
||||
copy(s.Mntfromname[:], old.Mntfromname[:n])
|
||||
|
||||
sl = old.Mntonname[:]
|
||||
n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
|
||||
copy(s.Mntonname[:], old.Mntonname[:n])
|
||||
}
|
||||
|
||||
func convertFromDirents11(buf []byte, old []byte) int {
|
||||
const (
|
||||
fixedSize = int(unsafe.Offsetof(Dirent{}.Name))
|
||||
oldFixedSize = int(unsafe.Offsetof(dirent_freebsd11{}.Name))
|
||||
)
|
||||
|
||||
dstPos := 0
|
||||
srcPos := 0
|
||||
for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
|
||||
var dstDirent Dirent
|
||||
var srcDirent dirent_freebsd11
|
||||
|
||||
// If multiple direntries are written, sometimes when we reach the final one,
|
||||
// we may have cap of old less than size of dirent_freebsd11.
|
||||
copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:])
|
||||
|
||||
reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
|
||||
if dstPos+reclen > len(buf) {
|
||||
break
|
||||
}
|
||||
|
||||
dstDirent.Fileno = uint64(srcDirent.Fileno)
|
||||
dstDirent.Off = 0
|
||||
dstDirent.Reclen = uint16(reclen)
|
||||
dstDirent.Type = srcDirent.Type
|
||||
dstDirent.Pad0 = 0
|
||||
dstDirent.Namlen = uint16(srcDirent.Namlen)
|
||||
dstDirent.Pad1 = 0
|
||||
|
||||
copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
|
||||
copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:])
|
||||
padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
|
||||
for i := range padding {
|
||||
padding[i] = 0
|
||||
}
|
||||
|
||||
dstPos += int(dstDirent.Reclen)
|
||||
srcPos += int(srcDirent.Reclen)
|
||||
}
|
||||
|
||||
return dstPos
|
||||
return Mknodat(AT_FDCWD, path, mode, dev)
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
|
@ -501,31 +255,31 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
//sys ptrace(request int, pid int, addr uintptr, data int) (err error)
|
||||
|
||||
func PtraceAttach(pid int) (err error) {
|
||||
return ptrace(PTRACE_ATTACH, pid, 0, 0)
|
||||
return ptrace(PT_ATTACH, pid, 0, 0)
|
||||
}
|
||||
|
||||
func PtraceCont(pid int, signal int) (err error) {
|
||||
return ptrace(PTRACE_CONT, pid, 1, signal)
|
||||
return ptrace(PT_CONTINUE, pid, 1, signal)
|
||||
}
|
||||
|
||||
func PtraceDetach(pid int) (err error) {
|
||||
return ptrace(PTRACE_DETACH, pid, 1, 0)
|
||||
return ptrace(PT_DETACH, pid, 1, 0)
|
||||
}
|
||||
|
||||
func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
|
||||
return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
|
||||
return ptrace(PT_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
|
||||
}
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *Reg) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
|
||||
return ptrace(PT_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
|
||||
}
|
||||
|
||||
func PtraceLwpEvents(pid int, enable int) (err error) {
|
||||
return ptrace(PTRACE_LWPEVENTS, pid, 0, enable)
|
||||
return ptrace(PT_LWP_EVENTS, pid, 0, enable)
|
||||
}
|
||||
|
||||
func PtraceLwpInfo(pid int, info uintptr) (err error) {
|
||||
return ptrace(PTRACE_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
|
||||
return ptrace(PT_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
|
||||
}
|
||||
|
||||
func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
|
||||
|
@ -545,11 +299,11 @@ func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
|
|||
}
|
||||
|
||||
func PtraceSetRegs(pid int, regs *Reg) (err error) {
|
||||
return ptrace(PTRACE_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
|
||||
return ptrace(PT_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
|
||||
}
|
||||
|
||||
func PtraceSingleStep(pid int) (err error) {
|
||||
return ptrace(PTRACE_SINGLESTEP, pid, 1, 0)
|
||||
return ptrace(PT_STEP, pid, 1, 0)
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -591,16 +345,12 @@ func PtraceSingleStep(pid int) (err error) {
|
|||
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||
//sys Flock(fd int, how int) (err error)
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys fstat(fd int, stat *stat_freebsd11_t) (err error)
|
||||
//sys fstat_freebsd12(fd int, stat *Stat_t) (err error)
|
||||
//sys fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
|
||||
//sys fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
//sys fstatfs(fd int, stat *statfs_freebsd11_t) (err error)
|
||||
//sys fstatfs_freebsd12(fd int, stat *Statfs_t) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sys getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
|
||||
//sys getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error)
|
||||
//sys getdirentries(fd int, buf []byte, basep *uint64) (n int, err error)
|
||||
//sys Getdtablesize() (size int)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (uid int)
|
||||
|
@ -622,13 +372,10 @@ func PtraceSingleStep(pid int) (err error) {
|
|||
//sys Link(path string, link string) (err error)
|
||||
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
|
||||
//sys Listen(s int, backlog int) (err error)
|
||||
//sys lstat(path string, stat *stat_freebsd11_t) (err error)
|
||||
//sys Mkdir(path string, mode uint32) (err error)
|
||||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||
//sys Mkfifo(path string, mode uint32) (err error)
|
||||
//sys mknod(path string, mode uint32, dev int) (err error)
|
||||
//sys mknodat(fd int, path string, mode uint32, dev int) (err error)
|
||||
//sys mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error)
|
||||
//sys Mknodat(fd int, path string, mode uint32, dev uint64) (err error)
|
||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
|
||||
|
@ -658,9 +405,7 @@ func PtraceSingleStep(pid int) (err error) {
|
|||
//sysnb Setsid() (pid int, err error)
|
||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||
//sysnb Setuid(uid int) (err error)
|
||||
//sys stat(path string, stat *stat_freebsd11_t) (err error)
|
||||
//sys statfs(path string, stat *statfs_freebsd11_t) (err error)
|
||||
//sys statfs_freebsd12(path string, stat *Statfs_t) (err error)
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error)
|
||||
//sys Symlink(path string, link string) (err error)
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Sync() (err error)
|
||||
|
|
4
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
generated
vendored
|
@ -57,11 +57,11 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
||||
return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
|
||||
return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
|
||||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
4
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
generated
vendored
|
@ -57,11 +57,11 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
||||
return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
|
||||
return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
|
||||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
generated
vendored
|
@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
|
@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
|||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
|
63
vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
generated
vendored
Normal file
63
vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
// Copyright 2022 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 riscv64 && freebsd
|
||||
// +build riscv64,freebsd
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
||||
func setTimeval(sec, usec int64) Timeval {
|
||||
return Timeval{Sec: sec, Usec: usec}
|
||||
}
|
||||
|
||||
func SetKevent(k *Kevent_t, fd, mode, flags int) {
|
||||
k.Ident = uint64(fd)
|
||||
k.Filter = int16(mode)
|
||||
k.Flags = uint16(flags)
|
||||
}
|
||||
|
||||
func (iov *Iovec) SetLen(length int) {
|
||||
iov.Len = uint64(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetControllen(length int) {
|
||||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||
msghdr.Iovlen = int32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
||||
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
var writtenOut uint64 = 0
|
||||
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
|
||||
|
||||
written = int(writtenOut)
|
||||
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
5
vendor/golang.org/x/sys/unix/syscall_illumos.go
generated
vendored
5
vendor/golang.org/x/sys/unix/syscall_illumos.go
generated
vendored
|
@ -20,10 +20,9 @@ func bytes2iovec(bs [][]byte) []Iovec {
|
|||
for i, b := range bs {
|
||||
iovecs[i].SetLen(len(b))
|
||||
if len(b) > 0 {
|
||||
// somehow Iovec.Base on illumos is (*int8), not (*byte)
|
||||
iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0]))
|
||||
iovecs[i].Base = &b[0]
|
||||
} else {
|
||||
iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero))
|
||||
iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
}
|
||||
return iovecs
|
||||
|
|
45
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
45
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
|
@ -1499,18 +1499,13 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
|
|||
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
|
||||
//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
|
||||
|
||||
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
if len(p) == 0 {
|
||||
if emptyIovecs(iov) {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
|
@ -1518,15 +1513,19 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
|||
}
|
||||
// receive at least one normal byte
|
||||
if sockType != SOCK_DGRAM {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = recvmsg(fd, &msg, flags); err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -1535,18 +1534,15 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
|||
return
|
||||
}
|
||||
|
||||
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(ptr)
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
var empty bool
|
||||
if len(oob) > 0 {
|
||||
if len(p) == 0 {
|
||||
empty := emptyIovecs(iov)
|
||||
if empty {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
|
@ -1554,19 +1550,22 @@ func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags i
|
|||
}
|
||||
// send at least one normal byte
|
||||
if sockType != SOCK_DGRAM {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = sendmsg(fd, &msg, flags); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if len(oob) > 0 && len(p) == 0 {
|
||||
if len(oob) > 0 && empty {
|
||||
n = 0
|
||||
}
|
||||
return n, nil
|
||||
|
|
4
vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
generated
vendored
|
@ -26,6 +26,10 @@ func (msghdr *Msghdr) SetControllen(length int) {
|
|||
msghdr.Controllen = uint32(length)
|
||||
}
|
||||
|
||||
func (msghdr *Msghdr) SetIovlen(length int) {
|
||||
msghdr.Iovlen = uint32(length)
|
||||
}
|
||||
|
||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint32(length)
|
||||
}
|
||||
|
|
50
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
50
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
|
@ -451,26 +451,25 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
|||
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
|
||||
|
||||
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*int8)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy int8
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
// receive at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
if emptyIovecs(iov) {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Accrightslen = int32(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = recvmsg(fd, &msg, flags); n == -1 {
|
||||
return
|
||||
}
|
||||
|
@ -480,30 +479,31 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
|||
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
|
||||
|
||||
func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*int8)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy int8
|
||||
var dummy byte
|
||||
var empty bool
|
||||
if len(oob) > 0 {
|
||||
// send at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
empty = emptyIovecs(iov)
|
||||
if empty {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Accrightslen = int32(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = sendmsg(fd, &msg, flags); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
if len(oob) > 0 && len(p) == 0 {
|
||||
if len(oob) > 0 && empty {
|
||||
n = 0
|
||||
}
|
||||
return n, nil
|
||||
|
|
74
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
74
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
|
@ -338,8 +338,13 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
|
|||
}
|
||||
|
||||
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
||||
var iov [1]Iovec
|
||||
if len(p) > 0 {
|
||||
iov[0].Base = &p[0]
|
||||
iov[0].SetLen(len(p))
|
||||
}
|
||||
var rsa RawSockaddrAny
|
||||
n, oobn, recvflags, err = recvmsgRaw(fd, p, oob, flags, &rsa)
|
||||
n, oobn, recvflags, err = recvmsgRaw(fd, iov[:], oob, flags, &rsa)
|
||||
// source address is only specified if the socket is unconnected
|
||||
if rsa.Addr.Family != AF_UNSPEC {
|
||||
from, err = anyToSockaddr(fd, &rsa)
|
||||
|
@ -347,12 +352,42 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
|||
return
|
||||
}
|
||||
|
||||
// RecvmsgBuffers receives a message from a socket using the recvmsg
|
||||
// system call. The flags are passed to recvmsg. Any non-control data
|
||||
// read is scattered into the buffers slices. The results are:
|
||||
// - n is the number of non-control data read into bufs
|
||||
// - oobn is the number of control data read into oob; this may be interpreted using [ParseSocketControlMessage]
|
||||
// - recvflags is flags returned by recvmsg
|
||||
// - from is the address of the sender
|
||||
func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
||||
iov := make([]Iovec, len(buffers))
|
||||
for i := range buffers {
|
||||
if len(buffers[i]) > 0 {
|
||||
iov[i].Base = &buffers[i][0]
|
||||
iov[i].SetLen(len(buffers[i]))
|
||||
} else {
|
||||
iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
}
|
||||
var rsa RawSockaddrAny
|
||||
n, oobn, recvflags, err = recvmsgRaw(fd, iov, oob, flags, &rsa)
|
||||
if err == nil && rsa.Addr.Family != AF_UNSPEC {
|
||||
from, err = anyToSockaddr(fd, &rsa)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
||||
_, err = SendmsgN(fd, p, oob, to, flags)
|
||||
return
|
||||
}
|
||||
|
||||
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
||||
var iov [1]Iovec
|
||||
if len(p) > 0 {
|
||||
iov[0].Base = &p[0]
|
||||
iov[0].SetLen(len(p))
|
||||
}
|
||||
var ptr unsafe.Pointer
|
||||
var salen _Socklen
|
||||
if to != nil {
|
||||
|
@ -361,7 +396,32 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
|
|||
return 0, err
|
||||
}
|
||||
}
|
||||
return sendmsgN(fd, p, oob, ptr, salen, flags)
|
||||
return sendmsgN(fd, iov[:], oob, ptr, salen, flags)
|
||||
}
|
||||
|
||||
// SendmsgBuffers sends a message on a socket to an address using the sendmsg
|
||||
// system call. The flags are passed to sendmsg. Any non-control data written
|
||||
// is gathered from buffers. The function returns the number of bytes written
|
||||
// to the socket.
|
||||
func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
||||
iov := make([]Iovec, len(buffers))
|
||||
for i := range buffers {
|
||||
if len(buffers[i]) > 0 {
|
||||
iov[i].Base = &buffers[i][0]
|
||||
iov[i].SetLen(len(buffers[i]))
|
||||
} else {
|
||||
iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
}
|
||||
var ptr unsafe.Pointer
|
||||
var salen _Socklen
|
||||
if to != nil {
|
||||
ptr, salen, err = to.sockaddr()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
return sendmsgN(fd, iov, oob, ptr, salen, flags)
|
||||
}
|
||||
|
||||
func Send(s int, buf []byte, flags int) (err error) {
|
||||
|
@ -484,3 +544,13 @@ func Lutimes(path string, tv []Timeval) error {
|
|||
}
|
||||
return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
|
||||
// emptyIovec reports whether there are no bytes in the slice of Iovec.
|
||||
func emptyIovecs(iov []Iovec) bool {
|
||||
for i := range iov {
|
||||
if iov[i].Len > 0 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
109
vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
generated
vendored
109
vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
generated
vendored
|
@ -151,6 +151,7 @@ const (
|
|||
BIOCSETF = 0x80084267
|
||||
BIOCSETFNR = 0x80084282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8008427b
|
||||
BIOCSETZBUF = 0x800c4281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
|
@ -447,7 +448,7 @@ const (
|
|||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
|
@ -487,10 +488,11 @@ const (
|
|||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x113
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
|
@ -734,6 +736,7 @@ const (
|
|||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
|
@ -814,7 +817,6 @@ const (
|
|||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
|
@ -911,6 +913,7 @@ const (
|
|||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
|
@ -989,8 +992,12 @@ const (
|
|||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
|
@ -1000,7 +1007,6 @@ const (
|
|||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
|
@ -1179,6 +1185,8 @@ const (
|
|||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
|
@ -1189,6 +1197,10 @@ const (
|
|||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
|
@ -1196,6 +1208,60 @@ const (
|
|||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETFSBASE = 0x47
|
||||
PT_GETGSBASE = 0x49
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GETXMMREGS = 0x40
|
||||
PT_GETXSTATE = 0x45
|
||||
PT_GETXSTATE_INFO = 0x44
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETFSBASE = 0x48
|
||||
PT_SETGSBASE = 0x4a
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SETXMMREGS = 0x41
|
||||
PT_SETXSTATE = 0x46
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
|
@ -1320,10 +1386,12 @@ const (
|
|||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0086924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
|
@ -1414,6 +1482,7 @@ const (
|
|||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
|
@ -1472,22 +1541,40 @@ const (
|
|||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
|
@ -1496,12 +1583,18 @@ const (
|
|||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
|
@ -1541,6 +1634,7 @@ const (
|
|||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
|
@ -1554,7 +1648,6 @@ const (
|
|||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_SESS_CWV = 0x42a
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
|
@ -1694,12 +1787,13 @@ const (
|
|||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
|
@ -1842,7 +1936,7 @@ var errorList = [...]struct {
|
|||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
|
@ -1904,6 +1998,7 @@ var errorList = [...]struct {
|
|||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
|
107
vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
generated
vendored
107
vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
generated
vendored
|
@ -151,6 +151,7 @@ const (
|
|||
BIOCSETF = 0x80104267
|
||||
BIOCSETFNR = 0x80104282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8010427b
|
||||
BIOCSETZBUF = 0x80184281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
|
@ -447,7 +448,7 @@ const (
|
|||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
|
@ -487,10 +488,11 @@ const (
|
|||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x113
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
|
@ -734,6 +736,7 @@ const (
|
|||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
|
@ -814,7 +817,6 @@ const (
|
|||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
|
@ -911,6 +913,7 @@ const (
|
|||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
|
@ -989,8 +992,12 @@ const (
|
|||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
|
@ -1000,7 +1007,6 @@ const (
|
|||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
|
@ -1180,6 +1186,8 @@ const (
|
|||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
|
@ -1190,6 +1198,10 @@ const (
|
|||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
|
@ -1197,6 +1209,58 @@ const (
|
|||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETFSBASE = 0x47
|
||||
PT_GETGSBASE = 0x49
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GETXSTATE = 0x45
|
||||
PT_GETXSTATE_INFO = 0x44
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETFSBASE = 0x48
|
||||
PT_SETGSBASE = 0x4a
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SETXSTATE = 0x46
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
|
@ -1321,10 +1385,12 @@ const (
|
|||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0106924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
|
@ -1415,6 +1481,7 @@ const (
|
|||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
|
@ -1473,22 +1540,40 @@ const (
|
|||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
|
@ -1497,12 +1582,18 @@ const (
|
|||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
|
@ -1542,6 +1633,7 @@ const (
|
|||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
|
@ -1555,7 +1647,6 @@ const (
|
|||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_SESS_CWV = 0x42a
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
|
@ -1693,12 +1784,13 @@ const (
|
|||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
|
@ -1841,7 +1933,7 @@ var errorList = [...]struct {
|
|||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
|
@ -1903,6 +1995,7 @@ var errorList = [...]struct {
|
|||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
|
220
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
generated
vendored
220
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
generated
vendored
|
@ -151,6 +151,7 @@ const (
|
|||
BIOCSETF = 0x80084267
|
||||
BIOCSETFNR = 0x80084282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8008427b
|
||||
BIOCSETZBUF = 0x800c4281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
|
@ -362,7 +363,7 @@ const (
|
|||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DIOCGATTR = 0xc144648e
|
||||
DIOCGATTR = 0xc148648e
|
||||
DIOCGDELETE = 0x80106488
|
||||
DIOCGFLUSH = 0x20006487
|
||||
DIOCGFRONTSTUFF = 0x40086486
|
||||
|
@ -377,7 +378,7 @@ const (
|
|||
DIOCGSTRIPESIZE = 0x4008648b
|
||||
DIOCSKERNELDUMP = 0x804c6490
|
||||
DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
|
||||
DIOCZONECMD = 0xc06c648f
|
||||
DIOCZONECMD = 0xc078648f
|
||||
DLT_A429 = 0xb8
|
||||
DLT_A653_ICM = 0xb9
|
||||
DLT_AIRONET_HEADER = 0x78
|
||||
|
@ -407,7 +408,9 @@ const (
|
|||
DLT_C_HDLC_WITH_DIR = 0xcd
|
||||
DLT_DBUS = 0xe7
|
||||
DLT_DECT = 0xdd
|
||||
DLT_DISPLAYPORT_AUX = 0x113
|
||||
DLT_DOCSIS = 0x8f
|
||||
DLT_DOCSIS31_XRA31 = 0x111
|
||||
DLT_DVB_CI = 0xeb
|
||||
DLT_ECONET = 0x73
|
||||
DLT_EN10MB = 0x1
|
||||
|
@ -417,6 +420,7 @@ const (
|
|||
DLT_ERF = 0xc5
|
||||
DLT_ERF_ETH = 0xaf
|
||||
DLT_ERF_POS = 0xb0
|
||||
DLT_ETHERNET_MPACKET = 0x112
|
||||
DLT_FC_2 = 0xe0
|
||||
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
|
||||
DLT_FDDI = 0xa
|
||||
|
@ -444,7 +448,7 @@ const (
|
|||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
|
@ -484,9 +488,11 @@ const (
|
|||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x109
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
|
@ -502,7 +508,9 @@ const (
|
|||
DLT_NFC_LLCP = 0xf5
|
||||
DLT_NFLOG = 0xef
|
||||
DLT_NG40 = 0xf4
|
||||
DLT_NORDIC_BLE = 0x110
|
||||
DLT_NULL = 0x0
|
||||
DLT_OPENFLOW = 0x10b
|
||||
DLT_PCI_EXP = 0x7d
|
||||
DLT_PFLOG = 0x75
|
||||
DLT_PFSYNC = 0x79
|
||||
|
@ -526,15 +534,18 @@ const (
|
|||
DLT_RTAC_SERIAL = 0xfa
|
||||
DLT_SCCP = 0x8e
|
||||
DLT_SCTP = 0xf8
|
||||
DLT_SDLC = 0x10c
|
||||
DLT_SITA = 0xc4
|
||||
DLT_SLIP = 0x8
|
||||
DLT_SLIP_BSDOS = 0xd
|
||||
DLT_STANAG_5066_D_PDU = 0xed
|
||||
DLT_SUNATM = 0x7b
|
||||
DLT_SYMANTEC_FIREWALL = 0x63
|
||||
DLT_TI_LLN_SNIFFER = 0x10d
|
||||
DLT_TZSP = 0x80
|
||||
DLT_USB = 0xba
|
||||
DLT_USBPCAP = 0xf9
|
||||
DLT_USB_DARWIN = 0x10a
|
||||
DLT_USB_FREEBSD = 0xba
|
||||
DLT_USB_LINUX = 0xbd
|
||||
DLT_USB_LINUX_MMAPPED = 0xdc
|
||||
|
@ -554,6 +565,7 @@ const (
|
|||
DLT_USER7 = 0x9a
|
||||
DLT_USER8 = 0x9b
|
||||
DLT_USER9 = 0x9c
|
||||
DLT_VSOCK = 0x10f
|
||||
DLT_WATTSTOPPER_DLM = 0x107
|
||||
DLT_WIHART = 0xdf
|
||||
DLT_WIRESHARK_UPPER_PDU = 0xfc
|
||||
|
@ -578,6 +590,7 @@ const (
|
|||
ECHONL = 0x10
|
||||
ECHOPRT = 0x20
|
||||
EVFILT_AIO = -0x3
|
||||
EVFILT_EMPTY = -0xd
|
||||
EVFILT_FS = -0x9
|
||||
EVFILT_LIO = -0xa
|
||||
EVFILT_PROC = -0x5
|
||||
|
@ -585,11 +598,12 @@ const (
|
|||
EVFILT_READ = -0x1
|
||||
EVFILT_SENDFILE = -0xc
|
||||
EVFILT_SIGNAL = -0x6
|
||||
EVFILT_SYSCOUNT = 0xc
|
||||
EVFILT_SYSCOUNT = 0xd
|
||||
EVFILT_TIMER = -0x7
|
||||
EVFILT_USER = -0xb
|
||||
EVFILT_VNODE = -0x4
|
||||
EVFILT_WRITE = -0x2
|
||||
EVNAMEMAP_NAME_SIZE = 0x40
|
||||
EV_ADD = 0x1
|
||||
EV_CLEAR = 0x20
|
||||
EV_DELETE = 0x2
|
||||
|
@ -606,6 +620,7 @@ const (
|
|||
EV_RECEIPT = 0x40
|
||||
EV_SYSFLAGS = 0xf000
|
||||
EXTA = 0x4b00
|
||||
EXTATTR_MAXNAMELEN = 0xff
|
||||
EXTATTR_NAMESPACE_EMPTY = 0x0
|
||||
EXTATTR_NAMESPACE_SYSTEM = 0x2
|
||||
EXTATTR_NAMESPACE_USER = 0x1
|
||||
|
@ -647,6 +662,7 @@ const (
|
|||
IEXTEN = 0x400
|
||||
IFAN_ARRIVAL = 0x0
|
||||
IFAN_DEPARTURE = 0x1
|
||||
IFCAP_WOL_MAGIC = 0x2000
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ALTPHYS = 0x4000
|
||||
IFF_BROADCAST = 0x2
|
||||
|
@ -663,6 +679,7 @@ const (
|
|||
IFF_MONITOR = 0x40000
|
||||
IFF_MULTICAST = 0x8000
|
||||
IFF_NOARP = 0x80
|
||||
IFF_NOGROUP = 0x800000
|
||||
IFF_OACTIVE = 0x400
|
||||
IFF_POINTOPOINT = 0x10
|
||||
IFF_PPROMISC = 0x20000
|
||||
|
@ -719,6 +736,7 @@ const (
|
|||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
|
@ -799,7 +817,6 @@ const (
|
|||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
|
@ -837,6 +854,7 @@ const (
|
|||
IPV6_DSTOPTS = 0x32
|
||||
IPV6_FLOWID = 0x43
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_LEN = 0x14
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOWTYPE = 0x44
|
||||
IPV6_FRAGTTL = 0x78
|
||||
|
@ -857,13 +875,13 @@ const (
|
|||
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_ORIGDSTADDR = 0x48
|
||||
IPV6_PATHMTU = 0x2c
|
||||
IPV6_PKTINFO = 0x2e
|
||||
IPV6_PORTRANGE = 0xe
|
||||
|
@ -875,6 +893,7 @@ const (
|
|||
IPV6_RECVFLOWID = 0x46
|
||||
IPV6_RECVHOPLIMIT = 0x25
|
||||
IPV6_RECVHOPOPTS = 0x27
|
||||
IPV6_RECVORIGDSTADDR = 0x48
|
||||
IPV6_RECVPATHMTU = 0x2b
|
||||
IPV6_RECVPKTINFO = 0x24
|
||||
IPV6_RECVRSSBUCKETID = 0x47
|
||||
|
@ -894,6 +913,7 @@ const (
|
|||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
|
@ -935,10 +955,8 @@ const (
|
|||
IP_MAX_MEMBERSHIPS = 0xfff
|
||||
IP_MAX_SOCK_MUTE_FILTER = 0x80
|
||||
IP_MAX_SOCK_SRC_FILTER = 0x80
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MF = 0x2000
|
||||
IP_MINTTL = 0x42
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_MSFILTER = 0x4a
|
||||
IP_MSS = 0x240
|
||||
IP_MULTICAST_IF = 0x9
|
||||
|
@ -948,6 +966,7 @@ const (
|
|||
IP_OFFMASK = 0x1fff
|
||||
IP_ONESBCAST = 0x17
|
||||
IP_OPTIONS = 0x1
|
||||
IP_ORIGDSTADDR = 0x1b
|
||||
IP_PORTRANGE = 0x13
|
||||
IP_PORTRANGE_DEFAULT = 0x0
|
||||
IP_PORTRANGE_HIGH = 0x1
|
||||
|
@ -956,6 +975,7 @@ const (
|
|||
IP_RECVFLOWID = 0x5d
|
||||
IP_RECVIF = 0x14
|
||||
IP_RECVOPTS = 0x5
|
||||
IP_RECVORIGDSTADDR = 0x1b
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVRSSBUCKETID = 0x5e
|
||||
IP_RECVTOS = 0x44
|
||||
|
@ -972,8 +992,12 @@ const (
|
|||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
|
@ -983,7 +1007,6 @@ const (
|
|||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
|
@ -1071,10 +1094,12 @@ const (
|
|||
MNT_SUSPEND = 0x4
|
||||
MNT_SYNCHRONOUS = 0x2
|
||||
MNT_UNION = 0x20
|
||||
MNT_UNTRUSTED = 0x800000000
|
||||
MNT_UPDATE = 0x10000
|
||||
MNT_UPDATEMASK = 0x2d8d0807e
|
||||
MNT_UPDATEMASK = 0xad8d0807e
|
||||
MNT_USER = 0x8000
|
||||
MNT_VISFLAGMASK = 0x3fef0ffff
|
||||
MNT_VERIFIED = 0x400000000
|
||||
MNT_VISFLAGMASK = 0xffef0ffff
|
||||
MNT_WAIT = 0x1
|
||||
MSG_CMSG_CLOEXEC = 0x40000
|
||||
MSG_COMPAT = 0x8000
|
||||
|
@ -1103,6 +1128,7 @@ const (
|
|||
NFDBITS = 0x20
|
||||
NOFLSH = 0x80000000
|
||||
NOKERNINFO = 0x2000000
|
||||
NOTE_ABSTIME = 0x10
|
||||
NOTE_ATTRIB = 0x8
|
||||
NOTE_CHILD = 0x4
|
||||
NOTE_CLOSE = 0x100
|
||||
|
@ -1159,6 +1185,8 @@ const (
|
|||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
|
@ -1169,6 +1197,10 @@ const (
|
|||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
|
@ -1176,6 +1208,53 @@ const (
|
|||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GETVFPREGS = 0x40
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SETVFPREGS = 0x41
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
|
@ -1257,7 +1336,6 @@ const (
|
|||
RTV_WEIGHT = 0x100
|
||||
RT_ALL_FIBS = -0x1
|
||||
RT_BLACKHOLE = 0x40
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_DEFAULT_FIB = 0x0
|
||||
RT_HAS_GW = 0x80
|
||||
RT_HAS_HEADER = 0x10
|
||||
|
@ -1267,15 +1345,17 @@ const (
|
|||
RT_LLE_CACHE = 0x100
|
||||
RT_MAY_LOOP = 0x8
|
||||
RT_MAY_LOOP_BIT = 0x3
|
||||
RT_NORTREF = 0x2
|
||||
RT_REJECT = 0x20
|
||||
RUSAGE_CHILDREN = -0x1
|
||||
RUSAGE_SELF = 0x0
|
||||
RUSAGE_THREAD = 0x1
|
||||
SCM_BINTIME = 0x4
|
||||
SCM_CREDS = 0x3
|
||||
SCM_MONOTONIC = 0x6
|
||||
SCM_REALTIME = 0x5
|
||||
SCM_RIGHTS = 0x1
|
||||
SCM_TIMESTAMP = 0x2
|
||||
SCM_TIME_INFO = 0x7
|
||||
SEEK_CUR = 0x1
|
||||
SEEK_DATA = 0x3
|
||||
SEEK_END = 0x2
|
||||
|
@ -1299,10 +1379,12 @@ const (
|
|||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0086924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
|
@ -1318,8 +1400,11 @@ const (
|
|||
SIOCGIFPDSTADDR = 0xc0206948
|
||||
SIOCGIFPHYS = 0xc0206935
|
||||
SIOCGIFPSRCADDR = 0xc0206947
|
||||
SIOCGIFRSSHASH = 0xc0186997
|
||||
SIOCGIFRSSKEY = 0xc0946996
|
||||
SIOCGIFSTATUS = 0xc331693b
|
||||
SIOCGIFXMEDIA = 0xc028698b
|
||||
SIOCGLANPCP = 0xc0206998
|
||||
SIOCGLOWAT = 0x40047303
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGPRIVATE_0 = 0xc0206950
|
||||
|
@ -1350,6 +1435,7 @@ const (
|
|||
SIOCSIFPHYS = 0x80206936
|
||||
SIOCSIFRVNET = 0xc020695b
|
||||
SIOCSIFVNET = 0xc020695a
|
||||
SIOCSLANPCP = 0x80206999
|
||||
SIOCSLOWAT = 0x80047302
|
||||
SIOCSPGRP = 0x80047308
|
||||
SIOCSTUNFIB = 0x8020695f
|
||||
|
@ -1369,6 +1455,7 @@ const (
|
|||
SO_BINTIME = 0x2000
|
||||
SO_BROADCAST = 0x20
|
||||
SO_DEBUG = 0x1
|
||||
SO_DOMAIN = 0x1019
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_ERROR = 0x1007
|
||||
SO_KEEPALIVE = 0x8
|
||||
|
@ -1377,6 +1464,7 @@ const (
|
|||
SO_LISTENINCQLEN = 0x1013
|
||||
SO_LISTENQLEN = 0x1012
|
||||
SO_LISTENQLIMIT = 0x1011
|
||||
SO_MAX_PACING_RATE = 0x1018
|
||||
SO_NOSIGPIPE = 0x800
|
||||
SO_NO_DDP = 0x8000
|
||||
SO_NO_OFFLOAD = 0x4000
|
||||
|
@ -1387,13 +1475,22 @@ const (
|
|||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
SO_SETFIB = 0x1014
|
||||
SO_SNDBUF = 0x1001
|
||||
SO_SNDLOWAT = 0x1003
|
||||
SO_SNDTIMEO = 0x1005
|
||||
SO_TIMESTAMP = 0x400
|
||||
SO_TS_BINTIME = 0x1
|
||||
SO_TS_CLOCK = 0x1017
|
||||
SO_TS_CLOCK_MAX = 0x3
|
||||
SO_TS_DEFAULT = 0x0
|
||||
SO_TS_MONOTONIC = 0x3
|
||||
SO_TS_REALTIME = 0x2
|
||||
SO_TS_REALTIME_MICRO = 0x0
|
||||
SO_TYPE = 0x1008
|
||||
SO_USELOOPBACK = 0x40
|
||||
SO_USER_COOKIE = 0x1015
|
||||
|
@ -1437,10 +1534,69 @@ const (
|
|||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
TCP_BBR_RACK_RTT_USE = 0x44a
|
||||
TCP_BBR_RECFORCE = 0x42c
|
||||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
TCP_DATA_AFTER_CLOSE = 0x44c
|
||||
TCP_DELACK = 0x48
|
||||
TCP_FASTOPEN = 0x401
|
||||
TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
|
||||
TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
|
||||
TCP_FASTOPEN_PSK_LEN = 0x10
|
||||
TCP_FUNCTION_BLK = 0x2000
|
||||
TCP_FUNCTION_NAME_LEN_MAX = 0x20
|
||||
TCP_INFO = 0x20
|
||||
|
@ -1448,6 +1604,12 @@ const (
|
|||
TCP_KEEPIDLE = 0x100
|
||||
TCP_KEEPINIT = 0x80
|
||||
TCP_KEEPINTVL = 0x200
|
||||
TCP_LOG = 0x22
|
||||
TCP_LOGBUF = 0x23
|
||||
TCP_LOGDUMP = 0x25
|
||||
TCP_LOGDUMPID = 0x26
|
||||
TCP_LOGID = 0x24
|
||||
TCP_LOG_ID_LEN = 0x40
|
||||
TCP_MAXBURST = 0x4
|
||||
TCP_MAXHLEN = 0x3c
|
||||
TCP_MAXOLEN = 0x28
|
||||
|
@ -1463,8 +1625,30 @@ const (
|
|||
TCP_NOPUSH = 0x4
|
||||
TCP_PCAP_IN = 0x1000
|
||||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
TCP_RACK_MIN_TO = 0x422
|
||||
TCP_RACK_PACE_ALWAYS = 0x41f
|
||||
TCP_RACK_PACE_MAX_SEG = 0x41e
|
||||
TCP_RACK_PACE_REDUCE = 0x41d
|
||||
TCP_RACK_PKT_DELAY = 0x428
|
||||
TCP_RACK_PROP = 0x41b
|
||||
TCP_RACK_PROP_RATE = 0x420
|
||||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
TCP_RACK_TLP_USE = 0x447
|
||||
TCP_VENDOR = 0x80000000
|
||||
TCSAFLUSH = 0x2
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIMER_RELTIME = 0x0
|
||||
TIOCCBRK = 0x2000747a
|
||||
TIOCCDTR = 0x20007478
|
||||
TIOCCONS = 0x80047462
|
||||
|
@ -1528,6 +1712,8 @@ const (
|
|||
TIOCTIMESTAMP = 0x40107459
|
||||
TIOCUCNTL = 0x80047466
|
||||
TOSTOP = 0x400000
|
||||
UTIME_NOW = -0x1
|
||||
UTIME_OMIT = -0x2
|
||||
VDISCARD = 0xf
|
||||
VDSUSP = 0xb
|
||||
VEOF = 0x0
|
||||
|
@ -1592,12 +1778,13 @@ const (
|
|||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
|
@ -1740,7 +1927,7 @@ var errorList = [...]struct {
|
|||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
|
@ -1802,6 +1989,7 @@ var errorList = [...]struct {
|
|||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
|
100
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
generated
vendored
100
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
generated
vendored
|
@ -151,6 +151,7 @@ const (
|
|||
BIOCSETF = 0x80104267
|
||||
BIOCSETFNR = 0x80104282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8010427b
|
||||
BIOCSETZBUF = 0x80184281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
|
@ -447,7 +448,7 @@ const (
|
|||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
|
@ -487,10 +488,11 @@ const (
|
|||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x113
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
|
@ -734,6 +736,7 @@ const (
|
|||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
|
@ -814,7 +817,6 @@ const (
|
|||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
|
@ -911,6 +913,7 @@ const (
|
|||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
|
@ -989,8 +992,12 @@ const (
|
|||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
|
@ -1000,7 +1007,6 @@ const (
|
|||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
|
@ -1180,6 +1186,8 @@ const (
|
|||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
|
@ -1190,6 +1198,10 @@ const (
|
|||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
|
@ -1197,6 +1209,51 @@ const (
|
|||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
|
@ -1321,10 +1378,12 @@ const (
|
|||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0106924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
|
@ -1415,6 +1474,7 @@ const (
|
|||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
|
@ -1473,22 +1533,40 @@ const (
|
|||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
|
@ -1497,12 +1575,18 @@ const (
|
|||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
|
@ -1542,6 +1626,7 @@ const (
|
|||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
|
@ -1555,7 +1640,6 @@ const (
|
|||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_SESS_CWV = 0x42a
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
|
@ -1694,12 +1778,13 @@ const (
|
|||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
|
@ -1842,7 +1927,7 @@ var errorList = [...]struct {
|
|||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
|
@ -1904,6 +1989,7 @@ var errorList = [...]struct {
|
|||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
|
2148
vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
generated
vendored
Normal file
2148
vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
350
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
350
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
|
@ -140,6 +140,306 @@ const (
|
|||
ARPHRD_VOID = 0xffff
|
||||
ARPHRD_VSOCKMON = 0x33a
|
||||
ARPHRD_X25 = 0x10f
|
||||
AUDIT_ADD = 0x3eb
|
||||
AUDIT_ADD_RULE = 0x3f3
|
||||
AUDIT_ALWAYS = 0x2
|
||||
AUDIT_ANOM_ABEND = 0x6a5
|
||||
AUDIT_ANOM_CREAT = 0x6a7
|
||||
AUDIT_ANOM_LINK = 0x6a6
|
||||
AUDIT_ANOM_PROMISCUOUS = 0x6a4
|
||||
AUDIT_ARCH = 0xb
|
||||
AUDIT_ARCH_AARCH64 = 0xc00000b7
|
||||
AUDIT_ARCH_ALPHA = 0xc0009026
|
||||
AUDIT_ARCH_ARCOMPACT = 0x4000005d
|
||||
AUDIT_ARCH_ARCOMPACTBE = 0x5d
|
||||
AUDIT_ARCH_ARCV2 = 0x400000c3
|
||||
AUDIT_ARCH_ARCV2BE = 0xc3
|
||||
AUDIT_ARCH_ARM = 0x40000028
|
||||
AUDIT_ARCH_ARMEB = 0x28
|
||||
AUDIT_ARCH_C6X = 0x4000008c
|
||||
AUDIT_ARCH_C6XBE = 0x8c
|
||||
AUDIT_ARCH_CRIS = 0x4000004c
|
||||
AUDIT_ARCH_CSKY = 0x400000fc
|
||||
AUDIT_ARCH_FRV = 0x5441
|
||||
AUDIT_ARCH_H8300 = 0x2e
|
||||
AUDIT_ARCH_HEXAGON = 0xa4
|
||||
AUDIT_ARCH_I386 = 0x40000003
|
||||
AUDIT_ARCH_IA64 = 0xc0000032
|
||||
AUDIT_ARCH_LOONGARCH32 = 0x40000102
|
||||
AUDIT_ARCH_LOONGARCH64 = 0xc0000102
|
||||
AUDIT_ARCH_M32R = 0x58
|
||||
AUDIT_ARCH_M68K = 0x4
|
||||
AUDIT_ARCH_MICROBLAZE = 0xbd
|
||||
AUDIT_ARCH_MIPS = 0x8
|
||||
AUDIT_ARCH_MIPS64 = 0x80000008
|
||||
AUDIT_ARCH_MIPS64N32 = 0xa0000008
|
||||
AUDIT_ARCH_MIPSEL = 0x40000008
|
||||
AUDIT_ARCH_MIPSEL64 = 0xc0000008
|
||||
AUDIT_ARCH_MIPSEL64N32 = 0xe0000008
|
||||
AUDIT_ARCH_NDS32 = 0x400000a7
|
||||
AUDIT_ARCH_NDS32BE = 0xa7
|
||||
AUDIT_ARCH_NIOS2 = 0x40000071
|
||||
AUDIT_ARCH_OPENRISC = 0x5c
|
||||
AUDIT_ARCH_PARISC = 0xf
|
||||
AUDIT_ARCH_PARISC64 = 0x8000000f
|
||||
AUDIT_ARCH_PPC = 0x14
|
||||
AUDIT_ARCH_PPC64 = 0x80000015
|
||||
AUDIT_ARCH_PPC64LE = 0xc0000015
|
||||
AUDIT_ARCH_RISCV32 = 0x400000f3
|
||||
AUDIT_ARCH_RISCV64 = 0xc00000f3
|
||||
AUDIT_ARCH_S390 = 0x16
|
||||
AUDIT_ARCH_S390X = 0x80000016
|
||||
AUDIT_ARCH_SH = 0x2a
|
||||
AUDIT_ARCH_SH64 = 0x8000002a
|
||||
AUDIT_ARCH_SHEL = 0x4000002a
|
||||
AUDIT_ARCH_SHEL64 = 0xc000002a
|
||||
AUDIT_ARCH_SPARC = 0x2
|
||||
AUDIT_ARCH_SPARC64 = 0x8000002b
|
||||
AUDIT_ARCH_TILEGX = 0xc00000bf
|
||||
AUDIT_ARCH_TILEGX32 = 0x400000bf
|
||||
AUDIT_ARCH_TILEPRO = 0x400000bc
|
||||
AUDIT_ARCH_UNICORE = 0x4000006e
|
||||
AUDIT_ARCH_X86_64 = 0xc000003e
|
||||
AUDIT_ARCH_XTENSA = 0x5e
|
||||
AUDIT_ARG0 = 0xc8
|
||||
AUDIT_ARG1 = 0xc9
|
||||
AUDIT_ARG2 = 0xca
|
||||
AUDIT_ARG3 = 0xcb
|
||||
AUDIT_AVC = 0x578
|
||||
AUDIT_AVC_PATH = 0x57a
|
||||
AUDIT_BITMASK_SIZE = 0x40
|
||||
AUDIT_BIT_MASK = 0x8000000
|
||||
AUDIT_BIT_TEST = 0x48000000
|
||||
AUDIT_BPF = 0x536
|
||||
AUDIT_BPRM_FCAPS = 0x529
|
||||
AUDIT_CAPSET = 0x52a
|
||||
AUDIT_CLASS_CHATTR = 0x2
|
||||
AUDIT_CLASS_CHATTR_32 = 0x3
|
||||
AUDIT_CLASS_DIR_WRITE = 0x0
|
||||
AUDIT_CLASS_DIR_WRITE_32 = 0x1
|
||||
AUDIT_CLASS_READ = 0x4
|
||||
AUDIT_CLASS_READ_32 = 0x5
|
||||
AUDIT_CLASS_SIGNAL = 0x8
|
||||
AUDIT_CLASS_SIGNAL_32 = 0x9
|
||||
AUDIT_CLASS_WRITE = 0x6
|
||||
AUDIT_CLASS_WRITE_32 = 0x7
|
||||
AUDIT_COMPARE_AUID_TO_EUID = 0x10
|
||||
AUDIT_COMPARE_AUID_TO_FSUID = 0xe
|
||||
AUDIT_COMPARE_AUID_TO_OBJ_UID = 0x5
|
||||
AUDIT_COMPARE_AUID_TO_SUID = 0xf
|
||||
AUDIT_COMPARE_EGID_TO_FSGID = 0x17
|
||||
AUDIT_COMPARE_EGID_TO_OBJ_GID = 0x4
|
||||
AUDIT_COMPARE_EGID_TO_SGID = 0x18
|
||||
AUDIT_COMPARE_EUID_TO_FSUID = 0x12
|
||||
AUDIT_COMPARE_EUID_TO_OBJ_UID = 0x3
|
||||
AUDIT_COMPARE_EUID_TO_SUID = 0x11
|
||||
AUDIT_COMPARE_FSGID_TO_OBJ_GID = 0x9
|
||||
AUDIT_COMPARE_FSUID_TO_OBJ_UID = 0x8
|
||||
AUDIT_COMPARE_GID_TO_EGID = 0x14
|
||||
AUDIT_COMPARE_GID_TO_FSGID = 0x15
|
||||
AUDIT_COMPARE_GID_TO_OBJ_GID = 0x2
|
||||
AUDIT_COMPARE_GID_TO_SGID = 0x16
|
||||
AUDIT_COMPARE_SGID_TO_FSGID = 0x19
|
||||
AUDIT_COMPARE_SGID_TO_OBJ_GID = 0x7
|
||||
AUDIT_COMPARE_SUID_TO_FSUID = 0x13
|
||||
AUDIT_COMPARE_SUID_TO_OBJ_UID = 0x6
|
||||
AUDIT_COMPARE_UID_TO_AUID = 0xa
|
||||
AUDIT_COMPARE_UID_TO_EUID = 0xb
|
||||
AUDIT_COMPARE_UID_TO_FSUID = 0xc
|
||||
AUDIT_COMPARE_UID_TO_OBJ_UID = 0x1
|
||||
AUDIT_COMPARE_UID_TO_SUID = 0xd
|
||||
AUDIT_CONFIG_CHANGE = 0x519
|
||||
AUDIT_CWD = 0x51b
|
||||
AUDIT_DAEMON_ABORT = 0x4b2
|
||||
AUDIT_DAEMON_CONFIG = 0x4b3
|
||||
AUDIT_DAEMON_END = 0x4b1
|
||||
AUDIT_DAEMON_START = 0x4b0
|
||||
AUDIT_DEL = 0x3ec
|
||||
AUDIT_DEL_RULE = 0x3f4
|
||||
AUDIT_DEVMAJOR = 0x64
|
||||
AUDIT_DEVMINOR = 0x65
|
||||
AUDIT_DIR = 0x6b
|
||||
AUDIT_DM_CTRL = 0x53a
|
||||
AUDIT_DM_EVENT = 0x53b
|
||||
AUDIT_EGID = 0x6
|
||||
AUDIT_EOE = 0x528
|
||||
AUDIT_EQUAL = 0x40000000
|
||||
AUDIT_EUID = 0x2
|
||||
AUDIT_EVENT_LISTENER = 0x537
|
||||
AUDIT_EXE = 0x70
|
||||
AUDIT_EXECVE = 0x51d
|
||||
AUDIT_EXIT = 0x67
|
||||
AUDIT_FAIL_PANIC = 0x2
|
||||
AUDIT_FAIL_PRINTK = 0x1
|
||||
AUDIT_FAIL_SILENT = 0x0
|
||||
AUDIT_FANOTIFY = 0x533
|
||||
AUDIT_FD_PAIR = 0x525
|
||||
AUDIT_FEATURE_BITMAP_ALL = 0x7f
|
||||
AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT = 0x1
|
||||
AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME = 0x2
|
||||
AUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND = 0x8
|
||||
AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH = 0x4
|
||||
AUDIT_FEATURE_BITMAP_FILTER_FS = 0x40
|
||||
AUDIT_FEATURE_BITMAP_LOST_RESET = 0x20
|
||||
AUDIT_FEATURE_BITMAP_SESSIONID_FILTER = 0x10
|
||||
AUDIT_FEATURE_CHANGE = 0x530
|
||||
AUDIT_FEATURE_LOGINUID_IMMUTABLE = 0x1
|
||||
AUDIT_FEATURE_ONLY_UNSET_LOGINUID = 0x0
|
||||
AUDIT_FEATURE_VERSION = 0x1
|
||||
AUDIT_FIELD_COMPARE = 0x6f
|
||||
AUDIT_FILETYPE = 0x6c
|
||||
AUDIT_FILTERKEY = 0xd2
|
||||
AUDIT_FILTER_ENTRY = 0x2
|
||||
AUDIT_FILTER_EXCLUDE = 0x5
|
||||
AUDIT_FILTER_EXIT = 0x4
|
||||
AUDIT_FILTER_FS = 0x6
|
||||
AUDIT_FILTER_PREPEND = 0x10
|
||||
AUDIT_FILTER_TASK = 0x1
|
||||
AUDIT_FILTER_TYPE = 0x5
|
||||
AUDIT_FILTER_URING_EXIT = 0x7
|
||||
AUDIT_FILTER_USER = 0x0
|
||||
AUDIT_FILTER_WATCH = 0x3
|
||||
AUDIT_FIRST_KERN_ANOM_MSG = 0x6a4
|
||||
AUDIT_FIRST_USER_MSG = 0x44c
|
||||
AUDIT_FIRST_USER_MSG2 = 0x834
|
||||
AUDIT_FSGID = 0x8
|
||||
AUDIT_FSTYPE = 0x1a
|
||||
AUDIT_FSUID = 0x4
|
||||
AUDIT_GET = 0x3e8
|
||||
AUDIT_GET_FEATURE = 0x3fb
|
||||
AUDIT_GID = 0x5
|
||||
AUDIT_GREATER_THAN = 0x20000000
|
||||
AUDIT_GREATER_THAN_OR_EQUAL = 0x60000000
|
||||
AUDIT_INODE = 0x66
|
||||
AUDIT_INTEGRITY_DATA = 0x708
|
||||
AUDIT_INTEGRITY_EVM_XATTR = 0x70e
|
||||
AUDIT_INTEGRITY_HASH = 0x70b
|
||||
AUDIT_INTEGRITY_METADATA = 0x709
|
||||
AUDIT_INTEGRITY_PCR = 0x70c
|
||||
AUDIT_INTEGRITY_POLICY_RULE = 0x70f
|
||||
AUDIT_INTEGRITY_RULE = 0x70d
|
||||