Merge branch 'master' into credentials-pass
This commit is contained in:
commit
9e9f42fdbb
|
|
@ -21,20 +21,15 @@
|
|||
revision = "b26d9c308763d68093482582cea63d69be07a0f0"
|
||||
version = "v0.3.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/GoogleCloudPlatform/container-diff"
|
||||
packages = ["cmd/util/output"]
|
||||
revision = "9eb30146e04ed241c8d5be4e0b9383efaa60a395"
|
||||
version = "v0.9.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/GoogleContainerTools/container-diff"
|
||||
packages = [
|
||||
"cmd/util/output",
|
||||
"pkg/image",
|
||||
"pkg/util"
|
||||
]
|
||||
revision = "859166bbd7810e3c3fc072f1c33ad57b9f4acbd0"
|
||||
revision = "564361979f3124dd3e6d8bbec027279539c8e08b"
|
||||
source = "github.com/GoogleContainerTools/container-diff"
|
||||
|
||||
[[projects]]
|
||||
|
|
@ -63,7 +58,7 @@
|
|||
branch = "master"
|
||||
name = "github.com/containerd/continuity"
|
||||
packages = ["pathdriver"]
|
||||
revision = "3e8f2ea4b190484acb976a5b378d373429639a1a"
|
||||
revision = "c6cef34830231743494fe2969284df7b82cc0ad0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/containers/image"
|
||||
|
|
@ -403,7 +398,7 @@
|
|||
"internal/bitbucket.org/ww/goautoneg",
|
||||
"model"
|
||||
]
|
||||
revision = "38c53a9f4bfcd932d1b00bfc65e256a7fba6b37a"
|
||||
revision = "d0f7cd64bda49e08b22ae8a730aa57aa0db125d6"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
@ -488,7 +483,7 @@
|
|||
"openpgp/s2k",
|
||||
"ssh/terminal"
|
||||
]
|
||||
revision = "d6449816ce06963d9d136eee5a56fca5b0616e7e"
|
||||
revision = "e73bf333ef8920dbb52ad18d4bd38ad9d9bc76d7"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
@ -496,6 +491,7 @@
|
|||
packages = [
|
||||
"context",
|
||||
"context/ctxhttp",
|
||||
"http/httpguts",
|
||||
"http2",
|
||||
"http2/hpack",
|
||||
"idna",
|
||||
|
|
@ -505,7 +501,7 @@
|
|||
"proxy",
|
||||
"trace"
|
||||
]
|
||||
revision = "61147c48b25b599e5b561d2e9c4f3e1ef489ca41"
|
||||
revision = "5f9ae10d9af5b1c89ae6904293b14b064d4ada23"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
@ -517,7 +513,7 @@
|
|||
"jws",
|
||||
"jwt"
|
||||
]
|
||||
revision = "921ae394b9430ed4fb549668d7b087601bd60a81"
|
||||
revision = "6881fee410a5daf86371371f9ad451b95e168b71"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
@ -526,7 +522,7 @@
|
|||
"unix",
|
||||
"windows"
|
||||
]
|
||||
revision = "3b87a42e500a6dc65dae1a55d0b641295971163e"
|
||||
revision = "79b0c6888797020a994db17c8510466c72fe75d9"
|
||||
|
||||
[[projects]]
|
||||
name = "golang.org/x/text"
|
||||
|
|
@ -563,7 +559,7 @@
|
|||
"storage/v1",
|
||||
"transport/http"
|
||||
]
|
||||
revision = "dde16f2e838706995ab9946df55f5dc7c5564cc6"
|
||||
revision = "b08f8989af4899034b9816f5291a5bbb1bd576bb"
|
||||
|
||||
[[projects]]
|
||||
name = "google.golang.org/appengine"
|
||||
|
|
@ -591,7 +587,7 @@
|
|||
"googleapis/rpc/code",
|
||||
"googleapis/rpc/status"
|
||||
]
|
||||
revision = "51d0944304c3cbce4afe9e5247e21100037bff78"
|
||||
revision = "7fd901a49ba6a7f87732eb344f6e3c5b19d1b200"
|
||||
|
||||
[[projects]]
|
||||
name = "google.golang.org/grpc"
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ Similar tools include:
|
|||
* [img](https://github.com/genuinetools/img)
|
||||
* [orca-build](https://github.com/cyphar/orca-build)
|
||||
* [buildah](https://github.com/projectatomic/buildah)
|
||||
* [FTL](https://github.com/GoogleContainerTools/runtimes-common/tree/master/ftl)
|
||||
* [FTL](https://github.com/GoogleCloudPlatform/runtimes-common/tree/master/ftl)
|
||||
* [Bazel rules_docker](https://github.com/bazelbuild/rules_docker)
|
||||
|
||||
All of these tools build container images with different approaches.
|
||||
|
|
|
|||
|
|
@ -32,13 +32,14 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
dockerfilePath string
|
||||
destination string
|
||||
srcContext string
|
||||
snapshotMode string
|
||||
bucket string
|
||||
logLevel string
|
||||
force bool
|
||||
dockerfilePath string
|
||||
destination string
|
||||
srcContext string
|
||||
snapshotMode string
|
||||
bucket string
|
||||
dockerInsecureSkipTLSVerify bool
|
||||
logLevel string
|
||||
force bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
@ -47,6 +48,7 @@ func init() {
|
|||
RootCmd.PersistentFlags().StringVarP(&bucket, "bucket", "b", "", "Name of the GCS bucket from which to access build context as tarball.")
|
||||
RootCmd.PersistentFlags().StringVarP(&destination, "destination", "d", "", "Registry the final image should be pushed to (ex: gcr.io/test/example:latest)")
|
||||
RootCmd.PersistentFlags().StringVarP(&snapshotMode, "snapshotMode", "", "full", "Set this flag to change the file attributes inspected during snapshotting")
|
||||
RootCmd.PersistentFlags().BoolVarP(&dockerInsecureSkipTLSVerify, "insecure-skip-tls-verify", "", false, "Push to insecure registry ignoring TLS verify")
|
||||
RootCmd.PersistentFlags().StringVarP(&logLevel, "verbosity", "v", constants.DefaultLogLevel, "Log level (debug, info, warn, error, fatal, panic")
|
||||
RootCmd.PersistentFlags().BoolVarP(&force, "force", "", false, "Force building outside of a container")
|
||||
}
|
||||
|
|
@ -70,7 +72,7 @@ var RootCmd = &cobra.Command{
|
|||
}
|
||||
logrus.Warn("kaniko is being run outside of a container. This can have dangerous effects on your system")
|
||||
}
|
||||
if err := executor.DoBuild(dockerfilePath, srcContext, destination, snapshotMode); err != nil {
|
||||
if err := executor.DoBuild(dockerfilePath, srcContext, destination, snapshotMode, dockerInsecureSkipTLSVerify); err != nil {
|
||||
logrus.Error(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,60 +53,50 @@ func (a *AddCommand) ExecuteCommand(config *manifest.Schema2Config) error {
|
|||
return err
|
||||
}
|
||||
dest = resolvedEnvs[len(resolvedEnvs)-1]
|
||||
// Get a map of [src]:[files rooted at src]
|
||||
srcMap, err := util.ResolveSources(resolvedEnvs, a.buildcontext)
|
||||
// Resolve wildcards and get a list of resolved sources
|
||||
srcs, err = util.ResolveSources(resolvedEnvs, a.buildcontext)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var unresolvedSrcs []string
|
||||
// If any of the sources are local tar archives:
|
||||
// 1. Unpack them to the specified destination
|
||||
// 2. Remove it as a source that needs to be copied over
|
||||
// If any of the sources is a remote file URL:
|
||||
// 1. Download and copy it to the specified dest
|
||||
// 2. Remove it as a source that needs to be copied
|
||||
for src, files := range srcMap {
|
||||
for _, file := range files {
|
||||
// If file is a local tar archive, then we unpack it to dest
|
||||
filePath := filepath.Join(a.buildcontext, file)
|
||||
isFilenameSource, err := isFilenameSource(srcMap, file)
|
||||
// Else, add to the list of unresolved sources
|
||||
for _, src := range srcs {
|
||||
fullPath := filepath.Join(a.buildcontext, src)
|
||||
if util.IsSrcRemoteFileURL(src) {
|
||||
urlDest := util.URLDestinationFilepath(src, dest, config.WorkingDir)
|
||||
logrus.Infof("Adding remote URL %s to %s", src, urlDest)
|
||||
if err := util.DownloadFileToDest(src, urlDest); err != nil {
|
||||
return err
|
||||
}
|
||||
a.snapshotFiles = append(a.snapshotFiles, urlDest)
|
||||
} else if util.IsFileLocalTarArchive(fullPath) {
|
||||
logrus.Infof("Unpacking local tar archive %s to %s", src, dest)
|
||||
if err := util.UnpackLocalTarArchive(fullPath, dest); err != nil {
|
||||
return err
|
||||
}
|
||||
// Add the unpacked files to the snapshotter
|
||||
filesAdded, err := util.Files(dest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if util.IsSrcRemoteFileURL(file) {
|
||||
urlDest := util.URLDestinationFilepath(file, dest, config.WorkingDir)
|
||||
logrus.Infof("Adding remote URL %s to %s", file, urlDest)
|
||||
if err := util.DownloadFileToDest(file, urlDest); err != nil {
|
||||
return err
|
||||
}
|
||||
a.snapshotFiles = append(a.snapshotFiles, urlDest)
|
||||
delete(srcMap, src)
|
||||
} else if isFilenameSource && util.IsFileLocalTarArchive(filePath) {
|
||||
logrus.Infof("Unpacking local tar archive %s to %s", file, dest)
|
||||
if err := util.UnpackLocalTarArchive(filePath, dest); err != nil {
|
||||
return err
|
||||
}
|
||||
// Add the unpacked files to the snapshotter
|
||||
filesAdded, err := util.Files(dest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
logrus.Debugf("Added %v from local tar archive %s", filesAdded, file)
|
||||
a.snapshotFiles = append(a.snapshotFiles, filesAdded...)
|
||||
delete(srcMap, src)
|
||||
}
|
||||
logrus.Debugf("Added %v from local tar archive %s", filesAdded, src)
|
||||
a.snapshotFiles = append(a.snapshotFiles, filesAdded...)
|
||||
} else {
|
||||
unresolvedSrcs = append(unresolvedSrcs, src)
|
||||
}
|
||||
}
|
||||
// With the remaining "normal" sources, create and execute a standard copy command
|
||||
if len(srcMap) == 0 {
|
||||
if len(unresolvedSrcs) == 0 {
|
||||
return nil
|
||||
}
|
||||
var regularSrcs []string
|
||||
for src := range srcMap {
|
||||
regularSrcs = append(regularSrcs, src)
|
||||
}
|
||||
|
||||
copyCmd := CopyCommand{
|
||||
cmd: &instructions.CopyCommand{
|
||||
SourcesAndDest: append(regularSrcs, dest),
|
||||
SourcesAndDest: append(unresolvedSrcs, dest),
|
||||
},
|
||||
buildcontext: a.buildcontext,
|
||||
}
|
||||
|
|
@ -117,19 +107,6 @@ func (a *AddCommand) ExecuteCommand(config *manifest.Schema2Config) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func isFilenameSource(srcMap map[string][]string, fileName string) (bool, error) {
|
||||
for src := range srcMap {
|
||||
matched, err := filepath.Match(src, fileName)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if matched || (src == fileName) {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// FilesToSnapshot should return an empty array if still nil; no files were changed
|
||||
func (a *AddCommand) FilesToSnapshot() []string {
|
||||
return a.snapshotFiles
|
||||
|
|
|
|||
|
|
@ -17,14 +17,13 @@ limitations under the License.
|
|||
package commands
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/GoogleContainerTools/kaniko/pkg/util"
|
||||
"github.com/containers/image/manifest"
|
||||
"github.com/docker/docker/builder/dockerfile/instructions"
|
||||
"github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type CopyCommand struct {
|
||||
|
|
@ -46,52 +45,42 @@ func (c *CopyCommand) ExecuteCommand(config *manifest.Schema2Config) error {
|
|||
return err
|
||||
}
|
||||
dest = resolvedEnvs[len(resolvedEnvs)-1]
|
||||
// Get a map of [src]:[files rooted at src]
|
||||
srcMap, err := util.ResolveSources(resolvedEnvs, c.buildcontext)
|
||||
// Resolve wildcards and get a list of resolved sources
|
||||
srcs, err = util.ResolveSources(resolvedEnvs, c.buildcontext)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// For each source, iterate through each file within and copy it over
|
||||
for src, files := range srcMap {
|
||||
for _, file := range files {
|
||||
fi, err := os.Lstat(filepath.Join(c.buildcontext, file))
|
||||
// For each source, iterate through and copy it over
|
||||
for _, src := range srcs {
|
||||
fullPath := filepath.Join(c.buildcontext, src)
|
||||
fi, err := os.Lstat(fullPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
destPath, err := util.DestinationFilepath(src, dest, config.WorkingDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if fi.IsDir() {
|
||||
if err := util.CopyDir(fullPath, dest); err != nil {
|
||||
return err
|
||||
}
|
||||
copiedFiles, err := util.Files(dest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
destPath, err := util.DestinationFilepath(file, src, dest, config.WorkingDir, c.buildcontext)
|
||||
if err != nil {
|
||||
c.snapshotFiles = append(c.snapshotFiles, copiedFiles...)
|
||||
} else if fi.Mode()&os.ModeSymlink != 0 {
|
||||
// If file is a symlink, we want to create the same relative symlink
|
||||
if err := util.CopySymlink(fullPath, destPath); err != nil {
|
||||
return err
|
||||
}
|
||||
// If source file is a directory, we want to create a directory ...
|
||||
if fi.IsDir() {
|
||||
logrus.Infof("Creating directory %s", destPath)
|
||||
if err := os.MkdirAll(destPath, fi.Mode()); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if fi.Mode()&os.ModeSymlink != 0 {
|
||||
// If file is a symlink, we want to create the same relative symlink
|
||||
link, err := os.Readlink(filepath.Join(c.buildcontext, file))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
linkDst := filepath.Join(destPath, link)
|
||||
if err := os.Symlink(linkDst, destPath); err != nil {
|
||||
logrus.Errorf("unable to symlink %s to %s", linkDst, destPath)
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
// ... Else, we want to copy over a file
|
||||
logrus.Infof("Copying file %s to %s", file, destPath)
|
||||
srcFile, err := os.Open(filepath.Join(c.buildcontext, file))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer srcFile.Close()
|
||||
if err := util.CreateFile(destPath, srcFile, fi.Mode()); err != nil {
|
||||
return err
|
||||
}
|
||||
c.snapshotFiles = append(c.snapshotFiles, destPath)
|
||||
} else {
|
||||
// ... Else, we want to copy over a file
|
||||
if err := util.CopyFile(fullPath, destPath); err != nil {
|
||||
return err
|
||||
}
|
||||
// Append the destination file to the list of files that should be snapshotted later
|
||||
c.snapshotFiles = append(c.snapshotFiles, destPath)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func DoBuild(dockerfilePath, srcContext, destination, snapshotMode string) error {
|
||||
func DoBuild(dockerfilePath, srcContext, destination, snapshotMode string, dockerInsecureSkipTLSVerify bool) error {
|
||||
// Parse dockerfile and unpack base image to root
|
||||
d, err := ioutil.ReadFile(dockerfilePath)
|
||||
if err != nil {
|
||||
|
|
@ -113,7 +113,7 @@ func DoBuild(dockerfilePath, srcContext, destination, snapshotMode string) error
|
|||
if err := setDefaultEnv(); err != nil {
|
||||
return err
|
||||
}
|
||||
return image.PushImage(sourceImage, destination)
|
||||
return image.PushImage(sourceImage, destination, dockerInsecureSkipTLSVerify)
|
||||
}
|
||||
|
||||
func getHasher(snapshotMode string) (func(string) (string, error), error) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func NewSourceImage(srcImg string) (*img.MutableSource, error) {
|
|||
}
|
||||
|
||||
// PushImage pushes the final image
|
||||
func PushImage(ms *img.MutableSource, destImg string) error {
|
||||
func PushImage(ms *img.MutableSource, destImg string, dockerInsecureSkipTLSVerify bool) error {
|
||||
srcRef := &img.ProxyReference{
|
||||
ImageReference: nil,
|
||||
Src: ms,
|
||||
|
|
@ -65,7 +65,8 @@ func PushImage(ms *img.MutableSource, destImg string) error {
|
|||
|
||||
opts := ©.Options{
|
||||
DestinationCtx: &types.SystemContext{
|
||||
DockerRegistryUserAgent: fmt.Sprintf("kaniko/executor-%s", version.Version()),
|
||||
DockerRegistryUserAgent: fmt.Sprintf("kaniko/executor-%s", version.Version()),
|
||||
DockerInsecureSkipTLSVerify: dockerInsecureSkipTLSVerify,
|
||||
},
|
||||
}
|
||||
return copy.Image(policyContext, destRef, srcRef, opts)
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ func ContainsWildcards(paths []string) bool {
|
|||
}
|
||||
|
||||
// ResolveSources resolves the given sources if the sources contains wildcards
|
||||
// It returns a map of [src]:[files rooted at src]
|
||||
func ResolveSources(srcsAndDest instructions.SourcesAndDest, root string) (map[string][]string, error) {
|
||||
// It returns a list of resolved sources
|
||||
func ResolveSources(srcsAndDest instructions.SourcesAndDest, root string) ([]string, error) {
|
||||
srcs := srcsAndDest[:len(srcsAndDest)-1]
|
||||
// If sources contain wildcards, we first need to resolve them to actual paths
|
||||
if ContainsWildcards(srcs) {
|
||||
|
|
@ -99,13 +99,8 @@ func ResolveSources(srcsAndDest instructions.SourcesAndDest, root string) (map[s
|
|||
}
|
||||
logrus.Debugf("Resolved sources to %v", srcs)
|
||||
}
|
||||
// Now, get a map of [src]:[files rooted at src]
|
||||
srcMap, err := SourcesToFilesMap(srcs, root)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Check to make sure the sources are valid
|
||||
return srcMap, IsSrcsValid(srcsAndDest, srcMap)
|
||||
return srcs, IsSrcsValid(srcsAndDest, srcs, root)
|
||||
}
|
||||
|
||||
// matchSources returns a list of sources that match wildcards
|
||||
|
|
@ -141,24 +136,9 @@ func IsDestDir(path string) bool {
|
|||
// If source is a dir:
|
||||
// Assume dest is also a dir, and copy to dest/relpath
|
||||
// If dest is not an absolute filepath, add /cwd to the beginning
|
||||
func DestinationFilepath(filename, srcName, dest, cwd, buildcontext string) (string, error) {
|
||||
fi, err := os.Lstat(filepath.Join(buildcontext, filename))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
src, err := os.Lstat(filepath.Join(buildcontext, srcName))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if src.IsDir() || IsDestDir(dest) {
|
||||
relPath, err := filepath.Rel(srcName, filename)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if relPath == "." && !fi.IsDir() {
|
||||
relPath = filepath.Base(filename)
|
||||
}
|
||||
destPath := filepath.Join(dest, relPath)
|
||||
func DestinationFilepath(src, dest, cwd string) (string, error) {
|
||||
if IsDestDir(dest) {
|
||||
destPath := filepath.Join(dest, filepath.Base(src))
|
||||
if filepath.IsAbs(dest) {
|
||||
return destPath, nil
|
||||
}
|
||||
|
|
@ -187,45 +167,42 @@ func URLDestinationFilepath(rawurl, dest, cwd string) string {
|
|||
return destPath
|
||||
}
|
||||
|
||||
// SourcesToFilesMap returns a map of [src]:[files rooted at source]
|
||||
func SourcesToFilesMap(srcs []string, root string) (map[string][]string, error) {
|
||||
srcMap := make(map[string][]string)
|
||||
for _, src := range srcs {
|
||||
func IsSrcsValid(srcsAndDest instructions.SourcesAndDest, resolvedSources []string, root string) error {
|
||||
srcs := srcsAndDest[:len(srcsAndDest)-1]
|
||||
dest := srcsAndDest[len(srcsAndDest)-1]
|
||||
|
||||
if !ContainsWildcards(srcs) {
|
||||
if len(srcs) > 1 && !IsDestDir(dest) {
|
||||
return errors.New("when specifying multiple sources in a COPY command, destination must be a directory and end in '/'")
|
||||
}
|
||||
}
|
||||
|
||||
if len(resolvedSources) == 1 {
|
||||
fi, err := os.Stat(filepath.Join(root, resolvedSources[0]))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if fi.IsDir() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
totalFiles := 0
|
||||
for _, src := range resolvedSources {
|
||||
if IsSrcRemoteFileURL(src) {
|
||||
srcMap[src] = []string{src}
|
||||
totalFiles++
|
||||
continue
|
||||
}
|
||||
src = filepath.Clean(src)
|
||||
files, err := RelativeFiles(src, root)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
srcMap[src] = files
|
||||
}
|
||||
return srcMap, nil
|
||||
}
|
||||
|
||||
// IsSrcsValid returns an error if the sources provided are invalid, or nil otherwise
|
||||
func IsSrcsValid(srcsAndDest instructions.SourcesAndDest, srcMap map[string][]string) error {
|
||||
srcs := srcsAndDest[:len(srcsAndDest)-1]
|
||||
dest := srcsAndDest[len(srcsAndDest)-1]
|
||||
|
||||
totalFiles := 0
|
||||
for _, files := range srcMap {
|
||||
totalFiles += len(files)
|
||||
}
|
||||
if totalFiles == 0 {
|
||||
return errors.New("copy failed: no source files specified")
|
||||
}
|
||||
|
||||
if !ContainsWildcards(srcs) {
|
||||
// If multiple sources and destination isn't a directory, return an error
|
||||
if len(srcs) > 1 && !IsDestDir(dest) {
|
||||
return errors.New("when specifying multiple sources in a COPY command, destination must be a directory and end in '/'")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// If there are wildcards, and the destination is a file, there must be exactly one file to copy over,
|
||||
// Otherwise, return an error
|
||||
if !IsDestDir(dest) && totalFiles > 1 {
|
||||
|
|
|
|||
|
|
@ -110,93 +110,61 @@ func Test_EnvReplacement(t *testing.T) {
|
|||
var buildContextPath = "../../integration_tests/"
|
||||
|
||||
var destinationFilepathTests = []struct {
|
||||
srcName string
|
||||
filename string
|
||||
src string
|
||||
dest string
|
||||
cwd string
|
||||
buildcontext string
|
||||
expectedFilepath string
|
||||
}{
|
||||
{
|
||||
srcName: "context/foo",
|
||||
filename: "context/foo",
|
||||
src: "context/foo",
|
||||
dest: "/foo",
|
||||
cwd: "/",
|
||||
expectedFilepath: "/foo",
|
||||
},
|
||||
{
|
||||
srcName: "context/foo",
|
||||
filename: "context/foo",
|
||||
src: "context/foo",
|
||||
dest: "/foodir/",
|
||||
cwd: "/",
|
||||
expectedFilepath: "/foodir/foo",
|
||||
},
|
||||
{
|
||||
srcName: "context/foo",
|
||||
filename: "./context/foo",
|
||||
src: "context/foo",
|
||||
cwd: "/",
|
||||
dest: "foo",
|
||||
expectedFilepath: "/foo",
|
||||
},
|
||||
{
|
||||
srcName: "context/bar/",
|
||||
filename: "context/bar/bam/bat",
|
||||
src: "context/bar/",
|
||||
cwd: "/",
|
||||
dest: "pkg/",
|
||||
expectedFilepath: "/pkg/bam/bat",
|
||||
expectedFilepath: "/pkg/bar",
|
||||
},
|
||||
{
|
||||
srcName: "context/bar/",
|
||||
filename: "context/bar/bam/bat",
|
||||
src: "context/bar/",
|
||||
cwd: "/newdir",
|
||||
dest: "pkg/",
|
||||
expectedFilepath: "/newdir/pkg/bam/bat",
|
||||
expectedFilepath: "/newdir/pkg/bar",
|
||||
},
|
||||
{
|
||||
srcName: "./context/empty",
|
||||
filename: "context/empty",
|
||||
src: "./context/empty",
|
||||
cwd: "/",
|
||||
dest: "/empty",
|
||||
expectedFilepath: "/empty",
|
||||
},
|
||||
{
|
||||
srcName: "./context/empty",
|
||||
filename: "context/empty",
|
||||
src: "./context/empty",
|
||||
cwd: "/dir",
|
||||
dest: "/empty",
|
||||
expectedFilepath: "/empty",
|
||||
},
|
||||
{
|
||||
srcName: "./",
|
||||
filename: "./",
|
||||
src: "./",
|
||||
cwd: "/",
|
||||
dest: "/dir",
|
||||
expectedFilepath: "/dir",
|
||||
},
|
||||
{
|
||||
srcName: "./",
|
||||
filename: "context/foo",
|
||||
cwd: "/",
|
||||
dest: "/dir",
|
||||
expectedFilepath: "/dir/context/foo",
|
||||
},
|
||||
{
|
||||
srcName: ".",
|
||||
filename: "context/bar",
|
||||
cwd: "/",
|
||||
dest: "/dir",
|
||||
expectedFilepath: "/dir/context/bar",
|
||||
},
|
||||
{
|
||||
srcName: ".",
|
||||
filename: "context/bar",
|
||||
cwd: "/",
|
||||
dest: "/dir",
|
||||
expectedFilepath: "/dir/context/bar",
|
||||
},
|
||||
{
|
||||
srcName: "context/foo",
|
||||
filename: "context/foo",
|
||||
src: "context/foo",
|
||||
cwd: "/test",
|
||||
dest: ".",
|
||||
expectedFilepath: "/test/foo",
|
||||
|
|
@ -205,7 +173,7 @@ var destinationFilepathTests = []struct {
|
|||
|
||||
func Test_DestinationFilepath(t *testing.T) {
|
||||
for _, test := range destinationFilepathTests {
|
||||
actualFilepath, err := DestinationFilepath(test.filename, test.srcName, test.dest, test.cwd, buildContextPath)
|
||||
actualFilepath, err := DestinationFilepath(test.src, test.dest, test.cwd)
|
||||
testutil.CheckErrorAndDeepEqual(t, false, err, test.expectedFilepath, actualFilepath)
|
||||
}
|
||||
}
|
||||
|
|
@ -278,141 +246,111 @@ func Test_MatchSources(t *testing.T) {
|
|||
}
|
||||
|
||||
var isSrcValidTests = []struct {
|
||||
srcsAndDest []string
|
||||
files map[string][]string
|
||||
shouldErr bool
|
||||
srcsAndDest []string
|
||||
resolvedSources []string
|
||||
shouldErr bool
|
||||
}{
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src1",
|
||||
"src2",
|
||||
"context/foo",
|
||||
"context/bar",
|
||||
"dest",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src1": {
|
||||
"file1",
|
||||
},
|
||||
"src2:": {
|
||||
"file2",
|
||||
},
|
||||
resolvedSources: []string{
|
||||
"context/foo",
|
||||
"context/bar",
|
||||
},
|
||||
shouldErr: true,
|
||||
},
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src1",
|
||||
"src2",
|
||||
"context/foo",
|
||||
"context/bar",
|
||||
"dest/",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src1": {
|
||||
"file1",
|
||||
},
|
||||
"src2:": {
|
||||
"file2",
|
||||
},
|
||||
resolvedSources: []string{
|
||||
"context/foo",
|
||||
"context/bar",
|
||||
},
|
||||
shouldErr: false,
|
||||
},
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src2/",
|
||||
"context/bar/bam",
|
||||
"dest",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src1": {
|
||||
"file1",
|
||||
},
|
||||
"src2:": {
|
||||
"file2",
|
||||
},
|
||||
resolvedSources: []string{
|
||||
"context/bar/bam",
|
||||
},
|
||||
shouldErr: false,
|
||||
},
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src2",
|
||||
"context/foo",
|
||||
"dest",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src1": {
|
||||
"file1",
|
||||
},
|
||||
"src2:": {
|
||||
"file2",
|
||||
},
|
||||
resolvedSources: []string{
|
||||
"context/foo",
|
||||
},
|
||||
shouldErr: false,
|
||||
},
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src2",
|
||||
"src*",
|
||||
"context/foo",
|
||||
"context/b*",
|
||||
"dest/",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src1": {
|
||||
"file1",
|
||||
},
|
||||
"src2:": {
|
||||
"file2",
|
||||
},
|
||||
resolvedSources: []string{
|
||||
"context/foo",
|
||||
"context/bar",
|
||||
},
|
||||
shouldErr: false,
|
||||
},
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src2",
|
||||
"src*",
|
||||
"context/foo",
|
||||
"context/b*",
|
||||
"dest",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src2": {
|
||||
"src2/a",
|
||||
"src2/b",
|
||||
},
|
||||
"src*": {},
|
||||
resolvedSources: []string{
|
||||
"context/foo",
|
||||
"context/bar",
|
||||
},
|
||||
shouldErr: true,
|
||||
},
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src2",
|
||||
"src*",
|
||||
"context/foo",
|
||||
"context/doesntexist*",
|
||||
"dest",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src2": {
|
||||
"src2/a",
|
||||
},
|
||||
"src*": {},
|
||||
resolvedSources: []string{
|
||||
"context/foo",
|
||||
},
|
||||
shouldErr: false,
|
||||
},
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
"src2",
|
||||
"src*",
|
||||
"context/",
|
||||
"dest",
|
||||
},
|
||||
files: map[string][]string{
|
||||
"src2": {},
|
||||
"src*": {},
|
||||
resolvedSources: []string{
|
||||
"context/",
|
||||
},
|
||||
shouldErr: true,
|
||||
shouldErr: false,
|
||||
},
|
||||
}
|
||||
|
||||
func Test_IsSrcsValid(t *testing.T) {
|
||||
for _, test := range isSrcValidTests {
|
||||
err := IsSrcsValid(test.srcsAndDest, test.files)
|
||||
err := IsSrcsValid(test.srcsAndDest, test.resolvedSources, buildContextPath)
|
||||
testutil.CheckError(t, test.shouldErr, err)
|
||||
}
|
||||
}
|
||||
|
||||
var testResolveSources = []struct {
|
||||
srcsAndDest []string
|
||||
expectedMap map[string][]string
|
||||
srcsAndDest []string
|
||||
expectedList []string
|
||||
}{
|
||||
{
|
||||
srcsAndDest: []string{
|
||||
|
|
@ -421,28 +359,18 @@ var testResolveSources = []struct {
|
|||
testUrl,
|
||||
"dest/",
|
||||
},
|
||||
expectedMap: map[string][]string{
|
||||
"context/foo": {
|
||||
"context/foo",
|
||||
},
|
||||
"context/bar": {
|
||||
"context/bar",
|
||||
"context/bar/bam",
|
||||
"context/bar/bam/bat",
|
||||
"context/bar/bat",
|
||||
"context/bar/baz",
|
||||
},
|
||||
testUrl: {
|
||||
testUrl,
|
||||
},
|
||||
expectedList: []string{
|
||||
"context/foo",
|
||||
"context/bar",
|
||||
testUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func Test_ResolveSources(t *testing.T) {
|
||||
for _, test := range testResolveSources {
|
||||
actualMap, err := ResolveSources(test.srcsAndDest, buildContextPath)
|
||||
testutil.CheckErrorAndDeepEqual(t, false, err, test.expectedMap, actualMap)
|
||||
actualList, err := ResolveSources(test.srcsAndDest, buildContextPath)
|
||||
testutil.CheckErrorAndDeepEqual(t, false, err, test.expectedList, actualList)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -210,3 +210,61 @@ func DownloadFileToDest(rawurl, dest string) error {
|
|||
}
|
||||
return os.Chtimes(dest, mTime, mTime)
|
||||
}
|
||||
|
||||
// CopyDir copies the file or directory at src to dest
|
||||
func CopyDir(src, dest string) error {
|
||||
files, err := RelativeFiles("", src)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, file := range files {
|
||||
fullPath := filepath.Join(src, file)
|
||||
fi, err := os.Stat(fullPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
destPath := filepath.Join(dest, file)
|
||||
if fi.IsDir() {
|
||||
logrus.Infof("Creating directory %s", destPath)
|
||||
if err := os.MkdirAll(destPath, fi.Mode()); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if fi.Mode()&os.ModeSymlink != 0 {
|
||||
// If file is a symlink, we want to create the same relative symlink
|
||||
if err := CopySymlink(fullPath, destPath); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
// ... Else, we want to copy over a file
|
||||
if err := CopyFile(fullPath, destPath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// CopySymlink copies the symlink at src to dest
|
||||
func CopySymlink(src, dest string) error {
|
||||
link, err := os.Readlink(src)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
linkDst := filepath.Join(dest, link)
|
||||
return os.Symlink(linkDst, dest)
|
||||
}
|
||||
|
||||
// CopyFile copies the file at src to dest
|
||||
func CopyFile(src, dest string) error {
|
||||
fi, err := os.Stat(src)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
logrus.Infof("Copying file %s to %s", src, dest)
|
||||
srcFile, err := os.Open(src)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer srcFile.Close()
|
||||
return CreateFile(dest, srcFile, fi.Mode())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,202 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
5
vendor/github.com/GoogleContainerTools/container-diff/pkg/image/mutable_source.go
generated
vendored
5
vendor/github.com/GoogleContainerTools/container-diff/pkg/image/mutable_source.go
generated
vendored
|
|
@ -92,7 +92,10 @@ func MutableSourceFromScratch() (*MutableSource, error) {
|
|||
},
|
||||
extraBlobs: make(map[string][]byte),
|
||||
cfg: config,
|
||||
mfst: &manifest.Schema2{},
|
||||
mfst: &manifest.Schema2{
|
||||
SchemaVersion: 2,
|
||||
MediaType: manifest.DockerV2Schema2MediaType,
|
||||
},
|
||||
}
|
||||
return ms, nil
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/GoogleContainerTools/container-diff/pkg/util/image_prep_utils.go
generated
vendored
2
vendor/github.com/GoogleContainerTools/container-diff/pkg/util/image_prep_utils.go
generated
vendored
|
|
@ -26,7 +26,7 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/GoogleCloudPlatform/container-diff/cmd/util/output"
|
||||
"github.com/GoogleContainerTools/container-diff/cmd/util/output"
|
||||
"github.com/containers/image/docker"
|
||||
"github.com/containers/image/manifest"
|
||||
"github.com/containers/image/pkg/compression"
|
||||
|
|
|
|||
|
|
@ -164,9 +164,9 @@ func (sd *SampleDecoder) Decode(s *model.Vector) error {
|
|||
}
|
||||
|
||||
// ExtractSamples builds a slice of samples from the provided metric
|
||||
// families. If an error occurs during sample extraction, it continues to
|
||||
// families. If an error occurrs during sample extraction, it continues to
|
||||
// extract from the remaining metric families. The returned error is the last
|
||||
// error that has occured.
|
||||
// error that has occurred.
|
||||
func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) {
|
||||
var (
|
||||
all model.Vector
|
||||
|
|
|
|||
|
|
@ -556,8 +556,8 @@ func (p *TextParser) readTokenUntilWhitespace() {
|
|||
// byte considered is the byte already read (now in p.currentByte). The first
|
||||
// newline byte encountered is still copied into p.currentByte, but not into
|
||||
// p.currentToken. If recognizeEscapeSequence is true, two escape sequences are
|
||||
// recognized: '\\' tranlates into '\', and '\n' into a line-feed character. All
|
||||
// other escape sequences are invalid and cause an error.
|
||||
// recognized: '\\' translates into '\', and '\n' into a line-feed character.
|
||||
// All other escape sequences are invalid and cause an error.
|
||||
func (p *TextParser) readTokenUntilNewline(recognizeEscapeSequence bool) {
|
||||
p.currentToken.Reset()
|
||||
escaped := false
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ func (m *Matcher) Validate() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Silence defines the representation of a silence definiton
|
||||
// in the Prometheus eco-system.
|
||||
// Silence defines the representation of a silence definition in the Prometheus
|
||||
// eco-system.
|
||||
type Silence struct {
|
||||
ID uint64 `json:"id,omitempty"`
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ func (s *SamplePair) UnmarshalJSON(b []byte) error {
|
|||
}
|
||||
|
||||
// Equal returns true if this SamplePair and o have equal Values and equal
|
||||
// Timestamps. The sematics of Value equality is defined by SampleValue.Equal.
|
||||
// Timestamps. The semantics of Value equality is defined by SampleValue.Equal.
|
||||
func (s *SamplePair) Equal(o *SamplePair) bool {
|
||||
return s == o || (s.Value.Equal(o.Value) && s.Timestamp.Equal(o.Timestamp))
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ type Sample struct {
|
|||
}
|
||||
|
||||
// Equal compares first the metrics, then the timestamp, then the value. The
|
||||
// sematics of value equality is defined by SampleValue.Equal.
|
||||
// semantics of value equality is defined by SampleValue.Equal.
|
||||
func (s *Sample) Equal(o *Sample) bool {
|
||||
if s == o {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package httpguts provides functions implementing various details
|
||||
// of the HTTP specification.
|
||||
//
|
||||
// This package is shared by the standard library (which vendors it)
|
||||
// and x/net/http2. It comes with no API stability promise.
|
||||
package httpguts
|
||||
|
||||
import (
|
||||
"net/textproto"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ValidTrailerHeader reports whether name is a valid header field name to appear
|
||||
// in trailers.
|
||||
// See RFC 7230, Section 4.1.2
|
||||
func ValidTrailerHeader(name string) bool {
|
||||
name = textproto.CanonicalMIMEHeaderKey(name)
|
||||
if strings.HasPrefix(name, "If-") || badTrailer[name] {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
var badTrailer = map[string]bool{
|
||||
"Authorization": true,
|
||||
"Cache-Control": true,
|
||||
"Connection": true,
|
||||
"Content-Encoding": true,
|
||||
"Content-Length": true,
|
||||
"Content-Range": true,
|
||||
"Content-Type": true,
|
||||
"Expect": true,
|
||||
"Host": true,
|
||||
"Keep-Alive": true,
|
||||
"Max-Forwards": true,
|
||||
"Pragma": true,
|
||||
"Proxy-Authenticate": true,
|
||||
"Proxy-Authorization": true,
|
||||
"Proxy-Connection": true,
|
||||
"Range": true,
|
||||
"Realm": true,
|
||||
"Te": true,
|
||||
"Trailer": true,
|
||||
"Transfer-Encoding": true,
|
||||
"Www-Authenticate": true,
|
||||
}
|
||||
|
|
@ -46,6 +46,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/http/httpguts"
|
||||
"golang.org/x/net/http2/hpack"
|
||||
)
|
||||
|
||||
|
|
@ -1817,7 +1818,7 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
|
|||
if st.trailer != nil {
|
||||
for _, hf := range f.RegularFields() {
|
||||
key := sc.canonicalHeader(hf.Name)
|
||||
if !ValidTrailerHeader(key) {
|
||||
if !httpguts.ValidTrailerHeader(key) {
|
||||
// TODO: send more details to the peer somehow. But http2 has
|
||||
// no way to send debug data at a stream level. Discuss with
|
||||
// HTTP folk.
|
||||
|
|
@ -2284,7 +2285,7 @@ func (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) !=
|
|||
// written in the trailers at the end of the response.
|
||||
func (rws *responseWriterState) declareTrailer(k string) {
|
||||
k = http.CanonicalHeaderKey(k)
|
||||
if !ValidTrailerHeader(k) {
|
||||
if !httpguts.ValidTrailerHeader(k) {
|
||||
// Forbidden by RFC 7230, section 4.1.2.
|
||||
rws.conn.logf("ignoring invalid trailer %q", k)
|
||||
return
|
||||
|
|
@ -2323,7 +2324,15 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
|
|||
}
|
||||
_, hasContentType := rws.snapHeader["Content-Type"]
|
||||
if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 {
|
||||
ctype = http.DetectContentType(p)
|
||||
if cto := rws.snapHeader.Get("X-Content-Type-Options"); strings.EqualFold("nosniff", cto) {
|
||||
// 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
|
||||
if _, ok := rws.snapHeader["Date"]; !ok {
|
||||
|
|
@ -2838,41 +2847,6 @@ func new400Handler(err error) http.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
// ValidTrailerHeader reports whether name is a valid header field name to appear
|
||||
// in trailers.
|
||||
// See: http://tools.ietf.org/html/rfc7230#section-4.1.2
|
||||
func ValidTrailerHeader(name string) bool {
|
||||
name = http.CanonicalHeaderKey(name)
|
||||
if strings.HasPrefix(name, "If-") || badTrailer[name] {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
var badTrailer = map[string]bool{
|
||||
"Authorization": true,
|
||||
"Cache-Control": true,
|
||||
"Connection": true,
|
||||
"Content-Encoding": true,
|
||||
"Content-Length": true,
|
||||
"Content-Range": true,
|
||||
"Content-Type": true,
|
||||
"Expect": true,
|
||||
"Host": true,
|
||||
"Keep-Alive": true,
|
||||
"Max-Forwards": true,
|
||||
"Pragma": true,
|
||||
"Proxy-Authenticate": true,
|
||||
"Proxy-Authorization": true,
|
||||
"Proxy-Connection": true,
|
||||
"Range": true,
|
||||
"Realm": true,
|
||||
"Te": true,
|
||||
"Trailer": true,
|
||||
"Transfer-Encoding": true,
|
||||
"Www-Authenticate": true,
|
||||
}
|
||||
|
||||
// h1ServerKeepAlivesDisabled reports whether hs has its keep-alives
|
||||
// disabled. See comments on h1ServerShutdownChan above for why
|
||||
// the code is written this way.
|
||||
|
|
|
|||
|
|
@ -951,6 +951,9 @@ func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error {
|
|||
for {
|
||||
cc.lastActive = time.Now()
|
||||
if cc.closed || !cc.canTakeNewRequestLocked() {
|
||||
if waitingForConn != nil {
|
||||
close(waitingForConn)
|
||||
}
|
||||
return errClientConnUnusable
|
||||
}
|
||||
if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) {
|
||||
|
|
|
|||
|
|
@ -126,6 +126,8 @@ var brokenAuthHeaderProviders = []string{
|
|||
"https://api.sipgate.com/v1/authorization/oauth",
|
||||
"https://api.medium.com/v1/tokens",
|
||||
"https://log.finalsurge.com/oauth/token",
|
||||
"https://multisport.todaysplan.com.au/rest/oauth/access_token",
|
||||
"https://whats.todaysplan.com.au/rest/oauth/access_token",
|
||||
}
|
||||
|
||||
// brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints.
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// Intentionally export __val fields in Fsid and Sigset_t
|
||||
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`)
|
||||
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}"))
|
||||
|
||||
// If we have empty Ptrace structs, we should delete them. Only s390x emits
|
||||
// nonempty Ptrace structs.
|
||||
ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`)
|
||||
|
|
@ -69,12 +73,9 @@ func main() {
|
|||
removePaddingFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
|
||||
b = removePaddingFieldsRegex.ReplaceAll(b, []byte("_"))
|
||||
|
||||
// We refuse to export private fields on s390x
|
||||
if goarch == "s390x" && goos == "linux" {
|
||||
// Remove padding, hidden, or unused fields
|
||||
removeFieldsRegex = regexp.MustCompile(`\bX_\S+`)
|
||||
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
|
||||
}
|
||||
// Remove padding, hidden, or unused fields
|
||||
removeFieldsRegex = regexp.MustCompile(`\bX_\S+`)
|
||||
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
|
||||
|
||||
// Remove the first line of warning from cgo
|
||||
b = b[bytes.IndexByte(b, '\n')+1:]
|
||||
|
|
|
|||
|
|
@ -944,15 +944,17 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
|||
}
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// receive at least one normal byte
|
||||
if sockType != SOCK_DGRAM && len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
if len(p) == 0 {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// receive at least one normal byte
|
||||
if sockType != SOCK_DGRAM {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
|
|
@ -996,15 +998,17 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
|
|||
}
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
// send at least one normal byte
|
||||
if sockType != SOCK_DGRAM && len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
if len(p) == 0 {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
// send at least one normal byte
|
||||
if sockType != SOCK_DGRAM {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
|
|
@ -1260,6 +1264,7 @@ func Getpgrp() (pid int) {
|
|||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
||||
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
||||
//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
||||
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ func Uname(uname *Utsname) error {
|
|||
//sysnb Getppid() (ppid int)
|
||||
//sys Getpriority(which int, who int) (prio int, err error)
|
||||
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
|
||||
//sysnb Getrtable() (rtable int, err error)
|
||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||
//sysnb Getsid(pid int) (sid int, err error)
|
||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
||||
|
|
@ -259,6 +260,7 @@ func Uname(uname *Utsname) error {
|
|||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
//sysnb Setrlimit(which int, lim *Rlimit) (err error)
|
||||
//sysnb Setrtable(rtable int) (err error)
|
||||
//sysnb Setsid() (pid int, err error)
|
||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||
//sysnb Setuid(uid int) (err error)
|
||||
|
|
@ -307,7 +309,6 @@ func Uname(uname *Utsname) error {
|
|||
// getlogin
|
||||
// getresgid
|
||||
// getresuid
|
||||
// getrtable
|
||||
// getthrid
|
||||
// ktrace
|
||||
// lfs_bmapv
|
||||
|
|
@ -343,7 +344,6 @@ func Uname(uname *Utsname) error {
|
|||
// semop
|
||||
// setgroups
|
||||
// setitimer
|
||||
// setrtable
|
||||
// setsockopt
|
||||
// shmat
|
||||
// shmctl
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1560,6 +1601,20 @@ const (
|
|||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
|
|
@ -1944,6 +1999,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1561,6 +1602,20 @@ const (
|
|||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
|
|
@ -1945,6 +2000,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1568,6 +1609,20 @@ const (
|
|||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
|
|
@ -1952,6 +2007,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -447,6 +447,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -545,6 +546,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1551,6 +1592,20 @@ const (
|
|||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
|
|
@ -1935,6 +1990,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1562,6 +1603,20 @@ const (
|
|||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
|
|
@ -1949,6 +2004,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1562,6 +1603,20 @@ const (
|
|||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
|
|
@ -1949,6 +2004,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1562,6 +1603,20 @@ const (
|
|||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
|
|
@ -1949,6 +2004,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1562,6 +1603,20 @@ const (
|
|||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
|
|
@ -1949,6 +2004,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x4000
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x100
|
||||
|
|
@ -1618,6 +1659,20 @@ const (
|
|||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
|
|
@ -2006,6 +2061,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x4000
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x100
|
||||
|
|
@ -1618,6 +1659,20 @@ const (
|
|||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
|
|
@ -2006,6 +2061,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ const (
|
|||
ETH_P_WCCP = 0x883e
|
||||
ETH_P_X25 = 0x805
|
||||
ETH_P_XDSA = 0xf8
|
||||
EXABYTE_ENABLE_NEST = 0xf0
|
||||
EXTA = 0xe
|
||||
EXTB = 0xf
|
||||
EXTPROC = 0x10000
|
||||
|
|
@ -543,6 +544,46 @@ const (
|
|||
GENL_UNS_ADMIN_PERM = 0x10
|
||||
GRND_NONBLOCK = 0x1
|
||||
GRND_RANDOM = 0x2
|
||||
HDIO_DRIVE_CMD = 0x31f
|
||||
HDIO_DRIVE_CMD_AEB = 0x31e
|
||||
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
|
||||
HDIO_DRIVE_HOB_HDR_SIZE = 0x8
|
||||
HDIO_DRIVE_RESET = 0x31c
|
||||
HDIO_DRIVE_TASK = 0x31e
|
||||
HDIO_DRIVE_TASKFILE = 0x31d
|
||||
HDIO_DRIVE_TASK_HDR_SIZE = 0x8
|
||||
HDIO_GETGEO = 0x301
|
||||
HDIO_GET_32BIT = 0x309
|
||||
HDIO_GET_ACOUSTIC = 0x30f
|
||||
HDIO_GET_ADDRESS = 0x310
|
||||
HDIO_GET_BUSSTATE = 0x31a
|
||||
HDIO_GET_DMA = 0x30b
|
||||
HDIO_GET_IDENTITY = 0x30d
|
||||
HDIO_GET_KEEPSETTINGS = 0x308
|
||||
HDIO_GET_MULTCOUNT = 0x304
|
||||
HDIO_GET_NICE = 0x30c
|
||||
HDIO_GET_NOWERR = 0x30a
|
||||
HDIO_GET_QDMA = 0x305
|
||||
HDIO_GET_UNMASKINTR = 0x302
|
||||
HDIO_GET_WCACHE = 0x30e
|
||||
HDIO_OBSOLETE_IDENTITY = 0x307
|
||||
HDIO_SCAN_HWIF = 0x328
|
||||
HDIO_SET_32BIT = 0x324
|
||||
HDIO_SET_ACOUSTIC = 0x32c
|
||||
HDIO_SET_ADDRESS = 0x32f
|
||||
HDIO_SET_BUSSTATE = 0x32d
|
||||
HDIO_SET_DMA = 0x326
|
||||
HDIO_SET_KEEPSETTINGS = 0x323
|
||||
HDIO_SET_MULTCOUNT = 0x321
|
||||
HDIO_SET_NICE = 0x329
|
||||
HDIO_SET_NOWERR = 0x325
|
||||
HDIO_SET_PIO_MODE = 0x327
|
||||
HDIO_SET_QDMA = 0x32e
|
||||
HDIO_SET_UNMASKINTR = 0x322
|
||||
HDIO_SET_WCACHE = 0x32b
|
||||
HDIO_SET_XFER = 0x306
|
||||
HDIO_TRISTATE_HWIF = 0x31b
|
||||
HDIO_UNREGISTER_HWIF = 0x32a
|
||||
HUPCL = 0x400
|
||||
IBSHIFT = 0x10
|
||||
ICANON = 0x2
|
||||
|
|
@ -1622,6 +1663,20 @@ const (
|
|||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SMART_AUTOSAVE = 0xd2
|
||||
SMART_AUTO_OFFLINE = 0xdb
|
||||
SMART_DISABLE = 0xd9
|
||||
SMART_ENABLE = 0xd8
|
||||
SMART_HCYL_PASS = 0xc2
|
||||
SMART_IMMEDIATE_OFFLINE = 0xd4
|
||||
SMART_LCYL_PASS = 0x4f
|
||||
SMART_READ_LOG_SECTOR = 0xd5
|
||||
SMART_READ_THRESHOLDS = 0xd1
|
||||
SMART_READ_VALUES = 0xd0
|
||||
SMART_SAVE = 0xd3
|
||||
SMART_STATUS = 0xda
|
||||
SMART_WRITE_LOG_SECTOR = 0xd6
|
||||
SMART_WRITE_THRESHOLDS = 0xd7
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
|
|
@ -2006,6 +2061,86 @@ const (
|
|||
WDIOC_SETPRETIMEOUT = 0xc0045708
|
||||
WDIOC_SETTIMEOUT = 0xc0045706
|
||||
WEXITED = 0x4
|
||||
WIN_ACKMEDIACHANGE = 0xdb
|
||||
WIN_CHECKPOWERMODE1 = 0xe5
|
||||
WIN_CHECKPOWERMODE2 = 0x98
|
||||
WIN_DEVICE_RESET = 0x8
|
||||
WIN_DIAGNOSE = 0x90
|
||||
WIN_DOORLOCK = 0xde
|
||||
WIN_DOORUNLOCK = 0xdf
|
||||
WIN_DOWNLOAD_MICROCODE = 0x92
|
||||
WIN_FLUSH_CACHE = 0xe7
|
||||
WIN_FLUSH_CACHE_EXT = 0xea
|
||||
WIN_FORMAT = 0x50
|
||||
WIN_GETMEDIASTATUS = 0xda
|
||||
WIN_IDENTIFY = 0xec
|
||||
WIN_IDENTIFY_DMA = 0xee
|
||||
WIN_IDLEIMMEDIATE = 0xe1
|
||||
WIN_INIT = 0x60
|
||||
WIN_MEDIAEJECT = 0xed
|
||||
WIN_MULTREAD = 0xc4
|
||||
WIN_MULTREAD_EXT = 0x29
|
||||
WIN_MULTWRITE = 0xc5
|
||||
WIN_MULTWRITE_EXT = 0x39
|
||||
WIN_NOP = 0x0
|
||||
WIN_PACKETCMD = 0xa0
|
||||
WIN_PIDENTIFY = 0xa1
|
||||
WIN_POSTBOOT = 0xdc
|
||||
WIN_PREBOOT = 0xdd
|
||||
WIN_QUEUED_SERVICE = 0xa2
|
||||
WIN_READ = 0x20
|
||||
WIN_READDMA = 0xc8
|
||||
WIN_READDMA_EXT = 0x25
|
||||
WIN_READDMA_ONCE = 0xc9
|
||||
WIN_READDMA_QUEUED = 0xc7
|
||||
WIN_READDMA_QUEUED_EXT = 0x26
|
||||
WIN_READ_BUFFER = 0xe4
|
||||
WIN_READ_EXT = 0x24
|
||||
WIN_READ_LONG = 0x22
|
||||
WIN_READ_LONG_ONCE = 0x23
|
||||
WIN_READ_NATIVE_MAX = 0xf8
|
||||
WIN_READ_NATIVE_MAX_EXT = 0x27
|
||||
WIN_READ_ONCE = 0x21
|
||||
WIN_RECAL = 0x10
|
||||
WIN_RESTORE = 0x10
|
||||
WIN_SECURITY_DISABLE = 0xf6
|
||||
WIN_SECURITY_ERASE_PREPARE = 0xf3
|
||||
WIN_SECURITY_ERASE_UNIT = 0xf4
|
||||
WIN_SECURITY_FREEZE_LOCK = 0xf5
|
||||
WIN_SECURITY_SET_PASS = 0xf1
|
||||
WIN_SECURITY_UNLOCK = 0xf2
|
||||
WIN_SEEK = 0x70
|
||||
WIN_SETFEATURES = 0xef
|
||||
WIN_SETIDLE1 = 0xe3
|
||||
WIN_SETIDLE2 = 0x97
|
||||
WIN_SETMULT = 0xc6
|
||||
WIN_SET_MAX = 0xf9
|
||||
WIN_SET_MAX_EXT = 0x37
|
||||
WIN_SLEEPNOW1 = 0xe6
|
||||
WIN_SLEEPNOW2 = 0x99
|
||||
WIN_SMART = 0xb0
|
||||
WIN_SPECIFY = 0x91
|
||||
WIN_SRST = 0x8
|
||||
WIN_STANDBY = 0xe2
|
||||
WIN_STANDBY2 = 0x96
|
||||
WIN_STANDBYNOW1 = 0xe0
|
||||
WIN_STANDBYNOW2 = 0x94
|
||||
WIN_VERIFY = 0x40
|
||||
WIN_VERIFY_EXT = 0x42
|
||||
WIN_VERIFY_ONCE = 0x41
|
||||
WIN_WRITE = 0x30
|
||||
WIN_WRITEDMA = 0xca
|
||||
WIN_WRITEDMA_EXT = 0x35
|
||||
WIN_WRITEDMA_ONCE = 0xcb
|
||||
WIN_WRITEDMA_QUEUED = 0xcc
|
||||
WIN_WRITEDMA_QUEUED_EXT = 0x36
|
||||
WIN_WRITE_BUFFER = 0xe8
|
||||
WIN_WRITE_EXT = 0x34
|
||||
WIN_WRITE_LONG = 0x32
|
||||
WIN_WRITE_LONG_ONCE = 0x33
|
||||
WIN_WRITE_ONCE = 0x31
|
||||
WIN_WRITE_SAME = 0xe9
|
||||
WIN_WRITE_VERIFY = 0x3c
|
||||
WNOHANG = 0x1
|
||||
WNOTHREAD = 0x20000000
|
||||
WNOWAIT = 0x1000000
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -995,6 +995,17 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(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 PivotRoot(newroot string, putold string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(newroot)
|
||||
|
|
|
|||
|
|
@ -780,6 +780,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrtable() (rtable int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
|
||||
rtable = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
|
|
@ -1254,6 +1265,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrtable(rtable int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setsid() (pid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
|
|
|
|||
|
|
@ -780,6 +780,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrtable() (rtable int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
|
||||
rtable = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
|
|
@ -1254,6 +1265,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrtable(rtable int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setsid() (pid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
|
|
|
|||
|
|
@ -780,6 +780,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrtable() (rtable int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
|
||||
rtable = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||
if e1 != 0 {
|
||||
|
|
@ -1254,6 +1265,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrtable(rtable int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setsid() (pid int, err error) {
|
||||
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
|
||||
pid = int(r0)
|
||||
|
|
|
|||
|
|
@ -96,24 +96,24 @@ type Rlimit struct {
|
|||
type _Gid_t uint32
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint64
|
||||
X__pad1 uint16
|
||||
_ [2]byte
|
||||
X__st_ino uint32
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
X__pad2 uint16
|
||||
_ [2]byte
|
||||
Size int64
|
||||
Blksize int32
|
||||
Blocks int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Ino uint64
|
||||
Dev uint64
|
||||
_ uint16
|
||||
_ [2]byte
|
||||
_ uint32
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
_ uint16
|
||||
_ [2]byte
|
||||
Size int64
|
||||
Blksize int32
|
||||
Blocks int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Ino uint64
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
|
|
@ -132,9 +132,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -171,7 +171,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -583,12 +583,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -683,7 +683,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint32
|
||||
Freehigh uint32
|
||||
Unit uint32
|
||||
X_f [8]int8
|
||||
_ [8]int8
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
|
|
@ -739,7 +739,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [32]uint32
|
||||
Val [32]uint32
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x80045200
|
||||
|
|
@ -895,3 +895,352 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x1
|
||||
CBitFieldMaskBit1 = 0x2
|
||||
CBitFieldMaskBit2 = 0x4
|
||||
CBitFieldMaskBit3 = 0x8
|
||||
CBitFieldMaskBit4 = 0x10
|
||||
CBitFieldMaskBit5 = 0x20
|
||||
CBitFieldMaskBit6 = 0x40
|
||||
CBitFieldMaskBit7 = 0x80
|
||||
CBitFieldMaskBit8 = 0x100
|
||||
CBitFieldMaskBit9 = 0x200
|
||||
CBitFieldMaskBit10 = 0x400
|
||||
CBitFieldMaskBit11 = 0x800
|
||||
CBitFieldMaskBit12 = 0x1000
|
||||
CBitFieldMaskBit13 = 0x2000
|
||||
CBitFieldMaskBit14 = 0x4000
|
||||
CBitFieldMaskBit15 = 0x8000
|
||||
CBitFieldMaskBit16 = 0x10000
|
||||
CBitFieldMaskBit17 = 0x20000
|
||||
CBitFieldMaskBit18 = 0x40000
|
||||
CBitFieldMaskBit19 = 0x80000
|
||||
CBitFieldMaskBit20 = 0x100000
|
||||
CBitFieldMaskBit21 = 0x200000
|
||||
CBitFieldMaskBit22 = 0x400000
|
||||
CBitFieldMaskBit23 = 0x800000
|
||||
CBitFieldMaskBit24 = 0x1000000
|
||||
CBitFieldMaskBit25 = 0x2000000
|
||||
CBitFieldMaskBit26 = 0x4000000
|
||||
CBitFieldMaskBit27 = 0x8000000
|
||||
CBitFieldMaskBit28 = 0x10000000
|
||||
CBitFieldMaskBit29 = 0x20000000
|
||||
CBitFieldMaskBit30 = 0x40000000
|
||||
CBitFieldMaskBit31 = 0x80000000
|
||||
CBitFieldMaskBit32 = 0x100000000
|
||||
CBitFieldMaskBit33 = 0x200000000
|
||||
CBitFieldMaskBit34 = 0x400000000
|
||||
CBitFieldMaskBit35 = 0x800000000
|
||||
CBitFieldMaskBit36 = 0x1000000000
|
||||
CBitFieldMaskBit37 = 0x2000000000
|
||||
CBitFieldMaskBit38 = 0x4000000000
|
||||
CBitFieldMaskBit39 = 0x8000000000
|
||||
CBitFieldMaskBit40 = 0x10000000000
|
||||
CBitFieldMaskBit41 = 0x20000000000
|
||||
CBitFieldMaskBit42 = 0x40000000000
|
||||
CBitFieldMaskBit43 = 0x80000000000
|
||||
CBitFieldMaskBit44 = 0x100000000000
|
||||
CBitFieldMaskBit45 = 0x200000000000
|
||||
CBitFieldMaskBit46 = 0x400000000000
|
||||
CBitFieldMaskBit47 = 0x800000000000
|
||||
CBitFieldMaskBit48 = 0x1000000000000
|
||||
CBitFieldMaskBit49 = 0x2000000000000
|
||||
CBitFieldMaskBit50 = 0x4000000000000
|
||||
CBitFieldMaskBit51 = 0x8000000000000
|
||||
CBitFieldMaskBit52 = 0x10000000000000
|
||||
CBitFieldMaskBit53 = 0x20000000000000
|
||||
CBitFieldMaskBit54 = 0x40000000000000
|
||||
CBitFieldMaskBit55 = 0x80000000000000
|
||||
CBitFieldMaskBit56 = 0x100000000000000
|
||||
CBitFieldMaskBit57 = 0x200000000000000
|
||||
CBitFieldMaskBit58 = 0x400000000000000
|
||||
CBitFieldMaskBit59 = 0x800000000000000
|
||||
CBitFieldMaskBit60 = 0x1000000000000000
|
||||
CBitFieldMaskBit61 = 0x2000000000000000
|
||||
CBitFieldMaskBit62 = 0x4000000000000000
|
||||
CBitFieldMaskBit63 = 0x8000000000000000
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [122]int8
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
Start uint32
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ type Stat_t struct {
|
|||
Mode uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
X__pad0 int32
|
||||
_ int32
|
||||
Rdev uint64
|
||||
Size int64
|
||||
Blksize int64
|
||||
|
|
@ -132,9 +132,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -171,7 +171,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -587,12 +587,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -698,7 +698,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]int8
|
||||
_ [0]int8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
|
|
@ -757,7 +757,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
Val [16]uint64
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x80045200
|
||||
|
|
@ -913,3 +913,353 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x1
|
||||
CBitFieldMaskBit1 = 0x2
|
||||
CBitFieldMaskBit2 = 0x4
|
||||
CBitFieldMaskBit3 = 0x8
|
||||
CBitFieldMaskBit4 = 0x10
|
||||
CBitFieldMaskBit5 = 0x20
|
||||
CBitFieldMaskBit6 = 0x40
|
||||
CBitFieldMaskBit7 = 0x80
|
||||
CBitFieldMaskBit8 = 0x100
|
||||
CBitFieldMaskBit9 = 0x200
|
||||
CBitFieldMaskBit10 = 0x400
|
||||
CBitFieldMaskBit11 = 0x800
|
||||
CBitFieldMaskBit12 = 0x1000
|
||||
CBitFieldMaskBit13 = 0x2000
|
||||
CBitFieldMaskBit14 = 0x4000
|
||||
CBitFieldMaskBit15 = 0x8000
|
||||
CBitFieldMaskBit16 = 0x10000
|
||||
CBitFieldMaskBit17 = 0x20000
|
||||
CBitFieldMaskBit18 = 0x40000
|
||||
CBitFieldMaskBit19 = 0x80000
|
||||
CBitFieldMaskBit20 = 0x100000
|
||||
CBitFieldMaskBit21 = 0x200000
|
||||
CBitFieldMaskBit22 = 0x400000
|
||||
CBitFieldMaskBit23 = 0x800000
|
||||
CBitFieldMaskBit24 = 0x1000000
|
||||
CBitFieldMaskBit25 = 0x2000000
|
||||
CBitFieldMaskBit26 = 0x4000000
|
||||
CBitFieldMaskBit27 = 0x8000000
|
||||
CBitFieldMaskBit28 = 0x10000000
|
||||
CBitFieldMaskBit29 = 0x20000000
|
||||
CBitFieldMaskBit30 = 0x40000000
|
||||
CBitFieldMaskBit31 = 0x80000000
|
||||
CBitFieldMaskBit32 = 0x100000000
|
||||
CBitFieldMaskBit33 = 0x200000000
|
||||
CBitFieldMaskBit34 = 0x400000000
|
||||
CBitFieldMaskBit35 = 0x800000000
|
||||
CBitFieldMaskBit36 = 0x1000000000
|
||||
CBitFieldMaskBit37 = 0x2000000000
|
||||
CBitFieldMaskBit38 = 0x4000000000
|
||||
CBitFieldMaskBit39 = 0x8000000000
|
||||
CBitFieldMaskBit40 = 0x10000000000
|
||||
CBitFieldMaskBit41 = 0x20000000000
|
||||
CBitFieldMaskBit42 = 0x40000000000
|
||||
CBitFieldMaskBit43 = 0x80000000000
|
||||
CBitFieldMaskBit44 = 0x100000000000
|
||||
CBitFieldMaskBit45 = 0x200000000000
|
||||
CBitFieldMaskBit46 = 0x400000000000
|
||||
CBitFieldMaskBit47 = 0x800000000000
|
||||
CBitFieldMaskBit48 = 0x1000000000000
|
||||
CBitFieldMaskBit49 = 0x2000000000000
|
||||
CBitFieldMaskBit50 = 0x4000000000000
|
||||
CBitFieldMaskBit51 = 0x8000000000000
|
||||
CBitFieldMaskBit52 = 0x10000000000000
|
||||
CBitFieldMaskBit53 = 0x20000000000000
|
||||
CBitFieldMaskBit54 = 0x40000000000000
|
||||
CBitFieldMaskBit55 = 0x80000000000000
|
||||
CBitFieldMaskBit56 = 0x100000000000000
|
||||
CBitFieldMaskBit57 = 0x200000000000000
|
||||
CBitFieldMaskBit58 = 0x400000000000000
|
||||
CBitFieldMaskBit59 = 0x800000000000000
|
||||
CBitFieldMaskBit60 = 0x1000000000000000
|
||||
CBitFieldMaskBit61 = 0x2000000000000000
|
||||
CBitFieldMaskBit62 = 0x4000000000000000
|
||||
CBitFieldMaskBit63 = 0x8000000000000000
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [118]int8
|
||||
_ uint64
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
_ [4]byte
|
||||
Start uint64
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,25 +96,25 @@ type Rlimit struct {
|
|||
type _Gid_t uint32
|
||||
|
||||
type Stat_t struct {
|
||||
Dev uint64
|
||||
X__pad1 uint16
|
||||
_ [2]byte
|
||||
X__st_ino uint32
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
X__pad2 uint16
|
||||
_ [6]byte
|
||||
Size int64
|
||||
Blksize int32
|
||||
_ [4]byte
|
||||
Blocks int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Ino uint64
|
||||
Dev uint64
|
||||
_ uint16
|
||||
_ [2]byte
|
||||
_ uint32
|
||||
Mode uint32
|
||||
Nlink uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
_ uint16
|
||||
_ [6]byte
|
||||
Size int64
|
||||
Blksize int32
|
||||
_ [4]byte
|
||||
Blocks int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Ino uint64
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
|
|
@ -134,9 +134,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -173,7 +173,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -587,12 +587,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -671,7 +671,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint32
|
||||
Freehigh uint32
|
||||
Unit uint32
|
||||
X_f [8]uint8
|
||||
_ [8]uint8
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
|
|
@ -728,7 +728,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [32]uint32
|
||||
Val [32]uint32
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x80045200
|
||||
|
|
@ -884,3 +884,352 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x1
|
||||
CBitFieldMaskBit1 = 0x2
|
||||
CBitFieldMaskBit2 = 0x4
|
||||
CBitFieldMaskBit3 = 0x8
|
||||
CBitFieldMaskBit4 = 0x10
|
||||
CBitFieldMaskBit5 = 0x20
|
||||
CBitFieldMaskBit6 = 0x40
|
||||
CBitFieldMaskBit7 = 0x80
|
||||
CBitFieldMaskBit8 = 0x100
|
||||
CBitFieldMaskBit9 = 0x200
|
||||
CBitFieldMaskBit10 = 0x400
|
||||
CBitFieldMaskBit11 = 0x800
|
||||
CBitFieldMaskBit12 = 0x1000
|
||||
CBitFieldMaskBit13 = 0x2000
|
||||
CBitFieldMaskBit14 = 0x4000
|
||||
CBitFieldMaskBit15 = 0x8000
|
||||
CBitFieldMaskBit16 = 0x10000
|
||||
CBitFieldMaskBit17 = 0x20000
|
||||
CBitFieldMaskBit18 = 0x40000
|
||||
CBitFieldMaskBit19 = 0x80000
|
||||
CBitFieldMaskBit20 = 0x100000
|
||||
CBitFieldMaskBit21 = 0x200000
|
||||
CBitFieldMaskBit22 = 0x400000
|
||||
CBitFieldMaskBit23 = 0x800000
|
||||
CBitFieldMaskBit24 = 0x1000000
|
||||
CBitFieldMaskBit25 = 0x2000000
|
||||
CBitFieldMaskBit26 = 0x4000000
|
||||
CBitFieldMaskBit27 = 0x8000000
|
||||
CBitFieldMaskBit28 = 0x10000000
|
||||
CBitFieldMaskBit29 = 0x20000000
|
||||
CBitFieldMaskBit30 = 0x40000000
|
||||
CBitFieldMaskBit31 = 0x80000000
|
||||
CBitFieldMaskBit32 = 0x100000000
|
||||
CBitFieldMaskBit33 = 0x200000000
|
||||
CBitFieldMaskBit34 = 0x400000000
|
||||
CBitFieldMaskBit35 = 0x800000000
|
||||
CBitFieldMaskBit36 = 0x1000000000
|
||||
CBitFieldMaskBit37 = 0x2000000000
|
||||
CBitFieldMaskBit38 = 0x4000000000
|
||||
CBitFieldMaskBit39 = 0x8000000000
|
||||
CBitFieldMaskBit40 = 0x10000000000
|
||||
CBitFieldMaskBit41 = 0x20000000000
|
||||
CBitFieldMaskBit42 = 0x40000000000
|
||||
CBitFieldMaskBit43 = 0x80000000000
|
||||
CBitFieldMaskBit44 = 0x100000000000
|
||||
CBitFieldMaskBit45 = 0x200000000000
|
||||
CBitFieldMaskBit46 = 0x400000000000
|
||||
CBitFieldMaskBit47 = 0x800000000000
|
||||
CBitFieldMaskBit48 = 0x1000000000000
|
||||
CBitFieldMaskBit49 = 0x2000000000000
|
||||
CBitFieldMaskBit50 = 0x4000000000000
|
||||
CBitFieldMaskBit51 = 0x8000000000000
|
||||
CBitFieldMaskBit52 = 0x10000000000000
|
||||
CBitFieldMaskBit53 = 0x20000000000000
|
||||
CBitFieldMaskBit54 = 0x40000000000000
|
||||
CBitFieldMaskBit55 = 0x80000000000000
|
||||
CBitFieldMaskBit56 = 0x100000000000000
|
||||
CBitFieldMaskBit57 = 0x200000000000000
|
||||
CBitFieldMaskBit58 = 0x400000000000000
|
||||
CBitFieldMaskBit59 = 0x800000000000000
|
||||
CBitFieldMaskBit60 = 0x1000000000000000
|
||||
CBitFieldMaskBit61 = 0x2000000000000000
|
||||
CBitFieldMaskBit62 = 0x4000000000000000
|
||||
CBitFieldMaskBit63 = 0x8000000000000000
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [122]uint8
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
Start uint32
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,10 +106,10 @@ type Stat_t struct {
|
|||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
X__pad1 uint64
|
||||
_ uint64
|
||||
Size int64
|
||||
Blksize int32
|
||||
X__pad2 int32
|
||||
_ int32
|
||||
Blocks int64
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
|
|
@ -133,9 +133,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -172,7 +172,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -588,12 +588,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -676,7 +676,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]int8
|
||||
_ [0]int8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
|
|
@ -736,7 +736,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
Val [16]uint64
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x80045200
|
||||
|
|
@ -892,3 +892,353 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x1
|
||||
CBitFieldMaskBit1 = 0x2
|
||||
CBitFieldMaskBit2 = 0x4
|
||||
CBitFieldMaskBit3 = 0x8
|
||||
CBitFieldMaskBit4 = 0x10
|
||||
CBitFieldMaskBit5 = 0x20
|
||||
CBitFieldMaskBit6 = 0x40
|
||||
CBitFieldMaskBit7 = 0x80
|
||||
CBitFieldMaskBit8 = 0x100
|
||||
CBitFieldMaskBit9 = 0x200
|
||||
CBitFieldMaskBit10 = 0x400
|
||||
CBitFieldMaskBit11 = 0x800
|
||||
CBitFieldMaskBit12 = 0x1000
|
||||
CBitFieldMaskBit13 = 0x2000
|
||||
CBitFieldMaskBit14 = 0x4000
|
||||
CBitFieldMaskBit15 = 0x8000
|
||||
CBitFieldMaskBit16 = 0x10000
|
||||
CBitFieldMaskBit17 = 0x20000
|
||||
CBitFieldMaskBit18 = 0x40000
|
||||
CBitFieldMaskBit19 = 0x80000
|
||||
CBitFieldMaskBit20 = 0x100000
|
||||
CBitFieldMaskBit21 = 0x200000
|
||||
CBitFieldMaskBit22 = 0x400000
|
||||
CBitFieldMaskBit23 = 0x800000
|
||||
CBitFieldMaskBit24 = 0x1000000
|
||||
CBitFieldMaskBit25 = 0x2000000
|
||||
CBitFieldMaskBit26 = 0x4000000
|
||||
CBitFieldMaskBit27 = 0x8000000
|
||||
CBitFieldMaskBit28 = 0x10000000
|
||||
CBitFieldMaskBit29 = 0x20000000
|
||||
CBitFieldMaskBit30 = 0x40000000
|
||||
CBitFieldMaskBit31 = 0x80000000
|
||||
CBitFieldMaskBit32 = 0x100000000
|
||||
CBitFieldMaskBit33 = 0x200000000
|
||||
CBitFieldMaskBit34 = 0x400000000
|
||||
CBitFieldMaskBit35 = 0x800000000
|
||||
CBitFieldMaskBit36 = 0x1000000000
|
||||
CBitFieldMaskBit37 = 0x2000000000
|
||||
CBitFieldMaskBit38 = 0x4000000000
|
||||
CBitFieldMaskBit39 = 0x8000000000
|
||||
CBitFieldMaskBit40 = 0x10000000000
|
||||
CBitFieldMaskBit41 = 0x20000000000
|
||||
CBitFieldMaskBit42 = 0x40000000000
|
||||
CBitFieldMaskBit43 = 0x80000000000
|
||||
CBitFieldMaskBit44 = 0x100000000000
|
||||
CBitFieldMaskBit45 = 0x200000000000
|
||||
CBitFieldMaskBit46 = 0x400000000000
|
||||
CBitFieldMaskBit47 = 0x800000000000
|
||||
CBitFieldMaskBit48 = 0x1000000000000
|
||||
CBitFieldMaskBit49 = 0x2000000000000
|
||||
CBitFieldMaskBit50 = 0x4000000000000
|
||||
CBitFieldMaskBit51 = 0x8000000000000
|
||||
CBitFieldMaskBit52 = 0x10000000000000
|
||||
CBitFieldMaskBit53 = 0x20000000000000
|
||||
CBitFieldMaskBit54 = 0x40000000000000
|
||||
CBitFieldMaskBit55 = 0x80000000000000
|
||||
CBitFieldMaskBit56 = 0x100000000000000
|
||||
CBitFieldMaskBit57 = 0x200000000000000
|
||||
CBitFieldMaskBit58 = 0x400000000000000
|
||||
CBitFieldMaskBit59 = 0x800000000000000
|
||||
CBitFieldMaskBit60 = 0x1000000000000000
|
||||
CBitFieldMaskBit61 = 0x2000000000000000
|
||||
CBitFieldMaskBit62 = 0x4000000000000000
|
||||
CBitFieldMaskBit63 = 0x8000000000000000
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [118]int8
|
||||
_ uint64
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
_ [4]byte
|
||||
Start uint64
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,9 +133,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -172,7 +172,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -586,12 +586,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -676,7 +676,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint32
|
||||
Freehigh uint32
|
||||
Unit uint32
|
||||
X_f [8]int8
|
||||
_ [8]int8
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
|
|
@ -733,7 +733,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [32]uint32
|
||||
Val [32]uint32
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x40045200
|
||||
|
|
@ -889,3 +889,352 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x8000000000000000
|
||||
CBitFieldMaskBit1 = 0x4000000000000000
|
||||
CBitFieldMaskBit2 = 0x2000000000000000
|
||||
CBitFieldMaskBit3 = 0x1000000000000000
|
||||
CBitFieldMaskBit4 = 0x800000000000000
|
||||
CBitFieldMaskBit5 = 0x400000000000000
|
||||
CBitFieldMaskBit6 = 0x200000000000000
|
||||
CBitFieldMaskBit7 = 0x100000000000000
|
||||
CBitFieldMaskBit8 = 0x80000000000000
|
||||
CBitFieldMaskBit9 = 0x40000000000000
|
||||
CBitFieldMaskBit10 = 0x20000000000000
|
||||
CBitFieldMaskBit11 = 0x10000000000000
|
||||
CBitFieldMaskBit12 = 0x8000000000000
|
||||
CBitFieldMaskBit13 = 0x4000000000000
|
||||
CBitFieldMaskBit14 = 0x2000000000000
|
||||
CBitFieldMaskBit15 = 0x1000000000000
|
||||
CBitFieldMaskBit16 = 0x800000000000
|
||||
CBitFieldMaskBit17 = 0x400000000000
|
||||
CBitFieldMaskBit18 = 0x200000000000
|
||||
CBitFieldMaskBit19 = 0x100000000000
|
||||
CBitFieldMaskBit20 = 0x80000000000
|
||||
CBitFieldMaskBit21 = 0x40000000000
|
||||
CBitFieldMaskBit22 = 0x20000000000
|
||||
CBitFieldMaskBit23 = 0x10000000000
|
||||
CBitFieldMaskBit24 = 0x8000000000
|
||||
CBitFieldMaskBit25 = 0x4000000000
|
||||
CBitFieldMaskBit26 = 0x2000000000
|
||||
CBitFieldMaskBit27 = 0x1000000000
|
||||
CBitFieldMaskBit28 = 0x800000000
|
||||
CBitFieldMaskBit29 = 0x400000000
|
||||
CBitFieldMaskBit30 = 0x200000000
|
||||
CBitFieldMaskBit31 = 0x100000000
|
||||
CBitFieldMaskBit32 = 0x80000000
|
||||
CBitFieldMaskBit33 = 0x40000000
|
||||
CBitFieldMaskBit34 = 0x20000000
|
||||
CBitFieldMaskBit35 = 0x10000000
|
||||
CBitFieldMaskBit36 = 0x8000000
|
||||
CBitFieldMaskBit37 = 0x4000000
|
||||
CBitFieldMaskBit38 = 0x2000000
|
||||
CBitFieldMaskBit39 = 0x1000000
|
||||
CBitFieldMaskBit40 = 0x800000
|
||||
CBitFieldMaskBit41 = 0x400000
|
||||
CBitFieldMaskBit42 = 0x200000
|
||||
CBitFieldMaskBit43 = 0x100000
|
||||
CBitFieldMaskBit44 = 0x80000
|
||||
CBitFieldMaskBit45 = 0x40000
|
||||
CBitFieldMaskBit46 = 0x20000
|
||||
CBitFieldMaskBit47 = 0x10000
|
||||
CBitFieldMaskBit48 = 0x8000
|
||||
CBitFieldMaskBit49 = 0x4000
|
||||
CBitFieldMaskBit50 = 0x2000
|
||||
CBitFieldMaskBit51 = 0x1000
|
||||
CBitFieldMaskBit52 = 0x800
|
||||
CBitFieldMaskBit53 = 0x400
|
||||
CBitFieldMaskBit54 = 0x200
|
||||
CBitFieldMaskBit55 = 0x100
|
||||
CBitFieldMaskBit56 = 0x80
|
||||
CBitFieldMaskBit57 = 0x40
|
||||
CBitFieldMaskBit58 = 0x20
|
||||
CBitFieldMaskBit59 = 0x10
|
||||
CBitFieldMaskBit60 = 0x8
|
||||
CBitFieldMaskBit61 = 0x4
|
||||
CBitFieldMaskBit62 = 0x2
|
||||
CBitFieldMaskBit63 = 0x1
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [122]int8
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
Start uint32
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,9 +133,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -172,7 +172,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -588,12 +588,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -679,7 +679,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]int8
|
||||
_ [0]int8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
|
|
@ -738,7 +738,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
Val [16]uint64
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x40045200
|
||||
|
|
@ -894,3 +894,353 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x8000000000000000
|
||||
CBitFieldMaskBit1 = 0x4000000000000000
|
||||
CBitFieldMaskBit2 = 0x2000000000000000
|
||||
CBitFieldMaskBit3 = 0x1000000000000000
|
||||
CBitFieldMaskBit4 = 0x800000000000000
|
||||
CBitFieldMaskBit5 = 0x400000000000000
|
||||
CBitFieldMaskBit6 = 0x200000000000000
|
||||
CBitFieldMaskBit7 = 0x100000000000000
|
||||
CBitFieldMaskBit8 = 0x80000000000000
|
||||
CBitFieldMaskBit9 = 0x40000000000000
|
||||
CBitFieldMaskBit10 = 0x20000000000000
|
||||
CBitFieldMaskBit11 = 0x10000000000000
|
||||
CBitFieldMaskBit12 = 0x8000000000000
|
||||
CBitFieldMaskBit13 = 0x4000000000000
|
||||
CBitFieldMaskBit14 = 0x2000000000000
|
||||
CBitFieldMaskBit15 = 0x1000000000000
|
||||
CBitFieldMaskBit16 = 0x800000000000
|
||||
CBitFieldMaskBit17 = 0x400000000000
|
||||
CBitFieldMaskBit18 = 0x200000000000
|
||||
CBitFieldMaskBit19 = 0x100000000000
|
||||
CBitFieldMaskBit20 = 0x80000000000
|
||||
CBitFieldMaskBit21 = 0x40000000000
|
||||
CBitFieldMaskBit22 = 0x20000000000
|
||||
CBitFieldMaskBit23 = 0x10000000000
|
||||
CBitFieldMaskBit24 = 0x8000000000
|
||||
CBitFieldMaskBit25 = 0x4000000000
|
||||
CBitFieldMaskBit26 = 0x2000000000
|
||||
CBitFieldMaskBit27 = 0x1000000000
|
||||
CBitFieldMaskBit28 = 0x800000000
|
||||
CBitFieldMaskBit29 = 0x400000000
|
||||
CBitFieldMaskBit30 = 0x200000000
|
||||
CBitFieldMaskBit31 = 0x100000000
|
||||
CBitFieldMaskBit32 = 0x80000000
|
||||
CBitFieldMaskBit33 = 0x40000000
|
||||
CBitFieldMaskBit34 = 0x20000000
|
||||
CBitFieldMaskBit35 = 0x10000000
|
||||
CBitFieldMaskBit36 = 0x8000000
|
||||
CBitFieldMaskBit37 = 0x4000000
|
||||
CBitFieldMaskBit38 = 0x2000000
|
||||
CBitFieldMaskBit39 = 0x1000000
|
||||
CBitFieldMaskBit40 = 0x800000
|
||||
CBitFieldMaskBit41 = 0x400000
|
||||
CBitFieldMaskBit42 = 0x200000
|
||||
CBitFieldMaskBit43 = 0x100000
|
||||
CBitFieldMaskBit44 = 0x80000
|
||||
CBitFieldMaskBit45 = 0x40000
|
||||
CBitFieldMaskBit46 = 0x20000
|
||||
CBitFieldMaskBit47 = 0x10000
|
||||
CBitFieldMaskBit48 = 0x8000
|
||||
CBitFieldMaskBit49 = 0x4000
|
||||
CBitFieldMaskBit50 = 0x2000
|
||||
CBitFieldMaskBit51 = 0x1000
|
||||
CBitFieldMaskBit52 = 0x800
|
||||
CBitFieldMaskBit53 = 0x400
|
||||
CBitFieldMaskBit54 = 0x200
|
||||
CBitFieldMaskBit55 = 0x100
|
||||
CBitFieldMaskBit56 = 0x80
|
||||
CBitFieldMaskBit57 = 0x40
|
||||
CBitFieldMaskBit58 = 0x20
|
||||
CBitFieldMaskBit59 = 0x10
|
||||
CBitFieldMaskBit60 = 0x8
|
||||
CBitFieldMaskBit61 = 0x4
|
||||
CBitFieldMaskBit62 = 0x2
|
||||
CBitFieldMaskBit63 = 0x1
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [118]int8
|
||||
_ uint64
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
_ [4]byte
|
||||
Start uint64
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,9 +133,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -172,7 +172,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -588,12 +588,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -679,7 +679,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]int8
|
||||
_ [0]int8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
|
|
@ -738,7 +738,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
Val [16]uint64
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x40045200
|
||||
|
|
@ -894,3 +894,353 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x1
|
||||
CBitFieldMaskBit1 = 0x2
|
||||
CBitFieldMaskBit2 = 0x4
|
||||
CBitFieldMaskBit3 = 0x8
|
||||
CBitFieldMaskBit4 = 0x10
|
||||
CBitFieldMaskBit5 = 0x20
|
||||
CBitFieldMaskBit6 = 0x40
|
||||
CBitFieldMaskBit7 = 0x80
|
||||
CBitFieldMaskBit8 = 0x100
|
||||
CBitFieldMaskBit9 = 0x200
|
||||
CBitFieldMaskBit10 = 0x400
|
||||
CBitFieldMaskBit11 = 0x800
|
||||
CBitFieldMaskBit12 = 0x1000
|
||||
CBitFieldMaskBit13 = 0x2000
|
||||
CBitFieldMaskBit14 = 0x4000
|
||||
CBitFieldMaskBit15 = 0x8000
|
||||
CBitFieldMaskBit16 = 0x10000
|
||||
CBitFieldMaskBit17 = 0x20000
|
||||
CBitFieldMaskBit18 = 0x40000
|
||||
CBitFieldMaskBit19 = 0x80000
|
||||
CBitFieldMaskBit20 = 0x100000
|
||||
CBitFieldMaskBit21 = 0x200000
|
||||
CBitFieldMaskBit22 = 0x400000
|
||||
CBitFieldMaskBit23 = 0x800000
|
||||
CBitFieldMaskBit24 = 0x1000000
|
||||
CBitFieldMaskBit25 = 0x2000000
|
||||
CBitFieldMaskBit26 = 0x4000000
|
||||
CBitFieldMaskBit27 = 0x8000000
|
||||
CBitFieldMaskBit28 = 0x10000000
|
||||
CBitFieldMaskBit29 = 0x20000000
|
||||
CBitFieldMaskBit30 = 0x40000000
|
||||
CBitFieldMaskBit31 = 0x80000000
|
||||
CBitFieldMaskBit32 = 0x100000000
|
||||
CBitFieldMaskBit33 = 0x200000000
|
||||
CBitFieldMaskBit34 = 0x400000000
|
||||
CBitFieldMaskBit35 = 0x800000000
|
||||
CBitFieldMaskBit36 = 0x1000000000
|
||||
CBitFieldMaskBit37 = 0x2000000000
|
||||
CBitFieldMaskBit38 = 0x4000000000
|
||||
CBitFieldMaskBit39 = 0x8000000000
|
||||
CBitFieldMaskBit40 = 0x10000000000
|
||||
CBitFieldMaskBit41 = 0x20000000000
|
||||
CBitFieldMaskBit42 = 0x40000000000
|
||||
CBitFieldMaskBit43 = 0x80000000000
|
||||
CBitFieldMaskBit44 = 0x100000000000
|
||||
CBitFieldMaskBit45 = 0x200000000000
|
||||
CBitFieldMaskBit46 = 0x400000000000
|
||||
CBitFieldMaskBit47 = 0x800000000000
|
||||
CBitFieldMaskBit48 = 0x1000000000000
|
||||
CBitFieldMaskBit49 = 0x2000000000000
|
||||
CBitFieldMaskBit50 = 0x4000000000000
|
||||
CBitFieldMaskBit51 = 0x8000000000000
|
||||
CBitFieldMaskBit52 = 0x10000000000000
|
||||
CBitFieldMaskBit53 = 0x20000000000000
|
||||
CBitFieldMaskBit54 = 0x40000000000000
|
||||
CBitFieldMaskBit55 = 0x80000000000000
|
||||
CBitFieldMaskBit56 = 0x100000000000000
|
||||
CBitFieldMaskBit57 = 0x200000000000000
|
||||
CBitFieldMaskBit58 = 0x400000000000000
|
||||
CBitFieldMaskBit59 = 0x800000000000000
|
||||
CBitFieldMaskBit60 = 0x1000000000000000
|
||||
CBitFieldMaskBit61 = 0x2000000000000000
|
||||
CBitFieldMaskBit62 = 0x4000000000000000
|
||||
CBitFieldMaskBit63 = 0x8000000000000000
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [118]int8
|
||||
_ uint64
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
_ [4]byte
|
||||
Start uint64
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,9 +133,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -172,7 +172,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -586,12 +586,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -676,7 +676,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint32
|
||||
Freehigh uint32
|
||||
Unit uint32
|
||||
X_f [8]int8
|
||||
_ [8]int8
|
||||
}
|
||||
|
||||
type Utsname struct {
|
||||
|
|
@ -733,7 +733,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [32]uint32
|
||||
Val [32]uint32
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x40045200
|
||||
|
|
@ -889,3 +889,352 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x1
|
||||
CBitFieldMaskBit1 = 0x2
|
||||
CBitFieldMaskBit2 = 0x4
|
||||
CBitFieldMaskBit3 = 0x8
|
||||
CBitFieldMaskBit4 = 0x10
|
||||
CBitFieldMaskBit5 = 0x20
|
||||
CBitFieldMaskBit6 = 0x40
|
||||
CBitFieldMaskBit7 = 0x80
|
||||
CBitFieldMaskBit8 = 0x100
|
||||
CBitFieldMaskBit9 = 0x200
|
||||
CBitFieldMaskBit10 = 0x400
|
||||
CBitFieldMaskBit11 = 0x800
|
||||
CBitFieldMaskBit12 = 0x1000
|
||||
CBitFieldMaskBit13 = 0x2000
|
||||
CBitFieldMaskBit14 = 0x4000
|
||||
CBitFieldMaskBit15 = 0x8000
|
||||
CBitFieldMaskBit16 = 0x10000
|
||||
CBitFieldMaskBit17 = 0x20000
|
||||
CBitFieldMaskBit18 = 0x40000
|
||||
CBitFieldMaskBit19 = 0x80000
|
||||
CBitFieldMaskBit20 = 0x100000
|
||||
CBitFieldMaskBit21 = 0x200000
|
||||
CBitFieldMaskBit22 = 0x400000
|
||||
CBitFieldMaskBit23 = 0x800000
|
||||
CBitFieldMaskBit24 = 0x1000000
|
||||
CBitFieldMaskBit25 = 0x2000000
|
||||
CBitFieldMaskBit26 = 0x4000000
|
||||
CBitFieldMaskBit27 = 0x8000000
|
||||
CBitFieldMaskBit28 = 0x10000000
|
||||
CBitFieldMaskBit29 = 0x20000000
|
||||
CBitFieldMaskBit30 = 0x40000000
|
||||
CBitFieldMaskBit31 = 0x80000000
|
||||
CBitFieldMaskBit32 = 0x100000000
|
||||
CBitFieldMaskBit33 = 0x200000000
|
||||
CBitFieldMaskBit34 = 0x400000000
|
||||
CBitFieldMaskBit35 = 0x800000000
|
||||
CBitFieldMaskBit36 = 0x1000000000
|
||||
CBitFieldMaskBit37 = 0x2000000000
|
||||
CBitFieldMaskBit38 = 0x4000000000
|
||||
CBitFieldMaskBit39 = 0x8000000000
|
||||
CBitFieldMaskBit40 = 0x10000000000
|
||||
CBitFieldMaskBit41 = 0x20000000000
|
||||
CBitFieldMaskBit42 = 0x40000000000
|
||||
CBitFieldMaskBit43 = 0x80000000000
|
||||
CBitFieldMaskBit44 = 0x100000000000
|
||||
CBitFieldMaskBit45 = 0x200000000000
|
||||
CBitFieldMaskBit46 = 0x400000000000
|
||||
CBitFieldMaskBit47 = 0x800000000000
|
||||
CBitFieldMaskBit48 = 0x1000000000000
|
||||
CBitFieldMaskBit49 = 0x2000000000000
|
||||
CBitFieldMaskBit50 = 0x4000000000000
|
||||
CBitFieldMaskBit51 = 0x8000000000000
|
||||
CBitFieldMaskBit52 = 0x10000000000000
|
||||
CBitFieldMaskBit53 = 0x20000000000000
|
||||
CBitFieldMaskBit54 = 0x40000000000000
|
||||
CBitFieldMaskBit55 = 0x80000000000000
|
||||
CBitFieldMaskBit56 = 0x100000000000000
|
||||
CBitFieldMaskBit57 = 0x200000000000000
|
||||
CBitFieldMaskBit58 = 0x400000000000000
|
||||
CBitFieldMaskBit59 = 0x800000000000000
|
||||
CBitFieldMaskBit60 = 0x1000000000000000
|
||||
CBitFieldMaskBit61 = 0x2000000000000000
|
||||
CBitFieldMaskBit62 = 0x4000000000000000
|
||||
CBitFieldMaskBit63 = 0x8000000000000000
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [122]int8
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
Start uint32
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ type Stat_t struct {
|
|||
Mode uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
X__pad2 int32
|
||||
_ int32
|
||||
Rdev uint64
|
||||
Size int64
|
||||
Blksize int64
|
||||
|
|
@ -134,9 +134,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -173,7 +173,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -589,12 +589,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -686,7 +686,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]uint8
|
||||
_ [0]uint8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
|
|
@ -709,10 +709,10 @@ type Ustat_t struct {
|
|||
}
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
X_padFd int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
Events uint32
|
||||
_ int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
@ -746,7 +746,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
Val [16]uint64
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x40045200
|
||||
|
|
@ -902,3 +902,353 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x8000000000000000
|
||||
CBitFieldMaskBit1 = 0x4000000000000000
|
||||
CBitFieldMaskBit2 = 0x2000000000000000
|
||||
CBitFieldMaskBit3 = 0x1000000000000000
|
||||
CBitFieldMaskBit4 = 0x800000000000000
|
||||
CBitFieldMaskBit5 = 0x400000000000000
|
||||
CBitFieldMaskBit6 = 0x200000000000000
|
||||
CBitFieldMaskBit7 = 0x100000000000000
|
||||
CBitFieldMaskBit8 = 0x80000000000000
|
||||
CBitFieldMaskBit9 = 0x40000000000000
|
||||
CBitFieldMaskBit10 = 0x20000000000000
|
||||
CBitFieldMaskBit11 = 0x10000000000000
|
||||
CBitFieldMaskBit12 = 0x8000000000000
|
||||
CBitFieldMaskBit13 = 0x4000000000000
|
||||
CBitFieldMaskBit14 = 0x2000000000000
|
||||
CBitFieldMaskBit15 = 0x1000000000000
|
||||
CBitFieldMaskBit16 = 0x800000000000
|
||||
CBitFieldMaskBit17 = 0x400000000000
|
||||
CBitFieldMaskBit18 = 0x200000000000
|
||||
CBitFieldMaskBit19 = 0x100000000000
|
||||
CBitFieldMaskBit20 = 0x80000000000
|
||||
CBitFieldMaskBit21 = 0x40000000000
|
||||
CBitFieldMaskBit22 = 0x20000000000
|
||||
CBitFieldMaskBit23 = 0x10000000000
|
||||
CBitFieldMaskBit24 = 0x8000000000
|
||||
CBitFieldMaskBit25 = 0x4000000000
|
||||
CBitFieldMaskBit26 = 0x2000000000
|
||||
CBitFieldMaskBit27 = 0x1000000000
|
||||
CBitFieldMaskBit28 = 0x800000000
|
||||
CBitFieldMaskBit29 = 0x400000000
|
||||
CBitFieldMaskBit30 = 0x200000000
|
||||
CBitFieldMaskBit31 = 0x100000000
|
||||
CBitFieldMaskBit32 = 0x80000000
|
||||
CBitFieldMaskBit33 = 0x40000000
|
||||
CBitFieldMaskBit34 = 0x20000000
|
||||
CBitFieldMaskBit35 = 0x10000000
|
||||
CBitFieldMaskBit36 = 0x8000000
|
||||
CBitFieldMaskBit37 = 0x4000000
|
||||
CBitFieldMaskBit38 = 0x2000000
|
||||
CBitFieldMaskBit39 = 0x1000000
|
||||
CBitFieldMaskBit40 = 0x800000
|
||||
CBitFieldMaskBit41 = 0x400000
|
||||
CBitFieldMaskBit42 = 0x200000
|
||||
CBitFieldMaskBit43 = 0x100000
|
||||
CBitFieldMaskBit44 = 0x80000
|
||||
CBitFieldMaskBit45 = 0x40000
|
||||
CBitFieldMaskBit46 = 0x20000
|
||||
CBitFieldMaskBit47 = 0x10000
|
||||
CBitFieldMaskBit48 = 0x8000
|
||||
CBitFieldMaskBit49 = 0x4000
|
||||
CBitFieldMaskBit50 = 0x2000
|
||||
CBitFieldMaskBit51 = 0x1000
|
||||
CBitFieldMaskBit52 = 0x800
|
||||
CBitFieldMaskBit53 = 0x400
|
||||
CBitFieldMaskBit54 = 0x200
|
||||
CBitFieldMaskBit55 = 0x100
|
||||
CBitFieldMaskBit56 = 0x80
|
||||
CBitFieldMaskBit57 = 0x40
|
||||
CBitFieldMaskBit58 = 0x20
|
||||
CBitFieldMaskBit59 = 0x10
|
||||
CBitFieldMaskBit60 = 0x8
|
||||
CBitFieldMaskBit61 = 0x4
|
||||
CBitFieldMaskBit62 = 0x2
|
||||
CBitFieldMaskBit63 = 0x1
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [118]uint8
|
||||
_ uint64
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
_ [4]byte
|
||||
Start uint64
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ type Stat_t struct {
|
|||
Mode uint32
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
X__pad2 int32
|
||||
_ int32
|
||||
Rdev uint64
|
||||
Size int64
|
||||
Blksize int64
|
||||
|
|
@ -134,9 +134,9 @@ type Statfs_t struct {
|
|||
}
|
||||
|
||||
type StatxTimestamp struct {
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
X__reserved int32
|
||||
Sec int64
|
||||
Nsec uint32
|
||||
_ int32
|
||||
}
|
||||
|
||||
type Statx_t struct {
|
||||
|
|
@ -173,7 +173,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
X__val [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -589,12 +589,12 @@ type RtAttr struct {
|
|||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
Family uint8
|
||||
X__ifi_pad uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
Family uint8
|
||||
_ uint8
|
||||
Type uint16
|
||||
Index int32
|
||||
Flags uint32
|
||||
Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
|
|
@ -686,7 +686,7 @@ type Sysinfo_t struct {
|
|||
Totalhigh uint64
|
||||
Freehigh uint64
|
||||
Unit uint32
|
||||
X_f [0]uint8
|
||||
_ [0]uint8
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
|
|
@ -709,10 +709,10 @@ type Ustat_t struct {
|
|||
}
|
||||
|
||||
type EpollEvent struct {
|
||||
Events uint32
|
||||
X_padFd int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
Events uint32
|
||||
_ int32
|
||||
Fd int32
|
||||
Pad int32
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
@ -746,7 +746,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
X__val [16]uint64
|
||||
Val [16]uint64
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x40045200
|
||||
|
|
@ -902,3 +902,353 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x1
|
||||
CBitFieldMaskBit1 = 0x2
|
||||
CBitFieldMaskBit2 = 0x4
|
||||
CBitFieldMaskBit3 = 0x8
|
||||
CBitFieldMaskBit4 = 0x10
|
||||
CBitFieldMaskBit5 = 0x20
|
||||
CBitFieldMaskBit6 = 0x40
|
||||
CBitFieldMaskBit7 = 0x80
|
||||
CBitFieldMaskBit8 = 0x100
|
||||
CBitFieldMaskBit9 = 0x200
|
||||
CBitFieldMaskBit10 = 0x400
|
||||
CBitFieldMaskBit11 = 0x800
|
||||
CBitFieldMaskBit12 = 0x1000
|
||||
CBitFieldMaskBit13 = 0x2000
|
||||
CBitFieldMaskBit14 = 0x4000
|
||||
CBitFieldMaskBit15 = 0x8000
|
||||
CBitFieldMaskBit16 = 0x10000
|
||||
CBitFieldMaskBit17 = 0x20000
|
||||
CBitFieldMaskBit18 = 0x40000
|
||||
CBitFieldMaskBit19 = 0x80000
|
||||
CBitFieldMaskBit20 = 0x100000
|
||||
CBitFieldMaskBit21 = 0x200000
|
||||
CBitFieldMaskBit22 = 0x400000
|
||||
CBitFieldMaskBit23 = 0x800000
|
||||
CBitFieldMaskBit24 = 0x1000000
|
||||
CBitFieldMaskBit25 = 0x2000000
|
||||
CBitFieldMaskBit26 = 0x4000000
|
||||
CBitFieldMaskBit27 = 0x8000000
|
||||
CBitFieldMaskBit28 = 0x10000000
|
||||
CBitFieldMaskBit29 = 0x20000000
|
||||
CBitFieldMaskBit30 = 0x40000000
|
||||
CBitFieldMaskBit31 = 0x80000000
|
||||
CBitFieldMaskBit32 = 0x100000000
|
||||
CBitFieldMaskBit33 = 0x200000000
|
||||
CBitFieldMaskBit34 = 0x400000000
|
||||
CBitFieldMaskBit35 = 0x800000000
|
||||
CBitFieldMaskBit36 = 0x1000000000
|
||||
CBitFieldMaskBit37 = 0x2000000000
|
||||
CBitFieldMaskBit38 = 0x4000000000
|
||||
CBitFieldMaskBit39 = 0x8000000000
|
||||
CBitFieldMaskBit40 = 0x10000000000
|
||||
CBitFieldMaskBit41 = 0x20000000000
|
||||
CBitFieldMaskBit42 = 0x40000000000
|
||||
CBitFieldMaskBit43 = 0x80000000000
|
||||
CBitFieldMaskBit44 = 0x100000000000
|
||||
CBitFieldMaskBit45 = 0x200000000000
|
||||
CBitFieldMaskBit46 = 0x400000000000
|
||||
CBitFieldMaskBit47 = 0x800000000000
|
||||
CBitFieldMaskBit48 = 0x1000000000000
|
||||
CBitFieldMaskBit49 = 0x2000000000000
|
||||
CBitFieldMaskBit50 = 0x4000000000000
|
||||
CBitFieldMaskBit51 = 0x8000000000000
|
||||
CBitFieldMaskBit52 = 0x10000000000000
|
||||
CBitFieldMaskBit53 = 0x20000000000000
|
||||
CBitFieldMaskBit54 = 0x40000000000000
|
||||
CBitFieldMaskBit55 = 0x80000000000000
|
||||
CBitFieldMaskBit56 = 0x100000000000000
|
||||
CBitFieldMaskBit57 = 0x200000000000000
|
||||
CBitFieldMaskBit58 = 0x400000000000000
|
||||
CBitFieldMaskBit59 = 0x800000000000000
|
||||
CBitFieldMaskBit60 = 0x1000000000000000
|
||||
CBitFieldMaskBit61 = 0x2000000000000000
|
||||
CBitFieldMaskBit62 = 0x4000000000000000
|
||||
CBitFieldMaskBit63 = 0x8000000000000000
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [118]uint8
|
||||
_ uint64
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
_ [4]byte
|
||||
Start uint64
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ type Dirent struct {
|
|||
}
|
||||
|
||||
type Fsid struct {
|
||||
_ [2]int32
|
||||
Val [2]int32
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
|
|
@ -763,7 +763,7 @@ const (
|
|||
)
|
||||
|
||||
type Sigset_t struct {
|
||||
_ [16]uint64
|
||||
Val [16]uint64
|
||||
}
|
||||
|
||||
const RNDGETENTCNT = 0x80045200
|
||||
|
|
@ -919,3 +919,353 @@ const (
|
|||
BDADDR_LE_PUBLIC = 0x1
|
||||
BDADDR_LE_RANDOM = 0x2
|
||||
)
|
||||
|
||||
type PerfEventAttr struct {
|
||||
Type uint32
|
||||
Size uint32
|
||||
Config uint64
|
||||
Sample uint64
|
||||
Sample_type uint64
|
||||
Read_format uint64
|
||||
Bits uint64
|
||||
Wakeup uint32
|
||||
Bp_type uint32
|
||||
Ext1 uint64
|
||||
Ext2 uint64
|
||||
Branch_sample_type uint64
|
||||
Sample_regs_user uint64
|
||||
Sample_stack_user uint32
|
||||
Clockid int32
|
||||
Sample_regs_intr uint64
|
||||
Aux_watermark uint32
|
||||
_ uint32
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
Version uint32
|
||||
Compat_version uint32
|
||||
Lock uint32
|
||||
Index uint32
|
||||
Offset int64
|
||||
Time_enabled uint64
|
||||
Time_running uint64
|
||||
Capabilities uint64
|
||||
Pmc_width uint16
|
||||
Time_shift uint16
|
||||
Time_mult uint32
|
||||
Time_offset uint64
|
||||
Time_zero uint64
|
||||
Size uint32
|
||||
_ [948]uint8
|
||||
Data_head uint64
|
||||
Data_tail uint64
|
||||
Data_offset uint64
|
||||
Data_size uint64
|
||||
Aux_head uint64
|
||||
Aux_tail uint64
|
||||
Aux_offset uint64
|
||||
Aux_size uint64
|
||||
}
|
||||
|
||||
const (
|
||||
PerfBitDisabled uint64 = CBitFieldMaskBit0
|
||||
PerfBitInherit = CBitFieldMaskBit1
|
||||
PerfBitPinned = CBitFieldMaskBit2
|
||||
PerfBitExclusive = CBitFieldMaskBit3
|
||||
PerfBitExcludeUser = CBitFieldMaskBit4
|
||||
PerfBitExcludeKernel = CBitFieldMaskBit5
|
||||
PerfBitExcludeHv = CBitFieldMaskBit6
|
||||
PerfBitExcludeIdle = CBitFieldMaskBit7
|
||||
PerfBitMmap = CBitFieldMaskBit8
|
||||
PerfBitComm = CBitFieldMaskBit9
|
||||
PerfBitFreq = CBitFieldMaskBit10
|
||||
PerfBitInheritStat = CBitFieldMaskBit11
|
||||
PerfBitEnableOnExec = CBitFieldMaskBit12
|
||||
PerfBitTask = CBitFieldMaskBit13
|
||||
PerfBitWatermark = CBitFieldMaskBit14
|
||||
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
|
||||
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
|
||||
PerfBitMmapData = CBitFieldMaskBit17
|
||||
PerfBitSampleIDAll = CBitFieldMaskBit18
|
||||
PerfBitExcludeHost = CBitFieldMaskBit19
|
||||
PerfBitExcludeGuest = CBitFieldMaskBit20
|
||||
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
|
||||
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
|
||||
PerfBitMmap2 = CBitFieldMaskBit23
|
||||
PerfBitCommExec = CBitFieldMaskBit24
|
||||
PerfBitUseClockID = CBitFieldMaskBit25
|
||||
PerfBitContextSwitch = CBitFieldMaskBit26
|
||||
)
|
||||
|
||||
const (
|
||||
PERF_TYPE_HARDWARE = 0x0
|
||||
PERF_TYPE_SOFTWARE = 0x1
|
||||
PERF_TYPE_TRACEPOINT = 0x2
|
||||
PERF_TYPE_HW_CACHE = 0x3
|
||||
PERF_TYPE_RAW = 0x4
|
||||
PERF_TYPE_BREAKPOINT = 0x5
|
||||
|
||||
PERF_COUNT_HW_CPU_CYCLES = 0x0
|
||||
PERF_COUNT_HW_INSTRUCTIONS = 0x1
|
||||
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
|
||||
PERF_COUNT_HW_CACHE_MISSES = 0x3
|
||||
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
|
||||
PERF_COUNT_HW_BRANCH_MISSES = 0x5
|
||||
PERF_COUNT_HW_BUS_CYCLES = 0x6
|
||||
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
|
||||
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
|
||||
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
|
||||
|
||||
PERF_COUNT_HW_CACHE_L1D = 0x0
|
||||
PERF_COUNT_HW_CACHE_L1I = 0x1
|
||||
PERF_COUNT_HW_CACHE_LL = 0x2
|
||||
PERF_COUNT_HW_CACHE_DTLB = 0x3
|
||||
PERF_COUNT_HW_CACHE_ITLB = 0x4
|
||||
PERF_COUNT_HW_CACHE_BPU = 0x5
|
||||
PERF_COUNT_HW_CACHE_NODE = 0x6
|
||||
|
||||
PERF_COUNT_HW_CACHE_OP_READ = 0x0
|
||||
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
|
||||
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
|
||||
|
||||
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
|
||||
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
|
||||
|
||||
PERF_COUNT_SW_CPU_CLOCK = 0x0
|
||||
PERF_COUNT_SW_TASK_CLOCK = 0x1
|
||||
PERF_COUNT_SW_PAGE_FAULTS = 0x2
|
||||
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
|
||||
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
|
||||
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
|
||||
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
|
||||
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
|
||||
PERF_COUNT_SW_DUMMY = 0x9
|
||||
|
||||
PERF_SAMPLE_IP = 0x1
|
||||
PERF_SAMPLE_TID = 0x2
|
||||
PERF_SAMPLE_TIME = 0x4
|
||||
PERF_SAMPLE_ADDR = 0x8
|
||||
PERF_SAMPLE_READ = 0x10
|
||||
PERF_SAMPLE_CALLCHAIN = 0x20
|
||||
PERF_SAMPLE_ID = 0x40
|
||||
PERF_SAMPLE_CPU = 0x80
|
||||
PERF_SAMPLE_PERIOD = 0x100
|
||||
PERF_SAMPLE_STREAM_ID = 0x200
|
||||
PERF_SAMPLE_RAW = 0x400
|
||||
PERF_SAMPLE_BRANCH_STACK = 0x800
|
||||
|
||||
PERF_SAMPLE_BRANCH_USER = 0x1
|
||||
PERF_SAMPLE_BRANCH_KERNEL = 0x2
|
||||
PERF_SAMPLE_BRANCH_HV = 0x4
|
||||
PERF_SAMPLE_BRANCH_ANY = 0x8
|
||||
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
|
||||
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
|
||||
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
|
||||
|
||||
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
|
||||
PERF_FORMAT_ID = 0x4
|
||||
PERF_FORMAT_GROUP = 0x8
|
||||
|
||||
PERF_RECORD_MMAP = 0x1
|
||||
PERF_RECORD_LOST = 0x2
|
||||
PERF_RECORD_COMM = 0x3
|
||||
PERF_RECORD_EXIT = 0x4
|
||||
PERF_RECORD_THROTTLE = 0x5
|
||||
PERF_RECORD_UNTHROTTLE = 0x6
|
||||
PERF_RECORD_FORK = 0x7
|
||||
PERF_RECORD_READ = 0x8
|
||||
PERF_RECORD_SAMPLE = 0x9
|
||||
|
||||
PERF_CONTEXT_HV = -0x20
|
||||
PERF_CONTEXT_KERNEL = -0x80
|
||||
PERF_CONTEXT_USER = -0x200
|
||||
|
||||
PERF_CONTEXT_GUEST = -0x800
|
||||
PERF_CONTEXT_GUEST_KERNEL = -0x880
|
||||
PERF_CONTEXT_GUEST_USER = -0xa00
|
||||
|
||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||
PERF_FLAG_FD_OUTPUT = 0x2
|
||||
PERF_FLAG_PID_CGROUP = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
CBitFieldMaskBit0 = 0x8000000000000000
|
||||
CBitFieldMaskBit1 = 0x4000000000000000
|
||||
CBitFieldMaskBit2 = 0x2000000000000000
|
||||
CBitFieldMaskBit3 = 0x1000000000000000
|
||||
CBitFieldMaskBit4 = 0x800000000000000
|
||||
CBitFieldMaskBit5 = 0x400000000000000
|
||||
CBitFieldMaskBit6 = 0x200000000000000
|
||||
CBitFieldMaskBit7 = 0x100000000000000
|
||||
CBitFieldMaskBit8 = 0x80000000000000
|
||||
CBitFieldMaskBit9 = 0x40000000000000
|
||||
CBitFieldMaskBit10 = 0x20000000000000
|
||||
CBitFieldMaskBit11 = 0x10000000000000
|
||||
CBitFieldMaskBit12 = 0x8000000000000
|
||||
CBitFieldMaskBit13 = 0x4000000000000
|
||||
CBitFieldMaskBit14 = 0x2000000000000
|
||||
CBitFieldMaskBit15 = 0x1000000000000
|
||||
CBitFieldMaskBit16 = 0x800000000000
|
||||
CBitFieldMaskBit17 = 0x400000000000
|
||||
CBitFieldMaskBit18 = 0x200000000000
|
||||
CBitFieldMaskBit19 = 0x100000000000
|
||||
CBitFieldMaskBit20 = 0x80000000000
|
||||
CBitFieldMaskBit21 = 0x40000000000
|
||||
CBitFieldMaskBit22 = 0x20000000000
|
||||
CBitFieldMaskBit23 = 0x10000000000
|
||||
CBitFieldMaskBit24 = 0x8000000000
|
||||
CBitFieldMaskBit25 = 0x4000000000
|
||||
CBitFieldMaskBit26 = 0x2000000000
|
||||
CBitFieldMaskBit27 = 0x1000000000
|
||||
CBitFieldMaskBit28 = 0x800000000
|
||||
CBitFieldMaskBit29 = 0x400000000
|
||||
CBitFieldMaskBit30 = 0x200000000
|
||||
CBitFieldMaskBit31 = 0x100000000
|
||||
CBitFieldMaskBit32 = 0x80000000
|
||||
CBitFieldMaskBit33 = 0x40000000
|
||||
CBitFieldMaskBit34 = 0x20000000
|
||||
CBitFieldMaskBit35 = 0x10000000
|
||||
CBitFieldMaskBit36 = 0x8000000
|
||||
CBitFieldMaskBit37 = 0x4000000
|
||||
CBitFieldMaskBit38 = 0x2000000
|
||||
CBitFieldMaskBit39 = 0x1000000
|
||||
CBitFieldMaskBit40 = 0x800000
|
||||
CBitFieldMaskBit41 = 0x400000
|
||||
CBitFieldMaskBit42 = 0x200000
|
||||
CBitFieldMaskBit43 = 0x100000
|
||||
CBitFieldMaskBit44 = 0x80000
|
||||
CBitFieldMaskBit45 = 0x40000
|
||||
CBitFieldMaskBit46 = 0x20000
|
||||
CBitFieldMaskBit47 = 0x10000
|
||||
CBitFieldMaskBit48 = 0x8000
|
||||
CBitFieldMaskBit49 = 0x4000
|
||||
CBitFieldMaskBit50 = 0x2000
|
||||
CBitFieldMaskBit51 = 0x1000
|
||||
CBitFieldMaskBit52 = 0x800
|
||||
CBitFieldMaskBit53 = 0x400
|
||||
CBitFieldMaskBit54 = 0x200
|
||||
CBitFieldMaskBit55 = 0x100
|
||||
CBitFieldMaskBit56 = 0x80
|
||||
CBitFieldMaskBit57 = 0x40
|
||||
CBitFieldMaskBit58 = 0x20
|
||||
CBitFieldMaskBit59 = 0x10
|
||||
CBitFieldMaskBit60 = 0x8
|
||||
CBitFieldMaskBit61 = 0x4
|
||||
CBitFieldMaskBit62 = 0x2
|
||||
CBitFieldMaskBit63 = 0x1
|
||||
)
|
||||
|
||||
type SockaddrStorage struct {
|
||||
Family uint16
|
||||
_ [118]int8
|
||||
_ uint64
|
||||
}
|
||||
|
||||
type TCPMD5Sig struct {
|
||||
Addr SockaddrStorage
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
type HDDriveCmdHdr struct {
|
||||
Command uint8
|
||||
Number uint8
|
||||
Feature uint8
|
||||
Count uint8
|
||||
}
|
||||
|
||||
type HDGeometry struct {
|
||||
Heads uint8
|
||||
Sectors uint8
|
||||
Cylinders uint16
|
||||
_ [4]byte
|
||||
Start uint64
|
||||
}
|
||||
|
||||
type HDDriveID struct {
|
||||
Config uint16
|
||||
Cyls uint16
|
||||
Reserved2 uint16
|
||||
Heads uint16
|
||||
Track_bytes uint16
|
||||
Sector_bytes uint16
|
||||
Sectors uint16
|
||||
Vendor0 uint16
|
||||
Vendor1 uint16
|
||||
Vendor2 uint16
|
||||
Serial_no [20]uint8
|
||||
Buf_type uint16
|
||||
Buf_size uint16
|
||||
Ecc_bytes uint16
|
||||
Fw_rev [8]uint8
|
||||
Model [40]uint8
|
||||
Max_multsect uint8
|
||||
Vendor3 uint8
|
||||
Dword_io uint16
|
||||
Vendor4 uint8
|
||||
Capability uint8
|
||||
Reserved50 uint16
|
||||
Vendor5 uint8
|
||||
TPIO uint8
|
||||
Vendor6 uint8
|
||||
TDMA uint8
|
||||
Field_valid uint16
|
||||
Cur_cyls uint16
|
||||
Cur_heads uint16
|
||||
Cur_sectors uint16
|
||||
Cur_capacity0 uint16
|
||||
Cur_capacity1 uint16
|
||||
Multsect uint8
|
||||
Multsect_valid uint8
|
||||
Lba_capacity uint32
|
||||
Dma_1word uint16
|
||||
Dma_mword uint16
|
||||
Eide_pio_modes uint16
|
||||
Eide_dma_min uint16
|
||||
Eide_dma_time uint16
|
||||
Eide_pio uint16
|
||||
Eide_pio_iordy uint16
|
||||
Words69_70 [2]uint16
|
||||
Words71_74 [4]uint16
|
||||
Queue_depth uint16
|
||||
Words76_79 [4]uint16
|
||||
Major_rev_num uint16
|
||||
Minor_rev_num uint16
|
||||
Command_set_1 uint16
|
||||
Command_set_2 uint16
|
||||
Cfsse uint16
|
||||
Cfs_enable_1 uint16
|
||||
Cfs_enable_2 uint16
|
||||
Csf_default uint16
|
||||
Dma_ultra uint16
|
||||
Trseuc uint16
|
||||
TrsEuc uint16
|
||||
CurAPMvalues uint16
|
||||
Mprc uint16
|
||||
Hw_config uint16
|
||||
Acoustic uint16
|
||||
Msrqs uint16
|
||||
Sxfert uint16
|
||||
Sal uint16
|
||||
Spg uint32
|
||||
Lba_capacity_2 uint64
|
||||
Words104_125 [22]uint16
|
||||
Last_lun uint16
|
||||
Word127 uint16
|
||||
Dlf uint16
|
||||
Csfo uint16
|
||||
Words130_155 [26]uint16
|
||||
Word156 uint16
|
||||
Words157_159 [3]uint16
|
||||
Cfa_power uint16
|
||||
Words161_175 [15]uint16
|
||||
Words176_205 [30]uint16
|
||||
Words206_254 [49]uint16
|
||||
Integrity_word uint16
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue