TUN-7628: Correct Host parsing for Access
Will no longer provide full hostname with path from provided `--hostname` flag for cloudflared access to the Host header field. This addresses certain issues caught from a security fix in go 1.19.11 and 1.20.6 in the net/http URL parsing.
This commit is contained in:
parent
96966b6ccf
commit
d8ff56cfce
|
@ -70,14 +70,14 @@ func ssh(c *cli.Context) error {
|
|||
|
||||
// get the hostname from the cmdline and error out if its not provided
|
||||
rawHostName := c.String(sshHostnameFlag)
|
||||
hostname, err := validation.ValidateHostname(rawHostName)
|
||||
if err != nil || rawHostName == "" {
|
||||
url, err := parseURL(rawHostName)
|
||||
if err != nil {
|
||||
log.Err(err).Send()
|
||||
return cli.ShowCommandHelp(c, "ssh")
|
||||
}
|
||||
originURL := ensureURLScheme(hostname)
|
||||
|
||||
// get the headers from the cmdline and add them
|
||||
headers := buildRequestHeaders(c.StringSlice(sshHeaderFlag))
|
||||
headers := parseRequestHeaders(c.StringSlice(sshHeaderFlag))
|
||||
if c.IsSet(sshTokenIDFlag) {
|
||||
headers.Set(cfAccessClientIDHeader, c.String(sshTokenIDFlag))
|
||||
}
|
||||
|
@ -89,9 +89,9 @@ func ssh(c *cli.Context) error {
|
|||
carrier.SetBastionDest(headers, c.String(sshDestinationFlag))
|
||||
|
||||
options := &carrier.StartOptions{
|
||||
OriginURL: originURL,
|
||||
OriginURL: url.String(),
|
||||
Headers: headers,
|
||||
Host: hostname,
|
||||
Host: url.Host,
|
||||
}
|
||||
|
||||
if connectTo := c.String(sshConnectTo); connectTo != "" {
|
||||
|
@ -138,20 +138,9 @@ func ssh(c *cli.Context) error {
|
|||
// default to 10 if provided but unset
|
||||
maxMessages = 10
|
||||
}
|
||||
logger := log.With().Str("host", hostname).Logger()
|
||||
logger := log.With().Str("host", url.Host).Logger()
|
||||
s = stream.NewDebugStream(s, &logger, maxMessages)
|
||||
}
|
||||
carrier.StartClient(wsConn, s, options)
|
||||
return nil
|
||||
}
|
||||
|
||||
func buildRequestHeaders(values []string) http.Header {
|
||||
headers := make(http.Header)
|
||||
for _, valuePair := range values {
|
||||
header, value, found := strings.Cut(valuePair, ":")
|
||||
if found {
|
||||
headers.Add(strings.TrimSpace(header), strings.TrimSpace(value))
|
||||
}
|
||||
}
|
||||
return headers
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package access
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestBuildRequestHeaders(t *testing.T) {
|
||||
headers := make(http.Header)
|
||||
headers.Add("client", "value")
|
||||
headers.Add("secret", "safe-value")
|
||||
|
||||
values := buildRequestHeaders([]string{"client: value", "secret: safe-value", "trash", "cf-trace-id: 000:000:0:1:asd"})
|
||||
assert.Equal(t, headers.Get("client"), values.Get("client"))
|
||||
assert.Equal(t, headers.Get("secret"), values.Get("secret"))
|
||||
assert.Equal(t, headers.Get("cf-trace-id"), values.Get("000:000:0:1:asd"))
|
||||
}
|
|
@ -222,8 +222,7 @@ func login(c *cli.Context) error {
|
|||
log := logger.CreateLoggerFromContext(c, logger.EnableTerminalLog)
|
||||
|
||||
args := c.Args()
|
||||
rawURL := ensureURLScheme(args.First())
|
||||
appURL, err := url.Parse(rawURL)
|
||||
appURL, err := parseURL(args.First())
|
||||
if args.Len() < 1 || err != nil {
|
||||
log.Error().Msg("Please provide the url of the Access application")
|
||||
return err
|
||||
|
@ -252,16 +251,6 @@ func login(c *cli.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// ensureURLScheme prepends a URL with https:// if it doesn't have a scheme. http:// URLs will not be converted.
|
||||
func ensureURLScheme(url string) string {
|
||||
url = strings.Replace(strings.ToLower(url), "http://", "https://", 1)
|
||||
if !strings.HasPrefix(url, "https://") {
|
||||
url = fmt.Sprintf("https://%s", url)
|
||||
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
// curl provides a wrapper around curl, passing Access JWT along in request
|
||||
func curl(c *cli.Context) error {
|
||||
err := sentry.Init(sentry.ClientOptions{
|
||||
|
@ -345,7 +334,7 @@ func generateToken(c *cli.Context) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
appURL, err := url.Parse(ensureURLScheme(c.String("app")))
|
||||
appURL, err := parseURL(c.String("app"))
|
||||
if err != nil || c.NumFlags() < 1 {
|
||||
fmt.Fprintln(os.Stderr, "Please provide a url.")
|
||||
return err
|
||||
|
@ -398,7 +387,7 @@ func sshGen(c *cli.Context) error {
|
|||
return cli.ShowCommandHelp(c, "ssh-gen")
|
||||
}
|
||||
|
||||
originURL, err := url.Parse(ensureURLScheme(hostname))
|
||||
originURL, err := parseURL(hostname)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -499,7 +488,7 @@ func isFileThere(candidate string) bool {
|
|||
// Then makes a request to to the origin with the token to ensure it is valid.
|
||||
// Returns nil if token is valid.
|
||||
func verifyTokenAtEdge(appUrl *url.URL, appInfo *token.AppInfo, c *cli.Context, log *zerolog.Logger) error {
|
||||
headers := buildRequestHeaders(c.StringSlice(sshHeaderFlag))
|
||||
headers := parseRequestHeaders(c.StringSlice(sshHeaderFlag))
|
||||
if c.IsSet(sshTokenIDFlag) {
|
||||
headers.Add(cfAccessClientIDHeader, c.String(sshTokenIDFlag))
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
package access
|
||||
|
||||
import "testing"
|
||||
|
||||
func Test_ensureURLScheme(t *testing.T) {
|
||||
type args struct {
|
||||
url string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want string
|
||||
}{
|
||||
{"no scheme", args{"localhost:123"}, "https://localhost:123"},
|
||||
{"http scheme", args{"http://test"}, "https://test"},
|
||||
{"https scheme", args{"https://test"}, "https://test"},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := ensureURLScheme(tt.args.url); got != tt.want {
|
||||
t.Errorf("ensureURLScheme() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package access
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/http/httpguts"
|
||||
)
|
||||
|
||||
// parseRequestHeaders will take user-provided header values as strings "Content-Type: application/json" and create
|
||||
// a http.Header object.
|
||||
func parseRequestHeaders(values []string) http.Header {
|
||||
headers := make(http.Header)
|
||||
for _, valuePair := range values {
|
||||
header, value, found := strings.Cut(valuePair, ":")
|
||||
if found {
|
||||
headers.Add(strings.TrimSpace(header), strings.TrimSpace(value))
|
||||
}
|
||||
}
|
||||
return headers
|
||||
}
|
||||
|
||||
// parseHostname will attempt to convert a user provided URL string into a string with some light error checking on
|
||||
// certain expectations from the URL.
|
||||
// Will convert all HTTP URLs to HTTPS
|
||||
func parseURL(input string) (*url.URL, error) {
|
||||
if input == "" {
|
||||
return nil, errors.New("no input provided")
|
||||
}
|
||||
if !strings.HasPrefix(input, "https://") && !strings.HasPrefix(input, "http://") {
|
||||
input = fmt.Sprintf("https://%s", input)
|
||||
}
|
||||
url, err := url.ParseRequestURI(input)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse as URL: %w", err)
|
||||
}
|
||||
if url.Scheme != "https" {
|
||||
url.Scheme = "https"
|
||||
}
|
||||
if url.Host == "" {
|
||||
return nil, errors.New("failed to parse Host")
|
||||
}
|
||||
host, err := httpguts.PunycodeHostPort(url.Host)
|
||||
if err != nil || host == "" {
|
||||
return nil, err
|
||||
}
|
||||
if !httpguts.ValidHostHeader(host) {
|
||||
return nil, errors.New("invalid Host provided")
|
||||
}
|
||||
url.Host = host
|
||||
return url, nil
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package access
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestParseRequestHeaders(t *testing.T) {
|
||||
values := parseRequestHeaders([]string{"client: value", "secret: safe-value", "trash", "cf-trace-id: 000:000:0:1:asd"})
|
||||
assert.Len(t, values, 3)
|
||||
assert.Equal(t, "value", values.Get("client"))
|
||||
assert.Equal(t, "safe-value", values.Get("secret"))
|
||||
assert.Equal(t, "000:000:0:1:asd", values.Get("cf-trace-id"))
|
||||
}
|
||||
|
||||
func TestParseURL(t *testing.T) {
|
||||
schemes := []string{
|
||||
"http://",
|
||||
"https://",
|
||||
"",
|
||||
}
|
||||
hosts := []struct {
|
||||
input string
|
||||
expected string
|
||||
}{
|
||||
{"localhost", "localhost"},
|
||||
{"127.0.0.1", "127.0.0.1"},
|
||||
{"127.0.0.1:9090", "127.0.0.1:9090"},
|
||||
{"::1", "::1"},
|
||||
{"::1:8080", "::1:8080"},
|
||||
{"[::1]", "[::1]"},
|
||||
{"[::1]:8080", "[::1]:8080"},
|
||||
{":8080", ":8080"},
|
||||
{"example.com", "example.com"},
|
||||
{"hello.example.com", "hello.example.com"},
|
||||
{"bücher.example.com", "xn--bcher-kva.example.com"},
|
||||
}
|
||||
paths := []string{
|
||||
"",
|
||||
"/test",
|
||||
"/example.com?qwe=123",
|
||||
}
|
||||
for i, scheme := range schemes {
|
||||
for j, host := range hosts {
|
||||
for k, path := range paths {
|
||||
t.Run(fmt.Sprintf("%d_%d_%d", i, j, k), func(t *testing.T) {
|
||||
input := fmt.Sprintf("%s%s%s", scheme, host.input, path)
|
||||
expected := fmt.Sprintf("%s%s%s", "https://", host.expected, path)
|
||||
url, err := parseURL(input)
|
||||
assert.NoError(t, err, "input: %s\texpected: %s", input, expected)
|
||||
assert.Equal(t, expected, url.String())
|
||||
assert.Equal(t, host.expected, url.Host)
|
||||
assert.Equal(t, "https", url.Scheme)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
t.Run("no input", func(t *testing.T) {
|
||||
_, err := parseURL("")
|
||||
assert.ErrorContains(t, err, "no input provided")
|
||||
})
|
||||
|
||||
t.Run("missing host", func(t *testing.T) {
|
||||
_, err := parseURL("https:///host")
|
||||
assert.ErrorContains(t, err, "failed to parse Host")
|
||||
})
|
||||
|
||||
t.Run("invalid path only", func(t *testing.T) {
|
||||
_, err := parseURL("/host")
|
||||
assert.ErrorContains(t, err, "failed to parse Host")
|
||||
})
|
||||
|
||||
t.Run("invalid parse URL", func(t *testing.T) {
|
||||
_, err := parseURL("https://host\\host")
|
||||
assert.ErrorContains(t, err, "failed to parse as URL")
|
||||
})
|
||||
}
|
10
go.mod
10
go.mod
|
@ -36,11 +36,11 @@ require (
|
|||
go.opentelemetry.io/otel/trace v1.6.3
|
||||
go.opentelemetry.io/proto/otlp v0.15.0
|
||||
go.uber.org/automaxprocs v1.4.0
|
||||
golang.org/x/crypto v0.8.0
|
||||
golang.org/x/net v0.9.0
|
||||
golang.org/x/crypto v0.11.0
|
||||
golang.org/x/net v0.12.0
|
||||
golang.org/x/sync v0.1.0
|
||||
golang.org/x/sys v0.7.0
|
||||
golang.org/x/term v0.7.0
|
||||
golang.org/x/sys v0.10.0
|
||||
golang.org/x/term v0.10.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
|
@ -91,7 +91,7 @@ require (
|
|||
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
|
||||
golang.org/x/mod v0.8.0 // indirect
|
||||
golang.org/x/oauth2 v0.6.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
golang.org/x/text v0.11.0 // indirect
|
||||
golang.org/x/tools v0.6.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd // indirect
|
||||
|
|
20
go.sum
20
go.sum
|
@ -404,8 +404,8 @@ golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ=
|
||||
golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE=
|
||||
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
|
||||
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
||||
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=
|
||||
|
@ -475,8 +475,8 @@ golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qx
|
|||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
|
||||
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
||||
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
|
||||
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||
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=
|
||||
|
@ -545,12 +545,12 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
|
||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
||||
golang.org/x/sys v0.10.0/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/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
|
||||
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
|
||||
golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c=
|
||||
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
@ -559,8 +559,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
|
||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
|
|
|
@ -168,68 +168,6 @@ func validateIP(scheme, host, port string) (string, error) {
|
|||
return fmt.Sprintf("%s://%s", scheme, host), nil
|
||||
}
|
||||
|
||||
// originURL shouldn't be a pointer, because this function might change the scheme
|
||||
func ValidateHTTPService(originURL string, hostname string, transport http.RoundTripper) error {
|
||||
parsedURL, err := url.Parse(originURL)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
client := &http.Client{
|
||||
Transport: transport,
|
||||
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||
return http.ErrUseLastResponse
|
||||
},
|
||||
Timeout: validationTimeout,
|
||||
}
|
||||
|
||||
initialRequest, err := http.NewRequest("GET", parsedURL.String(), nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
initialRequest.Host = hostname
|
||||
resp, initialErr := client.Do(initialRequest)
|
||||
if initialErr == nil {
|
||||
resp.Body.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Attempt the same endpoint via the other protocol (http/https); maybe we have better luck?
|
||||
oldScheme := parsedURL.Scheme
|
||||
parsedURL.Scheme = toggleProtocol(oldScheme)
|
||||
|
||||
secondRequest, err := http.NewRequest("GET", parsedURL.String(), nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
secondRequest.Host = hostname
|
||||
resp, secondErr := client.Do(secondRequest)
|
||||
if secondErr == nil { // Worked this time--advise the user to switch protocols
|
||||
_ = resp.Body.Close()
|
||||
return errors.Errorf(
|
||||
"%s doesn't seem to work over %s, but does seem to work over %s. Reason: %v. Consider changing the origin URL to %v",
|
||||
parsedURL.Host,
|
||||
oldScheme,
|
||||
parsedURL.Scheme,
|
||||
initialErr,
|
||||
originURL,
|
||||
)
|
||||
}
|
||||
|
||||
return initialErr
|
||||
}
|
||||
|
||||
func toggleProtocol(httpProtocol string) string {
|
||||
switch httpProtocol {
|
||||
case "http":
|
||||
return "https"
|
||||
case "https":
|
||||
return "http"
|
||||
default:
|
||||
return httpProtocol
|
||||
}
|
||||
}
|
||||
|
||||
// Access checks if a JWT from Cloudflare Access is valid.
|
||||
type Access struct {
|
||||
verifier *oidc.IDTokenVerifier
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"context"
|
||||
"crypto/tls"
|
||||
|
@ -114,179 +113,6 @@ func TestValidateUrl(t *testing.T) {
|
|||
|
||||
}
|
||||
|
||||
func TestToggleProtocol(t *testing.T) {
|
||||
assert.Equal(t, "https", toggleProtocol("http"))
|
||||
assert.Equal(t, "http", toggleProtocol("https"))
|
||||
assert.Equal(t, "random", toggleProtocol("random"))
|
||||
assert.Equal(t, "", toggleProtocol(""))
|
||||
}
|
||||
|
||||
// Happy path 1: originURL is HTTP, and HTTP connections work
|
||||
func TestValidateHTTPService_HTTP2HTTP(t *testing.T) {
|
||||
originURL := "http://127.0.0.1/"
|
||||
hostname := "example.com"
|
||||
|
||||
assert.Nil(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
return emptyResponse(200), nil
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
t.Fatal("http works, shouldn't have tried with https")
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
|
||||
assert.Nil(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
return emptyResponse(503), nil
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
t.Fatal("http works, shouldn't have tried with https")
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
}
|
||||
|
||||
// Happy path 2: originURL is HTTPS, and HTTPS connections work
|
||||
func TestValidateHTTPService_HTTPS2HTTPS(t *testing.T) {
|
||||
originURL := "https://127.0.0.1:1234/"
|
||||
hostname := "example.com"
|
||||
|
||||
assert.Nil(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
t.Fatal("https works, shouldn't have tried with http")
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
return emptyResponse(200), nil
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
|
||||
assert.Nil(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
t.Fatal("https works, shouldn't have tried with http")
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
return emptyResponse(503), nil
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
}
|
||||
|
||||
// Error path 1: originURL is HTTPS, but HTTP connections work
|
||||
func TestValidateHTTPService_HTTPS2HTTP(t *testing.T) {
|
||||
originURL := "https://127.0.0.1:1234/"
|
||||
hostname := "example.com"
|
||||
|
||||
assert.Error(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
return emptyResponse(200), nil
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
return nil, assert.AnError
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
|
||||
assert.Error(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
return emptyResponse(503), nil
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
return nil, assert.AnError
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
}
|
||||
|
||||
// Error path 2: originURL is HTTP, but HTTPS connections work
|
||||
func TestValidateHTTPService_HTTP2HTTPS(t *testing.T) {
|
||||
originURL := "http://127.0.0.1:1234/"
|
||||
hostname := "example.com"
|
||||
|
||||
assert.Error(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
return nil, assert.AnError
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
return emptyResponse(200), nil
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
|
||||
assert.Error(t, ValidateHTTPService(originURL, hostname, testRoundTripper(func(req *http.Request) (*http.Response, error) {
|
||||
assert.Equal(t, req.Host, hostname)
|
||||
if req.URL.Scheme == "http" {
|
||||
return nil, assert.AnError
|
||||
}
|
||||
if req.URL.Scheme == "https" {
|
||||
return emptyResponse(503), nil
|
||||
}
|
||||
panic("Shouldn't reach here")
|
||||
})))
|
||||
}
|
||||
|
||||
// Ensure the client does not follow 302 responses
|
||||
func TestValidateHTTPService_NoFollowRedirects(t *testing.T) {
|
||||
hostname := "example.com"
|
||||
redirectServer, redirectClient, err := createSecureMockServerAndClient(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path == "/followedRedirect" {
|
||||
t.Fatal("shouldn't have followed the 302")
|
||||
}
|
||||
if r.Method == "CONNECT" {
|
||||
assert.Equal(t, "127.0.0.1:443", r.Host)
|
||||
} else {
|
||||
assert.Equal(t, hostname, r.Host)
|
||||
}
|
||||
w.Header().Set("Location", "/followedRedirect")
|
||||
w.WriteHeader(302)
|
||||
}))
|
||||
assert.NoError(t, err)
|
||||
defer redirectServer.Close()
|
||||
assert.NoError(t, ValidateHTTPService(redirectServer.URL, hostname, redirectClient.Transport))
|
||||
}
|
||||
|
||||
// Ensure validation times out when origin URL is nonresponsive
|
||||
func TestValidateHTTPService_NonResponsiveOrigin(t *testing.T) {
|
||||
originURL := "http://127.0.0.1/"
|
||||
hostname := "example.com"
|
||||
oldValidationTimeout := validationTimeout
|
||||
defer func() {
|
||||
validationTimeout = oldValidationTimeout
|
||||
}()
|
||||
validationTimeout = 500 * time.Millisecond
|
||||
|
||||
// Use createMockServerAndClient, not createSecureMockServerAndClient.
|
||||
// The latter will bail with HTTP 400 immediately on an http:// request,
|
||||
// which defeats the purpose of a 'nonresponsive origin' test.
|
||||
server, client, err := createMockServerAndClient(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == "CONNECT" {
|
||||
assert.Equal(t, "127.0.0.1:443", r.Host)
|
||||
} else {
|
||||
assert.Equal(t, hostname, r.Host)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
w.WriteHeader(200)
|
||||
}))
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
defer server.Close()
|
||||
|
||||
err = ValidateHTTPService(originURL, hostname, client.Transport)
|
||||
fmt.Println(err)
|
||||
if err, ok := err.(net.Error); assert.True(t, ok) {
|
||||
assert.True(t, err.Timeout())
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewAccessValidatorOk(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
url := "test.cloudflareaccess.com"
|
||||
|
|
|
@ -431,6 +431,14 @@ func (s *String) readBase128Int(out *int) bool {
|
|||
}
|
||||
ret <<= 7
|
||||
b := s.read(1)[0]
|
||||
|
||||
// ITU-T X.690, section 8.19.2:
|
||||
// The subidentifier shall be encoded in the fewest possible octets,
|
||||
// that is, the leading octet of the subidentifier shall not have the value 0x80.
|
||||
if i == 0 && b == 0x80 {
|
||||
return false
|
||||
}
|
||||
|
||||
ret |= int(b & 0x7f)
|
||||
if b&0x80 == 0 {
|
||||
*out = ret
|
||||
|
|
|
@ -85,7 +85,7 @@ var supportedHostKeyAlgos = []string{
|
|||
// This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed
|
||||
// because they have reached the end of their useful life.
|
||||
var supportedMACs = []string{
|
||||
"hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96",
|
||||
"hmac-sha2-512-etm@openssh.com", "hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha2-512", "hmac-sha1", "hmac-sha1-96",
|
||||
}
|
||||
|
||||
var supportedCompressions = []string{compressionNone}
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
"crypto/hmac"
|
||||
"crypto/sha1"
|
||||
"crypto/sha256"
|
||||
"crypto/sha512"
|
||||
"hash"
|
||||
)
|
||||
|
||||
|
@ -46,9 +47,15 @@ func (t truncatingMAC) Size() int {
|
|||
func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() }
|
||||
|
||||
var macModes = map[string]*macMode{
|
||||
"hmac-sha2-512-etm@openssh.com": {64, true, func(key []byte) hash.Hash {
|
||||
return hmac.New(sha512.New, key)
|
||||
}},
|
||||
"hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash {
|
||||
return hmac.New(sha256.New, key)
|
||||
}},
|
||||
"hmac-sha2-512": {64, false, func(key []byte) hash.Hash {
|
||||
return hmac.New(sha512.New, key)
|
||||
}},
|
||||
"hmac-sha2-256": {32, false, func(key []byte) hash.Hash {
|
||||
return hmac.New(sha256.New, key)
|
||||
}},
|
||||
|
|
|
@ -441,7 +441,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
|
|||
if s.NewWriteScheduler != nil {
|
||||
sc.writeSched = s.NewWriteScheduler()
|
||||
} else {
|
||||
sc.writeSched = NewPriorityWriteScheduler(nil)
|
||||
sc.writeSched = newRoundRobinWriteScheduler()
|
||||
}
|
||||
|
||||
// These start at the RFC-specified defaults. If there is a higher
|
||||
|
@ -2429,7 +2429,7 @@ type requestBody struct {
|
|||
conn *serverConn
|
||||
closeOnce sync.Once // for use by Close only
|
||||
sawEOF bool // for use by Read only
|
||||
pipe *pipe // non-nil if we have a HTTP entity message body
|
||||
pipe *pipe // non-nil if we have an HTTP entity message body
|
||||
needsContinue bool // need to send a 100-continue
|
||||
}
|
||||
|
||||
|
@ -2569,7 +2569,8 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
|
|||
clen = ""
|
||||
}
|
||||
}
|
||||
if clen == "" && rws.handlerDone && bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) {
|
||||
_, hasContentLength := rws.snapHeader["Content-Length"]
|
||||
if !hasContentLength && clen == "" && rws.handlerDone && bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) {
|
||||
clen = strconv.Itoa(len(p))
|
||||
}
|
||||
_, hasContentType := rws.snapHeader["Content-Type"]
|
||||
|
@ -2774,7 +2775,7 @@ func (w *responseWriter) FlushError() error {
|
|||
err = rws.bw.Flush()
|
||||
} else {
|
||||
// The bufio.Writer won't call chunkWriter.Write
|
||||
// (writeChunk with zero bytes, so we have to do it
|
||||
// (writeChunk with zero bytes), so we have to do it
|
||||
// ourselves to force the HTTP response header and/or
|
||||
// final DATA frame (with END_STREAM) to be sent.
|
||||
_, err = chunkWriter{rws}.Write(nil)
|
||||
|
|
|
@ -1266,6 +1266,29 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||
return res, nil
|
||||
}
|
||||
|
||||
cancelRequest := func(cs *clientStream, err error) error {
|
||||
cs.cc.mu.Lock()
|
||||
bodyClosed := cs.reqBodyClosed
|
||||
cs.cc.mu.Unlock()
|
||||
// Wait for the request body to be closed.
|
||||
//
|
||||
// If nothing closed the body before now, abortStreamLocked
|
||||
// will have started a goroutine to close it.
|
||||
//
|
||||
// Closing the body before returning avoids a race condition
|
||||
// with net/http checking its readTrackingBody to see if the
|
||||
// body was read from or closed. See golang/go#60041.
|
||||
//
|
||||
// The body is closed in a separate goroutine without the
|
||||
// connection mutex held, but dropping the mutex before waiting
|
||||
// will keep us from holding it indefinitely if the body
|
||||
// close is slow for some reason.
|
||||
if bodyClosed != nil {
|
||||
<-bodyClosed
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-cs.respHeaderRecv:
|
||||
|
@ -1285,10 +1308,10 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||
case <-ctx.Done():
|
||||
err := ctx.Err()
|
||||
cs.abortStream(err)
|
||||
return nil, err
|
||||
return nil, cancelRequest(cs, err)
|
||||
case <-cs.reqCancel:
|
||||
cs.abortStream(errRequestCanceled)
|
||||
return nil, errRequestCanceled
|
||||
return nil, cancelRequest(cs, errRequestCanceled)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1845,6 +1868,9 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !httpguts.ValidHostHeader(host) {
|
||||
return nil, errors.New("http2: invalid Host header")
|
||||
}
|
||||
|
||||
var path string
|
||||
if req.Method != "CONNECT" {
|
||||
|
@ -1881,7 +1907,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
|
|||
// 8.1.2.3 Request Pseudo-Header Fields
|
||||
// The :path pseudo-header field includes the path and query parts of the
|
||||
// target URI (the path-absolute production and optionally a '?' character
|
||||
// followed by the query production (see Sections 3.3 and 3.4 of
|
||||
// followed by the query production, see Sections 3.3 and 3.4 of
|
||||
// [RFC3986]).
|
||||
f(":authority", host)
|
||||
m := req.Method
|
||||
|
|
|
@ -184,7 +184,8 @@ func (wr *FrameWriteRequest) replyToWriter(err error) {
|
|||
|
||||
// writeQueue is used by implementations of WriteScheduler.
|
||||
type writeQueue struct {
|
||||
s []FrameWriteRequest
|
||||
s []FrameWriteRequest
|
||||
prev, next *writeQueue
|
||||
}
|
||||
|
||||
func (q *writeQueue) empty() bool { return len(q.s) == 0 }
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
// Copyright 2023 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 http2
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
)
|
||||
|
||||
type roundRobinWriteScheduler struct {
|
||||
// control contains control frames (SETTINGS, PING, etc.).
|
||||
control writeQueue
|
||||
|
||||
// streams maps stream ID to a queue.
|
||||
streams map[uint32]*writeQueue
|
||||
|
||||
// stream queues are stored in a circular linked list.
|
||||
// head is the next stream to write, or nil if there are no streams open.
|
||||
head *writeQueue
|
||||
|
||||
// pool of empty queues for reuse.
|
||||
queuePool writeQueuePool
|
||||
}
|
||||
|
||||
// newRoundRobinWriteScheduler constructs a new write scheduler.
|
||||
// The round robin scheduler priorizes control frames
|
||||
// like SETTINGS and PING over DATA frames.
|
||||
// When there are no control frames to send, it performs a round-robin
|
||||
// selection from the ready streams.
|
||||
func newRoundRobinWriteScheduler() WriteScheduler {
|
||||
ws := &roundRobinWriteScheduler{
|
||||
streams: make(map[uint32]*writeQueue),
|
||||
}
|
||||
return ws
|
||||
}
|
||||
|
||||
func (ws *roundRobinWriteScheduler) OpenStream(streamID uint32, options OpenStreamOptions) {
|
||||
if ws.streams[streamID] != nil {
|
||||
panic(fmt.Errorf("stream %d already opened", streamID))
|
||||
}
|
||||
q := ws.queuePool.get()
|
||||
ws.streams[streamID] = q
|
||||
if ws.head == nil {
|
||||
ws.head = q
|
||||
q.next = q
|
||||
q.prev = q
|
||||
} else {
|
||||
// Queues are stored in a ring.
|
||||
// Insert the new stream before ws.head, putting it at the end of the list.
|
||||
q.prev = ws.head.prev
|
||||
q.next = ws.head
|
||||
q.prev.next = q
|
||||
q.next.prev = q
|
||||
}
|
||||
}
|
||||
|
||||
func (ws *roundRobinWriteScheduler) CloseStream(streamID uint32) {
|
||||
q := ws.streams[streamID]
|
||||
if q == nil {
|
||||
return
|
||||
}
|
||||
if q.next == q {
|
||||
// This was the only open stream.
|
||||
ws.head = nil
|
||||
} else {
|
||||
q.prev.next = q.next
|
||||
q.next.prev = q.prev
|
||||
if ws.head == q {
|
||||
ws.head = q.next
|
||||
}
|
||||
}
|
||||
delete(ws.streams, streamID)
|
||||
ws.queuePool.put(q)
|
||||
}
|
||||
|
||||
func (ws *roundRobinWriteScheduler) AdjustStream(streamID uint32, priority PriorityParam) {}
|
||||
|
||||
func (ws *roundRobinWriteScheduler) Push(wr FrameWriteRequest) {
|
||||
if wr.isControl() {
|
||||
ws.control.push(wr)
|
||||
return
|
||||
}
|
||||
q := ws.streams[wr.StreamID()]
|
||||
if q == nil {
|
||||
// This is a closed stream.
|
||||
// wr should not be a HEADERS or DATA frame.
|
||||
// We push the request onto the control queue.
|
||||
if wr.DataSize() > 0 {
|
||||
panic("add DATA on non-open stream")
|
||||
}
|
||||
ws.control.push(wr)
|
||||
return
|
||||
}
|
||||
q.push(wr)
|
||||
}
|
||||
|
||||
func (ws *roundRobinWriteScheduler) Pop() (FrameWriteRequest, bool) {
|
||||
// Control and RST_STREAM frames first.
|
||||
if !ws.control.empty() {
|
||||
return ws.control.shift(), true
|
||||
}
|
||||
if ws.head == nil {
|
||||
return FrameWriteRequest{}, false
|
||||
}
|
||||
q := ws.head
|
||||
for {
|
||||
if wr, ok := q.consume(math.MaxInt32); ok {
|
||||
ws.head = q.next
|
||||
return wr, true
|
||||
}
|
||||
q = q.next
|
||||
if q == ws.head {
|
||||
break
|
||||
}
|
||||
}
|
||||
return FrameWriteRequest{}, false
|
||||
}
|
|
@ -121,7 +121,7 @@ func CheckJoiners(enable bool) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// StrictDomainName limits the set of permissable ASCII characters to those
|
||||
// StrictDomainName limits the set of permissible ASCII characters to those
|
||||
// allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the
|
||||
// hyphen). This is set by default for MapForLookup and ValidateForRegistration,
|
||||
// but is only useful if ValidateLabels is set.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -6,27 +6,6 @@
|
|||
|
||||
package idna
|
||||
|
||||
// appendMapping appends the mapping for the respective rune. isMapped must be
|
||||
// true. A mapping is a categorization of a rune as defined in UTS #46.
|
||||
func (c info) appendMapping(b []byte, s string) []byte {
|
||||
index := int(c >> indexShift)
|
||||
if c&xorBit == 0 {
|
||||
s := mappings[index:]
|
||||
return append(b, s[1:s[0]+1]...)
|
||||
}
|
||||
b = append(b, s...)
|
||||
if c&inlineXOR == inlineXOR {
|
||||
// TODO: support and handle two-byte inline masks
|
||||
b[len(b)-1] ^= byte(index)
|
||||
} else {
|
||||
for p := len(b) - int(xorData[index]); p < len(b); p++ {
|
||||
index++
|
||||
b[p] ^= xorData[index]
|
||||
}
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// Sparse block handling code.
|
||||
|
||||
type valueRange struct {
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||
|
||||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !go1.16
|
||||
// +build !go1.16
|
||||
|
||||
package idna
|
||||
|
||||
// appendMapping appends the mapping for the respective rune. isMapped must be
|
||||
// true. A mapping is a categorization of a rune as defined in UTS #46.
|
||||
func (c info) appendMapping(b []byte, s string) []byte {
|
||||
index := int(c >> indexShift)
|
||||
if c&xorBit == 0 {
|
||||
s := mappings[index:]
|
||||
return append(b, s[1:s[0]+1]...)
|
||||
}
|
||||
b = append(b, s...)
|
||||
if c&inlineXOR == inlineXOR {
|
||||
// TODO: support and handle two-byte inline masks
|
||||
b[len(b)-1] ^= byte(index)
|
||||
} else {
|
||||
for p := len(b) - int(xorData[index]); p < len(b); p++ {
|
||||
index++
|
||||
b[p] ^= xorData[index]
|
||||
}
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||
|
||||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.16
|
||||
// +build go1.16
|
||||
|
||||
package idna
|
||||
|
||||
// appendMapping appends the mapping for the respective rune. isMapped must be
|
||||
// true. A mapping is a categorization of a rune as defined in UTS #46.
|
||||
func (c info) appendMapping(b []byte, s string) []byte {
|
||||
index := int(c >> indexShift)
|
||||
if c&xorBit == 0 {
|
||||
p := index
|
||||
return append(b, mappings[mappingIndex[p]:mappingIndex[p+1]]...)
|
||||
}
|
||||
b = append(b, s...)
|
||||
if c&inlineXOR == inlineXOR {
|
||||
// TODO: support and handle two-byte inline masks
|
||||
b[len(b)-1] ^= byte(index)
|
||||
} else {
|
||||
for p := len(b) - int(xorData[index]); p < len(b); p++ {
|
||||
index++
|
||||
b[p] ^= xorData[index]
|
||||
}
|
||||
}
|
||||
return b
|
||||
}
|
|
@ -289,7 +289,7 @@ func (up *UsernamePassword) Authenticate(ctx context.Context, rw io.ReadWriter,
|
|||
case AuthMethodNotRequired:
|
||||
return nil
|
||||
case AuthMethodUsernamePassword:
|
||||
if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) == 0 || len(up.Password) > 255 {
|
||||
if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) > 255 {
|
||||
return errors.New("invalid username/password")
|
||||
}
|
||||
b := []byte{authUsernamePasswordVersion}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
|
||||
// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
|
||||
//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
|
||||
// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm
|
||||
|
||||
package cpu
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
|
|||
# Use the Docker-based build system
|
||||
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
||||
$cmd docker build --tag generate:$GOOS $GOOS
|
||||
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
|
||||
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
|
@ -204,6 +204,7 @@ struct ltchars {
|
|||
#include <sys/timerfd.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <linux/audit.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/can.h>
|
||||
|
@ -518,7 +519,7 @@ ccflags="$@"
|
|||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
|
||||
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
||||
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
||||
$2 ~ /^RAW_PAYLOAD_/ ||
|
||||
|
@ -740,7 +741,8 @@ main(void)
|
|||
e = errors[i].num;
|
||||
if(i > 0 && errors[i-1].num == e)
|
||||
continue;
|
||||
strcpy(buf, strerror(e));
|
||||
strncpy(buf, strerror(e), sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
||||
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
||||
buf[0] += a - A;
|
||||
|
@ -759,7 +761,8 @@ main(void)
|
|||
e = signals[i].num;
|
||||
if(i > 0 && signals[i-1].num == e)
|
||||
continue;
|
||||
strcpy(buf, strsignal(e));
|
||||
strncpy(buf, strsignal(e), sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
|
||||
if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
|
||||
buf[0] += a - A;
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
// Copyright 2023 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
type mremapMmapper struct {
|
||||
mmapper
|
||||
mremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
|
||||
}
|
||||
|
||||
func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
||||
if newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&MREMAP_FIXED != 0 {
|
||||
return nil, EINVAL
|
||||
}
|
||||
|
||||
pOld := &oldData[cap(oldData)-1]
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
bOld := m.active[pOld]
|
||||
if bOld == nil || &bOld[0] != &oldData[0] {
|
||||
return nil, EINVAL
|
||||
}
|
||||
newAddr, errno := m.mremap(uintptr(unsafe.Pointer(&bOld[0])), uintptr(len(bOld)), uintptr(newLength), flags, 0)
|
||||
if errno != nil {
|
||||
return nil, errno
|
||||
}
|
||||
bNew := unsafe.Slice((*byte)(unsafe.Pointer(newAddr)), newLength)
|
||||
pNew := &bNew[cap(bNew)-1]
|
||||
if flags&MREMAP_DONTUNMAP == 0 {
|
||||
delete(m.active, pOld)
|
||||
}
|
||||
m.active[pNew] = bNew
|
||||
return bNew, nil
|
||||
}
|
|
@ -1699,12 +1699,23 @@ func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
|
|||
return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data)
|
||||
}
|
||||
|
||||
// elfNT_PRSTATUS is a copy of the debug/elf.NT_PRSTATUS constant so
|
||||
// x/sys/unix doesn't need to depend on debug/elf and thus
|
||||
// compress/zlib, debug/dwarf, and other packages.
|
||||
const elfNT_PRSTATUS = 1
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
|
||||
return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
|
||||
var iov Iovec
|
||||
iov.Base = (*byte)(unsafe.Pointer(regsout))
|
||||
iov.SetLen(int(unsafe.Sizeof(*regsout)))
|
||||
return ptracePtr(PTRACE_GETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))
|
||||
}
|
||||
|
||||
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
|
||||
return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
|
||||
var iov Iovec
|
||||
iov.Base = (*byte)(unsafe.Pointer(regs))
|
||||
iov.SetLen(int(unsafe.Sizeof(*regs)))
|
||||
return ptracePtr(PTRACE_SETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov))
|
||||
}
|
||||
|
||||
func PtraceSetOptions(pid int, options int) (err error) {
|
||||
|
@ -2113,11 +2124,15 @@ func writevRacedetect(iovecs []Iovec, n int) {
|
|||
|
||||
// mmap varies by architecture; see syscall_linux_*.go.
|
||||
//sys munmap(addr uintptr, length uintptr) (err error)
|
||||
//sys mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
|
||||
|
||||
var mapper = &mmapper{
|
||||
active: make(map[*byte][]byte),
|
||||
mmap: mmap,
|
||||
munmap: munmap,
|
||||
var mapper = &mremapMmapper{
|
||||
mmapper: mmapper{
|
||||
active: make(map[*byte][]byte),
|
||||
mmap: mmap,
|
||||
munmap: munmap,
|
||||
},
|
||||
mremap: mremap,
|
||||
}
|
||||
|
||||
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
|
||||
|
@ -2128,6 +2143,10 @@ func Munmap(b []byte) (err error) {
|
|||
return mapper.Munmap(b)
|
||||
}
|
||||
|
||||
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
||||
return mapper.Mremap(oldData, newLength, flags)
|
||||
}
|
||||
|
||||
//sys Madvise(b []byte, advice int) (err error)
|
||||
//sys Mprotect(b []byte, prot int) (err error)
|
||||
//sys Mlock(b []byte) (err error)
|
||||
|
@ -2420,6 +2439,21 @@ func PthreadSigmask(how int, set, oldset *Sigset_t) error {
|
|||
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
|
||||
}
|
||||
|
||||
//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
|
||||
//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
|
||||
|
||||
func Getresuid() (ruid, euid, suid int) {
|
||||
var r, e, s _C_int
|
||||
getresuid(&r, &e, &s)
|
||||
return int(r), int(e), int(s)
|
||||
}
|
||||
|
||||
func Getresgid() (rgid, egid, sgid int) {
|
||||
var r, e, s _C_int
|
||||
getresgid(&r, &e, &s)
|
||||
return int(r), int(e), int(s)
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
|
@ -2461,7 +2495,6 @@ func PthreadSigmask(how int, set, oldset *Sigset_t) error {
|
|||
// MqTimedreceive
|
||||
// MqTimedsend
|
||||
// MqUnlink
|
||||
// Mremap
|
||||
// Msgctl
|
||||
// Msgget
|
||||
// Msgrcv
|
||||
|
|
|
@ -151,6 +151,21 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
|
||||
//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
|
||||
|
||||
func Getresuid() (ruid, euid, suid int) {
|
||||
var r, e, s _C_int
|
||||
getresuid(&r, &e, &s)
|
||||
return int(r), int(e), int(s)
|
||||
}
|
||||
|
||||
func Getresgid() (rgid, egid, sgid int) {
|
||||
var r, e, s _C_int
|
||||
getresgid(&r, &e, &s)
|
||||
return int(r), int(e), int(s)
|
||||
}
|
||||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
|
||||
|
||||
|
@ -338,8 +353,6 @@ func Uname(uname *Utsname) error {
|
|||
// getgid
|
||||
// getitimer
|
||||
// getlogin
|
||||
// getresgid
|
||||
// getresuid
|
||||
// getthrid
|
||||
// ktrace
|
||||
// lfs_bmapv
|
||||
|
|
|
@ -493,6 +493,7 @@ const (
|
|||
BPF_F_TEST_RUN_ON_CPU = 0x1
|
||||
BPF_F_TEST_STATE_FREQ = 0x8
|
||||
BPF_F_TEST_XDP_LIVE_FRAMES = 0x2
|
||||
BPF_F_XDP_DEV_BOUND_ONLY = 0x40
|
||||
BPF_F_XDP_HAS_FRAGS = 0x20
|
||||
BPF_H = 0x8
|
||||
BPF_IMM = 0x0
|
||||
|
@ -826,9 +827,9 @@ const (
|
|||
DM_UUID_FLAG = 0x4000
|
||||
DM_UUID_LEN = 0x81
|
||||
DM_VERSION = 0xc138fd00
|
||||
DM_VERSION_EXTRA = "-ioctl (2022-07-28)"
|
||||
DM_VERSION_EXTRA = "-ioctl (2023-03-01)"
|
||||
DM_VERSION_MAJOR = 0x4
|
||||
DM_VERSION_MINOR = 0x2f
|
||||
DM_VERSION_MINOR = 0x30
|
||||
DM_VERSION_PATCHLEVEL = 0x0
|
||||
DT_BLK = 0x6
|
||||
DT_CHR = 0x2
|
||||
|
@ -1197,6 +1198,7 @@ const (
|
|||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_FS_ERROR = 0x8000
|
||||
FAN_INFO = 0x20
|
||||
FAN_MARK_ADD = 0x1
|
||||
FAN_MARK_DONT_FOLLOW = 0x4
|
||||
FAN_MARK_EVICTABLE = 0x200
|
||||
|
@ -1233,6 +1235,8 @@ const (
|
|||
FAN_REPORT_PIDFD = 0x80
|
||||
FAN_REPORT_TARGET_FID = 0x1000
|
||||
FAN_REPORT_TID = 0x100
|
||||
FAN_RESPONSE_INFO_AUDIT_RULE = 0x1
|
||||
FAN_RESPONSE_INFO_NONE = 0x0
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
|
@ -1860,6 +1864,7 @@ const (
|
|||
MEMWRITEOOB64 = 0xc0184d15
|
||||
MFD_ALLOW_SEALING = 0x2
|
||||
MFD_CLOEXEC = 0x1
|
||||
MFD_EXEC = 0x10
|
||||
MFD_HUGETLB = 0x4
|
||||
MFD_HUGE_16GB = 0x88000000
|
||||
MFD_HUGE_16MB = 0x60000000
|
||||
|
@ -1875,6 +1880,7 @@ const (
|
|||
MFD_HUGE_8MB = 0x5c000000
|
||||
MFD_HUGE_MASK = 0x3f
|
||||
MFD_HUGE_SHIFT = 0x1a
|
||||
MFD_NOEXEC_SEAL = 0x8
|
||||
MINIX2_SUPER_MAGIC = 0x2468
|
||||
MINIX2_SUPER_MAGIC2 = 0x2478
|
||||
MINIX3_SUPER_MAGIC = 0x4d5a
|
||||
|
@ -1898,6 +1904,9 @@ const (
|
|||
MOUNT_ATTR_SIZE_VER0 = 0x20
|
||||
MOUNT_ATTR_STRICTATIME = 0x20
|
||||
MOUNT_ATTR__ATIME = 0x70
|
||||
MREMAP_DONTUNMAP = 0x4
|
||||
MREMAP_FIXED = 0x2
|
||||
MREMAP_MAYMOVE = 0x1
|
||||
MSDOS_SUPER_MAGIC = 0x4d44
|
||||
MSG_BATCH = 0x40000
|
||||
MSG_CMSG_CLOEXEC = 0x40000000
|
||||
|
@ -2204,6 +2213,7 @@ const (
|
|||
PACKET_USER = 0x6
|
||||
PACKET_VERSION = 0xa
|
||||
PACKET_VNET_HDR = 0xf
|
||||
PACKET_VNET_HDR_SZ = 0x18
|
||||
PARITY_CRC16_PR0 = 0x2
|
||||
PARITY_CRC16_PR0_CCITT = 0x4
|
||||
PARITY_CRC16_PR1 = 0x3
|
||||
|
@ -2221,6 +2231,7 @@ const (
|
|||
PERF_ATTR_SIZE_VER5 = 0x70
|
||||
PERF_ATTR_SIZE_VER6 = 0x78
|
||||
PERF_ATTR_SIZE_VER7 = 0x80
|
||||
PERF_ATTR_SIZE_VER8 = 0x88
|
||||
PERF_AUX_FLAG_COLLISION = 0x8
|
||||
PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0
|
||||
PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100
|
||||
|
@ -2361,6 +2372,7 @@ const (
|
|||
PR_FP_EXC_UND = 0x40000
|
||||
PR_FP_MODE_FR = 0x1
|
||||
PR_FP_MODE_FRE = 0x2
|
||||
PR_GET_AUXV = 0x41555856
|
||||
PR_GET_CHILD_SUBREAPER = 0x25
|
||||
PR_GET_DUMPABLE = 0x3
|
||||
PR_GET_ENDIAN = 0x13
|
||||
|
@ -2369,6 +2381,8 @@ const (
|
|||
PR_GET_FP_MODE = 0x2e
|
||||
PR_GET_IO_FLUSHER = 0x3a
|
||||
PR_GET_KEEPCAPS = 0x7
|
||||
PR_GET_MDWE = 0x42
|
||||
PR_GET_MEMORY_MERGE = 0x44
|
||||
PR_GET_NAME = 0x10
|
||||
PR_GET_NO_NEW_PRIVS = 0x27
|
||||
PR_GET_PDEATHSIG = 0x2
|
||||
|
@ -2389,6 +2403,7 @@ const (
|
|||
PR_MCE_KILL_GET = 0x22
|
||||
PR_MCE_KILL_LATE = 0x0
|
||||
PR_MCE_KILL_SET = 0x1
|
||||
PR_MDWE_REFUSE_EXEC_GAIN = 0x1
|
||||
PR_MPX_DISABLE_MANAGEMENT = 0x2c
|
||||
PR_MPX_ENABLE_MANAGEMENT = 0x2b
|
||||
PR_MTE_TAG_MASK = 0x7fff8
|
||||
|
@ -2423,6 +2438,8 @@ const (
|
|||
PR_SET_FP_MODE = 0x2d
|
||||
PR_SET_IO_FLUSHER = 0x39
|
||||
PR_SET_KEEPCAPS = 0x8
|
||||
PR_SET_MDWE = 0x41
|
||||
PR_SET_MEMORY_MERGE = 0x43
|
||||
PR_SET_MM = 0x23
|
||||
PR_SET_MM_ARG_END = 0x9
|
||||
PR_SET_MM_ARG_START = 0x8
|
||||
|
@ -2506,6 +2523,7 @@ const (
|
|||
PTRACE_GETSIGMASK = 0x420a
|
||||
PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
|
||||
PTRACE_GET_SYSCALL_INFO = 0x420e
|
||||
PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211
|
||||
PTRACE_INTERRUPT = 0x4207
|
||||
PTRACE_KILL = 0x8
|
||||
PTRACE_LISTEN = 0x4208
|
||||
|
@ -2536,6 +2554,7 @@ const (
|
|||
PTRACE_SETREGSET = 0x4205
|
||||
PTRACE_SETSIGINFO = 0x4203
|
||||
PTRACE_SETSIGMASK = 0x420b
|
||||
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_SYSCALL = 0x18
|
||||
PTRACE_SYSCALL_INFO_ENTRY = 0x1
|
||||
|
@ -2967,6 +2986,7 @@ const (
|
|||
SOL_TCP = 0x6
|
||||
SOL_TIPC = 0x10f
|
||||
SOL_TLS = 0x11a
|
||||
SOL_UDP = 0x11
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x1000
|
||||
|
@ -3071,7 +3091,7 @@ const (
|
|||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0xd
|
||||
TASKSTATS_VERSION = 0xe
|
||||
TCIFLUSH = 0x0
|
||||
TCIOFF = 0x2
|
||||
TCIOFLUSH = 0x2
|
||||
|
@ -3237,6 +3257,7 @@ const (
|
|||
TP_STATUS_COPY = 0x2
|
||||
TP_STATUS_CSUMNOTREADY = 0x8
|
||||
TP_STATUS_CSUM_VALID = 0x80
|
||||
TP_STATUS_GSO_TCP = 0x100
|
||||
TP_STATUS_KERNEL = 0x0
|
||||
TP_STATUS_LOSING = 0x4
|
||||
TP_STATUS_SENDING = 0x2
|
||||
|
@ -3251,6 +3272,19 @@ const (
|
|||
TRACEFS_MAGIC = 0x74726163
|
||||
TS_COMM_LEN = 0x20
|
||||
UDF_SUPER_MAGIC = 0x15013346
|
||||
UDP_CORK = 0x1
|
||||
UDP_ENCAP = 0x64
|
||||
UDP_ENCAP_ESPINUDP = 0x2
|
||||
UDP_ENCAP_ESPINUDP_NON_IKE = 0x1
|
||||
UDP_ENCAP_GTP0 = 0x4
|
||||
UDP_ENCAP_GTP1U = 0x5
|
||||
UDP_ENCAP_L2TPINUDP = 0x3
|
||||
UDP_GRO = 0x68
|
||||
UDP_NO_CHECK6_RX = 0x66
|
||||
UDP_NO_CHECK6_TX = 0x65
|
||||
UDP_SEGMENT = 0x67
|
||||
UDP_V4_FLOW = 0x2
|
||||
UDP_V6_FLOW = 0x6
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
USBDEVICE_SUPER_MAGIC = 0x9fa2
|
||||
UTIME_NOW = 0x3fffffff
|
||||
|
|
|
@ -443,6 +443,7 @@ const (
|
|||
TIOCSWINSZ = 0x5414
|
||||
TIOCVHANGUP = 0x5437
|
||||
TOSTOP = 0x100
|
||||
TPIDR2_MAGIC = 0x54504902
|
||||
TUNATTACHFILTER = 0x401054d5
|
||||
TUNDETACHFILTER = 0x401054d6
|
||||
TUNGETDEVNETNS = 0x54e3
|
||||
|
@ -515,6 +516,7 @@ const (
|
|||
XCASE = 0x4
|
||||
XTABS = 0x1800
|
||||
ZA_MAGIC = 0x54366345
|
||||
ZT_MAGIC = 0x5a544e01
|
||||
_HIDIOCGRAWNAME = 0x80804804
|
||||
_HIDIOCGRAWPHYS = 0x80404805
|
||||
_HIDIOCGRAWUNIQ = 0x80404808
|
||||
|
|
|
@ -329,6 +329,54 @@ const (
|
|||
SCM_WIFI_STATUS = 0x25
|
||||
SFD_CLOEXEC = 0x400000
|
||||
SFD_NONBLOCK = 0x4000
|
||||
SF_FP = 0x38
|
||||
SF_I0 = 0x20
|
||||
SF_I1 = 0x24
|
||||
SF_I2 = 0x28
|
||||
SF_I3 = 0x2c
|
||||
SF_I4 = 0x30
|
||||
SF_I5 = 0x34
|
||||
SF_L0 = 0x0
|
||||
SF_L1 = 0x4
|
||||
SF_L2 = 0x8
|
||||
SF_L3 = 0xc
|
||||
SF_L4 = 0x10
|
||||
SF_L5 = 0x14
|
||||
SF_L6 = 0x18
|
||||
SF_L7 = 0x1c
|
||||
SF_PC = 0x3c
|
||||
SF_RETP = 0x40
|
||||
SF_V9_FP = 0x70
|
||||
SF_V9_I0 = 0x40
|
||||
SF_V9_I1 = 0x48
|
||||
SF_V9_I2 = 0x50
|
||||
SF_V9_I3 = 0x58
|
||||
SF_V9_I4 = 0x60
|
||||
SF_V9_I5 = 0x68
|
||||
SF_V9_L0 = 0x0
|
||||
SF_V9_L1 = 0x8
|
||||
SF_V9_L2 = 0x10
|
||||
SF_V9_L3 = 0x18
|
||||
SF_V9_L4 = 0x20
|
||||
SF_V9_L5 = 0x28
|
||||
SF_V9_L6 = 0x30
|
||||
SF_V9_L7 = 0x38
|
||||
SF_V9_PC = 0x78
|
||||
SF_V9_RETP = 0x80
|
||||
SF_V9_XARG0 = 0x88
|
||||
SF_V9_XARG1 = 0x90
|
||||
SF_V9_XARG2 = 0x98
|
||||
SF_V9_XARG3 = 0xa0
|
||||
SF_V9_XARG4 = 0xa8
|
||||
SF_V9_XARG5 = 0xb0
|
||||
SF_V9_XXARG = 0xb8
|
||||
SF_XARG0 = 0x44
|
||||
SF_XARG1 = 0x48
|
||||
SF_XARG2 = 0x4c
|
||||
SF_XARG3 = 0x50
|
||||
SF_XARG4 = 0x54
|
||||
SF_XARG5 = 0x58
|
||||
SF_XXARG = 0x5c
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
|
|
|
@ -1868,6 +1868,17 @@ func munmap(addr uintptr, length uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldaddr), uintptr(oldlength), uintptr(newlength), uintptr(flags), uintptr(newaddr), 0)
|
||||
xaddr = uintptr(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Madvise(b []byte, advice int) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(b) > 0 {
|
||||
|
@ -2172,3 +2183,17 @@ func rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr)
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
RawSyscallNoError(SYS_GETRESUID, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
RawSyscallNoError(SYS_GETRESGID, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
|
|
@ -519,6 +519,28 @@ var libc_getcwd_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresuid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresgid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresuid(SB)
|
||||
GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresgid(SB)
|
||||
GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
|
||||
|
|
|
@ -519,15 +519,29 @@ var libc_getcwd_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
||||
var libc_getresuid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresgid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
|
@ -541,6 +555,16 @@ var libc_ioctl_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
|
|
|
@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresuid(SB)
|
||||
GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresgid(SB)
|
||||
GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||
|
|
|
@ -519,6 +519,28 @@ var libc_getcwd_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresuid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresgid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresuid(SB)
|
||||
GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresgid(SB)
|
||||
GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $4
|
||||
DATA ·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
|
||||
|
|
|
@ -519,6 +519,28 @@ var libc_getcwd_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresuid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresgid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresuid(SB)
|
||||
GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresgid(SB)
|
||||
GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||
|
|
|
@ -519,6 +519,28 @@ var libc_getcwd_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresuid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresgid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresuid(SB)
|
||||
GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresgid(SB)
|
||||
GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||
|
|
|
@ -519,6 +519,28 @@ var libc_getcwd_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresuid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresgid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -189,6 +189,18 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getresuid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_getresgid(SB)
|
||||
RET
|
||||
GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
CALL libc_ioctl(SB)
|
||||
RET
|
||||
|
|
|
@ -519,6 +519,28 @@ var libc_getcwd_trampoline_addr uintptr
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresuid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresuid getresuid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
|
||||
syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
|
||||
return
|
||||
}
|
||||
|
||||
var libc_getresgid_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_getresgid getresgid "libc.so"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -158,6 +158,16 @@ TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
|
|||
GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresuid(SB)
|
||||
GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_getresgid(SB)
|
||||
GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB)
|
||||
|
||||
TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
|
||||
|
|
|
@ -372,6 +372,7 @@ const (
|
|||
SYS_LANDLOCK_CREATE_RULESET = 444
|
||||
SYS_LANDLOCK_ADD_RULE = 445
|
||||
SYS_LANDLOCK_RESTRICT_SELF = 446
|
||||
SYS_MEMFD_SECRET = 447
|
||||
SYS_PROCESS_MRELEASE = 448
|
||||
SYS_FUTEX_WAITV = 449
|
||||
SYS_SET_MEMPOLICY_HOME_NODE = 450
|
||||
|
|
|
@ -1538,6 +1538,10 @@ const (
|
|||
IFLA_GRO_MAX_SIZE = 0x3a
|
||||
IFLA_TSO_MAX_SIZE = 0x3b
|
||||
IFLA_TSO_MAX_SEGS = 0x3c
|
||||
IFLA_ALLMULTI = 0x3d
|
||||
IFLA_DEVLINK_PORT = 0x3e
|
||||
IFLA_GSO_IPV4_MAX_SIZE = 0x3f
|
||||
IFLA_GRO_IPV4_MAX_SIZE = 0x40
|
||||
IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0
|
||||
IFLA_PROTO_DOWN_REASON_MASK = 0x1
|
||||
IFLA_PROTO_DOWN_REASON_VALUE = 0x2
|
||||
|
@ -1968,7 +1972,7 @@ const (
|
|||
NFT_MSG_GETFLOWTABLE = 0x17
|
||||
NFT_MSG_DELFLOWTABLE = 0x18
|
||||
NFT_MSG_GETRULE_RESET = 0x19
|
||||
NFT_MSG_MAX = 0x1a
|
||||
NFT_MSG_MAX = 0x21
|
||||
NFTA_LIST_UNSPEC = 0x0
|
||||
NFTA_LIST_ELEM = 0x1
|
||||
NFTA_HOOK_UNSPEC = 0x0
|
||||
|
@ -2555,6 +2559,11 @@ const (
|
|||
BPF_REG_8 = 0x8
|
||||
BPF_REG_9 = 0x9
|
||||
BPF_REG_10 = 0xa
|
||||
BPF_CGROUP_ITER_ORDER_UNSPEC = 0x0
|
||||
BPF_CGROUP_ITER_SELF_ONLY = 0x1
|
||||
BPF_CGROUP_ITER_DESCENDANTS_PRE = 0x2
|
||||
BPF_CGROUP_ITER_DESCENDANTS_POST = 0x3
|
||||
BPF_CGROUP_ITER_ANCESTORS_UP = 0x4
|
||||
BPF_MAP_CREATE = 0x0
|
||||
BPF_MAP_LOOKUP_ELEM = 0x1
|
||||
BPF_MAP_UPDATE_ELEM = 0x2
|
||||
|
@ -2566,6 +2575,7 @@ const (
|
|||
BPF_PROG_ATTACH = 0x8
|
||||
BPF_PROG_DETACH = 0x9
|
||||
BPF_PROG_TEST_RUN = 0xa
|
||||
BPF_PROG_RUN = 0xa
|
||||
BPF_PROG_GET_NEXT_ID = 0xb
|
||||
BPF_MAP_GET_NEXT_ID = 0xc
|
||||
BPF_PROG_GET_FD_BY_ID = 0xd
|
||||
|
@ -2610,6 +2620,7 @@ const (
|
|||
BPF_MAP_TYPE_CPUMAP = 0x10
|
||||
BPF_MAP_TYPE_XSKMAP = 0x11
|
||||
BPF_MAP_TYPE_SOCKHASH = 0x12
|
||||
BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 0x13
|
||||
BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
|
||||
BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
|
||||
BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
|
||||
|
@ -2620,6 +2631,10 @@ const (
|
|||
BPF_MAP_TYPE_STRUCT_OPS = 0x1a
|
||||
BPF_MAP_TYPE_RINGBUF = 0x1b
|
||||
BPF_MAP_TYPE_INODE_STORAGE = 0x1c
|
||||
BPF_MAP_TYPE_TASK_STORAGE = 0x1d
|
||||
BPF_MAP_TYPE_BLOOM_FILTER = 0x1e
|
||||
BPF_MAP_TYPE_USER_RINGBUF = 0x1f
|
||||
BPF_MAP_TYPE_CGRP_STORAGE = 0x20
|
||||
BPF_PROG_TYPE_UNSPEC = 0x0
|
||||
BPF_PROG_TYPE_SOCKET_FILTER = 0x1
|
||||
BPF_PROG_TYPE_KPROBE = 0x2
|
||||
|
@ -2651,6 +2666,7 @@ const (
|
|||
BPF_PROG_TYPE_EXT = 0x1c
|
||||
BPF_PROG_TYPE_LSM = 0x1d
|
||||
BPF_PROG_TYPE_SK_LOOKUP = 0x1e
|
||||
BPF_PROG_TYPE_SYSCALL = 0x1f
|
||||
BPF_CGROUP_INET_INGRESS = 0x0
|
||||
BPF_CGROUP_INET_EGRESS = 0x1
|
||||
BPF_CGROUP_INET_SOCK_CREATE = 0x2
|
||||
|
@ -2689,6 +2705,12 @@ const (
|
|||
BPF_XDP_CPUMAP = 0x23
|
||||
BPF_SK_LOOKUP = 0x24
|
||||
BPF_XDP = 0x25
|
||||
BPF_SK_SKB_VERDICT = 0x26
|
||||
BPF_SK_REUSEPORT_SELECT = 0x27
|
||||
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 0x28
|
||||
BPF_PERF_EVENT = 0x29
|
||||
BPF_TRACE_KPROBE_MULTI = 0x2a
|
||||
BPF_LSM_CGROUP = 0x2b
|
||||
BPF_LINK_TYPE_UNSPEC = 0x0
|
||||
BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1
|
||||
BPF_LINK_TYPE_TRACING = 0x2
|
||||
|
@ -2696,6 +2718,9 @@ const (
|
|||
BPF_LINK_TYPE_ITER = 0x4
|
||||
BPF_LINK_TYPE_NETNS = 0x5
|
||||
BPF_LINK_TYPE_XDP = 0x6
|
||||
BPF_LINK_TYPE_PERF_EVENT = 0x7
|
||||
BPF_LINK_TYPE_KPROBE_MULTI = 0x8
|
||||
BPF_LINK_TYPE_STRUCT_OPS = 0x9
|
||||
BPF_ANY = 0x0
|
||||
BPF_NOEXIST = 0x1
|
||||
BPF_EXIST = 0x2
|
||||
|
@ -2733,6 +2758,7 @@ const (
|
|||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_DONT_FRAGMENT = 0x4
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_TUNINFO_FLAGS = 0x10
|
||||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_CURRENT_CPU = 0xffffffff
|
||||
BPF_F_CTXLEN_MASK = 0xfffff00000000
|
||||
|
@ -2747,6 +2773,7 @@ const (
|
|||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20
|
||||
BPF_F_ADJ_ROOM_ENCAP_L2_ETH = 0x40
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
|
@ -2771,10 +2798,16 @@ const (
|
|||
BPF_LWT_ENCAP_SEG6 = 0x0
|
||||
BPF_LWT_ENCAP_SEG6_INLINE = 0x1
|
||||
BPF_LWT_ENCAP_IP = 0x2
|
||||
BPF_F_BPRM_SECUREEXEC = 0x1
|
||||
BPF_F_BROADCAST = 0x8
|
||||
BPF_F_EXCLUDE_INGRESS = 0x10
|
||||
BPF_SKB_TSTAMP_UNSPEC = 0x0
|
||||
BPF_SKB_TSTAMP_DELIVERY_MONO = 0x1
|
||||
BPF_OK = 0x0
|
||||
BPF_DROP = 0x2
|
||||
BPF_REDIRECT = 0x7
|
||||
BPF_LWT_REROUTE = 0x80
|
||||
BPF_FLOW_DISSECTOR_CONTINUE = 0x81
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
|
||||
|
@ -2838,6 +2871,10 @@ const (
|
|||
BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
|
||||
BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
|
||||
BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
|
||||
BPF_MTU_CHK_SEGS = 0x1
|
||||
BPF_MTU_CHK_RET_SUCCESS = 0x0
|
||||
BPF_MTU_CHK_RET_FRAG_NEEDED = 0x1
|
||||
BPF_MTU_CHK_RET_SEGS_TOOBIG = 0x2
|
||||
BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
|
||||
BPF_FD_TYPE_TRACEPOINT = 0x1
|
||||
BPF_FD_TYPE_KPROBE = 0x2
|
||||
|
@ -2847,6 +2884,19 @@ const (
|
|||
BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
|
||||
BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
|
||||
BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
|
||||
BPF_CORE_FIELD_BYTE_OFFSET = 0x0
|
||||
BPF_CORE_FIELD_BYTE_SIZE = 0x1
|
||||
BPF_CORE_FIELD_EXISTS = 0x2
|
||||
BPF_CORE_FIELD_SIGNED = 0x3
|
||||
BPF_CORE_FIELD_LSHIFT_U64 = 0x4
|
||||
BPF_CORE_FIELD_RSHIFT_U64 = 0x5
|
||||
BPF_CORE_TYPE_ID_LOCAL = 0x6
|
||||
BPF_CORE_TYPE_ID_TARGET = 0x7
|
||||
BPF_CORE_TYPE_EXISTS = 0x8
|
||||
BPF_CORE_TYPE_SIZE = 0x9
|
||||
BPF_CORE_ENUMVAL_EXISTS = 0xa
|
||||
BPF_CORE_ENUMVAL_VALUE = 0xb
|
||||
BPF_CORE_TYPE_MATCHES = 0xc
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3605,7 +3655,7 @@ const (
|
|||
ETHTOOL_MSG_PSE_GET = 0x24
|
||||
ETHTOOL_MSG_PSE_SET = 0x25
|
||||
ETHTOOL_MSG_RSS_GET = 0x26
|
||||
ETHTOOL_MSG_USER_MAX = 0x26
|
||||
ETHTOOL_MSG_USER_MAX = 0x2b
|
||||
ETHTOOL_MSG_KERNEL_NONE = 0x0
|
||||
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
|
||||
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
|
||||
|
@ -3645,7 +3695,7 @@ const (
|
|||
ETHTOOL_MSG_MODULE_NTF = 0x24
|
||||
ETHTOOL_MSG_PSE_GET_REPLY = 0x25
|
||||
ETHTOOL_MSG_RSS_GET_REPLY = 0x26
|
||||
ETHTOOL_MSG_KERNEL_MAX = 0x26
|
||||
ETHTOOL_MSG_KERNEL_MAX = 0x2b
|
||||
ETHTOOL_A_HEADER_UNSPEC = 0x0
|
||||
ETHTOOL_A_HEADER_DEV_INDEX = 0x1
|
||||
ETHTOOL_A_HEADER_DEV_NAME = 0x2
|
||||
|
@ -3749,7 +3799,7 @@ const (
|
|||
ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb
|
||||
ETHTOOL_A_RINGS_CQE_SIZE = 0xc
|
||||
ETHTOOL_A_RINGS_TX_PUSH = 0xd
|
||||
ETHTOOL_A_RINGS_MAX = 0xd
|
||||
ETHTOOL_A_RINGS_MAX = 0x10
|
||||
ETHTOOL_A_CHANNELS_UNSPEC = 0x0
|
||||
ETHTOOL_A_CHANNELS_HEADER = 0x1
|
||||
ETHTOOL_A_CHANNELS_RX_MAX = 0x2
|
||||
|
@ -3787,14 +3837,14 @@ const (
|
|||
ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17
|
||||
ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18
|
||||
ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19
|
||||
ETHTOOL_A_COALESCE_MAX = 0x19
|
||||
ETHTOOL_A_COALESCE_MAX = 0x1c
|
||||
ETHTOOL_A_PAUSE_UNSPEC = 0x0
|
||||
ETHTOOL_A_PAUSE_HEADER = 0x1
|
||||
ETHTOOL_A_PAUSE_AUTONEG = 0x2
|
||||
ETHTOOL_A_PAUSE_RX = 0x3
|
||||
ETHTOOL_A_PAUSE_TX = 0x4
|
||||
ETHTOOL_A_PAUSE_STATS = 0x5
|
||||
ETHTOOL_A_PAUSE_MAX = 0x5
|
||||
ETHTOOL_A_PAUSE_MAX = 0x6
|
||||
ETHTOOL_A_PAUSE_STAT_UNSPEC = 0x0
|
||||
ETHTOOL_A_PAUSE_STAT_PAD = 0x1
|
||||
ETHTOOL_A_PAUSE_STAT_TX_FRAMES = 0x2
|
||||
|
@ -4444,7 +4494,7 @@ const (
|
|||
NL80211_ATTR_MAC_HINT = 0xc8
|
||||
NL80211_ATTR_MAC_MASK = 0xd7
|
||||
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
|
||||
NL80211_ATTR_MAX = 0x141
|
||||
NL80211_ATTR_MAX = 0x145
|
||||
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
|
||||
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
|
||||
NL80211_ATTR_MAX_MATCH_SETS = 0x85
|
||||
|
@ -4673,7 +4723,7 @@ const (
|
|||
NL80211_BAND_ATTR_HT_CAPA = 0x4
|
||||
NL80211_BAND_ATTR_HT_MCS_SET = 0x3
|
||||
NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
|
||||
NL80211_BAND_ATTR_MAX = 0xb
|
||||
NL80211_BAND_ATTR_MAX = 0xd
|
||||
NL80211_BAND_ATTR_RATES = 0x2
|
||||
NL80211_BAND_ATTR_VHT_CAPA = 0x8
|
||||
NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
|
||||
|
@ -4814,7 +4864,7 @@ const (
|
|||
NL80211_CMD_LEAVE_IBSS = 0x2c
|
||||
NL80211_CMD_LEAVE_MESH = 0x45
|
||||
NL80211_CMD_LEAVE_OCB = 0x6d
|
||||
NL80211_CMD_MAX = 0x98
|
||||
NL80211_CMD_MAX = 0x99
|
||||
NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
|
||||
NL80211_CMD_MODIFY_LINK_STA = 0x97
|
||||
NL80211_CMD_NAN_MATCH = 0x78
|
||||
|
@ -5795,6 +5845,8 @@ const (
|
|||
TUN_F_TSO6 = 0x4
|
||||
TUN_F_TSO_ECN = 0x8
|
||||
TUN_F_UFO = 0x10
|
||||
TUN_F_USO4 = 0x20
|
||||
TUN_F_USO6 = 0x40
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5804,9 +5856,10 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
VIRTIO_NET_HDR_GSO_NONE = 0x0
|
||||
VIRTIO_NET_HDR_GSO_TCPV4 = 0x1
|
||||
VIRTIO_NET_HDR_GSO_UDP = 0x3
|
||||
VIRTIO_NET_HDR_GSO_TCPV6 = 0x4
|
||||
VIRTIO_NET_HDR_GSO_ECN = 0x80
|
||||
VIRTIO_NET_HDR_GSO_NONE = 0x0
|
||||
VIRTIO_NET_HDR_GSO_TCPV4 = 0x1
|
||||
VIRTIO_NET_HDR_GSO_UDP = 0x3
|
||||
VIRTIO_NET_HDR_GSO_TCPV6 = 0x4
|
||||
VIRTIO_NET_HDR_GSO_UDP_L4 = 0x5
|
||||
VIRTIO_NET_HDR_GSO_ECN = 0x80
|
||||
)
|
||||
|
|
|
@ -337,6 +337,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
|
|
@ -350,6 +350,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -328,6 +328,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
|
|
@ -329,6 +329,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -330,6 +330,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -333,6 +333,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
|
|
@ -332,6 +332,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -332,6 +332,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -333,6 +333,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
|
|
@ -340,6 +340,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
|
|
@ -339,6 +339,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -339,6 +339,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -357,6 +357,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -352,6 +352,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -334,6 +334,8 @@ type Taskstats struct {
|
|||
Ac_exe_inode uint64
|
||||
Wpcopy_count uint64
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
|
|
@ -37,14 +37,14 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) {
|
|||
return nil, err
|
||||
}
|
||||
defer DestroyEnvironmentBlock(block)
|
||||
blockp := uintptr(unsafe.Pointer(block))
|
||||
blockp := unsafe.Pointer(block)
|
||||
for {
|
||||
entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp)))
|
||||
entry := UTF16PtrToString((*uint16)(blockp))
|
||||
if len(entry) == 0 {
|
||||
break
|
||||
}
|
||||
env = append(env, entry)
|
||||
blockp += 2 * (uintptr(len(entry)) + 1)
|
||||
blockp = unsafe.Add(blockp, 2*(len(entry)+1))
|
||||
}
|
||||
return env, nil
|
||||
}
|
||||
|
|
|
@ -95,12 +95,17 @@ func ComposeCommandLine(args []string) string {
|
|||
// DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv,
|
||||
// as gathered from GetCommandLine, QUERY_SERVICE_CONFIG's BinaryPathName argument, or elsewhere that
|
||||
// command lines are passed around.
|
||||
// DecomposeCommandLine returns error if commandLine contains NUL.
|
||||
func DecomposeCommandLine(commandLine string) ([]string, error) {
|
||||
if len(commandLine) == 0 {
|
||||
return []string{}, nil
|
||||
}
|
||||
utf16CommandLine, err := UTF16FromString(commandLine)
|
||||
if err != nil {
|
||||
return nil, errorspkg.New("string with NUL passed to DecomposeCommandLine")
|
||||
}
|
||||
var argc int32
|
||||
argv, err := CommandLineToArgv(StringToUTF16Ptr(commandLine), &argc)
|
||||
argv, err := CommandLineToArgv(&utf16CommandLine[0], &argc)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -141,6 +141,12 @@ const (
|
|||
SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1
|
||||
)
|
||||
|
||||
type ENUM_SERVICE_STATUS struct {
|
||||
ServiceName *uint16
|
||||
DisplayName *uint16
|
||||
ServiceStatus SERVICE_STATUS
|
||||
}
|
||||
|
||||
type SERVICE_STATUS struct {
|
||||
ServiceType uint32
|
||||
CurrentState uint32
|
||||
|
@ -212,6 +218,10 @@ type SERVICE_FAILURE_ACTIONS struct {
|
|||
Actions *SC_ACTION
|
||||
}
|
||||
|
||||
type SERVICE_FAILURE_ACTIONS_FLAG struct {
|
||||
FailureActionsOnNonCrashFailures int32
|
||||
}
|
||||
|
||||
type SC_ACTION struct {
|
||||
Type uint32
|
||||
Delay uint32
|
||||
|
@ -245,3 +255,4 @@ type QUERY_SERVICE_LOCK_STATUS struct {
|
|||
//sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
|
||||
//sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
|
||||
//sys QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation?
|
||||
//sys EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) = advapi32.EnumDependentServicesW
|
||||
|
|
|
@ -140,3 +140,30 @@ func (s *Service) RecoveryCommand() (string, error) {
|
|||
p := (*windows.SERVICE_FAILURE_ACTIONS)(unsafe.Pointer(&b[0]))
|
||||
return windows.UTF16PtrToString(p.Command), nil
|
||||
}
|
||||
|
||||
// SetRecoveryActionsOnNonCrashFailures sets the failure actions flag. If the
|
||||
// flag is set to false, recovery actions will only be performed if the service
|
||||
// terminates without reporting a status of SERVICE_STOPPED. If the flag is set
|
||||
// to true, recovery actions are also perfomed if the service stops with a
|
||||
// nonzero exit code.
|
||||
func (s *Service) SetRecoveryActionsOnNonCrashFailures(flag bool) error {
|
||||
var setting windows.SERVICE_FAILURE_ACTIONS_FLAG
|
||||
if flag {
|
||||
setting.FailureActionsOnNonCrashFailures = 1
|
||||
}
|
||||
return windows.ChangeServiceConfig2(s.Handle, windows.SERVICE_CONFIG_FAILURE_ACTIONS_FLAG, (*byte)(unsafe.Pointer(&setting)))
|
||||
}
|
||||
|
||||
// RecoveryActionsOnNonCrashFailures returns the current value of the failure
|
||||
// actions flag. If the flag is set to false, recovery actions will only be
|
||||
// performed if the service terminates without reporting a status of
|
||||
// SERVICE_STOPPED. If the flag is set to true, recovery actions are also
|
||||
// perfomed if the service stops with a nonzero exit code.
|
||||
func (s *Service) RecoveryActionsOnNonCrashFailures() (bool, error) {
|
||||
b, err := s.queryServiceConfig2(windows.SERVICE_CONFIG_FAILURE_ACTIONS_FLAG)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
p := (*windows.SERVICE_FAILURE_ACTIONS_FLAG)(unsafe.Pointer(&b[0]))
|
||||
return p.FailureActionsOnNonCrashFailures != 0, nil
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@ import (
|
|||
"golang.org/x/sys/windows/svc"
|
||||
)
|
||||
|
||||
// TODO(brainman): Use EnumDependentServices to enumerate dependent services.
|
||||
|
||||
// Service is used to access Windows service.
|
||||
type Service struct {
|
||||
Name string
|
||||
|
@ -47,17 +45,25 @@ func (s *Service) Start(args ...string) error {
|
|||
return windows.StartService(s.Handle, uint32(len(args)), p)
|
||||
}
|
||||
|
||||
// Control sends state change request c to the service s.
|
||||
// Control sends state change request c to the service s. It returns the most
|
||||
// recent status the service reported to the service control manager, and an
|
||||
// error if the state change request was not accepted.
|
||||
// Note that the returned service status is only set if the status change
|
||||
// request succeeded, or if it failed with error ERROR_INVALID_SERVICE_CONTROL,
|
||||
// ERROR_SERVICE_CANNOT_ACCEPT_CTRL, or ERROR_SERVICE_NOT_ACTIVE.
|
||||
func (s *Service) Control(c svc.Cmd) (svc.Status, error) {
|
||||
var t windows.SERVICE_STATUS
|
||||
err := windows.ControlService(s.Handle, uint32(c), &t)
|
||||
if err != nil {
|
||||
if err != nil &&
|
||||
err != windows.ERROR_INVALID_SERVICE_CONTROL &&
|
||||
err != windows.ERROR_SERVICE_CANNOT_ACCEPT_CTRL &&
|
||||
err != windows.ERROR_SERVICE_NOT_ACTIVE {
|
||||
return svc.Status{}, err
|
||||
}
|
||||
return svc.Status{
|
||||
State: svc.State(t.CurrentState),
|
||||
Accepts: svc.Accepted(t.ControlsAccepted),
|
||||
}, nil
|
||||
}, err
|
||||
}
|
||||
|
||||
// Query returns current status of service s.
|
||||
|
@ -76,3 +82,44 @@ func (s *Service) Query() (svc.Status, error) {
|
|||
ServiceSpecificExitCode: t.ServiceSpecificExitCode,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ListDependentServices returns the names of the services dependent on service s, which match the given status.
|
||||
func (s *Service) ListDependentServices(status svc.ActivityStatus) ([]string, error) {
|
||||
var bytesNeeded, returnedServiceCount uint32
|
||||
var services []windows.ENUM_SERVICE_STATUS
|
||||
for {
|
||||
var servicesPtr *windows.ENUM_SERVICE_STATUS
|
||||
if len(services) > 0 {
|
||||
servicesPtr = &services[0]
|
||||
}
|
||||
allocatedBytes := uint32(len(services)) * uint32(unsafe.Sizeof(windows.ENUM_SERVICE_STATUS{}))
|
||||
err := windows.EnumDependentServices(s.Handle, uint32(status), servicesPtr, allocatedBytes, &bytesNeeded,
|
||||
&returnedServiceCount)
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
if err != syscall.ERROR_MORE_DATA {
|
||||
return nil, err
|
||||
}
|
||||
if bytesNeeded <= allocatedBytes {
|
||||
return nil, err
|
||||
}
|
||||
// ERROR_MORE_DATA indicates the provided buffer was too small, run the call again after resizing the buffer
|
||||
requiredSliceLen := bytesNeeded / uint32(unsafe.Sizeof(windows.ENUM_SERVICE_STATUS{}))
|
||||
if bytesNeeded%uint32(unsafe.Sizeof(windows.ENUM_SERVICE_STATUS{})) != 0 {
|
||||
requiredSliceLen += 1
|
||||
}
|
||||
services = make([]windows.ENUM_SERVICE_STATUS, requiredSliceLen)
|
||||
}
|
||||
if returnedServiceCount == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// The slice mutated by EnumDependentServices may have a length greater than returnedServiceCount, any elements
|
||||
// past that should be ignored.
|
||||
var dependents []string
|
||||
for i := 0; i < int(returnedServiceCount); i++ {
|
||||
dependents = append(dependents, windows.UTF16PtrToString(services[i].ServiceName))
|
||||
}
|
||||
return dependents, nil
|
||||
}
|
||||
|
|
|
@ -68,6 +68,15 @@ const (
|
|||
AcceptPreShutdown = Accepted(windows.SERVICE_ACCEPT_PRESHUTDOWN)
|
||||
)
|
||||
|
||||
// ActivityStatus allows for services to be selected based on active and inactive categories of service state.
|
||||
type ActivityStatus uint32
|
||||
|
||||
const (
|
||||
Active = ActivityStatus(windows.SERVICE_ACTIVE)
|
||||
Inactive = ActivityStatus(windows.SERVICE_INACTIVE)
|
||||
AnyActivity = ActivityStatus(windows.SERVICE_STATE_ALL)
|
||||
)
|
||||
|
||||
// Status combines State and Accepted commands to fully describe running service.
|
||||
type Status struct {
|
||||
State State
|
||||
|
|
|
@ -405,7 +405,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
|||
//sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
|
||||
|
||||
// Process Status API (PSAPI)
|
||||
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
|
||||
//sys enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
|
||||
//sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
|
||||
//sys EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
|
||||
//sys GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
|
||||
|
@ -1354,6 +1354,17 @@ func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) {
|
|||
return syscall.EWINDOWS
|
||||
}
|
||||
|
||||
func EnumProcesses(processIds []uint32, bytesReturned *uint32) error {
|
||||
// EnumProcesses syscall expects the size parameter to be in bytes, but the code generated with mksyscall uses
|
||||
// the length of the processIds slice instead. Hence, this wrapper function is added to fix the discrepancy.
|
||||
var p *uint32
|
||||
if len(processIds) > 0 {
|
||||
p = &processIds[0]
|
||||
}
|
||||
size := uint32(len(processIds) * 4)
|
||||
return enumProcesses(p, size, bytesReturned)
|
||||
}
|
||||
|
||||
func Getpid() (pid int) { return int(GetCurrentProcessId()) }
|
||||
|
||||
func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {
|
||||
|
|
|
@ -2220,15 +2220,19 @@ type JOBOBJECT_BASIC_UI_RESTRICTIONS struct {
|
|||
}
|
||||
|
||||
const (
|
||||
// JobObjectInformationClass
|
||||
// JobObjectInformationClass for QueryInformationJobObject and SetInformationJobObject
|
||||
JobObjectAssociateCompletionPortInformation = 7
|
||||
JobObjectBasicAccountingInformation = 1
|
||||
JobObjectBasicAndIoAccountingInformation = 8
|
||||
JobObjectBasicLimitInformation = 2
|
||||
JobObjectBasicProcessIdList = 3
|
||||
JobObjectBasicUIRestrictions = 4
|
||||
JobObjectCpuRateControlInformation = 15
|
||||
JobObjectEndOfJobTimeInformation = 6
|
||||
JobObjectExtendedLimitInformation = 9
|
||||
JobObjectGroupInformation = 11
|
||||
JobObjectGroupInformationEx = 14
|
||||
JobObjectLimitViolationInformation = 13
|
||||
JobObjectLimitViolationInformation2 = 34
|
||||
JobObjectNetRateControlInformation = 32
|
||||
JobObjectNotificationLimitInformation = 12
|
||||
|
|
|
@ -86,6 +86,7 @@ var (
|
|||
procDeleteService = modadvapi32.NewProc("DeleteService")
|
||||
procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
|
||||
procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
|
||||
procEnumDependentServicesW = modadvapi32.NewProc("EnumDependentServicesW")
|
||||
procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
|
||||
procEqualSid = modadvapi32.NewProc("EqualSid")
|
||||
procFreeSid = modadvapi32.NewProc("FreeSid")
|
||||
|
@ -734,6 +735,14 @@ func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes
|
|||
return
|
||||
}
|
||||
|
||||
func EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procEnumDependentServicesW.Addr(), 6, uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)))
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
|
||||
r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
|
||||
if r1 == 0 {
|
||||
|
@ -3507,12 +3516,8 @@ func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *u
|
|||
return
|
||||
}
|
||||
|
||||
func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
|
||||
var _p0 *uint32
|
||||
if len(processIds) > 0 {
|
||||
_p0 = &processIds[0]
|
||||
}
|
||||
r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
|
||||
func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned)))
|
||||
if r1 == 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ func restore(fd int, state *State) error {
|
|||
func getSize(fd int) (width, height int, err error) {
|
||||
ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
|
||||
if err != nil {
|
||||
return -1, -1, err
|
||||
return 0, 0, err
|
||||
}
|
||||
return int(ws.Col), int(ws.Row), nil
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||
|
||||
//go:build go1.16
|
||||
// +build go1.16
|
||||
//go:build go1.16 && !go1.21
|
||||
// +build go1.16,!go1.21
|
||||
|
||||
package cases
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -790,226 +790,226 @@ const (
|
|||
|
||||
var coreTags = []language.CompactCoreInfo{ // 773 elements
|
||||
// Entry 0 - 1F
|
||||
0x00000000, 0x01600000, 0x016000d2, 0x01600161,
|
||||
0x01c00000, 0x01c00052, 0x02100000, 0x02100080,
|
||||
0x02700000, 0x0270006f, 0x03a00000, 0x03a00001,
|
||||
0x03a00023, 0x03a00039, 0x03a00062, 0x03a00067,
|
||||
0x03a0006b, 0x03a0006c, 0x03a0006d, 0x03a00097,
|
||||
0x03a0009b, 0x03a000a1, 0x03a000a8, 0x03a000ac,
|
||||
0x03a000b0, 0x03a000b9, 0x03a000ba, 0x03a000c9,
|
||||
0x03a000e1, 0x03a000ed, 0x03a000f3, 0x03a00108,
|
||||
0x00000000, 0x01600000, 0x016000d3, 0x01600162,
|
||||
0x01c00000, 0x01c00052, 0x02100000, 0x02100081,
|
||||
0x02700000, 0x02700070, 0x03a00000, 0x03a00001,
|
||||
0x03a00023, 0x03a00039, 0x03a00063, 0x03a00068,
|
||||
0x03a0006c, 0x03a0006d, 0x03a0006e, 0x03a00098,
|
||||
0x03a0009c, 0x03a000a2, 0x03a000a9, 0x03a000ad,
|
||||
0x03a000b1, 0x03a000ba, 0x03a000bb, 0x03a000ca,
|
||||
0x03a000e2, 0x03a000ee, 0x03a000f4, 0x03a00109,
|
||||
// Entry 20 - 3F
|
||||
0x03a0010b, 0x03a00115, 0x03a00117, 0x03a0011c,
|
||||
0x03a00120, 0x03a00128, 0x03a0015e, 0x04000000,
|
||||
0x04300000, 0x04300099, 0x04400000, 0x0440012f,
|
||||
0x04800000, 0x0480006e, 0x05800000, 0x05820000,
|
||||
0x05820032, 0x0585a000, 0x0585a032, 0x05e00000,
|
||||
0x03a0010c, 0x03a00116, 0x03a00118, 0x03a0011d,
|
||||
0x03a00121, 0x03a00129, 0x03a0015f, 0x04000000,
|
||||
0x04300000, 0x0430009a, 0x04400000, 0x04400130,
|
||||
0x04800000, 0x0480006f, 0x05800000, 0x05820000,
|
||||
0x05820032, 0x0585b000, 0x0585b032, 0x05e00000,
|
||||
0x05e00052, 0x07100000, 0x07100047, 0x07500000,
|
||||
0x07500162, 0x07900000, 0x0790012f, 0x07e00000,
|
||||
0x07e00038, 0x08200000, 0x0a000000, 0x0a0000c3,
|
||||
0x07500163, 0x07900000, 0x07900130, 0x07e00000,
|
||||
0x07e00038, 0x08200000, 0x0a000000, 0x0a0000c4,
|
||||
// Entry 40 - 5F
|
||||
0x0a500000, 0x0a500035, 0x0a500099, 0x0a900000,
|
||||
0x0a900053, 0x0a900099, 0x0b200000, 0x0b200078,
|
||||
0x0b500000, 0x0b500099, 0x0b700000, 0x0b720000,
|
||||
0x0b720033, 0x0b75a000, 0x0b75a033, 0x0d700000,
|
||||
0x0d700022, 0x0d70006e, 0x0d700078, 0x0d70009e,
|
||||
0x0db00000, 0x0db00035, 0x0db00099, 0x0dc00000,
|
||||
0x0dc00106, 0x0df00000, 0x0df00131, 0x0e500000,
|
||||
0x0e500135, 0x0e900000, 0x0e90009b, 0x0e90009c,
|
||||
0x0a500000, 0x0a500035, 0x0a50009a, 0x0a900000,
|
||||
0x0a900053, 0x0a90009a, 0x0b200000, 0x0b200079,
|
||||
0x0b500000, 0x0b50009a, 0x0b700000, 0x0b720000,
|
||||
0x0b720033, 0x0b75b000, 0x0b75b033, 0x0d700000,
|
||||
0x0d700022, 0x0d70006f, 0x0d700079, 0x0d70009f,
|
||||
0x0db00000, 0x0db00035, 0x0db0009a, 0x0dc00000,
|
||||
0x0dc00107, 0x0df00000, 0x0df00132, 0x0e500000,
|
||||
0x0e500136, 0x0e900000, 0x0e90009c, 0x0e90009d,
|
||||
// Entry 60 - 7F
|
||||
0x0fa00000, 0x0fa0005e, 0x0fe00000, 0x0fe00106,
|
||||
0x10000000, 0x1000007b, 0x10100000, 0x10100063,
|
||||
0x10100082, 0x10800000, 0x108000a4, 0x10d00000,
|
||||
0x10d0002e, 0x10d00036, 0x10d0004e, 0x10d00060,
|
||||
0x10d0009e, 0x10d000b2, 0x10d000b7, 0x11700000,
|
||||
0x117000d4, 0x11f00000, 0x11f00060, 0x12400000,
|
||||
0x12400052, 0x12800000, 0x12b00000, 0x12b00114,
|
||||
0x12d00000, 0x12d00043, 0x12f00000, 0x12f000a4,
|
||||
0x0fa00000, 0x0fa0005f, 0x0fe00000, 0x0fe00107,
|
||||
0x10000000, 0x1000007c, 0x10100000, 0x10100064,
|
||||
0x10100083, 0x10800000, 0x108000a5, 0x10d00000,
|
||||
0x10d0002e, 0x10d00036, 0x10d0004e, 0x10d00061,
|
||||
0x10d0009f, 0x10d000b3, 0x10d000b8, 0x11700000,
|
||||
0x117000d5, 0x11f00000, 0x11f00061, 0x12400000,
|
||||
0x12400052, 0x12800000, 0x12b00000, 0x12b00115,
|
||||
0x12d00000, 0x12d00043, 0x12f00000, 0x12f000a5,
|
||||
// Entry 80 - 9F
|
||||
0x13000000, 0x13000080, 0x13000122, 0x13600000,
|
||||
0x1360005d, 0x13600087, 0x13900000, 0x13900001,
|
||||
0x13000000, 0x13000081, 0x13000123, 0x13600000,
|
||||
0x1360005e, 0x13600088, 0x13900000, 0x13900001,
|
||||
0x1390001a, 0x13900025, 0x13900026, 0x1390002d,
|
||||
0x1390002e, 0x1390002f, 0x13900034, 0x13900036,
|
||||
0x1390003a, 0x1390003d, 0x13900042, 0x13900046,
|
||||
0x13900048, 0x13900049, 0x1390004a, 0x1390004e,
|
||||
0x13900050, 0x13900052, 0x1390005c, 0x1390005d,
|
||||
0x13900060, 0x13900061, 0x13900063, 0x13900064,
|
||||
0x13900050, 0x13900052, 0x1390005d, 0x1390005e,
|
||||
0x13900061, 0x13900062, 0x13900064, 0x13900065,
|
||||
// Entry A0 - BF
|
||||
0x1390006d, 0x13900072, 0x13900073, 0x13900074,
|
||||
0x13900075, 0x1390007b, 0x1390007c, 0x1390007f,
|
||||
0x13900080, 0x13900081, 0x13900083, 0x1390008a,
|
||||
0x1390008c, 0x1390008d, 0x13900096, 0x13900097,
|
||||
0x13900098, 0x13900099, 0x1390009a, 0x1390009f,
|
||||
0x139000a0, 0x139000a4, 0x139000a7, 0x139000a9,
|
||||
0x139000ad, 0x139000b1, 0x139000b4, 0x139000b5,
|
||||
0x139000bf, 0x139000c0, 0x139000c6, 0x139000c7,
|
||||
0x1390006e, 0x13900073, 0x13900074, 0x13900075,
|
||||
0x13900076, 0x1390007c, 0x1390007d, 0x13900080,
|
||||
0x13900081, 0x13900082, 0x13900084, 0x1390008b,
|
||||
0x1390008d, 0x1390008e, 0x13900097, 0x13900098,
|
||||
0x13900099, 0x1390009a, 0x1390009b, 0x139000a0,
|
||||
0x139000a1, 0x139000a5, 0x139000a8, 0x139000aa,
|
||||
0x139000ae, 0x139000b2, 0x139000b5, 0x139000b6,
|
||||
0x139000c0, 0x139000c1, 0x139000c7, 0x139000c8,
|
||||
// Entry C0 - DF
|
||||
0x139000ca, 0x139000cb, 0x139000cc, 0x139000ce,
|
||||
0x139000d0, 0x139000d2, 0x139000d5, 0x139000d6,
|
||||
0x139000d9, 0x139000dd, 0x139000df, 0x139000e0,
|
||||
0x139000e6, 0x139000e7, 0x139000e8, 0x139000eb,
|
||||
0x139000ec, 0x139000f0, 0x13900107, 0x13900109,
|
||||
0x1390010a, 0x1390010b, 0x1390010c, 0x1390010d,
|
||||
0x1390010e, 0x1390010f, 0x13900112, 0x13900117,
|
||||
0x1390011b, 0x1390011d, 0x1390011f, 0x13900125,
|
||||
0x139000cb, 0x139000cc, 0x139000cd, 0x139000cf,
|
||||
0x139000d1, 0x139000d3, 0x139000d6, 0x139000d7,
|
||||
0x139000da, 0x139000de, 0x139000e0, 0x139000e1,
|
||||
0x139000e7, 0x139000e8, 0x139000e9, 0x139000ec,
|
||||
0x139000ed, 0x139000f1, 0x13900108, 0x1390010a,
|
||||
0x1390010b, 0x1390010c, 0x1390010d, 0x1390010e,
|
||||
0x1390010f, 0x13900110, 0x13900113, 0x13900118,
|
||||
0x1390011c, 0x1390011e, 0x13900120, 0x13900126,
|
||||
// Entry E0 - FF
|
||||
0x13900129, 0x1390012c, 0x1390012d, 0x1390012f,
|
||||
0x13900131, 0x13900133, 0x13900135, 0x13900139,
|
||||
0x1390013c, 0x1390013d, 0x1390013f, 0x13900142,
|
||||
0x13900161, 0x13900162, 0x13900164, 0x13c00000,
|
||||
0x1390012a, 0x1390012d, 0x1390012e, 0x13900130,
|
||||
0x13900132, 0x13900134, 0x13900136, 0x1390013a,
|
||||
0x1390013d, 0x1390013e, 0x13900140, 0x13900143,
|
||||
0x13900162, 0x13900163, 0x13900165, 0x13c00000,
|
||||
0x13c00001, 0x13e00000, 0x13e0001f, 0x13e0002c,
|
||||
0x13e0003f, 0x13e00041, 0x13e00048, 0x13e00051,
|
||||
0x13e00054, 0x13e00056, 0x13e00059, 0x13e00065,
|
||||
0x13e00068, 0x13e00069, 0x13e0006e, 0x13e00086,
|
||||
0x13e00054, 0x13e00057, 0x13e0005a, 0x13e00066,
|
||||
0x13e00069, 0x13e0006a, 0x13e0006f, 0x13e00087,
|
||||
// Entry 100 - 11F
|
||||
0x13e00089, 0x13e0008f, 0x13e00094, 0x13e000cf,
|
||||
0x13e000d8, 0x13e000e2, 0x13e000e4, 0x13e000e7,
|
||||
0x13e000ec, 0x13e000f1, 0x13e0011a, 0x13e00135,
|
||||
0x13e00136, 0x13e0013b, 0x14000000, 0x1400006a,
|
||||
0x14500000, 0x1450006e, 0x14600000, 0x14600052,
|
||||
0x14800000, 0x14800024, 0x1480009c, 0x14e00000,
|
||||
0x14e00052, 0x14e00084, 0x14e000c9, 0x14e00114,
|
||||
0x15100000, 0x15100072, 0x15300000, 0x153000e7,
|
||||
0x13e0008a, 0x13e00090, 0x13e00095, 0x13e000d0,
|
||||
0x13e000d9, 0x13e000e3, 0x13e000e5, 0x13e000e8,
|
||||
0x13e000ed, 0x13e000f2, 0x13e0011b, 0x13e00136,
|
||||
0x13e00137, 0x13e0013c, 0x14000000, 0x1400006b,
|
||||
0x14500000, 0x1450006f, 0x14600000, 0x14600052,
|
||||
0x14800000, 0x14800024, 0x1480009d, 0x14e00000,
|
||||
0x14e00052, 0x14e00085, 0x14e000ca, 0x14e00115,
|
||||
0x15100000, 0x15100073, 0x15300000, 0x153000e8,
|
||||
// Entry 120 - 13F
|
||||
0x15800000, 0x15800063, 0x15800076, 0x15e00000,
|
||||
0x15800000, 0x15800064, 0x15800077, 0x15e00000,
|
||||
0x15e00036, 0x15e00037, 0x15e0003a, 0x15e0003b,
|
||||
0x15e0003c, 0x15e00049, 0x15e0004b, 0x15e0004c,
|
||||
0x15e0004d, 0x15e0004e, 0x15e0004f, 0x15e00052,
|
||||
0x15e00062, 0x15e00067, 0x15e00078, 0x15e0007a,
|
||||
0x15e0007e, 0x15e00084, 0x15e00085, 0x15e00086,
|
||||
0x15e00091, 0x15e000a8, 0x15e000b7, 0x15e000ba,
|
||||
0x15e000bb, 0x15e000be, 0x15e000bf, 0x15e000c3,
|
||||
0x15e00063, 0x15e00068, 0x15e00079, 0x15e0007b,
|
||||
0x15e0007f, 0x15e00085, 0x15e00086, 0x15e00087,
|
||||
0x15e00092, 0x15e000a9, 0x15e000b8, 0x15e000bb,
|
||||
0x15e000bc, 0x15e000bf, 0x15e000c0, 0x15e000c4,
|
||||
// Entry 140 - 15F
|
||||
0x15e000c8, 0x15e000c9, 0x15e000cc, 0x15e000d3,
|
||||
0x15e000d4, 0x15e000e5, 0x15e000ea, 0x15e00102,
|
||||
0x15e00107, 0x15e0010a, 0x15e00114, 0x15e0011c,
|
||||
0x15e00120, 0x15e00122, 0x15e00128, 0x15e0013f,
|
||||
0x15e00140, 0x15e0015f, 0x16900000, 0x1690009e,
|
||||
0x16d00000, 0x16d000d9, 0x16e00000, 0x16e00096,
|
||||
0x17e00000, 0x17e0007b, 0x19000000, 0x1900006e,
|
||||
0x1a300000, 0x1a30004e, 0x1a300078, 0x1a3000b2,
|
||||
0x15e000c9, 0x15e000ca, 0x15e000cd, 0x15e000d4,
|
||||
0x15e000d5, 0x15e000e6, 0x15e000eb, 0x15e00103,
|
||||
0x15e00108, 0x15e0010b, 0x15e00115, 0x15e0011d,
|
||||
0x15e00121, 0x15e00123, 0x15e00129, 0x15e00140,
|
||||
0x15e00141, 0x15e00160, 0x16900000, 0x1690009f,
|
||||
0x16d00000, 0x16d000da, 0x16e00000, 0x16e00097,
|
||||
0x17e00000, 0x17e0007c, 0x19000000, 0x1900006f,
|
||||
0x1a300000, 0x1a30004e, 0x1a300079, 0x1a3000b3,
|
||||
// Entry 160 - 17F
|
||||
0x1a400000, 0x1a400099, 0x1a900000, 0x1ab00000,
|
||||
0x1ab000a4, 0x1ac00000, 0x1ac00098, 0x1b400000,
|
||||
0x1b400080, 0x1b4000d4, 0x1b4000d6, 0x1b800000,
|
||||
0x1b800135, 0x1bc00000, 0x1bc00097, 0x1be00000,
|
||||
0x1be00099, 0x1d100000, 0x1d100033, 0x1d100090,
|
||||
0x1d200000, 0x1d200060, 0x1d500000, 0x1d500092,
|
||||
0x1d700000, 0x1d700028, 0x1e100000, 0x1e100095,
|
||||
0x1e700000, 0x1e7000d6, 0x1ea00000, 0x1ea00053,
|
||||
0x1a400000, 0x1a40009a, 0x1a900000, 0x1ab00000,
|
||||
0x1ab000a5, 0x1ac00000, 0x1ac00099, 0x1b400000,
|
||||
0x1b400081, 0x1b4000d5, 0x1b4000d7, 0x1b800000,
|
||||
0x1b800136, 0x1bc00000, 0x1bc00098, 0x1be00000,
|
||||
0x1be0009a, 0x1d100000, 0x1d100033, 0x1d100091,
|
||||
0x1d200000, 0x1d200061, 0x1d500000, 0x1d500093,
|
||||
0x1d700000, 0x1d700028, 0x1e100000, 0x1e100096,
|
||||
0x1e700000, 0x1e7000d7, 0x1ea00000, 0x1ea00053,
|
||||
// Entry 180 - 19F
|
||||
0x1f300000, 0x1f500000, 0x1f800000, 0x1f80009d,
|
||||
0x1f900000, 0x1f90004e, 0x1f90009e, 0x1f900113,
|
||||
0x1f900138, 0x1fa00000, 0x1fb00000, 0x20000000,
|
||||
0x200000a2, 0x20300000, 0x20700000, 0x20700052,
|
||||
0x20800000, 0x20a00000, 0x20a0012f, 0x20e00000,
|
||||
0x20f00000, 0x21000000, 0x2100007d, 0x21200000,
|
||||
0x21200067, 0x21600000, 0x21700000, 0x217000a4,
|
||||
0x21f00000, 0x22300000, 0x2230012f, 0x22700000,
|
||||
0x1f300000, 0x1f500000, 0x1f800000, 0x1f80009e,
|
||||
0x1f900000, 0x1f90004e, 0x1f90009f, 0x1f900114,
|
||||
0x1f900139, 0x1fa00000, 0x1fb00000, 0x20000000,
|
||||
0x200000a3, 0x20300000, 0x20700000, 0x20700052,
|
||||
0x20800000, 0x20a00000, 0x20a00130, 0x20e00000,
|
||||
0x20f00000, 0x21000000, 0x2100007e, 0x21200000,
|
||||
0x21200068, 0x21600000, 0x21700000, 0x217000a5,
|
||||
0x21f00000, 0x22300000, 0x22300130, 0x22700000,
|
||||
// Entry 1A0 - 1BF
|
||||
0x2270005a, 0x23400000, 0x234000c3, 0x23900000,
|
||||
0x239000a4, 0x24200000, 0x242000ae, 0x24400000,
|
||||
0x24400052, 0x24500000, 0x24500082, 0x24600000,
|
||||
0x246000a4, 0x24a00000, 0x24a000a6, 0x25100000,
|
||||
0x25100099, 0x25400000, 0x254000aa, 0x254000ab,
|
||||
0x25600000, 0x25600099, 0x26a00000, 0x26a00099,
|
||||
0x26b00000, 0x26b0012f, 0x26d00000, 0x26d00052,
|
||||
0x26e00000, 0x26e00060, 0x27400000, 0x28100000,
|
||||
0x2270005b, 0x23400000, 0x234000c4, 0x23900000,
|
||||
0x239000a5, 0x24200000, 0x242000af, 0x24400000,
|
||||
0x24400052, 0x24500000, 0x24500083, 0x24600000,
|
||||
0x246000a5, 0x24a00000, 0x24a000a7, 0x25100000,
|
||||
0x2510009a, 0x25400000, 0x254000ab, 0x254000ac,
|
||||
0x25600000, 0x2560009a, 0x26a00000, 0x26a0009a,
|
||||
0x26b00000, 0x26b00130, 0x26d00000, 0x26d00052,
|
||||
0x26e00000, 0x26e00061, 0x27400000, 0x28100000,
|
||||
// Entry 1C0 - 1DF
|
||||
0x2810007b, 0x28a00000, 0x28a000a5, 0x29100000,
|
||||
0x2910012f, 0x29500000, 0x295000b7, 0x2a300000,
|
||||
0x2a300131, 0x2af00000, 0x2af00135, 0x2b500000,
|
||||
0x2810007c, 0x28a00000, 0x28a000a6, 0x29100000,
|
||||
0x29100130, 0x29500000, 0x295000b8, 0x2a300000,
|
||||
0x2a300132, 0x2af00000, 0x2af00136, 0x2b500000,
|
||||
0x2b50002a, 0x2b50004b, 0x2b50004c, 0x2b50004d,
|
||||
0x2b800000, 0x2b8000af, 0x2bf00000, 0x2bf0009b,
|
||||
0x2bf0009c, 0x2c000000, 0x2c0000b6, 0x2c200000,
|
||||
0x2c20004b, 0x2c400000, 0x2c4000a4, 0x2c500000,
|
||||
0x2c5000a4, 0x2c700000, 0x2c7000b8, 0x2d100000,
|
||||
0x2b800000, 0x2b8000b0, 0x2bf00000, 0x2bf0009c,
|
||||
0x2bf0009d, 0x2c000000, 0x2c0000b7, 0x2c200000,
|
||||
0x2c20004b, 0x2c400000, 0x2c4000a5, 0x2c500000,
|
||||
0x2c5000a5, 0x2c700000, 0x2c7000b9, 0x2d100000,
|
||||
// Entry 1E0 - 1FF
|
||||
0x2d1000a4, 0x2d10012f, 0x2e900000, 0x2e9000a4,
|
||||
0x2ed00000, 0x2ed000cc, 0x2f100000, 0x2f1000bf,
|
||||
0x2f200000, 0x2f2000d1, 0x2f400000, 0x2f400052,
|
||||
0x2ff00000, 0x2ff000c2, 0x30400000, 0x30400099,
|
||||
0x30b00000, 0x30b000c5, 0x31000000, 0x31b00000,
|
||||
0x31b00099, 0x31f00000, 0x31f0003e, 0x31f000d0,
|
||||
0x31f0010d, 0x32000000, 0x320000cb, 0x32500000,
|
||||
0x32500052, 0x33100000, 0x331000c4, 0x33a00000,
|
||||
0x2d1000a5, 0x2d100130, 0x2e900000, 0x2e9000a5,
|
||||
0x2ed00000, 0x2ed000cd, 0x2f100000, 0x2f1000c0,
|
||||
0x2f200000, 0x2f2000d2, 0x2f400000, 0x2f400052,
|
||||
0x2ff00000, 0x2ff000c3, 0x30400000, 0x3040009a,
|
||||
0x30b00000, 0x30b000c6, 0x31000000, 0x31b00000,
|
||||
0x31b0009a, 0x31f00000, 0x31f0003e, 0x31f000d1,
|
||||
0x31f0010e, 0x32000000, 0x320000cc, 0x32500000,
|
||||
0x32500052, 0x33100000, 0x331000c5, 0x33a00000,
|
||||
// Entry 200 - 21F
|
||||
0x33a0009c, 0x34100000, 0x34500000, 0x345000d2,
|
||||
0x34700000, 0x347000da, 0x34700110, 0x34e00000,
|
||||
0x34e00164, 0x35000000, 0x35000060, 0x350000d9,
|
||||
0x35100000, 0x35100099, 0x351000db, 0x36700000,
|
||||
0x36700030, 0x36700036, 0x36700040, 0x3670005b,
|
||||
0x367000d9, 0x36700116, 0x3670011b, 0x36800000,
|
||||
0x36800052, 0x36a00000, 0x36a000da, 0x36c00000,
|
||||
0x33a0009d, 0x34100000, 0x34500000, 0x345000d3,
|
||||
0x34700000, 0x347000db, 0x34700111, 0x34e00000,
|
||||
0x34e00165, 0x35000000, 0x35000061, 0x350000da,
|
||||
0x35100000, 0x3510009a, 0x351000dc, 0x36700000,
|
||||
0x36700030, 0x36700036, 0x36700040, 0x3670005c,
|
||||
0x367000da, 0x36700117, 0x3670011c, 0x36800000,
|
||||
0x36800052, 0x36a00000, 0x36a000db, 0x36c00000,
|
||||
0x36c00052, 0x36f00000, 0x37500000, 0x37600000,
|
||||
// Entry 220 - 23F
|
||||
0x37a00000, 0x38000000, 0x38000117, 0x38700000,
|
||||
0x38900000, 0x38900131, 0x39000000, 0x3900006f,
|
||||
0x390000a4, 0x39500000, 0x39500099, 0x39800000,
|
||||
0x3980007d, 0x39800106, 0x39d00000, 0x39d05000,
|
||||
0x39d050e8, 0x39d36000, 0x39d36099, 0x3a100000,
|
||||
0x3b300000, 0x3b3000e9, 0x3bd00000, 0x3bd00001,
|
||||
0x37a00000, 0x38000000, 0x38000118, 0x38700000,
|
||||
0x38900000, 0x38900132, 0x39000000, 0x39000070,
|
||||
0x390000a5, 0x39500000, 0x3950009a, 0x39800000,
|
||||
0x3980007e, 0x39800107, 0x39d00000, 0x39d05000,
|
||||
0x39d050e9, 0x39d36000, 0x39d3609a, 0x3a100000,
|
||||
0x3b300000, 0x3b3000ea, 0x3bd00000, 0x3bd00001,
|
||||
0x3be00000, 0x3be00024, 0x3c000000, 0x3c00002a,
|
||||
0x3c000041, 0x3c00004e, 0x3c00005a, 0x3c000086,
|
||||
0x3c000041, 0x3c00004e, 0x3c00005b, 0x3c000087,
|
||||
// Entry 240 - 25F
|
||||
0x3c00008b, 0x3c0000b7, 0x3c0000c6, 0x3c0000d1,
|
||||
0x3c0000ee, 0x3c000118, 0x3c000126, 0x3c400000,
|
||||
0x3c40003f, 0x3c400069, 0x3c4000e4, 0x3d400000,
|
||||
0x3c00008c, 0x3c0000b8, 0x3c0000c7, 0x3c0000d2,
|
||||
0x3c0000ef, 0x3c000119, 0x3c000127, 0x3c400000,
|
||||
0x3c40003f, 0x3c40006a, 0x3c4000e5, 0x3d400000,
|
||||
0x3d40004e, 0x3d900000, 0x3d90003a, 0x3dc00000,
|
||||
0x3dc000bc, 0x3dc00104, 0x3de00000, 0x3de0012f,
|
||||
0x3e200000, 0x3e200047, 0x3e2000a5, 0x3e2000ae,
|
||||
0x3e2000bc, 0x3e200106, 0x3e200130, 0x3e500000,
|
||||
0x3e500107, 0x3e600000, 0x3e60012f, 0x3eb00000,
|
||||
0x3dc000bd, 0x3dc00105, 0x3de00000, 0x3de00130,
|
||||
0x3e200000, 0x3e200047, 0x3e2000a6, 0x3e2000af,
|
||||
0x3e2000bd, 0x3e200107, 0x3e200131, 0x3e500000,
|
||||
0x3e500108, 0x3e600000, 0x3e600130, 0x3eb00000,
|
||||
// Entry 260 - 27F
|
||||
0x3eb00106, 0x3ec00000, 0x3ec000a4, 0x3f300000,
|
||||
0x3f30012f, 0x3fa00000, 0x3fa000e8, 0x3fc00000,
|
||||
0x3fd00000, 0x3fd00072, 0x3fd000da, 0x3fd0010c,
|
||||
0x3ff00000, 0x3ff000d1, 0x40100000, 0x401000c3,
|
||||
0x3eb00107, 0x3ec00000, 0x3ec000a5, 0x3f300000,
|
||||
0x3f300130, 0x3fa00000, 0x3fa000e9, 0x3fc00000,
|
||||
0x3fd00000, 0x3fd00073, 0x3fd000db, 0x3fd0010d,
|
||||
0x3ff00000, 0x3ff000d2, 0x40100000, 0x401000c4,
|
||||
0x40200000, 0x4020004c, 0x40700000, 0x40800000,
|
||||
0x4085a000, 0x4085a0ba, 0x408e8000, 0x408e80ba,
|
||||
0x40c00000, 0x40c000b3, 0x41200000, 0x41200111,
|
||||
0x41600000, 0x4160010f, 0x41c00000, 0x41d00000,
|
||||
0x4085b000, 0x4085b0bb, 0x408eb000, 0x408eb0bb,
|
||||
0x40c00000, 0x40c000b4, 0x41200000, 0x41200112,
|
||||
0x41600000, 0x41600110, 0x41c00000, 0x41d00000,
|
||||
// Entry 280 - 29F
|
||||
0x41e00000, 0x41f00000, 0x41f00072, 0x42200000,
|
||||
0x42300000, 0x42300164, 0x42900000, 0x42900062,
|
||||
0x4290006f, 0x429000a4, 0x42900115, 0x43100000,
|
||||
0x43100027, 0x431000c2, 0x4310014d, 0x43200000,
|
||||
0x43220000, 0x43220033, 0x432200bd, 0x43220105,
|
||||
0x4322014d, 0x4325a000, 0x4325a033, 0x4325a0bd,
|
||||
0x4325a105, 0x4325a14d, 0x43700000, 0x43a00000,
|
||||
0x43b00000, 0x44400000, 0x44400031, 0x44400072,
|
||||
0x41e00000, 0x41f00000, 0x41f00073, 0x42200000,
|
||||
0x42300000, 0x42300165, 0x42900000, 0x42900063,
|
||||
0x42900070, 0x429000a5, 0x42900116, 0x43100000,
|
||||
0x43100027, 0x431000c3, 0x4310014e, 0x43200000,
|
||||
0x43220000, 0x43220033, 0x432200be, 0x43220106,
|
||||
0x4322014e, 0x4325b000, 0x4325b033, 0x4325b0be,
|
||||
0x4325b106, 0x4325b14e, 0x43700000, 0x43a00000,
|
||||
0x43b00000, 0x44400000, 0x44400031, 0x44400073,
|
||||
// Entry 2A0 - 2BF
|
||||
0x4440010c, 0x44500000, 0x4450004b, 0x445000a4,
|
||||
0x4450012f, 0x44500131, 0x44e00000, 0x45000000,
|
||||
0x45000099, 0x450000b3, 0x450000d0, 0x4500010d,
|
||||
0x46100000, 0x46100099, 0x46400000, 0x464000a4,
|
||||
0x46400131, 0x46700000, 0x46700124, 0x46b00000,
|
||||
0x46b00123, 0x46f00000, 0x46f0006d, 0x46f0006f,
|
||||
0x47100000, 0x47600000, 0x47600127, 0x47a00000,
|
||||
0x48000000, 0x48200000, 0x48200129, 0x48a00000,
|
||||
0x4440010d, 0x44500000, 0x4450004b, 0x445000a5,
|
||||
0x44500130, 0x44500132, 0x44e00000, 0x45000000,
|
||||
0x4500009a, 0x450000b4, 0x450000d1, 0x4500010e,
|
||||
0x46100000, 0x4610009a, 0x46400000, 0x464000a5,
|
||||
0x46400132, 0x46700000, 0x46700125, 0x46b00000,
|
||||
0x46b00124, 0x46f00000, 0x46f0006e, 0x46f00070,
|
||||
0x47100000, 0x47600000, 0x47600128, 0x47a00000,
|
||||
0x48000000, 0x48200000, 0x4820012a, 0x48a00000,
|
||||
// Entry 2C0 - 2DF
|
||||
0x48a0005d, 0x48a0012b, 0x48e00000, 0x49400000,
|
||||
0x49400106, 0x4a400000, 0x4a4000d4, 0x4a900000,
|
||||
0x4a9000ba, 0x4ac00000, 0x4ac00053, 0x4ae00000,
|
||||
0x4ae00130, 0x4b400000, 0x4b400099, 0x4b4000e8,
|
||||
0x48a0005e, 0x48a0012c, 0x48e00000, 0x49400000,
|
||||
0x49400107, 0x4a400000, 0x4a4000d5, 0x4a900000,
|
||||
0x4a9000bb, 0x4ac00000, 0x4ac00053, 0x4ae00000,
|
||||
0x4ae00131, 0x4b400000, 0x4b40009a, 0x4b4000e9,
|
||||
0x4bc00000, 0x4bc05000, 0x4bc05024, 0x4bc20000,
|
||||
0x4bc20137, 0x4bc5a000, 0x4bc5a137, 0x4be00000,
|
||||
0x4be5a000, 0x4be5a0b4, 0x4bef1000, 0x4bef10b4,
|
||||
0x4c000000, 0x4c300000, 0x4c30013e, 0x4c900000,
|
||||
0x4bc20138, 0x4bc5b000, 0x4bc5b138, 0x4be00000,
|
||||
0x4be5b000, 0x4be5b0b5, 0x4bef4000, 0x4bef40b5,
|
||||
0x4c000000, 0x4c300000, 0x4c30013f, 0x4c900000,
|
||||
// Entry 2E0 - 2FF
|
||||
0x4c900001, 0x4cc00000, 0x4cc0012f, 0x4ce00000,
|
||||
0x4cf00000, 0x4cf0004e, 0x4e500000, 0x4e500114,
|
||||
0x4f200000, 0x4fb00000, 0x4fb00131, 0x50900000,
|
||||
0x4c900001, 0x4cc00000, 0x4cc00130, 0x4ce00000,
|
||||
0x4cf00000, 0x4cf0004e, 0x4e500000, 0x4e500115,
|
||||
0x4f200000, 0x4fb00000, 0x4fb00132, 0x50900000,
|
||||
0x50900052, 0x51200000, 0x51200001, 0x51800000,
|
||||
0x5180003b, 0x518000d6, 0x51f00000, 0x51f3b000,
|
||||
0x51f3b053, 0x51f3c000, 0x51f3c08d, 0x52800000,
|
||||
0x528000ba, 0x52900000, 0x5293b000, 0x5293b053,
|
||||
0x5293b08d, 0x5293b0c6, 0x5293b10d, 0x5293c000,
|
||||
0x5180003b, 0x518000d7, 0x51f00000, 0x51f3b000,
|
||||
0x51f3b053, 0x51f3c000, 0x51f3c08e, 0x52800000,
|
||||
0x528000bb, 0x52900000, 0x5293b000, 0x5293b053,
|
||||
0x5293b08e, 0x5293b0c7, 0x5293b10e, 0x5293c000,
|
||||
// Entry 300 - 31F
|
||||
0x5293c08d, 0x5293c0c6, 0x5293c12e, 0x52f00000,
|
||||
0x52f00161,
|
||||
0x5293c08e, 0x5293c0c7, 0x5293c12f, 0x52f00000,
|
||||
0x52f00162,
|
||||
} // Size: 3116 bytes
|
||||
|
||||
const specialTagsStr string = "ca-ES-valencia en-US-u-va-posix"
|
||||
|
||||
// Total table size 3147 bytes (3KiB); checksum: 6772C83C
|
||||
// Total table size 3147 bytes (3KiB); checksum: 5A8FFFA5
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,31 +23,31 @@ const (
|
|||
_419 = 31
|
||||
_BR = 65
|
||||
_CA = 73
|
||||
_ES = 110
|
||||
_GB = 123
|
||||
_MD = 188
|
||||
_PT = 238
|
||||
_UK = 306
|
||||
_US = 309
|
||||
_ZZ = 357
|
||||
_XA = 323
|
||||
_XC = 325
|
||||
_XK = 333
|
||||
_ES = 111
|
||||
_GB = 124
|
||||
_MD = 189
|
||||
_PT = 239
|
||||
_UK = 307
|
||||
_US = 310
|
||||
_ZZ = 358
|
||||
_XA = 324
|
||||
_XC = 326
|
||||
_XK = 334
|
||||
)
|
||||
const (
|
||||
_Latn = 90
|
||||
_Latn = 91
|
||||
_Hani = 57
|
||||
_Hans = 59
|
||||
_Hant = 60
|
||||
_Qaaa = 147
|
||||
_Qaai = 155
|
||||
_Qabx = 196
|
||||
_Zinh = 252
|
||||
_Zyyy = 257
|
||||
_Zzzz = 258
|
||||
_Qaaa = 149
|
||||
_Qaai = 157
|
||||
_Qabx = 198
|
||||
_Zinh = 255
|
||||
_Zyyy = 260
|
||||
_Zzzz = 261
|
||||
)
|
||||
|
||||
var regionToGroups = []uint8{ // 358 elements
|
||||
var regionToGroups = []uint8{ // 359 elements
|
||||
// Entry 0 - 3F
|
||||
0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x00,
|
||||
|
@ -60,51 +60,51 @@ var regionToGroups = []uint8{ // 358 elements
|
|||
// Entry 40 - 7F
|
||||
0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
|
||||
0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x08,
|
||||
0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
|
||||
// Entry 80 - BF
|
||||
0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00,
|
||||
0x00, 0x04, 0x01, 0x00, 0x04, 0x02, 0x00, 0x04,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00,
|
||||
// Entry C0 - FF
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01,
|
||||
0x04, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00,
|
||||
0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04,
|
||||
// Entry 80 - BF
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,
|
||||
0x00, 0x00, 0x04, 0x01, 0x00, 0x04, 0x02, 0x00,
|
||||
0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
|
||||
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x04,
|
||||
// Entry C0 - FF
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
|
||||
0x01, 0x04, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00,
|
||||
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
// Entry 100 - 13F
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
|
||||
0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, 0x00,
|
||||
0x00, 0x04, 0x00, 0x04, 0x04, 0x05, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04,
|
||||
0x00, 0x00, 0x04, 0x00, 0x04, 0x04, 0x05, 0x00,
|
||||
// Entry 140 - 17F
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} // Size: 382 bytes
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} // Size: 383 bytes
|
||||
|
||||
var paradigmLocales = [][3]uint16{ // 3 elements
|
||||
0: [3]uint16{0x139, 0x0, 0x7b},
|
||||
0: [3]uint16{0x139, 0x0, 0x7c},
|
||||
1: [3]uint16{0x13e, 0x0, 0x1f},
|
||||
2: [3]uint16{0x3c0, 0x41, 0xee},
|
||||
2: [3]uint16{0x3c0, 0x41, 0xef},
|
||||
} // Size: 42 bytes
|
||||
|
||||
type mutualIntelligibility struct {
|
||||
|
@ -249,30 +249,30 @@ var matchLang = []mutualIntelligibility{ // 113 elements
|
|||
// matchScript holds pairs of scriptIDs where readers of one script
|
||||
// can typically also read the other. Each is associated with a confidence.
|
||||
var matchScript = []scriptIntelligibility{ // 26 elements
|
||||
0: {wantLang: 0x432, haveLang: 0x432, wantScript: 0x5a, haveScript: 0x20, distance: 0x5},
|
||||
1: {wantLang: 0x432, haveLang: 0x432, wantScript: 0x20, haveScript: 0x5a, distance: 0x5},
|
||||
2: {wantLang: 0x58, haveLang: 0x3e2, wantScript: 0x5a, haveScript: 0x20, distance: 0xa},
|
||||
3: {wantLang: 0xa5, haveLang: 0x139, wantScript: 0xe, haveScript: 0x5a, distance: 0xa},
|
||||
0: {wantLang: 0x432, haveLang: 0x432, wantScript: 0x5b, haveScript: 0x20, distance: 0x5},
|
||||
1: {wantLang: 0x432, haveLang: 0x432, wantScript: 0x20, haveScript: 0x5b, distance: 0x5},
|
||||
2: {wantLang: 0x58, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa},
|
||||
3: {wantLang: 0xa5, haveLang: 0x139, wantScript: 0xe, haveScript: 0x5b, distance: 0xa},
|
||||
4: {wantLang: 0x1d7, haveLang: 0x3e2, wantScript: 0x8, haveScript: 0x20, distance: 0xa},
|
||||
5: {wantLang: 0x210, haveLang: 0x139, wantScript: 0x2e, haveScript: 0x5a, distance: 0xa},
|
||||
6: {wantLang: 0x24a, haveLang: 0x139, wantScript: 0x4e, haveScript: 0x5a, distance: 0xa},
|
||||
7: {wantLang: 0x251, haveLang: 0x139, wantScript: 0x52, haveScript: 0x5a, distance: 0xa},
|
||||
8: {wantLang: 0x2b8, haveLang: 0x139, wantScript: 0x57, haveScript: 0x5a, distance: 0xa},
|
||||
9: {wantLang: 0x304, haveLang: 0x139, wantScript: 0x6e, haveScript: 0x5a, distance: 0xa},
|
||||
10: {wantLang: 0x331, haveLang: 0x139, wantScript: 0x75, haveScript: 0x5a, distance: 0xa},
|
||||
11: {wantLang: 0x351, haveLang: 0x139, wantScript: 0x22, haveScript: 0x5a, distance: 0xa},
|
||||
12: {wantLang: 0x395, haveLang: 0x139, wantScript: 0x81, haveScript: 0x5a, distance: 0xa},
|
||||
13: {wantLang: 0x39d, haveLang: 0x139, wantScript: 0x36, haveScript: 0x5a, distance: 0xa},
|
||||
14: {wantLang: 0x3be, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
||||
15: {wantLang: 0x3fa, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
||||
16: {wantLang: 0x40c, haveLang: 0x139, wantScript: 0xd4, haveScript: 0x5a, distance: 0xa},
|
||||
17: {wantLang: 0x450, haveLang: 0x139, wantScript: 0xe3, haveScript: 0x5a, distance: 0xa},
|
||||
18: {wantLang: 0x461, haveLang: 0x139, wantScript: 0xe6, haveScript: 0x5a, distance: 0xa},
|
||||
19: {wantLang: 0x46f, haveLang: 0x139, wantScript: 0x2c, haveScript: 0x5a, distance: 0xa},
|
||||
20: {wantLang: 0x476, haveLang: 0x3e2, wantScript: 0x5a, haveScript: 0x20, distance: 0xa},
|
||||
21: {wantLang: 0x4b4, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5a, distance: 0xa},
|
||||
22: {wantLang: 0x4bc, haveLang: 0x3e2, wantScript: 0x5a, haveScript: 0x20, distance: 0xa},
|
||||
23: {wantLang: 0x512, haveLang: 0x139, wantScript: 0x3e, haveScript: 0x5a, distance: 0xa},
|
||||
5: {wantLang: 0x210, haveLang: 0x139, wantScript: 0x2e, haveScript: 0x5b, distance: 0xa},
|
||||
6: {wantLang: 0x24a, haveLang: 0x139, wantScript: 0x4f, haveScript: 0x5b, distance: 0xa},
|
||||
7: {wantLang: 0x251, haveLang: 0x139, wantScript: 0x53, haveScript: 0x5b, distance: 0xa},
|
||||
8: {wantLang: 0x2b8, haveLang: 0x139, wantScript: 0x58, haveScript: 0x5b, distance: 0xa},
|
||||
9: {wantLang: 0x304, haveLang: 0x139, wantScript: 0x6f, haveScript: 0x5b, distance: 0xa},
|
||||
10: {wantLang: 0x331, haveLang: 0x139, wantScript: 0x76, haveScript: 0x5b, distance: 0xa},
|
||||
11: {wantLang: 0x351, haveLang: 0x139, wantScript: 0x22, haveScript: 0x5b, distance: 0xa},
|
||||
12: {wantLang: 0x395, haveLang: 0x139, wantScript: 0x83, haveScript: 0x5b, distance: 0xa},
|
||||
13: {wantLang: 0x39d, haveLang: 0x139, wantScript: 0x36, haveScript: 0x5b, distance: 0xa},
|
||||
14: {wantLang: 0x3be, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa},
|
||||
15: {wantLang: 0x3fa, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa},
|
||||
16: {wantLang: 0x40c, haveLang: 0x139, wantScript: 0xd6, haveScript: 0x5b, distance: 0xa},
|
||||
17: {wantLang: 0x450, haveLang: 0x139, wantScript: 0xe6, haveScript: 0x5b, distance: 0xa},
|
||||
18: {wantLang: 0x461, haveLang: 0x139, wantScript: 0xe9, haveScript: 0x5b, distance: 0xa},
|
||||
19: {wantLang: 0x46f, haveLang: 0x139, wantScript: 0x2c, haveScript: 0x5b, distance: 0xa},
|
||||
20: {wantLang: 0x476, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa},
|
||||
21: {wantLang: 0x4b4, haveLang: 0x139, wantScript: 0x5, haveScript: 0x5b, distance: 0xa},
|
||||
22: {wantLang: 0x4bc, haveLang: 0x3e2, wantScript: 0x5b, haveScript: 0x20, distance: 0xa},
|
||||
23: {wantLang: 0x512, haveLang: 0x139, wantScript: 0x3e, haveScript: 0x5b, distance: 0xa},
|
||||
24: {wantLang: 0x529, haveLang: 0x529, wantScript: 0x3b, haveScript: 0x3c, distance: 0xf},
|
||||
25: {wantLang: 0x529, haveLang: 0x529, wantScript: 0x3c, haveScript: 0x3b, distance: 0x13},
|
||||
} // Size: 232 bytes
|
||||
|
@ -295,4 +295,4 @@ var matchRegion = []regionIntelligibility{ // 15 elements
|
|||
14: {lang: 0x529, script: 0x3c, group: 0x80, distance: 0x5},
|
||||
} // Size: 114 bytes
|
||||
|
||||
// Total table size 1472 bytes (1KiB); checksum: F86C669
|
||||
// Total table size 1473 bytes (1KiB); checksum: 7BB90B5C
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||
|
||||
//go:build go1.16
|
||||
// +build go1.16
|
||||
//go:build go1.16 && !go1.21
|
||||
// +build go1.16,!go1.21
|
||||
|
||||
package bidi
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
||||
|
||||
//go:build go1.16
|
||||
// +build go1.16
|
||||
//go:build go1.16 && !go1.21
|
||||
// +build go1.16,!go1.21
|
||||
|
||||
package norm
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -336,7 +336,7 @@ go.opentelemetry.io/proto/otlp/trace/v1
|
|||
go.uber.org/automaxprocs/internal/cgroups
|
||||
go.uber.org/automaxprocs/internal/runtime
|
||||
go.uber.org/automaxprocs/maxprocs
|
||||
# golang.org/x/crypto v0.8.0
|
||||
# golang.org/x/crypto v0.11.0
|
||||
## explicit; go 1.17
|
||||
golang.org/x/crypto/blake2b
|
||||
golang.org/x/crypto/blowfish
|
||||
|
@ -365,7 +365,7 @@ golang.org/x/mod/internal/lazyregexp
|
|||
golang.org/x/mod/modfile
|
||||
golang.org/x/mod/module
|
||||
golang.org/x/mod/semver
|
||||
# golang.org/x/net v0.9.0
|
||||
# golang.org/x/net v0.12.0
|
||||
## explicit; go 1.17
|
||||
golang.org/x/net/bpf
|
||||
golang.org/x/net/context
|
||||
|
@ -390,7 +390,7 @@ golang.org/x/oauth2/internal
|
|||
# golang.org/x/sync v0.1.0
|
||||
## explicit
|
||||
golang.org/x/sync/errgroup
|
||||
# golang.org/x/sys v0.7.0
|
||||
# golang.org/x/sys v0.10.0
|
||||
## explicit; go 1.17
|
||||
golang.org/x/sys/cpu
|
||||
golang.org/x/sys/execabs
|
||||
|
@ -402,10 +402,10 @@ golang.org/x/sys/windows/registry
|
|||
golang.org/x/sys/windows/svc
|
||||
golang.org/x/sys/windows/svc/eventlog
|
||||
golang.org/x/sys/windows/svc/mgr
|
||||
# golang.org/x/term v0.7.0
|
||||
# golang.org/x/term v0.10.0
|
||||
## explicit; go 1.17
|
||||
golang.org/x/term
|
||||
# golang.org/x/text v0.9.0
|
||||
# golang.org/x/text v0.11.0
|
||||
## explicit; go 1.17
|
||||
golang.org/x/text/cases
|
||||
golang.org/x/text/internal
|
||||
|
|
Loading…
Reference in New Issue