Backend plugins: Updates due to changes in SDK (#22649)
Use v0.20.0 of SDK
This commit is contained in:
@@ -32,8 +32,8 @@ require (
|
||||
github.com/gorilla/websocket v1.4.1
|
||||
github.com/gosimple/slug v1.4.2
|
||||
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.19.0
|
||||
github.com/hashicorp/go-hclog v0.8.0
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.20.0
|
||||
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd
|
||||
github.com/hashicorp/go-plugin v1.0.1
|
||||
github.com/hashicorp/go-version v1.1.0
|
||||
github.com/inconshreveable/log15 v0.0.0-20180818164646-67afb5ed74ec
|
||||
@@ -44,8 +44,8 @@ require (
|
||||
github.com/klauspost/cpuid v1.2.0 // indirect
|
||||
github.com/lib/pq v1.2.0
|
||||
github.com/linkedin/goavro/v2 v2.9.7
|
||||
github.com/mattn/go-colorable v0.1.4 // indirect
|
||||
github.com/mattn/go-isatty v0.0.10
|
||||
github.com/mattn/go-colorable v0.1.6 // indirect
|
||||
github.com/mattn/go-isatty v0.0.12
|
||||
github.com/mattn/go-sqlite3 v1.11.0
|
||||
github.com/opentracing/opentracing-go v1.1.0
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
|
||||
@@ -133,11 +133,10 @@ github.com/gosimple/slug v1.4.2 h1:jDmprx3q/9Lfk4FkGZtvzDQ9Cj9eAmsjzeQGp24PeiQ=
|
||||
github.com/gosimple/slug v1.4.2/go.mod h1:ER78kgg1Mv0NQGlXiDe57DpCyfbNywXXZ9mIorhxAf0=
|
||||
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4 h1:SPdxCL9BChFTlyi0Khv64vdCW4TMna8+sxL7+Chx+Ag=
|
||||
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4/go.mod h1:nc0XxBzjeGcrMltCDw269LoWF9S8ibhgxolCdA1R8To=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.19.0 h1:qLq8tOSxZ9O7+AdduXJVU6jEOlg/2eP8UXdhAzQ81g0=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.19.0/go.mod h1:G6Ov9M+FDOZXNw8eKXINO6XzqdUvTs7huwyQp5jLTBQ=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.20.0 h1:01Hit/9HNxyvUcfECvnFSB8LIrbsYSlHvyPvKKczuPo=
|
||||
github.com/grafana/grafana-plugin-sdk-go v0.20.0/go.mod h1:G6Ov9M+FDOZXNw8eKXINO6XzqdUvTs7huwyQp5jLTBQ=
|
||||
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd h1:rNuUHR+CvK1IS89MMtcF0EpcVMZtjKfPRp4MEmt/aTs=
|
||||
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
|
||||
github.com/hashicorp/go-hclog v0.8.0 h1:z3ollgGRg8RjfJH6UVBaG54R70GFd++QOkvnJH3VSBY=
|
||||
github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-plugin v1.0.1 h1:4OtAfUGbnKC6yS48p0CtMX2oFYtzFZVv6rok3cRWgnE=
|
||||
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
|
||||
github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0=
|
||||
@@ -193,11 +192,10 @@ github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de/go.mod h1:3q8WtuPQsoRbat
|
||||
github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af/go.mod h1:Cqz6pqow14VObJ7peltM+2n3PWOz7yTrfUuGbVFkzN0=
|
||||
github.com/mattetti/filebuffer v1.0.0 h1:ixTvQ0JjBTwWbdpDZ98lLrydo7KRi8xNRIi5RFszsbY=
|
||||
github.com/mattetti/filebuffer v1.0.0/go.mod h1:X6nyAIge2JGVmuJt2MFCqmHrb/5IHiphfHtot0s5cnI=
|
||||
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10=
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
|
||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o=
|
||||
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
@@ -374,8 +372,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -383,10 +379,11 @@ golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcd
|
||||
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM=
|
||||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f h1:68K/z8GLUxV76xGSqwTWw2gyk/jwn79LUL43rES2g8o=
|
||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
||||
@@ -33,7 +33,7 @@ type BackendPlugin struct {
|
||||
logger log.Logger
|
||||
startFns PluginStartFuncs
|
||||
diagnostics DiagnosticsPlugin
|
||||
core CorePlugin
|
||||
resource ResourcePlugin
|
||||
}
|
||||
|
||||
func (p *BackendPlugin) start(ctx context.Context) error {
|
||||
@@ -52,7 +52,12 @@ func (p *BackendPlugin) start(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
rawBackend, err := rpcClient.Dispense("backend")
|
||||
rawResource, err := rpcClient.Dispense("resource")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rawData, err := rpcClient.Dispense("data")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -69,10 +74,16 @@ func (p *BackendPlugin) start(ctx context.Context) error {
|
||||
}
|
||||
|
||||
client = &Client{}
|
||||
if rawBackend != nil {
|
||||
if plugin, ok := rawBackend.(CorePlugin); ok {
|
||||
p.core = plugin
|
||||
client.CorePlugin = plugin
|
||||
if rawResource != nil {
|
||||
if plugin, ok := rawResource.(ResourcePlugin); ok {
|
||||
p.resource = plugin
|
||||
client.ResourcePlugin = plugin
|
||||
}
|
||||
}
|
||||
|
||||
if rawData != nil {
|
||||
if plugin, ok := rawData.(DataPlugin); ok {
|
||||
client.DataPlugin = plugin
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +149,7 @@ func (p *BackendPlugin) CollectMetrics(ctx context.Context, ch chan<- prometheus
|
||||
return nil
|
||||
}
|
||||
|
||||
res, err := p.diagnostics.CollectMetrics(ctx, &pluginv2.CollectMetrics_Request{})
|
||||
res, err := p.diagnostics.CollectMetrics(ctx, &pluginv2.CollectMetricsRequest{})
|
||||
if err != nil {
|
||||
if st, ok := status.FromError(err); ok {
|
||||
if st.Code() == codes.Unimplemented {
|
||||
@@ -174,19 +185,19 @@ func (p *BackendPlugin) CollectMetrics(ctx context.Context, ch chan<- prometheus
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *BackendPlugin) checkHealth(ctx context.Context) (*pluginv2.CheckHealth_Response, error) {
|
||||
func (p *BackendPlugin) checkHealth(ctx context.Context) (*pluginv2.CheckHealthResponse, error) {
|
||||
if p.diagnostics == nil || p.client == nil || p.client.Exited() {
|
||||
return &pluginv2.CheckHealth_Response{
|
||||
Status: pluginv2.CheckHealth_Response_UNKNOWN,
|
||||
return &pluginv2.CheckHealthResponse{
|
||||
Status: pluginv2.CheckHealthResponse_UNKNOWN,
|
||||
}, nil
|
||||
}
|
||||
|
||||
res, err := p.diagnostics.CheckHealth(ctx, &pluginv2.CheckHealth_Request{})
|
||||
res, err := p.diagnostics.CheckHealth(ctx, &pluginv2.CheckHealthRequest{})
|
||||
if err != nil {
|
||||
if st, ok := status.FromError(err); ok {
|
||||
if st.Code() == codes.Unimplemented {
|
||||
return &pluginv2.CheckHealth_Response{
|
||||
Status: pluginv2.CheckHealth_Response_UNKNOWN,
|
||||
return &pluginv2.CheckHealthResponse{
|
||||
Status: pluginv2.CheckHealthResponse_UNKNOWN,
|
||||
Message: "Health check not implemented",
|
||||
}, nil
|
||||
}
|
||||
@@ -200,13 +211,13 @@ func (p *BackendPlugin) checkHealth(ctx context.Context) (*pluginv2.CheckHealth_
|
||||
func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceRequest) (callResourceResultStream, error) {
|
||||
p.logger.Debug("Calling resource", "path", req.Path, "method", req.Method)
|
||||
|
||||
if p.core == nil || p.client == nil || p.client.Exited() {
|
||||
if p.resource == nil || p.client == nil || p.client.Exited() {
|
||||
return nil, errors.New("plugin not running, cannot call resource")
|
||||
}
|
||||
|
||||
reqHeaders := map[string]*pluginv2.CallResource_StringList{}
|
||||
reqHeaders := map[string]*pluginv2.StringList{}
|
||||
for k, v := range req.Headers {
|
||||
reqHeaders[k] = &pluginv2.CallResource_StringList{Values: v}
|
||||
reqHeaders[k] = &pluginv2.StringList{Values: v}
|
||||
}
|
||||
|
||||
jsonDataBytes, err := req.Config.JSONData.ToDB()
|
||||
@@ -214,7 +225,7 @@ func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceReques
|
||||
return nil, err
|
||||
}
|
||||
|
||||
protoReq := &pluginv2.CallResource_Request{
|
||||
protoReq := &pluginv2.CallResourceRequest{
|
||||
Config: &pluginv2.PluginConfig{
|
||||
OrgId: req.Config.OrgID,
|
||||
PluginId: req.Config.PluginID,
|
||||
@@ -251,7 +262,7 @@ func (p *BackendPlugin) callResource(ctx context.Context, req CallResourceReques
|
||||
}
|
||||
}
|
||||
|
||||
protoStream, err := p.core.CallResource(ctx, protoReq)
|
||||
protoStream, err := p.resource.CallResource(ctx, protoReq)
|
||||
if err != nil {
|
||||
if st, ok := status.FromError(err); ok {
|
||||
if st.Code() == codes.Unimplemented {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package backendplugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/plugin"
|
||||
@@ -10,7 +9,6 @@ import (
|
||||
|
||||
datasourceV1 "github.com/grafana/grafana-plugin-model/go/datasource"
|
||||
rendererV1 "github.com/grafana/grafana-plugin-model/go/renderer"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2"
|
||||
goplugin "github.com/hashicorp/go-plugin"
|
||||
)
|
||||
|
||||
@@ -77,7 +75,8 @@ func NewBackendPluginDescriptor(pluginID, executablePath string, startFns Plugin
|
||||
},
|
||||
plugin.ProtocolVersion: {
|
||||
"diagnostics": &plugin.DiagnosticsGRPCPlugin{},
|
||||
"backend": &plugin.CoreGRPCPlugin{},
|
||||
"resource": &plugin.ResourceGRPCPlugin{},
|
||||
"data": &plugin.DataGRPCPlugin{},
|
||||
"transform": &plugin.TransformGRPCPlugin{},
|
||||
},
|
||||
},
|
||||
@@ -105,12 +104,16 @@ type DiagnosticsPlugin interface {
|
||||
plugin.DiagnosticsServer
|
||||
}
|
||||
|
||||
type CorePlugin interface {
|
||||
plugin.CoreClient
|
||||
type ResourcePlugin interface {
|
||||
plugin.ResourceClient
|
||||
}
|
||||
|
||||
type DataPlugin interface {
|
||||
plugin.DataClient
|
||||
}
|
||||
|
||||
type TransformPlugin interface {
|
||||
DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest, callback plugin.TransformCallBack) (*pluginv2.DataQueryResponse, error)
|
||||
plugin.TransformClient
|
||||
}
|
||||
|
||||
// LegacyClient client for communicating with a plugin using the old plugin protocol.
|
||||
@@ -121,6 +124,7 @@ type LegacyClient struct {
|
||||
|
||||
// Client client for communicating with a plugin using the current plugin protocol.
|
||||
type Client struct {
|
||||
CorePlugin CorePlugin
|
||||
ResourcePlugin ResourcePlugin
|
||||
DataPlugin DataPlugin
|
||||
TransformPlugin TransformPlugin
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ type CheckHealthResult struct {
|
||||
JSONDetails string
|
||||
}
|
||||
|
||||
func checkHealthResultFromProto(protoResp *pluginv2.CheckHealth_Response) *CheckHealthResult {
|
||||
func checkHealthResultFromProto(protoResp *pluginv2.CheckHealthResponse) *CheckHealthResult {
|
||||
status := HealthStatusUnknown
|
||||
switch protoResp.Status {
|
||||
case pluginv2.CheckHealth_Response_ERROR:
|
||||
case pluginv2.CheckHealthResponse_ERROR:
|
||||
status = HealthStatusError
|
||||
case pluginv2.CheckHealth_Response_OK:
|
||||
case pluginv2.CheckHealthResponse_OK:
|
||||
status = HealthStatusOk
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ type callResourceResultStream interface {
|
||||
}
|
||||
|
||||
type callResourceResultStreamImpl struct {
|
||||
stream pluginv2.Core_CallResourceClient
|
||||
stream pluginv2.Resource_CallResourceClient
|
||||
}
|
||||
|
||||
func (s *callResourceResultStreamImpl) Recv() (*CallResourceResult, error) {
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
package resource
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2"
|
||||
)
|
||||
|
||||
// ResourceResponseWriter is an implementation of http.ResponseWriter that
|
||||
// records its mutations for later inspection in tests.
|
||||
type ResourceResponseWriter struct {
|
||||
// Code is the HTTP response code set by WriteHeader.
|
||||
//
|
||||
// Note that if a Handler never calls WriteHeader or Write,
|
||||
// this might end up being 0, rather than the implicit
|
||||
// http.StatusOK. To get the implicit value, use the Result
|
||||
// method.
|
||||
Code int
|
||||
|
||||
// HeaderMap contains the headers explicitly set by the Handler.
|
||||
// It is an internal detail.
|
||||
//
|
||||
// Deprecated: HeaderMap exists for historical compatibility
|
||||
// and should not be used. To access the headers returned by a handler,
|
||||
// use the Response.Header map as returned by the Result method.
|
||||
HeaderMap http.Header
|
||||
|
||||
// Body is the buffer to which the Handler's Write calls are sent.
|
||||
// If nil, the Writes are silently discarded.
|
||||
Body *bytes.Buffer
|
||||
|
||||
// Flushed is whether the Handler called Flush.
|
||||
Flushed bool
|
||||
|
||||
wroteHeader bool
|
||||
}
|
||||
|
||||
// NewResourceResponseWriter returns an initialized ResponseWriter.
|
||||
func NewResourceResponseWriter() *ResourceResponseWriter {
|
||||
return &ResourceResponseWriter{
|
||||
HeaderMap: make(http.Header),
|
||||
Body: new(bytes.Buffer),
|
||||
Code: 200,
|
||||
}
|
||||
}
|
||||
|
||||
// Header implements http.ResponseWriter. It returns the response
|
||||
// headers to mutate within a handler. To test the headers that were
|
||||
// written after a handler completes, use the Result method and see
|
||||
// the returned Response value's Header.
|
||||
func (rw *ResourceResponseWriter) Header() http.Header {
|
||||
m := rw.HeaderMap
|
||||
if m == nil {
|
||||
m = make(http.Header)
|
||||
rw.HeaderMap = m
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// writeHeader writes a header if it was not written yet and
|
||||
// detects Content-Type if needed.
|
||||
//
|
||||
// bytes or str are the beginning of the response body.
|
||||
// We pass both to avoid unnecessarily generate garbage
|
||||
// in rw.WriteString which was created for performance reasons.
|
||||
// Non-nil bytes win.
|
||||
func (rw *ResourceResponseWriter) writeHeader(b []byte, str string) {
|
||||
if rw.wroteHeader {
|
||||
return
|
||||
}
|
||||
if len(str) > 512 {
|
||||
str = str[:512]
|
||||
}
|
||||
|
||||
m := rw.Header()
|
||||
|
||||
_, hasType := m["Content-Type"]
|
||||
hasTE := m.Get("Transfer-Encoding") != ""
|
||||
if !hasType && !hasTE {
|
||||
if b == nil {
|
||||
b = []byte(str)
|
||||
}
|
||||
m.Set("Content-Type", http.DetectContentType(b))
|
||||
}
|
||||
|
||||
rw.WriteHeader(200)
|
||||
}
|
||||
|
||||
// Write implements http.ResponseWriter. The data in buf is written to
|
||||
// rw.Body, if not nil.
|
||||
func (rw *ResourceResponseWriter) Write(buf []byte) (int, error) {
|
||||
rw.writeHeader(buf, "")
|
||||
if rw.Body != nil {
|
||||
rw.Body.Write(buf)
|
||||
}
|
||||
return len(buf), nil
|
||||
}
|
||||
|
||||
// WriteHeader implements http.ResponseWriter.
|
||||
func (rw *ResourceResponseWriter) WriteHeader(code int) {
|
||||
if rw.wroteHeader {
|
||||
return
|
||||
}
|
||||
rw.Code = code
|
||||
rw.wroteHeader = true
|
||||
if rw.HeaderMap == nil {
|
||||
rw.HeaderMap = make(http.Header)
|
||||
}
|
||||
}
|
||||
|
||||
// Flush implements http.Flusher.
|
||||
func (rw *ResourceResponseWriter) Flush() {
|
||||
if !rw.wroteHeader {
|
||||
rw.WriteHeader(200)
|
||||
}
|
||||
}
|
||||
|
||||
// Result returns the response generated by the handler.
|
||||
func (rw *ResourceResponseWriter) Result() *pluginv2.CallResource_Response {
|
||||
res := &pluginv2.CallResource_Response{
|
||||
Code: int32(rw.Code),
|
||||
Headers: map[string]*pluginv2.CallResource_StringList{},
|
||||
}
|
||||
|
||||
if rw.Body != nil {
|
||||
res.Body = rw.Body.Bytes()
|
||||
}
|
||||
|
||||
for key, values := range rw.Header().Clone() {
|
||||
res.Headers[key] = &pluginv2.CallResource_StringList{
|
||||
Values: values,
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
@@ -13,12 +13,12 @@ import (
|
||||
"github.com/grafana/grafana/pkg/tsdb"
|
||||
)
|
||||
|
||||
func NewDatasourcePluginWrapperV2(log log.Logger, pluginId, pluginType string, plugin backendplugin.CorePlugin) *DatasourcePluginWrapperV2 {
|
||||
return &DatasourcePluginWrapperV2{CorePlugin: plugin, logger: log, pluginId: pluginId, pluginType: pluginType}
|
||||
func NewDatasourcePluginWrapperV2(log log.Logger, pluginId, pluginType string, plugin backendplugin.DataPlugin) *DatasourcePluginWrapperV2 {
|
||||
return &DatasourcePluginWrapperV2{DataPlugin: plugin, logger: log, pluginId: pluginId, pluginType: pluginType}
|
||||
}
|
||||
|
||||
type DatasourcePluginWrapperV2 struct {
|
||||
backendplugin.CorePlugin
|
||||
backendplugin.DataPlugin
|
||||
logger log.Logger
|
||||
pluginId string
|
||||
pluginType string
|
||||
@@ -30,7 +30,7 @@ func (tw *DatasourcePluginWrapperV2) Query(ctx context.Context, ds *models.DataS
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pbQuery := &pluginv2.DataQueryRequest{
|
||||
pbQuery := &pluginv2.QueryDataRequest{
|
||||
Config: &pluginv2.PluginConfig{
|
||||
OrgId: ds.OrgId,
|
||||
PluginId: tw.pluginId,
|
||||
@@ -77,7 +77,7 @@ func (tw *DatasourcePluginWrapperV2) Query(ctx context.Context, ds *models.DataS
|
||||
})
|
||||
}
|
||||
|
||||
pbRes, err := tw.CorePlugin.DataQuery(ctx, pbQuery)
|
||||
pbRes, err := tw.DataPlugin.QueryData(ctx, pbQuery)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ func (p *DataSourcePlugin) onLegacyPluginStart(pluginID string, client *backendp
|
||||
}
|
||||
|
||||
func (p *DataSourcePlugin) onPluginStart(pluginID string, client *backendplugin.Client, logger log.Logger) error {
|
||||
if client.CorePlugin != nil {
|
||||
if client.DataPlugin != nil {
|
||||
tsdb.RegisterTsdbQueryEndpoint(pluginID, func(dsInfo *models.DataSource) (tsdb.TsdbQueryEndpoint, error) {
|
||||
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.CorePlugin), nil
|
||||
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.DataPlugin), nil
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@ func (p *TransformPlugin) Load(decoder *json.Decoder, pluginDir string, backendP
|
||||
func (p *TransformPlugin) onPluginStart(pluginID string, client *backendplugin.Client, logger log.Logger) error {
|
||||
p.TransformWrapper = NewTransformWrapper(logger, client.TransformPlugin)
|
||||
|
||||
if client.CorePlugin != nil {
|
||||
if client.DataPlugin != nil {
|
||||
tsdb.RegisterTsdbQueryEndpoint(pluginID, func(dsInfo *models.DataSource) (tsdb.TsdbQueryEndpoint, error) {
|
||||
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.CorePlugin), nil
|
||||
return wrapper.NewDatasourcePluginWrapperV2(logger, p.Id, p.Type, client.DataPlugin), nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ type TransformWrapper struct {
|
||||
}
|
||||
|
||||
func (tw *TransformWrapper) Transform(ctx context.Context, query *tsdb.TsdbQuery) (*tsdb.Response, error) {
|
||||
pbQuery := &pluginv2.DataQueryRequest{
|
||||
pbQuery := &pluginv2.QueryDataRequest{
|
||||
Config: &pluginv2.PluginConfig{},
|
||||
Queries: []*pluginv2.DataQuery{},
|
||||
}
|
||||
@@ -98,7 +98,7 @@ func (tw *TransformWrapper) Transform(ctx context.Context, query *tsdb.TsdbQuery
|
||||
},
|
||||
})
|
||||
}
|
||||
pbRes, err := tw.TransformPlugin.DataQuery(ctx, pbQuery, tw.callback)
|
||||
pbRes, err := tw.TransformPlugin.TransformData(ctx, pbQuery, tw.callback)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -117,7 +117,7 @@ type transformCallback struct {
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func (s *transformCallback) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error) {
|
||||
func (s *transformCallback) QueryData(ctx context.Context, req *pluginv2.QueryDataRequest) (*pluginv2.QueryDataResponse, error) {
|
||||
if len(req.Queries) == 0 {
|
||||
return nil, fmt.Errorf("zero queries found in datasource request")
|
||||
}
|
||||
@@ -196,5 +196,5 @@ func (s *transformCallback) DataQuery(ctx context.Context, req *pluginv2.DataQue
|
||||
encodedFrames = append(encodedFrames, encFrame)
|
||||
}
|
||||
}
|
||||
return &pluginv2.DataQueryResponse{Frames: encodedFrames}, nil
|
||||
return &pluginv2.QueryDataResponse{Frames: encodedFrames}, nil
|
||||
}
|
||||
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: google/protobuf/empty.proto
|
||||
|
||||
package empty
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// A generic empty message that you can re-use to avoid defining duplicated
|
||||
// empty messages in your APIs. A typical example is to use it as the request
|
||||
// or the response type of an API method. For instance:
|
||||
//
|
||||
// service Foo {
|
||||
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
// }
|
||||
//
|
||||
// The JSON representation for `Empty` is empty JSON object `{}`.
|
||||
type Empty struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Empty) Reset() { *m = Empty{} }
|
||||
func (m *Empty) String() string { return proto.CompactTextString(m) }
|
||||
func (*Empty) ProtoMessage() {}
|
||||
func (*Empty) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_900544acb223d5b8, []int{0}
|
||||
}
|
||||
|
||||
func (*Empty) XXX_WellKnownType() string { return "Empty" }
|
||||
|
||||
func (m *Empty) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Empty.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Empty) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Empty.Merge(m, src)
|
||||
}
|
||||
func (m *Empty) XXX_Size() int {
|
||||
return xxx_messageInfo_Empty.Size(m)
|
||||
}
|
||||
func (m *Empty) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Empty.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Empty proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Empty)(nil), "google.protobuf.Empty")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) }
|
||||
|
||||
var fileDescriptor_900544acb223d5b8 = []byte{
|
||||
// 148 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f,
|
||||
0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28,
|
||||
0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57,
|
||||
0x90, 0xbc, 0x53, 0x19, 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36,
|
||||
0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf,
|
||||
0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0x47, 0x58, 0x53, 0x50, 0x52, 0x59, 0x90, 0x5a, 0x0c,
|
||||
0xb1, 0xed, 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10,
|
||||
0x13, 0x03, 0xa0, 0xea, 0xf4, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40,
|
||||
0xea, 0x93, 0xd8, 0xc0, 0x06, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0xd4, 0xb3, 0xa6,
|
||||
0xb7, 0x00, 0x00, 0x00,
|
||||
}
|
||||
-52
@@ -1,52 +0,0 @@
|
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.protobuf;
|
||||
|
||||
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||
option go_package = "github.com/golang/protobuf/ptypes/empty";
|
||||
option java_package = "com.google.protobuf";
|
||||
option java_outer_classname = "EmptyProto";
|
||||
option java_multiple_files = true;
|
||||
option objc_class_prefix = "GPB";
|
||||
option cc_enable_arenas = true;
|
||||
|
||||
// A generic empty message that you can re-use to avoid defining duplicated
|
||||
// empty messages in your APIs. A typical example is to use it as the request
|
||||
// or the response type of an API method. For instance:
|
||||
//
|
||||
// service Foo {
|
||||
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
// }
|
||||
//
|
||||
// The JSON representation for `Empty` is empty JSON object `{}`.
|
||||
message Empty {}
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2"
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type CoreServer interface {
|
||||
pluginv2.CoreServer
|
||||
}
|
||||
|
||||
type CoreClient interface {
|
||||
pluginv2.CoreClient
|
||||
}
|
||||
|
||||
// CoreGRPCPlugin implements the GRPCPlugin interface from github.com/hashicorp/go-plugin.
|
||||
type CoreGRPCPlugin struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
plugin.GRPCPlugin
|
||||
CoreServer CoreServer
|
||||
}
|
||||
|
||||
func (p *CoreGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
|
||||
pluginv2.RegisterCoreServer(s, &coreGRPCServer{
|
||||
server: p.CoreServer,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *CoreGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
|
||||
return &coreGRPCClient{client: pluginv2.NewCoreClient(c)}, nil
|
||||
}
|
||||
|
||||
type coreGRPCServer struct {
|
||||
server CoreServer
|
||||
}
|
||||
|
||||
func (s *coreGRPCServer) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error) {
|
||||
return s.server.DataQuery(ctx, req)
|
||||
}
|
||||
|
||||
func (s *coreGRPCServer) CallResource(req *pluginv2.CallResource_Request, srv pluginv2.Core_CallResourceServer) error {
|
||||
return s.server.CallResource(req, srv)
|
||||
}
|
||||
|
||||
type coreGRPCClient struct {
|
||||
client pluginv2.CoreClient
|
||||
}
|
||||
|
||||
func (m *coreGRPCClient) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest, opts ...grpc.CallOption) (*pluginv2.DataQueryResponse, error) {
|
||||
return m.client.DataQuery(ctx, req, opts...)
|
||||
}
|
||||
|
||||
func (m *coreGRPCClient) CallResource(ctx context.Context, req *pluginv2.CallResource_Request, opts ...grpc.CallOption) (pluginv2.Core_CallResourceClient, error) {
|
||||
return m.client.CallResource(ctx, req, opts...)
|
||||
}
|
||||
|
||||
var _ CoreServer = &coreGRPCServer{}
|
||||
var _ CoreClient = &coreGRPCClient{}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2"
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type DataServer interface {
|
||||
pluginv2.DataServer
|
||||
}
|
||||
|
||||
type DataClient interface {
|
||||
pluginv2.DataClient
|
||||
}
|
||||
|
||||
// DataGRPCPlugin implements the GRPCPlugin interface from github.com/hashicorp/go-plugin.
|
||||
type DataGRPCPlugin struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
plugin.GRPCPlugin
|
||||
DataServer DataServer
|
||||
}
|
||||
|
||||
func (p *DataGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
|
||||
pluginv2.RegisterDataServer(s, &dataGRPCServer{
|
||||
server: p.DataServer,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DataGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
|
||||
return &dataGRPCClient{client: pluginv2.NewDataClient(c)}, nil
|
||||
}
|
||||
|
||||
type dataGRPCServer struct {
|
||||
server DataServer
|
||||
}
|
||||
|
||||
func (s *dataGRPCServer) QueryData(ctx context.Context, req *pluginv2.QueryDataRequest) (*pluginv2.QueryDataResponse, error) {
|
||||
return s.server.QueryData(ctx, req)
|
||||
}
|
||||
|
||||
type dataGRPCClient struct {
|
||||
client pluginv2.DataClient
|
||||
}
|
||||
|
||||
func (m *dataGRPCClient) QueryData(ctx context.Context, req *pluginv2.QueryDataRequest, opts ...grpc.CallOption) (*pluginv2.QueryDataResponse, error) {
|
||||
return m.client.QueryData(ctx, req, opts...)
|
||||
}
|
||||
|
||||
var _ DataServer = &dataGRPCServer{}
|
||||
var _ DataClient = &dataGRPCClient{}
|
||||
Generated
Vendored
+11
-7
@@ -12,6 +12,10 @@ type DiagnosticsServer interface {
|
||||
pluginv2.DiagnosticsServer
|
||||
}
|
||||
|
||||
type DiagnosticsClient interface {
|
||||
pluginv2.DiagnosticsClient
|
||||
}
|
||||
|
||||
// DiagnosticsGRPCPlugin implements the GRPCPlugin interface from github.com/hashicorp/go-plugin.
|
||||
type DiagnosticsGRPCPlugin struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
@@ -34,11 +38,11 @@ type diagnosticsGRPCServer struct {
|
||||
server DiagnosticsServer
|
||||
}
|
||||
|
||||
func (s *diagnosticsGRPCServer) CollectMetrics(ctx context.Context, req *pluginv2.CollectMetrics_Request) (*pluginv2.CollectMetrics_Response, error) {
|
||||
func (s *diagnosticsGRPCServer) CollectMetrics(ctx context.Context, req *pluginv2.CollectMetricsRequest) (*pluginv2.CollectMetricsResponse, error) {
|
||||
return s.server.CollectMetrics(ctx, req)
|
||||
}
|
||||
|
||||
func (s *diagnosticsGRPCServer) CheckHealth(ctx context.Context, req *pluginv2.CheckHealth_Request) (*pluginv2.CheckHealth_Response, error) {
|
||||
func (s *diagnosticsGRPCServer) CheckHealth(ctx context.Context, req *pluginv2.CheckHealthRequest) (*pluginv2.CheckHealthResponse, error) {
|
||||
return s.server.CheckHealth(ctx, req)
|
||||
}
|
||||
|
||||
@@ -46,13 +50,13 @@ type diagnosticsGRPCClient struct {
|
||||
client pluginv2.DiagnosticsClient
|
||||
}
|
||||
|
||||
func (s *diagnosticsGRPCClient) CollectMetrics(ctx context.Context, req *pluginv2.CollectMetrics_Request) (*pluginv2.CollectMetrics_Response, error) {
|
||||
return s.client.CollectMetrics(ctx, req)
|
||||
func (s *diagnosticsGRPCClient) CollectMetrics(ctx context.Context, req *pluginv2.CollectMetricsRequest, opts ...grpc.CallOption) (*pluginv2.CollectMetricsResponse, error) {
|
||||
return s.client.CollectMetrics(ctx, req, opts...)
|
||||
}
|
||||
|
||||
func (s *diagnosticsGRPCClient) CheckHealth(ctx context.Context, req *pluginv2.CheckHealth_Request) (*pluginv2.CheckHealth_Response, error) {
|
||||
return s.client.CheckHealth(ctx, req)
|
||||
func (s *diagnosticsGRPCClient) CheckHealth(ctx context.Context, req *pluginv2.CheckHealthRequest, opts ...grpc.CallOption) (*pluginv2.CheckHealthResponse, error) {
|
||||
return s.client.CheckHealth(ctx, req, opts...)
|
||||
}
|
||||
|
||||
var _ DiagnosticsServer = &diagnosticsGRPCServer{}
|
||||
var _ DiagnosticsServer = &diagnosticsGRPCClient{}
|
||||
var _ DiagnosticsClient = &diagnosticsGRPCClient{}
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2"
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type ResourceServer interface {
|
||||
pluginv2.ResourceServer
|
||||
}
|
||||
|
||||
type ResourceClient interface {
|
||||
pluginv2.ResourceClient
|
||||
}
|
||||
|
||||
// ResourceGRPCPlugin implements the GRPCPlugin interface from github.com/hashicorp/go-plugin.
|
||||
type ResourceGRPCPlugin struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
plugin.GRPCPlugin
|
||||
ResourceServer ResourceServer
|
||||
}
|
||||
|
||||
func (p *ResourceGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
|
||||
pluginv2.RegisterResourceServer(s, &resourceGRPCServer{
|
||||
server: p.ResourceServer,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ResourceGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
|
||||
return &resourceGRPCClient{client: pluginv2.NewResourceClient(c)}, nil
|
||||
}
|
||||
|
||||
type resourceGRPCServer struct {
|
||||
server ResourceServer
|
||||
}
|
||||
|
||||
func (s *resourceGRPCServer) CallResource(req *pluginv2.CallResourceRequest, srv pluginv2.Resource_CallResourceServer) error {
|
||||
return s.server.CallResource(req, srv)
|
||||
}
|
||||
|
||||
type resourceGRPCClient struct {
|
||||
client pluginv2.ResourceClient
|
||||
}
|
||||
|
||||
func (m *resourceGRPCClient) CallResource(ctx context.Context, req *pluginv2.CallResourceRequest, opts ...grpc.CallOption) (pluginv2.Resource_CallResourceClient, error) {
|
||||
return m.client.CallResource(ctx, req, opts...)
|
||||
}
|
||||
|
||||
var _ ResourceServer = &resourceGRPCServer{}
|
||||
var _ ResourceClient = &resourceGRPCClient{}
|
||||
+22
-22
@@ -12,15 +12,15 @@ import (
|
||||
)
|
||||
|
||||
type TransformServer interface {
|
||||
TransformData(ctx context.Context, req *pluginv2.DataQueryRequest, callback TransformCallBack) (*pluginv2.DataQueryResponse, error)
|
||||
TransformData(ctx context.Context, req *pluginv2.QueryDataRequest, callback TransformDataCallBack) (*pluginv2.QueryDataResponse, error)
|
||||
}
|
||||
|
||||
type transformClient interface {
|
||||
DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest, callback TransformCallBack) (*pluginv2.DataQueryResponse, error)
|
||||
type TransformClient interface {
|
||||
TransformData(ctx context.Context, req *pluginv2.QueryDataRequest, callback TransformDataCallBack) (*pluginv2.QueryDataResponse, error)
|
||||
}
|
||||
|
||||
type TransformCallBack interface {
|
||||
DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error)
|
||||
type TransformDataCallBack interface {
|
||||
QueryData(ctx context.Context, req *pluginv2.QueryDataRequest) (*pluginv2.QueryDataResponse, error)
|
||||
}
|
||||
|
||||
// TransformGRPCPlugin implements the GRPCPlugin interface from github.com/hashicorp/go-plugin.
|
||||
@@ -47,7 +47,7 @@ type transformGRPCServer struct {
|
||||
server TransformServer
|
||||
}
|
||||
|
||||
func (t *transformGRPCServer) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error) {
|
||||
func (t *transformGRPCServer) TransformData(ctx context.Context, req *pluginv2.QueryDataRequest) (*pluginv2.QueryDataResponse, error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("transform request is missing metadata")
|
||||
@@ -65,7 +65,7 @@ func (t *transformGRPCServer) DataQuery(ctx context.Context, req *pluginv2.DataQ
|
||||
return nil, err
|
||||
}
|
||||
defer conn.Close()
|
||||
api := &transformCallBackGrpcClient{pluginv2.NewTransformCallBackClient(conn)}
|
||||
api := &transformDataCallBackGrpcClient{pluginv2.NewTransformDataCallBackClient(conn)}
|
||||
return t.server.TransformData(ctx, req, api)
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ type transformGRPCClient struct {
|
||||
client pluginv2.TransformClient
|
||||
}
|
||||
|
||||
func (t *transformGRPCClient) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest, callBack TransformCallBack) (*pluginv2.DataQueryResponse, error) {
|
||||
callBackServer := &transformCallBackGrpcServer{Impl: callBack}
|
||||
func (t *transformGRPCClient) TransformData(ctx context.Context, req *pluginv2.QueryDataRequest, callBack TransformDataCallBack) (*pluginv2.QueryDataResponse, error) {
|
||||
callBackServer := &transformDataCallBackGrpcServer{Impl: callBack}
|
||||
|
||||
var s *grpc.Server
|
||||
serverFunc := func(opts []grpc.ServerOption) *grpc.Server {
|
||||
s = grpc.NewServer(opts...)
|
||||
pluginv2.RegisterTransformCallBackServer(s, callBackServer)
|
||||
pluginv2.RegisterTransformDataCallBackServer(s, callBackServer)
|
||||
|
||||
return s
|
||||
}
|
||||
@@ -88,30 +88,30 @@ func (t *transformGRPCClient) DataQuery(ctx context.Context, req *pluginv2.DataQ
|
||||
|
||||
go t.broker.AcceptAndServe(brokerID, serverFunc)
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, "broker_requestId", strconv.FormatUint(uint64(brokerID), 10))
|
||||
res, err := t.client.DataQuery(ctx, req)
|
||||
res, err := t.client.TransformData(ctx, req)
|
||||
s.Stop()
|
||||
return res, err
|
||||
}
|
||||
|
||||
// Callback
|
||||
|
||||
type transformCallBackGrpcServer struct {
|
||||
Impl TransformCallBack
|
||||
type transformDataCallBackGrpcServer struct {
|
||||
Impl TransformDataCallBack
|
||||
}
|
||||
|
||||
func (g *transformCallBackGrpcServer) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error) {
|
||||
return g.Impl.DataQuery(ctx, req)
|
||||
func (g *transformDataCallBackGrpcServer) QueryData(ctx context.Context, req *pluginv2.QueryDataRequest) (*pluginv2.QueryDataResponse, error) {
|
||||
return g.Impl.QueryData(ctx, req)
|
||||
}
|
||||
|
||||
type transformCallBackGrpcClient struct {
|
||||
client pluginv2.TransformCallBackClient
|
||||
type transformDataCallBackGrpcClient struct {
|
||||
client pluginv2.TransformDataCallBackClient
|
||||
}
|
||||
|
||||
func (t *transformCallBackGrpcClient) DataQuery(ctx context.Context, req *pluginv2.DataQueryRequest) (*pluginv2.DataQueryResponse, error) {
|
||||
return t.client.DataQuery(ctx, req)
|
||||
func (t *transformDataCallBackGrpcClient) QueryData(ctx context.Context, req *pluginv2.QueryDataRequest) (*pluginv2.QueryDataResponse, error) {
|
||||
return t.client.QueryData(ctx, req)
|
||||
}
|
||||
|
||||
var _ pluginv2.TransformServer = &transformGRPCServer{}
|
||||
var _ transformClient = &transformGRPCClient{}
|
||||
var _ pluginv2.TransformServer = &transformCallBackGrpcServer{}
|
||||
var _ pluginv2.TransformServer = &transformCallBackGrpcClient{}
|
||||
var _ TransformClient = &transformGRPCClient{}
|
||||
var _ TransformDataCallBack = &transformDataCallBackGrpcServer{}
|
||||
var _ TransformDataCallBack = &transformDataCallBackGrpcClient{}
|
||||
|
||||
+11
-4
@@ -8,7 +8,8 @@ import (
|
||||
//ServeOpts options for serving plugins.
|
||||
type ServeOpts struct {
|
||||
DiagnosticsServer DiagnosticsServer
|
||||
CoreServer CoreServer
|
||||
ResourceServer ResourceServer
|
||||
DataServer DataServer
|
||||
TransformServer TransformServer
|
||||
|
||||
// GRPCServer factory method for creating GRPC server.
|
||||
@@ -27,9 +28,15 @@ func Serve(opts ServeOpts) error {
|
||||
}
|
||||
}
|
||||
|
||||
if opts.CoreServer != nil {
|
||||
pSet["backend"] = &CoreGRPCPlugin{
|
||||
CoreServer: opts.CoreServer,
|
||||
if opts.ResourceServer != nil {
|
||||
pSet["resource"] = &ResourceGRPCPlugin{
|
||||
ResourceServer: opts.ResourceServer,
|
||||
}
|
||||
}
|
||||
|
||||
if opts.DataServer != nil {
|
||||
pSet["data"] = &DataGRPCPlugin{
|
||||
DataServer: opts.DataServer,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+679
-1474
File diff suppressed because it is too large
Load Diff
-15
@@ -128,21 +128,6 @@ stdLogger.Printf("[DEBUG] %+v", stdLogger)
|
||||
... [DEBUG] my-app: &{mu:{state:0 sema:0} prefix: flag:0 out:0xc42000a0a0 buf:[]}
|
||||
```
|
||||
|
||||
Alternatively, you may configure the system-wide logger:
|
||||
|
||||
```go
|
||||
// log the standard logger from 'import "log"'
|
||||
log.SetOutput(appLogger.Writer(&hclog.StandardLoggerOptions{InferLevels: true}))
|
||||
log.SetPrefix("")
|
||||
log.SetFlags(0)
|
||||
|
||||
log.Printf("[DEBUG] %d", 42)
|
||||
```
|
||||
|
||||
```text
|
||||
... [DEBUG] my-app: 42
|
||||
```
|
||||
|
||||
Notice that if `appLogger` is initialized with the `INFO` log level _and_ you
|
||||
specify `InferLevels: true`, you will not see any output here. You must change
|
||||
`appLogger` to `DEBUG` to see output. See the docs for more information.
|
||||
|
||||
+5
-5
@@ -8,16 +8,16 @@ var (
|
||||
protect sync.Once
|
||||
def Logger
|
||||
|
||||
// DefaultOptions is used to create the Default logger. These are read
|
||||
// only when the Default logger is created, so set them as soon as the
|
||||
// process starts.
|
||||
// The options used to create the Default logger. These are
|
||||
// read only when the Default logger is created, so set them
|
||||
// as soon as the process starts.
|
||||
DefaultOptions = &LoggerOptions{
|
||||
Level: DefaultLevel,
|
||||
Output: DefaultOutput,
|
||||
}
|
||||
)
|
||||
|
||||
// Default returns a globally held logger. This can be a good starting
|
||||
// Return a logger that is held globally. This can be a good starting
|
||||
// place, and then you can use .With() and .Name() to create sub-loggers
|
||||
// to be used in more specific contexts.
|
||||
func Default() Logger {
|
||||
@@ -28,7 +28,7 @@ func Default() Logger {
|
||||
return def
|
||||
}
|
||||
|
||||
// L is a short alias for Default().
|
||||
// A short alias for Default()
|
||||
func L() Logger {
|
||||
return Default()
|
||||
}
|
||||
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
module github.com/hashicorp/go-hclog
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.2.2
|
||||
)
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
Generated
Vendored
+130
-184
@@ -1,13 +1,12 @@
|
||||
package hclog
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"bufio"
|
||||
"encoding"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"reflect"
|
||||
"os"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
@@ -17,41 +16,17 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// TimeFormat to use for logging. This is a version of RFC3339 that contains
|
||||
// contains millisecond precision
|
||||
const TimeFormat = "2006-01-02T15:04:05.000Z0700"
|
||||
|
||||
var (
|
||||
_levelToBracket = map[Level]string{
|
||||
Debug: "[DEBUG]",
|
||||
Trace: "[TRACE]",
|
||||
Info: "[INFO] ",
|
||||
Warn: "[WARN] ",
|
||||
Info: "[INFO ]",
|
||||
Warn: "[WARN ]",
|
||||
Error: "[ERROR]",
|
||||
}
|
||||
)
|
||||
|
||||
// Make sure that intLogger is a Logger
|
||||
var _ Logger = &intLogger{}
|
||||
|
||||
// intLogger is an internal logger implementation. Internal in that it is
|
||||
// defined entirely by this package.
|
||||
type intLogger struct {
|
||||
json bool
|
||||
caller bool
|
||||
name string
|
||||
timeFormat string
|
||||
|
||||
// This is a pointer so that it's shared by any derived loggers, since
|
||||
// those derived loggers share the bufio.Writer as well.
|
||||
mutex *sync.Mutex
|
||||
writer *writer
|
||||
level *int32
|
||||
|
||||
implied []interface{}
|
||||
}
|
||||
|
||||
// New returns a configured logger.
|
||||
// Given the options (nil for defaults), create a new Logger
|
||||
func New(opts *LoggerOptions) Logger {
|
||||
if opts == nil {
|
||||
opts = &LoggerOptions{}
|
||||
@@ -59,7 +34,7 @@ func New(opts *LoggerOptions) Logger {
|
||||
|
||||
output := opts.Output
|
||||
if output == nil {
|
||||
output = DefaultOutput
|
||||
output = os.Stderr
|
||||
}
|
||||
|
||||
level := opts.Level
|
||||
@@ -67,49 +42,70 @@ func New(opts *LoggerOptions) Logger {
|
||||
level = DefaultLevel
|
||||
}
|
||||
|
||||
mutex := opts.Mutex
|
||||
if mutex == nil {
|
||||
mutex = new(sync.Mutex)
|
||||
mtx := opts.Mutex
|
||||
if mtx == nil {
|
||||
mtx = new(sync.Mutex)
|
||||
}
|
||||
|
||||
l := &intLogger{
|
||||
ret := &intLogger{
|
||||
m: mtx,
|
||||
json: opts.JSONFormat,
|
||||
caller: opts.IncludeLocation,
|
||||
name: opts.Name,
|
||||
timeFormat: TimeFormat,
|
||||
mutex: mutex,
|
||||
writer: newWriter(output),
|
||||
w: bufio.NewWriter(output),
|
||||
level: new(int32),
|
||||
}
|
||||
|
||||
if opts.TimeFormat != "" {
|
||||
l.timeFormat = opts.TimeFormat
|
||||
ret.timeFormat = opts.TimeFormat
|
||||
}
|
||||
|
||||
atomic.StoreInt32(l.level, int32(level))
|
||||
|
||||
return l
|
||||
atomic.StoreInt32(ret.level, int32(level))
|
||||
return ret
|
||||
}
|
||||
|
||||
// The internal logger implementation. Internal in that it is defined entirely
|
||||
// by this package.
|
||||
type intLogger struct {
|
||||
json bool
|
||||
caller bool
|
||||
name string
|
||||
timeFormat string
|
||||
|
||||
// this is a pointer so that it's shared by any derived loggers, since
|
||||
// those derived loggers share the bufio.Writer as well.
|
||||
m *sync.Mutex
|
||||
w *bufio.Writer
|
||||
level *int32
|
||||
|
||||
implied []interface{}
|
||||
}
|
||||
|
||||
// Make sure that intLogger is a Logger
|
||||
var _ Logger = &intLogger{}
|
||||
|
||||
// The time format to use for logging. This is a version of RFC3339 that
|
||||
// contains millisecond precision
|
||||
const TimeFormat = "2006-01-02T15:04:05.000Z0700"
|
||||
|
||||
// Log a message and a set of key/value pairs if the given level is at
|
||||
// or more severe that the threshold configured in the Logger.
|
||||
func (l *intLogger) Log(level Level, msg string, args ...interface{}) {
|
||||
if level < Level(atomic.LoadInt32(l.level)) {
|
||||
func (z *intLogger) Log(level Level, msg string, args ...interface{}) {
|
||||
if level < Level(atomic.LoadInt32(z.level)) {
|
||||
return
|
||||
}
|
||||
|
||||
t := time.Now()
|
||||
|
||||
l.mutex.Lock()
|
||||
defer l.mutex.Unlock()
|
||||
z.m.Lock()
|
||||
defer z.m.Unlock()
|
||||
|
||||
if l.json {
|
||||
l.logJSON(t, level, msg, args...)
|
||||
if z.json {
|
||||
z.logJson(t, level, msg, args...)
|
||||
} else {
|
||||
l.log(t, level, msg, args...)
|
||||
z.log(t, level, msg, args...)
|
||||
}
|
||||
|
||||
l.writer.Flush(level)
|
||||
z.w.Flush()
|
||||
}
|
||||
|
||||
// Cleanup a path by returning the last 2 segments of the path only.
|
||||
@@ -125,8 +121,10 @@ func trimCallerPath(path string) string {
|
||||
// and https://github.com/golang/go/issues/18151
|
||||
//
|
||||
// for discussion on the issue on Go side.
|
||||
//
|
||||
|
||||
// Find the last separator.
|
||||
//
|
||||
idx := strings.LastIndexByte(path, '/')
|
||||
if idx == -1 {
|
||||
return path
|
||||
@@ -142,37 +140,37 @@ func trimCallerPath(path string) string {
|
||||
}
|
||||
|
||||
// Non-JSON logging format function
|
||||
func (l *intLogger) log(t time.Time, level Level, msg string, args ...interface{}) {
|
||||
l.writer.WriteString(t.Format(l.timeFormat))
|
||||
l.writer.WriteByte(' ')
|
||||
func (z *intLogger) log(t time.Time, level Level, msg string, args ...interface{}) {
|
||||
z.w.WriteString(t.Format(z.timeFormat))
|
||||
z.w.WriteByte(' ')
|
||||
|
||||
s, ok := _levelToBracket[level]
|
||||
if ok {
|
||||
l.writer.WriteString(s)
|
||||
z.w.WriteString(s)
|
||||
} else {
|
||||
l.writer.WriteString("[?????]")
|
||||
z.w.WriteString("[UNKN ]")
|
||||
}
|
||||
|
||||
if l.caller {
|
||||
if z.caller {
|
||||
if _, file, line, ok := runtime.Caller(3); ok {
|
||||
l.writer.WriteByte(' ')
|
||||
l.writer.WriteString(trimCallerPath(file))
|
||||
l.writer.WriteByte(':')
|
||||
l.writer.WriteString(strconv.Itoa(line))
|
||||
l.writer.WriteByte(':')
|
||||
z.w.WriteByte(' ')
|
||||
z.w.WriteString(trimCallerPath(file))
|
||||
z.w.WriteByte(':')
|
||||
z.w.WriteString(strconv.Itoa(line))
|
||||
z.w.WriteByte(':')
|
||||
}
|
||||
}
|
||||
|
||||
l.writer.WriteByte(' ')
|
||||
z.w.WriteByte(' ')
|
||||
|
||||
if l.name != "" {
|
||||
l.writer.WriteString(l.name)
|
||||
l.writer.WriteString(": ")
|
||||
if z.name != "" {
|
||||
z.w.WriteString(z.name)
|
||||
z.w.WriteString(": ")
|
||||
}
|
||||
|
||||
l.writer.WriteString(msg)
|
||||
z.w.WriteString(msg)
|
||||
|
||||
args = append(l.implied, args...)
|
||||
args = append(z.implied, args...)
|
||||
|
||||
var stacktrace CapturedStacktrace
|
||||
|
||||
@@ -187,14 +185,11 @@ func (l *intLogger) log(t time.Time, level Level, msg string, args ...interface{
|
||||
}
|
||||
}
|
||||
|
||||
l.writer.WriteByte(':')
|
||||
z.w.WriteByte(':')
|
||||
|
||||
FOR:
|
||||
for i := 0; i < len(args); i = i + 2 {
|
||||
var (
|
||||
val string
|
||||
raw bool
|
||||
)
|
||||
var val string
|
||||
|
||||
switch st := args[i+1].(type) {
|
||||
case string:
|
||||
@@ -225,77 +220,32 @@ func (l *intLogger) log(t time.Time, level Level, msg string, args ...interface{
|
||||
case Format:
|
||||
val = fmt.Sprintf(st[0].(string), st[1:]...)
|
||||
default:
|
||||
v := reflect.ValueOf(st)
|
||||
if v.Kind() == reflect.Slice {
|
||||
val = l.renderSlice(v)
|
||||
raw = true
|
||||
} else {
|
||||
val = fmt.Sprintf("%v", st)
|
||||
}
|
||||
val = fmt.Sprintf("%v", st)
|
||||
}
|
||||
|
||||
l.writer.WriteByte(' ')
|
||||
l.writer.WriteString(args[i].(string))
|
||||
l.writer.WriteByte('=')
|
||||
z.w.WriteByte(' ')
|
||||
z.w.WriteString(args[i].(string))
|
||||
z.w.WriteByte('=')
|
||||
|
||||
if !raw && strings.ContainsAny(val, " \t\n\r") {
|
||||
l.writer.WriteByte('"')
|
||||
l.writer.WriteString(val)
|
||||
l.writer.WriteByte('"')
|
||||
if strings.ContainsAny(val, " \t\n\r") {
|
||||
z.w.WriteByte('"')
|
||||
z.w.WriteString(val)
|
||||
z.w.WriteByte('"')
|
||||
} else {
|
||||
l.writer.WriteString(val)
|
||||
z.w.WriteString(val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
l.writer.WriteString("\n")
|
||||
z.w.WriteString("\n")
|
||||
|
||||
if stacktrace != "" {
|
||||
l.writer.WriteString(string(stacktrace))
|
||||
z.w.WriteString(string(stacktrace))
|
||||
}
|
||||
}
|
||||
|
||||
func (l *intLogger) renderSlice(v reflect.Value) string {
|
||||
var buf bytes.Buffer
|
||||
|
||||
buf.WriteRune('[')
|
||||
|
||||
for i := 0; i < v.Len(); i++ {
|
||||
if i > 0 {
|
||||
buf.WriteString(", ")
|
||||
}
|
||||
|
||||
sv := v.Index(i)
|
||||
|
||||
var val string
|
||||
|
||||
switch sv.Kind() {
|
||||
case reflect.String:
|
||||
val = sv.String()
|
||||
case reflect.Int, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||
val = strconv.FormatInt(sv.Int(), 10)
|
||||
case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64:
|
||||
val = strconv.FormatUint(sv.Uint(), 10)
|
||||
default:
|
||||
val = fmt.Sprintf("%v", sv.Interface())
|
||||
}
|
||||
|
||||
if strings.ContainsAny(val, " \t\n\r") {
|
||||
buf.WriteByte('"')
|
||||
buf.WriteString(val)
|
||||
buf.WriteByte('"')
|
||||
} else {
|
||||
buf.WriteString(val)
|
||||
}
|
||||
}
|
||||
|
||||
buf.WriteRune(']')
|
||||
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// JSON logging function
|
||||
func (l *intLogger) logJSON(t time.Time, level Level, msg string, args ...interface{}) {
|
||||
func (z *intLogger) logJson(t time.Time, level Level, msg string, args ...interface{}) {
|
||||
vals := map[string]interface{}{
|
||||
"@message": msg,
|
||||
"@timestamp": t.Format("2006-01-02T15:04:05.000000Z07:00"),
|
||||
@@ -319,17 +269,17 @@ func (l *intLogger) logJSON(t time.Time, level Level, msg string, args ...interf
|
||||
|
||||
vals["@level"] = levelStr
|
||||
|
||||
if l.name != "" {
|
||||
vals["@module"] = l.name
|
||||
if z.name != "" {
|
||||
vals["@module"] = z.name
|
||||
}
|
||||
|
||||
if l.caller {
|
||||
if z.caller {
|
||||
if _, file, line, ok := runtime.Caller(3); ok {
|
||||
vals["@caller"] = fmt.Sprintf("%s:%d", file, line)
|
||||
}
|
||||
}
|
||||
|
||||
args = append(l.implied, args...)
|
||||
args = append(z.implied, args...)
|
||||
|
||||
if args != nil && len(args) > 0 {
|
||||
if len(args)%2 != 0 {
|
||||
@@ -367,80 +317,80 @@ func (l *intLogger) logJSON(t time.Time, level Level, msg string, args ...interf
|
||||
}
|
||||
}
|
||||
|
||||
err := json.NewEncoder(l.writer).Encode(vals)
|
||||
err := json.NewEncoder(z.w).Encode(vals)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Emit the message and args at DEBUG level
|
||||
func (l *intLogger) Debug(msg string, args ...interface{}) {
|
||||
l.Log(Debug, msg, args...)
|
||||
func (z *intLogger) Debug(msg string, args ...interface{}) {
|
||||
z.Log(Debug, msg, args...)
|
||||
}
|
||||
|
||||
// Emit the message and args at TRACE level
|
||||
func (l *intLogger) Trace(msg string, args ...interface{}) {
|
||||
l.Log(Trace, msg, args...)
|
||||
func (z *intLogger) Trace(msg string, args ...interface{}) {
|
||||
z.Log(Trace, msg, args...)
|
||||
}
|
||||
|
||||
// Emit the message and args at INFO level
|
||||
func (l *intLogger) Info(msg string, args ...interface{}) {
|
||||
l.Log(Info, msg, args...)
|
||||
func (z *intLogger) Info(msg string, args ...interface{}) {
|
||||
z.Log(Info, msg, args...)
|
||||
}
|
||||
|
||||
// Emit the message and args at WARN level
|
||||
func (l *intLogger) Warn(msg string, args ...interface{}) {
|
||||
l.Log(Warn, msg, args...)
|
||||
func (z *intLogger) Warn(msg string, args ...interface{}) {
|
||||
z.Log(Warn, msg, args...)
|
||||
}
|
||||
|
||||
// Emit the message and args at ERROR level
|
||||
func (l *intLogger) Error(msg string, args ...interface{}) {
|
||||
l.Log(Error, msg, args...)
|
||||
func (z *intLogger) Error(msg string, args ...interface{}) {
|
||||
z.Log(Error, msg, args...)
|
||||
}
|
||||
|
||||
// Indicate that the logger would emit TRACE level logs
|
||||
func (l *intLogger) IsTrace() bool {
|
||||
return Level(atomic.LoadInt32(l.level)) == Trace
|
||||
func (z *intLogger) IsTrace() bool {
|
||||
return Level(atomic.LoadInt32(z.level)) == Trace
|
||||
}
|
||||
|
||||
// Indicate that the logger would emit DEBUG level logs
|
||||
func (l *intLogger) IsDebug() bool {
|
||||
return Level(atomic.LoadInt32(l.level)) <= Debug
|
||||
func (z *intLogger) IsDebug() bool {
|
||||
return Level(atomic.LoadInt32(z.level)) <= Debug
|
||||
}
|
||||
|
||||
// Indicate that the logger would emit INFO level logs
|
||||
func (l *intLogger) IsInfo() bool {
|
||||
return Level(atomic.LoadInt32(l.level)) <= Info
|
||||
func (z *intLogger) IsInfo() bool {
|
||||
return Level(atomic.LoadInt32(z.level)) <= Info
|
||||
}
|
||||
|
||||
// Indicate that the logger would emit WARN level logs
|
||||
func (l *intLogger) IsWarn() bool {
|
||||
return Level(atomic.LoadInt32(l.level)) <= Warn
|
||||
func (z *intLogger) IsWarn() bool {
|
||||
return Level(atomic.LoadInt32(z.level)) <= Warn
|
||||
}
|
||||
|
||||
// Indicate that the logger would emit ERROR level logs
|
||||
func (l *intLogger) IsError() bool {
|
||||
return Level(atomic.LoadInt32(l.level)) <= Error
|
||||
func (z *intLogger) IsError() bool {
|
||||
return Level(atomic.LoadInt32(z.level)) <= Error
|
||||
}
|
||||
|
||||
// Return a sub-Logger for which every emitted log message will contain
|
||||
// the given key/value pairs. This is used to create a context specific
|
||||
// Logger.
|
||||
func (l *intLogger) With(args ...interface{}) Logger {
|
||||
func (z *intLogger) With(args ...interface{}) Logger {
|
||||
if len(args)%2 != 0 {
|
||||
panic("With() call requires paired arguments")
|
||||
}
|
||||
|
||||
sl := *l
|
||||
var nz intLogger = *z
|
||||
|
||||
result := make(map[string]interface{}, len(l.implied)+len(args))
|
||||
keys := make([]string, 0, len(l.implied)+len(args))
|
||||
result := make(map[string]interface{}, len(z.implied)+len(args))
|
||||
keys := make([]string, 0, len(z.implied)+len(args))
|
||||
|
||||
// Read existing args, store map and key for consistent sorting
|
||||
for i := 0; i < len(l.implied); i += 2 {
|
||||
key := l.implied[i].(string)
|
||||
for i := 0; i < len(z.implied); i += 2 {
|
||||
key := z.implied[i].(string)
|
||||
keys = append(keys, key)
|
||||
result[key] = l.implied[i+1]
|
||||
result[key] = z.implied[i+1]
|
||||
}
|
||||
// Read new args, store map and key for consistent sorting
|
||||
for i := 0; i < len(args); i += 2 {
|
||||
@@ -455,57 +405,53 @@ func (l *intLogger) With(args ...interface{}) Logger {
|
||||
// Sort keys to be consistent
|
||||
sort.Strings(keys)
|
||||
|
||||
sl.implied = make([]interface{}, 0, len(l.implied)+len(args))
|
||||
nz.implied = make([]interface{}, 0, len(z.implied)+len(args))
|
||||
for _, k := range keys {
|
||||
sl.implied = append(sl.implied, k)
|
||||
sl.implied = append(sl.implied, result[k])
|
||||
nz.implied = append(nz.implied, k)
|
||||
nz.implied = append(nz.implied, result[k])
|
||||
}
|
||||
|
||||
return &sl
|
||||
return &nz
|
||||
}
|
||||
|
||||
// Create a new sub-Logger that a name decending from the current name.
|
||||
// This is used to create a subsystem specific Logger.
|
||||
func (l *intLogger) Named(name string) Logger {
|
||||
sl := *l
|
||||
func (z *intLogger) Named(name string) Logger {
|
||||
var nz intLogger = *z
|
||||
|
||||
if sl.name != "" {
|
||||
sl.name = sl.name + "." + name
|
||||
if nz.name != "" {
|
||||
nz.name = nz.name + "." + name
|
||||
} else {
|
||||
sl.name = name
|
||||
nz.name = name
|
||||
}
|
||||
|
||||
return &sl
|
||||
return &nz
|
||||
}
|
||||
|
||||
// Create a new sub-Logger with an explicit name. This ignores the current
|
||||
// name. This is used to create a standalone logger that doesn't fall
|
||||
// within the normal hierarchy.
|
||||
func (l *intLogger) ResetNamed(name string) Logger {
|
||||
sl := *l
|
||||
func (z *intLogger) ResetNamed(name string) Logger {
|
||||
var nz intLogger = *z
|
||||
|
||||
sl.name = name
|
||||
nz.name = name
|
||||
|
||||
return &sl
|
||||
return &nz
|
||||
}
|
||||
|
||||
// Update the logging level on-the-fly. This will affect all subloggers as
|
||||
// well.
|
||||
func (l *intLogger) SetLevel(level Level) {
|
||||
atomic.StoreInt32(l.level, int32(level))
|
||||
func (z *intLogger) SetLevel(level Level) {
|
||||
atomic.StoreInt32(z.level, int32(level))
|
||||
}
|
||||
|
||||
// Create a *log.Logger that will send it's data through this Logger. This
|
||||
// allows packages that expect to be using the standard library log to actually
|
||||
// use this logger.
|
||||
func (l *intLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger {
|
||||
func (z *intLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger {
|
||||
if opts == nil {
|
||||
opts = &StandardLoggerOptions{}
|
||||
}
|
||||
|
||||
return log.New(l.StandardWriter(opts), "", 0)
|
||||
}
|
||||
|
||||
func (l *intLogger) StandardWriter(opts *StandardLoggerOptions) io.Writer {
|
||||
return &stdlogAdapter{l, opts.InferLevels}
|
||||
return log.New(&stdlogAdapter{z, opts.InferLevels}, "", 0)
|
||||
}
|
||||
Generated
Vendored
+16
-25
@@ -9,42 +9,38 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
//DefaultOutput is used as the default log output.
|
||||
DefaultOutput io.Writer = os.Stderr
|
||||
|
||||
// DefaultLevel is used as the default log level.
|
||||
DefaultLevel = Info
|
||||
DefaultOutput = os.Stderr
|
||||
DefaultLevel = Info
|
||||
)
|
||||
|
||||
// Level represents a log level.
|
||||
type Level int32
|
||||
|
||||
const (
|
||||
// NoLevel is a special level used to indicate that no level has been
|
||||
// This is a special level used to indicate that no level has been
|
||||
// set and allow for a default to be used.
|
||||
NoLevel Level = 0
|
||||
|
||||
// Trace is the most verbose level. Intended to be used for the tracing
|
||||
// of actions in code, such as function enters/exits, etc.
|
||||
// The most verbose level. Intended to be used for the tracing of actions
|
||||
// in code, such as function enters/exits, etc.
|
||||
Trace Level = 1
|
||||
|
||||
// Debug information for programmer lowlevel analysis.
|
||||
// For programmer lowlevel analysis.
|
||||
Debug Level = 2
|
||||
|
||||
// Info information about steady state operations.
|
||||
// For information about steady state operations.
|
||||
Info Level = 3
|
||||
|
||||
// Warn information about rare but handled events.
|
||||
// For information about rare but handled events.
|
||||
Warn Level = 4
|
||||
|
||||
// Error information about unrecoverable events.
|
||||
// For information about unrecoverable events.
|
||||
Error Level = 5
|
||||
)
|
||||
|
||||
// Format is a simple convience type for when formatting is required. When
|
||||
// processing a value of this type, the logger automatically treats the first
|
||||
// argument as a Printf formatting string and passes the rest as the values
|
||||
// to be formatted. For example: L.Info(Fmt{"%d beans/day", beans}).
|
||||
// When processing a value of this type, the logger automatically treats the first
|
||||
// argument as a Printf formatting string and passes the rest as the values to be
|
||||
// formatted. For example: L.Info(Fmt{"%d beans/day", beans}). This is a simple
|
||||
// convience type for when formatting is required.
|
||||
type Format []interface{}
|
||||
|
||||
// Fmt returns a Format type. This is a convience function for creating a Format
|
||||
@@ -57,7 +53,7 @@ func Fmt(str string, args ...interface{}) Format {
|
||||
// the level string is invalid. This facilitates setting the log level via
|
||||
// config or environment variable by name in a predictable way.
|
||||
func LevelFromString(levelStr string) Level {
|
||||
// We don't care about case. Accept both "INFO" and "info".
|
||||
// We don't care about case. Accept "INFO" or "info"
|
||||
levelStr = strings.ToLower(strings.TrimSpace(levelStr))
|
||||
switch levelStr {
|
||||
case "trace":
|
||||
@@ -75,7 +71,7 @@ func LevelFromString(levelStr string) Level {
|
||||
}
|
||||
}
|
||||
|
||||
// Logger describes the interface that must be implemeted by all loggers.
|
||||
// The main Logger interface. All code should code against this interface only.
|
||||
type Logger interface {
|
||||
// Args are alternating key, val pairs
|
||||
// keys must be strings
|
||||
@@ -131,12 +127,8 @@ type Logger interface {
|
||||
|
||||
// Return a value that conforms to the stdlib log.Logger interface
|
||||
StandardLogger(opts *StandardLoggerOptions) *log.Logger
|
||||
|
||||
// Return a value that conforms to io.Writer, which can be passed into log.SetOutput()
|
||||
StandardWriter(opts *StandardLoggerOptions) io.Writer
|
||||
}
|
||||
|
||||
// StandardLoggerOptions can be used to configure a new standard logger.
|
||||
type StandardLoggerOptions struct {
|
||||
// Indicate that some minimal parsing should be done on strings to try
|
||||
// and detect their level and re-emit them.
|
||||
@@ -145,7 +137,6 @@ type StandardLoggerOptions struct {
|
||||
InferLevels bool
|
||||
}
|
||||
|
||||
// LoggerOptions can be used to configure a new logger.
|
||||
type LoggerOptions struct {
|
||||
// Name of the subsystem to prefix logs with
|
||||
Name string
|
||||
@@ -153,7 +144,7 @@ type LoggerOptions struct {
|
||||
// The threshold for the logger. Anything less severe is supressed
|
||||
Level Level
|
||||
|
||||
// Where to write the logs to. Defaults to os.Stderr if nil
|
||||
// Where to write the logs to. Defaults to os.Stdout if nil
|
||||
Output io.Writer
|
||||
|
||||
// An optional mutex pointer in case Output is shared
|
||||
+1
-6
@@ -1,7 +1,6 @@
|
||||
package hclog
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
)
|
||||
@@ -44,9 +43,5 @@ func (l *nullLogger) ResetNamed(name string) Logger { return l }
|
||||
func (l *nullLogger) SetLevel(level Level) {}
|
||||
|
||||
func (l *nullLogger) StandardLogger(opts *StandardLoggerOptions) *log.Logger {
|
||||
return log.New(l.StandardWriter(opts), "", log.LstdFlags)
|
||||
}
|
||||
|
||||
func (l *nullLogger) StandardWriter(opts *StandardLoggerOptions) io.Writer {
|
||||
return ioutil.Discard
|
||||
return log.New(ioutil.Discard, "", log.LstdFlags)
|
||||
}
|
||||
|
||||
+4
-5
@@ -40,13 +40,12 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// CapturedStacktrace represents a stacktrace captured by a previous call
|
||||
// to log.Stacktrace. If passed to a logging function, the stacktrace
|
||||
// will be appended.
|
||||
// A stacktrace gathered by a previous call to log.Stacktrace. If passed
|
||||
// to a logging function, the stacktrace will be appended.
|
||||
type CapturedStacktrace string
|
||||
|
||||
// Stacktrace captures a stacktrace of the current goroutine and returns
|
||||
// it to be passed to a logging function.
|
||||
// Gather a stacktrace of the current goroutine and return it to be passed
|
||||
// to a logging function.
|
||||
func Stacktrace() CapturedStacktrace {
|
||||
return CapturedStacktrace(takeStacktrace())
|
||||
}
|
||||
|
||||
+10
-10
@@ -9,12 +9,12 @@ import (
|
||||
// and back into our Logger. This is basically the only way to
|
||||
// build upon *log.Logger.
|
||||
type stdlogAdapter struct {
|
||||
log Logger
|
||||
hl Logger
|
||||
inferLevels bool
|
||||
}
|
||||
|
||||
// Take the data, infer the levels if configured, and send it through
|
||||
// a regular Logger.
|
||||
// a regular Logger
|
||||
func (s *stdlogAdapter) Write(data []byte) (int, error) {
|
||||
str := string(bytes.TrimRight(data, " \t\n"))
|
||||
|
||||
@@ -22,26 +22,26 @@ func (s *stdlogAdapter) Write(data []byte) (int, error) {
|
||||
level, str := s.pickLevel(str)
|
||||
switch level {
|
||||
case Trace:
|
||||
s.log.Trace(str)
|
||||
s.hl.Trace(str)
|
||||
case Debug:
|
||||
s.log.Debug(str)
|
||||
s.hl.Debug(str)
|
||||
case Info:
|
||||
s.log.Info(str)
|
||||
s.hl.Info(str)
|
||||
case Warn:
|
||||
s.log.Warn(str)
|
||||
s.hl.Warn(str)
|
||||
case Error:
|
||||
s.log.Error(str)
|
||||
s.hl.Error(str)
|
||||
default:
|
||||
s.log.Info(str)
|
||||
s.hl.Info(str)
|
||||
}
|
||||
} else {
|
||||
s.log.Info(str)
|
||||
s.hl.Info(str)
|
||||
}
|
||||
|
||||
return len(data), nil
|
||||
}
|
||||
|
||||
// Detect, based on conventions, what log level this is.
|
||||
// Detect, based on conventions, what log level this is
|
||||
func (s *stdlogAdapter) pickLevel(str string) (Level, string) {
|
||||
switch {
|
||||
case strings.HasPrefix(str, "[DEBUG]"):
|
||||
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
package hclog
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
)
|
||||
|
||||
type writer struct {
|
||||
b bytes.Buffer
|
||||
w io.Writer
|
||||
}
|
||||
|
||||
func newWriter(w io.Writer) *writer {
|
||||
return &writer{w: w}
|
||||
}
|
||||
|
||||
func (w *writer) Flush(level Level) (err error) {
|
||||
if lw, ok := w.w.(LevelWriter); ok {
|
||||
_, err = lw.LevelWrite(level, w.b.Bytes())
|
||||
} else {
|
||||
_, err = w.w.Write(w.b.Bytes())
|
||||
}
|
||||
w.b.Reset()
|
||||
return err
|
||||
}
|
||||
|
||||
func (w *writer) Write(p []byte) (int, error) {
|
||||
return w.b.Write(p)
|
||||
}
|
||||
|
||||
func (w *writer) WriteByte(c byte) error {
|
||||
return w.b.WriteByte(c)
|
||||
}
|
||||
|
||||
func (w *writer) WriteString(s string) (int, error) {
|
||||
return w.b.WriteString(s)
|
||||
}
|
||||
|
||||
// LevelWriter is the interface that wraps the LevelWrite method.
|
||||
type LevelWriter interface {
|
||||
LevelWrite(level Level, p []byte) (n int, err error)
|
||||
}
|
||||
|
||||
// LeveledWriter writes all log messages to the standard writer,
|
||||
// except for log levels that are defined in the overrides map.
|
||||
type LeveledWriter struct {
|
||||
standard io.Writer
|
||||
overrides map[Level]io.Writer
|
||||
}
|
||||
|
||||
// NewLeveledWriter returns an initialized LeveledWriter.
|
||||
//
|
||||
// standard will be used as the default writer for all log levels,
|
||||
// except for log levels that are defined in the overrides map.
|
||||
func NewLeveledWriter(standard io.Writer, overrides map[Level]io.Writer) *LeveledWriter {
|
||||
return &LeveledWriter{
|
||||
standard: standard,
|
||||
overrides: overrides,
|
||||
}
|
||||
}
|
||||
|
||||
// Write implements io.Writer.
|
||||
func (lw *LeveledWriter) Write(p []byte) (int, error) {
|
||||
return lw.standard.Write(p)
|
||||
}
|
||||
|
||||
// LevelWrite implements LevelWriter.
|
||||
func (lw *LeveledWriter) LevelWrite(level Level, p []byte) (int, error) {
|
||||
w, ok := lw.overrides[level]
|
||||
if !ok {
|
||||
w = lw.standard
|
||||
}
|
||||
return w.Write(p)
|
||||
}
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
# go-colorable
|
||||
|
||||
[](http://godoc.org/github.com/mattn/go-colorable)
|
||||
[](https://travis-ci.org/mattn/go-colorable)
|
||||
[](https://coveralls.io/github/mattn/go-colorable?branch=master)
|
||||
[](https://codecov.io/gh/mattn/go-colorable)
|
||||
[](http://godoc.org/github.com/mattn/go-colorable)
|
||||
[](https://goreportcard.com/report/mattn/go-colorable)
|
||||
|
||||
Colorable writer for windows.
|
||||
|
||||
+8
@@ -27,3 +27,11 @@ func NewColorableStdout() io.Writer {
|
||||
func NewColorableStderr() io.Writer {
|
||||
return os.Stderr
|
||||
}
|
||||
|
||||
// EnableColorsStdout enable colors if possible.
|
||||
func EnableColorsStdout(enabled *bool) func() {
|
||||
if enabled != nil {
|
||||
*enabled = true
|
||||
}
|
||||
return func() {}
|
||||
}
|
||||
|
||||
+8
@@ -28,3 +28,11 @@ func NewColorableStdout() io.Writer {
|
||||
func NewColorableStderr() io.Writer {
|
||||
return os.Stderr
|
||||
}
|
||||
|
||||
// EnableColorsStdout enable colors if possible.
|
||||
func EnableColorsStdout(enabled *bool) func() {
|
||||
if enabled != nil {
|
||||
*enabled = true
|
||||
}
|
||||
return func() {}
|
||||
}
|
||||
|
||||
+28
@@ -27,6 +27,8 @@ const (
|
||||
backgroundRed = 0x40
|
||||
backgroundIntensity = 0x80
|
||||
backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity)
|
||||
|
||||
cENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -78,6 +80,8 @@ var (
|
||||
procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo")
|
||||
procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo")
|
||||
procSetConsoleTitle = kernel32.NewProc("SetConsoleTitleW")
|
||||
procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
|
||||
procSetConsoleMode = kernel32.NewProc("SetConsoleMode")
|
||||
procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer")
|
||||
)
|
||||
|
||||
@@ -98,6 +102,10 @@ func NewColorable(file *os.File) io.Writer {
|
||||
}
|
||||
|
||||
if isatty.IsTerminal(file.Fd()) {
|
||||
var mode uint32
|
||||
if r, _, _ := procGetConsoleMode.Call(file.Fd(), uintptr(unsafe.Pointer(&mode))); r != 0 && mode&cENABLE_VIRTUAL_TERMINAL_PROCESSING != 0 {
|
||||
return file
|
||||
}
|
||||
var csbi consoleScreenBufferInfo
|
||||
handle := syscall.Handle(file.Fd())
|
||||
procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
|
||||
@@ -1003,3 +1011,23 @@ func n256setup() {
|
||||
n256backAttr[i] = c.backgroundAttr()
|
||||
}
|
||||
}
|
||||
|
||||
// EnableColorsStdout enable colors if possible.
|
||||
func EnableColorsStdout(enabled *bool) func() {
|
||||
var mode uint32
|
||||
h := os.Stdout.Fd()
|
||||
if r, _, _ := procGetConsoleMode.Call(h, uintptr(unsafe.Pointer(&mode))); r != 0 {
|
||||
if r, _, _ = procSetConsoleMode.Call(h, uintptr(mode|cENABLE_VIRTUAL_TERMINAL_PROCESSING)); r != 0 {
|
||||
if enabled != nil {
|
||||
*enabled = true
|
||||
}
|
||||
return func() {
|
||||
procSetConsoleMode.Call(h, uintptr(mode))
|
||||
}
|
||||
}
|
||||
}
|
||||
if enabled != nil {
|
||||
*enabled = true
|
||||
}
|
||||
return func() {}
|
||||
}
|
||||
|
||||
+6
-1
@@ -1,3 +1,8 @@
|
||||
module github.com/mattn/go-colorable
|
||||
|
||||
require github.com/mattn/go-isatty v0.0.8
|
||||
require (
|
||||
github.com/mattn/go-isatty v0.0.12
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae // indirect
|
||||
)
|
||||
|
||||
go 1.13
|
||||
|
||||
+5
-4
@@ -1,4 +1,5 @@
|
||||
github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
||||
if [ -f profile.out ]; then
|
||||
cat profile.out >> coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# go-isatty
|
||||
|
||||
[](http://godoc.org/github.com/mattn/go-isatty)
|
||||
[](https://travis-ci.org/mattn/go-isatty)
|
||||
[](https://codecov.io/gh/mattn/go-isatty)
|
||||
[](https://coveralls.io/github/mattn/go-isatty?branch=master)
|
||||
[](https://goreportcard.com/report/mattn/go-isatty)
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
module github.com/mattn/go-isatty
|
||||
|
||||
require golang.org/x/sys v0.0.0-20191008105621-543471e840be
|
||||
go 1.12
|
||||
|
||||
go 1.14
|
||||
require golang.org/x/sys v0.0.0-20200116001909-b77594299b42
|
||||
|
||||
+2
-4
@@ -1,4 +1,2 @@
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
||||
if [ -f profile.out ]; then
|
||||
cat profile.out >> coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
// +build android
|
||||
|
||||
package isatty
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const ioctlReadTermios = syscall.TCGETS
|
||||
|
||||
// IsTerminal return true if the file descriptor is terminal.
|
||||
func IsTerminal(fd uintptr) bool {
|
||||
var termios syscall.Termios
|
||||
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
|
||||
return err == 0
|
||||
}
|
||||
|
||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
|
||||
// terminal. This is also always false on this environment.
|
||||
func IsCygwinTerminal(fd uintptr) bool {
|
||||
return false
|
||||
}
|
||||
+3
-9
@@ -3,18 +3,12 @@
|
||||
|
||||
package isatty
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const ioctlReadTermios = syscall.TIOCGETA
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
// IsTerminal return true if the file descriptor is terminal.
|
||||
func IsTerminal(fd uintptr) bool {
|
||||
var termios syscall.Termios
|
||||
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
|
||||
return err == 0
|
||||
_, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
func IsTerminal(fd uintptr) bool {
|
||||
path, err := syscall.Fd2path(fd)
|
||||
path, err := syscall.Fd2path(int(fd))
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
// +build linux aix
|
||||
// +build !appengine
|
||||
// +build !android
|
||||
|
||||
package isatty
|
||||
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"postUpdateOptions": [
|
||||
"gomodTidy"
|
||||
]
|
||||
}
|
||||
-7
@@ -23,10 +23,6 @@ TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOV a1+8(FP), A0
|
||||
MOV a2+16(FP), A1
|
||||
MOV a3+24(FP), A2
|
||||
MOV $0, A3
|
||||
MOV $0, A4
|
||||
MOV $0, A5
|
||||
MOV $0, A6
|
||||
MOV trap+0(FP), A7 // syscall entry
|
||||
ECALL
|
||||
MOV A0, r1+32(FP) // r1
|
||||
@@ -44,9 +40,6 @@ TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOV a1+8(FP), A0
|
||||
MOV a2+16(FP), A1
|
||||
MOV a3+24(FP), A2
|
||||
MOV ZERO, A3
|
||||
MOV ZERO, A4
|
||||
MOV ZERO, A5
|
||||
MOV trap+0(FP), A7 // syscall entry
|
||||
ECALL
|
||||
MOV A0, r1+32(FP)
|
||||
|
||||
+8
-4
@@ -9,12 +9,11 @@ package unix
|
||||
import "unsafe"
|
||||
|
||||
// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
|
||||
// systems by flock_linux_32bit.go to be SYS_FCNTL64.
|
||||
// systems by fcntl_linux_32bit.go to be SYS_FCNTL64.
|
||||
var fcntl64Syscall uintptr = SYS_FCNTL
|
||||
|
||||
// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
|
||||
func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
|
||||
valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
|
||||
func fcntl(fd int, cmd, arg int) (int, error) {
|
||||
valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
var err error
|
||||
if errno != 0 {
|
||||
err = errno
|
||||
@@ -22,6 +21,11 @@ func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
|
||||
return int(valptr), err
|
||||
}
|
||||
|
||||
// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
|
||||
func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
|
||||
return fcntl(int(fd), cmd, arg)
|
||||
}
|
||||
|
||||
// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
|
||||
func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
|
||||
_, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
|
||||
|
||||
+1
-1
@@ -486,7 +486,7 @@ ccflags="$@"
|
||||
$2 ~ /^TCSET/ ||
|
||||
$2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
|
||||
$2 !~ "RTF_BITS" &&
|
||||
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
|
||||
$2 ~ /^(IFF|IFT|NET_RT|RTM(GRP)?|RTF|RTV|RTA|RTAX)_/ ||
|
||||
$2 ~ /^BIOC/ ||
|
||||
$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
|
||||
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
|
||||
|
||||
+17
-2
@@ -510,6 +510,23 @@ func SysctlRaw(name string, args ...int) ([]byte, error) {
|
||||
return buf[:n], nil
|
||||
}
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n := uintptr(SizeofClockinfo)
|
||||
var ci Clockinfo
|
||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n != SizeofClockinfo {
|
||||
return nil, EIO
|
||||
}
|
||||
return &ci, nil
|
||||
}
|
||||
|
||||
//sys utimes(path string, timeval *[2]Timeval) (err error)
|
||||
|
||||
func Utimes(path string, tv []Timeval) error {
|
||||
@@ -577,8 +594,6 @@ func Futimes(fd int, tv []Timeval) error {
|
||||
return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
|
||||
}
|
||||
|
||||
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
|
||||
+2
-17
@@ -155,23 +155,6 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (
|
||||
|
||||
//sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n := uintptr(SizeofClockinfo)
|
||||
var ci Clockinfo
|
||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n != SizeofClockinfo {
|
||||
return nil, EIO
|
||||
}
|
||||
return &ci, nil
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
@@ -333,6 +316,8 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
|
||||
* Wrapped
|
||||
*/
|
||||
|
||||
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
||||
|
||||
//sys kill(pid int, signum int, posix int) (err error)
|
||||
|
||||
func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin,386,!go1.12
|
||||
// +build darwin,arm,!go1.12
|
||||
|
||||
package unix
|
||||
|
||||
|
||||
-6
@@ -529,12 +529,6 @@ func PtraceGetRegs(pid int, regsout *Reg) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
|
||||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
func PtraceLwpEvents(pid int, enable int) (err error) {
|
||||
return ptrace(PTRACE_LWPEVENTS, pid, 0, enable)
|
||||
}
|
||||
|
||||
+6
@@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
+6
@@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
+6
@@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
+6
@@ -54,3 +54,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
}
|
||||
|
||||
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
+26
-3
@@ -1555,8 +1555,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys Acct(path string) (err error)
|
||||
//sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
|
||||
//sys Adjtimex(buf *Timex) (state int, err error)
|
||||
//sys Capget(hdr *CapUserHeader, data *CapUserData) (err error)
|
||||
//sys Capset(hdr *CapUserHeader, data *CapUserData) (err error)
|
||||
//sysnb Capget(hdr *CapUserHeader, data *CapUserData) (err error)
|
||||
//sysnb Capset(hdr *CapUserHeader, data *CapUserData) (err error)
|
||||
//sys Chdir(path string) (err error)
|
||||
//sys Chroot(path string) (err error)
|
||||
//sys ClockGetres(clockid int32, res *Timespec) (err error)
|
||||
@@ -1575,7 +1575,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys Fchdir(fd int) (err error)
|
||||
//sys Fchmod(fd int, mode uint32) (err error)
|
||||
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
||||
//sys Fdatasync(fd int) (err error)
|
||||
//sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error)
|
||||
//sys FinitModule(fd int, params string, flags int) (err error)
|
||||
@@ -1655,6 +1654,30 @@ func Setgid(uid int) (err error) {
|
||||
return EOPNOTSUPP
|
||||
}
|
||||
|
||||
// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.
|
||||
// setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability.
|
||||
// If the call fails due to other reasons, current fsgid will be returned.
|
||||
func SetfsgidRetGid(gid int) (int, error) {
|
||||
return setfsgid(gid)
|
||||
}
|
||||
|
||||
// SetfsuidRetUid sets fsuid for current thread and returns previous fsuid set.
|
||||
// setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability
|
||||
// If the call fails due to other reasons, current fsuid will be returned.
|
||||
func SetfsuidRetUid(uid int) (int, error) {
|
||||
return setfsuid(uid)
|
||||
}
|
||||
|
||||
func Setfsgid(gid int) error {
|
||||
_, err := setfsgid(gid)
|
||||
return err
|
||||
}
|
||||
|
||||
func Setfsuid(uid int) error {
|
||||
_, err := setfsuid(uid)
|
||||
return err
|
||||
}
|
||||
|
||||
func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
|
||||
return signalfd(fd, sigmask, _C__NSIG/8, flags)
|
||||
}
|
||||
|
||||
+2
-2
@@ -70,8 +70,8 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
|
||||
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
|
||||
+2
-2
@@ -55,8 +55,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
+2
-2
@@ -98,8 +98,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
|
||||
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
+6
-2
@@ -36,8 +36,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
@@ -216,6 +216,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||
cmsg.Len = uint64(length)
|
||||
}
|
||||
|
||||
func InotifyInit() (fd int, err error) {
|
||||
return InotifyInit1(0)
|
||||
}
|
||||
|
||||
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||
|
||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@ package unix
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
+2
-2
@@ -41,8 +41,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@ import (
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ package unix
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys setfsgid(gid int) (prev int, err error)
|
||||
//sys setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
+3
-19
@@ -106,23 +106,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n := uintptr(SizeofClockinfo)
|
||||
var ci Clockinfo
|
||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n != SizeofClockinfo {
|
||||
return nil, EIO
|
||||
}
|
||||
return &ci, nil
|
||||
}
|
||||
|
||||
//sysnb pipe() (fd1 int, fd2 int, err error)
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
@@ -270,6 +253,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
|
||||
//sys Close(fd int) (err error)
|
||||
//sys Dup(fd int) (nfd int, err error)
|
||||
//sys Dup2(from int, to int) (err error)
|
||||
//sys Dup3(from int, to int, flags int) (err error)
|
||||
//sys Exit(code int)
|
||||
//sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
|
||||
//sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
|
||||
@@ -295,7 +279,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
//sys Fstatvfs1(fd int, buf *Statvfs_t) (err error) = SYS_FSTATVFS1
|
||||
//sys Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) = SYS_FSTATVFS1
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sysnb Getegid() (egid int)
|
||||
@@ -352,7 +336,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
|
||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||
//sysnb Setuid(uid int) (err error)
|
||||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statvfs1(path string, buf *Statvfs_t) (err error) = SYS_STATVFS1
|
||||
//sys Statvfs1(path string, buf *Statvfs_t, flags int) (err error) = SYS_STATVFS1
|
||||
//sys Symlink(path string, link string) (err error)
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Sync() (err error)
|
||||
|
||||
+8
-21
@@ -55,23 +55,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
n := uintptr(SizeofClockinfo)
|
||||
var ci Clockinfo
|
||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if n != SizeofClockinfo {
|
||||
return nil, EIO
|
||||
}
|
||||
return &ci, nil
|
||||
}
|
||||
|
||||
func SysctlUvmexp(name string) (*Uvmexp, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
@@ -89,16 +72,20 @@ func SysctlUvmexp(name string) (*Uvmexp, error) {
|
||||
return &u, nil
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (err error)
|
||||
func Pipe(p []int) (err error) {
|
||||
return Pipe2(p, 0)
|
||||
}
|
||||
|
||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||
func Pipe2(p []int, flags int) error {
|
||||
if len(p) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
var pp [2]_C_int
|
||||
err = pipe(&pp)
|
||||
err := pipe2(&pp, flags)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
//sys Getdents(fd int, buf []byte) (n int, err error)
|
||||
@@ -248,6 +235,7 @@ func Uname(uname *Utsname) error {
|
||||
//sys Close(fd int) (err error)
|
||||
//sys Dup(fd int) (nfd int, err error)
|
||||
//sys Dup2(from int, to int) (err error)
|
||||
//sys Dup3(from int, to int, flags int) (err error)
|
||||
//sys Exit(code int)
|
||||
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
|
||||
//sys Fchdir(fd int) (err error)
|
||||
@@ -352,7 +340,6 @@ func Uname(uname *Utsname) error {
|
||||
// clock_settime
|
||||
// closefrom
|
||||
// execve
|
||||
// fcntl
|
||||
// fhopen
|
||||
// fhstat
|
||||
// fhstatfs
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -716,8 +719,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -747,7 +751,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1229,6 +1233,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1241,6 +1246,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1583,6 +1589,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
@@ -1593,6 +1600,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8008743f
|
||||
PPPIOCGIDLE32 = 0x8008743f
|
||||
PPPIOCGIDLE64 = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1929,12 +1938,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1958,6 +1983,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1971,13 +1997,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1992,8 +2019,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2208,7 +2235,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2314,6 +2341,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2434,6 +2462,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2530,6 +2559,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2562,6 +2595,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -716,8 +719,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -747,7 +751,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1229,6 +1233,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1241,6 +1246,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1583,6 +1589,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
@@ -1593,6 +1600,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGIDLE32 = 0x8008743f
|
||||
PPPIOCGIDLE64 = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1930,12 +1939,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1959,6 +1984,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1972,13 +1998,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1993,8 +2020,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2209,7 +2236,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2315,6 +2342,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2435,6 +2463,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2531,6 +2560,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2563,6 +2596,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1581,6 +1587,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
@@ -1591,6 +1598,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8008743f
|
||||
PPPIOCGIDLE32 = 0x8008743f
|
||||
PPPIOCGIDLE64 = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1936,12 +1945,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1965,6 +1990,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1978,13 +2004,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1999,8 +2026,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2215,7 +2242,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2321,6 +2348,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2441,6 +2469,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2537,6 +2566,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2569,6 +2602,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -718,8 +721,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -749,7 +753,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1231,6 +1235,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1243,6 +1248,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1584,6 +1590,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
@@ -1594,6 +1601,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGIDLE32 = 0x8008743f
|
||||
PPPIOCGIDLE64 = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1922,12 +1931,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1951,6 +1976,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1964,13 +1990,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1985,8 +2012,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2201,7 +2228,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2307,6 +2334,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2428,6 +2456,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2524,6 +2553,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2556,6 +2589,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1581,6 +1587,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
@@ -1591,6 +1598,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4008743f
|
||||
PPPIOCGIDLE32 = 0x4008743f
|
||||
PPPIOCGIDLE64 = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1929,12 +1938,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1958,6 +1983,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1971,13 +1997,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1992,8 +2019,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2208,7 +2235,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1009
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2315,6 +2342,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2434,6 +2462,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2532,6 +2561,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2564,6 +2597,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1581,6 +1587,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
@@ -1591,6 +1598,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGIDLE32 = 0x4008743f
|
||||
PPPIOCGIDLE64 = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1929,12 +1938,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1958,6 +1983,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1971,13 +1997,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1992,8 +2019,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2208,7 +2235,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1009
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2315,6 +2342,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2434,6 +2462,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2532,6 +2561,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2564,6 +2597,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1581,6 +1587,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
@@ -1591,6 +1598,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGIDLE32 = 0x4008743f
|
||||
PPPIOCGIDLE64 = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1929,12 +1938,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1958,6 +1983,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1971,13 +1997,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1992,8 +2019,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2208,7 +2235,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1009
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2315,6 +2342,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2434,6 +2462,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2532,6 +2561,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2564,6 +2597,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1581,6 +1587,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80042406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
@@ -1591,6 +1598,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4008743f
|
||||
PPPIOCGIDLE32 = 0x4008743f
|
||||
PPPIOCGIDLE64 = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1929,12 +1938,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1958,6 +1983,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1971,13 +1997,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1992,8 +2019,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2208,7 +2235,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1009
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2315,6 +2342,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2434,6 +2462,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2532,6 +2561,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2564,6 +2597,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+41
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1265,6 +1271,7 @@ const (
|
||||
MAP_SHARED = 0x1
|
||||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
@@ -1582,6 +1589,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
@@ -1592,6 +1600,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGIDLE32 = 0x4008743f
|
||||
PPPIOCGIDLE64 = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1987,12 +1997,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -2016,6 +2042,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -2029,13 +2056,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -2050,8 +2078,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2266,7 +2294,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2372,6 +2400,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2490,6 +2519,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2592,6 +2622,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2624,6 +2658,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+41
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1265,6 +1271,7 @@ const (
|
||||
MAP_SHARED = 0x1
|
||||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
@@ -1582,6 +1589,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
@@ -1592,6 +1600,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGIDLE32 = 0x4008743f
|
||||
PPPIOCGIDLE64 = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1987,12 +1997,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -2016,6 +2042,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -2029,13 +2056,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -2050,8 +2078,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2266,7 +2294,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2372,6 +2400,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2490,6 +2519,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2592,6 +2622,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2624,6 +2658,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1581,6 +1587,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
@@ -1591,6 +1598,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGIDLE32 = 0x8008743f
|
||||
PPPIOCGIDLE64 = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1917,12 +1926,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -1946,6 +1971,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -1959,13 +1985,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -1980,8 +2007,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2196,7 +2223,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2302,6 +2329,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2422,6 +2450,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2518,6 +2547,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2550,6 +2583,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+40
-6
@@ -243,6 +243,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -417,8 +418,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -715,8 +718,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -746,7 +750,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1228,6 +1232,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1240,6 +1245,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1581,6 +1587,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x4004743d
|
||||
PPPIOCATTCHAN = 0x40047438
|
||||
PPPIOCCONNECT = 0x4004743a
|
||||
@@ -1591,6 +1598,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x80047441
|
||||
PPPIOCGFLAGS = 0x8004745a
|
||||
PPPIOCGIDLE = 0x8010743f
|
||||
PPPIOCGIDLE32 = 0x8008743f
|
||||
PPPIOCGIDLE64 = 0x8010743f
|
||||
PPPIOCGL2TPSTATS = 0x80487436
|
||||
PPPIOCGMRU = 0x80047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1990,12 +1999,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -2019,6 +2044,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -2032,13 +2058,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -2053,8 +2080,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2269,7 +2296,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x1e
|
||||
SO_ATTACH_BPF = 0x32
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2375,6 +2402,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2495,6 +2523,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2591,6 +2620,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2623,6 +2656,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+41
-6
@@ -246,6 +246,7 @@ const (
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_MMAPABLE = 0x400
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
BPF_F_NO_PREALLOC = 0x1
|
||||
BPF_F_NUMA_NODE = 0x4
|
||||
@@ -420,8 +421,10 @@ const (
|
||||
CLOCK_TXFROMRX = 0x4
|
||||
CLOCK_TXINT = 0x3
|
||||
CLONE_ARGS_SIZE_VER0 = 0x40
|
||||
CLONE_ARGS_SIZE_VER1 = 0x50
|
||||
CLONE_CHILD_CLEARTID = 0x200000
|
||||
CLONE_CHILD_SETTID = 0x1000000
|
||||
CLONE_CLEAR_SIGHAND = 0x100000000
|
||||
CLONE_DETACHED = 0x400000
|
||||
CLONE_FILES = 0x400
|
||||
CLONE_FS = 0x200
|
||||
@@ -719,8 +722,9 @@ const (
|
||||
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0x7
|
||||
FSCRYPT_POLICY_FLAGS_VALID = 0xf
|
||||
FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
|
||||
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
|
||||
FSCRYPT_POLICY_V1 = 0x0
|
||||
FSCRYPT_POLICY_V2 = 0x2
|
||||
FS_ENCRYPTION_MODE_ADIANTUM = 0x9
|
||||
@@ -750,7 +754,7 @@ const (
|
||||
FS_POLICY_FLAGS_PAD_4 = 0x0
|
||||
FS_POLICY_FLAGS_PAD_8 = 0x1
|
||||
FS_POLICY_FLAGS_PAD_MASK = 0x3
|
||||
FS_POLICY_FLAGS_VALID = 0x7
|
||||
FS_POLICY_FLAGS_VALID = 0xf
|
||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||
F_ADD_SEALS = 0x409
|
||||
F_DUPFD = 0x0
|
||||
@@ -1232,6 +1236,7 @@ const (
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
@@ -1244,6 +1249,7 @@ const (
|
||||
MADV_MERGEABLE = 0xc
|
||||
MADV_NOHUGEPAGE = 0xf
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0x15
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_REMOVE = 0x9
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
@@ -1270,6 +1276,7 @@ const (
|
||||
MAP_SHARED = 0x1
|
||||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
@@ -1585,6 +1592,7 @@ const (
|
||||
PERF_EVENT_IOC_SET_FILTER = 0x80082406
|
||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
||||
PIPEFS_MAGIC = 0x50495045
|
||||
PPC_CMM_MAGIC = 0xc7571590
|
||||
PPPIOCATTACH = 0x8004743d
|
||||
PPPIOCATTCHAN = 0x80047438
|
||||
PPPIOCCONNECT = 0x8004743a
|
||||
@@ -1595,6 +1603,8 @@ const (
|
||||
PPPIOCGDEBUG = 0x40047441
|
||||
PPPIOCGFLAGS = 0x4004745a
|
||||
PPPIOCGIDLE = 0x4010743f
|
||||
PPPIOCGIDLE32 = 0x4008743f
|
||||
PPPIOCGIDLE64 = 0x4010743f
|
||||
PPPIOCGL2TPSTATS = 0x40487436
|
||||
PPPIOCGMRU = 0x40047453
|
||||
PPPIOCGNPMODE = 0xc008744c
|
||||
@@ -1982,12 +1992,28 @@ const (
|
||||
RTF_UP = 0x1
|
||||
RTF_WINDOW = 0x80
|
||||
RTF_XRESOLVE = 0x800
|
||||
RTMGRP_DECnet_IFADDR = 0x1000
|
||||
RTMGRP_DECnet_ROUTE = 0x4000
|
||||
RTMGRP_IPV4_IFADDR = 0x10
|
||||
RTMGRP_IPV4_MROUTE = 0x20
|
||||
RTMGRP_IPV4_ROUTE = 0x40
|
||||
RTMGRP_IPV4_RULE = 0x80
|
||||
RTMGRP_IPV6_IFADDR = 0x100
|
||||
RTMGRP_IPV6_IFINFO = 0x800
|
||||
RTMGRP_IPV6_MROUTE = 0x200
|
||||
RTMGRP_IPV6_PREFIX = 0x20000
|
||||
RTMGRP_IPV6_ROUTE = 0x400
|
||||
RTMGRP_LINK = 0x1
|
||||
RTMGRP_NEIGH = 0x4
|
||||
RTMGRP_NOTIFY = 0x2
|
||||
RTMGRP_TC = 0x8
|
||||
RTM_BASE = 0x10
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
@@ -2011,6 +2037,7 @@ const (
|
||||
RTM_GETCHAIN = 0x66
|
||||
RTM_GETDCB = 0x4e
|
||||
RTM_GETLINK = 0x12
|
||||
RTM_GETLINKPROP = 0x6e
|
||||
RTM_GETMDB = 0x56
|
||||
RTM_GETMULTICAST = 0x3a
|
||||
RTM_GETNEIGH = 0x1e
|
||||
@@ -2024,13 +2051,14 @@ const (
|
||||
RTM_GETSTATS = 0x5e
|
||||
RTM_GETTCLASS = 0x2a
|
||||
RTM_GETTFILTER = 0x2e
|
||||
RTM_MAX = 0x6b
|
||||
RTM_MAX = 0x6f
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
@@ -2045,8 +2073,8 @@ const (
|
||||
RTM_NEWSTATS = 0x5c
|
||||
RTM_NEWTCLASS = 0x28
|
||||
RTM_NEWTFILTER = 0x2c
|
||||
RTM_NR_FAMILIES = 0x17
|
||||
RTM_NR_MSGTYPES = 0x5c
|
||||
RTM_NR_FAMILIES = 0x18
|
||||
RTM_NR_MSGTYPES = 0x60
|
||||
RTM_SETDCB = 0x4f
|
||||
RTM_SETLINK = 0x13
|
||||
RTM_SETNEIGHTBL = 0x43
|
||||
@@ -2261,7 +2289,7 @@ const (
|
||||
SOL_TLS = 0x11a
|
||||
SOL_X25 = 0x106
|
||||
SOL_XDP = 0x11b
|
||||
SOMAXCONN = 0x80
|
||||
SOMAXCONN = 0x1000
|
||||
SO_ACCEPTCONN = 0x8000
|
||||
SO_ATTACH_BPF = 0x34
|
||||
SO_ATTACH_FILTER = 0x1a
|
||||
@@ -2367,6 +2395,7 @@ const (
|
||||
STATX_ATTR_ENCRYPTED = 0x800
|
||||
STATX_ATTR_IMMUTABLE = 0x10
|
||||
STATX_ATTR_NODUMP = 0x40
|
||||
STATX_ATTR_VERITY = 0x100000
|
||||
STATX_BASIC_STATS = 0x7ff
|
||||
STATX_BLOCKS = 0x400
|
||||
STATX_BTIME = 0x800
|
||||
@@ -2486,6 +2515,7 @@ const (
|
||||
TCP_THIN_DUPACK = 0x11
|
||||
TCP_THIN_LINEAR_TIMEOUTS = 0x10
|
||||
TCP_TIMESTAMP = 0x18
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
@@ -2580,6 +2610,10 @@ const (
|
||||
TIPC_ADDR_MCAST = 0x1
|
||||
TIPC_ADDR_NAME = 0x2
|
||||
TIPC_ADDR_NAMESEQ = 0x1
|
||||
TIPC_AEAD_ALG_NAME = 0x20
|
||||
TIPC_AEAD_KEYLEN_MAX = 0x24
|
||||
TIPC_AEAD_KEYLEN_MIN = 0x14
|
||||
TIPC_AEAD_KEY_SIZE_MAX = 0x48
|
||||
TIPC_CFG_SRV = 0x0
|
||||
TIPC_CLUSTER_BITS = 0xc
|
||||
TIPC_CLUSTER_MASK = 0xfff000
|
||||
@@ -2612,6 +2646,7 @@ const (
|
||||
TIPC_MCAST_REPLICAST = 0x86
|
||||
TIPC_MEDIUM_IMPORTANCE = 0x1
|
||||
TIPC_NODEID_LEN = 0x10
|
||||
TIPC_NODELAY = 0x8a
|
||||
TIPC_NODE_BITS = 0xc
|
||||
TIPC_NODE_MASK = 0xfff
|
||||
TIPC_NODE_OFFSET = 0x0
|
||||
|
||||
+11
-11
@@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+16
-16
@@ -339,22 +339,6 @@ func libc_futimes_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -727,6 +711,22 @@ func libc_setattrlist_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+4
-2
@@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||
@@ -84,6 +82,8 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flistxattr(SB)
|
||||
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setattrlist(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
@@ -106,6 +106,8 @@ TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_clock_gettime(SB)
|
||||
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||
|
||||
+11
-11
@@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+16
-16
@@ -339,22 +339,6 @@ func libc_futimes_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -727,6 +711,22 @@ func libc_setattrlist_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+2
-2
@@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||
@@ -84,6 +82,8 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flistxattr(SB)
|
||||
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setattrlist(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
|
||||
+11
-11
@@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+16
-16
@@ -339,22 +339,6 @@ func libc_futimes_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -727,6 +711,22 @@ func libc_setattrlist_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+4
-2
@@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||
@@ -84,10 +82,14 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flistxattr(SB)
|
||||
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setattrlist(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ioctl(SB)
|
||||
TEXT ·libc_sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sysctl(SB)
|
||||
TEXT ·libc_sendfile_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_sendfile(SB)
|
||||
TEXT ·libc_access_trampoline(SB),NOSPLIT,$0-0
|
||||
|
||||
+11
-11
@@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -527,6 +516,17 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+16
-16
@@ -339,22 +339,6 @@ func libc_futimes_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_poll_trampoline), uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
@@ -727,6 +711,22 @@ func libc_setattrlist_trampoline()
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := syscall_syscall(funcPC(libc_fcntl_trampoline), uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_fcntl_trampoline()
|
||||
|
||||
//go:linkname libc_fcntl libc_fcntl
|
||||
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func kill(pid int, signum int, posix int) (err error) {
|
||||
_, _, e1 := syscall_syscall(funcPC(libc_kill_trampoline), uintptr(pid), uintptr(signum), uintptr(posix))
|
||||
if e1 != 0 {
|
||||
|
||||
+4
-2
@@ -44,8 +44,6 @@ TEXT ·libc_utimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_utimes(SB)
|
||||
TEXT ·libc_futimes_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_futimes(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_poll_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_poll(SB)
|
||||
TEXT ·libc_madvise_trampoline(SB),NOSPLIT,$0-0
|
||||
@@ -84,6 +82,8 @@ TEXT ·libc_flistxattr_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_flistxattr(SB)
|
||||
TEXT ·libc_setattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_setattrlist(SB)
|
||||
TEXT ·libc_fcntl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_fcntl(SB)
|
||||
TEXT ·libc_kill_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_kill(SB)
|
||||
TEXT ·libc_ioctl_trampoline(SB),NOSPLIT,$0-0
|
||||
@@ -106,6 +106,8 @@ TEXT ·libc_chown_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chown(SB)
|
||||
TEXT ·libc_chroot_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_chroot(SB)
|
||||
TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_clock_gettime(SB)
|
||||
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_close(SB)
|
||||
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
|
||||
|
||||
-11
@@ -255,17 +255,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
|
||||
-11
@@ -255,17 +255,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
|
||||
-11
@@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
|
||||
-11
@@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
|
||||
-11
@@ -239,17 +239,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
||||
n = int(r0)
|
||||
|
||||
+8
-17
@@ -439,7 +439,7 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
_, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -449,7 +449,7 @@ func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
_, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -659,17 +659,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fdatasync(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@@ -2132,8 +2121,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
|
||||
func setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2142,8 +2132,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
|
||||
func setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
+8
-17
@@ -439,7 +439,7 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
_, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -449,7 +449,7 @@ func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
_, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -659,17 +659,6 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
||||
val = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fdatasync(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@@ -2148,8 +2137,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2158,8 +2148,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user