mirror of https://github.com/cheat/cheat.git
Merge pull request #521 from chrisallenlane/master
chore: dependencies and build script
This commit is contained in:
commit
f47b75edc0
|
@ -11,12 +11,26 @@ go mod vendor && go mod tidy
|
|||
cd "$APPDIR/cmd/cheat"
|
||||
go clean && go generate
|
||||
|
||||
# compile AMD64 for Linux, OSX, and Windows
|
||||
# amd64/darwin
|
||||
env GOOS=darwin GOARCH=amd64 go build -mod vendor -o \
|
||||
"$APPDIR/dist/cheat-darwin-amd64" "$APPDIR/cmd/cheat"
|
||||
|
||||
# amd64/linux
|
||||
env GOOS=linux GOARCH=amd64 go build -mod vendor -o \
|
||||
"$APPDIR/dist/cheat-linux-amd64" "$APPDIR/cmd/cheat"
|
||||
|
||||
# amd64/windows
|
||||
env GOOS=windows GOARCH=amd64 go build -mod vendor -o \
|
||||
"$APPDIR/dist/cheat-win-amd64.exe" "$APPDIR/cmd/cheat"
|
||||
|
||||
# arm7/linux
|
||||
env GOOS=linux GOARCH=arm GOARM=7 go build -mod vendor -o \
|
||||
"$APPDIR/dist/cheat-linux-arm7" "$APPDIR/cmd/cheat"
|
||||
|
||||
# arm6/linux
|
||||
env GOOS=linux GOARCH=arm GOARM=6 go build -mod vendor -o \
|
||||
"$APPDIR/dist/cheat-linux-arm6" "$APPDIR/cmd/cheat"
|
||||
|
||||
# arm5/linux
|
||||
env GOOS=linux GOARCH=arm GOARM=5 go build -mod vendor -o \
|
||||
"$APPDIR/dist/cheat-linux-arm5" "$APPDIR/cmd/cheat"
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/cheat/cheat/internal/config"
|
||||
)
|
||||
|
||||
const version = "3.2.1"
|
||||
const version = "3.2.2"
|
||||
|
||||
func main() {
|
||||
|
||||
|
|
6
go.sum
6
go.sum
|
@ -3,8 +3,6 @@ github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtix
|
|||
github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
|
||||
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U=
|
||||
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI=
|
||||
github.com/alecthomas/chroma v0.6.9 h1:afiCdwnNPo6fcyvoqqsXs78t7NbR9TuW4wDB7NJkcag=
|
||||
github.com/alecthomas/chroma v0.6.9/go.mod h1:1U/PfCsTALWWYHDnsIQkxEBM0+6LLe0v8+RSVMOwxeY=
|
||||
github.com/alecthomas/chroma v0.7.0 h1:z+0HgTUmkpRDRz0SRSdMaqOLfJV4F+N1FPDZUZIDUzw=
|
||||
github.com/alecthomas/chroma v0.7.0/go.mod h1:1U/PfCsTALWWYHDnsIQkxEBM0+6LLe0v8+RSVMOwxeY=
|
||||
github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo=
|
||||
|
@ -34,8 +32,6 @@ github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRU
|
|||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
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-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
|
||||
|
@ -58,8 +54,6 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC
|
|||
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
||||
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35 h1:YAFjXN64LMvktoUZH9zgY4lGc/msGN7HQfoSuKCgaDU=
|
||||
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
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-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
|
|
|
@ -20,7 +20,7 @@ var (
|
|||
return nil
|
||||
}))
|
||||
// Default HTML formatter outputs self-contained HTML.
|
||||
htmlFull = Register("html", html.New(html.Standalone(), html.WithClasses())) // nolint
|
||||
htmlFull = Register("html", html.New(html.Standalone(true), html.WithClasses(true))) // nolint
|
||||
SVG = Register("svg", svg.New(svg.EmbedFont("Liberation Mono", svg.FontLiberationMono, svg.WOFF)))
|
||||
)
|
||||
|
||||
|
|
|
@ -14,32 +14,47 @@ import (
|
|||
type Option func(f *Formatter)
|
||||
|
||||
// Standalone configures the HTML formatter for generating a standalone HTML document.
|
||||
func Standalone() Option { return func(f *Formatter) { f.standalone = true } }
|
||||
func Standalone(b bool) Option { return func(f *Formatter) { f.standalone = b } }
|
||||
|
||||
// ClassPrefix sets the CSS class prefix.
|
||||
func ClassPrefix(prefix string) Option { return func(f *Formatter) { f.prefix = prefix } }
|
||||
|
||||
// WithClasses emits HTML using CSS classes, rather than inline styles.
|
||||
func WithClasses() Option { return func(f *Formatter) { f.Classes = true } }
|
||||
func WithClasses(b bool) Option { return func(f *Formatter) { f.Classes = b } }
|
||||
|
||||
// TabWidth sets the number of characters for a tab. Defaults to 8.
|
||||
func TabWidth(width int) Option { return func(f *Formatter) { f.tabWidth = width } }
|
||||
|
||||
// PreventSurroundingPre prevents the surrounding pre tags around the generated code
|
||||
func PreventSurroundingPre() Option { return func(f *Formatter) { f.preventSurroundingPre = true } }
|
||||
// PreventSurroundingPre prevents the surrounding pre tags around the generated code.
|
||||
func PreventSurroundingPre(b bool) Option {
|
||||
return func(f *Formatter) {
|
||||
if b {
|
||||
f.preWrapper = nopPreWrapper
|
||||
} else {
|
||||
f.preWrapper = defaultPreWrapper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WithPreWrapper allows control of the surrounding pre tags.
|
||||
func WithPreWrapper(wrapper PreWrapper) Option {
|
||||
return func(f *Formatter) {
|
||||
f.preWrapper = wrapper
|
||||
}
|
||||
}
|
||||
|
||||
// WithLineNumbers formats output with line numbers.
|
||||
func WithLineNumbers() Option {
|
||||
func WithLineNumbers(b bool) Option {
|
||||
return func(f *Formatter) {
|
||||
f.lineNumbers = true
|
||||
f.lineNumbers = b
|
||||
}
|
||||
}
|
||||
|
||||
// LineNumbersInTable will, when combined with WithLineNumbers, separate the line numbers
|
||||
// and code in table td's, which make them copy-and-paste friendly.
|
||||
func LineNumbersInTable() Option {
|
||||
func LineNumbersInTable(b bool) Option {
|
||||
return func(f *Formatter) {
|
||||
f.lineNumbersInTable = true
|
||||
f.lineNumbersInTable = b
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,6 +79,7 @@ func BaseLineNumber(n int) Option {
|
|||
func New(options ...Option) *Formatter {
|
||||
f := &Formatter{
|
||||
baseLineNumber: 1,
|
||||
preWrapper: defaultPreWrapper,
|
||||
}
|
||||
for _, option := range options {
|
||||
option(f)
|
||||
|
@ -71,17 +87,57 @@ func New(options ...Option) *Formatter {
|
|||
return f
|
||||
}
|
||||
|
||||
// PreWrapper defines the operations supported in WithPreWrapper.
|
||||
type PreWrapper interface {
|
||||
// Start is called to write a start <pre> element.
|
||||
// The code flag tells whether this block surrounds
|
||||
// highlighted code. This will be false when surrounding
|
||||
// line numbers.
|
||||
Start(code bool, styleAttr string) string
|
||||
|
||||
// End is called to write the end </pre> element.
|
||||
End(code bool) string
|
||||
}
|
||||
|
||||
type preWrapper struct {
|
||||
start func(code bool, styleAttr string) string
|
||||
end func(code bool) string
|
||||
}
|
||||
|
||||
func (p preWrapper) Start(code bool, styleAttr string) string {
|
||||
return p.start(code, styleAttr)
|
||||
}
|
||||
|
||||
func (p preWrapper) End(code bool) string {
|
||||
return p.end(code)
|
||||
}
|
||||
|
||||
var (
|
||||
nopPreWrapper = preWrapper{
|
||||
start: func(code bool, styleAttr string) string { return "" },
|
||||
end: func(code bool) string { return "" },
|
||||
}
|
||||
defaultPreWrapper = preWrapper{
|
||||
start: func(code bool, styleAttr string) string {
|
||||
return fmt.Sprintf("<pre%s>", styleAttr)
|
||||
},
|
||||
end: func(code bool) string {
|
||||
return "</pre>"
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// Formatter that generates HTML.
|
||||
type Formatter struct {
|
||||
standalone bool
|
||||
prefix string
|
||||
Classes bool // Exported field to detect when classes are being used
|
||||
preventSurroundingPre bool
|
||||
tabWidth int
|
||||
lineNumbers bool
|
||||
lineNumbersInTable bool
|
||||
highlightRanges highlightRanges
|
||||
baseLineNumber int
|
||||
standalone bool
|
||||
prefix string
|
||||
Classes bool // Exported field to detect when classes are being used
|
||||
preWrapper PreWrapper
|
||||
tabWidth int
|
||||
lineNumbers bool
|
||||
lineNumbersInTable bool
|
||||
highlightRanges highlightRanges
|
||||
baseLineNumber int
|
||||
}
|
||||
|
||||
type highlightRanges [][2]int
|
||||
|
@ -129,9 +185,7 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []chroma.
|
|||
fmt.Fprintf(w, "<div%s>\n", f.styleAttr(css, chroma.Background))
|
||||
fmt.Fprintf(w, "<table%s><tr>", f.styleAttr(css, chroma.LineTable))
|
||||
fmt.Fprintf(w, "<td%s>\n", f.styleAttr(css, chroma.LineTableTD))
|
||||
if !f.preventSurroundingPre {
|
||||
fmt.Fprintf(w, "<pre%s>", f.styleAttr(css, chroma.Background))
|
||||
}
|
||||
fmt.Fprintf(w, f.preWrapper.Start(false, f.styleAttr(css, chroma.Background)))
|
||||
for index := range lines {
|
||||
line := f.baseLineNumber + index
|
||||
highlight, next := f.shouldHighlight(highlightIndex, line)
|
||||
|
@ -148,16 +202,13 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []chroma.
|
|||
fmt.Fprintf(w, "</span>")
|
||||
}
|
||||
}
|
||||
if !f.preventSurroundingPre {
|
||||
fmt.Fprint(w, "</pre>")
|
||||
}
|
||||
fmt.Fprint(w, f.preWrapper.End(false))
|
||||
fmt.Fprint(w, "</td>\n")
|
||||
fmt.Fprintf(w, "<td%s>\n", f.styleAttr(css, chroma.LineTableTD, "width:100%"))
|
||||
}
|
||||
|
||||
if !f.preventSurroundingPre {
|
||||
fmt.Fprintf(w, "<pre%s>", f.styleAttr(css, chroma.Background))
|
||||
}
|
||||
fmt.Fprintf(w, f.preWrapper.Start(true, f.styleAttr(css, chroma.Background)))
|
||||
|
||||
highlightIndex = 0
|
||||
for index, tokens := range lines {
|
||||
// 1-based line number.
|
||||
|
@ -187,9 +238,7 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []chroma.
|
|||
}
|
||||
}
|
||||
|
||||
if !f.preventSurroundingPre {
|
||||
fmt.Fprint(w, "</pre>")
|
||||
}
|
||||
fmt.Fprintf(w, f.preWrapper.End(true))
|
||||
|
||||
if wrapInTable {
|
||||
fmt.Fprint(w, "</td></tr></table>\n")
|
||||
|
|
|
@ -53,7 +53,7 @@ var Bash = internal.Register(MustNewLexer(
|
|||
{`&`, Punctuation, nil},
|
||||
{`\|`, Punctuation, nil},
|
||||
{`\s+`, Text, nil},
|
||||
{`\d+\b`, LiteralNumber, nil},
|
||||
{`\d+(?= |$)`, LiteralNumber, nil},
|
||||
{"[^=\\s\\[\\]{}()$\"\\'`\\\\<&|;]+", Text, nil},
|
||||
{`<`, Text, nil},
|
||||
},
|
||||
|
|
|
@ -26,7 +26,7 @@ var MySQL = internal.Register(MustNewLexer(
|
|||
{`((?:_[a-z0-9]+)?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("double-string")},
|
||||
{"[+*/<>=~!@#%^&|`?-]", Operator, nil},
|
||||
{`\b(tinyint|smallint|mediumint|int|integer|bigint|date|datetime|time|bit|bool|tinytext|mediumtext|longtext|text|tinyblob|mediumblob|longblob|blob|float|double|double\s+precision|real|numeric|dec|decimal|timestamp|year|char|varchar|varbinary|varcharacter|enum|set)(\b\s*)(\()?`, ByGroups(KeywordType, Text, Punctuation), nil},
|
||||
{`\b(add|all|alter|analyze|and|as|asc|asensitive|before|between|bigint|binary|blob|both|by|call|cascade|case|change|char|character|check|collate|column|condition|constraint|continue|convert|create|cross|current_date|current_time|current_timestamp|current_user|cursor|database|databases|day_hour|day_microsecond|day_minute|day_second|dec|decimal|declare|default|delayed|delete|desc|describe|deterministic|distinct|distinctrow|div|double|drop|dual|each|else|elseif|enclosed|escaped|exists|exit|explain|fetch|flush|float|float4|float8|for|force|foreign|from|fulltext|grant|group|having|high_priority|hour_microsecond|hour_minute|hour_second|if|ignore|in|index|infile|inner|inout|insensitive|insert|int|int1|int2|int3|int4|int8|integer|interval|into|is|iterate|join|key|keys|kill|leading|leave|left|like|limit|lines|load|localtime|localtimestamp|lock|long|loop|low_priority|match|minute_microsecond|minute_second|mod|modifies|natural|no_write_to_binlog|not|numeric|on|optimize|option|optionally|or|order|out|outer|outfile|precision|primary|procedure|purge|raid0|read|reads|real|references|regexp|release|rename|repeat|replace|require|restrict|return|revoke|right|rlike|schema|schemas|second_microsecond|select|sensitive|separator|set|show|smallint|soname|spatial|specific|sql|sql_big_result|sql_calc_found_rows|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|starting|straight_join|table|terminated|then|to|trailing|trigger|undo|union|unique|unlock|unsigned|update|usage|use|using|utc_date|utc_time|utc_timestamp|values|varying|when|where|while|with|write|x509|xor|year_month|zerofill)\b`, Keyword, nil},
|
||||
{`\b(add|all|alter|analyze|and|as|asc|asensitive|before|between|bigint|binary|blob|both|by|call|cascade|case|change|char|character|check|collate|column|condition|constraint|continue|convert|create|cross|current_date|current_time|current_timestamp|current_user|cursor|database|databases|day_hour|day_microsecond|day_minute|day_second|dec|decimal|declare|default|delayed|delete|desc|describe|deterministic|distinct|distinctrow|div|double|drop|dual|each|else|elseif|enclosed|escaped|exists|exit|explain|fetch|flush|float|float4|float8|for|force|foreign|from|fulltext|grant|group|having|high_priority|hour_microsecond|hour_minute|hour_second|identified|if|ignore|in|index|infile|inner|inout|insensitive|insert|int|int1|int2|int3|int4|int8|integer|interval|into|is|iterate|join|key|keys|kill|leading|leave|left|like|limit|lines|load|localtime|localtimestamp|lock|long|loop|low_priority|match|minute_microsecond|minute_second|mod|modifies|natural|no_write_to_binlog|not|numeric|on|optimize|option|optionally|or|order|out|outer|outfile|precision|primary|privileges|procedure|purge|raid0|read|reads|real|references|regexp|release|rename|repeat|replace|require|restrict|return|revoke|right|rlike|schema|schemas|second_microsecond|select|sensitive|separator|set|show|smallint|soname|spatial|specific|sql|sql_big_result|sql_calc_found_rows|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|starting|straight_join|table|terminated|then|to|trailing|trigger|undo|union|unique|unlock|unsigned|update|usage|use|user|using|utc_date|utc_time|utc_timestamp|values|varying|when|where|while|with|write|x509|xor|year_month|zerofill)\b`, Keyword, nil},
|
||||
{`\b(auto_increment|engine|charset|tables)\b`, KeywordPseudo, nil},
|
||||
{`(true|false|null)`, NameConstant, nil},
|
||||
{`([a-z_]\w*)(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil},
|
||||
|
|
|
@ -34,7 +34,6 @@ func (e EmitterFunc) Emit(groups []string, lexer Lexer) Iterator { return e(grou
|
|||
func ByGroups(emitters ...Emitter) Emitter {
|
||||
return EmitterFunc(func(groups []string, lexer Lexer) Iterator {
|
||||
iterators := make([]Iterator, 0, len(groups)-1)
|
||||
// NOTE: If this panics, there is a mismatch with groups
|
||||
if len(emitters) != len(groups)-1 {
|
||||
iterators = append(iterators, Error.Emit(groups, lexer))
|
||||
// panic(errors.Errorf("number of groups %q does not match number of emitters %v", groups, emitters))
|
||||
|
|
|
@ -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-20191026070338-33540a1f6037
|
||||
|
|
|
@ -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-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package unix
|
||||
|
||||
// Round the length of a raw sockaddr up to align it properly.
|
||||
func cmsgAlignOf(salen int) int {
|
||||
salign := SizeofPtr
|
||||
if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
|
||||
// 64-bit Dragonfly before the September 2019 ABI changes still requires
|
||||
// 32-bit aligned access to network subsystem.
|
||||
salign = 4
|
||||
}
|
||||
return (salen + salign - 1) & ^(salign - 1)
|
||||
}
|
|
@ -17,7 +17,7 @@ func UnixCredentials(ucred *Ucred) []byte {
|
|||
h.Level = SOL_SOCKET
|
||||
h.Type = SCM_CREDENTIALS
|
||||
h.SetLen(CmsgLen(SizeofUcred))
|
||||
*((*Ucred)(cmsgData(h))) = *ucred
|
||||
*(*Ucred)(h.data(0)) = *ucred
|
||||
return b
|
||||
}
|
||||
|
||||
|
|
|
@ -9,35 +9,9 @@
|
|||
package unix
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// Round the length of a raw sockaddr up to align it properly.
|
||||
func cmsgAlignOf(salen int) int {
|
||||
salign := SizeofPtr
|
||||
|
||||
switch runtime.GOOS {
|
||||
case "aix":
|
||||
// There is no alignment on AIX.
|
||||
salign = 1
|
||||
case "darwin", "dragonfly", "solaris", "illumos":
|
||||
// NOTE: It seems like 64-bit Darwin, DragonFly BSD,
|
||||
// illumos, and Solaris kernels still require 32-bit
|
||||
// aligned access to network subsystem.
|
||||
if SizeofPtr == 8 {
|
||||
salign = 4
|
||||
}
|
||||
case "netbsd", "openbsd":
|
||||
// NetBSD and OpenBSD armv7 require 64-bit alignment.
|
||||
if runtime.GOARCH == "arm" {
|
||||
salign = 8
|
||||
}
|
||||
}
|
||||
|
||||
return (salen + salign - 1) & ^(salign - 1)
|
||||
}
|
||||
|
||||
// CmsgLen returns the value to store in the Len field of the Cmsghdr
|
||||
// structure, taking into account any necessary alignment.
|
||||
func CmsgLen(datalen int) int {
|
||||
|
@ -50,8 +24,8 @@ func CmsgSpace(datalen int) int {
|
|||
return cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen)
|
||||
}
|
||||
|
||||
func cmsgData(h *Cmsghdr) unsafe.Pointer {
|
||||
return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)))
|
||||
func (h *Cmsghdr) data(offset uintptr) unsafe.Pointer {
|
||||
return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)) + offset)
|
||||
}
|
||||
|
||||
// SocketControlMessage represents a socket control message.
|
||||
|
@ -94,10 +68,8 @@ func UnixRights(fds ...int) []byte {
|
|||
h.Level = SOL_SOCKET
|
||||
h.Type = SCM_RIGHTS
|
||||
h.SetLen(CmsgLen(datalen))
|
||||
data := cmsgData(h)
|
||||
for _, fd := range fds {
|
||||
*(*int32)(data) = int32(fd)
|
||||
data = unsafe.Pointer(uintptr(data) + 4)
|
||||
for i, fd := range fds {
|
||||
*(*int32)(h.data(4 * uintptr(i))) = int32(fd)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright 2019 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build aix darwin freebsd linux netbsd openbsd solaris
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// Round the length of a raw sockaddr up to align it properly.
|
||||
func cmsgAlignOf(salen int) int {
|
||||
salign := SizeofPtr
|
||||
|
||||
// dragonfly needs to check ABI version at runtime, see cmsgAlignOf in
|
||||
// sockcmsg_dragonfly.go
|
||||
switch runtime.GOOS {
|
||||
case "aix":
|
||||
// There is no alignment on AIX.
|
||||
salign = 1
|
||||
case "darwin", "illumos", "solaris":
|
||||
// NOTE: It seems like 64-bit Darwin, Illumos and Solaris
|
||||
// kernels still require 32-bit aligned access to network
|
||||
// subsystem.
|
||||
if SizeofPtr == 8 {
|
||||
salign = 4
|
||||
}
|
||||
case "netbsd", "openbsd":
|
||||
// NetBSD and OpenBSD armv7 require 64-bit alignment.
|
||||
if runtime.GOARCH == "arm" {
|
||||
salign = 8
|
||||
}
|
||||
}
|
||||
|
||||
return (salen + salign - 1) & ^(salign - 1)
|
||||
}
|
|
@ -237,7 +237,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||
break
|
||||
}
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
|
||||
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
|
||||
sa.Name = string(bytes)
|
||||
return sa, nil
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@ func libc_fdopendir_trampoline()
|
|||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
|
||||
const ptrSize = unsafe.Sizeof(uintptr(0))
|
||||
|
||||
// We store the number of entries to skip in the seek
|
||||
// offset of fd. See issue #31368.
|
||||
// It's not the full required semantics, but should handle the case
|
||||
|
|
|
@ -339,6 +339,8 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
|
|||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
|
|
|
@ -10,7 +10,6 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
|
|
|
@ -10,7 +10,6 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
|
|
|
@ -12,10 +12,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) error {
|
|||
return ENOTSUP
|
||||
}
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
|
||||
return ENOTSUP
|
||||
}
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
|
|
@ -14,10 +14,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) error {
|
|||
return ENOTSUP
|
||||
}
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
|
||||
return ENOTSUP
|
||||
}
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
|
|
@ -12,9 +12,25 @@
|
|||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
import (
|
||||
"sync"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
// See version list in https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/sys/param.h
|
||||
var (
|
||||
osreldateOnce sync.Once
|
||||
osreldate uint32
|
||||
)
|
||||
|
||||
// First __DragonFly_version after September 2019 ABI changes
|
||||
// http://lists.dragonflybsd.org/pipermail/users/2019-September/358280.html
|
||||
const _dragonflyABIChangeVersion = 500705
|
||||
|
||||
func supportsABI(ver uint32) bool {
|
||||
osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
|
||||
return osreldate >= ver
|
||||
}
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
|
@ -152,6 +168,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
|
||||
func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {
|
||||
err := sysctl(mib, old, oldlen, nil, 0)
|
||||
if err != nil {
|
||||
|
|
|
@ -36,8 +36,6 @@ var (
|
|||
// INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h
|
||||
const _ino64First = 1200031
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
|
||||
func supportsABI(ver uint32) bool {
|
||||
osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
|
||||
return osreldate >= ver
|
||||
|
@ -203,6 +201,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
|
||||
func Uname(uname *Utsname) error {
|
||||
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
|
||||
n := unsafe.Sizeof(uname.Sysname)
|
||||
|
@ -462,8 +462,12 @@ func convertFromDirents11(buf []byte, old []byte) int {
|
|||
dstPos := 0
|
||||
srcPos := 0
|
||||
for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
|
||||
dstDirent := (*Dirent)(unsafe.Pointer(&buf[dstPos]))
|
||||
srcDirent := (*dirent_freebsd11)(unsafe.Pointer(&old[srcPos]))
|
||||
var dstDirent Dirent
|
||||
var srcDirent dirent_freebsd11
|
||||
|
||||
// If multiple direntries are written, sometimes when we reach the final one,
|
||||
// we may have cap of old less than size of dirent_freebsd11.
|
||||
copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:])
|
||||
|
||||
reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
|
||||
if dstPos+reclen > len(buf) {
|
||||
|
@ -479,6 +483,7 @@ func convertFromDirents11(buf []byte, old []byte) int {
|
|||
dstDirent.Pad1 = 0
|
||||
|
||||
copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
|
||||
copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:])
|
||||
padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
|
||||
for i := range padding {
|
||||
padding[i] = 0
|
||||
|
|
|
@ -884,7 +884,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||
for n < len(pp.Path) && pp.Path[n] != 0 {
|
||||
n++
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
|
||||
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
|
||||
sa.Name = string(bytes)
|
||||
return sa, nil
|
||||
|
||||
|
|
|
@ -18,8 +18,6 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
|
@ -189,6 +187,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
|
||||
func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
|
||||
var value Ptmget
|
||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||
|
|
|
@ -18,8 +18,6 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
|
||||
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
|
||||
type SockaddrDatalink struct {
|
||||
Len uint8
|
||||
|
@ -180,6 +178,8 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
|
|||
|
||||
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||
|
||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
|
||||
|
||||
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
||||
|
||||
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||
|
|
|
@ -391,7 +391,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||
for n < len(pp.Path) && pp.Path[n] != 0 {
|
||||
n++
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
|
||||
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
|
||||
sa.Name = string(bytes)
|
||||
return sa, nil
|
||||
|
||||
|
|
|
@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1683,22 +1699,6 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -757,6 +757,27 @@ func libc_ioctl_trampoline()
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_sysctl_trampoline()
|
||||
|
||||
//go:linkname libc_sysctl libc_sysctl
|
||||
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -2321,27 +2342,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc___sysctl_trampoline()
|
||||
|
||||
//go:linkname libc___sysctl libc___sysctl
|
||||
//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -88,6 +88,8 @@ 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
|
||||
|
@ -104,8 +106,6 @@ 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
|
||||
|
@ -262,8 +262,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_mmap(SB)
|
||||
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munmap(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
|
@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||
if e1 != 0 {
|
||||
|
@ -1683,22 +1699,6 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -757,6 +757,27 @@ func libc_ioctl_trampoline()
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_sysctl_trampoline()
|
||||
|
||||
//go:linkname libc_sysctl libc_sysctl
|
||||
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||
if e1 != 0 {
|
||||
|
@ -2321,27 +2342,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc___sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc___sysctl_trampoline()
|
||||
|
||||
//go:linkname libc___sysctl libc___sysctl
|
||||
//go:cgo_import_dynamic libc___sysctl __sysctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -88,6 +88,8 @@ 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
|
||||
|
@ -262,8 +264,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_mmap(SB)
|
||||
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munmap(SB)
|
||||
TEXT ·libc___sysctl_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc___sysctl(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
|
@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -757,6 +757,27 @@ func libc_ioctl_trampoline()
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_sysctl_trampoline()
|
||||
|
||||
//go:linkname libc_sysctl libc_sysctl
|
||||
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := syscall_syscall9(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -547,6 +547,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -757,6 +757,27 @@ func libc_ioctl_trampoline()
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_sysctl_trampoline), uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_sysctl_trampoline()
|
||||
|
||||
//go:linkname libc_sysctl libc_sysctl
|
||||
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_sendfile_trampoline), uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -88,6 +88,8 @@ 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
|
||||
|
@ -104,8 +106,6 @@ 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
|
||||
|
|
|
@ -397,7 +397,7 @@ type Reg struct {
|
|||
}
|
||||
|
||||
type FpReg struct {
|
||||
Fp_q [32]uint128
|
||||
Fp_q [512]uint8
|
||||
Fp_sr uint32
|
||||
Fp_cr uint32
|
||||
}
|
||||
|
|
|
@ -599,22 +599,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2484,6 +2468,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -600,22 +600,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2497,6 +2481,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -603,22 +603,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2475,6 +2459,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -601,22 +601,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2476,6 +2460,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -602,22 +602,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2481,6 +2465,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -601,22 +601,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2478,6 +2462,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -601,22 +601,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2478,6 +2462,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -602,22 +602,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2481,6 +2465,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -602,22 +602,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2486,6 +2470,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -602,22 +602,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2486,6 +2470,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -601,22 +601,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2504,6 +2488,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -600,22 +600,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2500,6 +2484,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -604,22 +604,6 @@ const (
|
|||
RTN_THROW = 0x9
|
||||
RTN_NAT = 0xa
|
||||
RTN_XRESOLVE = 0xb
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
SizeofNlMsghdr = 0x10
|
||||
SizeofNlMsgerr = 0x14
|
||||
SizeofRtGenmsg = 0x1
|
||||
|
@ -2481,6 +2465,42 @@ const (
|
|||
BPF_FD_TYPE_URETPROBE = 0x5
|
||||
)
|
||||
|
||||
const (
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
RTNLGRP_NEIGH = 0x3
|
||||
RTNLGRP_TC = 0x4
|
||||
RTNLGRP_IPV4_IFADDR = 0x5
|
||||
RTNLGRP_IPV4_MROUTE = 0x6
|
||||
RTNLGRP_IPV4_ROUTE = 0x7
|
||||
RTNLGRP_IPV4_RULE = 0x8
|
||||
RTNLGRP_IPV6_IFADDR = 0x9
|
||||
RTNLGRP_IPV6_MROUTE = 0xa
|
||||
RTNLGRP_IPV6_ROUTE = 0xb
|
||||
RTNLGRP_IPV6_IFINFO = 0xc
|
||||
RTNLGRP_DECnet_IFADDR = 0xd
|
||||
RTNLGRP_NOP2 = 0xe
|
||||
RTNLGRP_DECnet_ROUTE = 0xf
|
||||
RTNLGRP_DECnet_RULE = 0x10
|
||||
RTNLGRP_NOP4 = 0x11
|
||||
RTNLGRP_IPV6_PREFIX = 0x12
|
||||
RTNLGRP_IPV6_RULE = 0x13
|
||||
RTNLGRP_ND_USEROPT = 0x14
|
||||
RTNLGRP_PHONET_IFADDR = 0x15
|
||||
RTNLGRP_PHONET_ROUTE = 0x16
|
||||
RTNLGRP_DCB = 0x17
|
||||
RTNLGRP_IPV4_NETCONF = 0x18
|
||||
RTNLGRP_IPV6_NETCONF = 0x19
|
||||
RTNLGRP_MDB = 0x1a
|
||||
RTNLGRP_MPLS_ROUTE = 0x1b
|
||||
RTNLGRP_NSID = 0x1c
|
||||
RTNLGRP_MPLS_NETCONF = 0x1d
|
||||
RTNLGRP_IPV4_MROUTE_R = 0x1e
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
Version uint32
|
||||
Pid int32
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# github.com/alecthomas/chroma v0.6.9
|
||||
# github.com/alecthomas/chroma v0.7.0
|
||||
github.com/alecthomas/chroma
|
||||
github.com/alecthomas/chroma/formatters
|
||||
github.com/alecthomas/chroma/formatters/html
|
||||
|
@ -43,13 +43,13 @@ github.com/dlclark/regexp2/syntax
|
|||
github.com/docopt/docopt-go
|
||||
# github.com/mattn/go-colorable v0.0.9
|
||||
github.com/mattn/go-colorable
|
||||
# github.com/mattn/go-isatty v0.0.10
|
||||
# github.com/mattn/go-isatty v0.0.11
|
||||
github.com/mattn/go-isatty
|
||||
# github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
|
||||
github.com/mgutz/ansi
|
||||
# github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/mitchellh/go-homedir
|
||||
# golang.org/x/sys v0.0.0-20191008105621-543471e840be
|
||||
# golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
|
||||
golang.org/x/sys/unix
|
||||
# gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0
|
||||
gopkg.in/yaml.v1
|
||||
|
|
Loading…
Reference in New Issue