Update deps
This commit is contained in:
parent
1f55b798c0
commit
b4356b9fc8
6
go.mod
6
go.mod
|
@ -21,9 +21,9 @@ require (
|
|||
github.com/kardianos/service v1.0.1-0.20191017145738-4df36c9fc1c6
|
||||
github.com/miekg/dns v1.1.22
|
||||
github.com/powerman/check v1.2.1
|
||||
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f
|
||||
golang.org/x/net v0.0.0-20191116160921-f9c825593386
|
||||
golang.org/x/sys v0.0.0-20191115151921-52ab43148777
|
||||
golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1
|
||||
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
gopkg.in/yaml.v2 v2.2.5 // indirect
|
||||
)
|
||||
|
|
12
go.sum
12
go.sum
|
@ -62,14 +62,14 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9
|
|||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
|
||||
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f h1:kz4KIr+xcPUsI3VMoqWfPMvtnJ6MGfiVwsWSVzphMO4=
|
||||
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1 h1:anGSYQpPhQwXlwsu5wmfq0nWkCNaMEMUwAv13Y92hd8=
|
||||
golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191116160921-f9c825593386 h1:ktbWvQrW08Txdxno1PiDpSxPXG6ndGsfnJjRRtkM0LQ=
|
||||
golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933 h1:e6HwijUxhDe+hPNjZQQn9bA5PW3vNmnN64U2ZW759Lk=
|
||||
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
|
@ -80,8 +80,8 @@ golang.org/x/sys v0.0.0-20190909082730-f460065e899a/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191029155521-f43be2a4598c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191115151921-52ab43148777 h1:wejkGHRTr38uaKRqECZlsCsJ1/TGxIyFbH32x5zUdu4=
|
||||
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX0Az1Bw5HF7PDraD+qU=
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
|
|
|
@ -227,6 +227,7 @@ type ClientConn struct {
|
|||
br *bufio.Reader
|
||||
fr *Framer
|
||||
lastActive time.Time
|
||||
lastIdle time.Time // time last idle
|
||||
// Settings from peer: (also guarded by mu)
|
||||
maxFrameSize uint32
|
||||
maxConcurrentStreams uint32
|
||||
|
@ -736,7 +737,8 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
|
|||
}
|
||||
|
||||
st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay &&
|
||||
int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32
|
||||
int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 &&
|
||||
!cc.tooIdleLocked()
|
||||
st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest
|
||||
return
|
||||
}
|
||||
|
@ -746,6 +748,16 @@ func (cc *ClientConn) canTakeNewRequestLocked() bool {
|
|||
return st.canTakeNewRequest
|
||||
}
|
||||
|
||||
// tooIdleLocked reports whether this connection has been been sitting idle
|
||||
// for too much wall time.
|
||||
func (cc *ClientConn) tooIdleLocked() bool {
|
||||
// The Round(0) strips the monontonic clock reading so the
|
||||
// times are compared based on their wall time. We don't want
|
||||
// to reuse a connection that's been sitting idle during
|
||||
// VM/laptop suspend if monotonic time was also frozen.
|
||||
return cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && time.Since(cc.lastIdle.Round(0)) > cc.idleTimeout
|
||||
}
|
||||
|
||||
// onIdleTimeout is called from a time.AfterFunc goroutine. It will
|
||||
// only be called when we're idle, but because we're coming from a new
|
||||
// goroutine, there could be a new request coming in at the same time,
|
||||
|
@ -1150,6 +1162,7 @@ func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error {
|
|||
}
|
||||
return errClientConnUnusable
|
||||
}
|
||||
cc.lastIdle = time.Time{}
|
||||
if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) {
|
||||
if waitingForConn != nil {
|
||||
close(waitingForConn)
|
||||
|
@ -1638,6 +1651,7 @@ func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream {
|
|||
delete(cc.streams, id)
|
||||
if len(cc.streams) == 0 && cc.idleTimer != nil {
|
||||
cc.idleTimer.Reset(cc.idleTimeout)
|
||||
cc.lastIdle = time.Now()
|
||||
}
|
||||
close(cs.done)
|
||||
// Wake up checkResetOrDone via clientStream.awaitFlowControl and
|
||||
|
|
|
@ -11,13 +11,14 @@ import (
|
|||
|
||||
"golang.org/x/net/bpf"
|
||||
"golang.org/x/net/internal/socket"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
|
||||
prog := sockFProg{
|
||||
prog := unix.SockFprog{
|
||||
Len: uint16(len(f)),
|
||||
Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
|
||||
Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])),
|
||||
}
|
||||
b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
|
||||
b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog]
|
||||
return so.Set(c, b)
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"golang.org/x/net/internal/iana"
|
||||
"golang.org/x/net/internal/socket"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -35,7 +36,7 @@ var (
|
|||
ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
|
||||
ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
|
||||
ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
|
||||
ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}},
|
||||
ssoAttachFilter: {Option: socket.Option{Level: unix.SOL_SOCKET, Name: unix.SO_ATTACH_FILTER, Len: unix.SizeofSockFprog}},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -133,16 +128,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -135,16 +130,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -133,16 +128,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -135,16 +130,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -133,16 +128,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -135,16 +130,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -135,16 +130,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -133,16 +128,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -133,16 +128,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -135,16 +130,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -135,16 +130,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -57,9 +57,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -72,8 +69,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -137,15 +132,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ const (
|
|||
sysSO_EE_ORIGIN_TXSTATUS = 0x4
|
||||
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet = 0x10
|
||||
sizeofInetPktinfo = 0xc
|
||||
|
@ -70,8 +67,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPFilter = 0x4
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -135,16 +130,3 @@ type groupSourceReq struct {
|
|||
type icmpFilter struct {
|
||||
Data uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -11,13 +11,14 @@ import (
|
|||
|
||||
"golang.org/x/net/bpf"
|
||||
"golang.org/x/net/internal/socket"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
|
||||
prog := sockFProg{
|
||||
prog := unix.SockFprog{
|
||||
Len: uint16(len(f)),
|
||||
Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
|
||||
Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])),
|
||||
}
|
||||
b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
|
||||
b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog]
|
||||
return so.Set(c, b)
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"golang.org/x/net/internal/iana"
|
||||
"golang.org/x/net/internal/socket"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -40,7 +41,7 @@ var (
|
|||
ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
|
||||
ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
|
||||
ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
|
||||
ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}},
|
||||
ssoAttachFilter: {Option: socket.Option{Level: unix.SOL_SOCKET, Name: unix.SO_ATTACH_FILTER, Len: unix.SizeofSockFprog}},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -155,16 +150,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -157,16 +152,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -155,16 +150,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -157,16 +152,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -155,16 +150,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -157,16 +152,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -157,16 +152,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -155,16 +150,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x104
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x8
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -155,16 +150,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [2]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -157,16 +152,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -157,16 +152,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -86,9 +86,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -100,8 +97,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -159,15 +154,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -84,9 +84,6 @@ const (
|
|||
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||
sysICMPV6_FILTER_PASSONLY = 0x4
|
||||
|
||||
sysSOL_SOCKET = 0x1
|
||||
sysSO_ATTACH_FILTER = 0x1a
|
||||
|
||||
sizeofKernelSockaddrStorage = 0x80
|
||||
sizeofSockaddrInet6 = 0x1c
|
||||
sizeofInet6Pktinfo = 0x14
|
||||
|
@ -98,8 +95,6 @@ const (
|
|||
sizeofGroupSourceReq = 0x108
|
||||
|
||||
sizeofICMPv6Filter = 0x20
|
||||
|
||||
sizeofSockFprog = 0x10
|
||||
)
|
||||
|
||||
type kernelSockaddrStorage struct {
|
||||
|
@ -157,16 +152,3 @@ type groupSourceReq struct {
|
|||
type icmpv6Filter struct {
|
||||
Data [8]uint32
|
||||
}
|
||||
|
||||
type sockFProg struct {
|
||||
Len uint16
|
||||
Pad_cgo_0 [6]byte
|
||||
Filter *sockFilter
|
||||
}
|
||||
|
||||
type sockFilter struct {
|
||||
Code uint16
|
||||
Jt uint8
|
||||
Jf uint8
|
||||
K uint32
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ includes_AIX='
|
|||
#include <sys/stropts.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/termio.h>
|
||||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -196,6 +197,7 @@ struct ltchars {
|
|||
#include <linux/fanotify.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fscrypt.h>
|
||||
#include <linux/genetlink.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/icmpv6.h>
|
||||
|
@ -495,7 +497,9 @@ ccflags="$@"
|
|||
$2 ~ /^CAN_/ ||
|
||||
$2 ~ /^CAP_/ ||
|
||||
$2 ~ /^ALG_/ ||
|
||||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
|
||||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ ||
|
||||
$2 ~ /^FS_IOC_.*ENCRYPTION/ ||
|
||||
$2 ~ /^FSCRYPT_/ ||
|
||||
$2 ~ /^GRND_/ ||
|
||||
$2 ~ /^RND/ ||
|
||||
$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
|
||||
|
|
|
@ -459,6 +459,15 @@ const (
|
|||
MAP_SHARED = 0x1
|
||||
MAP_TYPE = 0xf0
|
||||
MAP_VARIABLE = 0x0
|
||||
MCAST_BLOCK_SOURCE = 0x40
|
||||
MCAST_EXCLUDE = 0x2
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x3e
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x42
|
||||
MCAST_LEAVE_GROUP = 0x3f
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x43
|
||||
MCAST_SOURCE_FILTER = 0x49
|
||||
MCAST_UNBLOCK_SOURCE = 0x41
|
||||
MCL_CURRENT = 0x100
|
||||
MCL_FUTURE = 0x200
|
||||
MSG_ANY = 0x4
|
||||
|
@ -483,6 +492,7 @@ const (
|
|||
MS_INVALIDATE = 0x40
|
||||
MS_PER_SEC = 0x3e8
|
||||
MS_SYNC = 0x20
|
||||
NFDBITS = 0x20
|
||||
NL0 = 0x0
|
||||
NL1 = 0x4000
|
||||
NL2 = 0x8000
|
||||
|
@ -688,7 +698,7 @@ const (
|
|||
SIOCGHIWAT = 0x40047301
|
||||
SIOCGIFADDR = -0x3fd796df
|
||||
SIOCGIFADDRS = 0x2000698c
|
||||
SIOCGIFBAUDRATE = -0x3fd79693
|
||||
SIOCGIFBAUDRATE = -0x3fdf9669
|
||||
SIOCGIFBRDADDR = -0x3fd796dd
|
||||
SIOCGIFCONF = -0x3ff796bb
|
||||
SIOCGIFCONFGLOB = -0x3ff79670
|
||||
|
|
|
@ -459,6 +459,15 @@ const (
|
|||
MAP_SHARED = 0x1
|
||||
MAP_TYPE = 0xf0
|
||||
MAP_VARIABLE = 0x0
|
||||
MCAST_BLOCK_SOURCE = 0x40
|
||||
MCAST_EXCLUDE = 0x2
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x3e
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x42
|
||||
MCAST_LEAVE_GROUP = 0x3f
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x43
|
||||
MCAST_SOURCE_FILTER = 0x49
|
||||
MCAST_UNBLOCK_SOURCE = 0x41
|
||||
MCL_CURRENT = 0x100
|
||||
MCL_FUTURE = 0x200
|
||||
MSG_ANY = 0x4
|
||||
|
@ -483,6 +492,7 @@ const (
|
|||
MS_INVALIDATE = 0x40
|
||||
MS_PER_SEC = 0x3e8
|
||||
MS_SYNC = 0x20
|
||||
NFDBITS = 0x40
|
||||
NL0 = 0x0
|
||||
NL1 = 0x4000
|
||||
NL2 = 0x8000
|
||||
|
@ -688,7 +698,7 @@ const (
|
|||
SIOCGHIWAT = 0x40047301
|
||||
SIOCGIFADDR = -0x3fd796df
|
||||
SIOCGIFADDRS = 0x2000698c
|
||||
SIOCGIFBAUDRATE = -0x3fd79693
|
||||
SIOCGIFBAUDRATE = -0x3fdf9669
|
||||
SIOCGIFBRDADDR = -0x3fd796dd
|
||||
SIOCGIFCONF = -0x3fef96bb
|
||||
SIOCGIFCONFGLOB = -0x3fef9670
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -415,4 +415,5 @@ const (
|
|||
SYS_FSMOUNT = 4432
|
||||
SYS_FSPICK = 4433
|
||||
SYS_PIDFD_OPEN = 4434
|
||||
SYS_CLONE3 = 4435
|
||||
)
|
||||
|
|
|
@ -345,4 +345,5 @@ const (
|
|||
SYS_FSMOUNT = 5432
|
||||
SYS_FSPICK = 5433
|
||||
SYS_PIDFD_OPEN = 5434
|
||||
SYS_CLONE3 = 5435
|
||||
)
|
||||
|
|
|
@ -345,4 +345,5 @@ const (
|
|||
SYS_FSMOUNT = 5432
|
||||
SYS_FSPICK = 5433
|
||||
SYS_PIDFD_OPEN = 5434
|
||||
SYS_CLONE3 = 5435
|
||||
)
|
||||
|
|
|
@ -415,4 +415,5 @@ const (
|
|||
SYS_FSMOUNT = 4432
|
||||
SYS_FSPICK = 4433
|
||||
SYS_PIDFD_OPEN = 4434
|
||||
SYS_CLONE3 = 4435
|
||||
)
|
||||
|
|
|
@ -179,6 +179,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -256,7 +305,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -427,7 +476,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2041,6 +2090,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2055,6 +2105,7 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2663,7 +2714,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2743,7 +2794,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -179,6 +179,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -256,7 +305,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -428,7 +477,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2054,6 +2103,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2068,6 +2118,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2677,7 +2729,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2757,7 +2809,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -183,6 +183,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -260,7 +309,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -431,7 +480,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2032,6 +2081,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2046,6 +2096,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2654,7 +2706,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2734,7 +2786,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2033,6 +2082,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2047,6 +2097,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2656,7 +2708,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2736,7 +2788,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -182,6 +182,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -259,7 +308,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2038,6 +2087,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2052,6 +2102,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2660,7 +2712,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2740,7 +2792,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2036,6 +2085,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2050,6 +2100,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2659,7 +2711,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2739,7 +2791,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2036,6 +2085,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2050,6 +2100,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2659,7 +2711,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2739,7 +2791,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -182,6 +182,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -259,7 +308,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2038,6 +2087,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2052,6 +2102,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2660,7 +2712,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2740,7 +2792,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -181,6 +181,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -258,7 +307,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2043,6 +2092,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2057,6 +2107,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2666,7 +2718,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2746,7 +2798,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -181,6 +181,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -258,7 +307,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -430,7 +479,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2043,6 +2092,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2057,6 +2107,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2666,7 +2718,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2746,7 +2798,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -180,6 +180,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -257,7 +306,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -429,7 +478,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2061,6 +2110,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2075,6 +2125,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2684,7 +2736,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2764,7 +2816,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -179,6 +179,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -256,7 +305,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -428,7 +477,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2057,6 +2106,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2071,6 +2121,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2680,7 +2732,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2760,7 +2812,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -183,6 +183,55 @@ type FscryptKey struct {
|
|||
Size uint32
|
||||
}
|
||||
|
||||
type FscryptPolicyV1 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
Master_key_descriptor [8]uint8
|
||||
}
|
||||
|
||||
type FscryptPolicyV2 struct {
|
||||
Version uint8
|
||||
Contents_encryption_mode uint8
|
||||
Filenames_encryption_mode uint8
|
||||
Flags uint8
|
||||
_ [4]uint8
|
||||
Master_key_identifier [16]uint8
|
||||
}
|
||||
|
||||
type FscryptGetPolicyExArg struct {
|
||||
Size uint64
|
||||
Policy [24]byte
|
||||
}
|
||||
|
||||
type FscryptKeySpecifier struct {
|
||||
Type uint32
|
||||
_ uint32
|
||||
U [32]byte
|
||||
}
|
||||
|
||||
type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
_ [9]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Removal_status_flags uint32
|
||||
_ [5]uint32
|
||||
}
|
||||
|
||||
type FscryptGetKeyStatusArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
_ [6]uint32
|
||||
Status uint32
|
||||
Status_flags uint32
|
||||
User_count uint32
|
||||
_ [13]uint32
|
||||
}
|
||||
|
||||
type KeyctlDHParams struct {
|
||||
Private int32
|
||||
Prime int32
|
||||
|
@ -260,7 +309,7 @@ type RawSockaddrRFCOMM struct {
|
|||
type RawSockaddrCAN struct {
|
||||
Family uint16
|
||||
Ifindex int32
|
||||
Addr [8]byte
|
||||
Addr [16]byte
|
||||
}
|
||||
|
||||
type RawSockaddrALG struct {
|
||||
|
@ -432,7 +481,7 @@ const (
|
|||
SizeofSockaddrHCI = 0x6
|
||||
SizeofSockaddrL2 = 0xe
|
||||
SizeofSockaddrRFCOMM = 0xa
|
||||
SizeofSockaddrCAN = 0x10
|
||||
SizeofSockaddrCAN = 0x18
|
||||
SizeofSockaddrALG = 0x58
|
||||
SizeofSockaddrVM = 0x10
|
||||
SizeofSockaddrXDP = 0x10
|
||||
|
@ -2038,6 +2087,7 @@ type XDPRingOffset struct {
|
|||
Producer uint64
|
||||
Consumer uint64
|
||||
Desc uint64
|
||||
Flags uint64
|
||||
}
|
||||
|
||||
type XDPMmapOffsets struct {
|
||||
|
@ -2052,6 +2102,8 @@ type XDPUmemReg struct {
|
|||
Len uint64
|
||||
Size uint32
|
||||
Headroom uint32
|
||||
Flags uint32
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type XDPStatistics struct {
|
||||
|
@ -2661,7 +2713,7 @@ const (
|
|||
DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
|
||||
DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
|
||||
DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
|
||||
DEVLINK_CMD_MAX = 0x3c
|
||||
DEVLINK_CMD_MAX = 0x44
|
||||
DEVLINK_PORT_TYPE_NOTSET = 0x0
|
||||
DEVLINK_PORT_TYPE_AUTO = 0x1
|
||||
DEVLINK_PORT_TYPE_ETH = 0x2
|
||||
|
@ -2741,7 +2793,7 @@ const (
|
|||
DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
|
||||
DEVLINK_ATTR_PAD = 0x3d
|
||||
DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
|
||||
DEVLINK_ATTR_MAX = 0x80
|
||||
DEVLINK_ATTR_MAX = 0x89
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
|
||||
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
|
||||
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
|
||||
|
|
|
@ -229,15 +229,13 @@ func LookupSID(system, account string) (sid *SID, domain string, accType uint32,
|
|||
|
||||
// String converts SID to a string format suitable for display, storage, or transmission.
|
||||
func (sid *SID) String() string {
|
||||
// From https://docs.microsoft.com/en-us/windows/win32/secbiomet/general-constants
|
||||
const SecurityMaxSidSize = 68
|
||||
var s *uint16
|
||||
e := ConvertSidToStringSid(sid, &s)
|
||||
if e != nil {
|
||||
return ""
|
||||
}
|
||||
defer LocalFree((Handle)(unsafe.Pointer(s)))
|
||||
return UTF16ToString((*[SecurityMaxSidSize]uint16)(unsafe.Pointer(s))[:])
|
||||
return UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:])
|
||||
}
|
||||
|
||||
// Len returns the length, in bytes, of a valid security identifier SID.
|
||||
|
|
|
@ -313,6 +313,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
|
|||
//sys CoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree
|
||||
//sys rtlGetVersion(info *OsVersionInfoEx) (ret error) = ntdll.RtlGetVersion
|
||||
//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers
|
||||
//sys getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetProcessPreferredUILanguages
|
||||
//sys getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages
|
||||
//sys getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages
|
||||
//sys getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages
|
||||
|
||||
// Process Status API (PSAPI)
|
||||
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
|
||||
|
@ -697,6 +701,8 @@ const socket_error = uintptr(^uint32(0))
|
|||
//sys WSACleanup() (err error) [failretval==socket_error] = ws2_32.WSACleanup
|
||||
//sys WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) [failretval==socket_error] = ws2_32.WSAIoctl
|
||||
//sys socket(af int32, typ int32, protocol int32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.socket
|
||||
//sys sendto(s Handle, buf []byte, flags int, to unsafe.Pointer, tolen int32) (err error) [failretval==socket_error] = ws2_32.sendto
|
||||
//sys recvfrom(s Handle, buf []byte, flags int, from *RawSockaddrAny, fromlen *int) (n int, err error) [failretval==-1] = ws2_32.recvfrom
|
||||
//sys Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) [failretval==socket_error] = ws2_32.setsockopt
|
||||
//sys Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockopt
|
||||
//sys bind(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.bind
|
||||
|
@ -1125,10 +1131,26 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
|
|||
// TODO(brainman): fix all needed for net
|
||||
|
||||
func Accept(fd Handle) (nfd Handle, sa Sockaddr, err error) { return 0, nil, syscall.EWINDOWS }
|
||||
|
||||
func Recvfrom(fd Handle, p []byte, flags int) (n int, from Sockaddr, err error) {
|
||||
return 0, nil, syscall.EWINDOWS
|
||||
var rsa RawSockaddrAny
|
||||
l := int(unsafe.Sizeof(rsa))
|
||||
n, err = recvfrom(fd, p, flags, &rsa, &l)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
from, err = rsa.Sockaddr()
|
||||
return
|
||||
}
|
||||
func Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) { return syscall.EWINDOWS }
|
||||
|
||||
func Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) {
|
||||
ptr, l, err := to.sockaddr()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return sendto(fd, p, flags, ptr, l)
|
||||
}
|
||||
|
||||
func SetsockoptTimeval(fd Handle, level, opt int, tv *Timeval) (err error) { return syscall.EWINDOWS }
|
||||
|
||||
// The Linger struct is wrong but we only noticed after Go 1.
|
||||
|
@ -1378,3 +1400,54 @@ func RtlGetNtVersionNumbers() (majorVersion, minorVersion, buildNumber uint32) {
|
|||
buildNumber &= 0xffff
|
||||
return
|
||||
}
|
||||
|
||||
// GetProcessPreferredUILanguages retrieves the process preferred UI languages.
|
||||
func GetProcessPreferredUILanguages(flags uint32) ([]string, error) {
|
||||
return getUILanguages(flags, getProcessPreferredUILanguages)
|
||||
}
|
||||
|
||||
// GetThreadPreferredUILanguages retrieves the thread preferred UI languages for the current thread.
|
||||
func GetThreadPreferredUILanguages(flags uint32) ([]string, error) {
|
||||
return getUILanguages(flags, getThreadPreferredUILanguages)
|
||||
}
|
||||
|
||||
// GetUserPreferredUILanguages retrieves information about the user preferred UI languages.
|
||||
func GetUserPreferredUILanguages(flags uint32) ([]string, error) {
|
||||
return getUILanguages(flags, getUserPreferredUILanguages)
|
||||
}
|
||||
|
||||
// GetSystemPreferredUILanguages retrieves the system preferred UI languages.
|
||||
func GetSystemPreferredUILanguages(flags uint32) ([]string, error) {
|
||||
return getUILanguages(flags, getSystemPreferredUILanguages)
|
||||
}
|
||||
|
||||
func getUILanguages(flags uint32, f func(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) error) ([]string, error) {
|
||||
size := uint32(128)
|
||||
for {
|
||||
var numLanguages uint32
|
||||
buf := make([]uint16, size)
|
||||
err := f(flags, &numLanguages, &buf[0], &size)
|
||||
if err == ERROR_INSUFFICIENT_BUFFER {
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
buf = buf[:size]
|
||||
if numLanguages == 0 || len(buf) == 0 { // GetProcessPreferredUILanguages may return numLanguages==0 with "\0\0"
|
||||
return []string{}, nil
|
||||
}
|
||||
if buf[len(buf)-1] == 0 {
|
||||
buf = buf[:len(buf)-1] // remove terminating null
|
||||
}
|
||||
languages := make([]string, 0, numLanguages)
|
||||
from := 0
|
||||
for i, c := range buf {
|
||||
if c == 0 {
|
||||
languages = append(languages, string(utf16.Decode(buf[from:i])))
|
||||
from = i + 1
|
||||
}
|
||||
}
|
||||
return languages, nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1742,3 +1742,36 @@ const (
|
|||
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 2
|
||||
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 4
|
||||
)
|
||||
|
||||
// MUI function flag values
|
||||
const (
|
||||
MUI_LANGUAGE_ID = 0x4
|
||||
MUI_LANGUAGE_NAME = 0x8
|
||||
MUI_MERGE_SYSTEM_FALLBACK = 0x10
|
||||
MUI_MERGE_USER_FALLBACK = 0x20
|
||||
MUI_UI_FALLBACK = MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK
|
||||
MUI_THREAD_LANGUAGES = 0x40
|
||||
MUI_CONSOLE_FILTER = 0x100
|
||||
MUI_COMPLEX_SCRIPT_FILTER = 0x200
|
||||
MUI_RESET_FILTERS = 0x001
|
||||
MUI_USER_PREFERRED_UI_LANGUAGES = 0x10
|
||||
MUI_USE_INSTALLED_LANGUAGES = 0x20
|
||||
MUI_USE_SEARCH_ALL_LANGUAGES = 0x40
|
||||
MUI_LANG_NEUTRAL_PE_FILE = 0x100
|
||||
MUI_NON_LANG_NEUTRAL_FILE = 0x200
|
||||
MUI_MACHINE_LANGUAGE_SETTINGS = 0x400
|
||||
MUI_FILETYPE_NOT_LANGUAGE_NEUTRAL = 0x001
|
||||
MUI_FILETYPE_LANGUAGE_NEUTRAL_MAIN = 0x002
|
||||
MUI_FILETYPE_LANGUAGE_NEUTRAL_MUI = 0x004
|
||||
MUI_QUERY_TYPE = 0x001
|
||||
MUI_QUERY_CHECKSUM = 0x002
|
||||
MUI_QUERY_LANGUAGE_NAME = 0x004
|
||||
MUI_QUERY_RESOURCE_TYPES = 0x008
|
||||
MUI_FILEINFO_VERSION = 0x001
|
||||
|
||||
MUI_FULL_LANGUAGE = 0x01
|
||||
MUI_PARTIAL_LANGUAGE = 0x02
|
||||
MUI_LIP_LANGUAGE = 0x04
|
||||
MUI_LANGUAGE_INSTALLED = 0x20
|
||||
MUI_LANGUAGE_LICENSED = 0x40
|
||||
)
|
||||
|
|
|
@ -248,11 +248,17 @@ var (
|
|||
procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
|
||||
procRtlGetVersion = modntdll.NewProc("RtlGetVersion")
|
||||
procRtlGetNtVersionNumbers = modntdll.NewProc("RtlGetNtVersionNumbers")
|
||||
procGetProcessPreferredUILanguages = modkernel32.NewProc("GetProcessPreferredUILanguages")
|
||||
procGetThreadPreferredUILanguages = modkernel32.NewProc("GetThreadPreferredUILanguages")
|
||||
procGetUserPreferredUILanguages = modkernel32.NewProc("GetUserPreferredUILanguages")
|
||||
procGetSystemPreferredUILanguages = modkernel32.NewProc("GetSystemPreferredUILanguages")
|
||||
procEnumProcesses = modpsapi.NewProc("EnumProcesses")
|
||||
procWSAStartup = modws2_32.NewProc("WSAStartup")
|
||||
procWSACleanup = modws2_32.NewProc("WSACleanup")
|
||||
procWSAIoctl = modws2_32.NewProc("WSAIoctl")
|
||||
procsocket = modws2_32.NewProc("socket")
|
||||
procsendto = modws2_32.NewProc("sendto")
|
||||
procrecvfrom = modws2_32.NewProc("recvfrom")
|
||||
procsetsockopt = modws2_32.NewProc("setsockopt")
|
||||
procgetsockopt = modws2_32.NewProc("getsockopt")
|
||||
procbind = modws2_32.NewProc("bind")
|
||||
|
@ -2760,6 +2766,54 @@ func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNum
|
|||
return
|
||||
}
|
||||
|
||||
func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
|
||||
if r1 == 0 {
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
|
||||
if r1 == 0 {
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
|
||||
if r1 == 0 {
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
|
||||
if r1 == 0 {
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
|
||||
var _p0 *uint32
|
||||
if len(processIds) > 0 {
|
||||
|
@ -2821,6 +2875,39 @@ func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func sendto(s Handle, buf []byte, flags int, to unsafe.Pointer, tolen int32) (err error) {
|
||||
var _p0 *byte
|
||||
if len(buf) > 0 {
|
||||
_p0 = &buf[0]
|
||||
}
|
||||
r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
|
||||
if r1 == socket_error {
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func recvfrom(s Handle, buf []byte, flags int, from *RawSockaddrAny, fromlen *int) (n int, err error) {
|
||||
var _p0 *byte
|
||||
if len(buf) > 0 {
|
||||
_p0 = &buf[0]
|
||||
}
|
||||
r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
|
||||
n = int(r0)
|
||||
if n == -1 {
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
} else {
|
||||
err = syscall.EINVAL
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
|
||||
r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
|
||||
if r1 == socket_error {
|
||||
|
|
|
@ -52,7 +52,7 @@ github.com/powerman/check
|
|||
# github.com/smartystreets/goconvey v1.6.4
|
||||
github.com/smartystreets/goconvey/convey/gotest
|
||||
github.com/smartystreets/goconvey/convey/reporting
|
||||
# golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f
|
||||
# golang.org/x/crypto v0.0.0-20191128160524-b544559bb6d1
|
||||
golang.org/x/crypto/curve25519
|
||||
golang.org/x/crypto/ed25519
|
||||
golang.org/x/crypto/ed25519/internal/edwards25519
|
||||
|
@ -61,7 +61,7 @@ golang.org/x/crypto/nacl/box
|
|||
golang.org/x/crypto/nacl/secretbox
|
||||
golang.org/x/crypto/poly1305
|
||||
golang.org/x/crypto/salsa20/salsa
|
||||
# golang.org/x/net v0.0.0-20191116160921-f9c825593386
|
||||
# golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933
|
||||
golang.org/x/net/bpf
|
||||
golang.org/x/net/http/httpguts
|
||||
golang.org/x/net/http2
|
||||
|
@ -73,7 +73,7 @@ golang.org/x/net/internal/socks
|
|||
golang.org/x/net/ipv4
|
||||
golang.org/x/net/ipv6
|
||||
golang.org/x/net/proxy
|
||||
# golang.org/x/sys v0.0.0-20191115151921-52ab43148777
|
||||
# golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9
|
||||
golang.org/x/sys/cpu
|
||||
golang.org/x/sys/unix
|
||||
golang.org/x/sys/windows
|
||||
|
|
Loading…
Reference in New Issue