mirror of https://github.com/status-im/consul.git
update dependencies for enterprise change (#6395)
This commit is contained in:
parent
4caf1d111a
commit
430dab8c37
6
go.mod
6
go.mod
|
@ -18,7 +18,7 @@ require (
|
|||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e
|
||||
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310
|
||||
github.com/armon/go-radix v1.0.0
|
||||
github.com/asaskevich/govalidator v0.0.0-20180319081651-7d2e70ef918f // indirect
|
||||
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 // indirect
|
||||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
|
||||
|
@ -102,10 +102,10 @@ require (
|
|||
github.com/spf13/pflag v1.0.3 // indirect
|
||||
github.com/stretchr/objx v0.1.1 // indirect
|
||||
github.com/stretchr/testify v1.3.0
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58
|
||||
golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
|
||||
google.golang.org/grpc v1.23.0
|
||||
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
|
||||
|
|
14
go.sum
14
go.sum
|
@ -34,6 +34,8 @@ github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7
|
|||
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/asaskevich/govalidator v0.0.0-20180319081651-7d2e70ef918f h1:/8NcnxL60YFll4ehCwibKotx0BR9v2ND40fomga8qDs=
|
||||
github.com/asaskevich/govalidator v0.0.0-20180319081651-7d2e70ef918f/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/aws/aws-sdk-go v1.15.24 h1:xLAdTA/ore6xdPAljzZRed7IGqQgC+nY+ERS5vaj4Ro=
|
||||
|
@ -143,10 +145,6 @@ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWet
|
|||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8=
|
||||
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
|
||||
github.com/hashicorp/consul/api v1.2.0 h1:oPsuzLp2uk7I7rojPKuncWbZ+m5TMoD4Ivs+2Rkeh4Y=
|
||||
github.com/hashicorp/consul/api v1.2.0/go.mod h1:1SIkFYi2ZTXUE5Kgt179+4hH33djo11+0Eo2XgTAtkw=
|
||||
github.com/hashicorp/consul/sdk v0.2.0 h1:GWFYFmry/k4b1hEoy7kSkmU8e30GAyI4VZHk0fRxeL4=
|
||||
github.com/hashicorp/consul/sdk v0.2.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-bexpr v0.1.2 h1:ijMXI4qERbzxbCnkxmfUtwMyjrrk3y+Vt0MxojNCbBs=
|
||||
|
@ -363,8 +361,8 @@ github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59b
|
|||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 h1:KYQXGkl6vs02hK7pK4eIbw0NpNPedieTSTEiJ//bwGs=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0FNOmBrHfq7vN4btdGoDZgI=
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -374,6 +372,7 @@ golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73r
|
|||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0=
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+wdKBmM9Y9kU7Z83/lw=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/oauth2 v0.0.0-20170807180024-9a379c6b3e95/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
|
@ -390,10 +389,13 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
|
|||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5 h1:x6r4Jo0KNzOOzYd8lbcRsqjuqEASK6ob3auvWYM4/8U=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190508220229-2d0786266e9c h1:hDn6jm7snBX2O7+EeTk6Q4WXJfKt7MWgtiCCRi1rBoY=
|
||||
golang.org/x/sys v0.0.0-20190508220229-2d0786266e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5 h1:sM3evRHxE/1RuMe1FYAL3j7C7fUfIjkbE+NiDAYUF8U=
|
||||
golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
module github.com/armon/go-radix
|
|
@ -4,7 +4,10 @@
|
|||
|
||||
package blake2b
|
||||
|
||||
import "encoding/binary"
|
||||
import (
|
||||
"encoding/binary"
|
||||
"math/bits"
|
||||
)
|
||||
|
||||
// the precomputed values for BLAKE2b
|
||||
// there are 12 16-byte arrays - one for each round
|
||||
|
@ -51,118 +54,118 @@ func hashBlocksGeneric(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
|
|||
v0 += m[s[0]]
|
||||
v0 += v4
|
||||
v12 ^= v0
|
||||
v12 = v12<<(64-32) | v12>>32
|
||||
v12 = bits.RotateLeft64(v12, -32)
|
||||
v8 += v12
|
||||
v4 ^= v8
|
||||
v4 = v4<<(64-24) | v4>>24
|
||||
v4 = bits.RotateLeft64(v4, -24)
|
||||
v1 += m[s[1]]
|
||||
v1 += v5
|
||||
v13 ^= v1
|
||||
v13 = v13<<(64-32) | v13>>32
|
||||
v13 = bits.RotateLeft64(v13, -32)
|
||||
v9 += v13
|
||||
v5 ^= v9
|
||||
v5 = v5<<(64-24) | v5>>24
|
||||
v5 = bits.RotateLeft64(v5, -24)
|
||||
v2 += m[s[2]]
|
||||
v2 += v6
|
||||
v14 ^= v2
|
||||
v14 = v14<<(64-32) | v14>>32
|
||||
v14 = bits.RotateLeft64(v14, -32)
|
||||
v10 += v14
|
||||
v6 ^= v10
|
||||
v6 = v6<<(64-24) | v6>>24
|
||||
v6 = bits.RotateLeft64(v6, -24)
|
||||
v3 += m[s[3]]
|
||||
v3 += v7
|
||||
v15 ^= v3
|
||||
v15 = v15<<(64-32) | v15>>32
|
||||
v15 = bits.RotateLeft64(v15, -32)
|
||||
v11 += v15
|
||||
v7 ^= v11
|
||||
v7 = v7<<(64-24) | v7>>24
|
||||
v7 = bits.RotateLeft64(v7, -24)
|
||||
|
||||
v0 += m[s[4]]
|
||||
v0 += v4
|
||||
v12 ^= v0
|
||||
v12 = v12<<(64-16) | v12>>16
|
||||
v12 = bits.RotateLeft64(v12, -16)
|
||||
v8 += v12
|
||||
v4 ^= v8
|
||||
v4 = v4<<(64-63) | v4>>63
|
||||
v4 = bits.RotateLeft64(v4, -63)
|
||||
v1 += m[s[5]]
|
||||
v1 += v5
|
||||
v13 ^= v1
|
||||
v13 = v13<<(64-16) | v13>>16
|
||||
v13 = bits.RotateLeft64(v13, -16)
|
||||
v9 += v13
|
||||
v5 ^= v9
|
||||
v5 = v5<<(64-63) | v5>>63
|
||||
v5 = bits.RotateLeft64(v5, -63)
|
||||
v2 += m[s[6]]
|
||||
v2 += v6
|
||||
v14 ^= v2
|
||||
v14 = v14<<(64-16) | v14>>16
|
||||
v14 = bits.RotateLeft64(v14, -16)
|
||||
v10 += v14
|
||||
v6 ^= v10
|
||||
v6 = v6<<(64-63) | v6>>63
|
||||
v6 = bits.RotateLeft64(v6, -63)
|
||||
v3 += m[s[7]]
|
||||
v3 += v7
|
||||
v15 ^= v3
|
||||
v15 = v15<<(64-16) | v15>>16
|
||||
v15 = bits.RotateLeft64(v15, -16)
|
||||
v11 += v15
|
||||
v7 ^= v11
|
||||
v7 = v7<<(64-63) | v7>>63
|
||||
v7 = bits.RotateLeft64(v7, -63)
|
||||
|
||||
v0 += m[s[8]]
|
||||
v0 += v5
|
||||
v15 ^= v0
|
||||
v15 = v15<<(64-32) | v15>>32
|
||||
v15 = bits.RotateLeft64(v15, -32)
|
||||
v10 += v15
|
||||
v5 ^= v10
|
||||
v5 = v5<<(64-24) | v5>>24
|
||||
v5 = bits.RotateLeft64(v5, -24)
|
||||
v1 += m[s[9]]
|
||||
v1 += v6
|
||||
v12 ^= v1
|
||||
v12 = v12<<(64-32) | v12>>32
|
||||
v12 = bits.RotateLeft64(v12, -32)
|
||||
v11 += v12
|
||||
v6 ^= v11
|
||||
v6 = v6<<(64-24) | v6>>24
|
||||
v6 = bits.RotateLeft64(v6, -24)
|
||||
v2 += m[s[10]]
|
||||
v2 += v7
|
||||
v13 ^= v2
|
||||
v13 = v13<<(64-32) | v13>>32
|
||||
v13 = bits.RotateLeft64(v13, -32)
|
||||
v8 += v13
|
||||
v7 ^= v8
|
||||
v7 = v7<<(64-24) | v7>>24
|
||||
v7 = bits.RotateLeft64(v7, -24)
|
||||
v3 += m[s[11]]
|
||||
v3 += v4
|
||||
v14 ^= v3
|
||||
v14 = v14<<(64-32) | v14>>32
|
||||
v14 = bits.RotateLeft64(v14, -32)
|
||||
v9 += v14
|
||||
v4 ^= v9
|
||||
v4 = v4<<(64-24) | v4>>24
|
||||
v4 = bits.RotateLeft64(v4, -24)
|
||||
|
||||
v0 += m[s[12]]
|
||||
v0 += v5
|
||||
v15 ^= v0
|
||||
v15 = v15<<(64-16) | v15>>16
|
||||
v15 = bits.RotateLeft64(v15, -16)
|
||||
v10 += v15
|
||||
v5 ^= v10
|
||||
v5 = v5<<(64-63) | v5>>63
|
||||
v5 = bits.RotateLeft64(v5, -63)
|
||||
v1 += m[s[13]]
|
||||
v1 += v6
|
||||
v12 ^= v1
|
||||
v12 = v12<<(64-16) | v12>>16
|
||||
v12 = bits.RotateLeft64(v12, -16)
|
||||
v11 += v12
|
||||
v6 ^= v11
|
||||
v6 = v6<<(64-63) | v6>>63
|
||||
v6 = bits.RotateLeft64(v6, -63)
|
||||
v2 += m[s[14]]
|
||||
v2 += v7
|
||||
v13 ^= v2
|
||||
v13 = v13<<(64-16) | v13>>16
|
||||
v13 = bits.RotateLeft64(v13, -16)
|
||||
v8 += v13
|
||||
v7 ^= v8
|
||||
v7 = v7<<(64-63) | v7>>63
|
||||
v7 = bits.RotateLeft64(v7, -63)
|
||||
v3 += m[s[15]]
|
||||
v3 += v4
|
||||
v14 ^= v3
|
||||
v14 = v14<<(64-16) | v14>>16
|
||||
v14 = bits.RotateLeft64(v14, -16)
|
||||
v9 += v14
|
||||
v4 ^= v9
|
||||
v4 = v4<<(64-63) | v4>>63
|
||||
v4 = bits.RotateLeft64(v4, -63)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ GLOBL ·andMask<>(SB), (NOPTR+RODATA), $240
|
|||
#define polyMulStage1 MOVQ (0*8)(BP), AX; MOVQ AX, t2; MULQ acc0; MOVQ AX, t0; MOVQ DX, t1; MOVQ (0*8)(BP), AX; MULQ acc1; IMULQ acc2, t2; ADDQ AX, t1; ADCQ DX, t2
|
||||
#define polyMulStage2 MOVQ (1*8)(BP), AX; MOVQ AX, t3; MULQ acc0; ADDQ AX, t1; ADCQ $0, DX; MOVQ DX, acc0; MOVQ (1*8)(BP), AX; MULQ acc1; ADDQ AX, t2; ADCQ $0, DX
|
||||
#define polyMulStage3 IMULQ acc2, t3; ADDQ acc0, t2; ADCQ DX, t3
|
||||
#define polyMulReduceStage MOVQ t0, acc0; MOVQ t1, acc1; MOVQ t2, acc2; ANDQ $3, acc2; MOVQ t2, t0; ANDQ $-4, t0; MOVQ t3, t1; SHRQ $2, t2:t3; SHRQ $2, t3; ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $0, acc2; ADDQ t2, acc0; ADCQ t3, acc1; ADCQ $0, acc2
|
||||
#define polyMulReduceStage MOVQ t0, acc0; MOVQ t1, acc1; MOVQ t2, acc2; ANDQ $3, acc2; MOVQ t2, t0; ANDQ $-4, t0; MOVQ t3, t1; SHRQ $2, t3, t2; SHRQ $2, t3; ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $0, acc2; ADDQ t2, acc0; ADCQ t3, acc1; ADCQ $0, acc2
|
||||
|
||||
#define polyMulStage1_AVX2 MOVQ (0*8)(BP), DX; MOVQ DX, t2; MULXQ acc0, t0, t1; IMULQ acc2, t2; MULXQ acc1, AX, DX; ADDQ AX, t1; ADCQ DX, t2
|
||||
#define polyMulStage2_AVX2 MOVQ (1*8)(BP), DX; MULXQ acc0, acc0, AX; ADDQ acc0, t1; MULXQ acc1, acc1, t3; ADCQ acc1, t2; ADCQ $0, t3
|
||||
|
@ -248,7 +248,7 @@ hashADTail:
|
|||
ADDQ itr2, adp
|
||||
|
||||
hashADTailLoop:
|
||||
SHLQ $8, t1:t0
|
||||
SHLQ $8, t0, t1
|
||||
SHLQ $8, t0
|
||||
MOVB -1(adp), t2
|
||||
XORQ t2, t0
|
||||
|
|
|
@ -121,18 +121,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -236,18 +236,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -441,18 +441,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -591,18 +591,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -731,18 +731,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -846,18 +846,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -996,18 +996,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -1146,18 +1146,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
@ -1332,18 +1332,18 @@ TEXT ·ladderstep(SB),0,$296-8
|
|||
ADDQ AX,R12
|
||||
ADCQ DX,R13
|
||||
MOVQ $REDMASK51,DX
|
||||
SHLQ $13,CX:SI
|
||||
SHLQ $13,SI,CX
|
||||
ANDQ DX,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ DX,R8
|
||||
ADDQ CX,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ DX,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ DX,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ DX,R14
|
||||
ADDQ R13,R14
|
||||
IMUL3Q $19,R15,CX
|
||||
|
|
|
@ -124,18 +124,18 @@ TEXT ·mul(SB),0,$16-24
|
|||
ADDQ AX,R14
|
||||
ADCQ DX,R15
|
||||
MOVQ $REDMASK51,SI
|
||||
SHLQ $13,R9:R8
|
||||
SHLQ $13,R8,R9
|
||||
ANDQ SI,R8
|
||||
SHLQ $13,R11:R10
|
||||
SHLQ $13,R10,R11
|
||||
ANDQ SI,R10
|
||||
ADDQ R9,R10
|
||||
SHLQ $13,R13:R12
|
||||
SHLQ $13,R12,R13
|
||||
ANDQ SI,R12
|
||||
ADDQ R11,R12
|
||||
SHLQ $13,R15:R14
|
||||
SHLQ $13,R14,R15
|
||||
ANDQ SI,R14
|
||||
ADDQ R13,R14
|
||||
SHLQ $13,BP:BX
|
||||
SHLQ $13,BX,BP
|
||||
ANDQ SI,BX
|
||||
ADDQ R15,BX
|
||||
IMUL3Q $19,BP,DX
|
||||
|
|
|
@ -87,18 +87,18 @@ TEXT ·square(SB),7,$0-16
|
|||
ADDQ AX,R13
|
||||
ADCQ DX,R14
|
||||
MOVQ $REDMASK51,SI
|
||||
SHLQ $13,R8:CX
|
||||
SHLQ $13,CX,R8
|
||||
ANDQ SI,CX
|
||||
SHLQ $13,R10:R9
|
||||
SHLQ $13,R9,R10
|
||||
ANDQ SI,R9
|
||||
ADDQ R8,R9
|
||||
SHLQ $13,R12:R11
|
||||
SHLQ $13,R11,R12
|
||||
ANDQ SI,R11
|
||||
ADDQ R10,R11
|
||||
SHLQ $13,R14:R13
|
||||
SHLQ $13,R13,R14
|
||||
ANDQ SI,R13
|
||||
ADDQ R12,R13
|
||||
SHLQ $13,BX:R15
|
||||
SHLQ $13,R15,BX
|
||||
ANDQ SI,R15
|
||||
ADDQ R14,R15
|
||||
IMUL3Q $19,BX,DX
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// In Go 1.13, the ed25519 package was promoted to the standard library as
|
||||
// crypto/ed25519, and this package became a wrapper for the standard library one.
|
||||
//
|
||||
// +build !go1.13
|
||||
|
||||
// Package ed25519 implements the Ed25519 signature algorithm. See
|
||||
// https://ed25519.cr.yp.to/.
|
||||
//
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
// 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 go1.13
|
||||
|
||||
// Package ed25519 implements the Ed25519 signature algorithm. See
|
||||
// https://ed25519.cr.yp.to/.
|
||||
//
|
||||
// These functions are also compatible with the “Ed25519” function defined in
|
||||
// RFC 8032. However, unlike RFC 8032's formulation, this package's private key
|
||||
// representation includes a public key suffix to make multiple signing
|
||||
// operations with the same key more efficient. This package refers to the RFC
|
||||
// 8032 private key as the “seed”.
|
||||
//
|
||||
// Beginning with Go 1.13, the functionality of this package was moved to the
|
||||
// standard library as crypto/ed25519. This package only acts as a compatibility
|
||||
// wrapper.
|
||||
package ed25519
|
||||
|
||||
import (
|
||||
"crypto/ed25519"
|
||||
"io"
|
||||
)
|
||||
|
||||
const (
|
||||
// PublicKeySize is the size, in bytes, of public keys as used in this package.
|
||||
PublicKeySize = 32
|
||||
// PrivateKeySize is the size, in bytes, of private keys as used in this package.
|
||||
PrivateKeySize = 64
|
||||
// SignatureSize is the size, in bytes, of signatures generated and verified by this package.
|
||||
SignatureSize = 64
|
||||
// SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
|
||||
SeedSize = 32
|
||||
)
|
||||
|
||||
// PublicKey is the type of Ed25519 public keys.
|
||||
//
|
||||
// This type is an alias for crypto/ed25519's PublicKey type.
|
||||
// See the crypto/ed25519 package for the methods on this type.
|
||||
type PublicKey = ed25519.PublicKey
|
||||
|
||||
// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
|
||||
//
|
||||
// This type is an alias for crypto/ed25519's PrivateKey type.
|
||||
// See the crypto/ed25519 package for the methods on this type.
|
||||
type PrivateKey = ed25519.PrivateKey
|
||||
|
||||
// GenerateKey generates a public/private key pair using entropy from rand.
|
||||
// If rand is nil, crypto/rand.Reader will be used.
|
||||
func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
|
||||
return ed25519.GenerateKey(rand)
|
||||
}
|
||||
|
||||
// NewKeyFromSeed calculates a private key from a seed. It will panic if
|
||||
// len(seed) is not SeedSize. This function is provided for interoperability
|
||||
// with RFC 8032. RFC 8032's private keys correspond to seeds in this
|
||||
// package.
|
||||
func NewKeyFromSeed(seed []byte) PrivateKey {
|
||||
return ed25519.NewKeyFromSeed(seed)
|
||||
}
|
||||
|
||||
// Sign signs the message with privateKey and returns a signature. It will
|
||||
// panic if len(privateKey) is not PrivateKeySize.
|
||||
func Sign(privateKey PrivateKey, message []byte) []byte {
|
||||
return ed25519.Sign(privateKey, message)
|
||||
}
|
||||
|
||||
// Verify reports whether sig is a valid signature of message by publicKey. It
|
||||
// will panic if len(publicKey) is not PublicKeySize.
|
||||
func Verify(publicKey PublicKey, message, sig []byte) bool {
|
||||
return ed25519.Verify(publicKey, message, sig)
|
||||
}
|
|
@ -0,0 +1,668 @@
|
|||
// 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.
|
||||
|
||||
// Based on CRYPTOGAMS code with the following comment:
|
||||
// # ====================================================================
|
||||
// # Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
|
||||
// # project. The module is, however, dual licensed under OpenSSL and
|
||||
// # CRYPTOGAMS licenses depending on where you obtain it. For further
|
||||
// # details see http://www.openssl.org/~appro/cryptogams/.
|
||||
// # ====================================================================
|
||||
|
||||
// Original code can be found at the link below:
|
||||
// https://github.com/dot-asm/cryptogams/commit/a60f5b50ed908e91e5c39ca79126a4a876d5d8ff
|
||||
|
||||
// There are some differences between CRYPTOGAMS code and this one. The round
|
||||
// loop for "_int" isn't the same as the original. Some adjustments were
|
||||
// necessary because there are less vector registers available. For example, some
|
||||
// X variables (r12, r13, r14, and r15) share the same register used by the
|
||||
// counter. The original code uses ctr to name the counter. Here we use CNT
|
||||
// because golang uses CTR as the counter register name.
|
||||
|
||||
// +build ppc64le,!gccgo,!appengine
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
#define OUT R3
|
||||
#define INP R4
|
||||
#define LEN R5
|
||||
#define KEY R6
|
||||
#define CNT R7
|
||||
|
||||
#define TEMP R8
|
||||
|
||||
#define X0 R11
|
||||
#define X1 R12
|
||||
#define X2 R14
|
||||
#define X3 R15
|
||||
#define X4 R16
|
||||
#define X5 R17
|
||||
#define X6 R18
|
||||
#define X7 R19
|
||||
#define X8 R20
|
||||
#define X9 R21
|
||||
#define X10 R22
|
||||
#define X11 R23
|
||||
#define X12 R24
|
||||
#define X13 R25
|
||||
#define X14 R26
|
||||
#define X15 R27
|
||||
|
||||
#define CON0 X0
|
||||
#define CON1 X1
|
||||
#define CON2 X2
|
||||
#define CON3 X3
|
||||
|
||||
#define KEY0 X4
|
||||
#define KEY1 X5
|
||||
#define KEY2 X6
|
||||
#define KEY3 X7
|
||||
#define KEY4 X8
|
||||
#define KEY5 X9
|
||||
#define KEY6 X10
|
||||
#define KEY7 X11
|
||||
|
||||
#define CNT0 X12
|
||||
#define CNT1 X13
|
||||
#define CNT2 X14
|
||||
#define CNT3 X15
|
||||
|
||||
#define TMP0 R9
|
||||
#define TMP1 R10
|
||||
#define TMP2 R28
|
||||
#define TMP3 R29
|
||||
|
||||
#define CONSTS R8
|
||||
|
||||
#define A0 V0
|
||||
#define B0 V1
|
||||
#define C0 V2
|
||||
#define D0 V3
|
||||
#define A1 V4
|
||||
#define B1 V5
|
||||
#define C1 V6
|
||||
#define D1 V7
|
||||
#define A2 V8
|
||||
#define B2 V9
|
||||
#define C2 V10
|
||||
#define D2 V11
|
||||
#define T0 V12
|
||||
#define T1 V13
|
||||
#define T2 V14
|
||||
|
||||
#define K0 V15
|
||||
#define K1 V16
|
||||
#define K2 V17
|
||||
#define K3 V18
|
||||
#define K4 V19
|
||||
#define K5 V20
|
||||
|
||||
#define FOUR V21
|
||||
#define SIXTEEN V22
|
||||
#define TWENTY4 V23
|
||||
#define TWENTY V24
|
||||
#define TWELVE V25
|
||||
#define TWENTY5 V26
|
||||
#define SEVEN V27
|
||||
|
||||
#define INPPERM V28
|
||||
#define OUTPERM V29
|
||||
#define OUTMASK V30
|
||||
|
||||
#define DD0 V31
|
||||
#define DD1 SEVEN
|
||||
#define DD2 T0
|
||||
#define DD3 T1
|
||||
#define DD4 T2
|
||||
|
||||
DATA ·consts+0x00(SB)/8, $0x3320646e61707865
|
||||
DATA ·consts+0x08(SB)/8, $0x6b20657479622d32
|
||||
DATA ·consts+0x10(SB)/8, $0x0000000000000001
|
||||
DATA ·consts+0x18(SB)/8, $0x0000000000000000
|
||||
DATA ·consts+0x20(SB)/8, $0x0000000000000004
|
||||
DATA ·consts+0x28(SB)/8, $0x0000000000000000
|
||||
DATA ·consts+0x30(SB)/8, $0x0a0b08090e0f0c0d
|
||||
DATA ·consts+0x38(SB)/8, $0x0203000106070405
|
||||
DATA ·consts+0x40(SB)/8, $0x090a0b080d0e0f0c
|
||||
DATA ·consts+0x48(SB)/8, $0x0102030005060704
|
||||
GLOBL ·consts(SB), RODATA, $80
|
||||
|
||||
//func chaCha20_ctr32_vmx(out, inp *byte, len int, key *[32]byte, counter *[16]byte)
|
||||
TEXT ·chaCha20_ctr32_vmx(SB),NOSPLIT|NOFRAME,$0
|
||||
// Load the arguments inside the registers
|
||||
MOVD out+0(FP), OUT
|
||||
MOVD inp+8(FP), INP
|
||||
MOVD len+16(FP), LEN
|
||||
MOVD key+24(FP), KEY
|
||||
MOVD counter+32(FP), CNT
|
||||
|
||||
MOVD $·consts(SB), CONSTS // point to consts addr
|
||||
|
||||
MOVD $16, X0
|
||||
MOVD $32, X1
|
||||
MOVD $48, X2
|
||||
MOVD $64, X3
|
||||
MOVD $31, X4
|
||||
MOVD $15, X5
|
||||
|
||||
// Load key
|
||||
LVX (KEY)(R0), K1
|
||||
LVSR (KEY)(R0), T0
|
||||
LVX (KEY)(X0), K2
|
||||
LVX (KEY)(X4), DD0
|
||||
|
||||
// Load counter
|
||||
LVX (CNT)(R0), K3
|
||||
LVSR (CNT)(R0), T1
|
||||
LVX (CNT)(X5), DD1
|
||||
|
||||
// Load constants
|
||||
LVX (CONSTS)(R0), K0
|
||||
LVX (CONSTS)(X0), K5
|
||||
LVX (CONSTS)(X1), FOUR
|
||||
LVX (CONSTS)(X2), SIXTEEN
|
||||
LVX (CONSTS)(X3), TWENTY4
|
||||
|
||||
// Align key and counter
|
||||
VPERM K2, K1, T0, K1
|
||||
VPERM DD0, K2, T0, K2
|
||||
VPERM DD1, K3, T1, K3
|
||||
|
||||
// Load counter to GPR
|
||||
MOVWZ 0(CNT), CNT0
|
||||
MOVWZ 4(CNT), CNT1
|
||||
MOVWZ 8(CNT), CNT2
|
||||
MOVWZ 12(CNT), CNT3
|
||||
|
||||
// Adjust vectors for the initial state
|
||||
VADDUWM K3, K5, K3
|
||||
VADDUWM K3, K5, K4
|
||||
VADDUWM K4, K5, K5
|
||||
|
||||
// Synthesized constants
|
||||
VSPLTISW $-12, TWENTY
|
||||
VSPLTISW $12, TWELVE
|
||||
VSPLTISW $-7, TWENTY5
|
||||
|
||||
VXOR T0, T0, T0
|
||||
VSPLTISW $-1, OUTMASK
|
||||
LVSR (INP)(R0), INPPERM
|
||||
LVSL (OUT)(R0), OUTPERM
|
||||
VPERM OUTMASK, T0, OUTPERM, OUTMASK
|
||||
|
||||
loop_outer_vmx:
|
||||
// Load constant
|
||||
MOVD $0x61707865, CON0
|
||||
MOVD $0x3320646e, CON1
|
||||
MOVD $0x79622d32, CON2
|
||||
MOVD $0x6b206574, CON3
|
||||
|
||||
VOR K0, K0, A0
|
||||
VOR K0, K0, A1
|
||||
VOR K0, K0, A2
|
||||
VOR K1, K1, B0
|
||||
|
||||
MOVD $10, TEMP
|
||||
|
||||
// Load key to GPR
|
||||
MOVWZ 0(KEY), X4
|
||||
MOVWZ 4(KEY), X5
|
||||
MOVWZ 8(KEY), X6
|
||||
MOVWZ 12(KEY), X7
|
||||
VOR K1, K1, B1
|
||||
VOR K1, K1, B2
|
||||
MOVWZ 16(KEY), X8
|
||||
MOVWZ 0(CNT), X12
|
||||
MOVWZ 20(KEY), X9
|
||||
MOVWZ 4(CNT), X13
|
||||
VOR K2, K2, C0
|
||||
VOR K2, K2, C1
|
||||
MOVWZ 24(KEY), X10
|
||||
MOVWZ 8(CNT), X14
|
||||
VOR K2, K2, C2
|
||||
VOR K3, K3, D0
|
||||
MOVWZ 28(KEY), X11
|
||||
MOVWZ 12(CNT), X15
|
||||
VOR K4, K4, D1
|
||||
VOR K5, K5, D2
|
||||
|
||||
MOVD X4, TMP0
|
||||
MOVD X5, TMP1
|
||||
MOVD X6, TMP2
|
||||
MOVD X7, TMP3
|
||||
VSPLTISW $7, SEVEN
|
||||
|
||||
MOVD TEMP, CTR
|
||||
|
||||
loop_vmx:
|
||||
// CRYPTOGAMS uses a macro to create a loop using perl. This isn't possible
|
||||
// using assembly macros. Therefore, the macro expansion result was used
|
||||
// in order to maintain the algorithm efficiency.
|
||||
// This loop generates three keystream blocks using VMX instructions and,
|
||||
// in parallel, one keystream block using scalar instructions.
|
||||
ADD X4, X0, X0
|
||||
ADD X5, X1, X1
|
||||
VADDUWM A0, B0, A0
|
||||
VADDUWM A1, B1, A1
|
||||
ADD X6, X2, X2
|
||||
ADD X7, X3, X3
|
||||
VADDUWM A2, B2, A2
|
||||
VXOR D0, A0, D0
|
||||
XOR X0, X12, X12
|
||||
XOR X1, X13, X13
|
||||
VXOR D1, A1, D1
|
||||
VXOR D2, A2, D2
|
||||
XOR X2, X14, X14
|
||||
XOR X3, X15, X15
|
||||
VPERM D0, D0, SIXTEEN, D0
|
||||
VPERM D1, D1, SIXTEEN, D1
|
||||
ROTLW $16, X12, X12
|
||||
ROTLW $16, X13, X13
|
||||
VPERM D2, D2, SIXTEEN, D2
|
||||
VADDUWM C0, D0, C0
|
||||
ROTLW $16, X14, X14
|
||||
ROTLW $16, X15, X15
|
||||
VADDUWM C1, D1, C1
|
||||
VADDUWM C2, D2, C2
|
||||
ADD X12, X8, X8
|
||||
ADD X13, X9, X9
|
||||
VXOR B0, C0, T0
|
||||
VXOR B1, C1, T1
|
||||
ADD X14, X10, X10
|
||||
ADD X15, X11, X11
|
||||
VXOR B2, C2, T2
|
||||
VRLW T0, TWELVE, B0
|
||||
XOR X8, X4, X4
|
||||
XOR X9, X5, X5
|
||||
VRLW T1, TWELVE, B1
|
||||
VRLW T2, TWELVE, B2
|
||||
XOR X10, X6, X6
|
||||
XOR X11, X7, X7
|
||||
VADDUWM A0, B0, A0
|
||||
VADDUWM A1, B1, A1
|
||||
ROTLW $12, X4, X4
|
||||
ROTLW $12, X5, X5
|
||||
VADDUWM A2, B2, A2
|
||||
VXOR D0, A0, D0
|
||||
ROTLW $12, X6, X6
|
||||
ROTLW $12, X7, X7
|
||||
VXOR D1, A1, D1
|
||||
VXOR D2, A2, D2
|
||||
ADD X4, X0, X0
|
||||
ADD X5, X1, X1
|
||||
VPERM D0, D0, TWENTY4, D0
|
||||
VPERM D1, D1, TWENTY4, D1
|
||||
ADD X6, X2, X2
|
||||
ADD X7, X3, X3
|
||||
VPERM D2, D2, TWENTY4, D2
|
||||
VADDUWM C0, D0, C0
|
||||
XOR X0, X12, X12
|
||||
XOR X1, X13, X13
|
||||
VADDUWM C1, D1, C1
|
||||
VADDUWM C2, D2, C2
|
||||
XOR X2, X14, X14
|
||||
XOR X3, X15, X15
|
||||
VXOR B0, C0, T0
|
||||
VXOR B1, C1, T1
|
||||
ROTLW $8, X12, X12
|
||||
ROTLW $8, X13, X13
|
||||
VXOR B2, C2, T2
|
||||
VRLW T0, SEVEN, B0
|
||||
ROTLW $8, X14, X14
|
||||
ROTLW $8, X15, X15
|
||||
VRLW T1, SEVEN, B1
|
||||
VRLW T2, SEVEN, B2
|
||||
ADD X12, X8, X8
|
||||
ADD X13, X9, X9
|
||||
VSLDOI $8, C0, C0, C0
|
||||
VSLDOI $8, C1, C1, C1
|
||||
ADD X14, X10, X10
|
||||
ADD X15, X11, X11
|
||||
VSLDOI $8, C2, C2, C2
|
||||
VSLDOI $12, B0, B0, B0
|
||||
XOR X8, X4, X4
|
||||
XOR X9, X5, X5
|
||||
VSLDOI $12, B1, B1, B1
|
||||
VSLDOI $12, B2, B2, B2
|
||||
XOR X10, X6, X6
|
||||
XOR X11, X7, X7
|
||||
VSLDOI $4, D0, D0, D0
|
||||
VSLDOI $4, D1, D1, D1
|
||||
ROTLW $7, X4, X4
|
||||
ROTLW $7, X5, X5
|
||||
VSLDOI $4, D2, D2, D2
|
||||
VADDUWM A0, B0, A0
|
||||
ROTLW $7, X6, X6
|
||||
ROTLW $7, X7, X7
|
||||
VADDUWM A1, B1, A1
|
||||
VADDUWM A2, B2, A2
|
||||
ADD X5, X0, X0
|
||||
ADD X6, X1, X1
|
||||
VXOR D0, A0, D0
|
||||
VXOR D1, A1, D1
|
||||
ADD X7, X2, X2
|
||||
ADD X4, X3, X3
|
||||
VXOR D2, A2, D2
|
||||
VPERM D0, D0, SIXTEEN, D0
|
||||
XOR X0, X15, X15
|
||||
XOR X1, X12, X12
|
||||
VPERM D1, D1, SIXTEEN, D1
|
||||
VPERM D2, D2, SIXTEEN, D2
|
||||
XOR X2, X13, X13
|
||||
XOR X3, X14, X14
|
||||
VADDUWM C0, D0, C0
|
||||
VADDUWM C1, D1, C1
|
||||
ROTLW $16, X15, X15
|
||||
ROTLW $16, X12, X12
|
||||
VADDUWM C2, D2, C2
|
||||
VXOR B0, C0, T0
|
||||
ROTLW $16, X13, X13
|
||||
ROTLW $16, X14, X14
|
||||
VXOR B1, C1, T1
|
||||
VXOR B2, C2, T2
|
||||
ADD X15, X10, X10
|
||||
ADD X12, X11, X11
|
||||
VRLW T0, TWELVE, B0
|
||||
VRLW T1, TWELVE, B1
|
||||
ADD X13, X8, X8
|
||||
ADD X14, X9, X9
|
||||
VRLW T2, TWELVE, B2
|
||||
VADDUWM A0, B0, A0
|
||||
XOR X10, X5, X5
|
||||
XOR X11, X6, X6
|
||||
VADDUWM A1, B1, A1
|
||||
VADDUWM A2, B2, A2
|
||||
XOR X8, X7, X7
|
||||
XOR X9, X4, X4
|
||||
VXOR D0, A0, D0
|
||||
VXOR D1, A1, D1
|
||||
ROTLW $12, X5, X5
|
||||
ROTLW $12, X6, X6
|
||||
VXOR D2, A2, D2
|
||||
VPERM D0, D0, TWENTY4, D0
|
||||
ROTLW $12, X7, X7
|
||||
ROTLW $12, X4, X4
|
||||
VPERM D1, D1, TWENTY4, D1
|
||||
VPERM D2, D2, TWENTY4, D2
|
||||
ADD X5, X0, X0
|
||||
ADD X6, X1, X1
|
||||
VADDUWM C0, D0, C0
|
||||
VADDUWM C1, D1, C1
|
||||
ADD X7, X2, X2
|
||||
ADD X4, X3, X3
|
||||
VADDUWM C2, D2, C2
|
||||
VXOR B0, C0, T0
|
||||
XOR X0, X15, X15
|
||||
XOR X1, X12, X12
|
||||
VXOR B1, C1, T1
|
||||
VXOR B2, C2, T2
|
||||
XOR X2, X13, X13
|
||||
XOR X3, X14, X14
|
||||
VRLW T0, SEVEN, B0
|
||||
VRLW T1, SEVEN, B1
|
||||
ROTLW $8, X15, X15
|
||||
ROTLW $8, X12, X12
|
||||
VRLW T2, SEVEN, B2
|
||||
VSLDOI $8, C0, C0, C0
|
||||
ROTLW $8, X13, X13
|
||||
ROTLW $8, X14, X14
|
||||
VSLDOI $8, C1, C1, C1
|
||||
VSLDOI $8, C2, C2, C2
|
||||
ADD X15, X10, X10
|
||||
ADD X12, X11, X11
|
||||
VSLDOI $4, B0, B0, B0
|
||||
VSLDOI $4, B1, B1, B1
|
||||
ADD X13, X8, X8
|
||||
ADD X14, X9, X9
|
||||
VSLDOI $4, B2, B2, B2
|
||||
VSLDOI $12, D0, D0, D0
|
||||
XOR X10, X5, X5
|
||||
XOR X11, X6, X6
|
||||
VSLDOI $12, D1, D1, D1
|
||||
VSLDOI $12, D2, D2, D2
|
||||
XOR X8, X7, X7
|
||||
XOR X9, X4, X4
|
||||
ROTLW $7, X5, X5
|
||||
ROTLW $7, X6, X6
|
||||
ROTLW $7, X7, X7
|
||||
ROTLW $7, X4, X4
|
||||
BC 0x10, 0, loop_vmx
|
||||
|
||||
SUB $256, LEN, LEN
|
||||
|
||||
// Accumulate key block
|
||||
ADD $0x61707865, X0, X0
|
||||
ADD $0x3320646e, X1, X1
|
||||
ADD $0x79622d32, X2, X2
|
||||
ADD $0x6b206574, X3, X3
|
||||
ADD TMP0, X4, X4
|
||||
ADD TMP1, X5, X5
|
||||
ADD TMP2, X6, X6
|
||||
ADD TMP3, X7, X7
|
||||
MOVWZ 16(KEY), TMP0
|
||||
MOVWZ 20(KEY), TMP1
|
||||
MOVWZ 24(KEY), TMP2
|
||||
MOVWZ 28(KEY), TMP3
|
||||
ADD TMP0, X8, X8
|
||||
ADD TMP1, X9, X9
|
||||
ADD TMP2, X10, X10
|
||||
ADD TMP3, X11, X11
|
||||
|
||||
MOVWZ 12(CNT), TMP0
|
||||
MOVWZ 8(CNT), TMP1
|
||||
MOVWZ 4(CNT), TMP2
|
||||
MOVWZ 0(CNT), TEMP
|
||||
ADD TMP0, X15, X15
|
||||
ADD TMP1, X14, X14
|
||||
ADD TMP2, X13, X13
|
||||
ADD TEMP, X12, X12
|
||||
|
||||
// Accumulate key block
|
||||
VADDUWM A0, K0, A0
|
||||
VADDUWM A1, K0, A1
|
||||
VADDUWM A2, K0, A2
|
||||
VADDUWM B0, K1, B0
|
||||
VADDUWM B1, K1, B1
|
||||
VADDUWM B2, K1, B2
|
||||
VADDUWM C0, K2, C0
|
||||
VADDUWM C1, K2, C1
|
||||
VADDUWM C2, K2, C2
|
||||
VADDUWM D0, K3, D0
|
||||
VADDUWM D1, K4, D1
|
||||
VADDUWM D2, K5, D2
|
||||
|
||||
// Increment counter
|
||||
ADD $4, TEMP, TEMP
|
||||
MOVW TEMP, 0(CNT)
|
||||
|
||||
VADDUWM K3, FOUR, K3
|
||||
VADDUWM K4, FOUR, K4
|
||||
VADDUWM K5, FOUR, K5
|
||||
|
||||
// XOR the input slice (INP) with the keystream, which is stored in GPRs (X0-X3).
|
||||
|
||||
// Load input (aligned or not)
|
||||
MOVWZ 0(INP), TMP0
|
||||
MOVWZ 4(INP), TMP1
|
||||
MOVWZ 8(INP), TMP2
|
||||
MOVWZ 12(INP), TMP3
|
||||
|
||||
// XOR with input
|
||||
XOR TMP0, X0, X0
|
||||
XOR TMP1, X1, X1
|
||||
XOR TMP2, X2, X2
|
||||
XOR TMP3, X3, X3
|
||||
MOVWZ 16(INP), TMP0
|
||||
MOVWZ 20(INP), TMP1
|
||||
MOVWZ 24(INP), TMP2
|
||||
MOVWZ 28(INP), TMP3
|
||||
XOR TMP0, X4, X4
|
||||
XOR TMP1, X5, X5
|
||||
XOR TMP2, X6, X6
|
||||
XOR TMP3, X7, X7
|
||||
MOVWZ 32(INP), TMP0
|
||||
MOVWZ 36(INP), TMP1
|
||||
MOVWZ 40(INP), TMP2
|
||||
MOVWZ 44(INP), TMP3
|
||||
XOR TMP0, X8, X8
|
||||
XOR TMP1, X9, X9
|
||||
XOR TMP2, X10, X10
|
||||
XOR TMP3, X11, X11
|
||||
MOVWZ 48(INP), TMP0
|
||||
MOVWZ 52(INP), TMP1
|
||||
MOVWZ 56(INP), TMP2
|
||||
MOVWZ 60(INP), TMP3
|
||||
XOR TMP0, X12, X12
|
||||
XOR TMP1, X13, X13
|
||||
XOR TMP2, X14, X14
|
||||
XOR TMP3, X15, X15
|
||||
|
||||
// Store output (aligned or not)
|
||||
MOVW X0, 0(OUT)
|
||||
MOVW X1, 4(OUT)
|
||||
MOVW X2, 8(OUT)
|
||||
MOVW X3, 12(OUT)
|
||||
|
||||
ADD $64, INP, INP // INP points to the end of the slice for the alignment code below
|
||||
|
||||
MOVW X4, 16(OUT)
|
||||
MOVD $16, TMP0
|
||||
MOVW X5, 20(OUT)
|
||||
MOVD $32, TMP1
|
||||
MOVW X6, 24(OUT)
|
||||
MOVD $48, TMP2
|
||||
MOVW X7, 28(OUT)
|
||||
MOVD $64, TMP3
|
||||
MOVW X8, 32(OUT)
|
||||
MOVW X9, 36(OUT)
|
||||
MOVW X10, 40(OUT)
|
||||
MOVW X11, 44(OUT)
|
||||
MOVW X12, 48(OUT)
|
||||
MOVW X13, 52(OUT)
|
||||
MOVW X14, 56(OUT)
|
||||
MOVW X15, 60(OUT)
|
||||
ADD $64, OUT, OUT
|
||||
|
||||
// Load input
|
||||
LVX (INP)(R0), DD0
|
||||
LVX (INP)(TMP0), DD1
|
||||
LVX (INP)(TMP1), DD2
|
||||
LVX (INP)(TMP2), DD3
|
||||
LVX (INP)(TMP3), DD4
|
||||
ADD $64, INP, INP
|
||||
|
||||
VPERM DD1, DD0, INPPERM, DD0 // Align input
|
||||
VPERM DD2, DD1, INPPERM, DD1
|
||||
VPERM DD3, DD2, INPPERM, DD2
|
||||
VPERM DD4, DD3, INPPERM, DD3
|
||||
VXOR A0, DD0, A0 // XOR with input
|
||||
VXOR B0, DD1, B0
|
||||
LVX (INP)(TMP0), DD1 // Keep loading input
|
||||
VXOR C0, DD2, C0
|
||||
LVX (INP)(TMP1), DD2
|
||||
VXOR D0, DD3, D0
|
||||
LVX (INP)(TMP2), DD3
|
||||
LVX (INP)(TMP3), DD0
|
||||
ADD $64, INP, INP
|
||||
MOVD $63, TMP3 // 63 is not a typo
|
||||
VPERM A0, A0, OUTPERM, A0
|
||||
VPERM B0, B0, OUTPERM, B0
|
||||
VPERM C0, C0, OUTPERM, C0
|
||||
VPERM D0, D0, OUTPERM, D0
|
||||
|
||||
VPERM DD1, DD4, INPPERM, DD4 // Align input
|
||||
VPERM DD2, DD1, INPPERM, DD1
|
||||
VPERM DD3, DD2, INPPERM, DD2
|
||||
VPERM DD0, DD3, INPPERM, DD3
|
||||
VXOR A1, DD4, A1
|
||||
VXOR B1, DD1, B1
|
||||
LVX (INP)(TMP0), DD1 // Keep loading
|
||||
VXOR C1, DD2, C1
|
||||
LVX (INP)(TMP1), DD2
|
||||
VXOR D1, DD3, D1
|
||||
LVX (INP)(TMP2), DD3
|
||||
|
||||
// Note that the LVX address is always rounded down to the nearest 16-byte
|
||||
// boundary, and that it always points to at most 15 bytes beyond the end of
|
||||
// the slice, so we cannot cross a page boundary.
|
||||
LVX (INP)(TMP3), DD4 // Redundant in aligned case.
|
||||
ADD $64, INP, INP
|
||||
VPERM A1, A1, OUTPERM, A1 // Pre-misalign output
|
||||
VPERM B1, B1, OUTPERM, B1
|
||||
VPERM C1, C1, OUTPERM, C1
|
||||
VPERM D1, D1, OUTPERM, D1
|
||||
|
||||
VPERM DD1, DD0, INPPERM, DD0 // Align Input
|
||||
VPERM DD2, DD1, INPPERM, DD1
|
||||
VPERM DD3, DD2, INPPERM, DD2
|
||||
VPERM DD4, DD3, INPPERM, DD3
|
||||
VXOR A2, DD0, A2
|
||||
VXOR B2, DD1, B2
|
||||
VXOR C2, DD2, C2
|
||||
VXOR D2, DD3, D2
|
||||
VPERM A2, A2, OUTPERM, A2
|
||||
VPERM B2, B2, OUTPERM, B2
|
||||
VPERM C2, C2, OUTPERM, C2
|
||||
VPERM D2, D2, OUTPERM, D2
|
||||
|
||||
ANDCC $15, OUT, X1 // Is out aligned?
|
||||
MOVD OUT, X0
|
||||
|
||||
VSEL A0, B0, OUTMASK, DD0 // Collect pre-misaligned output
|
||||
VSEL B0, C0, OUTMASK, DD1
|
||||
VSEL C0, D0, OUTMASK, DD2
|
||||
VSEL D0, A1, OUTMASK, DD3
|
||||
VSEL A1, B1, OUTMASK, B0
|
||||
VSEL B1, C1, OUTMASK, C0
|
||||
VSEL C1, D1, OUTMASK, D0
|
||||
VSEL D1, A2, OUTMASK, A1
|
||||
VSEL A2, B2, OUTMASK, B1
|
||||
VSEL B2, C2, OUTMASK, C1
|
||||
VSEL C2, D2, OUTMASK, D1
|
||||
|
||||
STVX DD0, (OUT+TMP0)
|
||||
STVX DD1, (OUT+TMP1)
|
||||
STVX DD2, (OUT+TMP2)
|
||||
ADD $64, OUT, OUT
|
||||
STVX DD3, (OUT+R0)
|
||||
STVX B0, (OUT+TMP0)
|
||||
STVX C0, (OUT+TMP1)
|
||||
STVX D0, (OUT+TMP2)
|
||||
ADD $64, OUT, OUT
|
||||
STVX A1, (OUT+R0)
|
||||
STVX B1, (OUT+TMP0)
|
||||
STVX C1, (OUT+TMP1)
|
||||
STVX D1, (OUT+TMP2)
|
||||
ADD $64, OUT, OUT
|
||||
|
||||
BEQ aligned_vmx
|
||||
|
||||
SUB X1, OUT, X2 // in misaligned case edges
|
||||
MOVD $0, X3 // are written byte-by-byte
|
||||
|
||||
unaligned_tail_vmx:
|
||||
STVEBX D2, (X2+X3)
|
||||
ADD $1, X3, X3
|
||||
CMPW X3, X1
|
||||
BNE unaligned_tail_vmx
|
||||
SUB X1, X0, X2
|
||||
|
||||
unaligned_head_vmx:
|
||||
STVEBX A0, (X2+X1)
|
||||
CMPW X1, $15
|
||||
ADD $1, X1, X1
|
||||
BNE unaligned_head_vmx
|
||||
|
||||
CMPU LEN, $255 // done with 256-byte block yet?
|
||||
BGT loop_outer_vmx
|
||||
|
||||
JMP done_vmx
|
||||
|
||||
aligned_vmx:
|
||||
STVX A0, (X0+R0)
|
||||
CMPU LEN, $255 // done with 256-byte block yet?
|
||||
BGT loop_outer_vmx
|
||||
|
||||
done_vmx:
|
||||
RET
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !arm64,!s390x arm64,!go1.11 gccgo appengine
|
||||
// +build !ppc64le,!arm64,!s390x arm64,!go1.11 gccgo appengine
|
||||
|
||||
package chacha20
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
// 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 ppc64le,!gccgo,!appengine
|
||||
|
||||
package chacha20
|
||||
|
||||
import "encoding/binary"
|
||||
|
||||
const (
|
||||
bufSize = 256
|
||||
haveAsm = true
|
||||
)
|
||||
|
||||
//go:noescape
|
||||
func chaCha20_ctr32_vmx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
|
||||
|
||||
func (c *Cipher) xorKeyStreamAsm(dst, src []byte) {
|
||||
if len(src) >= bufSize {
|
||||
chaCha20_ctr32_vmx(&dst[0], &src[0], len(src)-len(src)%bufSize, &c.key, &c.counter)
|
||||
}
|
||||
if len(src)%bufSize != 0 {
|
||||
chaCha20_ctr32_vmx(&c.buf[0], &c.buf[0], bufSize, &c.key, &c.counter)
|
||||
start := len(src) - len(src)%bufSize
|
||||
ts, td, tb := src[start:], dst[start:], c.buf[:]
|
||||
// Unroll loop to XOR 32 bytes per iteration.
|
||||
for i := 0; i < len(ts)-32; i += 32 {
|
||||
td, tb = td[:len(ts)], tb[:len(ts)] // bounds check elimination
|
||||
s0 := binary.LittleEndian.Uint64(ts[0:8])
|
||||
s1 := binary.LittleEndian.Uint64(ts[8:16])
|
||||
s2 := binary.LittleEndian.Uint64(ts[16:24])
|
||||
s3 := binary.LittleEndian.Uint64(ts[24:32])
|
||||
b0 := binary.LittleEndian.Uint64(tb[0:8])
|
||||
b1 := binary.LittleEndian.Uint64(tb[8:16])
|
||||
b2 := binary.LittleEndian.Uint64(tb[16:24])
|
||||
b3 := binary.LittleEndian.Uint64(tb[24:32])
|
||||
binary.LittleEndian.PutUint64(td[0:8], s0^b0)
|
||||
binary.LittleEndian.PutUint64(td[8:16], s1^b1)
|
||||
binary.LittleEndian.PutUint64(td[16:24], s2^b2)
|
||||
binary.LittleEndian.PutUint64(td[24:32], s3^b3)
|
||||
ts, td, tb = ts[32:], td[32:], tb[32:]
|
||||
}
|
||||
td, tb = td[:len(ts)], tb[:len(ts)] // bounds check elimination
|
||||
for i, v := range ts {
|
||||
td[i] = tb[i] ^ v
|
||||
}
|
||||
c.len = bufSize - (len(src) % bufSize)
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !amd64 gccgo appengine
|
||||
// +build !amd64,!ppc64le gccgo appengine
|
||||
|
||||
package poly1305
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build s390x,!go1.11 !arm,!amd64,!s390x gccgo appengine nacl
|
||||
// +build s390x,!go1.11 !arm,!amd64,!s390x,!ppc64le gccgo appengine nacl
|
||||
|
||||
package poly1305
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
// 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 ppc64le,!gccgo,!appengine
|
||||
|
||||
package poly1305
|
||||
|
||||
//go:noescape
|
||||
func initialize(state *[7]uint64, key *[32]byte)
|
||||
|
||||
//go:noescape
|
||||
func update(state *[7]uint64, msg []byte)
|
||||
|
||||
//go:noescape
|
||||
func finalize(tag *[TagSize]byte, state *[7]uint64)
|
||||
|
||||
// Sum generates an authenticator for m using a one-time key and puts the
|
||||
// 16-byte result into out. Authenticating two different messages with the same
|
||||
// key allows an attacker to forge messages at will.
|
||||
func Sum(out *[16]byte, m []byte, key *[32]byte) {
|
||||
h := newMAC(key)
|
||||
h.Write(m)
|
||||
h.Sum(out)
|
||||
}
|
||||
|
||||
func newMAC(key *[32]byte) (h mac) {
|
||||
initialize(&h.state, key)
|
||||
return
|
||||
}
|
||||
|
||||
type mac struct {
|
||||
state [7]uint64 // := uint64{ h0, h1, h2, r0, r1, pad0, pad1 }
|
||||
|
||||
buffer [TagSize]byte
|
||||
offset int
|
||||
}
|
||||
|
||||
func (h *mac) Write(p []byte) (n int, err error) {
|
||||
n = len(p)
|
||||
if h.offset > 0 {
|
||||
remaining := TagSize - h.offset
|
||||
if n < remaining {
|
||||
h.offset += copy(h.buffer[h.offset:], p)
|
||||
return n, nil
|
||||
}
|
||||
copy(h.buffer[h.offset:], p[:remaining])
|
||||
p = p[remaining:]
|
||||
h.offset = 0
|
||||
update(&h.state, h.buffer[:])
|
||||
}
|
||||
if nn := len(p) - (len(p) % TagSize); nn > 0 {
|
||||
update(&h.state, p[:nn])
|
||||
p = p[nn:]
|
||||
}
|
||||
if len(p) > 0 {
|
||||
h.offset += copy(h.buffer[h.offset:], p)
|
||||
}
|
||||
return n, nil
|
||||
}
|
||||
|
||||
func (h *mac) Sum(out *[16]byte) {
|
||||
state := h.state
|
||||
if h.offset > 0 {
|
||||
update(&state, h.buffer[:h.offset])
|
||||
}
|
||||
finalize(out, &state)
|
||||
}
|
|
@ -0,0 +1,247 @@
|
|||
// 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 ppc64le,!gccgo,!appengine
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// This was ported from the amd64 implementation.
|
||||
|
||||
#define POLY1305_ADD(msg, h0, h1, h2, t0, t1, t2) \
|
||||
MOVD (msg), t0; \
|
||||
MOVD 8(msg), t1; \
|
||||
MOVD $1, t2; \
|
||||
ADDC t0, h0, h0; \
|
||||
ADDE t1, h1, h1; \
|
||||
ADDE t2, h2; \
|
||||
ADD $16, msg
|
||||
|
||||
#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3, t4, t5) \
|
||||
MULLD r0, h0, t0; \
|
||||
MULLD r0, h1, t4; \
|
||||
MULHDU r0, h0, t1; \
|
||||
MULHDU r0, h1, t5; \
|
||||
ADDC t4, t1, t1; \
|
||||
MULLD r0, h2, t2; \
|
||||
ADDZE t5; \
|
||||
MULHDU r1, h0, t4; \
|
||||
MULLD r1, h0, h0; \
|
||||
ADD t5, t2, t2; \
|
||||
ADDC h0, t1, t1; \
|
||||
MULLD h2, r1, t3; \
|
||||
ADDZE t4, h0; \
|
||||
MULHDU r1, h1, t5; \
|
||||
MULLD r1, h1, t4; \
|
||||
ADDC t4, t2, t2; \
|
||||
ADDE t5, t3, t3; \
|
||||
ADDC h0, t2, t2; \
|
||||
MOVD $-4, t4; \
|
||||
MOVD t0, h0; \
|
||||
MOVD t1, h1; \
|
||||
ADDZE t3; \
|
||||
ANDCC $3, t2, h2; \
|
||||
AND t2, t4, t0; \
|
||||
ADDC t0, h0, h0; \
|
||||
ADDE t3, h1, h1; \
|
||||
SLD $62, t3, t4; \
|
||||
SRD $2, t2; \
|
||||
ADDZE h2; \
|
||||
OR t4, t2, t2; \
|
||||
SRD $2, t3; \
|
||||
ADDC t2, h0, h0; \
|
||||
ADDE t3, h1, h1; \
|
||||
ADDZE h2
|
||||
|
||||
DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF
|
||||
DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
|
||||
GLOBL ·poly1305Mask<>(SB), RODATA, $16
|
||||
|
||||
// func update(state *[7]uint64, msg []byte)
|
||||
|
||||
TEXT ·update(SB), $0-32
|
||||
MOVD state+0(FP), R3
|
||||
MOVD msg_base+8(FP), R4
|
||||
MOVD msg_len+16(FP), R5
|
||||
|
||||
MOVD 0(R3), R8 // h0
|
||||
MOVD 8(R3), R9 // h1
|
||||
MOVD 16(R3), R10 // h2
|
||||
MOVD 24(R3), R11 // r0
|
||||
MOVD 32(R3), R12 // r1
|
||||
|
||||
CMP R5, $16
|
||||
BLT bytes_between_0_and_15
|
||||
|
||||
loop:
|
||||
POLY1305_ADD(R4, R8, R9, R10, R20, R21, R22)
|
||||
|
||||
multiply:
|
||||
POLY1305_MUL(R8, R9, R10, R11, R12, R16, R17, R18, R14, R20, R21)
|
||||
ADD $-16, R5
|
||||
CMP R5, $16
|
||||
BGE loop
|
||||
|
||||
bytes_between_0_and_15:
|
||||
CMP $0, R5
|
||||
BEQ done
|
||||
MOVD $0, R16 // h0
|
||||
MOVD $0, R17 // h1
|
||||
|
||||
flush_buffer:
|
||||
CMP R5, $8
|
||||
BLE just1
|
||||
|
||||
MOVD $8, R21
|
||||
SUB R21, R5, R21
|
||||
|
||||
// Greater than 8 -- load the rightmost remaining bytes in msg
|
||||
// and put into R17 (h1)
|
||||
MOVD (R4)(R21), R17
|
||||
MOVD $16, R22
|
||||
|
||||
// Find the offset to those bytes
|
||||
SUB R5, R22, R22
|
||||
SLD $3, R22
|
||||
|
||||
// Shift to get only the bytes in msg
|
||||
SRD R22, R17, R17
|
||||
|
||||
// Put 1 at high end
|
||||
MOVD $1, R23
|
||||
SLD $3, R21
|
||||
SLD R21, R23, R23
|
||||
OR R23, R17, R17
|
||||
|
||||
// Remainder is 8
|
||||
MOVD $8, R5
|
||||
|
||||
just1:
|
||||
CMP R5, $8
|
||||
BLT less8
|
||||
|
||||
// Exactly 8
|
||||
MOVD (R4), R16
|
||||
|
||||
CMP $0, R17
|
||||
|
||||
// Check if we've already set R17; if not
|
||||
// set 1 to indicate end of msg.
|
||||
BNE carry
|
||||
MOVD $1, R17
|
||||
BR carry
|
||||
|
||||
less8:
|
||||
MOVD $0, R16 // h0
|
||||
MOVD $0, R22 // shift count
|
||||
CMP R5, $4
|
||||
BLT less4
|
||||
MOVWZ (R4), R16
|
||||
ADD $4, R4
|
||||
ADD $-4, R5
|
||||
MOVD $32, R22
|
||||
|
||||
less4:
|
||||
CMP R5, $2
|
||||
BLT less2
|
||||
MOVHZ (R4), R21
|
||||
SLD R22, R21, R21
|
||||
OR R16, R21, R16
|
||||
ADD $16, R22
|
||||
ADD $-2, R5
|
||||
ADD $2, R4
|
||||
|
||||
less2:
|
||||
CMP $0, R5
|
||||
BEQ insert1
|
||||
MOVBZ (R4), R21
|
||||
SLD R22, R21, R21
|
||||
OR R16, R21, R16
|
||||
ADD $8, R22
|
||||
|
||||
insert1:
|
||||
// Insert 1 at end of msg
|
||||
MOVD $1, R21
|
||||
SLD R22, R21, R21
|
||||
OR R16, R21, R16
|
||||
|
||||
carry:
|
||||
// Add new values to h0, h1, h2
|
||||
ADDC R16, R8
|
||||
ADDE R17, R9
|
||||
ADDE $0, R10
|
||||
MOVD $16, R5
|
||||
ADD R5, R4
|
||||
BR multiply
|
||||
|
||||
done:
|
||||
// Save h0, h1, h2 in state
|
||||
MOVD R8, 0(R3)
|
||||
MOVD R9, 8(R3)
|
||||
MOVD R10, 16(R3)
|
||||
RET
|
||||
|
||||
// func initialize(state *[7]uint64, key *[32]byte)
|
||||
TEXT ·initialize(SB), $0-16
|
||||
MOVD state+0(FP), R3
|
||||
MOVD key+8(FP), R4
|
||||
|
||||
// state[0...7] is initialized with zero
|
||||
// Load key
|
||||
MOVD 0(R4), R5
|
||||
MOVD 8(R4), R6
|
||||
MOVD 16(R4), R7
|
||||
MOVD 24(R4), R8
|
||||
|
||||
// Address of key mask
|
||||
MOVD $·poly1305Mask<>(SB), R9
|
||||
|
||||
// Save original key in state
|
||||
MOVD R7, 40(R3)
|
||||
MOVD R8, 48(R3)
|
||||
|
||||
// Get mask
|
||||
MOVD (R9), R7
|
||||
MOVD 8(R9), R8
|
||||
|
||||
// And with key
|
||||
AND R5, R7, R5
|
||||
AND R6, R8, R6
|
||||
|
||||
// Save masked key in state
|
||||
MOVD R5, 24(R3)
|
||||
MOVD R6, 32(R3)
|
||||
RET
|
||||
|
||||
// func finalize(tag *[TagSize]byte, state *[7]uint64)
|
||||
TEXT ·finalize(SB), $0-16
|
||||
MOVD tag+0(FP), R3
|
||||
MOVD state+8(FP), R4
|
||||
|
||||
// Get h0, h1, h2 from state
|
||||
MOVD 0(R4), R5
|
||||
MOVD 8(R4), R6
|
||||
MOVD 16(R4), R7
|
||||
|
||||
// Save h0, h1
|
||||
MOVD R5, R8
|
||||
MOVD R6, R9
|
||||
MOVD $3, R20
|
||||
MOVD $-1, R21
|
||||
SUBC $-5, R5
|
||||
SUBE R21, R6
|
||||
SUBE R20, R7
|
||||
MOVD $0, R21
|
||||
SUBZE R21
|
||||
|
||||
// Check for carry
|
||||
CMP $0, R21
|
||||
ISEL $2, R5, R8, R5
|
||||
ISEL $2, R6, R9, R6
|
||||
MOVD 40(R4), R8
|
||||
MOVD 48(R4), R9
|
||||
ADDC R8, R5
|
||||
ADDE R9, R6
|
||||
MOVD R5, 0(R3)
|
||||
MOVD R6, 8(R3)
|
||||
RET
|
|
@ -149,8 +149,8 @@ type streamPacketCipher struct {
|
|||
macResult []byte
|
||||
}
|
||||
|
||||
// readPacket reads and decrypt a single packet from the reader argument.
|
||||
func (s *streamPacketCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
// readCipherPacket reads and decrypt a single packet from the reader argument.
|
||||
func (s *streamPacketCipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
if _, err := io.ReadFull(r, s.prefix[:]); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -221,8 +221,8 @@ func (s *streamPacketCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, err
|
|||
return s.packetData[:length-paddingLength-1], nil
|
||||
}
|
||||
|
||||
// writePacket encrypts and sends a packet of data to the writer argument
|
||||
func (s *streamPacketCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
|
||||
// writeCipherPacket encrypts and sends a packet of data to the writer argument
|
||||
func (s *streamPacketCipher) writeCipherPacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
|
||||
if len(packet) > maxPacket {
|
||||
return errors.New("ssh: packet too large")
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ func newGCMCipher(key, iv, unusedMacKey []byte, unusedAlgs directionAlgorithms)
|
|||
|
||||
const gcmTagSize = 16
|
||||
|
||||
func (c *gcmCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
|
||||
func (c *gcmCipher) writeCipherPacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
|
||||
// Pad out to multiple of 16 bytes. This is different from the
|
||||
// stream cipher because that encrypts the length too.
|
||||
padding := byte(packetSizeMultiple - (1+len(packet))%packetSizeMultiple)
|
||||
|
@ -370,7 +370,7 @@ func (c *gcmCipher) incIV() {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *gcmCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
func (c *gcmCipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
if _, err := io.ReadFull(r, c.prefix[:]); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -486,8 +486,8 @@ type cbcError string
|
|||
|
||||
func (e cbcError) Error() string { return string(e) }
|
||||
|
||||
func (c *cbcCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
p, err := c.readPacketLeaky(seqNum, r)
|
||||
func (c *cbcCipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
p, err := c.readCipherPacketLeaky(seqNum, r)
|
||||
if err != nil {
|
||||
if _, ok := err.(cbcError); ok {
|
||||
// Verification error: read a fixed amount of
|
||||
|
@ -500,7 +500,7 @@ func (c *cbcCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
|||
return p, err
|
||||
}
|
||||
|
||||
func (c *cbcCipher) readPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
func (c *cbcCipher) readCipherPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
blockSize := c.decrypter.BlockSize()
|
||||
|
||||
// Read the header, which will include some of the subsequent data in the
|
||||
|
@ -576,7 +576,7 @@ func (c *cbcCipher) readPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error)
|
|||
return c.packetData[prefixLen:paddingStart], nil
|
||||
}
|
||||
|
||||
func (c *cbcCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
|
||||
func (c *cbcCipher) writeCipherPacket(seqNum uint32, w io.Writer, rand io.Reader, packet []byte) error {
|
||||
effectiveBlockSize := maxUInt32(cbcMinPacketSizeMultiple, c.encrypter.BlockSize())
|
||||
|
||||
// Length of encrypted portion of the packet (header, payload, padding).
|
||||
|
@ -665,7 +665,7 @@ func newChaCha20Cipher(key, unusedIV, unusedMACKey []byte, unusedAlgs directionA
|
|||
return c, nil
|
||||
}
|
||||
|
||||
func (c *chacha20Poly1305Cipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
func (c *chacha20Poly1305Cipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error) {
|
||||
nonce := [3]uint32{0, 0, bits.ReverseBytes32(seqNum)}
|
||||
s := chacha20.New(c.contentKey, nonce)
|
||||
var polyKey [32]byte
|
||||
|
@ -723,7 +723,7 @@ func (c *chacha20Poly1305Cipher) readPacket(seqNum uint32, r io.Reader) ([]byte,
|
|||
return plain, nil
|
||||
}
|
||||
|
||||
func (c *chacha20Poly1305Cipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, payload []byte) error {
|
||||
func (c *chacha20Poly1305Cipher) writeCipherPacket(seqNum uint32, w io.Writer, rand io.Reader, payload []byte) error {
|
||||
nonce := [3]uint32{0, 0, bits.ReverseBytes32(seqNum)}
|
||||
s := chacha20.New(c.contentKey, nonce)
|
||||
var polyKey [32]byte
|
||||
|
|
|
@ -523,3 +523,117 @@ func (r *retryableAuthMethod) method() string {
|
|||
func RetryableAuthMethod(auth AuthMethod, maxTries int) AuthMethod {
|
||||
return &retryableAuthMethod{authMethod: auth, maxTries: maxTries}
|
||||
}
|
||||
|
||||
// GSSAPIWithMICAuthMethod is an AuthMethod with "gssapi-with-mic" authentication.
|
||||
// See RFC 4462 section 3
|
||||
// gssAPIClient is implementation of the GSSAPIClient interface, see the definition of the interface for details.
|
||||
// target is the server host you want to log in to.
|
||||
func GSSAPIWithMICAuthMethod(gssAPIClient GSSAPIClient, target string) AuthMethod {
|
||||
if gssAPIClient == nil {
|
||||
panic("gss-api client must be not nil with enable gssapi-with-mic")
|
||||
}
|
||||
return &gssAPIWithMICCallback{gssAPIClient: gssAPIClient, target: target}
|
||||
}
|
||||
|
||||
type gssAPIWithMICCallback struct {
|
||||
gssAPIClient GSSAPIClient
|
||||
target string
|
||||
}
|
||||
|
||||
func (g *gssAPIWithMICCallback) auth(session []byte, user string, c packetConn, rand io.Reader) (authResult, []string, error) {
|
||||
m := &userAuthRequestMsg{
|
||||
User: user,
|
||||
Service: serviceSSH,
|
||||
Method: g.method(),
|
||||
}
|
||||
// The GSS-API authentication method is initiated when the client sends an SSH_MSG_USERAUTH_REQUEST.
|
||||
// See RFC 4462 section 3.2.
|
||||
m.Payload = appendU32(m.Payload, 1)
|
||||
m.Payload = appendString(m.Payload, string(krb5OID))
|
||||
if err := c.writePacket(Marshal(m)); err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
// The server responds to the SSH_MSG_USERAUTH_REQUEST with either an
|
||||
// SSH_MSG_USERAUTH_FAILURE if none of the mechanisms are supported or
|
||||
// with an SSH_MSG_USERAUTH_GSSAPI_RESPONSE.
|
||||
// See RFC 4462 section 3.3.
|
||||
// OpenSSH supports Kerberos V5 mechanism only for GSS-API authentication,so I don't want to check
|
||||
// selected mech if it is valid.
|
||||
packet, err := c.readPacket()
|
||||
if err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
userAuthGSSAPIResp := &userAuthGSSAPIResponse{}
|
||||
if err := Unmarshal(packet, userAuthGSSAPIResp); err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
// Start the loop into the exchange token.
|
||||
// See RFC 4462 section 3.4.
|
||||
var token []byte
|
||||
defer g.gssAPIClient.DeleteSecContext()
|
||||
for {
|
||||
// Initiates the establishment of a security context between the application and a remote peer.
|
||||
nextToken, needContinue, err := g.gssAPIClient.InitSecContext("host@"+g.target, token, false)
|
||||
if err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
if len(nextToken) > 0 {
|
||||
if err := c.writePacket(Marshal(&userAuthGSSAPIToken{
|
||||
Token: nextToken,
|
||||
})); err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
}
|
||||
if !needContinue {
|
||||
break
|
||||
}
|
||||
packet, err = c.readPacket()
|
||||
if err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
switch packet[0] {
|
||||
case msgUserAuthFailure:
|
||||
var msg userAuthFailureMsg
|
||||
if err := Unmarshal(packet, &msg); err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
if msg.PartialSuccess {
|
||||
return authPartialSuccess, msg.Methods, nil
|
||||
}
|
||||
return authFailure, msg.Methods, nil
|
||||
case msgUserAuthGSSAPIError:
|
||||
userAuthGSSAPIErrorResp := &userAuthGSSAPIError{}
|
||||
if err := Unmarshal(packet, userAuthGSSAPIErrorResp); err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
return authFailure, nil, fmt.Errorf("GSS-API Error:\n"+
|
||||
"Major Status: %d\n"+
|
||||
"Minor Status: %d\n"+
|
||||
"Error Message: %s\n", userAuthGSSAPIErrorResp.MajorStatus, userAuthGSSAPIErrorResp.MinorStatus,
|
||||
userAuthGSSAPIErrorResp.Message)
|
||||
case msgUserAuthGSSAPIToken:
|
||||
userAuthGSSAPITokenReq := &userAuthGSSAPIToken{}
|
||||
if err := Unmarshal(packet, userAuthGSSAPITokenReq); err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
token = userAuthGSSAPITokenReq.Token
|
||||
}
|
||||
}
|
||||
// Binding Encryption Keys.
|
||||
// See RFC 4462 section 3.5.
|
||||
micField := buildMIC(string(session), user, "ssh-connection", "gssapi-with-mic")
|
||||
micToken, err := g.gssAPIClient.GetMIC(micField)
|
||||
if err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
if err := c.writePacket(Marshal(&userAuthGSSAPIMIC{
|
||||
MIC: micToken,
|
||||
})); err != nil {
|
||||
return authFailure, nil, err
|
||||
}
|
||||
return handleAuthResponse(c)
|
||||
}
|
||||
|
||||
func (g *gssAPIWithMICCallback) method() string {
|
||||
return "gssapi-with-mic"
|
||||
}
|
||||
|
|
|
@ -51,6 +51,13 @@ var supportedKexAlgos = []string{
|
|||
kexAlgoDH14SHA1, kexAlgoDH1SHA1,
|
||||
}
|
||||
|
||||
// serverForbiddenKexAlgos contains key exchange algorithms, that are forbidden
|
||||
// for the server half.
|
||||
var serverForbiddenKexAlgos = map[string]struct{}{
|
||||
kexAlgoDHGEXSHA1: {}, // server half implementation is only minimal to satisfy the automated tests
|
||||
kexAlgoDHGEXSHA256: {}, // server half implementation is only minimal to satisfy the automated tests
|
||||
}
|
||||
|
||||
// supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods
|
||||
// of authenticating servers) in preference order.
|
||||
var supportedHostKeyAlgos = []string{
|
||||
|
@ -109,6 +116,7 @@ func findCommon(what string, client []string, server []string) (common string, e
|
|||
return "", fmt.Errorf("ssh: no common algorithm for %s; client offered: %v, server offered: %v", what, client, server)
|
||||
}
|
||||
|
||||
// directionAlgorithms records algorithm choices in one direction (either read or write)
|
||||
type directionAlgorithms struct {
|
||||
Cipher string
|
||||
MAC string
|
||||
|
@ -137,7 +145,7 @@ type algorithms struct {
|
|||
r directionAlgorithms
|
||||
}
|
||||
|
||||
func findAgreedAlgorithms(clientKexInit, serverKexInit *kexInitMsg) (algs *algorithms, err error) {
|
||||
func findAgreedAlgorithms(isClient bool, clientKexInit, serverKexInit *kexInitMsg) (algs *algorithms, err error) {
|
||||
result := &algorithms{}
|
||||
|
||||
result.kex, err = findCommon("key exchange", clientKexInit.KexAlgos, serverKexInit.KexAlgos)
|
||||
|
@ -150,32 +158,37 @@ func findAgreedAlgorithms(clientKexInit, serverKexInit *kexInitMsg) (algs *algor
|
|||
return
|
||||
}
|
||||
|
||||
result.w.Cipher, err = findCommon("client to server cipher", clientKexInit.CiphersClientServer, serverKexInit.CiphersClientServer)
|
||||
stoc, ctos := &result.w, &result.r
|
||||
if isClient {
|
||||
ctos, stoc = stoc, ctos
|
||||
}
|
||||
|
||||
ctos.Cipher, err = findCommon("client to server cipher", clientKexInit.CiphersClientServer, serverKexInit.CiphersClientServer)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
result.r.Cipher, err = findCommon("server to client cipher", clientKexInit.CiphersServerClient, serverKexInit.CiphersServerClient)
|
||||
stoc.Cipher, err = findCommon("server to client cipher", clientKexInit.CiphersServerClient, serverKexInit.CiphersServerClient)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
result.w.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer)
|
||||
ctos.MAC, err = findCommon("client to server MAC", clientKexInit.MACsClientServer, serverKexInit.MACsClientServer)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
result.r.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient)
|
||||
stoc.MAC, err = findCommon("server to client MAC", clientKexInit.MACsServerClient, serverKexInit.MACsServerClient)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
result.w.Compression, err = findCommon("client to server compression", clientKexInit.CompressionClientServer, serverKexInit.CompressionClientServer)
|
||||
ctos.Compression, err = findCommon("client to server compression", clientKexInit.CompressionClientServer, serverKexInit.CompressionClientServer)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
result.r.Compression, err = findCommon("server to client compression", clientKexInit.CompressionServerClient, serverKexInit.CompressionServerClient)
|
||||
stoc.Compression, err = findCommon("server to client compression", clientKexInit.CompressionServerClient, serverKexInit.CompressionServerClient)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -543,7 +543,8 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
|
|||
|
||||
clientInit := otherInit
|
||||
serverInit := t.sentInitMsg
|
||||
if len(t.hostKeys) == 0 {
|
||||
isClient := len(t.hostKeys) == 0
|
||||
if isClient {
|
||||
clientInit, serverInit = serverInit, clientInit
|
||||
|
||||
magics.clientKexInit = t.sentInitPacket
|
||||
|
@ -551,7 +552,7 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
|
|||
}
|
||||
|
||||
var err error
|
||||
t.algorithms, err = findAgreedAlgorithms(clientInit, serverInit)
|
||||
t.algorithms, err = findAgreedAlgorithms(isClient, clientInit, serverInit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -10,7 +10,9 @@ import (
|
|||
"crypto/elliptic"
|
||||
"crypto/rand"
|
||||
"crypto/subtle"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
|
||||
|
@ -24,6 +26,12 @@ const (
|
|||
kexAlgoECDH384 = "ecdh-sha2-nistp384"
|
||||
kexAlgoECDH521 = "ecdh-sha2-nistp521"
|
||||
kexAlgoCurve25519SHA256 = "curve25519-sha256@libssh.org"
|
||||
|
||||
// For the following kex only the client half contains a production
|
||||
// ready implementation. The server half only consists of a minimal
|
||||
// implementation to satisfy the automated tests.
|
||||
kexAlgoDHGEXSHA1 = "diffie-hellman-group-exchange-sha1"
|
||||
kexAlgoDHGEXSHA256 = "diffie-hellman-group-exchange-sha256"
|
||||
)
|
||||
|
||||
// kexResult captures the outcome of a key exchange.
|
||||
|
@ -402,6 +410,8 @@ func init() {
|
|||
kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()}
|
||||
kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()}
|
||||
kexAlgoMap[kexAlgoCurve25519SHA256] = &curve25519sha256{}
|
||||
kexAlgoMap[kexAlgoDHGEXSHA1] = &dhGEXSHA{hashFunc: crypto.SHA1}
|
||||
kexAlgoMap[kexAlgoDHGEXSHA256] = &dhGEXSHA{hashFunc: crypto.SHA256}
|
||||
}
|
||||
|
||||
// curve25519sha256 implements the curve25519-sha256@libssh.org key
|
||||
|
@ -538,3 +548,242 @@ func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handsh
|
|||
Hash: crypto.SHA256,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// dhGEXSHA implements the diffie-hellman-group-exchange-sha1 and
|
||||
// diffie-hellman-group-exchange-sha256 key agreement protocols,
|
||||
// as described in RFC 4419
|
||||
type dhGEXSHA struct {
|
||||
g, p *big.Int
|
||||
hashFunc crypto.Hash
|
||||
}
|
||||
|
||||
const numMRTests = 64
|
||||
|
||||
const (
|
||||
dhGroupExchangeMinimumBits = 2048
|
||||
dhGroupExchangePreferredBits = 2048
|
||||
dhGroupExchangeMaximumBits = 8192
|
||||
)
|
||||
|
||||
func (gex *dhGEXSHA) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, error) {
|
||||
if theirPublic.Sign() <= 0 || theirPublic.Cmp(gex.p) >= 0 {
|
||||
return nil, fmt.Errorf("ssh: DH parameter out of bounds")
|
||||
}
|
||||
return new(big.Int).Exp(theirPublic, myPrivate, gex.p), nil
|
||||
}
|
||||
|
||||
func (gex *dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) {
|
||||
// Send GexRequest
|
||||
kexDHGexRequest := kexDHGexRequestMsg{
|
||||
MinBits: dhGroupExchangeMinimumBits,
|
||||
PreferedBits: dhGroupExchangePreferredBits,
|
||||
MaxBits: dhGroupExchangeMaximumBits,
|
||||
}
|
||||
if err := c.writePacket(Marshal(&kexDHGexRequest)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Receive GexGroup
|
||||
packet, err := c.readPacket()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var kexDHGexGroup kexDHGexGroupMsg
|
||||
if err = Unmarshal(packet, &kexDHGexGroup); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// reject if p's bit length < dhGroupExchangeMinimumBits or > dhGroupExchangeMaximumBits
|
||||
if kexDHGexGroup.P.BitLen() < dhGroupExchangeMinimumBits || kexDHGexGroup.P.BitLen() > dhGroupExchangeMaximumBits {
|
||||
return nil, fmt.Errorf("ssh: server-generated gex p is out of range (%d bits)", kexDHGexGroup.P.BitLen())
|
||||
}
|
||||
|
||||
gex.p = kexDHGexGroup.P
|
||||
gex.g = kexDHGexGroup.G
|
||||
|
||||
// Check if p is safe by verifing that p and (p-1)/2 are primes
|
||||
one := big.NewInt(1)
|
||||
var pHalf = &big.Int{}
|
||||
pHalf.Rsh(gex.p, 1)
|
||||
if !gex.p.ProbablyPrime(numMRTests) || !pHalf.ProbablyPrime(numMRTests) {
|
||||
return nil, fmt.Errorf("ssh: server provided gex p is not safe")
|
||||
}
|
||||
|
||||
// Check if g is safe by verifing that g > 1 and g < p - 1
|
||||
var pMinusOne = &big.Int{}
|
||||
pMinusOne.Sub(gex.p, one)
|
||||
if gex.g.Cmp(one) != 1 && gex.g.Cmp(pMinusOne) != -1 {
|
||||
return nil, fmt.Errorf("ssh: server provided gex g is not safe")
|
||||
}
|
||||
|
||||
// Send GexInit
|
||||
x, err := rand.Int(randSource, pHalf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
X := new(big.Int).Exp(gex.g, x, gex.p)
|
||||
kexDHGexInit := kexDHGexInitMsg{
|
||||
X: X,
|
||||
}
|
||||
if err := c.writePacket(Marshal(&kexDHGexInit)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Receive GexReply
|
||||
packet, err = c.readPacket()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var kexDHGexReply kexDHGexReplyMsg
|
||||
if err = Unmarshal(packet, &kexDHGexReply); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
kInt, err := gex.diffieHellman(kexDHGexReply.Y, x)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Check if k is safe by verifing that k > 1 and k < p - 1
|
||||
if kInt.Cmp(one) != 1 && kInt.Cmp(pMinusOne) != -1 {
|
||||
return nil, fmt.Errorf("ssh: derived k is not safe")
|
||||
}
|
||||
|
||||
h := gex.hashFunc.New()
|
||||
magics.write(h)
|
||||
writeString(h, kexDHGexReply.HostKey)
|
||||
binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMinimumBits))
|
||||
binary.Write(h, binary.BigEndian, uint32(dhGroupExchangePreferredBits))
|
||||
binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMaximumBits))
|
||||
writeInt(h, gex.p)
|
||||
writeInt(h, gex.g)
|
||||
writeInt(h, X)
|
||||
writeInt(h, kexDHGexReply.Y)
|
||||
K := make([]byte, intLength(kInt))
|
||||
marshalInt(K, kInt)
|
||||
h.Write(K)
|
||||
|
||||
return &kexResult{
|
||||
H: h.Sum(nil),
|
||||
K: K,
|
||||
HostKey: kexDHGexReply.HostKey,
|
||||
Signature: kexDHGexReply.Signature,
|
||||
Hash: gex.hashFunc,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Server half implementation of the Diffie Hellman Key Exchange with SHA1 and SHA256.
|
||||
//
|
||||
// This is a minimal implementation to satisfy the automated tests.
|
||||
func (gex *dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) {
|
||||
// Receive GexRequest
|
||||
packet, err := c.readPacket()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var kexDHGexRequest kexDHGexRequestMsg
|
||||
if err = Unmarshal(packet, &kexDHGexRequest); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// smoosh the user's preferred size into our own limits
|
||||
if kexDHGexRequest.PreferedBits > dhGroupExchangeMaximumBits {
|
||||
kexDHGexRequest.PreferedBits = dhGroupExchangeMaximumBits
|
||||
}
|
||||
if kexDHGexRequest.PreferedBits < dhGroupExchangeMinimumBits {
|
||||
kexDHGexRequest.PreferedBits = dhGroupExchangeMinimumBits
|
||||
}
|
||||
// fix min/max if they're inconsistent. technically, we could just pout
|
||||
// and hang up, but there's no harm in giving them the benefit of the
|
||||
// doubt and just picking a bitsize for them.
|
||||
if kexDHGexRequest.MinBits > kexDHGexRequest.PreferedBits {
|
||||
kexDHGexRequest.MinBits = kexDHGexRequest.PreferedBits
|
||||
}
|
||||
if kexDHGexRequest.MaxBits < kexDHGexRequest.PreferedBits {
|
||||
kexDHGexRequest.MaxBits = kexDHGexRequest.PreferedBits
|
||||
}
|
||||
|
||||
// Send GexGroup
|
||||
// This is the group called diffie-hellman-group14-sha1 in RFC
|
||||
// 4253 and Oakley Group 14 in RFC 3526.
|
||||
p, _ := new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF", 16)
|
||||
gex.p = p
|
||||
gex.g = big.NewInt(2)
|
||||
|
||||
kexDHGexGroup := kexDHGexGroupMsg{
|
||||
P: gex.p,
|
||||
G: gex.g,
|
||||
}
|
||||
if err := c.writePacket(Marshal(&kexDHGexGroup)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Receive GexInit
|
||||
packet, err = c.readPacket()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
var kexDHGexInit kexDHGexInitMsg
|
||||
if err = Unmarshal(packet, &kexDHGexInit); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
var pHalf = &big.Int{}
|
||||
pHalf.Rsh(gex.p, 1)
|
||||
|
||||
y, err := rand.Int(randSource, pHalf)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Y := new(big.Int).Exp(gex.g, y, gex.p)
|
||||
kInt, err := gex.diffieHellman(kexDHGexInit.X, y)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
hostKeyBytes := priv.PublicKey().Marshal()
|
||||
|
||||
h := gex.hashFunc.New()
|
||||
magics.write(h)
|
||||
writeString(h, hostKeyBytes)
|
||||
binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMinimumBits))
|
||||
binary.Write(h, binary.BigEndian, uint32(dhGroupExchangePreferredBits))
|
||||
binary.Write(h, binary.BigEndian, uint32(dhGroupExchangeMaximumBits))
|
||||
writeInt(h, gex.p)
|
||||
writeInt(h, gex.g)
|
||||
writeInt(h, kexDHGexInit.X)
|
||||
writeInt(h, Y)
|
||||
|
||||
K := make([]byte, intLength(kInt))
|
||||
marshalInt(K, kInt)
|
||||
h.Write(K)
|
||||
|
||||
H := h.Sum(nil)
|
||||
|
||||
// H is already a hash, but the hostkey signing will apply its
|
||||
// own key-specific hash algorithm.
|
||||
sig, err := signAndMarshal(priv, randSource, H)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
kexDHGexReply := kexDHGexReplyMsg{
|
||||
HostKey: hostKeyBytes,
|
||||
Y: Y,
|
||||
Signature: sig,
|
||||
}
|
||||
packet = Marshal(&kexDHGexReply)
|
||||
|
||||
err = c.writePacket(packet)
|
||||
|
||||
return &kexResult{
|
||||
H: H,
|
||||
K: K,
|
||||
HostKey: hostKeyBytes,
|
||||
Signature: sig,
|
||||
Hash: gex.hashFunc,
|
||||
}, err
|
||||
}
|
||||
|
|
|
@ -97,6 +97,36 @@ type kexDHReplyMsg struct {
|
|||
Signature []byte
|
||||
}
|
||||
|
||||
// See RFC 4419, section 5.
|
||||
const msgKexDHGexGroup = 31
|
||||
|
||||
type kexDHGexGroupMsg struct {
|
||||
P *big.Int `sshtype:"31"`
|
||||
G *big.Int
|
||||
}
|
||||
|
||||
const msgKexDHGexInit = 32
|
||||
|
||||
type kexDHGexInitMsg struct {
|
||||
X *big.Int `sshtype:"32"`
|
||||
}
|
||||
|
||||
const msgKexDHGexReply = 33
|
||||
|
||||
type kexDHGexReplyMsg struct {
|
||||
HostKey []byte `sshtype:"33"`
|
||||
Y *big.Int
|
||||
Signature []byte
|
||||
}
|
||||
|
||||
const msgKexDHGexRequest = 34
|
||||
|
||||
type kexDHGexRequestMsg struct {
|
||||
MinBits uint32 `sshtype:"34"`
|
||||
PreferedBits uint32
|
||||
MaxBits uint32
|
||||
}
|
||||
|
||||
// See RFC 4253, section 10.
|
||||
const msgServiceRequest = 5
|
||||
|
||||
|
@ -275,6 +305,42 @@ type userAuthPubKeyOkMsg struct {
|
|||
PubKey []byte
|
||||
}
|
||||
|
||||
// See RFC 4462, section 3
|
||||
const msgUserAuthGSSAPIResponse = 60
|
||||
|
||||
type userAuthGSSAPIResponse struct {
|
||||
SupportMech []byte `sshtype:"60"`
|
||||
}
|
||||
|
||||
const msgUserAuthGSSAPIToken = 61
|
||||
|
||||
type userAuthGSSAPIToken struct {
|
||||
Token []byte `sshtype:"61"`
|
||||
}
|
||||
|
||||
const msgUserAuthGSSAPIMIC = 66
|
||||
|
||||
type userAuthGSSAPIMIC struct {
|
||||
MIC []byte `sshtype:"66"`
|
||||
}
|
||||
|
||||
// See RFC 4462, section 3.9
|
||||
const msgUserAuthGSSAPIErrTok = 64
|
||||
|
||||
type userAuthGSSAPIErrTok struct {
|
||||
ErrorToken []byte `sshtype:"64"`
|
||||
}
|
||||
|
||||
// See RFC 4462, section 3.8
|
||||
const msgUserAuthGSSAPIError = 65
|
||||
|
||||
type userAuthGSSAPIError struct {
|
||||
MajorStatus uint32 `sshtype:"65"`
|
||||
MinorStatus uint32
|
||||
Message string
|
||||
LanguageTag string
|
||||
}
|
||||
|
||||
// typeTags returns the possible type bytes for the given reflect.Type, which
|
||||
// should be a struct. The possible values are separated by a '|' character.
|
||||
func typeTags(structType reflect.Type) (tags []byte) {
|
||||
|
@ -756,6 +822,14 @@ func decode(packet []byte) (interface{}, error) {
|
|||
msg = new(channelRequestSuccessMsg)
|
||||
case msgChannelFailure:
|
||||
msg = new(channelRequestFailureMsg)
|
||||
case msgUserAuthGSSAPIToken:
|
||||
msg = new(userAuthGSSAPIToken)
|
||||
case msgUserAuthGSSAPIMIC:
|
||||
msg = new(userAuthGSSAPIMIC)
|
||||
case msgUserAuthGSSAPIErrTok:
|
||||
msg = new(userAuthGSSAPIErrTok)
|
||||
case msgUserAuthGSSAPIError:
|
||||
msg = new(userAuthGSSAPIError)
|
||||
default:
|
||||
return nil, unexpectedMessageError(0, packet[0])
|
||||
}
|
||||
|
@ -764,3 +838,29 @@ func decode(packet []byte) (interface{}, error) {
|
|||
}
|
||||
return msg, nil
|
||||
}
|
||||
|
||||
var packetTypeNames = map[byte]string{
|
||||
msgDisconnect: "disconnectMsg",
|
||||
msgServiceRequest: "serviceRequestMsg",
|
||||
msgServiceAccept: "serviceAcceptMsg",
|
||||
msgKexInit: "kexInitMsg",
|
||||
msgKexDHInit: "kexDHInitMsg",
|
||||
msgKexDHReply: "kexDHReplyMsg",
|
||||
msgUserAuthRequest: "userAuthRequestMsg",
|
||||
msgUserAuthSuccess: "userAuthSuccessMsg",
|
||||
msgUserAuthFailure: "userAuthFailureMsg",
|
||||
msgUserAuthPubKeyOk: "userAuthPubKeyOkMsg",
|
||||
msgGlobalRequest: "globalRequestMsg",
|
||||
msgRequestSuccess: "globalRequestSuccessMsg",
|
||||
msgRequestFailure: "globalRequestFailureMsg",
|
||||
msgChannelOpen: "channelOpenMsg",
|
||||
msgChannelData: "channelDataMsg",
|
||||
msgChannelOpenConfirm: "channelOpenConfirmMsg",
|
||||
msgChannelOpenFailure: "channelOpenFailureMsg",
|
||||
msgChannelWindowAdjust: "windowAdjustMsg",
|
||||
msgChannelEOF: "channelEOFMsg",
|
||||
msgChannelClose: "channelCloseMsg",
|
||||
msgChannelRequest: "channelRequestMsg",
|
||||
msgChannelSuccess: "channelRequestSuccessMsg",
|
||||
msgChannelFailure: "channelRequestFailureMsg",
|
||||
}
|
||||
|
|
|
@ -45,6 +45,20 @@ type Permissions struct {
|
|||
Extensions map[string]string
|
||||
}
|
||||
|
||||
type GSSAPIWithMICConfig struct {
|
||||
// AllowLogin, must be set, is called when gssapi-with-mic
|
||||
// authentication is selected (RFC 4462 section 3). The srcName is from the
|
||||
// results of the GSS-API authentication. The format is username@DOMAIN.
|
||||
// GSSAPI just guarantees to the server who the user is, but not if they can log in, and with what permissions.
|
||||
// This callback is called after the user identity is established with GSSAPI to decide if the user can login with
|
||||
// which permissions. If the user is allowed to login, it should return a nil error.
|
||||
AllowLogin func(conn ConnMetadata, srcName string) (*Permissions, error)
|
||||
|
||||
// Server must be set. It's the implementation
|
||||
// of the GSSAPIServer interface. See GSSAPIServer interface for details.
|
||||
Server GSSAPIServer
|
||||
}
|
||||
|
||||
// ServerConfig holds server specific configuration data.
|
||||
type ServerConfig struct {
|
||||
// Config contains configuration shared between client and server.
|
||||
|
@ -99,6 +113,10 @@ type ServerConfig struct {
|
|||
// BannerCallback, if present, is called and the return string is sent to
|
||||
// the client after key exchange completed but before authentication.
|
||||
BannerCallback func(conn ConnMetadata) string
|
||||
|
||||
// GSSAPIWithMICConfig includes gssapi server and callback, which if both non-nil, is used
|
||||
// when gssapi-with-mic authentication is selected (RFC 4462 section 3).
|
||||
GSSAPIWithMICConfig *GSSAPIWithMICConfig
|
||||
}
|
||||
|
||||
// AddHostKey adds a private key as a host key. If an existing host
|
||||
|
@ -175,6 +193,12 @@ func NewServerConn(c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewCha
|
|||
if fullConf.MaxAuthTries == 0 {
|
||||
fullConf.MaxAuthTries = 6
|
||||
}
|
||||
// Check if the config contains any unsupported key exchanges
|
||||
for _, kex := range fullConf.KeyExchanges {
|
||||
if _, ok := serverForbiddenKexAlgos[kex]; ok {
|
||||
return nil, nil, nil, fmt.Errorf("ssh: unsupported key exchange %s for server", kex)
|
||||
}
|
||||
}
|
||||
|
||||
s := &connection{
|
||||
sshConn: sshConn{conn: c},
|
||||
|
@ -204,7 +228,9 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error)
|
|||
return nil, errors.New("ssh: server has no host keys")
|
||||
}
|
||||
|
||||
if !config.NoClientAuth && config.PasswordCallback == nil && config.PublicKeyCallback == nil && config.KeyboardInteractiveCallback == nil {
|
||||
if !config.NoClientAuth && config.PasswordCallback == nil && config.PublicKeyCallback == nil &&
|
||||
config.KeyboardInteractiveCallback == nil && (config.GSSAPIWithMICConfig == nil ||
|
||||
config.GSSAPIWithMICConfig.AllowLogin == nil || config.GSSAPIWithMICConfig.Server == nil) {
|
||||
return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false")
|
||||
}
|
||||
|
||||
|
@ -295,6 +321,55 @@ func checkSourceAddress(addr net.Addr, sourceAddrs string) error {
|
|||
return fmt.Errorf("ssh: remote address %v is not allowed because of source-address restriction", addr)
|
||||
}
|
||||
|
||||
func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, firstToken []byte, s *connection,
|
||||
sessionID []byte, userAuthReq userAuthRequestMsg) (authErr error, perms *Permissions, err error) {
|
||||
gssAPIServer := gssapiConfig.Server
|
||||
defer gssAPIServer.DeleteSecContext()
|
||||
var srcName string
|
||||
for {
|
||||
var (
|
||||
outToken []byte
|
||||
needContinue bool
|
||||
)
|
||||
outToken, srcName, needContinue, err = gssAPIServer.AcceptSecContext(firstToken)
|
||||
if err != nil {
|
||||
return err, nil, nil
|
||||
}
|
||||
if len(outToken) != 0 {
|
||||
if err := s.transport.writePacket(Marshal(&userAuthGSSAPIToken{
|
||||
Token: outToken,
|
||||
})); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
if !needContinue {
|
||||
break
|
||||
}
|
||||
packet, err := s.transport.readPacket()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
userAuthGSSAPITokenReq := &userAuthGSSAPIToken{}
|
||||
if err := Unmarshal(packet, userAuthGSSAPITokenReq); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
packet, err := s.transport.readPacket()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
userAuthGSSAPIMICReq := &userAuthGSSAPIMIC{}
|
||||
if err := Unmarshal(packet, userAuthGSSAPIMICReq); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
mic := buildMIC(string(sessionID), userAuthReq.User, userAuthReq.Service, userAuthReq.Method)
|
||||
if err := gssAPIServer.VerifyMIC(mic, userAuthGSSAPIMICReq.MIC); err != nil {
|
||||
return err, nil, nil
|
||||
}
|
||||
perms, authErr = gssapiConfig.AllowLogin(s, srcName)
|
||||
return authErr, perms, nil
|
||||
}
|
||||
|
||||
// ServerAuthError represents server authentication errors and is
|
||||
// sometimes returned by NewServerConn. It appends any authentication
|
||||
// errors that may occur, and is returned if all of the authentication
|
||||
|
@ -496,6 +571,49 @@ userAuthLoop:
|
|||
authErr = candidate.result
|
||||
perms = candidate.perms
|
||||
}
|
||||
case "gssapi-with-mic":
|
||||
gssapiConfig := config.GSSAPIWithMICConfig
|
||||
userAuthRequestGSSAPI, err := parseGSSAPIPayload(userAuthReq.Payload)
|
||||
if err != nil {
|
||||
return nil, parseError(msgUserAuthRequest)
|
||||
}
|
||||
// OpenSSH supports Kerberos V5 mechanism only for GSS-API authentication.
|
||||
if userAuthRequestGSSAPI.N == 0 {
|
||||
authErr = fmt.Errorf("ssh: Mechanism negotiation is not supported")
|
||||
break
|
||||
}
|
||||
var i uint32
|
||||
present := false
|
||||
for i = 0; i < userAuthRequestGSSAPI.N; i++ {
|
||||
if userAuthRequestGSSAPI.OIDS[i].Equal(krb5Mesh) {
|
||||
present = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !present {
|
||||
authErr = fmt.Errorf("ssh: GSSAPI authentication must use the Kerberos V5 mechanism")
|
||||
break
|
||||
}
|
||||
// Initial server response, see RFC 4462 section 3.3.
|
||||
if err := s.transport.writePacket(Marshal(&userAuthGSSAPIResponse{
|
||||
SupportMech: krb5OID,
|
||||
})); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Exchange token, see RFC 4462 section 3.4.
|
||||
packet, err := s.transport.readPacket()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
userAuthGSSAPITokenReq := &userAuthGSSAPIToken{}
|
||||
if err := Unmarshal(packet, userAuthGSSAPITokenReq); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
authErr, perms, err = gssExchangeToken(gssapiConfig, userAuthGSSAPITokenReq.Token, s, sessionID,
|
||||
userAuthReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
default:
|
||||
authErr = fmt.Errorf("ssh: unknown method %q", userAuthReq.Method)
|
||||
}
|
||||
|
@ -522,6 +640,10 @@ userAuthLoop:
|
|||
if config.KeyboardInteractiveCallback != nil {
|
||||
failureMsg.Methods = append(failureMsg.Methods, "keyboard-interactive")
|
||||
}
|
||||
if config.GSSAPIWithMICConfig != nil && config.GSSAPIWithMICConfig.Server != nil &&
|
||||
config.GSSAPIWithMICConfig.AllowLogin != nil {
|
||||
failureMsg.Methods = append(failureMsg.Methods, "gssapi-with-mic")
|
||||
}
|
||||
|
||||
if len(failureMsg.Methods) == 0 {
|
||||
return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false")
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
// Copyright 2011 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 ssh
|
||||
|
||||
import (
|
||||
"encoding/asn1"
|
||||
"errors"
|
||||
)
|
||||
|
||||
var krb5OID []byte
|
||||
|
||||
func init() {
|
||||
krb5OID, _ = asn1.Marshal(krb5Mesh)
|
||||
}
|
||||
|
||||
// GSSAPIClient provides the API to plug-in GSSAPI authentication for client logins.
|
||||
type GSSAPIClient interface {
|
||||
// InitSecContext initiates the establishment of a security context for GSS-API between the
|
||||
// ssh client and ssh server. Initially the token parameter should be specified as nil.
|
||||
// The routine may return a outputToken which should be transferred to
|
||||
// the ssh server, where the ssh server will present it to
|
||||
// AcceptSecContext. If no token need be sent, InitSecContext will indicate this by setting
|
||||
// needContinue to false. To complete the context
|
||||
// establishment, one or more reply tokens may be required from the ssh
|
||||
// server;if so, InitSecContext will return a needContinue which is true.
|
||||
// In this case, InitSecContext should be called again when the
|
||||
// reply token is received from the ssh server, passing the reply
|
||||
// token to InitSecContext via the token parameters.
|
||||
// See RFC 2743 section 2.2.1 and RFC 4462 section 3.4.
|
||||
InitSecContext(target string, token []byte, isGSSDelegCreds bool) (outputToken []byte, needContinue bool, err error)
|
||||
// GetMIC generates a cryptographic MIC for the SSH2 message, and places
|
||||
// the MIC in a token for transfer to the ssh server.
|
||||
// The contents of the MIC field are obtained by calling GSS_GetMIC()
|
||||
// over the following, using the GSS-API context that was just
|
||||
// established:
|
||||
// string session identifier
|
||||
// byte SSH_MSG_USERAUTH_REQUEST
|
||||
// string user name
|
||||
// string service
|
||||
// string "gssapi-with-mic"
|
||||
// See RFC 2743 section 2.3.1 and RFC 4462 3.5.
|
||||
GetMIC(micFiled []byte) ([]byte, error)
|
||||
// Whenever possible, it should be possible for
|
||||
// DeleteSecContext() calls to be successfully processed even
|
||||
// if other calls cannot succeed, thereby enabling context-related
|
||||
// resources to be released.
|
||||
// In addition to deleting established security contexts,
|
||||
// gss_delete_sec_context must also be able to delete "half-built"
|
||||
// security contexts resulting from an incomplete sequence of
|
||||
// InitSecContext()/AcceptSecContext() calls.
|
||||
// See RFC 2743 section 2.2.3.
|
||||
DeleteSecContext() error
|
||||
}
|
||||
|
||||
// GSSAPIServer provides the API to plug in GSSAPI authentication for server logins.
|
||||
type GSSAPIServer interface {
|
||||
// AcceptSecContext allows a remotely initiated security context between the application
|
||||
// and a remote peer to be established by the ssh client. The routine may return a
|
||||
// outputToken which should be transferred to the ssh client,
|
||||
// where the ssh client will present it to InitSecContext.
|
||||
// If no token need be sent, AcceptSecContext will indicate this
|
||||
// by setting the needContinue to false. To
|
||||
// complete the context establishment, one or more reply tokens may be
|
||||
// required from the ssh client. if so, AcceptSecContext
|
||||
// will return a needContinue which is true, in which case it
|
||||
// should be called again when the reply token is received from the ssh
|
||||
// client, passing the token to AcceptSecContext via the
|
||||
// token parameters.
|
||||
// The srcName return value is the authenticated username.
|
||||
// See RFC 2743 section 2.2.2 and RFC 4462 section 3.4.
|
||||
AcceptSecContext(token []byte) (outputToken []byte, srcName string, needContinue bool, err error)
|
||||
// VerifyMIC verifies that a cryptographic MIC, contained in the token parameter,
|
||||
// fits the supplied message is received from the ssh client.
|
||||
// See RFC 2743 section 2.3.2.
|
||||
VerifyMIC(micField []byte, micToken []byte) error
|
||||
// Whenever possible, it should be possible for
|
||||
// DeleteSecContext() calls to be successfully processed even
|
||||
// if other calls cannot succeed, thereby enabling context-related
|
||||
// resources to be released.
|
||||
// In addition to deleting established security contexts,
|
||||
// gss_delete_sec_context must also be able to delete "half-built"
|
||||
// security contexts resulting from an incomplete sequence of
|
||||
// InitSecContext()/AcceptSecContext() calls.
|
||||
// See RFC 2743 section 2.2.3.
|
||||
DeleteSecContext() error
|
||||
}
|
||||
|
||||
var (
|
||||
// OpenSSH supports Kerberos V5 mechanism only for GSS-API authentication,
|
||||
// so we also support the krb5 mechanism only.
|
||||
// See RFC 1964 section 1.
|
||||
krb5Mesh = asn1.ObjectIdentifier{1, 2, 840, 113554, 1, 2, 2}
|
||||
)
|
||||
|
||||
// The GSS-API authentication method is initiated when the client sends an SSH_MSG_USERAUTH_REQUEST
|
||||
// See RFC 4462 section 3.2.
|
||||
type userAuthRequestGSSAPI struct {
|
||||
N uint32
|
||||
OIDS []asn1.ObjectIdentifier
|
||||
}
|
||||
|
||||
func parseGSSAPIPayload(payload []byte) (*userAuthRequestGSSAPI, error) {
|
||||
n, rest, ok := parseUint32(payload)
|
||||
if !ok {
|
||||
return nil, errors.New("parse uint32 failed")
|
||||
}
|
||||
s := &userAuthRequestGSSAPI{
|
||||
N: n,
|
||||
OIDS: make([]asn1.ObjectIdentifier, n),
|
||||
}
|
||||
for i := 0; i < int(n); i++ {
|
||||
var (
|
||||
desiredMech []byte
|
||||
err error
|
||||
)
|
||||
desiredMech, rest, ok = parseString(rest)
|
||||
if !ok {
|
||||
return nil, errors.New("parse string failed")
|
||||
}
|
||||
if rest, err = asn1.Unmarshal(desiredMech, &s.OIDS[i]); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// See RFC 4462 section 3.6.
|
||||
func buildMIC(sessionID string, username string, service string, authMethod string) []byte {
|
||||
out := make([]byte, 0, 0)
|
||||
out = appendString(out, sessionID)
|
||||
out = append(out, msgUserAuthRequest)
|
||||
out = appendString(out, username)
|
||||
out = appendString(out, service)
|
||||
out = appendString(out, authMethod)
|
||||
return out
|
||||
}
|
|
@ -53,14 +53,14 @@ type transport struct {
|
|||
// packetCipher represents a combination of SSH encryption/MAC
|
||||
// protocol. A single instance should be used for one direction only.
|
||||
type packetCipher interface {
|
||||
// writePacket encrypts the packet and writes it to w. The
|
||||
// writeCipherPacket encrypts the packet and writes it to w. The
|
||||
// contents of the packet are generally scrambled.
|
||||
writePacket(seqnum uint32, w io.Writer, rand io.Reader, packet []byte) error
|
||||
writeCipherPacket(seqnum uint32, w io.Writer, rand io.Reader, packet []byte) error
|
||||
|
||||
// readPacket reads and decrypts a packet of data. The
|
||||
// readCipherPacket reads and decrypts a packet of data. The
|
||||
// returned packet may be overwritten by future calls of
|
||||
// readPacket.
|
||||
readPacket(seqnum uint32, r io.Reader) ([]byte, error)
|
||||
readCipherPacket(seqnum uint32, r io.Reader) ([]byte, error)
|
||||
}
|
||||
|
||||
// connectionState represents one side (read or write) of the
|
||||
|
@ -127,7 +127,7 @@ func (t *transport) readPacket() (p []byte, err error) {
|
|||
}
|
||||
|
||||
func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) {
|
||||
packet, err := s.packetCipher.readPacket(s.seqNum, r)
|
||||
packet, err := s.packetCipher.readCipherPacket(s.seqNum, r)
|
||||
s.seqNum++
|
||||
if err == nil && len(packet) == 0 {
|
||||
err = errors.New("ssh: zero length packet")
|
||||
|
@ -175,7 +175,7 @@ func (t *transport) writePacket(packet []byte) error {
|
|||
func (s *connectionState) writePacket(w *bufio.Writer, rand io.Reader, packet []byte) error {
|
||||
changeKeys := len(packet) > 0 && packet[0] == msgNewKeys
|
||||
|
||||
err := s.packetCipher.writePacket(s.seqNum, w, rand, packet)
|
||||
err := s.packetCipher.writeCipherPacket(s.seqNum, w, rand, packet)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2018 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
|
||||
//
|
||||
|
||||
TEXT ·syscall6(SB),NOSPLIT,$0-88
|
||||
JMP syscall·syscall6(SB)
|
||||
|
||||
TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
|
||||
JMP syscall·rawSyscall6(SB)
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
package cpu
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
const cacheLineSize = 128
|
||||
|
||||
const (
|
||||
|
@ -18,7 +16,7 @@ const (
|
|||
)
|
||||
|
||||
func init() {
|
||||
impl := unix.Getsystemcfg(_SC_IMPL)
|
||||
impl := getsystemcfg(_SC_IMPL)
|
||||
if impl&_IMPL_POWER8 != 0 {
|
||||
PPC64.IsPOWER8 = true
|
||||
}
|
||||
|
@ -28,3 +26,9 @@ func init() {
|
|||
|
||||
Initialized = true
|
||||
}
|
||||
|
||||
func getsystemcfg(label int) (n uint64) {
|
||||
r0, _ := callgetsystemcfg(label)
|
||||
n = uint64(r0)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
// 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.
|
||||
|
||||
// Minimal copy of x/sys/unix so the cpu package can make a
|
||||
// system call on AIX without depending on x/sys/unix.
|
||||
// (See golang.org/issue/32102)
|
||||
|
||||
// +build aix,ppc64
|
||||
// +build !gccgo
|
||||
|
||||
package cpu
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
|
||||
|
||||
//go:linkname libc_getsystemcfg libc_getsystemcfg
|
||||
|
||||
type syscallFunc uintptr
|
||||
|
||||
var libc_getsystemcfg syscallFunc
|
||||
|
||||
type errno = syscall.Errno
|
||||
|
||||
// Implemented in runtime/syscall_aix.go.
|
||||
func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
|
||||
func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
|
||||
|
||||
func callgetsystemcfg(label int) (r1 uintptr, e1 errno) {
|
||||
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
|
||||
return
|
||||
}
|
|
@ -91,9 +91,13 @@ func onesCount64(x uint64) int {
|
|||
const m0 = 0x5555555555555555 // 01010101 ...
|
||||
const m1 = 0x3333333333333333 // 00110011 ...
|
||||
const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ...
|
||||
const m3 = 0x00ff00ff00ff00ff // etc.
|
||||
const m4 = 0x0000ffff0000ffff
|
||||
|
||||
// Unused in this function, but definitions preserved for
|
||||
// documentation purposes:
|
||||
//
|
||||
// const m3 = 0x00ff00ff00ff00ff // etc.
|
||||
// const m4 = 0x0000ffff0000ffff
|
||||
//
|
||||
// Implementation: Parallel summing of adjacent bits.
|
||||
// See "Hacker's Delight", Chap. 5: Counting Bits.
|
||||
// The following pattern shows the general approach:
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
// 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 riscv64,!gccgo
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
//
|
||||
// System calls for linux/riscv64.
|
||||
//
|
||||
// Where available, just jump to package syscall's implementation of
|
||||
// these functions.
|
||||
|
||||
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·Syscall(SB)
|
||||
|
||||
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·Syscall6(SB)
|
||||
|
||||
TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
|
||||
CALL runtime·entersyscall(SB)
|
||||
MOV a1+8(FP), A0
|
||||
MOV a2+16(FP), A1
|
||||
MOV a3+24(FP), A2
|
||||
MOV $0, A3
|
||||
MOV $0, A4
|
||||
MOV $0, A5
|
||||
MOV $0, A6
|
||||
MOV trap+0(FP), A7 // syscall entry
|
||||
ECALL
|
||||
MOV A0, r1+32(FP) // r1
|
||||
MOV A1, r2+40(FP) // r2
|
||||
CALL runtime·exitsyscall(SB)
|
||||
RET
|
||||
|
||||
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||
JMP syscall·RawSyscall(SB)
|
||||
|
||||
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||
JMP syscall·RawSyscall6(SB)
|
||||
|
||||
TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
|
||||
MOV a1+8(FP), A0
|
||||
MOV a2+16(FP), A1
|
||||
MOV a3+24(FP), A2
|
||||
MOV ZERO, A3
|
||||
MOV ZERO, A4
|
||||
MOV ZERO, A5
|
||||
MOV trap+0(FP), A7 // syscall entry
|
||||
ECALL
|
||||
MOV A0, r1+32(FP)
|
||||
MOV A1, r2+40(FP)
|
||||
RET
|
|
@ -2,16 +2,101 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
import "unsafe"
|
||||
|
||||
// readInt returns the size-bytes unsigned integer in native byte order at offset off.
|
||||
func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
|
||||
if len(b) < int(off+size) {
|
||||
return 0, false
|
||||
}
|
||||
if isBigEndian {
|
||||
return readIntBE(b[off:], size), true
|
||||
}
|
||||
return readIntLE(b[off:], size), true
|
||||
}
|
||||
|
||||
func readIntBE(b []byte, size uintptr) uint64 {
|
||||
switch size {
|
||||
case 1:
|
||||
return uint64(b[0])
|
||||
case 2:
|
||||
_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[1]) | uint64(b[0])<<8
|
||||
case 4:
|
||||
_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24
|
||||
case 8:
|
||||
_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
|
||||
uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
|
||||
default:
|
||||
panic("syscall: readInt with unsupported size")
|
||||
}
|
||||
}
|
||||
|
||||
func readIntLE(b []byte, size uintptr) uint64 {
|
||||
switch size {
|
||||
case 1:
|
||||
return uint64(b[0])
|
||||
case 2:
|
||||
_ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8
|
||||
case 4:
|
||||
_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24
|
||||
case 8:
|
||||
_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
|
||||
return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
|
||||
uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
|
||||
default:
|
||||
panic("syscall: readInt with unsupported size")
|
||||
}
|
||||
}
|
||||
|
||||
// ParseDirent parses up to max directory entries in buf,
|
||||
// appending the names to names. It returns the number of
|
||||
// bytes consumed from buf, the number of entries added
|
||||
// to names, and the new names slice.
|
||||
func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
|
||||
return syscall.ParseDirent(buf, max, names)
|
||||
origlen := len(buf)
|
||||
count = 0
|
||||
for max != 0 && len(buf) > 0 {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok || reclen > uint64(len(buf)) {
|
||||
return origlen, count, names
|
||||
}
|
||||
rec := buf[:reclen]
|
||||
buf = buf[reclen:]
|
||||
ino, ok := direntIno(rec)
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
if ino == 0 { // File absent in directory.
|
||||
continue
|
||||
}
|
||||
const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
|
||||
namlen, ok := direntNamlen(rec)
|
||||
if !ok || namoff+namlen > uint64(len(rec)) {
|
||||
break
|
||||
}
|
||||
name := rec[namoff : namoff+namlen]
|
||||
for i, c := range name {
|
||||
if c == 0 {
|
||||
name = name[:i]
|
||||
break
|
||||
}
|
||||
}
|
||||
// Check for useless names before allocating a string.
|
||||
if string(name) == "." || string(name) == ".." {
|
||||
continue
|
||||
}
|
||||
max--
|
||||
count++
|
||||
names = append(names, string(name))
|
||||
}
|
||||
return origlen - len(buf), count, names
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
|
||||
// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -105,25 +105,25 @@ dragonfly_amd64)
|
|||
freebsd_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="go run mksyscall.go -l32"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
freebsd_amd64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
freebsd_arm)
|
||||
mkerrors="$mkerrors"
|
||||
mksyscall="go run mksyscall.go -l32 -arm"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
freebsd_arm64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
netbsd_386)
|
||||
|
|
|
@ -183,6 +183,7 @@ struct ltchars {
|
|||
#include <sys/socket.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/capability.h>
|
||||
#include <linux/errqueue.h>
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_alg.h>
|
||||
|
@ -198,6 +199,7 @@ struct ltchars {
|
|||
#include <linux/fs.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/keyctl.h>
|
||||
#include <linux/loop.h>
|
||||
#include <linux/magic.h>
|
||||
#include <linux/memfd.h>
|
||||
#include <linux/module.h>
|
||||
|
@ -434,7 +436,9 @@ ccflags="$@"
|
|||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||
$2 ~ /^IN_/ ||
|
||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
|
||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
|
||||
$2 ~ /^TP_STATUS_/ ||
|
||||
$2 ~ /^FALLOC_/ ||
|
||||
$2 == "ICMPV6_FILTER" ||
|
||||
|
|
|
@ -50,8 +50,8 @@ func main() {
|
|||
}
|
||||
|
||||
// Intentionally export __val fields in Fsid and Sigset_t
|
||||
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`)
|
||||
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}"))
|
||||
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__(bits|val)(\s+\S+\s+)}`)
|
||||
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$4}"))
|
||||
|
||||
// Intentionally export __fds_bits field in FdSet
|
||||
fdSetRegex := regexp.MustCompile(`type (FdSet) struct {(\s+)X__fds_bits(\s+\S+\s+)}`)
|
||||
|
|
|
@ -139,7 +139,7 @@ func main() {
|
|||
text += format(name, num, proto)
|
||||
}
|
||||
case "freebsd":
|
||||
if t.Match(`^([0-9]+)\s+\S+\s+(?:NO)?STD\s+({ \S+\s+(\w+).*)$`) {
|
||||
if t.Match(`^([0-9]+)\s+\S+\s+(?:(?:NO)?STD|COMPAT10)\s+({ \S+\s+(\w+).*)$`) {
|
||||
num, proto := t.sub[1], t.sub[2]
|
||||
name := fmt.Sprintf("SYS_%s", t.sub[3])
|
||||
text += format(name, num, proto)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// 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 dragonfly freebsd linux netbsd openbsd
|
||||
|
||||
package unix
|
||||
|
||||
// ReadDirent reads directory entries from fd and writes them into buf.
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
return Getdents(fd, buf)
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
// 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 darwin
|
||||
|
||||
package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// ReadDirent reads directory entries from fd and writes them into buf.
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
// Final argument is (basep *uintptr) and the syscall doesn't take nil.
|
||||
// 64 bits should be enough. (32 bits isn't even on 386). Since the
|
||||
// actual system call is getdirentries64, 64 is a good guess.
|
||||
// TODO(rsc): Can we use a single global basep for all calls?
|
||||
var base = (*uintptr)(unsafe.Pointer(new(uint64)))
|
||||
return Getdirentries(fd, buf, base)
|
||||
}
|
|
@ -280,8 +280,24 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
return -1, ENOSYS
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
|
||||
//sys getdirent(fd int, buf []byte) (n int, err error)
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
return getdirent(fd, buf)
|
||||
}
|
||||
|
||||
|
|
|
@ -63,15 +63,6 @@ func Setgroups(gids []int) (err error) {
|
|||
return setgroups(len(a), &a[0])
|
||||
}
|
||||
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
// Final argument is (basep *uintptr) and the syscall doesn't take nil.
|
||||
// 64 bits should be enough. (32 bits isn't even on 386). Since the
|
||||
// actual system call is getdirentries64, 64 is a good guess.
|
||||
// TODO(rsc): Can we use a single global basep for all calls?
|
||||
var base = (*uintptr)(unsafe.Pointer(new(uint64)))
|
||||
return Getdirentries(fd, buf, base)
|
||||
}
|
||||
|
||||
// Wait status is 7 bits at bottom, either 0 (exited),
|
||||
// 0x7F (stopped), or a signal number that caused an exit.
|
||||
// The 0x80 bit is whether there was a core dump.
|
||||
|
@ -86,6 +77,7 @@ const (
|
|||
shift = 8
|
||||
|
||||
exited = 0
|
||||
killed = 9
|
||||
stopped = 0x7F
|
||||
)
|
||||
|
||||
|
@ -112,6 +104,8 @@ func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
|
|||
|
||||
func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
|
||||
|
||||
func (w WaitStatus) Killed() bool { return w&mask == killed && syscall.Signal(w>>shift) != SIGKILL }
|
||||
|
||||
func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
|
||||
|
||||
func (w WaitStatus) StopSignal() syscall.Signal {
|
||||
|
|
|
@ -77,7 +77,18 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
|
||||
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
|
||||
return ENOTSUP
|
||||
}
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
|
||||
return ENOTSUP
|
||||
}
|
||||
|
||||
func setTimespec(sec, nsec int64) Timespec {
|
||||
return Timespec{Sec: sec, Nsec: nsec}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,22 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
namlen, ok := direntNamlen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return (16 + namlen + 1 + 7) &^ 7, true
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
//sysnb pipe() (r int, w int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
@ -269,6 +285,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sys Getdents(fd int, buf []byte) (n int, err error)
|
||||
//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
|
||||
//sys Getdtablesize() (size int)
|
||||
//sysnb Getegid() (egid int)
|
||||
|
|
|
@ -82,6 +82,18 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return buf[0 : n/siz], nil
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
return Pipe2(p, 0)
|
||||
}
|
||||
|
@ -362,7 +374,21 @@ func Getdents(fd int, buf []byte) (n int, err error) {
|
|||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
if supportsABI(_ino64First) {
|
||||
return getdirentries_freebsd12(fd, buf, basep)
|
||||
if basep == nil || unsafe.Sizeof(*basep) == 8 {
|
||||
return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep)))
|
||||
}
|
||||
// The freebsd12 syscall needs a 64-bit base. On 32-bit machines
|
||||
// we can't just use the basep passed in. See #32498.
|
||||
var base uint64 = uint64(*basep)
|
||||
n, err = getdirentries_freebsd12(fd, buf, &base)
|
||||
*basep = uintptr(base)
|
||||
if base>>32 != 0 {
|
||||
// We can't stuff the base back into a uintptr, so any
|
||||
// future calls would be suspect. Generate an error.
|
||||
// EIO is allowed by getdirentries.
|
||||
err = EIO
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// The old syscall entries are smaller than the new. Use 1/4 of the original
|
||||
|
@ -507,6 +533,70 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
return sendfile(outfd, infd, offset, count)
|
||||
}
|
||||
|
||||
//sys ptrace(request int, pid int, addr uintptr, data int) (err error)
|
||||
|
||||
func PtraceAttach(pid int) (err error) {
|
||||
return ptrace(PTRACE_ATTACH, pid, 0, 0)
|
||||
}
|
||||
|
||||
func PtraceCont(pid int, signal int) (err error) {
|
||||
return ptrace(PTRACE_CONT, pid, 1, signal)
|
||||
}
|
||||
|
||||
func PtraceDetach(pid int) (err error) {
|
||||
return ptrace(PTRACE_DETACH, pid, 1, 0)
|
||||
}
|
||||
|
||||
func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
|
||||
return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
|
||||
}
|
||||
|
||||
func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
||||
return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
|
||||
}
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *Reg) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
|
||||
}
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
func PtraceLwpEvents(pid int, enable int) (err error) {
|
||||
return ptrace(PTRACE_LWPEVENTS, pid, 0, enable)
|
||||
}
|
||||
|
||||
func PtraceLwpInfo(pid int, info uintptr) (err error) {
|
||||
return ptrace(PTRACE_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
|
||||
}
|
||||
|
||||
func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
|
||||
return PtraceIO(PIOD_READ_D, pid, addr, out, SizeofLong)
|
||||
}
|
||||
|
||||
func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {
|
||||
return PtraceIO(PIOD_READ_I, pid, addr, out, SizeofLong)
|
||||
}
|
||||
|
||||
func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
|
||||
return PtraceIO(PIOD_WRITE_D, pid, addr, data, SizeofLong)
|
||||
}
|
||||
|
||||
func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
|
||||
return PtraceIO(PIOD_WRITE_I, pid, addr, data, SizeofLong)
|
||||
}
|
||||
|
||||
func PtraceSetRegs(pid int, regs *Reg) (err error) {
|
||||
return ptrace(PTRACE_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
|
||||
}
|
||||
|
||||
func PtraceSingleStep(pid int) (err error) {
|
||||
return ptrace(PTRACE_SINGLESTEP, pid, 1, 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
|
@ -555,7 +645,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sys getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
|
||||
//sys getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error)
|
||||
//sys getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error)
|
||||
//sys Getdtablesize() (size int)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (uid int)
|
||||
|
|
|
@ -13,7 +13,6 @@ package unix
|
|||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"net"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
@ -765,7 +764,7 @@ const px_proto_oe = 0
|
|||
|
||||
type SockaddrPPPoE struct {
|
||||
SID uint16
|
||||
Remote net.HardwareAddr
|
||||
Remote []byte
|
||||
Dev string
|
||||
raw RawSockaddrPPPoX
|
||||
}
|
||||
|
@ -916,7 +915,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||
}
|
||||
sa := &SockaddrPPPoE{
|
||||
SID: binary.BigEndian.Uint16(pp[6:8]),
|
||||
Remote: net.HardwareAddr(pp[8:14]),
|
||||
Remote: pp[8:14],
|
||||
}
|
||||
for i := 14; i < 14+IFNAMSIZ; i++ {
|
||||
if pp[i] == 0 {
|
||||
|
@ -1414,8 +1413,20 @@ func Reboot(cmd int) (err error) {
|
|||
return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
|
||||
}
|
||||
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
return Getdents(fd, buf)
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
|
||||
//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
|
||||
|
@ -1450,6 +1461,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
//sys Acct(path string) (err error)
|
||||
//sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
|
||||
//sys Adjtimex(buf *Timex) (state int, err error)
|
||||
//sys Capget(hdr *CapUserHeader, data *CapUserData) (err error)
|
||||
//sys Capset(hdr *CapUserHeader, data *CapUserData) (err error)
|
||||
//sys Chdir(path string) (err error)
|
||||
//sys Chroot(path string) (err error)
|
||||
//sys ClockGetres(clockid int32, res *Timespec) (err error)
|
||||
|
@ -1537,9 +1550,13 @@ func Setgid(uid int) (err error) {
|
|||
return EOPNOTSUPP
|
||||
}
|
||||
|
||||
func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
|
||||
return signalfd(fd, sigmask, _C__NSIG/8, flags)
|
||||
}
|
||||
|
||||
//sys Setpriority(which int, who int, prio int) (err error)
|
||||
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
|
||||
//sys Signalfd(fd int, mask *Sigset_t, flags int) = SYS_SIGNALFD4
|
||||
//sys signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) = SYS_SIGNALFD4
|
||||
//sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
|
||||
//sys Sync()
|
||||
//sys Syncfs(fd int) (err error)
|
||||
|
@ -1751,8 +1768,6 @@ func OpenByHandleAt(mountFD int, handle FileHandle, flags int) (fd int, err erro
|
|||
// Alarm
|
||||
// ArchPrctl
|
||||
// Brk
|
||||
// Capget
|
||||
// Capset
|
||||
// ClockNanosleep
|
||||
// ClockSettime
|
||||
// Clone
|
||||
|
|
|
@ -94,6 +94,18 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return mib, nil
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
|
@ -120,9 +132,30 @@ func Pipe(p []int) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
//sys getdents(fd int, buf []byte) (n int, err error)
|
||||
//sys Getdents(fd int, buf []byte) (n int, err error)
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
return getdents(fd, buf)
|
||||
n, err = Getdents(fd, buf)
|
||||
if err != nil || basep == nil {
|
||||
return
|
||||
}
|
||||
|
||||
var off int64
|
||||
off, err = Seek(fd, 0, 1 /* SEEK_CUR */)
|
||||
if err != nil {
|
||||
*basep = ^uintptr(0)
|
||||
return
|
||||
}
|
||||
*basep = uintptr(off)
|
||||
if unsafe.Sizeof(*basep) == 8 {
|
||||
return
|
||||
}
|
||||
if off>>32 != 0 {
|
||||
// We can't stuff the offset back into a uintptr, so any
|
||||
// future calls would be suspect. Generate an error.
|
||||
// EIO is allowed by getdirentries.
|
||||
err = EIO
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
|
|
@ -43,6 +43,18 @@ func nametomib(name string) (mib []_C_int, err error) {
|
|||
return nil, EINVAL
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||
}
|
||||
|
||||
func SysctlClockinfo(name string) (*Clockinfo, error) {
|
||||
mib, err := sysctlmib(name)
|
||||
if err != nil {
|
||||
|
@ -89,9 +101,30 @@ func Pipe(p []int) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
//sys getdents(fd int, buf []byte) (n int, err error)
|
||||
//sys Getdents(fd int, buf []byte) (n int, err error)
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
return getdents(fd, buf)
|
||||
n, err = Getdents(fd, buf)
|
||||
if err != nil || basep == nil {
|
||||
return
|
||||
}
|
||||
|
||||
var off int64
|
||||
off, err = Seek(fd, 0, 1 /* SEEK_CUR */)
|
||||
if err != nil {
|
||||
*basep = ^uintptr(0)
|
||||
return
|
||||
}
|
||||
*basep = uintptr(off)
|
||||
if unsafe.Sizeof(*basep) == 8 {
|
||||
return
|
||||
}
|
||||
if off>>32 != 0 {
|
||||
// We can't stuff the offset back into a uintptr, so any
|
||||
// future calls would be suspect. Generate an error.
|
||||
// EIO was allowed by getdirentries.
|
||||
err = EIO
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
const ImplementsGetwd = true
|
||||
|
|
|
@ -35,6 +35,22 @@ type SockaddrDatalink struct {
|
|||
raw RawSockaddrDatalink
|
||||
}
|
||||
|
||||
func direntIno(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
|
||||
}
|
||||
|
||||
func direntReclen(buf []byte) (uint64, bool) {
|
||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
|
||||
}
|
||||
|
||||
func direntNamlen(buf []byte) (uint64, bool) {
|
||||
reclen, ok := direntReclen(buf)
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
|
||||
}
|
||||
|
||||
//sysnb pipe(p *[2]_C_int) (n int, err error)
|
||||
|
||||
func Pipe(p []int) (err error) {
|
||||
|
@ -189,6 +205,7 @@ func Setgroups(gids []int) (err error) {
|
|||
return setgroups(len(a), &a[0])
|
||||
}
|
||||
|
||||
// ReadDirent reads directory entries from fd and writes them into buf.
|
||||
func ReadDirent(fd int, buf []byte) (n int, err error) {
|
||||
// Final argument is (basep *uintptr) and the syscall doesn't take nil.
|
||||
// TODO(rsc): Can we use a single global basep for all calls?
|
||||
|
|
|
@ -243,11 +243,55 @@ const (
|
|||
// Ptrace requests
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
PTRACE_ATTACH = C.PT_ATTACH
|
||||
PTRACE_CONT = C.PT_CONTINUE
|
||||
PTRACE_DETACH = C.PT_DETACH
|
||||
PTRACE_GETFPREGS = C.PT_GETFPREGS
|
||||
PTRACE_GETFSBASE = C.PT_GETFSBASE
|
||||
PTRACE_GETLWPLIST = C.PT_GETLWPLIST
|
||||
PTRACE_GETNUMLWPS = C.PT_GETNUMLWPS
|
||||
PTRACE_GETREGS = C.PT_GETREGS
|
||||
PTRACE_GETXSTATE = C.PT_GETXSTATE
|
||||
PTRACE_IO = C.PT_IO
|
||||
PTRACE_KILL = C.PT_KILL
|
||||
PTRACE_LWPEVENTS = C.PT_LWP_EVENTS
|
||||
PTRACE_LWPINFO = C.PT_LWPINFO
|
||||
PTRACE_SETFPREGS = C.PT_SETFPREGS
|
||||
PTRACE_SETREGS = C.PT_SETREGS
|
||||
PTRACE_SINGLESTEP = C.PT_STEP
|
||||
PTRACE_TRACEME = C.PT_TRACE_ME
|
||||
)
|
||||
|
||||
const (
|
||||
PIOD_READ_D = C.PIOD_READ_D
|
||||
PIOD_WRITE_D = C.PIOD_WRITE_D
|
||||
PIOD_READ_I = C.PIOD_READ_I
|
||||
PIOD_WRITE_I = C.PIOD_WRITE_I
|
||||
)
|
||||
|
||||
const (
|
||||
PL_FLAG_BORN = C.PL_FLAG_BORN
|
||||
PL_FLAG_EXITED = C.PL_FLAG_EXITED
|
||||
PL_FLAG_SI = C.PL_FLAG_SI
|
||||
)
|
||||
|
||||
const (
|
||||
TRAP_BRKPT = C.TRAP_BRKPT
|
||||
TRAP_TRACE = C.TRAP_TRACE
|
||||
)
|
||||
|
||||
type PtraceLwpInfoStruct C.struct_ptrace_lwpinfo
|
||||
|
||||
type __Siginfo C.struct___siginfo
|
||||
|
||||
type Sigset_t C.sigset_t
|
||||
|
||||
type Reg C.struct_reg
|
||||
|
||||
type FpReg C.struct_fpreg
|
||||
|
||||
type PtraceIoDesc C.struct_ptrace_io_desc
|
||||
|
||||
// Events (kqueue, kevent)
|
||||
|
||||
type Kevent_t C.struct_kevent_freebsd11
|
||||
|
|
|
@ -254,6 +254,7 @@ type Ptmget C.struct_ptmget
|
|||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
|
|
|
@ -241,6 +241,7 @@ type Winsize C.struct_winsize
|
|||
|
||||
const (
|
||||
AT_FDCWD = C.AT_FDCWD
|
||||
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
|
||||
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
|
||||
)
|
||||
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -667,6 +722,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -932,6 +988,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1094,6 +1151,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1134,6 +1205,15 @@ const (
|
|||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1947,6 +2027,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x80108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x80108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2154,6 +2238,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2373,6 +2458,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x400854d5
|
||||
TUNDETACHFILTER = 0x400854d6
|
||||
TUNGETDEVNETNS = 0x54e3
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETFILTER = 0x800854db
|
||||
TUNGETIFF = 0x800454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -667,6 +722,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -932,6 +988,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1094,6 +1151,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1134,6 +1205,15 @@ const (
|
|||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1948,6 +2028,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x80108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x80108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2155,6 +2239,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2374,6 +2459,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x401054d5
|
||||
TUNDETACHFILTER = 0x401054d6
|
||||
TUNGETDEVNETNS = 0x54e3
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETFILTER = 0x801054db
|
||||
TUNGETIFF = 0x800454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1132,6 +1203,15 @@ const (
|
|||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1954,6 +2034,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x80108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x80108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2161,6 +2245,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2380,6 +2465,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x400854d5
|
||||
TUNDETACHFILTER = 0x400854d6
|
||||
TUNGETDEVNETNS = 0x54e3
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETFILTER = 0x800854db
|
||||
TUNGETIFF = 0x800454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -487,6 +541,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -669,6 +724,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -934,6 +990,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1096,6 +1153,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1135,6 +1206,15 @@ const (
|
|||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1938,6 +2018,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x80108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x80108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2146,6 +2230,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2365,6 +2450,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x401054d5
|
||||
TUNDETACHFILTER = 0x401054d6
|
||||
TUNGETDEVNETNS = 0x54e3
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETFILTER = 0x801054db
|
||||
TUNGETIFF = 0x800454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1132,6 +1203,15 @@ const (
|
|||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x40000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1947,6 +2027,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x40108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2155,6 +2239,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2375,6 +2460,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x800854d5
|
||||
TUNDETACHFILTER = 0x800854d6
|
||||
TUNGETDEVNETNS = 0x200054e3
|
||||
TUNGETFEATURES = 0x400454cf
|
||||
TUNGETFILTER = 0x400854db
|
||||
TUNGETIFF = 0x400454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1132,6 +1203,15 @@ const (
|
|||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x40000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1947,6 +2027,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x40108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2155,6 +2239,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2375,6 +2460,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x801054d5
|
||||
TUNDETACHFILTER = 0x801054d6
|
||||
TUNGETDEVNETNS = 0x200054e3
|
||||
TUNGETFEATURES = 0x400454cf
|
||||
TUNGETFILTER = 0x401054db
|
||||
TUNGETIFF = 0x400454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1132,6 +1203,15 @@ const (
|
|||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x40000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1947,6 +2027,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x40108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2155,6 +2239,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2375,6 +2460,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x801054d5
|
||||
TUNDETACHFILTER = 0x801054d6
|
||||
TUNGETDEVNETNS = 0x200054e3
|
||||
TUNGETFEATURES = 0x400454cf
|
||||
TUNGETFILTER = 0x401054db
|
||||
TUNGETIFF = 0x400454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1132,6 +1203,15 @@ const (
|
|||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x40000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1947,6 +2027,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x40108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2155,6 +2239,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2375,6 +2460,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x800854d5
|
||||
TUNDETACHFILTER = 0x800854d6
|
||||
TUNGETDEVNETNS = 0x200054e3
|
||||
TUNGETFEATURES = 0x400454cf
|
||||
TUNGETFILTER = 0x400854db
|
||||
TUNGETIFF = 0x400454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0xff
|
||||
CBAUDEX = 0x0
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1131,6 +1202,15 @@ const (
|
|||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x20000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x2000
|
||||
MCL_FUTURE = 0x4000
|
||||
MCL_ONFAULT = 0x8000
|
||||
|
@ -2005,6 +2085,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x40108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x4004667f
|
||||
SIOCOUTQ = 0x40047473
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2212,6 +2296,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2435,6 +2520,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x801054d5
|
||||
TUNDETACHFILTER = 0x801054d6
|
||||
TUNGETDEVNETNS = 0x200054e3
|
||||
TUNGETFEATURES = 0x400454cf
|
||||
TUNGETFILTER = 0x401054db
|
||||
TUNGETIFF = 0x400454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0xff
|
||||
CBAUDEX = 0x0
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1131,6 +1202,15 @@ const (
|
|||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x20000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x2000
|
||||
MCL_FUTURE = 0x4000
|
||||
MCL_ONFAULT = 0x8000
|
||||
|
@ -2005,6 +2085,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x40108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x4004667f
|
||||
SIOCOUTQ = 0x40047473
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2212,6 +2296,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2435,6 +2520,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x801054d5
|
||||
TUNDETACHFILTER = 0x801054d6
|
||||
TUNGETDEVNETNS = 0x200054e3
|
||||
TUNGETFEATURES = 0x400454cf
|
||||
TUNGETFILTER = 0x401054db
|
||||
TUNGETIFF = 0x400454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1132,6 +1203,15 @@ const (
|
|||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -1935,6 +2015,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x80108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x80108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2142,6 +2226,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2361,6 +2446,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x401054d5
|
||||
TUNDETACHFILTER = 0x401054d6
|
||||
TUNGETDEVNETNS = 0x54e3
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETFILTER = 0x801054db
|
||||
TUNGETIFF = 0x800454d2
|
||||
|
|
|
@ -196,6 +196,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -217,6 +219,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -229,6 +236,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -237,16 +245,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -259,6 +270,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -288,8 +300,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -332,6 +346,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -370,6 +423,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -486,6 +540,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -666,6 +721,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x0
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -931,6 +987,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1093,6 +1150,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1132,6 +1203,15 @@ const (
|
|||
MAP_STACK = 0x20000
|
||||
MAP_SYNC = 0x80000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x1
|
||||
MCL_FUTURE = 0x2
|
||||
MCL_ONFAULT = 0x4
|
||||
|
@ -2008,6 +2088,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x80108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x80108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2215,6 +2299,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2434,6 +2519,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x401054d5
|
||||
TUNDETACHFILTER = 0x401054d6
|
||||
TUNGETDEVNETNS = 0x54e3
|
||||
TUNGETFEATURES = 0x800454cf
|
||||
TUNGETFILTER = 0x801054db
|
||||
TUNGETIFF = 0x800454d2
|
||||
|
|
|
@ -199,6 +199,8 @@ const (
|
|||
BPF_A = 0x10
|
||||
BPF_ABS = 0x20
|
||||
BPF_ADD = 0x0
|
||||
BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
|
||||
BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
|
||||
BPF_ALU = 0x4
|
||||
BPF_ALU64 = 0x7
|
||||
BPF_AND = 0x50
|
||||
|
@ -220,6 +222,11 @@ const (
|
|||
BPF_FROM_BE = 0x8
|
||||
BPF_FROM_LE = 0x0
|
||||
BPF_FS_MAGIC = 0xcafe4a11
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
|
||||
BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
|
||||
BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
|
||||
BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
|
||||
BPF_F_ALLOW_MULTI = 0x2
|
||||
BPF_F_ALLOW_OVERRIDE = 0x1
|
||||
BPF_F_ANY_ALIGNMENT = 0x2
|
||||
|
@ -232,6 +239,7 @@ const (
|
|||
BPF_F_INDEX_MASK = 0xffffffff
|
||||
BPF_F_INGRESS = 0x1
|
||||
BPF_F_INVALIDATE_HASH = 0x2
|
||||
BPF_F_LOCK = 0x4
|
||||
BPF_F_MARK_ENFORCE = 0x40
|
||||
BPF_F_MARK_MANGLED_0 = 0x20
|
||||
BPF_F_NO_COMMON_LRU = 0x2
|
||||
|
@ -240,16 +248,19 @@ const (
|
|||
BPF_F_PSEUDO_HDR = 0x10
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_RDONLY = 0x8
|
||||
BPF_F_RDONLY_PROG = 0x80
|
||||
BPF_F_RECOMPUTE_CSUM = 0x1
|
||||
BPF_F_REUSE_STACKID = 0x400
|
||||
BPF_F_SEQ_NUMBER = 0x8
|
||||
BPF_F_SKIP_FIELD_MASK = 0xff
|
||||
BPF_F_STACK_BUILD_ID = 0x20
|
||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||
BPF_F_SYSCTL_BASE_NAME = 0x1
|
||||
BPF_F_TUNINFO_IPV6 = 0x1
|
||||
BPF_F_USER_BUILD_ID = 0x800
|
||||
BPF_F_USER_STACK = 0x100
|
||||
BPF_F_WRONLY = 0x10
|
||||
BPF_F_WRONLY_PROG = 0x100
|
||||
BPF_F_ZERO_CSUM_TX = 0x2
|
||||
BPF_F_ZERO_SEED = 0x40
|
||||
BPF_H = 0x8
|
||||
|
@ -262,6 +273,7 @@ const (
|
|||
BPF_JLE = 0xb0
|
||||
BPF_JLT = 0xa0
|
||||
BPF_JMP = 0x5
|
||||
BPF_JMP32 = 0x6
|
||||
BPF_JNE = 0x50
|
||||
BPF_JSET = 0x40
|
||||
BPF_JSGE = 0x70
|
||||
|
@ -291,8 +303,10 @@ const (
|
|||
BPF_OR = 0x40
|
||||
BPF_PSEUDO_CALL = 0x1
|
||||
BPF_PSEUDO_MAP_FD = 0x1
|
||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_SK_STORAGE_GET_F_CREATE = 0x1
|
||||
BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7
|
||||
BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
|
||||
BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
|
||||
|
@ -335,6 +349,45 @@ const (
|
|||
CAN_SFF_MASK = 0x7ff
|
||||
CAN_TP16 = 0x3
|
||||
CAN_TP20 = 0x4
|
||||
CAP_AUDIT_CONTROL = 0x1e
|
||||
CAP_AUDIT_READ = 0x25
|
||||
CAP_AUDIT_WRITE = 0x1d
|
||||
CAP_BLOCK_SUSPEND = 0x24
|
||||
CAP_CHOWN = 0x0
|
||||
CAP_DAC_OVERRIDE = 0x1
|
||||
CAP_DAC_READ_SEARCH = 0x2
|
||||
CAP_FOWNER = 0x3
|
||||
CAP_FSETID = 0x4
|
||||
CAP_IPC_LOCK = 0xe
|
||||
CAP_IPC_OWNER = 0xf
|
||||
CAP_KILL = 0x5
|
||||
CAP_LAST_CAP = 0x25
|
||||
CAP_LEASE = 0x1c
|
||||
CAP_LINUX_IMMUTABLE = 0x9
|
||||
CAP_MAC_ADMIN = 0x21
|
||||
CAP_MAC_OVERRIDE = 0x20
|
||||
CAP_MKNOD = 0x1b
|
||||
CAP_NET_ADMIN = 0xc
|
||||
CAP_NET_BIND_SERVICE = 0xa
|
||||
CAP_NET_BROADCAST = 0xb
|
||||
CAP_NET_RAW = 0xd
|
||||
CAP_SETFCAP = 0x1f
|
||||
CAP_SETGID = 0x6
|
||||
CAP_SETPCAP = 0x8
|
||||
CAP_SETUID = 0x7
|
||||
CAP_SYSLOG = 0x22
|
||||
CAP_SYS_ADMIN = 0x15
|
||||
CAP_SYS_BOOT = 0x16
|
||||
CAP_SYS_CHROOT = 0x12
|
||||
CAP_SYS_MODULE = 0x10
|
||||
CAP_SYS_NICE = 0x17
|
||||
CAP_SYS_PACCT = 0x14
|
||||
CAP_SYS_PTRACE = 0x13
|
||||
CAP_SYS_RAWIO = 0x11
|
||||
CAP_SYS_RESOURCE = 0x18
|
||||
CAP_SYS_TIME = 0x19
|
||||
CAP_SYS_TTY_CONFIG = 0x1a
|
||||
CAP_WAKE_ALARM = 0x23
|
||||
CBAUD = 0x100f
|
||||
CBAUDEX = 0x1000
|
||||
CFLUSH = 0xf
|
||||
|
@ -373,6 +426,7 @@ const (
|
|||
CLONE_NEWUTS = 0x4000000
|
||||
CLONE_PARENT = 0x8000
|
||||
CLONE_PARENT_SETTID = 0x100000
|
||||
CLONE_PIDFD = 0x1000
|
||||
CLONE_PTRACE = 0x2000
|
||||
CLONE_SETTLS = 0x80000
|
||||
CLONE_SIGHAND = 0x800
|
||||
|
@ -490,6 +544,7 @@ const (
|
|||
ETH_P_DNA_RC = 0x6002
|
||||
ETH_P_DNA_RT = 0x6003
|
||||
ETH_P_DSA = 0x1b
|
||||
ETH_P_DSA_8021Q = 0xdadb
|
||||
ETH_P_ECONET = 0x18
|
||||
ETH_P_EDSA = 0xdada
|
||||
ETH_P_ERSPAN = 0x88be
|
||||
|
@ -670,6 +725,7 @@ const (
|
|||
F_OFD_SETLKW = 0x26
|
||||
F_OK = 0x0
|
||||
F_RDLCK = 0x1
|
||||
F_SEAL_FUTURE_WRITE = 0x10
|
||||
F_SEAL_GROW = 0x4
|
||||
F_SEAL_SEAL = 0x1
|
||||
F_SEAL_SHRINK = 0x2
|
||||
|
@ -935,6 +991,7 @@ const (
|
|||
IPV6_RECVRTHDR = 0x38
|
||||
IPV6_RECVTCLASS = 0x42
|
||||
IPV6_ROUTER_ALERT = 0x16
|
||||
IPV6_ROUTER_ALERT_ISOLATE = 0x1e
|
||||
IPV6_RTHDR = 0x39
|
||||
IPV6_RTHDRDSTOPTS = 0x37
|
||||
IPV6_RTHDR_LOOSE = 0x0
|
||||
|
@ -1097,6 +1154,20 @@ const (
|
|||
LOCK_NB = 0x4
|
||||
LOCK_SH = 0x1
|
||||
LOCK_UN = 0x8
|
||||
LOOP_CLR_FD = 0x4c01
|
||||
LOOP_CTL_ADD = 0x4c80
|
||||
LOOP_CTL_GET_FREE = 0x4c82
|
||||
LOOP_CTL_REMOVE = 0x4c81
|
||||
LOOP_GET_STATUS = 0x4c03
|
||||
LOOP_GET_STATUS64 = 0x4c05
|
||||
LOOP_SET_BLOCK_SIZE = 0x4c09
|
||||
LOOP_SET_CAPACITY = 0x4c07
|
||||
LOOP_SET_DIRECT_IO = 0x4c08
|
||||
LOOP_SET_FD = 0x4c00
|
||||
LOOP_SET_STATUS = 0x4c02
|
||||
LOOP_SET_STATUS64 = 0x4c04
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
MADV_DONTDUMP = 0x10
|
||||
|
@ -1136,6 +1207,15 @@ const (
|
|||
MAP_SHARED_VALIDATE = 0x3
|
||||
MAP_STACK = 0x20000
|
||||
MAP_TYPE = 0xf
|
||||
MCAST_BLOCK_SOURCE = 0x2b
|
||||
MCAST_EXCLUDE = 0x0
|
||||
MCAST_INCLUDE = 0x1
|
||||
MCAST_JOIN_GROUP = 0x2a
|
||||
MCAST_JOIN_SOURCE_GROUP = 0x2e
|
||||
MCAST_LEAVE_GROUP = 0x2d
|
||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||
MCAST_MSFILTER = 0x30
|
||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||
MCL_CURRENT = 0x2000
|
||||
MCL_FUTURE = 0x4000
|
||||
MCL_ONFAULT = 0x8000
|
||||
|
@ -2000,6 +2080,10 @@ const (
|
|||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCGSTAMPNS_NEW = 0x40108907
|
||||
SIOCGSTAMPNS_OLD = 0x8907
|
||||
SIOCGSTAMP_NEW = 0x40108906
|
||||
SIOCGSTAMP_OLD = 0x8906
|
||||
SIOCINQ = 0x4004667f
|
||||
SIOCOUTQ = 0x40047473
|
||||
SIOCOUTQNSD = 0x894b
|
||||
|
@ -2207,6 +2291,7 @@ const (
|
|||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||
SYNC_FILE_RANGE_WRITE = 0x2
|
||||
SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
|
||||
SYSFS_MAGIC = 0x62656572
|
||||
S_BLKSIZE = 0x200
|
||||
S_IEXEC = 0x40
|
||||
|
@ -2423,6 +2508,7 @@ const (
|
|||
TS_COMM_LEN = 0x20
|
||||
TUNATTACHFILTER = 0x801054d5
|
||||
TUNDETACHFILTER = 0x801054d6
|
||||
TUNGETDEVNETNS = 0x200054e3
|
||||
TUNGETFEATURES = 0x400454cf
|
||||
TUNGETFILTER = 0x401054db
|
||||
TUNGETIFF = 0x400454d2
|
||||
|
|
|
@ -377,16 +377,6 @@ func Munlockall() (err error) {
|
|||
|
||||
// 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1691,6 +1681,16 @@ 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 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||
sec = int32(r0)
|
||||
|
|
|
@ -527,21 +527,6 @@ func libc_munlockall_trampoline()
|
|||
|
||||
// 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_ptrace_trampoline()
|
||||
|
||||
//go:linkname libc_ptrace libc_ptrace
|
||||
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -2341,6 +2326,21 @@ 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 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_ptrace_trampoline()
|
||||
|
||||
//go:linkname libc_ptrace libc_ptrace
|
||||
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
|
||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||
sec = int32(r0)
|
||||
|
|
|
@ -64,8 +64,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_munlock(SB)
|
||||
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getattrlist(SB)
|
||||
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||
|
@ -264,6 +262,8 @@ 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_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_gettimeofday(SB)
|
||||
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
|
@ -527,21 +527,6 @@ func libc_munlockall_trampoline()
|
|||
|
||||
// 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_ptrace_trampoline()
|
||||
|
||||
//go:linkname libc_ptrace libc_ptrace
|
||||
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -2356,6 +2341,21 @@ 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 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_ptrace_trampoline()
|
||||
|
||||
//go:linkname libc_ptrace libc_ptrace
|
||||
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
|
||||
r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||
sec = int64(r0)
|
||||
|
|
|
@ -64,8 +64,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_munlock(SB)
|
||||
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getattrlist(SB)
|
||||
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||
|
@ -266,6 +264,8 @@ 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_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_gettimeofday(SB)
|
||||
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
|
@ -527,21 +527,6 @@ func libc_munlockall_trampoline()
|
|||
|
||||
// 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_ptrace_trampoline()
|
||||
|
||||
//go:linkname libc_ptrace libc_ptrace
|
||||
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -64,8 +64,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_munlock(SB)
|
||||
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getattrlist(SB)
|
||||
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
|
@ -527,21 +527,6 @@ func libc_munlockall_trampoline()
|
|||
|
||||
// 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 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func libc_ptrace_trampoline()
|
||||
|
||||
//go:linkname libc_ptrace libc_ptrace
|
||||
//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
|
||||
_, _, e1 := syscall_syscall6(funcPC(libc_getattrlist_trampoline), uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -64,8 +64,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
|
|||
JMP libc_munlock(SB)
|
||||
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_munlockall(SB)
|
||||
TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_ptrace(SB)
|
||||
TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
|
||||
JMP libc_getattrlist(SB)
|
||||
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
|
||||
|
|
|
@ -749,6 +749,23 @@ func Ftruncate(fd int, length int64) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
|
|
@ -387,6 +387,16 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
@ -1019,7 +1029,7 @@ 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 getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -387,6 +387,16 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
@ -1019,7 +1029,7 @@ 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 getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -387,6 +387,16 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getcwd(buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
|
@ -1019,7 +1029,7 @@ 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 getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -404,6 +404,16 @@ func Getcwd(buf []byte) (n int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
|
@ -1019,7 +1029,7 @@ 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 getdirentries_freebsd12(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,26 @@ func Adjtimex(buf *Timex) (state int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Chdir(path string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1381,8 +1401,12 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Signalfd(fd int, mask *Sigset_t, flags int) {
|
||||
SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
|
||||
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
|
||||
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
|
||||
newfd = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ func pipe() (fd1 int, fd2 int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdents(fd int, buf []byte) (n int, err error) {
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -389,7 +389,7 @@ func pipe() (fd1 int, fd2 int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdents(fd int, buf []byte) (n int, err error) {
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -389,7 +389,7 @@ func pipe() (fd1 int, fd2 int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdents(fd int, buf []byte) (n int, err error) {
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -389,7 +389,7 @@ func pipe() (fd1 int, fd2 int, err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdents(fd int, buf []byte) (n int, err error) {
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
|
@ -387,7 +387,7 @@ func pipe(p *[2]_C_int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdents(fd int, buf []byte) (n int, err error) {
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue