Merge pull request #1826 from thaJeztah/bump_engine2

bump docker/docker ed07e1152879a4d156dff2e86abca3c4c811e743
This commit is contained in:
Sebastiaan van Stijn 2019-04-18 17:48:44 +02:00 committed by GitHub
commit 71570160c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
114 changed files with 2810 additions and 1222 deletions

View File

@ -91,8 +91,8 @@ func (c *Endpoint) tlsConfig() (*tls.Config, error) {
} }
// ClientOpts returns a slice of Client options to configure an API client with this endpoint // ClientOpts returns a slice of Client options to configure an API client with this endpoint
func (c *Endpoint) ClientOpts() ([]func(*client.Client) error, error) { func (c *Endpoint) ClientOpts() ([]client.Opt, error) {
var result []func(*client.Client) error var result []client.Opt
if c.Host != "" { if c.Host != "" {
helper, err := connhelper.GetConnectionHelper(c.Host) helper, err := connhelper.GetConnectionHelper(c.Host)
if err != nil { if err != nil {

View File

@ -5,7 +5,7 @@ github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d05887
github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb
github.com/containerd/console c12b1e7919c14469339a5d38f2f8ed9b64a9de23 github.com/containerd/console c12b1e7919c14469339a5d38f2f8ed9b64a9de23
github.com/containerd/containerd ceba56893a76f22cf0126c46d835c80fb3833408 github.com/containerd/containerd ceba56893a76f22cf0126c46d835c80fb3833408
github.com/containerd/continuity bd77b46c8352f74eb12c85bdc01f4b90f69d66b4 github.com/containerd/continuity 004b46473808b3e7a4a3049c20e4376c91eb966d
github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40 github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40
github.com/coreos/etcd fca8add78a9d926166eb739b8e4a124434025ba3 # v3.3.9 github.com/coreos/etcd fca8add78a9d926166eb739b8e4a124434025ba3 # v3.3.9
@ -14,7 +14,7 @@ github.com/davecgh/go-spew 346938d642f2ec3594ed81d87446
github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af
github.com/docker/compose-on-kubernetes 7a68f5c914c7e06d7a08dc71608f41811c91f0bc # v0.4.21 github.com/docker/compose-on-kubernetes 7a68f5c914c7e06d7a08dc71608f41811c91f0bc # v0.4.21
github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580
github.com/docker/docker dbe4a30928d418e0570891a09703bcbc0e4997a1 github.com/docker/docker ed07e1152879a4d156dff2e86abca3c4c811e743
github.com/docker/docker-credential-helpers 5241b46610f2491efdf9d1c85f1ddf5b02f6d962 github.com/docker/docker-credential-helpers 5241b46610f2491efdf9d1c85f1ddf5b02f6d962
github.com/docker/go d30aec9fd63c35133f8f79c3412ad91a3b08be06 # Contains a customized version of canonical/json and is used by Notary. The package is periodically rebased on current Go versions. github.com/docker/go d30aec9fd63c35133f8f79c3412ad91a3b08be06 # Contains a customized version of canonical/json and is used by Notary. The package is periodically rebased on current Go versions.
github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0 github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0
@ -45,20 +45,20 @@ github.com/imdario/mergo 7c29201646fa3de8506f70121347
github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0.0 github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0.0
github.com/jaguilar/vt100 ad4c4a5743050fb7f88ce968dca9422f72a0e3f2 git://github.com/tonistiigi/vt100.git github.com/jaguilar/vt100 ad4c4a5743050fb7f88ce968dca9422f72a0e3f2 git://github.com/tonistiigi/vt100.git
github.com/json-iterator/go 0ff49de124c6f76f8494e194af75bde0f1a49a29 # 1.1.6 github.com/json-iterator/go 0ff49de124c6f76f8494e194af75bde0f1a49a29 # 1.1.6
github.com/konsorten/go-windows-terminal-sequences 5c8c8bd35d3832f5d134ae1e1e375b69a4d25242 # v1.0.1 github.com/konsorten/go-windows-terminal-sequences f55edac94c9bbba5d6182a4be46d86a2c9b5b50e # v1.0.2
github.com/mattn/go-shellwords a72fbe27a1b0ed0df2f02754945044ce1456608b # v1.0.5 github.com/mattn/go-shellwords a72fbe27a1b0ed0df2f02754945044ce1456608b # v1.0.5
github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c # v1.0.1 github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c # v1.0.1
github.com/Microsoft/go-winio c599b533b43b1363d7d7c6cfda5ede70ed73ff13 github.com/Microsoft/go-winio c599b533b43b1363d7d7c6cfda5ede70ed73ff13
github.com/Microsoft/hcsshim ba3d6667710fa905116f39a19d059c4c1016be7c github.com/Microsoft/hcsshim ba3d6667710fa905116f39a19d059c4c1016be7c
github.com/miekg/pkcs11 6120d95c0e9576ccf4a78ba40855809dca31a9ed github.com/miekg/pkcs11 6120d95c0e9576ccf4a78ba40855809dca31a9ed
github.com/mitchellh/mapstructure f15292f7a699fcc1a38a80977f80a046874ba8ac github.com/mitchellh/mapstructure f15292f7a699fcc1a38a80977f80a046874ba8ac
github.com/moby/buildkit 62e5542790fe1d1cf9ca6302d5a8b988df99159a github.com/moby/buildkit b3028967ae6259c9a31c1a1deeccd30fe3469cce
github.com/modern-go/concurrent bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94 # 1.0.3 github.com/modern-go/concurrent bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94 # 1.0.3
github.com/modern-go/reflect2 4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd # 1.0.1 github.com/modern-go/reflect2 4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd # 1.0.1
github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b
github.com/opencontainers/go-digest 279bed98673dd5bef374d3b6e4b09e2af76183bf # v1.0.0-rc1 github.com/opencontainers/go-digest 279bed98673dd5bef374d3b6e4b09e2af76183bf # v1.0.0-rc1
github.com/opencontainers/image-spec d60099175f88c47cd379c4738d158884749ed235 # v1.0.1 github.com/opencontainers/image-spec d60099175f88c47cd379c4738d158884749ed235 # v1.0.1
github.com/opencontainers/runc 2b18fe1d885ee5083ef9f0838fee39b62d653e30 github.com/opencontainers/runc 029124da7af7360afa781a0234d1b083550f797c # v1.0.0-rc7-6-g029124da
github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7 github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4 # v0.8.1 github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4 # v0.8.1
@ -78,11 +78,11 @@ github.com/tonistiigi/units 6950e57a87eaf136bbe44ef2ec8e
github.com/xeipuuv/gojsonpointer 4e3ac2762d5f479393488629ee9370b50873b3a6 github.com/xeipuuv/gojsonpointer 4e3ac2762d5f479393488629ee9370b50873b3a6
github.com/xeipuuv/gojsonreference bd5ef7bd5415a7ac448318e64f11a24cd21e594b github.com/xeipuuv/gojsonreference bd5ef7bd5415a7ac448318e64f11a24cd21e594b
github.com/xeipuuv/gojsonschema 93e72a773fade158921402d6a24c819b48aba29d github.com/xeipuuv/gojsonschema 93e72a773fade158921402d6a24c819b48aba29d
golang.org/x/crypto b7391e95e576cacdcdd422573063bc057239113d golang.org/x/crypto 38d8ce5564a5b71b2e3a00553993f1b9a7ae852f
golang.org/x/net a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1 golang.org/x/net eb5bcb51f2a31c7d5141d810b70815c05d9c9146
golang.org/x/oauth2 ef147856a6ddbb60760db74283d2424e98c87bff golang.org/x/oauth2 ef147856a6ddbb60760db74283d2424e98c87bff
golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e golang.org/x/sync e225da77a7e68af35c70ccbf71af2b83e6acac3c
golang.org/x/sys d455e41777fca6e8a5a79e34a14b8368bc11d9ba golang.org/x/sys 4b34438f7a67ee5f45cc6132e2bad873a20324e9
golang.org/x/text f21a4dfb5e38f5895301dc265a8def02365cc3d0 # v0.3.0 golang.org/x/text f21a4dfb5e38f5895301dc265a8def02365cc3d0 # v0.3.0
golang.org/x/time fbb02b2291d28baffd63558aa44b4b56f178d650 golang.org/x/time fbb02b2291d28baffd63558aa44b4b56f178d650
google.golang.org/genproto 02b4e95473316948020af0b7a4f0f22c73929b0e google.golang.org/genproto 02b4e95473316948020af0b7a4f0f22c73929b0e

View File

@ -1,6 +1,7 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -175,28 +176,16 @@
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work. Copyright The containerd Authors
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.

View File

@ -72,3 +72,13 @@ If you change the proto file you will need to rebuild the generated Go with `go
```console ```console
$ go generate ./proto $ go generate ./proto
``` ```
## Project details
continuity is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE).
As a containerd sub-project, you will find the:
* [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md),
* [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS),
* and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md)
information in our [`containerd/project`](https://github.com/containerd/project) repository.

View File

@ -32,14 +32,49 @@ var bufferPool = &sync.Pool{
}, },
} }
// CopyDir copies the directory from src to dst. // XAttrErrorHandlers transform a non-nil xattr error.
// Most efficient copy of files is attempted. // Return nil to ignore an error.
func CopyDir(dst, src string) error { // xattrKey can be empty for listxattr operation.
inodes := map[uint64]string{} type XAttrErrorHandler func(dst, src, xattrKey string, err error) error
return copyDirectory(dst, src, inodes)
type copyDirOpts struct {
xeh XAttrErrorHandler
} }
func copyDirectory(dst, src string, inodes map[uint64]string) error { type CopyDirOpt func(*copyDirOpts) error
// WithXAttrErrorHandler allows specifying XAttrErrorHandler
// If nil XAttrErrorHandler is specified (default), CopyDir stops
// on a non-nil xattr error.
func WithXAttrErrorHandler(xeh XAttrErrorHandler) CopyDirOpt {
return func(o *copyDirOpts) error {
o.xeh = xeh
return nil
}
}
// WithAllowXAttrErrors allows ignoring xattr errors.
func WithAllowXAttrErrors() CopyDirOpt {
xeh := func(dst, src, xattrKey string, err error) error {
return nil
}
return WithXAttrErrorHandler(xeh)
}
// CopyDir copies the directory from src to dst.
// Most efficient copy of files is attempted.
func CopyDir(dst, src string, opts ...CopyDirOpt) error {
var o copyDirOpts
for _, opt := range opts {
if err := opt(&o); err != nil {
return err
}
}
inodes := map[uint64]string{}
return copyDirectory(dst, src, inodes, &o)
}
func copyDirectory(dst, src string, inodes map[uint64]string, o *copyDirOpts) error {
stat, err := os.Stat(src) stat, err := os.Stat(src)
if err != nil { if err != nil {
return errors.Wrapf(err, "failed to stat %s", src) return errors.Wrapf(err, "failed to stat %s", src)
@ -75,7 +110,7 @@ func copyDirectory(dst, src string, inodes map[uint64]string) error {
switch { switch {
case fi.IsDir(): case fi.IsDir():
if err := copyDirectory(target, source, inodes); err != nil { if err := copyDirectory(target, source, inodes, o); err != nil {
return err return err
} }
continue continue
@ -111,7 +146,7 @@ func copyDirectory(dst, src string, inodes map[uint64]string) error {
return errors.Wrap(err, "failed to copy file info") return errors.Wrap(err, "failed to copy file info")
} }
if err := copyXAttrs(target, source); err != nil { if err := copyXAttrs(target, source, o.xeh); err != nil {
return errors.Wrap(err, "failed to copy xattrs") return errors.Wrap(err, "failed to copy xattrs")
} }
} }

View File

@ -59,6 +59,8 @@ func copyFileInfo(fi os.FileInfo, name string) error {
return nil return nil
} }
const maxSSizeT = int64(^uint(0) >> 1)
func copyFileContent(dst, src *os.File) error { func copyFileContent(dst, src *os.File) error {
st, err := src.Stat() st, err := src.Stat()
if err != nil { if err != nil {
@ -71,7 +73,16 @@ func copyFileContent(dst, src *os.File) error {
dstFd := int(dst.Fd()) dstFd := int(dst.Fd())
for size > 0 { for size > 0 {
n, err := unix.CopyFileRange(srcFd, nil, dstFd, nil, int(size), 0) // Ensure that we are never trying to copy more than SSIZE_MAX at a
// time and at the same time avoids overflows when the file is larger
// than 4GB on 32-bit systems.
var copySize int
if size > maxSSizeT {
copySize = int(maxSSizeT)
} else {
copySize = int(size)
}
n, err := unix.CopyFileRange(srcFd, nil, dstFd, nil, copySize, 0)
if err != nil { if err != nil {
if (err != unix.ENOSYS && err != unix.EXDEV) || !first { if (err != unix.ENOSYS && err != unix.EXDEV) || !first {
return errors.Wrap(err, "copy file range failed") return errors.Wrap(err, "copy file range failed")
@ -90,18 +101,34 @@ func copyFileContent(dst, src *os.File) error {
return nil return nil
} }
func copyXAttrs(dst, src string) error { func copyXAttrs(dst, src string, xeh XAttrErrorHandler) error {
xattrKeys, err := sysx.LListxattr(src) xattrKeys, err := sysx.LListxattr(src)
if err != nil { if err != nil {
return errors.Wrapf(err, "failed to list xattrs on %s", src) e := errors.Wrapf(err, "failed to list xattrs on %s", src)
if xeh != nil {
e = xeh(dst, src, "", e)
}
return e
} }
for _, xattr := range xattrKeys { for _, xattr := range xattrKeys {
data, err := sysx.LGetxattr(src, xattr) data, err := sysx.LGetxattr(src, xattr)
if err != nil { if err != nil {
return errors.Wrapf(err, "failed to get xattr %q on %s", xattr, src) e := errors.Wrapf(err, "failed to get xattr %q on %s", xattr, src)
if xeh != nil {
if e = xeh(dst, src, xattr, e); e == nil {
continue
}
}
return e
} }
if err := sysx.LSetxattr(dst, xattr, data, 0); err != nil { if err := sysx.LSetxattr(dst, xattr, data, 0); err != nil {
return errors.Wrapf(err, "failed to set xattr %q on %s", xattr, dst) e := errors.Wrapf(err, "failed to set xattr %q on %s", xattr, dst)
if xeh != nil {
if e = xeh(dst, src, xattr, e); e == nil {
continue
}
}
return e
} }
} }

View File

@ -69,18 +69,34 @@ func copyFileContent(dst, src *os.File) error {
return err return err
} }
func copyXAttrs(dst, src string) error { func copyXAttrs(dst, src string, xeh XAttrErrorHandler) error {
xattrKeys, err := sysx.LListxattr(src) xattrKeys, err := sysx.LListxattr(src)
if err != nil { if err != nil {
return errors.Wrapf(err, "failed to list xattrs on %s", src) e := errors.Wrapf(err, "failed to list xattrs on %s", src)
if xeh != nil {
e = xeh(dst, src, "", e)
}
return e
} }
for _, xattr := range xattrKeys { for _, xattr := range xattrKeys {
data, err := sysx.LGetxattr(src, xattr) data, err := sysx.LGetxattr(src, xattr)
if err != nil { if err != nil {
return errors.Wrapf(err, "failed to get xattr %q on %s", xattr, src) e := errors.Wrapf(err, "failed to get xattr %q on %s", xattr, src)
if xeh != nil {
if e = xeh(dst, src, xattr, e); e == nil {
continue
}
}
return e
} }
if err := sysx.LSetxattr(dst, xattr, data, 0); err != nil { if err := sysx.LSetxattr(dst, xattr, data, 0); err != nil {
return errors.Wrapf(err, "failed to set xattr %q on %s", xattr, dst) e := errors.Wrapf(err, "failed to set xattr %q on %s", xattr, dst)
if xeh != nil {
if e = xeh(dst, src, xattr, e); e == nil {
continue
}
}
return e
} }
} }

View File

@ -40,7 +40,7 @@ func copyFileContent(dst, src *os.File) error {
return err return err
} }
func copyXAttrs(dst, src string) error { func copyXAttrs(dst, src string, xeh XAttrErrorHandler) error {
return nil return nil
} }

View File

@ -5,7 +5,6 @@ package filters // import "github.com/docker/docker/api/types/filters"
import ( import (
"encoding/json" "encoding/json"
"errors"
"regexp" "regexp"
"strings" "strings"
@ -37,41 +36,6 @@ func NewArgs(initialArgs ...KeyValuePair) Args {
return args return args
} }
// ParseFlag parses a key=value string and adds it to an Args.
//
// Deprecated: Use Args.Add()
func ParseFlag(arg string, prev Args) (Args, error) {
filters := prev
if len(arg) == 0 {
return filters, nil
}
if !strings.Contains(arg, "=") {
return filters, ErrBadFormat
}
f := strings.SplitN(arg, "=", 2)
name := strings.ToLower(strings.TrimSpace(f[0]))
value := strings.TrimSpace(f[1])
filters.Add(name, value)
return filters, nil
}
// ErrBadFormat is an error returned when a filter is not in the form key=value
//
// Deprecated: this error will be removed in a future version
var ErrBadFormat = errors.New("bad format of filter (expected name=value)")
// ToParam encodes the Args as args JSON encoded string
//
// Deprecated: use ToJSON
func ToParam(a Args) (string, error) {
return ToJSON(a)
}
// MarshalJSON returns a JSON byte representation of the Args // MarshalJSON returns a JSON byte representation of the Args
func (args Args) MarshalJSON() ([]byte, error) { func (args Args) MarshalJSON() ([]byte, error) {
if len(args.fields) == 0 { if len(args.fields) == 0 {
@ -107,13 +71,6 @@ func ToParamWithVersion(version string, a Args) (string, error) {
return ToJSON(a) return ToJSON(a)
} }
// FromParam decodes a JSON encoded string into Args
//
// Deprecated: use FromJSON
func FromParam(p string) (Args, error) {
return FromJSON(p)
}
// FromJSON decodes a JSON encoded string into Args // FromJSON decodes a JSON encoded string into Args
func FromJSON(p string) (Args, error) { func FromJSON(p string) (Args, error) {
args := NewArgs() args := NewArgs()
@ -275,14 +232,6 @@ func (args Args) FuzzyMatch(key, source string) bool {
return false return false
} }
// Include returns true if the key exists in the mapping
//
// Deprecated: use Contains
func (args Args) Include(field string) bool {
_, ok := args.fields[field]
return ok
}
// Contains returns true if the key exists in the mapping // Contains returns true if the key exists in the mapping
func (args Args) Contains(field string) bool { func (args Args) Contains(field string) bool {
_, ok := args.fields[field] _, ok := args.fields[field]

View File

@ -107,7 +107,7 @@ func CheckRedirect(req *http.Request, via []*http.Request) error {
// It won't send any version information if the version number is empty. It is // It won't send any version information if the version number is empty. It is
// highly recommended that you set a version or your client may break if the // highly recommended that you set a version or your client may break if the
// server is upgraded. // server is upgraded.
func NewClientWithOpts(ops ...func(*Client) error) (*Client, error) { func NewClientWithOpts(ops ...Opt) (*Client, error) {
client, err := defaultHTTPClient(DefaultDockerHost) client, err := defaultHTTPClient(DefaultDockerHost)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -12,6 +12,9 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
) )
// Opt is a configuration option to initialize a client
type Opt func(*Client) error
// FromEnv configures the client with values from environment variables. // FromEnv configures the client with values from environment variables.
// //
// Supported environment variables: // Supported environment variables:
@ -55,13 +58,13 @@ func FromEnv(c *Client) error {
// WithDialer applies the dialer.DialContext to the client transport. This can be // WithDialer applies the dialer.DialContext to the client transport. This can be
// used to set the Timeout and KeepAlive settings of the client. // used to set the Timeout and KeepAlive settings of the client.
// Deprecated: use WithDialContext // Deprecated: use WithDialContext
func WithDialer(dialer *net.Dialer) func(*Client) error { func WithDialer(dialer *net.Dialer) Opt {
return WithDialContext(dialer.DialContext) return WithDialContext(dialer.DialContext)
} }
// WithDialContext applies the dialer to the client transport. This can be // WithDialContext applies the dialer to the client transport. This can be
// used to set the Timeout and KeepAlive settings of the client. // used to set the Timeout and KeepAlive settings of the client.
func WithDialContext(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) func(*Client) error { func WithDialContext(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) Opt {
return func(c *Client) error { return func(c *Client) error {
if transport, ok := c.client.Transport.(*http.Transport); ok { if transport, ok := c.client.Transport.(*http.Transport); ok {
transport.DialContext = dialContext transport.DialContext = dialContext
@ -72,7 +75,7 @@ func WithDialContext(dialContext func(ctx context.Context, network, addr string)
} }
// WithHost overrides the client host with the specified one. // WithHost overrides the client host with the specified one.
func WithHost(host string) func(*Client) error { func WithHost(host string) Opt {
return func(c *Client) error { return func(c *Client) error {
hostURL, err := ParseHostURL(host) hostURL, err := ParseHostURL(host)
if err != nil { if err != nil {
@ -90,7 +93,7 @@ func WithHost(host string) func(*Client) error {
} }
// WithHTTPClient overrides the client http client with the specified one // WithHTTPClient overrides the client http client with the specified one
func WithHTTPClient(client *http.Client) func(*Client) error { func WithHTTPClient(client *http.Client) Opt {
return func(c *Client) error { return func(c *Client) error {
if client != nil { if client != nil {
c.client = client c.client = client
@ -100,7 +103,7 @@ func WithHTTPClient(client *http.Client) func(*Client) error {
} }
// WithHTTPHeaders overrides the client default http headers // WithHTTPHeaders overrides the client default http headers
func WithHTTPHeaders(headers map[string]string) func(*Client) error { func WithHTTPHeaders(headers map[string]string) Opt {
return func(c *Client) error { return func(c *Client) error {
c.customHTTPHeaders = headers c.customHTTPHeaders = headers
return nil return nil
@ -108,7 +111,7 @@ func WithHTTPHeaders(headers map[string]string) func(*Client) error {
} }
// WithScheme overrides the client scheme with the specified one // WithScheme overrides the client scheme with the specified one
func WithScheme(scheme string) func(*Client) error { func WithScheme(scheme string) Opt {
return func(c *Client) error { return func(c *Client) error {
c.scheme = scheme c.scheme = scheme
return nil return nil
@ -116,7 +119,7 @@ func WithScheme(scheme string) func(*Client) error {
} }
// WithTLSClientConfig applies a tls config to the client transport. // WithTLSClientConfig applies a tls config to the client transport.
func WithTLSClientConfig(cacertPath, certPath, keyPath string) func(*Client) error { func WithTLSClientConfig(cacertPath, certPath, keyPath string) Opt {
return func(c *Client) error { return func(c *Client) error {
opts := tlsconfig.Options{ opts := tlsconfig.Options{
CAFile: cacertPath, CAFile: cacertPath,
@ -136,11 +139,14 @@ func WithTLSClientConfig(cacertPath, certPath, keyPath string) func(*Client) err
} }
} }
// WithVersion overrides the client version with the specified one // WithVersion overrides the client version with the specified one. If an empty
func WithVersion(version string) func(*Client) error { // version is specified, the value will be ignored to allow version negotiation.
func WithVersion(version string) Opt {
return func(c *Client) error { return func(c *Client) error {
c.version = version if version != "" {
c.manualOverride = true c.version = version
c.manualOverride = true
}
return nil return nil
} }
} }

View File

@ -1,164 +1,166 @@
# the following lines are in sorted order, FYI github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109
github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109 github.com/Microsoft/hcsshim ba3d6667710fa905116f39a19d059c4c1016be7c
github.com/Microsoft/hcsshim ba3d6667710fa905116f39a19d059c4c1016be7c github.com/Microsoft/go-winio c599b533b43b1363d7d7c6cfda5ede70ed73ff13
github.com/Microsoft/go-winio c599b533b43b1363d7d7c6cfda5ede70ed73ff13 github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git
github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git github.com/golang/gddo 9b12a26f3fbd7397dee4e20939ddca719d840d2a
github.com/golang/gddo 9b12a26f3fbd7397dee4e20939ddca719d840d2a github.com/google/uuid 0cd6bf5da1e1c83f8b45653022c74f71af0538a4 # v1.1.1
github.com/google/uuid v1.1.1 github.com/gorilla/mux a7962380ca08b5a188038c69871b8d3fbdf31e89 # v1.7.0
github.com/gorilla/mux v1.7.0 github.com/Microsoft/opengcs a10967154e143a36014584a6f664344e3bb0aa64
github.com/Microsoft/opengcs a10967154e143a36014584a6f664344e3bb0aa64
github.com/konsorten/go-windows-terminal-sequences v1.0.1
github.com/kr/pty 5cf931ef8f
github.com/mattn/go-shellwords v1.0.3
github.com/sirupsen/logrus 8bdbc7bcc01dcbb8ec23dc8a28e332258d25251f # v1.4.1
github.com/tchap/go-patricia v2.2.6
github.com/vdemeester/shakers 24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3
golang.org/x/net a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1
golang.org/x/sys d455e41777fca6e8a5a79e34a14b8368bc11d9ba
github.com/docker/go-units 47565b4f722fb6ceae66b95f853feed578a4a51c # v0.3.3
github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0
golang.org/x/text f21a4dfb5e38f5895301dc265a8def02365cc3d0 # v0.3.0
gotest.tools v2.1.0
github.com/google/go-cmp v0.2.0
github.com/RackSec/srslog 456df3a81436d29ba874f3590eeeee25d666f8a5 github.com/konsorten/go-windows-terminal-sequences f55edac94c9bbba5d6182a4be46d86a2c9b5b50e # v1.0.2
github.com/imdario/mergo v0.3.6 github.com/kr/pty 521317be5ebc228a0f0ede099fa2a0b5ece22e49 # v1.1.4
golang.org/x/sync 1d60e4601c6fd243af51cc01ddf169918a5407ca github.com/mattn/go-shellwords a72fbe27a1b0ed0df2f02754945044ce1456608b # v1.0.5
github.com/sirupsen/logrus 8bdbc7bcc01dcbb8ec23dc8a28e332258d25251f # v1.4.1
github.com/tchap/go-patricia a7f0089c6f496e8e70402f61733606daa326cac5 # v2.3.0
github.com/vdemeester/shakers 24d7f1d6a71aa5d9cbe7390e4afb66b7eef9e1b3 # v0.1.0
golang.org/x/net eb5bcb51f2a31c7d5141d810b70815c05d9c9146
golang.org/x/sys 4b34438f7a67ee5f45cc6132e2bad873a20324e9
github.com/docker/go-units 47565b4f722fb6ceae66b95f853feed578a4a51c # v0.3.3
github.com/docker/go-connections 7395e3f8aa162843a74ed6d48e79627d9792ac55 # v0.4.0
golang.org/x/text f21a4dfb5e38f5895301dc265a8def02365cc3d0 # v0.3.0
gotest.tools 1083505acf35a0bd8a696b26837e1fb3187a7a83 # v2.3.0
github.com/google/go-cmp 3af367b6b30c263d47e8895973edcca9a49cf029 # v0.2.0
github.com/RackSec/srslog a4725f04ec91af1a91b380da679d6e0c2f061e59
github.com/imdario/mergo 7c29201646fa3de8506f701213473dd407f19646 # v0.3.7
golang.org/x/sync e225da77a7e68af35c70ccbf71af2b83e6acac3c
# buildkit # buildkit
github.com/moby/buildkit b3028967ae6259c9a31c1a1deeccd30fe3469cce github.com/moby/buildkit b3028967ae6259c9a31c1a1deeccd30fe3469cce
github.com/tonistiigi/fsutil 3bbb99cdbd76619ab717299830c60f6f2a533a6b github.com/tonistiigi/fsutil 3bbb99cdbd76619ab717299830c60f6f2a533a6b
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746 github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7 github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
github.com/google/shlex 6f45313302b9c56850fc17f99e40caebce98c716 github.com/google/shlex 6f45313302b9c56850fc17f99e40caebce98c716
github.com/opentracing-contrib/go-stdlib b1a47cfbdd7543e70e9ef3e73d0802ad306cc1cc github.com/opentracing-contrib/go-stdlib b1a47cfbdd7543e70e9ef3e73d0802ad306cc1cc
github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
github.com/gofrs/flock 7f43ea2e6a643ad441fc12d0ecc0d3388b300c53 # v0.7.0 github.com/gofrs/flock 7f43ea2e6a643ad441fc12d0ecc0d3388b300c53 # v0.7.0
#get libnetwork packages # libnetwork
# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
github.com/docker/libnetwork ebcade70ad1059b070d0040d798ecca359bc5fed github.com/docker/libnetwork 48f846327bbe6a0dce0c556e8dc9f5bb939d5c16
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b
github.com/hashicorp/memberlist 3d8438da9589e7b608a83ffac1ef8211486bcb7c github.com/hashicorp/memberlist 3d8438da9589e7b608a83ffac1ef8211486bcb7c
github.com/sean-/seed e2103e2c35297fb7e17febb81e49b312087a2372 github.com/sean-/seed e2103e2c35297fb7e17febb81e49b312087a2372
github.com/hashicorp/go-sockaddr 6d291a969b86c4b633730bfc6b8b9d64c3aafed9 github.com/hashicorp/go-sockaddr 6d291a969b86c4b633730bfc6b8b9d64c3aafed9
github.com/hashicorp/go-multierror fcdddc395df1ddf4247c69bd436e84cfa0733f7e github.com/hashicorp/go-multierror fcdddc395df1ddf4247c69bd436e84cfa0733f7e
github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870 github.com/hashicorp/serf 598c54895cc5a7b1a24a398d635e8c0ea0959870
github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b github.com/docker/libkv 458977154600b9f23984d9f4b82e79570b5ae12b
github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25 github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25
github.com/vishvananda/netlink b2de5d10e38ecce8607e6b438b6d174f389a004e github.com/vishvananda/netlink b2de5d10e38ecce8607e6b438b6d174f389a004e
# When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly # When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv.installer accordingly
github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1 github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1
github.com/samuel/go-zookeeper d0e0d8e11f318e000a8cc434616d69e329edc374 github.com/samuel/go-zookeeper d0e0d8e11f318e000a8cc434616d69e329edc374
github.com/deckarep/golang-set ef32fa3046d9f249d399f98ebaf9be944430fd1d github.com/deckarep/golang-set ef32fa3046d9f249d399f98ebaf9be944430fd1d
github.com/coreos/etcd v3.3.9 github.com/coreos/etcd fca8add78a9d926166eb739b8e4a124434025ba3 # v3.3.9
github.com/coreos/go-semver v0.2.0 github.com/coreos/go-semver 8ab6407b697782a06568d4b7f1db25550ec2e4c6 # v0.2.0
github.com/ugorji/go v1.1.1 github.com/ugorji/go b4c50a2b199d93b13dc15e78929cfb23bfdf21ab # v1.1.1
github.com/hashicorp/consul v0.5.2 github.com/hashicorp/consul 9a9cc9341bb487651a0399e3fc5e1e8a42e62dd9 # v0.5.2
github.com/miekg/dns v1.0.7 github.com/miekg/dns e57bf427e68187a27e22adceac868350d7a7079b # v1.0.7
github.com/ishidawataru/sctp 07191f837fedd2f13d1ec7b5f885f0f3ec54b1cb github.com/ishidawataru/sctp 07191f837fedd2f13d1ec7b5f885f0f3ec54b1cb
go.etcd.io/bbolt v1.3.1-etcd.8 go.etcd.io/bbolt 7ee3ded59d4835e10f3e7d0f7603c42aa5e83820 # v1.3.1-etcd.8
# get graph and distribution packages # get graph and distribution packages
github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580
github.com/vbatts/tar-split v0.11.0 github.com/vbatts/tar-split 620714a4c508c880ac1bdda9c8370a2b19af1a55 # v0.11.0
github.com/opencontainers/go-digest v1.0.0-rc1 github.com/opencontainers/go-digest 279bed98673dd5bef374d3b6e4b09e2af76183bf # v1.0.0-rc1
# get go-zfs packages # get go-zfs packages
github.com/mistifyio/go-zfs 22c9b32c84eb0d0c6f4043b6e90fc94073de92fa github.com/mistifyio/go-zfs 22c9b32c84eb0d0c6f4043b6e90fc94073de92fa
github.com/pborman/uuid v1.0 github.com/pborman/uuid a97ce2ca70fa5a848076093f05e639a89ca34d06 # v1.0
google.golang.org/grpc v1.12.0 google.golang.org/grpc 7a6a684ca69eb4cae85ad0a484f2e531598c047b # v1.12.2
# The version of runc should match the version that is used by the containerd # The version of runc should match the version that is used by the containerd
# version that is used. If you need to update runc, open a pull request in # version that is used. If you need to update runc, open a pull request in
# the containerd project first, and update both after that is merged. # the containerd project first, and update both after that is merged.
# This commit does not need to match RUNC_COMMIT as it is used for helper # This commit does not need to match RUNC_COMMIT as it is used for helper
# packages but should be newer or equal. # packages but should be newer or equal.
github.com/opencontainers/runc 2b18fe1d885ee5083ef9f0838fee39b62d653e30 github.com/opencontainers/runc 029124da7af7360afa781a0234d1b083550f797c # v1.0.0-rc7-6-g029124da
github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db
github.com/opencontainers/image-spec v1.0.1 github.com/opencontainers/image-spec d60099175f88c47cd379c4738d158884749ed235 # v1.0.1
github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0 github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
# libcontainer deps (see src/github.com/opencontainers/runc/Godeps/Godeps.json) # libcontainer deps (see src/github.com/opencontainers/runc/Godeps/Godeps.json)
github.com/coreos/go-systemd v17 github.com/coreos/go-systemd 39ca1b05acc7ad1220e09f133283b8859a8b71ab # v17
github.com/godbus/dbus v4.0.0 github.com/godbus/dbus 5f6efc7ef2759c81b7ba876593971bfce311eab3 # v4.0.0
github.com/syndtr/gocapability 2c00daeb6c3b45114c80ac44119e7b8801fdd852 github.com/syndtr/gocapability 2c00daeb6c3b45114c80ac44119e7b8801fdd852
github.com/golang/protobuf v1.2.0 github.com/golang/protobuf aa810b61a9c79d51363740d207bb46cf8e620ed5 # v1.2.0
# gelf logging driver deps # gelf logging driver deps
github.com/Graylog2/go-gelf 4143646226541087117ff2f83334ea48b3201841 github.com/Graylog2/go-gelf 4143646226541087117ff2f83334ea48b3201841
github.com/fluent/fluent-logger-golang v1.3.0
# fluent-logger-golang deps # fluent-logger-golang deps
github.com/philhofer/fwd 98c11a7a6ec829d672b03833c3d69a7fae1ca972 github.com/fluent/fluent-logger-golang 8bbc2356beaf021b04c9bd5cdc76ea5a7ccb40ec # v1.3.0
github.com/tinylib/msgp 3b556c64540842d4f82967be066a7f7fffc3adad github.com/philhofer/fwd bb6d471dc95d4fe11e432687f8b70ff496cf3136 # v1.0.0
github.com/tinylib/msgp 3b556c64540842d4f82967be066a7f7fffc3adad
# fsnotify # fsnotify
github.com/fsnotify/fsnotify v1.4.7 github.com/fsnotify/fsnotify c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9 # v1.4.7
# awslogs deps # awslogs deps
github.com/aws/aws-sdk-go v1.12.66 github.com/aws/aws-sdk-go 9ed0c8de252f04ac45a65358377103d5a1aa2d92 # v1.12.66
github.com/go-ini/ini v1.25.4 github.com/go-ini/ini 300e940a926eb277d3901b20bdfcc54928ad3642 # v1.25.4
github.com/jmespath/go-jmespath 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74 github.com/jmespath/go-jmespath 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74
# logentries # logentries
github.com/bsphere/le_go 7a984a84b5492ae539b79b62fb4a10afc63c7bcf github.com/bsphere/le_go 7a984a84b5492ae539b79b62fb4a10afc63c7bcf
# gcplogs deps # gcplogs deps
golang.org/x/oauth2 ec22f46f877b4505e0117eeaab541714644fdd28 golang.org/x/oauth2 ec22f46f877b4505e0117eeaab541714644fdd28
google.golang.org/api de943baf05a022a8f921b544b7827bacaba1aed5 google.golang.org/api de943baf05a022a8f921b544b7827bacaba1aed5
go.opencensus.io v0.11.0 go.opencensus.io c3ed530f775d85e577ca652cb052a52c078aad26 # v0.11.0
cloud.google.com/go v0.23.0 cloud.google.com/go 0fd7230b2a7505833d5f69b75cbd6c9582401479 # v0.23.0
github.com/googleapis/gax-go v2.0.0 github.com/googleapis/gax-go 317e0006254c44a0ac427cc52a0e083ff0b9622f # v2.0.0
google.golang.org/genproto 694d95ba50e67b2e363f3483057db5d4910c18f9 google.golang.org/genproto 694d95ba50e67b2e363f3483057db5d4910c18f9
# containerd # containerd
github.com/containerd/containerd ceba56893a76f22cf0126c46d835c80fb3833408 github.com/containerd/containerd ceba56893a76f22cf0126c46d835c80fb3833408
github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
github.com/containerd/continuity 004b46473808b3e7a4a3049c20e4376c91eb966d github.com/containerd/continuity 004b46473808b3e7a4a3049c20e4376c91eb966d
github.com/containerd/cgroups 4994991857f9b0ae8dc439551e8bebdbb4bf66c1 github.com/containerd/cgroups 4994991857f9b0ae8dc439551e8bebdbb4bf66c1
github.com/containerd/console c12b1e7919c14469339a5d38f2f8ed9b64a9de23 github.com/containerd/console c12b1e7919c14469339a5d38f2f8ed9b64a9de23
github.com/containerd/go-runc 5a6d9f37cfa36b15efba46dc7ea349fa9b7143c3 github.com/containerd/go-runc 5a6d9f37cfa36b15efba46dc7ea349fa9b7143c3
github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40 github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40
github.com/containerd/ttrpc f02858b1457c5ca3aaec3a0803eb0d59f96e41d6 github.com/containerd/ttrpc f02858b1457c5ca3aaec3a0803eb0d59f96e41d6
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef
# cluster # cluster
github.com/docker/swarmkit 18e7e58ea1a5ec016625a636d0d52500eea123bc github.com/docker/swarmkit 18e7e58ea1a5ec016625a636d0d52500eea123bc
github.com/gogo/protobuf v1.2.0 github.com/gogo/protobuf 4cbf7e384e768b4e01799441fdf2a706a5635ae7 # v1.2.0
github.com/cloudflare/cfssl 1.3.2 github.com/cloudflare/cfssl 5d63dbd981b5c408effbb58c442d54761ff94fbd # 1.3.2
github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2 github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2
github.com/google/certificate-transparency-go v1.0.20 github.com/google/certificate-transparency-go 37a384cd035e722ea46e55029093e26687138edf # v1.0.20
golang.org/x/crypto b7391e95e576cacdcdd422573063bc057239113d golang.org/x/crypto 38d8ce5564a5b71b2e3a00553993f1b9a7ae852f
golang.org/x/time fbb02b2291d28baffd63558aa44b4b56f178d650 golang.org/x/time fbb02b2291d28baffd63558aa44b4b56f178d650
github.com/hashicorp/go-memdb cb9a474f84cc5e41b273b20c6927680b2a8776ad github.com/hashicorp/go-memdb cb9a474f84cc5e41b273b20c6927680b2a8776ad
github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git
github.com/hashicorp/golang-lru 0fb14efe8c47ae851c0034ed7a448854d3d34cf3 github.com/hashicorp/golang-lru 0fb14efe8c47ae851c0034ed7a448854d3d34cf3
github.com/coreos/pkg v3 github.com/coreos/pkg 3ac0863d7acf3bc44daf49afef8919af12f704ef # v3
github.com/pivotal-golang/clock 3fd3c1944c59d9742e1cd333672181cd1a6f9fa0 github.com/pivotal-golang/clock 3fd3c1944c59d9742e1cd333672181cd1a6f9fa0
github.com/prometheus/client_golang v0.8.0
github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceaf # prometheus
github.com/prometheus/client_model 6f3806018612930941127f2a7c6c453ba2c527d2 github.com/prometheus/client_golang c5b7fccd204277076155f10851dad72b76a49317 # v0.8.0
github.com/prometheus/common 7600349dcfe1abd18d72d3a1770870d9800a7801 github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb
github.com/prometheus/procfs 7d6f385de8bea29190f15ba9931442a0eaef9af7 github.com/prometheus/client_model 6f3806018612930941127f2a7c6c453ba2c527d2
github.com/matttproud/golang_protobuf_extensions v1.0.0 github.com/prometheus/common 7600349dcfe1abd18d72d3a1770870d9800a7801
github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d # v0.8.0 github.com/prometheus/procfs 7d6f385de8bea29190f15ba9931442a0eaef9af7
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/matttproud/golang_protobuf_extensions 3247c84500bff8d9fb6d579d800f20b3e091582c # v1.0.0
github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d # v0.8.0
github.com/grpc-ecosystem/go-grpc-prometheus c225b8c3b01faf2899099b768856a9e916e5087b # v1.2.0
# cli # cli
github.com/spf13/cobra v0.0.3 github.com/spf13/cobra ef82de70bb3f60c65fb8eebacbb2d122ef517385 # v0.0.3
github.com/spf13/pflag v1.0.1 github.com/spf13/pflag 583c0c0531f06d5278b7d917446061adc344b5cd # v1.0.1
github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0 github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 # v1.0.0
github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b github.com/morikuni/aec 39771216ff4c63d11f5e604076f9c45e8be1067b
# metrics # metrics
github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18 github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18
github.com/opencontainers/selinux 0bb7b9fa9ba5c1120e9d22caed4961fca4228408 # v1.2.1 github.com/opencontainers/selinux 0bb7b9fa9ba5c1120e9d22caed4961fca4228408 # v1.2.1

View File

@ -26,6 +26,7 @@ The tool is sponsored by the [marvin + konsorten GmbH](http://www.konsorten.de).
We thank all the authors who provided code to this library: We thank all the authors who provided code to this library:
* Felix Kollmann * Felix Kollmann
* Nicolas Perraut
## License ## License

View File

@ -0,0 +1,11 @@
// +build linux darwin
package sequences
import (
"fmt"
)
func EnableVirtualTerminalProcessing(stream uintptr, enable bool) error {
return fmt.Errorf("windows only package")
}

View File

@ -249,7 +249,7 @@ static int make_execfd(int *fdtype)
{ {
int fd = -1; int fd = -1;
char template[PATH_MAX] = {0}; char template[PATH_MAX] = {0};
char *prefix = secure_getenv("_LIBCONTAINER_STATEDIR"); char *prefix = getenv("_LIBCONTAINER_STATEDIR");
if (!prefix || *prefix != '/') if (!prefix || *prefix != '/')
prefix = "/tmp"; prefix = "/tmp";
@ -351,7 +351,7 @@ static int try_bindfd(void)
{ {
int fd, ret = -1; int fd, ret = -1;
char template[PATH_MAX] = {0}; char template[PATH_MAX] = {0};
char *prefix = secure_getenv("_LIBCONTAINER_STATEDIR"); char *prefix = getenv("_LIBCONTAINER_STATEDIR");
if (!prefix || *prefix != '/') if (!prefix || *prefix != '/')
prefix = "/tmp"; prefix = "/tmp";

View File

@ -5,7 +5,7 @@ github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4
# Core libcontainer functionality. # Core libcontainer functionality.
github.com/checkpoint-restore/go-criu v3.11 github.com/checkpoint-restore/go-criu v3.11
github.com/mrunalp/fileutils ed869b029674c0e9ce4c0dfa781405c2d9946d08 github.com/mrunalp/fileutils ed869b029674c0e9ce4c0dfa781405c2d9946d08
github.com/opencontainers/selinux v1.0.0-rc1 github.com/opencontainers/selinux v1.2.1
github.com/seccomp/libseccomp-golang 84e90a91acea0f4e51e62bc1a75de18b1fc0790f github.com/seccomp/libseccomp-golang 84e90a91acea0f4e51e62bc1a75de18b1fc0790f
github.com/sirupsen/logrus a3f95b5c423586578a4e099b11a46c2479628cac github.com/sirupsen/logrus a3f95b5c423586578a4e099b11a46c2479628cac
github.com/syndtr/gocapability db04d3cc01c8b54962a58ec7e491717d06cfcc16 github.com/syndtr/gocapability db04d3cc01c8b54962a58ec7e491717d06cfcc16

View File

@ -7,6 +7,7 @@ package terminal
import ( import (
"bytes" "bytes"
"io" "io"
"strconv"
"sync" "sync"
"unicode/utf8" "unicode/utf8"
) )
@ -271,34 +272,44 @@ func (t *Terminal) moveCursorToPos(pos int) {
} }
func (t *Terminal) move(up, down, left, right int) { func (t *Terminal) move(up, down, left, right int) {
movement := make([]rune, 3*(up+down+left+right)) m := []rune{}
m := movement
for i := 0; i < up; i++ { // 1 unit up can be expressed as ^[[A or ^[A
m[0] = keyEscape // 5 units up can be expressed as ^[[5A
m[1] = '['
m[2] = 'A' if up == 1 {
m = m[3:] m = append(m, keyEscape, '[', 'A')
} } else if up > 1 {
for i := 0; i < down; i++ { m = append(m, keyEscape, '[')
m[0] = keyEscape m = append(m, []rune(strconv.Itoa(up))...)
m[1] = '[' m = append(m, 'A')
m[2] = 'B'
m = m[3:]
}
for i := 0; i < left; i++ {
m[0] = keyEscape
m[1] = '['
m[2] = 'D'
m = m[3:]
}
for i := 0; i < right; i++ {
m[0] = keyEscape
m[1] = '['
m[2] = 'C'
m = m[3:]
} }
t.queue(movement) if down == 1 {
m = append(m, keyEscape, '[', 'B')
} else if down > 1 {
m = append(m, keyEscape, '[')
m = append(m, []rune(strconv.Itoa(down))...)
m = append(m, 'B')
}
if right == 1 {
m = append(m, keyEscape, '[', 'C')
} else if right > 1 {
m = append(m, keyEscape, '[')
m = append(m, []rune(strconv.Itoa(right))...)
m = append(m, 'C')
}
if left == 1 {
m = append(m, keyEscape, '[', 'D')
} else if left > 1 {
m = append(m, keyEscape, '[')
m = append(m, []rune(strconv.Itoa(left))...)
m = append(m, 'D')
}
t.queue(m)
} }
func (t *Terminal) clearLineToRight() { func (t *Terminal) clearLineToRight() {

View File

@ -2,18 +2,15 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build go1.7
// Package ctxhttp provides helper functions for performing context-aware HTTP requests. // Package ctxhttp provides helper functions for performing context-aware HTTP requests.
package ctxhttp // import "golang.org/x/net/context/ctxhttp" package ctxhttp // import "golang.org/x/net/context/ctxhttp"
import ( import (
"context"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"golang.org/x/net/context"
) )
// Do sends an HTTP request with the provided http.Client and returns // Do sends an HTTP request with the provided http.Client and returns

View File

@ -1,147 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.7
package ctxhttp // import "golang.org/x/net/context/ctxhttp"
import (
"io"
"net/http"
"net/url"
"strings"
"golang.org/x/net/context"
)
func nop() {}
var (
testHookContextDoneBeforeHeaders = nop
testHookDoReturned = nop
testHookDidBodyClose = nop
)
// Do sends an HTTP request with the provided http.Client and returns an HTTP response.
// If the client is nil, http.DefaultClient is used.
// If the context is canceled or times out, ctx.Err() will be returned.
func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
if client == nil {
client = http.DefaultClient
}
// TODO(djd): Respect any existing value of req.Cancel.
cancel := make(chan struct{})
req.Cancel = cancel
type responseAndError struct {
resp *http.Response
err error
}
result := make(chan responseAndError, 1)
// Make local copies of test hooks closed over by goroutines below.
// Prevents data races in tests.
testHookDoReturned := testHookDoReturned
testHookDidBodyClose := testHookDidBodyClose
go func() {
resp, err := client.Do(req)
testHookDoReturned()
result <- responseAndError{resp, err}
}()
var resp *http.Response
select {
case <-ctx.Done():
testHookContextDoneBeforeHeaders()
close(cancel)
// Clean up after the goroutine calling client.Do:
go func() {
if r := <-result; r.resp != nil {
testHookDidBodyClose()
r.resp.Body.Close()
}
}()
return nil, ctx.Err()
case r := <-result:
var err error
resp, err = r.resp, r.err
if err != nil {
return resp, err
}
}
c := make(chan struct{})
go func() {
select {
case <-ctx.Done():
close(cancel)
case <-c:
// The response's Body is closed.
}
}()
resp.Body = &notifyingReader{resp.Body, c}
return resp, nil
}
// Get issues a GET request via the Do function.
func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
}
return Do(ctx, client, req)
}
// Head issues a HEAD request via the Do function.
func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
req, err := http.NewRequest("HEAD", url, nil)
if err != nil {
return nil, err
}
return Do(ctx, client, req)
}
// Post issues a POST request via the Do function.
func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) {
req, err := http.NewRequest("POST", url, body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", bodyType)
return Do(ctx, client, req)
}
// PostForm issues a POST request via the Do function.
func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
}
// notifyingReader is an io.ReadCloser that closes the notify channel after
// Close is called or a Read fails on the underlying ReadCloser.
type notifyingReader struct {
io.ReadCloser
notify chan<- struct{}
}
func (r *notifyingReader) Read(p []byte) (int, error) {
n, err := r.ReadCloser.Read(p)
if err != nil && r.notify != nil {
close(r.notify)
r.notify = nil
}
return n, err
}
func (r *notifyingReader) Close() error {
err := r.ReadCloser.Close()
if r.notify != nil {
close(r.notify)
r.notify = nil
}
return err
}

View File

@ -1,82 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.6
package http2
import (
"crypto/tls"
"fmt"
"net/http"
)
func configureTransport(t1 *http.Transport) (*Transport, error) {
connPool := new(clientConnPool)
t2 := &Transport{
ConnPool: noDialClientConnPool{connPool},
t1: t1,
}
connPool.t = t2
if err := registerHTTPSProtocol(t1, noDialH2RoundTripper{t2}); err != nil {
return nil, err
}
if t1.TLSClientConfig == nil {
t1.TLSClientConfig = new(tls.Config)
}
if !strSliceContains(t1.TLSClientConfig.NextProtos, "h2") {
t1.TLSClientConfig.NextProtos = append([]string{"h2"}, t1.TLSClientConfig.NextProtos...)
}
if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") {
t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1")
}
upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper {
addr := authorityAddr("https", authority)
if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil {
go c.Close()
return erringRoundTripper{err}
} else if !used {
// Turns out we don't need this c.
// For example, two goroutines made requests to the same host
// at the same time, both kicking off TCP dials. (since protocol
// was unknown)
go c.Close()
}
return t2
}
if m := t1.TLSNextProto; len(m) == 0 {
t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{
"h2": upgradeFn,
}
} else {
m["h2"] = upgradeFn
}
return t2, nil
}
// registerHTTPSProtocol calls Transport.RegisterProtocol but
// converting panics into errors.
func registerHTTPSProtocol(t *http.Transport, rt noDialH2RoundTripper) (err error) {
defer func() {
if e := recover(); e != nil {
err = fmt.Errorf("%v", e)
}
}()
t.RegisterProtocol("https", rt)
return nil
}
// noDialH2RoundTripper is a RoundTripper which only tries to complete the request
// if there's already has a cached connection to the host.
// (The field is exported so it can be accessed via reflect from net/http; tested
// by TestNoDialH2RoundTripperType)
type noDialH2RoundTripper struct{ *Transport }
func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
res, err := rt.Transport.RoundTrip(req)
if isNoCachedConnError(err) {
return nil, http.ErrSkipAltProtocol
}
return res, err
}

View File

@ -643,7 +643,7 @@ func (f *Framer) WriteData(streamID uint32, endStream bool, data []byte) error {
return f.WriteDataPadded(streamID, endStream, data, nil) return f.WriteDataPadded(streamID, endStream, data, nil)
} }
// WriteData writes a DATA frame with optional padding. // WriteDataPadded writes a DATA frame with optional padding.
// //
// If pad is nil, the padding bit is not sent. // If pad is nil, the padding bit is not sent.
// The length of pad must not exceed 255 bytes. // The length of pad must not exceed 255 bytes.
@ -1477,7 +1477,7 @@ func (fr *Framer) maxHeaderStringLen() int {
} }
// readMetaFrame returns 0 or more CONTINUATION frames from fr and // readMetaFrame returns 0 or more CONTINUATION frames from fr and
// merge them into into the provided hf and returns a MetaHeadersFrame // merge them into the provided hf and returns a MetaHeadersFrame
// with the decoded hpack values. // with the decoded hpack values.
func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
if fr.AllowIllegalReads { if fr.AllowIllegalReads {

View File

@ -6,19 +6,22 @@
package http2 package http2
import "net/textproto" import (
"net/http/httptrace"
"net/textproto"
)
func traceHasWroteHeaderField(trace *clientTrace) bool { func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool {
return trace != nil && trace.WroteHeaderField != nil return trace != nil && trace.WroteHeaderField != nil
} }
func traceWroteHeaderField(trace *clientTrace, k, v string) { func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {
if trace != nil && trace.WroteHeaderField != nil { if trace != nil && trace.WroteHeaderField != nil {
trace.WroteHeaderField(k, []string{v}) trace.WroteHeaderField(k, []string{v})
} }
} }
func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error { func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error {
if trace != nil { if trace != nil {
return trace.Got1xxResponse return trace.Got1xxResponse
} }

View File

@ -1,16 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.6
package http2
import (
"net/http"
"time"
)
func transportExpectContinueTimeout(t1 *http.Transport) time.Duration {
return t1.ExpectContinueTimeout
}

121
vendor/golang.org/x/net/http2/go17.go generated vendored
View File

@ -1,121 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.7
package http2
import (
"context"
"net"
"net/http"
"net/http/httptrace"
"time"
)
type contextContext interface {
context.Context
}
var errCanceled = context.Canceled
func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) {
ctx, cancel = context.WithCancel(context.Background())
ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr())
if hs := opts.baseConfig(); hs != nil {
ctx = context.WithValue(ctx, http.ServerContextKey, hs)
}
return
}
func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) {
return context.WithCancel(ctx)
}
func requestWithContext(req *http.Request, ctx contextContext) *http.Request {
return req.WithContext(ctx)
}
type clientTrace httptrace.ClientTrace
func reqContext(r *http.Request) context.Context { return r.Context() }
func (t *Transport) idleConnTimeout() time.Duration {
if t.t1 != nil {
return t.t1.IdleConnTimeout
}
return 0
}
func setResponseUncompressed(res *http.Response) { res.Uncompressed = true }
func traceGetConn(req *http.Request, hostPort string) {
trace := httptrace.ContextClientTrace(req.Context())
if trace == nil || trace.GetConn == nil {
return
}
trace.GetConn(hostPort)
}
func traceGotConn(req *http.Request, cc *ClientConn) {
trace := httptrace.ContextClientTrace(req.Context())
if trace == nil || trace.GotConn == nil {
return
}
ci := httptrace.GotConnInfo{Conn: cc.tconn}
cc.mu.Lock()
ci.Reused = cc.nextStreamID > 1
ci.WasIdle = len(cc.streams) == 0 && ci.Reused
if ci.WasIdle && !cc.lastActive.IsZero() {
ci.IdleTime = time.Now().Sub(cc.lastActive)
}
cc.mu.Unlock()
trace.GotConn(ci)
}
func traceWroteHeaders(trace *clientTrace) {
if trace != nil && trace.WroteHeaders != nil {
trace.WroteHeaders()
}
}
func traceGot100Continue(trace *clientTrace) {
if trace != nil && trace.Got100Continue != nil {
trace.Got100Continue()
}
}
func traceWait100Continue(trace *clientTrace) {
if trace != nil && trace.Wait100Continue != nil {
trace.Wait100Continue()
}
}
func traceWroteRequest(trace *clientTrace, err error) {
if trace != nil && trace.WroteRequest != nil {
trace.WroteRequest(httptrace.WroteRequestInfo{Err: err})
}
}
func traceFirstResponseByte(trace *clientTrace) {
if trace != nil && trace.GotFirstResponseByte != nil {
trace.GotFirstResponseByte()
}
}
func requestTrace(req *http.Request) *clientTrace {
trace := httptrace.ContextClientTrace(req.Context())
return (*clientTrace)(trace)
}
// Ping sends a PING frame to the server and waits for the ack.
func (cc *ClientConn) Ping(ctx context.Context) error {
return cc.ping(ctx)
}
// Shutdown gracefully closes the client connection, waiting for running streams to complete.
func (cc *ClientConn) Shutdown(ctx context.Context) error {
return cc.shutdown(ctx)
}

View File

@ -1,36 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.7,!go1.8
package http2
import "crypto/tls"
// temporary copy of Go 1.7's private tls.Config.clone:
func cloneTLSConfig(c *tls.Config) *tls.Config {
return &tls.Config{
Rand: c.Rand,
Time: c.Time,
Certificates: c.Certificates,
NameToCertificate: c.NameToCertificate,
GetCertificate: c.GetCertificate,
RootCAs: c.RootCAs,
NextProtos: c.NextProtos,
ServerName: c.ServerName,
ClientAuth: c.ClientAuth,
ClientCAs: c.ClientCAs,
InsecureSkipVerify: c.InsecureSkipVerify,
CipherSuites: c.CipherSuites,
PreferServerCipherSuites: c.PreferServerCipherSuites,
SessionTicketsDisabled: c.SessionTicketsDisabled,
SessionTicketKey: c.SessionTicketKey,
ClientSessionCache: c.ClientSessionCache,
MinVersion: c.MinVersion,
MaxVersion: c.MaxVersion,
CurvePreferences: c.CurvePreferences,
DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled,
Renegotiation: c.Renegotiation,
}
}

View File

@ -1,56 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.8
package http2
import (
"crypto/tls"
"io"
"net/http"
)
func cloneTLSConfig(c *tls.Config) *tls.Config {
c2 := c.Clone()
c2.GetClientCertificate = c.GetClientCertificate // golang.org/issue/19264
return c2
}
var _ http.Pusher = (*responseWriter)(nil)
// Push implements http.Pusher.
func (w *responseWriter) Push(target string, opts *http.PushOptions) error {
internalOpts := pushOptions{}
if opts != nil {
internalOpts.Method = opts.Method
internalOpts.Header = opts.Header
}
return w.push(target, internalOpts)
}
func configureServer18(h1 *http.Server, h2 *Server) error {
if h2.IdleTimeout == 0 {
if h1.IdleTimeout != 0 {
h2.IdleTimeout = h1.IdleTimeout
} else {
h2.IdleTimeout = h1.ReadTimeout
}
}
return nil
}
func shouldLogPanic(panicValue interface{}) bool {
return panicValue != nil && panicValue != http.ErrAbortHandler
}
func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
return req.GetBody
}
func reqBodyIsNoBody(body io.ReadCloser) bool {
return body == http.NoBody
}
func go18httpNoBody() io.ReadCloser { return http.NoBody } // for tests only

View File

@ -1,16 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.9
package http2
import (
"net/http"
)
func configureServer19(s *http.Server, conf *Server) error {
s.RegisterOnShutdown(conf.state.startGracefulShutdown)
return nil
}

View File

@ -7,15 +7,21 @@ package http2
import ( import (
"net/http" "net/http"
"strings" "strings"
"sync"
) )
var ( var (
commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case commonBuildOnce sync.Once
commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case commonLowerHeader map[string]string // Go-Canonical-Case -> lower-case
commonCanonHeader map[string]string // lower-case -> Go-Canonical-Case
) )
func init() { func buildCommonHeaderMapsOnce() {
for _, v := range []string{ commonBuildOnce.Do(buildCommonHeaderMaps)
}
func buildCommonHeaderMaps() {
common := []string{
"accept", "accept",
"accept-charset", "accept-charset",
"accept-encoding", "accept-encoding",
@ -63,7 +69,10 @@ func init() {
"vary", "vary",
"via", "via",
"www-authenticate", "www-authenticate",
} { }
commonLowerHeader = make(map[string]string, len(common))
commonCanonHeader = make(map[string]string, len(common))
for _, v := range common {
chk := http.CanonicalHeaderKey(v) chk := http.CanonicalHeaderKey(v)
commonLowerHeader[chk] = v commonLowerHeader[chk] = v
commonCanonHeader[v] = chk commonCanonHeader[v] = chk
@ -71,6 +80,7 @@ func init() {
} }
func lowerHeader(v string) string { func lowerHeader(v string) string {
buildCommonHeaderMapsOnce()
if s, ok := commonLowerHeader[v]; ok { if s, ok := commonLowerHeader[v]; ok {
return s return s
} }

View File

@ -92,6 +92,8 @@ type Decoder struct {
// saveBuf is previous data passed to Write which we weren't able // saveBuf is previous data passed to Write which we weren't able
// to fully parse before. Unlike buf, we own this data. // to fully parse before. Unlike buf, we own this data.
saveBuf bytes.Buffer saveBuf bytes.Buffer
firstField bool // processing the first field of the header block
} }
// NewDecoder returns a new decoder with the provided maximum dynamic // NewDecoder returns a new decoder with the provided maximum dynamic
@ -101,6 +103,7 @@ func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decod
d := &Decoder{ d := &Decoder{
emit: emitFunc, emit: emitFunc,
emitEnabled: true, emitEnabled: true,
firstField: true,
} }
d.dynTab.table.init() d.dynTab.table.init()
d.dynTab.allowedMaxSize = maxDynamicTableSize d.dynTab.allowedMaxSize = maxDynamicTableSize
@ -226,11 +229,15 @@ func (d *Decoder) DecodeFull(p []byte) ([]HeaderField, error) {
return hf, nil return hf, nil
} }
// Close declares that the decoding is complete and resets the Decoder
// to be reused again for a new header block. If there is any remaining
// data in the decoder's buffer, Close returns an error.
func (d *Decoder) Close() error { func (d *Decoder) Close() error {
if d.saveBuf.Len() > 0 { if d.saveBuf.Len() > 0 {
d.saveBuf.Reset() d.saveBuf.Reset()
return DecodingError{errors.New("truncated headers")} return DecodingError{errors.New("truncated headers")}
} }
d.firstField = true
return nil return nil
} }
@ -266,6 +273,7 @@ func (d *Decoder) Write(p []byte) (n int, err error) {
d.saveBuf.Write(d.buf) d.saveBuf.Write(d.buf)
return len(p), nil return len(p), nil
} }
d.firstField = false
if err != nil { if err != nil {
break break
} }
@ -391,7 +399,7 @@ func (d *Decoder) callEmit(hf HeaderField) error {
func (d *Decoder) parseDynamicTableSizeUpdate() error { func (d *Decoder) parseDynamicTableSizeUpdate() error {
// RFC 7541, sec 4.2: This dynamic table size update MUST occur at the // RFC 7541, sec 4.2: This dynamic table size update MUST occur at the
// beginning of the first header block following the change to the dynamic table size. // beginning of the first header block following the change to the dynamic table size.
if d.dynTab.size > 0 { if !d.firstField && d.dynTab.size > 0 {
return DecodingError{errors.New("dynamic table size update MUST occur at the beginning of a header block")} return DecodingError{errors.New("dynamic table size update MUST occur at the beginning of a header block")}
} }

View File

@ -47,6 +47,7 @@ var ErrInvalidHuffman = errors.New("hpack: invalid Huffman-encoded data")
// If maxLen is greater than 0, attempts to write more to buf than // If maxLen is greater than 0, attempts to write more to buf than
// maxLen bytes will return ErrStringLength. // maxLen bytes will return ErrStringLength.
func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error { func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {
rootHuffmanNode := getRootHuffmanNode()
n := rootHuffmanNode n := rootHuffmanNode
// cur is the bit buffer that has not been fed into n. // cur is the bit buffer that has not been fed into n.
// cbits is the number of low order bits in cur that are valid. // cbits is the number of low order bits in cur that are valid.
@ -106,7 +107,7 @@ func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {
type node struct { type node struct {
// children is non-nil for internal nodes // children is non-nil for internal nodes
children []*node children *[256]*node
// The following are only valid if children is nil: // The following are only valid if children is nil:
codeLen uint8 // number of bits that led to the output of sym codeLen uint8 // number of bits that led to the output of sym
@ -114,22 +115,31 @@ type node struct {
} }
func newInternalNode() *node { func newInternalNode() *node {
return &node{children: make([]*node, 256)} return &node{children: new([256]*node)}
} }
var rootHuffmanNode = newInternalNode() var (
buildRootOnce sync.Once
lazyRootHuffmanNode *node
)
func init() { func getRootHuffmanNode() *node {
buildRootOnce.Do(buildRootHuffmanNode)
return lazyRootHuffmanNode
}
func buildRootHuffmanNode() {
if len(huffmanCodes) != 256 { if len(huffmanCodes) != 256 {
panic("unexpected size") panic("unexpected size")
} }
lazyRootHuffmanNode = newInternalNode()
for i, code := range huffmanCodes { for i, code := range huffmanCodes {
addDecoderNode(byte(i), code, huffmanCodeLen[i]) addDecoderNode(byte(i), code, huffmanCodeLen[i])
} }
} }
func addDecoderNode(sym byte, code uint32, codeLen uint8) { func addDecoderNode(sym byte, code uint32, codeLen uint8) {
cur := rootHuffmanNode cur := lazyRootHuffmanNode
for codeLen > 8 { for codeLen > 8 {
codeLen -= 8 codeLen -= 8
i := uint8(code >> codeLen) i := uint8(code >> codeLen)

View File

@ -201,19 +201,12 @@ func validWireHeaderFieldName(v string) bool {
return true return true
} }
var httpCodeStringCommon = map[int]string{} // n -> strconv.Itoa(n)
func init() {
for i := 100; i <= 999; i++ {
if v := http.StatusText(i); v != "" {
httpCodeStringCommon[i] = strconv.Itoa(i)
}
}
}
func httpCodeString(code int) string { func httpCodeString(code int) string {
if s, ok := httpCodeStringCommon[code]; ok { switch code {
return s case 200:
return "200"
case 404:
return "404"
} }
return strconv.Itoa(code) return strconv.Itoa(code)
} }

View File

@ -6,12 +6,15 @@
package http2 package http2
import "net/textproto" import (
"net/http/httptrace"
"net/textproto"
)
func traceHasWroteHeaderField(trace *clientTrace) bool { return false } func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { return false }
func traceWroteHeaderField(trace *clientTrace, k, v string) {} func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {}
func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error { func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error {
return nil return nil
} }

View File

@ -1,21 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.6
package http2
import (
"net/http"
"time"
)
func configureTransport(t1 *http.Transport) (*Transport, error) {
return nil, errTransportVersion
}
func transportExpectContinueTimeout(t1 *http.Transport) time.Duration {
return 0
}

View File

@ -1,95 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.7
package http2
import (
"crypto/tls"
"errors"
"net"
"net/http"
"time"
)
type contextContext interface {
Done() <-chan struct{}
Err() error
}
var errCanceled = errors.New("canceled")
type fakeContext struct{}
func (fakeContext) Done() <-chan struct{} { return nil }
func (fakeContext) Err() error { panic("should not be called") }
func reqContext(r *http.Request) fakeContext {
return fakeContext{}
}
func setResponseUncompressed(res *http.Response) {
// Nothing.
}
type clientTrace struct{}
func requestTrace(*http.Request) *clientTrace { return nil }
func traceGetConn(*http.Request, string) {}
func traceGotConn(*http.Request, *ClientConn) {}
func traceFirstResponseByte(*clientTrace) {}
func traceWroteHeaders(*clientTrace) {}
func traceWroteRequest(*clientTrace, error) {}
func traceGot100Continue(trace *clientTrace) {}
func traceWait100Continue(trace *clientTrace) {}
func nop() {}
func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) {
return nil, nop
}
func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) {
return ctx, nop
}
func requestWithContext(req *http.Request, ctx contextContext) *http.Request {
return req
}
// temporary copy of Go 1.6's private tls.Config.clone:
func cloneTLSConfig(c *tls.Config) *tls.Config {
return &tls.Config{
Rand: c.Rand,
Time: c.Time,
Certificates: c.Certificates,
NameToCertificate: c.NameToCertificate,
GetCertificate: c.GetCertificate,
RootCAs: c.RootCAs,
NextProtos: c.NextProtos,
ServerName: c.ServerName,
ClientAuth: c.ClientAuth,
ClientCAs: c.ClientCAs,
InsecureSkipVerify: c.InsecureSkipVerify,
CipherSuites: c.CipherSuites,
PreferServerCipherSuites: c.PreferServerCipherSuites,
SessionTicketsDisabled: c.SessionTicketsDisabled,
SessionTicketKey: c.SessionTicketKey,
ClientSessionCache: c.ClientSessionCache,
MinVersion: c.MinVersion,
MaxVersion: c.MaxVersion,
CurvePreferences: c.CurvePreferences,
}
}
func (cc *ClientConn) Ping(ctx contextContext) error {
return cc.ping(ctx)
}
func (cc *ClientConn) Shutdown(ctx contextContext) error {
return cc.shutdown(ctx)
}
func (t *Transport) idleConnTimeout() time.Duration { return 0 }

View File

@ -1,29 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.8
package http2
import (
"io"
"net/http"
)
func configureServer18(h1 *http.Server, h2 *Server) error {
// No IdleTimeout to sync prior to Go 1.8.
return nil
}
func shouldLogPanic(panicValue interface{}) bool {
return panicValue != nil
}
func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
return nil
}
func reqBodyIsNoBody(io.ReadCloser) bool { return false }
func go18httpNoBody() io.ReadCloser { return nil } // for tests only

View File

@ -1,16 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.9
package http2
import (
"net/http"
)
func configureServer19(s *http.Server, conf *Server) error {
// not supported prior to go1.9
return nil
}

View File

@ -28,6 +28,7 @@ package http2
import ( import (
"bufio" "bufio"
"bytes" "bytes"
"context"
"crypto/tls" "crypto/tls"
"errors" "errors"
"fmt" "fmt"
@ -209,12 +210,14 @@ func ConfigureServer(s *http.Server, conf *Server) error {
conf = new(Server) conf = new(Server)
} }
conf.state = &serverInternalState{activeConns: make(map[*serverConn]struct{})} conf.state = &serverInternalState{activeConns: make(map[*serverConn]struct{})}
if err := configureServer18(s, conf); err != nil { if h1, h2 := s, conf; h2.IdleTimeout == 0 {
return err if h1.IdleTimeout != 0 {
} h2.IdleTimeout = h1.IdleTimeout
if err := configureServer19(s, conf); err != nil { } else {
return err h2.IdleTimeout = h1.ReadTimeout
}
} }
s.RegisterOnShutdown(conf.state.startGracefulShutdown)
if s.TLSConfig == nil { if s.TLSConfig == nil {
s.TLSConfig = new(tls.Config) s.TLSConfig = new(tls.Config)
@ -435,6 +438,15 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
sc.serve() sc.serve()
} }
func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx context.Context, cancel func()) {
ctx, cancel = context.WithCancel(context.Background())
ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr())
if hs := opts.baseConfig(); hs != nil {
ctx = context.WithValue(ctx, http.ServerContextKey, hs)
}
return
}
func (sc *serverConn) rejectConn(err ErrCode, debug string) { func (sc *serverConn) rejectConn(err ErrCode, debug string) {
sc.vlogf("http2: server rejecting conn: %v, %s", err, debug) sc.vlogf("http2: server rejecting conn: %v, %s", err, debug)
// ignoring errors. hanging up anyway. // ignoring errors. hanging up anyway.
@ -450,7 +462,7 @@ type serverConn struct {
conn net.Conn conn net.Conn
bw *bufferedWriter // writing to conn bw *bufferedWriter // writing to conn
handler http.Handler handler http.Handler
baseCtx contextContext baseCtx context.Context
framer *Framer framer *Framer
doneServing chan struct{} // closed when serverConn.serve ends doneServing chan struct{} // closed when serverConn.serve ends
readFrameCh chan readFrameResult // written by serverConn.readFrames readFrameCh chan readFrameResult // written by serverConn.readFrames
@ -530,7 +542,7 @@ type stream struct {
id uint32 id uint32
body *pipe // non-nil if expecting DATA frames body *pipe // non-nil if expecting DATA frames
cw closeWaiter // closed wait stream transitions to closed state cw closeWaiter // closed wait stream transitions to closed state
ctx contextContext ctx context.Context
cancelCtx func() cancelCtx func()
// owned by serverConn's serve loop: // owned by serverConn's serve loop:
@ -663,6 +675,7 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) {
func (sc *serverConn) canonicalHeader(v string) string { func (sc *serverConn) canonicalHeader(v string) string {
sc.serveG.check() sc.serveG.check()
buildCommonHeaderMapsOnce()
cv, ok := commonCanonHeader[v] cv, ok := commonCanonHeader[v]
if ok { if ok {
return cv return cv
@ -1109,7 +1122,7 @@ func (sc *serverConn) startFrameWrite(wr FrameWriteRequest) {
// errHandlerPanicked is the error given to any callers blocked in a read from // errHandlerPanicked is the error given to any callers blocked in a read from
// Request.Body when the main goroutine panics. Since most handlers read in the // Request.Body when the main goroutine panics. Since most handlers read in the
// the main ServeHTTP goroutine, this will show up rarely. // main ServeHTTP goroutine, this will show up rarely.
var errHandlerPanicked = errors.New("http2: handler panicked") var errHandlerPanicked = errors.New("http2: handler panicked")
// wroteFrame is called on the serve goroutine with the result of // wroteFrame is called on the serve goroutine with the result of
@ -1581,12 +1594,6 @@ func (sc *serverConn) processData(f *DataFrame) error {
// type PROTOCOL_ERROR." // type PROTOCOL_ERROR."
return ConnectionError(ErrCodeProtocol) return ConnectionError(ErrCodeProtocol)
} }
// RFC 7540, sec 6.1: If a DATA frame is received whose stream is not in
// "open" or "half-closed (local)" state, the recipient MUST respond with a
// stream error (Section 5.4.2) of type STREAM_CLOSED.
if state == stateClosed {
return streamError(id, ErrCodeStreamClosed)
}
if st == nil || state != stateOpen || st.gotTrailerHeader || st.resetQueued { if st == nil || state != stateOpen || st.gotTrailerHeader || st.resetQueued {
// This includes sending a RST_STREAM if the stream is // This includes sending a RST_STREAM if the stream is
// in stateHalfClosedLocal (which currently means that // in stateHalfClosedLocal (which currently means that
@ -1881,7 +1888,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream
panic("internal error: cannot create stream with id 0") panic("internal error: cannot create stream with id 0")
} }
ctx, cancelCtx := contextWithCancel(sc.baseCtx) ctx, cancelCtx := context.WithCancel(sc.baseCtx)
st := &stream{ st := &stream{
sc: sc, sc: sc,
id: id, id: id,
@ -2047,7 +2054,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r
Body: body, Body: body,
Trailer: trailer, Trailer: trailer,
} }
req = requestWithContext(req, st.ctx) req = req.WithContext(st.ctx)
rws := responseWriterStatePool.Get().(*responseWriterState) rws := responseWriterStatePool.Get().(*responseWriterState)
bwSave := rws.bw bwSave := rws.bw
@ -2075,7 +2082,7 @@ func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler
stream: rw.rws.stream, stream: rw.rws.stream,
}) })
// Same as net/http: // Same as net/http:
if shouldLogPanic(e) { if e != nil && e != http.ErrAbortHandler {
const size = 64 << 10 const size = 64 << 10
buf := make([]byte, size) buf := make([]byte, size)
buf = buf[:runtime.Stack(buf, false)] buf = buf[:runtime.Stack(buf, false)]
@ -2346,15 +2353,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
} }
_, hasContentType := rws.snapHeader["Content-Type"] _, hasContentType := rws.snapHeader["Content-Type"]
if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 { if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 {
if cto := rws.snapHeader.Get("X-Content-Type-Options"); strings.EqualFold("nosniff", cto) { ctype = http.DetectContentType(p)
// nosniff is an explicit directive not to guess a content-type.
// Content-sniffing is no less susceptible to polyglot attacks via
// hosted content when done on the server.
ctype = "application/octet-stream"
rws.conn.logf("http2: WriteHeader called with X-Content-Type-Options:nosniff but no Content-Type")
} else {
ctype = http.DetectContentType(p)
}
} }
var date string var date string
if _, ok := rws.snapHeader["Date"]; !ok { if _, ok := rws.snapHeader["Date"]; !ok {
@ -2645,14 +2644,9 @@ var (
ErrPushLimitReached = errors.New("http2: push would exceed peer's SETTINGS_MAX_CONCURRENT_STREAMS") ErrPushLimitReached = errors.New("http2: push would exceed peer's SETTINGS_MAX_CONCURRENT_STREAMS")
) )
// pushOptions is the internal version of http.PushOptions, which we var _ http.Pusher = (*responseWriter)(nil)
// cannot include here because it's only defined in Go 1.8 and later.
type pushOptions struct {
Method string
Header http.Header
}
func (w *responseWriter) push(target string, opts pushOptions) error { func (w *responseWriter) Push(target string, opts *http.PushOptions) error {
st := w.rws.stream st := w.rws.stream
sc := st.sc sc := st.sc
sc.serveG.checkNotOn() sc.serveG.checkNotOn()
@ -2663,6 +2657,10 @@ func (w *responseWriter) push(target string, opts pushOptions) error {
return ErrRecursivePush return ErrRecursivePush
} }
if opts == nil {
opts = new(http.PushOptions)
}
// Default options. // Default options.
if opts.Method == "" { if opts.Method == "" {
opts.Method = "GET" opts.Method = "GET"

View File

@ -10,6 +10,7 @@ import (
"bufio" "bufio"
"bytes" "bytes"
"compress/gzip" "compress/gzip"
"context"
"crypto/rand" "crypto/rand"
"crypto/tls" "crypto/tls"
"errors" "errors"
@ -21,6 +22,7 @@ import (
mathrand "math/rand" mathrand "math/rand"
"net" "net"
"net/http" "net/http"
"net/http/httptrace"
"net/textproto" "net/textproto"
"sort" "sort"
"strconv" "strconv"
@ -95,6 +97,16 @@ type Transport struct {
// to mean no limit. // to mean no limit.
MaxHeaderListSize uint32 MaxHeaderListSize uint32
// StrictMaxConcurrentStreams controls whether the server's
// SETTINGS_MAX_CONCURRENT_STREAMS should be respected
// globally. If false, new TCP connections are created to the
// server as needed to keep each under the per-connection
// SETTINGS_MAX_CONCURRENT_STREAMS limit. If true, the
// server's SETTINGS_MAX_CONCURRENT_STREAMS is interpreted as
// a global limit and callers of RoundTrip block when needed,
// waiting for their turn.
StrictMaxConcurrentStreams bool
// t1, if non-nil, is the standard library Transport using // t1, if non-nil, is the standard library Transport using
// this transport. Its settings are used (but not its // this transport. Its settings are used (but not its
// RoundTrip method, etc). // RoundTrip method, etc).
@ -118,16 +130,56 @@ func (t *Transport) disableCompression() bool {
return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression)
} }
var errTransportVersion = errors.New("http2: ConfigureTransport is only supported starting at Go 1.6")
// ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. // ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2.
// It requires Go 1.6 or later and returns an error if the net/http package is too old // It returns an error if t1 has already been HTTP/2-enabled.
// or if t1 has already been HTTP/2-enabled.
func ConfigureTransport(t1 *http.Transport) error { func ConfigureTransport(t1 *http.Transport) error {
_, err := configureTransport(t1) // in configure_transport.go (go1.6) or not_go16.go _, err := configureTransport(t1)
return err return err
} }
func configureTransport(t1 *http.Transport) (*Transport, error) {
connPool := new(clientConnPool)
t2 := &Transport{
ConnPool: noDialClientConnPool{connPool},
t1: t1,
}
connPool.t = t2
if err := registerHTTPSProtocol(t1, noDialH2RoundTripper{t2}); err != nil {
return nil, err
}
if t1.TLSClientConfig == nil {
t1.TLSClientConfig = new(tls.Config)
}
if !strSliceContains(t1.TLSClientConfig.NextProtos, "h2") {
t1.TLSClientConfig.NextProtos = append([]string{"h2"}, t1.TLSClientConfig.NextProtos...)
}
if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") {
t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1")
}
upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper {
addr := authorityAddr("https", authority)
if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil {
go c.Close()
return erringRoundTripper{err}
} else if !used {
// Turns out we don't need this c.
// For example, two goroutines made requests to the same host
// at the same time, both kicking off TCP dials. (since protocol
// was unknown)
go c.Close()
}
return t2
}
if m := t1.TLSNextProto; len(m) == 0 {
t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{
"h2": upgradeFn,
}
} else {
m["h2"] = upgradeFn
}
return t2, nil
}
func (t *Transport) connPool() ClientConnPool { func (t *Transport) connPool() ClientConnPool {
t.connPoolOnce.Do(t.initConnPool) t.connPoolOnce.Do(t.initConnPool)
return t.connPoolOrDef return t.connPoolOrDef
@ -192,7 +244,7 @@ type ClientConn struct {
type clientStream struct { type clientStream struct {
cc *ClientConn cc *ClientConn
req *http.Request req *http.Request
trace *clientTrace // or nil trace *httptrace.ClientTrace // or nil
ID uint32 ID uint32
resc chan resAndError resc chan resAndError
bufPipe pipe // buffered pipe with the flow-controlled response payload bufPipe pipe // buffered pipe with the flow-controlled response payload
@ -226,7 +278,7 @@ type clientStream struct {
// channel to be signaled. A non-nil error is returned only if the request was // channel to be signaled. A non-nil error is returned only if the request was
// canceled. // canceled.
func awaitRequestCancel(req *http.Request, done <-chan struct{}) error { func awaitRequestCancel(req *http.Request, done <-chan struct{}) error {
ctx := reqContext(req) ctx := req.Context()
if req.Cancel == nil && ctx.Done() == nil { if req.Cancel == nil && ctx.Done() == nil {
return nil return nil
} }
@ -401,8 +453,8 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
select { select {
case <-time.After(time.Second * time.Duration(backoff)): case <-time.After(time.Second * time.Duration(backoff)):
continue continue
case <-reqContext(req).Done(): case <-req.Context().Done():
return nil, reqContext(req).Err() return nil, req.Context().Err()
} }
} }
} }
@ -439,16 +491,15 @@ func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*htt
} }
// If the Body is nil (or http.NoBody), it's safe to reuse // If the Body is nil (or http.NoBody), it's safe to reuse
// this request and its Body. // this request and its Body.
if req.Body == nil || reqBodyIsNoBody(req.Body) { if req.Body == nil || req.Body == http.NoBody {
return req, nil return req, nil
} }
// If the request body can be reset back to its original // If the request body can be reset back to its original
// state via the optional req.GetBody, do that. // state via the optional req.GetBody, do that.
getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody if req.GetBody != nil {
if getBody != nil {
// TODO: consider a req.Body.Close here? or audit that all caller paths do? // TODO: consider a req.Body.Close here? or audit that all caller paths do?
body, err := getBody() body, err := req.GetBody()
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -494,7 +545,7 @@ func (t *Transport) dialClientConn(addr string, singleUse bool) (*ClientConn, er
func (t *Transport) newTLSConfig(host string) *tls.Config { func (t *Transport) newTLSConfig(host string) *tls.Config {
cfg := new(tls.Config) cfg := new(tls.Config)
if t.TLSClientConfig != nil { if t.TLSClientConfig != nil {
*cfg = *cloneTLSConfig(t.TLSClientConfig) *cfg = *t.TLSClientConfig.Clone()
} }
if !strSliceContains(cfg.NextProtos, NextProtoTLS) { if !strSliceContains(cfg.NextProtos, NextProtoTLS) {
cfg.NextProtos = append([]string{NextProtoTLS}, cfg.NextProtos...) cfg.NextProtos = append([]string{NextProtoTLS}, cfg.NextProtos...)
@ -545,7 +596,7 @@ func (t *Transport) expectContinueTimeout() time.Duration {
if t.t1 == nil { if t.t1 == nil {
return 0 return 0
} }
return transportExpectContinueTimeout(t.t1) return t.t1.ExpectContinueTimeout
} }
func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
@ -670,8 +721,19 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
if cc.singleUse && cc.nextStreamID > 1 { if cc.singleUse && cc.nextStreamID > 1 {
return return
} }
st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && var maxConcurrentOkay bool
int64(cc.nextStreamID)+int64(cc.pendingRequests) < math.MaxInt32 if cc.t.StrictMaxConcurrentStreams {
// We'll tell the caller we can take a new request to
// prevent the caller from dialing a new TCP
// connection, but then we'll block later before
// writing it.
maxConcurrentOkay = true
} else {
maxConcurrentOkay = int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams)
}
st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay &&
int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32
st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest
return return
} }
@ -711,8 +773,7 @@ func (cc *ClientConn) closeIfIdle() {
var shutdownEnterWaitStateHook = func() {} var shutdownEnterWaitStateHook = func() {}
// Shutdown gracefully close the client connection, waiting for running streams to complete. // Shutdown gracefully close the client connection, waiting for running streams to complete.
// Public implementation is in go17.go and not_go17.go func (cc *ClientConn) Shutdown(ctx context.Context) error {
func (cc *ClientConn) shutdown(ctx contextContext) error {
if err := cc.sendGoAway(); err != nil { if err := cc.sendGoAway(); err != nil {
return err return err
} }
@ -882,7 +943,7 @@ func checkConnHeaders(req *http.Request) error {
// req.ContentLength, where 0 actually means zero (not unknown) and -1 // req.ContentLength, where 0 actually means zero (not unknown) and -1
// means unknown. // means unknown.
func actualContentLength(req *http.Request) int64 { func actualContentLength(req *http.Request) int64 {
if req.Body == nil || reqBodyIsNoBody(req.Body) { if req.Body == nil || req.Body == http.NoBody {
return 0 return 0
} }
if req.ContentLength != 0 { if req.ContentLength != 0 {
@ -952,7 +1013,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf
cs := cc.newStream() cs := cc.newStream()
cs.req = req cs.req = req
cs.trace = requestTrace(req) cs.trace = httptrace.ContextClientTrace(req.Context())
cs.requestedGzip = requestedGzip cs.requestedGzip = requestedGzip
bodyWriter := cc.t.getBodyWriterState(cs, body) bodyWriter := cc.t.getBodyWriterState(cs, body)
cs.on100 = bodyWriter.on100 cs.on100 = bodyWriter.on100
@ -990,7 +1051,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf
readLoopResCh := cs.resc readLoopResCh := cs.resc
bodyWritten := false bodyWritten := false
ctx := reqContext(req) ctx := req.Context()
handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) { handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) {
res := re.res res := re.res
@ -1060,6 +1121,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf
default: default:
} }
if err != nil { if err != nil {
cc.forgetStreamID(cs.ID)
return nil, cs.getStartedWrite(), err return nil, cs.getStartedWrite(), err
} }
bodyWritten = true bodyWritten = true
@ -1181,6 +1243,7 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
sawEOF = true sawEOF = true
err = nil err = nil
} else if err != nil { } else if err != nil {
cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
return err return err
} }
@ -1348,7 +1411,11 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
// 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]). // [RFC3986]).
f(":authority", host) f(":authority", host)
f(":method", req.Method) m := req.Method
if m == "" {
m = http.MethodGet
}
f(":method", m)
if req.Method != "CONNECT" { if req.Method != "CONNECT" {
f(":path", path) f(":path", path)
f(":scheme", req.URL.Scheme) f(":scheme", req.URL.Scheme)
@ -1416,7 +1483,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
return nil, errRequestHeaderListSize return nil, errRequestHeaderListSize
} }
trace := requestTrace(req) trace := httptrace.ContextClientTrace(req.Context())
traceHeaders := traceHasWroteHeaderField(trace) traceHeaders := traceHasWroteHeaderField(trace)
// Header list size is ok. Write the headers. // Header list size is ok. Write the headers.
@ -1839,7 +1906,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
res.Header.Del("Content-Length") res.Header.Del("Content-Length")
res.ContentLength = -1 res.ContentLength = -1
res.Body = &gzipReader{body: res.Body} res.Body = &gzipReader{body: res.Body}
setResponseUncompressed(res) res.Uncompressed = true
} }
return res, nil return res, nil
} }
@ -2216,8 +2283,7 @@ func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error {
} }
// Ping sends a PING frame to the server and waits for the ack. // Ping sends a PING frame to the server and waits for the ack.
// Public implementation is in go17.go and not_go17.go func (cc *ClientConn) Ping(ctx context.Context) error {
func (cc *ClientConn) ping(ctx contextContext) error {
c := make(chan struct{}) c := make(chan struct{})
// Generate a random payload // Generate a random payload
var p [8]byte var p [8]byte
@ -2451,3 +2517,91 @@ func (s bodyWriterState) scheduleBodyWrite() {
func isConnectionCloseRequest(req *http.Request) bool { func isConnectionCloseRequest(req *http.Request) bool {
return req.Close || httpguts.HeaderValuesContainsToken(req.Header["Connection"], "close") return req.Close || httpguts.HeaderValuesContainsToken(req.Header["Connection"], "close")
} }
// registerHTTPSProtocol calls Transport.RegisterProtocol but
// converting panics into errors.
func registerHTTPSProtocol(t *http.Transport, rt noDialH2RoundTripper) (err error) {
defer func() {
if e := recover(); e != nil {
err = fmt.Errorf("%v", e)
}
}()
t.RegisterProtocol("https", rt)
return nil
}
// noDialH2RoundTripper is a RoundTripper which only tries to complete the request
// if there's already has a cached connection to the host.
// (The field is exported so it can be accessed via reflect from net/http; tested
// by TestNoDialH2RoundTripperType)
type noDialH2RoundTripper struct{ *Transport }
func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
res, err := rt.Transport.RoundTrip(req)
if isNoCachedConnError(err) {
return nil, http.ErrSkipAltProtocol
}
return res, err
}
func (t *Transport) idleConnTimeout() time.Duration {
if t.t1 != nil {
return t.t1.IdleConnTimeout
}
return 0
}
func traceGetConn(req *http.Request, hostPort string) {
trace := httptrace.ContextClientTrace(req.Context())
if trace == nil || trace.GetConn == nil {
return
}
trace.GetConn(hostPort)
}
func traceGotConn(req *http.Request, cc *ClientConn) {
trace := httptrace.ContextClientTrace(req.Context())
if trace == nil || trace.GotConn == nil {
return
}
ci := httptrace.GotConnInfo{Conn: cc.tconn}
cc.mu.Lock()
ci.Reused = cc.nextStreamID > 1
ci.WasIdle = len(cc.streams) == 0 && ci.Reused
if ci.WasIdle && !cc.lastActive.IsZero() {
ci.IdleTime = time.Now().Sub(cc.lastActive)
}
cc.mu.Unlock()
trace.GotConn(ci)
}
func traceWroteHeaders(trace *httptrace.ClientTrace) {
if trace != nil && trace.WroteHeaders != nil {
trace.WroteHeaders()
}
}
func traceGot100Continue(trace *httptrace.ClientTrace) {
if trace != nil && trace.Got100Continue != nil {
trace.Got100Continue()
}
}
func traceWait100Continue(trace *httptrace.ClientTrace) {
if trace != nil && trace.Wait100Continue != nil {
trace.Wait100Continue()
}
}
func traceWroteRequest(trace *httptrace.ClientTrace, err error) {
if trace != nil && trace.WroteRequest != nil {
trace.WroteRequest(httptrace.WroteRequestInfo{Err: err})
}
}
func traceFirstResponseByte(trace *httptrace.ClientTrace) {
if trace != nil && trace.GotFirstResponseByte != nil {
trace.GotFirstResponseByte()
}
}

View File

@ -199,7 +199,7 @@ func (w *writeResHeaders) staysWithinBuffer(max int) bool {
// TODO: this is a common one. It'd be nice to return true // TODO: this is a common one. It'd be nice to return true
// here and get into the fast path if we could be clever and // here and get into the fast path if we could be clever and
// calculate the size fast enough, or at least a conservative // calculate the size fast enough, or at least a conservative
// uppper bound that usually fires. (Maybe if w.h and // upper bound that usually fires. (Maybe if w.h and
// w.trailers are nil, so we don't need to enumerate it.) // w.trailers are nil, so we don't need to enumerate it.)
// Otherwise I'm afraid that just calculating the length to // Otherwise I'm afraid that just calculating the length to
// answer this question would be slower than the ~2µs benefit. // answer this question would be slower than the ~2µs benefit.
@ -329,7 +329,7 @@ func (wu writeWindowUpdate) writeFrame(ctx writeContext) error {
} }
// encodeHeaders encodes an http.Header. If keys is not nil, then (k, h[k]) // encodeHeaders encodes an http.Header. If keys is not nil, then (k, h[k])
// is encoded only only if k is in keys. // is encoded only if k is in keys.
func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) { func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) {
if keys == nil { if keys == nil {
sorter := sorterPool.Get().(*sorter) sorter := sorterPool.Get().(*sorter)

View File

@ -224,6 +224,7 @@ func (d *Dialer) Dial(network, address string) (net.Conn, error) {
return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err}
} }
if _, err := d.DialWithConn(context.Background(), c, network, address); err != nil { if _, err := d.DialWithConn(context.Background(), c, network, address); err != nil {
c.Close()
return nil, err return nil, err
} }
return c, nil return c, nil

View File

@ -79,8 +79,13 @@ func FromURL(u *url.URL, forward Dialer) (Dialer, error) {
} }
switch u.Scheme { switch u.Scheme {
case "socks5": case "socks5", "socks5h":
return SOCKS5("tcp", u.Host, auth, forward) addr := u.Hostname()
port := u.Port()
if port == "" {
port = "1080"
}
return SOCKS5("tcp", net.JoinHostPort(addr, port), auth, forward)
} }
// If the scheme doesn't match any of the built-in schemes, see if it // If the scheme doesn't match any of the built-in schemes, see if it

View File

@ -64,12 +64,14 @@ package trace // import "golang.org/x/net/trace"
import ( import (
"bytes" "bytes"
"context"
"fmt" "fmt"
"html/template" "html/template"
"io" "io"
"log" "log"
"net" "net"
"net/http" "net/http"
"net/url"
"runtime" "runtime"
"sort" "sort"
"strconv" "strconv"
@ -84,6 +86,12 @@ import (
// FOR DEBUGGING ONLY. This will slow down the program. // FOR DEBUGGING ONLY. This will slow down the program.
var DebugUseAfterFinish = false var DebugUseAfterFinish = false
// HTTP ServeMux paths.
const (
debugRequestsPath = "/debug/requests"
debugEventsPath = "/debug/events"
)
// AuthRequest determines whether a specific request is permitted to load the // AuthRequest determines whether a specific request is permitted to load the
// /debug/requests or /debug/events pages. // /debug/requests or /debug/events pages.
// //
@ -110,10 +118,29 @@ var AuthRequest = func(req *http.Request) (any, sensitive bool) {
} }
func init() { func init() {
_, pat := http.DefaultServeMux.Handler(&http.Request{URL: &url.URL{Path: debugRequestsPath}})
if pat == debugRequestsPath {
panic("/debug/requests is already registered. You may have two independent copies of " +
"golang.org/x/net/trace in your binary, trying to maintain separate state. This may " +
"involve a vendored copy of golang.org/x/net/trace.")
}
// TODO(jbd): Serve Traces from /debug/traces in the future? // TODO(jbd): Serve Traces from /debug/traces in the future?
// There is no requirement for a request to be present to have traces. // There is no requirement for a request to be present to have traces.
http.HandleFunc("/debug/requests", Traces) http.HandleFunc(debugRequestsPath, Traces)
http.HandleFunc("/debug/events", Events) http.HandleFunc(debugEventsPath, Events)
}
// NewContext returns a copy of the parent context
// and associates it with a Trace.
func NewContext(ctx context.Context, tr Trace) context.Context {
return context.WithValue(ctx, contextKey, tr)
}
// FromContext returns the Trace bound to the context, if any.
func FromContext(ctx context.Context) (tr Trace, ok bool) {
tr, ok = ctx.Value(contextKey).(Trace)
return
} }
// Traces responds with traces from the program. // Traces responds with traces from the program.

View File

@ -1,21 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.7
package trace
import "golang.org/x/net/context"
// NewContext returns a copy of the parent context
// and associates it with a Trace.
func NewContext(ctx context.Context, tr Trace) context.Context {
return context.WithValue(ctx, contextKey, tr)
}
// FromContext returns the Trace bound to the context, if any.
func FromContext(ctx context.Context) (tr Trace, ok bool) {
tr, ok = ctx.Value(contextKey).(Trace)
return
}

View File

@ -1,21 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.7
package trace
import "context"
// NewContext returns a copy of the parent context
// and associates it with a Trace.
func NewContext(ctx context.Context, tr Trace) context.Context {
return context.WithValue(ctx, contextKey, tr)
}
// FromContext returns the Trace bound to the context, if any.
func FromContext(ctx context.Context) (tr Trace, ok bool) {
tr, ok = ctx.Value(contextKey).(Trace)
return
}

View File

@ -32,9 +32,9 @@ type Weighted struct {
waiters list.List waiters list.List
} }
// Acquire acquires the semaphore with a weight of n, blocking only until ctx // Acquire acquires the semaphore with a weight of n, blocking until resources
// is done. On success, returns nil. On failure, returns ctx.Err() and leaves // are available or ctx is done. On success, returns nil. On failure, returns
// the semaphore unchanged. // ctx.Err() and leaves the semaphore unchanged.
// //
// If ctx is already done, Acquire may still succeed without blocking. // If ctx is already done, Acquire may still succeed without blocking.
func (s *Weighted) Acquire(ctx context.Context, n int64) error { func (s *Weighted) Acquire(ctx context.Context, n int64) error {

30
vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go generated vendored Normal file
View File

@ -0,0 +1,30 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build aix,ppc64
package cpu
import "golang.org/x/sys/unix"
const cacheLineSize = 128
const (
// getsystemcfg constants
_SC_IMPL = 2
_IMPL_POWER8 = 0x10000
_IMPL_POWER9 = 0x20000
)
func init() {
impl := unix.Getsystemcfg(_SC_IMPL)
if impl&_IMPL_POWER8 != 0 {
PPC64.IsPOWER8 = true
}
if impl&_IMPL_POWER9 != 0 {
PPC64.IsPOWER9 = true
}
Initialized = true
}

View File

@ -1,12 +0,0 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !linux
// +build ppc64 ppc64le
package cpu
const cacheLineSize = 128
func doinit() {}

15
vendor/golang.org/x/sys/cpu/cpu_wasm.go generated vendored Normal file
View File

@ -0,0 +1,15 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build wasm
package cpu
// We're compiling the cpu package for an unknown (software-abstracted) CPU.
// Make CacheLinePad an empty struct and hope that the usual struct alignment
// rules are good enough.
const cacheLineSize = 0
func doinit() {}

View File

@ -545,3 +545,5 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
//sys gettimeofday(tv *Timeval, tzp *Timezone) (err error) //sys gettimeofday(tv *Timeval, tzp *Timezone) (err error)
//sysnb Time(t *Time_t) (tt Time_t, err error) //sysnb Time(t *Time_t) (tt Time_t, err error)
//sys Utime(path string, buf *Utimbuf) (err error) //sys Utime(path string, buf *Utimbuf) (err error)
//sys Getsystemcfg(label int) (n uint64)

View File

@ -144,6 +144,23 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) //sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
func SysctlClockinfo(name string) (*Clockinfo, error) {
mib, err := sysctlmib(name)
if err != nil {
return nil, err
}
n := uintptr(SizeofClockinfo)
var ci Clockinfo
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
return nil, err
}
if n != SizeofClockinfo {
return nil, EIO
}
return &ci, nil
}
//sysnb pipe() (r int, w int, err error) //sysnb pipe() (r int, w int, err error)
func Pipe(p []int) (err error) { func Pipe(p []int) (err error) {

View File

@ -39,6 +39,20 @@ func Creat(path string, mode uint32) (fd int, err error) {
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode) return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
} }
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (err error) {
if pathname == "" {
return fanotifyMark(fd, flags, mask, dirFd, nil)
}
p, err := BytePtrFromString(pathname)
if err != nil {
return err
}
return fanotifyMark(fd, flags, mask, dirFd, p)
}
//sys fchmodat(dirfd int, path string, mode uint32) (err error) //sys fchmodat(dirfd int, path string, mode uint32) (err error)
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@ -990,10 +1004,28 @@ func GetsockoptString(fd, level, opt int) (string, error) {
return string(buf[:vallen-1]), nil return string(buf[:vallen-1]), nil
} }
func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) {
var value TpacketStats
vallen := _Socklen(SizeofTpacketStats)
err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
return &value, err
}
func GetsockoptTpacketStatsV3(fd, level, opt int) (*TpacketStatsV3, error) {
var value TpacketStatsV3
vallen := _Socklen(SizeofTpacketStatsV3)
err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
return &value, err
}
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
} }
func SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) error {
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
}
// SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a // SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a
// socket to filter incoming packets. See 'man 7 socket' for usage information. // socket to filter incoming packets. See 'man 7 socket' for usage information.
func SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error { func SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error {
@ -1008,6 +1040,14 @@ func SetsockoptCanRawFilter(fd, level, opt int, filter []CanFilter) error {
return setsockopt(fd, level, opt, p, uintptr(len(filter)*SizeofCanFilter)) return setsockopt(fd, level, opt, p, uintptr(len(filter)*SizeofCanFilter))
} }
func SetsockoptTpacketReq(fd, level, opt int, tp *TpacketReq) error {
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
}
func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
}
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html) // Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
// KeyctlInt calls keyctl commands in which each argument is an int. // KeyctlInt calls keyctl commands in which each argument is an int.

View File

@ -19,12 +19,18 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)} return Timeval{Sec: int32(sec), Usec: int32(usec)}
} }
//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) { func Pipe(p []int) (err error) {
if len(p) != 2 { if len(p) != 2 {
return EINVAL return EINVAL
} }
var pp [2]_C_int var pp [2]_C_int
// Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
err = pipe2(&pp, 0) err = pipe2(&pp, 0)
if err == ENOSYS {
err = pipe(&pp)
}
p[0] = int(pp[0]) p[0] = int(pp[0])
p[1] = int(pp[1]) p[1] = int(pp[1])
return return

View File

@ -208,3 +208,16 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
} }
return ppoll(&fds[0], len(fds), ts, nil) return ppoll(&fds[0], len(fds), ts, nil)
} }
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
cmdlineLen := len(cmdline)
if cmdlineLen > 0 {
// Account for the additional NULL byte added by
// BytePtrFromString in kexecFileLoad. The kexec_file_load
// syscall expects a NULL-terminated string.
cmdlineLen++
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}

View File

@ -211,3 +211,16 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0) return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
} }
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
cmdlineLen := len(cmdline)
if cmdlineLen > 0 {
// Account for the additional NULL byte added by
// BytePtrFromString in kexecFileLoad. The kexec_file_load
// syscall expects a NULL-terminated string.
cmdlineLen++
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}

View File

@ -43,6 +43,23 @@ func nametomib(name string) (mib []_C_int, err error) {
return nil, EINVAL return nil, EINVAL
} }
func SysctlClockinfo(name string) (*Clockinfo, error) {
mib, err := sysctlmib(name)
if err != nil {
return nil, err
}
n := uintptr(SizeofClockinfo)
var ci Clockinfo
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
return nil, err
}
if n != SizeofClockinfo {
return nil, EIO
}
return &ci, nil
}
func SysctlUvmexp(name string) (*Uvmexp, error) { func SysctlUvmexp(name string) (*Uvmexp, error) {
mib, err := sysctlmib(name) mib, err := sysctlmib(name)
if err != nil { if err != nil {

View File

@ -294,6 +294,13 @@ func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {
return &tv, err return &tv, err
} }
func GetsockoptUint64(fd, level, opt int) (value uint64, err error) {
var n uint64
vallen := _Socklen(8)
err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
return n, err
}
func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
var rsa RawSockaddrAny var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny var len _Socklen = SizeofSockaddrAny
@ -344,13 +351,21 @@ func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
} }
func SetsockoptString(fd, level, opt int, s string) (err error) { func SetsockoptString(fd, level, opt int, s string) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s))) var p unsafe.Pointer
if len(s) > 0 {
p = unsafe.Pointer(&[]byte(s)[0])
}
return setsockopt(fd, level, opt, p, uintptr(len(s)))
} }
func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) { func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv)) return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
} }
func SetsockoptUint64(fd, level, opt int, value uint64) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8)
}
func Socket(domain, typ, proto int) (fd int, err error) { func Socket(domain, typ, proto int) (fd int, err error) {
if domain == AF_INET6 && SocketDisableIPv6 { if domain == AF_INET6 && SocketDisableIPv6 {
return -1, EAFNOSUPPORT return -1, EAFNOSUPPORT
@ -395,3 +410,22 @@ func SetNonblock(fd int, nonblocking bool) (err error) {
func Exec(argv0 string, argv []string, envv []string) error { func Exec(argv0 string, argv []string, envv []string) error {
return syscall.Exec(argv0, argv, envv) return syscall.Exec(argv0, argv, envv)
} }
// Lutimes sets the access and modification times tv on path. If path refers to
// a symlink, it is not dereferenced and the timestamps are set on the symlink.
// If tv is nil, the access and modification times are set to the current time.
// Otherwise tv must contain exactly 2 elements, with access time as the first
// element and modification time as the second element.
func Lutimes(path string, tv []Timeval) error {
if tv == nil {
return UtimesNanoAt(AT_FDCWD, path, nil, AT_SYMLINK_NOFOLLOW)
}
if len(tv) != 2 {
return EINVAL
}
ts := []Timespec{
NsecToTimespec(TimevalToNsec(tv[0])),
NsecToTimespec(TimevalToNsec(tv[1])),
}
return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
}

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x80041270 BLKBSZGET = 0x80041270
BLKBSZSET = 0x40041271 BLKBSZSET = 0x40041271
@ -486,6 +487,50 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
@ -493,6 +538,7 @@ const (
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x1000 FLUSHO = 0x1000
FP_XSTATE_MAGIC2 = 0x46505845 FP_XSTATE_MAGIC2 = 0x46505845
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -514,7 +560,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1134,7 +1180,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1398,6 +1444,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2232,6 +2284,7 @@ const (
TUNGETVNETBE = 0x800454df TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd TUNGETVNETLE = 0x800454dd
TUNSETCARRIER = 0x400454e2
TUNSETDEBUG = 0x400454c9 TUNSETDEBUG = 0x400454c9
TUNSETFILTEREBPF = 0x800454e1 TUNSETFILTEREBPF = 0x800454e1
TUNSETGROUP = 0x400454ce TUNSETGROUP = 0x400454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x80081270 BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271 BLKBSZSET = 0x40081271
@ -486,6 +487,50 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
@ -493,6 +538,7 @@ const (
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x1000 FLUSHO = 0x1000
FP_XSTATE_MAGIC2 = 0x46505845 FP_XSTATE_MAGIC2 = 0x46505845
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -514,7 +560,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1134,7 +1180,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1398,6 +1444,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2233,6 +2285,7 @@ const (
TUNGETVNETBE = 0x800454df TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd TUNGETVNETLE = 0x800454dd
TUNSETCARRIER = 0x400454e2
TUNSETDEBUG = 0x400454c9 TUNSETDEBUG = 0x400454c9
TUNSETFILTEREBPF = 0x800454e1 TUNSETFILTEREBPF = 0x800454e1
TUNSETGROUP = 0x400454ce TUNSETGROUP = 0x400454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x80041270 BLKBSZGET = 0x80041270
BLKBSZSET = 0x40041271 BLKBSZSET = 0x40041271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1132,7 +1178,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1396,6 +1442,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2239,6 +2291,7 @@ const (
TUNGETVNETBE = 0x800454df TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd TUNGETVNETLE = 0x800454dd
TUNSETCARRIER = 0x400454e2
TUNSETDEBUG = 0x400454c9 TUNSETDEBUG = 0x400454c9
TUNSETFILTEREBPF = 0x800454e1 TUNSETFILTEREBPF = 0x800454e1
TUNSETGROUP = 0x400454ce TUNSETGROUP = 0x400454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x80081270 BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271 BLKBSZSET = 0x40081271
@ -488,6 +489,50 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
@ -495,6 +540,7 @@ const (
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x1000 FLUSHO = 0x1000
FPSIMD_MAGIC = 0x46508001 FPSIMD_MAGIC = 0x46508001
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -516,7 +562,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1135,7 +1181,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1399,6 +1445,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2224,6 +2276,7 @@ const (
TUNGETVNETBE = 0x800454df TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd TUNGETVNETLE = 0x800454dd
TUNSETCARRIER = 0x400454e2
TUNSETDEBUG = 0x400454c9 TUNSETDEBUG = 0x400454c9
TUNSETFILTEREBPF = 0x800454e1 TUNSETFILTEREBPF = 0x800454e1
TUNSETGROUP = 0x400454ce TUNSETGROUP = 0x400454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x40041270 BLKBSZGET = 0x40041270
BLKBSZSET = 0x80041271 BLKBSZSET = 0x80041271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1132,7 +1178,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1396,6 +1442,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2234,6 +2286,7 @@ const (
TUNGETVNETBE = 0x400454df TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd TUNGETVNETLE = 0x400454dd
TUNSETCARRIER = 0x800454e2
TUNSETDEBUG = 0x800454c9 TUNSETDEBUG = 0x800454c9
TUNSETFILTEREBPF = 0x400454e1 TUNSETFILTEREBPF = 0x400454e1
TUNSETGROUP = 0x800454ce TUNSETGROUP = 0x800454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x40081270 BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271 BLKBSZSET = 0x80081271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1132,7 +1178,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1396,6 +1442,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2234,6 +2286,7 @@ const (
TUNGETVNETBE = 0x400454df TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd TUNGETVNETLE = 0x400454dd
TUNSETCARRIER = 0x800454e2
TUNSETDEBUG = 0x800454c9 TUNSETDEBUG = 0x800454c9
TUNSETFILTEREBPF = 0x400454e1 TUNSETFILTEREBPF = 0x400454e1
TUNSETGROUP = 0x800454ce TUNSETGROUP = 0x800454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x40081270 BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271 BLKBSZSET = 0x80081271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1132,7 +1178,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1396,6 +1442,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2234,6 +2286,7 @@ const (
TUNGETVNETBE = 0x400454df TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd TUNGETVNETLE = 0x400454dd
TUNSETCARRIER = 0x800454e2
TUNSETDEBUG = 0x800454c9 TUNSETDEBUG = 0x800454c9
TUNSETFILTEREBPF = 0x400454e1 TUNSETFILTEREBPF = 0x400454e1
TUNSETGROUP = 0x800454ce TUNSETGROUP = 0x800454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x40041270 BLKBSZGET = 0x40041270
BLKBSZSET = 0x80041271 BLKBSZSET = 0x80041271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x2000 FLUSHO = 0x2000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1132,7 +1178,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1396,6 +1442,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2234,6 +2286,7 @@ const (
TUNGETVNETBE = 0x400454df TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd TUNGETVNETLE = 0x400454dd
TUNSETCARRIER = 0x800454e2
TUNSETDEBUG = 0x800454c9 TUNSETDEBUG = 0x800454c9
TUNSETFILTEREBPF = 0x400454e1 TUNSETFILTEREBPF = 0x400454e1
TUNSETGROUP = 0x800454ce TUNSETGROUP = 0x800454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x40081270 BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271 BLKBSZSET = 0x80081271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x4000 FF1 = 0x4000
FFDLY = 0x4000 FFDLY = 0x4000
FLUSHO = 0x800000 FLUSHO = 0x800000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1131,7 +1177,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1398,6 +1444,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2294,6 +2346,7 @@ const (
TUNGETVNETBE = 0x400454df TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd TUNGETVNETLE = 0x400454dd
TUNSETCARRIER = 0x800454e2
TUNSETDEBUG = 0x800454c9 TUNSETDEBUG = 0x800454c9
TUNSETFILTEREBPF = 0x400454e1 TUNSETFILTEREBPF = 0x400454e1
TUNSETGROUP = 0x800454ce TUNSETGROUP = 0x800454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x40081270 BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271 BLKBSZSET = 0x80081271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x4000 FF1 = 0x4000
FFDLY = 0x4000 FFDLY = 0x4000
FLUSHO = 0x800000 FLUSHO = 0x800000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1131,7 +1177,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1398,6 +1444,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2294,6 +2346,7 @@ const (
TUNGETVNETBE = 0x400454df TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd TUNGETVNETLE = 0x400454dd
TUNSETCARRIER = 0x800454e2
TUNSETDEBUG = 0x800454c9 TUNSETDEBUG = 0x800454c9
TUNSETFILTEREBPF = 0x400454e1 TUNSETFILTEREBPF = 0x400454e1
TUNSETGROUP = 0x800454ce TUNSETGROUP = 0x800454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x80081270 BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271 BLKBSZSET = 0x40081271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1132,7 +1178,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1396,6 +1442,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2220,6 +2272,7 @@ const (
TUNGETVNETBE = 0x800454df TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd TUNGETVNETLE = 0x800454dd
TUNSETCARRIER = 0x400454e2
TUNSETDEBUG = 0x400454c9 TUNSETDEBUG = 0x400454c9
TUNSETFILTEREBPF = 0x800454e1 TUNSETFILTEREBPF = 0x800454e1
TUNSETGROUP = 0x400454ce TUNSETGROUP = 0x400454ce

View File

@ -174,6 +174,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x80081270 BLKBSZGET = 0x80081270
BLKBSZSET = 0x40081271 BLKBSZSET = 0x40081271
@ -486,12 +487,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -513,7 +559,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1132,7 +1178,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1396,6 +1442,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2293,6 +2345,7 @@ const (
TUNGETVNETBE = 0x800454df TUNGETVNETBE = 0x800454df
TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETHDRSZ = 0x800454d7
TUNGETVNETLE = 0x800454dd TUNGETVNETLE = 0x800454dd
TUNSETCARRIER = 0x400454e2
TUNSETDEBUG = 0x400454c9 TUNSETDEBUG = 0x400454c9
TUNSETFILTEREBPF = 0x800454e1 TUNSETFILTEREBPF = 0x800454e1
TUNSETGROUP = 0x400454ce TUNSETGROUP = 0x400454ce

View File

@ -177,6 +177,7 @@ const (
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366 BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
BLKBSZGET = 0x40081270 BLKBSZGET = 0x40081270
BLKBSZSET = 0x80081271 BLKBSZSET = 0x80081271
@ -490,12 +491,57 @@ const (
FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_UNSHARE_RANGE = 0x40
FALLOC_FL_ZERO_RANGE = 0x10 FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
FAN_ACCESS_PERM = 0x20000
FAN_ALLOW = 0x1
FAN_ALL_CLASS_BITS = 0xc
FAN_ALL_EVENTS = 0x3b
FAN_ALL_INIT_FLAGS = 0x3f
FAN_ALL_MARK_FLAGS = 0xff
FAN_ALL_OUTGOING_EVENTS = 0x3403b
FAN_ALL_PERM_EVENTS = 0x30000
FAN_AUDIT = 0x10
FAN_CLASS_CONTENT = 0x4
FAN_CLASS_NOTIF = 0x0
FAN_CLASS_PRE_CONTENT = 0x8
FAN_CLOEXEC = 0x1
FAN_CLOSE = 0x18
FAN_CLOSE_NOWRITE = 0x10
FAN_CLOSE_WRITE = 0x8
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8
FAN_MARK_REMOVE = 0x2
FAN_MODIFY = 0x2
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0 FF0 = 0x0
FF1 = 0x8000 FF1 = 0x8000
FFDLY = 0x8000 FFDLY = 0x8000
FLUSHO = 0x1000 FLUSHO = 0x1000
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
@ -517,7 +563,7 @@ const (
FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_4 = 0x0
FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_8 = 0x1
FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_PAD_MASK = 0x3
FS_POLICY_FLAGS_VALID = 0x3 FS_POLICY_FLAGS_VALID = 0x7
FUTEXFS_SUPER_MAGIC = 0xbad1dea FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409 F_ADD_SEALS = 0x409
F_DUPFD = 0x0 F_DUPFD = 0x0
@ -1136,7 +1182,7 @@ const (
NETLINK_UNUSED = 0x1 NETLINK_UNUSED = 0x1
NETLINK_USERSOCK = 0x2 NETLINK_USERSOCK = 0x2
NETLINK_XFRM = 0x6 NETLINK_XFRM = 0x6
NETNSA_MAX = 0x3 NETNSA_MAX = 0x5
NETNSA_NSID_NOT_ASSIGNED = -0x1 NETNSA_NSID_NOT_ASSIGNED = -0x1
NFNETLINK_V0 = 0x0 NFNETLINK_V0 = 0x0
NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_ACCT_QUOTA = 0x8
@ -1400,6 +1446,12 @@ const (
PR_MCE_KILL_SET = 0x1 PR_MCE_KILL_SET = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MPX_ENABLE_MANAGEMENT = 0x2b
PR_PAC_APDAKEY = 0x4
PR_PAC_APDBKEY = 0x8
PR_PAC_APGAKEY = 0x10
PR_PAC_APIAKEY = 0x1
PR_PAC_APIBKEY = 0x2
PR_PAC_RESET_KEYS = 0x36
PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4 PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14 PR_SET_ENDIAN = 0x14
@ -2282,6 +2334,7 @@ const (
TUNGETVNETBE = 0x400454df TUNGETVNETBE = 0x400454df
TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETHDRSZ = 0x400454d7
TUNGETVNETLE = 0x400454dd TUNGETVNETLE = 0x400454dd
TUNSETCARRIER = 0x800454e2
TUNSETDEBUG = 0x800454c9 TUNSETDEBUG = 0x800454c9
TUNSETFILTEREBPF = 0x400454e1 TUNSETFILTEREBPF = 0x400454e1
TUNSETGROUP = 0x800454ce TUNSETGROUP = 0x800454ce

View File

@ -1367,6 +1367,14 @@ func Utime(path string, buf *Utimbuf) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsystemcfg(label int) (n uint64) {
r0, _ := callgetsystemcfg(label)
n = uint64(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(resource int, rlim *Rlimit) (err error) { func Getrlimit(resource int, rlim *Rlimit) (err error) {
_, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim))) _, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
if e1 != 0 { if e1 != 0 {

View File

@ -120,6 +120,7 @@ import (
//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.a/shr_64.o" //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_time time "libc.a/shr_64.o" //go:cgo_import_dynamic libc_time time "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_utime utime "libc.a/shr_64.o" //go:cgo_import_dynamic libc_utime utime "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o" //go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o"
@ -235,6 +236,7 @@ import (
//go:linkname libc_gettimeofday libc_gettimeofday //go:linkname libc_gettimeofday libc_gettimeofday
//go:linkname libc_time libc_time //go:linkname libc_time libc_time
//go:linkname libc_utime libc_utime //go:linkname libc_utime libc_utime
//go:linkname libc_getsystemcfg libc_getsystemcfg
//go:linkname libc_getrlimit libc_getrlimit //go:linkname libc_getrlimit libc_getrlimit
//go:linkname libc_setrlimit libc_setrlimit //go:linkname libc_setrlimit libc_setrlimit
//go:linkname libc_lseek libc_lseek //go:linkname libc_lseek libc_lseek
@ -353,6 +355,7 @@ var (
libc_gettimeofday, libc_gettimeofday,
libc_time, libc_time,
libc_utime, libc_utime,
libc_getsystemcfg,
libc_getrlimit, libc_getrlimit,
libc_setrlimit, libc_setrlimit,
libc_lseek, libc_lseek,
@ -1135,6 +1138,13 @@ func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0) r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
return return

View File

@ -118,6 +118,7 @@ int poll(uintptr_t, int, int);
int gettimeofday(uintptr_t, uintptr_t); int gettimeofday(uintptr_t, uintptr_t);
int time(uintptr_t); int time(uintptr_t);
int utime(uintptr_t, uintptr_t); int utime(uintptr_t, uintptr_t);
unsigned long long getsystemcfg(int);
int getrlimit(int, uintptr_t); int getrlimit(int, uintptr_t);
int setrlimit(int, uintptr_t); int setrlimit(int, uintptr_t);
long long lseek(int, long long, int); long long lseek(int, long long, int);
@ -1011,6 +1012,14 @@ func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.getsystemcfg(C.int(label)))
e1 = syscall.GetErrno()
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.getrlimit(C.int(resource), C.uintptr_t(rlim))) r1 = uintptr(C.getrlimit(C.int(resource), C.uintptr_t(rlim)))
e1 = syscall.GetErrno() e1 = syscall.GetErrno()

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1658,6 +1679,16 @@ func faccessat(dirfd int, path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) { func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 { if e1 != 0 {

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -2206,3 +2227,18 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -2186,3 +2207,18 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -14,6 +14,27 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) { func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -285,4 +285,5 @@ const (
SYS_STATX = 291 SYS_STATX = 291
SYS_IO_PGETEVENTS = 292 SYS_IO_PGETEVENTS = 292
SYS_RSEQ = 293 SYS_RSEQ = 293
SYS_KEXEC_FILE_LOAD = 294
) )

View File

@ -284,4 +284,5 @@ const (
SYS_STATX = 291 SYS_STATX = 291
SYS_IO_PGETEVENTS = 292 SYS_IO_PGETEVENTS = 292
SYS_RSEQ = 293 SYS_RSEQ = 293
SYS_KEXEC_FILE_LOAD = 294
) )

View File

@ -253,6 +253,7 @@ const (
SYS_TIMER_GETOVERRUN = 264 SYS_TIMER_GETOVERRUN = 264
SYS_TIMER_DELETE = 265 SYS_TIMER_DELETE = 265
SYS_TIMER_CREATE = 266 SYS_TIMER_CREATE = 266
SYS_VSERVER = 267
SYS_IO_SETUP = 268 SYS_IO_SETUP = 268
SYS_IO_DESTROY = 269 SYS_IO_DESTROY = 269
SYS_IO_SUBMIT = 270 SYS_IO_SUBMIT = 270

View File

@ -487,3 +487,13 @@ type Utsname struct {
Version [256]byte Version [256]byte
Machine [256]byte Machine [256]byte
} }
const SizeofClockinfo = 0x14
type Clockinfo struct {
Hz int32
Tick int32
Tickadj int32
Stathz int32
Profhz int32
}

View File

@ -497,3 +497,13 @@ type Utsname struct {
Version [256]byte Version [256]byte
Machine [256]byte Machine [256]byte
} }
const SizeofClockinfo = 0x14
type Clockinfo struct {
Hz int32
Tick int32
Tickadj int32
Stathz int32
Profhz int32
}

View File

@ -488,3 +488,13 @@ type Utsname struct {
Version [256]byte Version [256]byte
Machine [256]byte Machine [256]byte
} }
const SizeofClockinfo = 0x14
type Clockinfo struct {
Hz int32
Tick int32
Tickadj int32
Stathz int32
Profhz int32
}

View File

@ -497,3 +497,13 @@ type Utsname struct {
Version [256]byte Version [256]byte
Machine [256]byte Machine [256]byte
} }
const SizeofClockinfo = 0x14
type Clockinfo struct {
Hz int32
Tick int32
Tickadj int32
Stathz int32
Profhz int32
}

View File

@ -973,7 +973,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1076,6 +1077,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1097,21 +1099,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1124,6 +1143,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1428,6 +1448,9 @@ const (
SizeofTpacketHdr = 0x18 SizeofTpacketHdr = 0x18
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2043,3 +2066,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

View File

@ -984,7 +984,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1087,6 +1088,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1108,21 +1110,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1135,6 +1154,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1440,6 +1460,9 @@ const (
SizeofTpacketHdr = 0x20 SizeofTpacketHdr = 0x20
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2056,3 +2079,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

View File

@ -962,7 +962,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1065,6 +1066,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1086,21 +1088,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1113,6 +1132,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1418,6 +1438,9 @@ const (
SizeofTpacketHdr = 0x18 SizeofTpacketHdr = 0x18
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2034,3 +2057,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

View File

@ -963,7 +963,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1066,6 +1067,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1087,21 +1089,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1114,6 +1133,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1419,6 +1439,9 @@ const (
SizeofTpacketHdr = 0x20 SizeofTpacketHdr = 0x20
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2035,3 +2058,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

View File

@ -967,7 +967,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1070,6 +1071,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1091,21 +1093,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1118,6 +1137,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1424,6 +1444,9 @@ const (
SizeofTpacketHdr = 0x18 SizeofTpacketHdr = 0x18
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2040,3 +2063,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

View File

@ -965,7 +965,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1068,6 +1069,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1089,21 +1091,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1116,6 +1135,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1421,6 +1441,9 @@ const (
SizeofTpacketHdr = 0x20 SizeofTpacketHdr = 0x20
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2037,3 +2060,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

View File

@ -965,7 +965,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1068,6 +1069,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1089,21 +1091,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1116,6 +1135,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1421,6 +1441,9 @@ const (
SizeofTpacketHdr = 0x20 SizeofTpacketHdr = 0x20
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2037,3 +2060,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

View File

@ -967,7 +967,8 @@ type PerfEventAttr struct {
Clockid int32 Clockid int32
Sample_regs_intr uint64 Sample_regs_intr uint64
Aux_watermark uint32 Aux_watermark uint32
_ uint32 Sample_max_stack uint16
_ uint16
} }
type PerfEventMmapPage struct { type PerfEventMmapPage struct {
@ -1070,6 +1071,7 @@ const (
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TID = 0x2
@ -1091,21 +1093,38 @@ const (
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4 PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1 PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2 PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3 PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4 PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7 PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8 PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_KERNEL = -0x80
@ -1118,6 +1137,7 @@ const (
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4 PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
) )
const ( const (
@ -1424,6 +1444,9 @@ const (
SizeofTpacketHdr = 0x18 SizeofTpacketHdr = 0x18
SizeofTpacket2Hdr = 0x20 SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30 SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
) )
const ( const (
@ -2040,3 +2063,18 @@ type SockExtendedErr struct {
Info uint32 Info uint32
Data uint32 Data uint32
} }
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}

Some files were not shown because too many files have changed in this diff Show More