1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-12-18 12:06:30 +00:00

go*: go get -u ./...

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-03-22 10:57:01 -04:00
parent ce5bddf35e
commit fa29fcb58d
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED
229 changed files with 28484 additions and 2819 deletions

14
go.mod
View file

@ -4,17 +4,17 @@ go 1.17
require ( require (
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/fatih/color v1.13.0 github.com/fatih/color v1.15.0
github.com/sirupsen/logrus v1.8.1 github.com/sirupsen/logrus v1.9.0
github.com/urfave/cli/v2 v2.24.4 github.com/urfave/cli/v2 v2.25.0
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d golang.org/x/crypto v0.7.0
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e golang.org/x/sys v0.6.0
) )
require ( require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-isatty v0.0.18 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
) )

79
go.sum
View file

@ -1,43 +1,70 @@
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/urfave/cli/v2 v2.24.4 h1:0gyJJEBYtCV87zI/x2nZCPyDxD51K6xM8SkwjHFCNEU= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/urfave/cli/v2 v2.24.4/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/urfave/cli/v2 v2.25.0 h1:ykdZKuQey2zq0yin/l7JOm9Mh+pg72ngYMeB0ABn6q8=
github.com/urfave/cli/v2 v2.25.0/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e h1:CsOuNlbOuf0mzxJIefr6Q4uAUetRUwZE4qt7VfzP+xo= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View file

@ -7,7 +7,6 @@ suits you.
![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg) ![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg)
## Install ## Install
```bash ```bash
@ -124,17 +123,17 @@ fmt.Println("All text will now be bold magenta.")
``` ```
### Disable/Enable color ### Disable/Enable color
There might be a case where you want to explicitly disable/enable color output. the There might be a case where you want to explicitly disable/enable color output. the
`go-isatty` package will automatically disable color output for non-tty output streams `go-isatty` package will automatically disable color output for non-tty output streams
(for example if the output were piped directly to `less`). (for example if the output were piped directly to `less`).
The `color` package also disables color output if the [`NO_COLOR`](https://no-color.org) environment The `color` package also disables color output if the [`NO_COLOR`](https://no-color.org) environment
variable is set (regardless of its value). variable is set to a non-empty string.
`Color` has support to disable/enable colors programatically both globally and `Color` has support to disable/enable colors programmatically both globally and
for single color definitions. For example suppose you have a CLI app and a for single color definitions. For example suppose you have a CLI app and a
`--no-color` bool flag. You can easily disable the color output with: `-no-color` bool flag. You can easily disable the color output with:
```go ```go
var flagNoColor = flag.Bool("no-color", false, "Disable color output") var flagNoColor = flag.Bool("no-color", false, "Disable color output")
@ -167,11 +166,10 @@ To output color in GitHub Actions (or other CI systems that support ANSI colors)
* Save/Return previous values * Save/Return previous values
* Evaluate fmt.Formatter interface * Evaluate fmt.Formatter interface
## Credits ## Credits
* [Fatih Arslan](https://github.com/fatih) * [Fatih Arslan](https://github.com/fatih)
* Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable) * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable)
## License ## License

View file

@ -19,10 +19,10 @@ var (
// set (regardless of its value). This is a global option and affects all // set (regardless of its value). This is a global option and affects all
// colors. For more control over each color block use the methods // colors. For more control over each color block use the methods
// DisableColor() individually. // DisableColor() individually.
NoColor = noColorExists() || os.Getenv("TERM") == "dumb" || NoColor = noColorIsSet() || os.Getenv("TERM") == "dumb" ||
(!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd()))
// Output defines the standard output of the print functions. By default // Output defines the standard output of the print functions. By default,
// os.Stdout is used. // os.Stdout is used.
Output = colorable.NewColorableStdout() Output = colorable.NewColorableStdout()
@ -35,10 +35,9 @@ var (
colorsCacheMu sync.Mutex // protects colorsCache colorsCacheMu sync.Mutex // protects colorsCache
) )
// noColorExists returns true if the environment variable NO_COLOR exists. // noColorIsSet returns true if the environment variable NO_COLOR is set to a non-empty string.
func noColorExists() bool { func noColorIsSet() bool {
_, exists := os.LookupEnv("NO_COLOR") return os.Getenv("NO_COLOR") != ""
return exists
} }
// Color defines a custom color object which is defined by SGR parameters. // Color defines a custom color object which is defined by SGR parameters.
@ -120,7 +119,7 @@ func New(value ...Attribute) *Color {
params: make([]Attribute, 0), params: make([]Attribute, 0),
} }
if noColorExists() { if noColorIsSet() {
c.noColor = boolPtr(true) c.noColor = boolPtr(true)
} }
@ -152,7 +151,7 @@ func (c *Color) Set() *Color {
return c return c
} }
fmt.Fprintf(Output, c.format()) fmt.Fprint(Output, c.format())
return c return c
} }
@ -164,16 +163,21 @@ func (c *Color) unset() {
Unset() Unset()
} }
func (c *Color) setWriter(w io.Writer) *Color { // SetWriter is used to set the SGR sequence with the given io.Writer. This is
// a low-level function, and users should use the higher-level functions, such
// as color.Fprint, color.Print, etc.
func (c *Color) SetWriter(w io.Writer) *Color {
if c.isNoColorSet() { if c.isNoColorSet() {
return c return c
} }
fmt.Fprintf(w, c.format()) fmt.Fprint(w, c.format())
return c return c
} }
func (c *Color) unsetWriter(w io.Writer) { // UnsetWriter resets all escape attributes and clears the output with the give
// io.Writer. Usually should be called after SetWriter().
func (c *Color) UnsetWriter(w io.Writer) {
if c.isNoColorSet() { if c.isNoColorSet() {
return return
} }
@ -192,20 +196,14 @@ func (c *Color) Add(value ...Attribute) *Color {
return c return c
} }
func (c *Color) prepend(value Attribute) {
c.params = append(c.params, 0)
copy(c.params[1:], c.params[0:])
c.params[0] = value
}
// Fprint formats using the default formats for its operands and writes to w. // Fprint formats using the default formats for its operands and writes to w.
// Spaces are added between operands when neither is a string. // Spaces are added between operands when neither is a string.
// It returns the number of bytes written and any write error encountered. // It returns the number of bytes written and any write error encountered.
// On Windows, users should wrap w with colorable.NewColorable() if w is of // On Windows, users should wrap w with colorable.NewColorable() if w is of
// type *os.File. // type *os.File.
func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
c.setWriter(w) c.SetWriter(w)
defer c.unsetWriter(w) defer c.UnsetWriter(w)
return fmt.Fprint(w, a...) return fmt.Fprint(w, a...)
} }
@ -227,8 +225,8 @@ func (c *Color) Print(a ...interface{}) (n int, err error) {
// On Windows, users should wrap w with colorable.NewColorable() if w is of // On Windows, users should wrap w with colorable.NewColorable() if w is of
// type *os.File. // type *os.File.
func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
c.setWriter(w) c.SetWriter(w)
defer c.unsetWriter(w) defer c.UnsetWriter(w)
return fmt.Fprintf(w, format, a...) return fmt.Fprintf(w, format, a...)
} }
@ -248,8 +246,8 @@ func (c *Color) Printf(format string, a ...interface{}) (n int, err error) {
// On Windows, users should wrap w with colorable.NewColorable() if w is of // On Windows, users should wrap w with colorable.NewColorable() if w is of
// type *os.File. // type *os.File.
func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
c.setWriter(w) c.SetWriter(w)
defer c.unsetWriter(w) defer c.UnsetWriter(w)
return fmt.Fprintln(w, a...) return fmt.Fprintln(w, a...)
} }
@ -396,7 +394,7 @@ func (c *Color) DisableColor() {
} }
// EnableColor enables the color output. Use it in conjunction with // EnableColor enables the color output. Use it in conjunction with
// DisableColor(). Otherwise this method has no side effects. // DisableColor(). Otherwise, this method has no side effects.
func (c *Color) EnableColor() { func (c *Color) EnableColor() {
c.noColor = boolPtr(false) c.noColor = boolPtr(false)
} }

19
vendor/github.com/fatih/color/color_windows.go generated vendored Normal file
View file

@ -0,0 +1,19 @@
package color
import (
"os"
"golang.org/x/sys/windows"
)
func init() {
// Opt-in for ansi color support for current process.
// https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences
var outMode uint32
out := windows.Handle(os.Stdout.Fd())
if err := windows.GetConsoleMode(out, &outMode); err != nil {
return
}
outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING
_ = windows.SetConsoleMode(out, outMode)
}

137
vendor/github.com/fatih/color/doc.go generated vendored
View file

@ -5,106 +5,105 @@ that suits you.
Use simple and default helper functions with predefined foreground colors: Use simple and default helper functions with predefined foreground colors:
color.Cyan("Prints text in cyan.") color.Cyan("Prints text in cyan.")
// a newline will be appended automatically // a newline will be appended automatically
color.Blue("Prints %s in blue.", "text") color.Blue("Prints %s in blue.", "text")
// More default foreground colors.. // More default foreground colors..
color.Red("We have red") color.Red("We have red")
color.Yellow("Yellow color too!") color.Yellow("Yellow color too!")
color.Magenta("And many others ..") color.Magenta("And many others ..")
// Hi-intensity colors // Hi-intensity colors
color.HiGreen("Bright green color.") color.HiGreen("Bright green color.")
color.HiBlack("Bright black means gray..") color.HiBlack("Bright black means gray..")
color.HiWhite("Shiny white color!") color.HiWhite("Shiny white color!")
However there are times where custom color mixes are required. Below are some However, there are times when custom color mixes are required. Below are some
examples to create custom color objects and use the print functions of each examples to create custom color objects and use the print functions of each
separate color object. separate color object.
// Create a new color object // Create a new color object
c := color.New(color.FgCyan).Add(color.Underline) c := color.New(color.FgCyan).Add(color.Underline)
c.Println("Prints cyan text with an underline.") c.Println("Prints cyan text with an underline.")
// Or just add them to New() // Or just add them to New()
d := color.New(color.FgCyan, color.Bold) d := color.New(color.FgCyan, color.Bold)
d.Printf("This prints bold cyan %s\n", "too!.") d.Printf("This prints bold cyan %s\n", "too!.")
// Mix up foreground and background colors, create new mixes! // Mix up foreground and background colors, create new mixes!
red := color.New(color.FgRed) red := color.New(color.FgRed)
boldRed := red.Add(color.Bold) boldRed := red.Add(color.Bold)
boldRed.Println("This will print text in bold red.") boldRed.Println("This will print text in bold red.")
whiteBackground := red.Add(color.BgWhite) whiteBackground := red.Add(color.BgWhite)
whiteBackground.Println("Red text with White background.") whiteBackground.Println("Red text with White background.")
// Use your own io.Writer output // Use your own io.Writer output
color.New(color.FgBlue).Fprintln(myWriter, "blue color!") color.New(color.FgBlue).Fprintln(myWriter, "blue color!")
blue := color.New(color.FgBlue) blue := color.New(color.FgBlue)
blue.Fprint(myWriter, "This will print text in blue.") blue.Fprint(myWriter, "This will print text in blue.")
You can create PrintXxx functions to simplify even more: You can create PrintXxx functions to simplify even more:
// Create a custom print function for convenient // Create a custom print function for convenient
red := color.New(color.FgRed).PrintfFunc() red := color.New(color.FgRed).PrintfFunc()
red("warning") red("warning")
red("error: %s", err) red("error: %s", err)
// Mix up multiple attributes // Mix up multiple attributes
notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() notice := color.New(color.Bold, color.FgGreen).PrintlnFunc()
notice("don't forget this...") notice("don't forget this...")
You can also FprintXxx functions to pass your own io.Writer: You can also FprintXxx functions to pass your own io.Writer:
blue := color.New(FgBlue).FprintfFunc() blue := color.New(FgBlue).FprintfFunc()
blue(myWriter, "important notice: %s", stars) blue(myWriter, "important notice: %s", stars)
// Mix up with multiple attributes
success := color.New(color.Bold, color.FgGreen).FprintlnFunc()
success(myWriter, don't forget this...")
// Mix up with multiple attributes
success := color.New(color.Bold, color.FgGreen).FprintlnFunc()
success(myWriter, don't forget this...")
Or create SprintXxx functions to mix strings with other non-colorized strings: Or create SprintXxx functions to mix strings with other non-colorized strings:
yellow := New(FgYellow).SprintFunc() yellow := New(FgYellow).SprintFunc()
red := New(FgRed).SprintFunc() red := New(FgRed).SprintFunc()
fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error")) fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error"))
info := New(FgWhite, BgGreen).SprintFunc() info := New(FgWhite, BgGreen).SprintFunc()
fmt.Printf("this %s rocks!\n", info("package")) fmt.Printf("this %s rocks!\n", info("package"))
Windows support is enabled by default. All Print functions work as intended. Windows support is enabled by default. All Print functions work as intended.
However only for color.SprintXXX functions, user should use fmt.FprintXXX and However, only for color.SprintXXX functions, user should use fmt.FprintXXX and
set the output to color.Output: set the output to color.Output:
fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS"))
info := New(FgWhite, BgGreen).SprintFunc() info := New(FgWhite, BgGreen).SprintFunc()
fmt.Fprintf(color.Output, "this %s rocks!\n", info("package")) fmt.Fprintf(color.Output, "this %s rocks!\n", info("package"))
Using with existing code is possible. Just use the Set() method to set the Using with existing code is possible. Just use the Set() method to set the
standard output to the given parameters. That way a rewrite of an existing standard output to the given parameters. That way a rewrite of an existing
code is not required. code is not required.
// Use handy standard colors. // Use handy standard colors.
color.Set(color.FgYellow) color.Set(color.FgYellow)
fmt.Println("Existing text will be now in Yellow") fmt.Println("Existing text will be now in Yellow")
fmt.Printf("This one %s\n", "too") fmt.Printf("This one %s\n", "too")
color.Unset() // don't forget to unset color.Unset() // don't forget to unset
// You can mix up parameters // You can mix up parameters
color.Set(color.FgMagenta, color.Bold) color.Set(color.FgMagenta, color.Bold)
defer color.Unset() // use it in your function defer color.Unset() // use it in your function
fmt.Println("All text will be now bold magenta.") fmt.Println("All text will be now bold magenta.")
There might be a case where you want to disable color output (for example to There might be a case where you want to disable color output (for example to
pipe the standard output of your app to somewhere else). `Color` has support to pipe the standard output of your app to somewhere else). `Color` has support to
@ -112,24 +111,24 @@ disable colors both globally and for single color definition. For example
suppose you have a CLI app and a `--no-color` bool flag. You can easily disable suppose you have a CLI app and a `--no-color` bool flag. You can easily disable
the color output with: the color output with:
var flagNoColor = flag.Bool("no-color", false, "Disable color output") var flagNoColor = flag.Bool("no-color", false, "Disable color output")
if *flagNoColor { if *flagNoColor {
color.NoColor = true // disables colorized output color.NoColor = true // disables colorized output
} }
You can also disable the color by setting the NO_COLOR environment variable to any value. You can also disable the color by setting the NO_COLOR environment variable to any value.
It also has support for single color definitions (local). You can It also has support for single color definitions (local). You can
disable/enable color output on the fly: disable/enable color output on the fly:
c := color.New(color.FgCyan) c := color.New(color.FgCyan)
c.Println("Prints cyan text") c.Println("Prints cyan text")
c.DisableColor() c.DisableColor()
c.Println("This is printed without any color") c.Println("This is printed without any color")
c.EnableColor() c.EnableColor()
c.Println("This prints again cyan...") c.Println("This prints again cyan...")
*/ */
package color package color

View file

@ -1,5 +1,5 @@
//go:build (darwin || freebsd || openbsd || netbsd || dragonfly) && !appengine //go:build (darwin || freebsd || openbsd || netbsd || dragonfly || hurd) && !appengine
// +build darwin freebsd openbsd netbsd dragonfly // +build darwin freebsd openbsd netbsd dragonfly hurd
// +build !appengine // +build !appengine
package isatty package isatty

View file

@ -1,4 +1,4 @@
# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/> [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![GoDoc](https://godoc.org/github.com/sirupsen/logrus?status.svg)](https://godoc.org/github.com/sirupsen/logrus) # Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/> [![Build Status](https://github.com/sirupsen/logrus/workflows/CI/badge.svg)](https://github.com/sirupsen/logrus/actions?query=workflow%3ACI) [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![Go Reference](https://pkg.go.dev/badge/github.com/sirupsen/logrus.svg)](https://pkg.go.dev/github.com/sirupsen/logrus)
Logrus is a structured logger for Go (golang), completely API compatible with Logrus is a structured logger for Go (golang), completely API compatible with
the standard library logger. the standard library logger.
@ -341,7 +341,7 @@ import (
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
) )
init() { func init() {
// do something here to set environment depending on an environment variable // do something here to set environment depending on an environment variable
// or command-line flag // or command-line flag
if Environment == "production" { if Environment == "production" {

View file

@ -26,15 +26,6 @@ func (p *defaultPool) Get() *bytes.Buffer {
return p.pool.Get().(*bytes.Buffer) return p.pool.Get().(*bytes.Buffer)
} }
func getBuffer() *bytes.Buffer {
return bufferPool.Get()
}
func putBuffer(buf *bytes.Buffer) {
buf.Reset()
bufferPool.Put(buf)
}
// SetBufferPool allows to replace the default logrus buffer pool // SetBufferPool allows to replace the default logrus buffer pool
// to better meets the specific needs of an application. // to better meets the specific needs of an application.
func SetBufferPool(bp BufferPool) { func SetBufferPool(bp BufferPool) {

View file

@ -232,6 +232,7 @@ func (entry *Entry) log(level Level, msg string) {
newEntry.Logger.mu.Lock() newEntry.Logger.mu.Lock()
reportCaller := newEntry.Logger.ReportCaller reportCaller := newEntry.Logger.ReportCaller
bufPool := newEntry.getBufferPool()
newEntry.Logger.mu.Unlock() newEntry.Logger.mu.Unlock()
if reportCaller { if reportCaller {
@ -239,11 +240,11 @@ func (entry *Entry) log(level Level, msg string) {
} }
newEntry.fireHooks() newEntry.fireHooks()
buffer = bufPool.Get()
buffer = getBuffer()
defer func() { defer func() {
newEntry.Buffer = nil newEntry.Buffer = nil
putBuffer(buffer) buffer.Reset()
bufPool.Put(buffer)
}() }()
buffer.Reset() buffer.Reset()
newEntry.Buffer = buffer newEntry.Buffer = buffer
@ -260,6 +261,13 @@ func (entry *Entry) log(level Level, msg string) {
} }
} }
func (entry *Entry) getBufferPool() (pool BufferPool) {
if entry.Logger.BufferPool != nil {
return entry.Logger.BufferPool
}
return bufferPool
}
func (entry *Entry) fireHooks() { func (entry *Entry) fireHooks() {
var tmpHooks LevelHooks var tmpHooks LevelHooks
entry.Logger.mu.Lock() entry.Logger.mu.Lock()
@ -276,18 +284,21 @@ func (entry *Entry) fireHooks() {
} }
func (entry *Entry) write() { func (entry *Entry) write() {
entry.Logger.mu.Lock()
defer entry.Logger.mu.Unlock()
serialized, err := entry.Logger.Formatter.Format(entry) serialized, err := entry.Logger.Formatter.Format(entry)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
return return
} }
entry.Logger.mu.Lock()
defer entry.Logger.mu.Unlock()
if _, err := entry.Logger.Out.Write(serialized); err != nil { if _, err := entry.Logger.Out.Write(serialized); err != nil {
fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
} }
} }
// Log will log a message at the level given as parameter.
// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit.
// For this behaviour Entry.Panic or Entry.Fatal should be used instead.
func (entry *Entry) Log(level Level, args ...interface{}) { func (entry *Entry) Log(level Level, args ...interface{}) {
if entry.Logger.IsLevelEnabled(level) { if entry.Logger.IsLevelEnabled(level) {
entry.log(level, fmt.Sprint(args...)) entry.log(level, fmt.Sprint(args...))

View file

@ -44,6 +44,9 @@ type Logger struct {
entryPool sync.Pool entryPool sync.Pool
// Function to exit the application, defaults to `os.Exit()` // Function to exit the application, defaults to `os.Exit()`
ExitFunc exitFunc ExitFunc exitFunc
// The buffer pool used to format the log. If it is nil, the default global
// buffer pool will be used.
BufferPool BufferPool
} }
type exitFunc func(int) type exitFunc func(int)
@ -192,6 +195,9 @@ func (logger *Logger) Panicf(format string, args ...interface{}) {
logger.Logf(PanicLevel, format, args...) logger.Logf(PanicLevel, format, args...)
} }
// Log will log a message at the level given as parameter.
// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit.
// For this behaviour Logger.Panic or Logger.Fatal should be used instead.
func (logger *Logger) Log(level Level, args ...interface{}) { func (logger *Logger) Log(level Level, args ...interface{}) {
if logger.IsLevelEnabled(level) { if logger.IsLevelEnabled(level) {
entry := logger.newEntry() entry := logger.newEntry()
@ -402,3 +408,10 @@ func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks {
logger.mu.Unlock() logger.mu.Unlock()
return oldHooks return oldHooks
} }
// SetBufferPool sets the logger buffer pool.
func (logger *Logger) SetBufferPool(pool BufferPool) {
logger.mu.Lock()
defer logger.mu.Unlock()
logger.BufferPool = pool
}

View file

@ -1,6 +1,3 @@
//go:build go1.18
// +build go1.18
package cli package cli
import ( import (

View file

@ -1,10 +0,0 @@
//go:build !go1.18
// +build !go1.18
package cli
import (
"flag"
)
func unwrapFlagValue(v flag.Value) flag.Value { return v }

3
vendor/golang.org/x/crypto/AUTHORS generated vendored
View file

@ -1,3 +0,0 @@
# This source code refers to The Go Authors for copyright purposes.
# The master list of authors is in the main Go distribution,
# visible at https://tip.golang.org/AUTHORS.

View file

@ -1,3 +0,0 @@
# This source code was written by the Go contributors.
# The master list of contributors is in the main Go distribution,
# visible at https://tip.golang.org/CONTRIBUTORS.

3
vendor/golang.org/x/sys/AUTHORS generated vendored
View file

@ -1,3 +0,0 @@
# This source code refers to The Go Authors for copyright purposes.
# The master list of authors is in the main Go distribution,
# visible at http://tip.golang.org/AUTHORS.

View file

@ -1,3 +0,0 @@
# This source code was written by the Go contributors.
# The master list of contributors is in the main Go distribution,
# visible at http://tip.golang.org/CONTRIBUTORS.

31
vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s generated vendored Normal file
View file

@ -0,0 +1,31 @@
// Copyright 2022 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.
//go:build (darwin || freebsd || netbsd || openbsd) && gc
// +build darwin freebsd netbsd openbsd
// +build gc
#include "textflag.h"
//
// System call support for ppc64, BSD
//
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
TEXT ·Syscall(SB),NOSPLIT,$0-56
JMP syscall·Syscall(SB)
TEXT ·Syscall6(SB),NOSPLIT,$0-80
JMP syscall·Syscall6(SB)
TEXT ·Syscall9(SB),NOSPLIT,$0-104
JMP syscall·Syscall9(SB)
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
JMP syscall·RawSyscall(SB)
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
JMP syscall·RawSyscall6(SB)

29
vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s generated vendored Normal file
View file

@ -0,0 +1,29 @@
// Copyright 2021 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.
//go:build (darwin || freebsd || netbsd || openbsd) && gc
// +build darwin freebsd netbsd openbsd
// +build gc
#include "textflag.h"
// System call support for RISCV64 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
TEXT ·Syscall(SB),NOSPLIT,$0-56
JMP syscall·Syscall(SB)
TEXT ·Syscall6(SB),NOSPLIT,$0-80
JMP syscall·Syscall6(SB)
TEXT ·Syscall9(SB),NOSPLIT,$0-104
JMP syscall·Syscall9(SB)
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
JMP syscall·RawSyscall(SB)
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
JMP syscall·RawSyscall6(SB)

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix package unix

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build gccgo && !aix //go:build gccgo && !aix && !hurd
// +build gccgo,!aix // +build gccgo,!aix,!hurd
package unix package unix

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build gccgo //go:build gccgo && !aix && !hurd
// +build !aix // +build gccgo,!aix,!hurd
#include <errno.h> #include <errno.h>
#include <stdint.h> #include <stdint.h>

View file

@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris //go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris // +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
package unix package unix
import ( import (
"runtime"
"unsafe" "unsafe"
) )
@ -27,7 +26,7 @@ func IoctlSetInt(fd int, req uint, value int) error {
// passing the integer value directly. // passing the integer value directly.
func IoctlSetPointerInt(fd int, req uint, value int) error { func IoctlSetPointerInt(fd int, req uint, value int) error {
v := int32(value) v := int32(value)
return ioctl(fd, req, uintptr(unsafe.Pointer(&v))) return ioctlPtr(fd, req, unsafe.Pointer(&v))
} }
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
@ -36,9 +35,7 @@ func IoctlSetPointerInt(fd int, req uint, value int) error {
func IoctlSetWinsize(fd int, req uint, value *Winsize) error { func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
// TODO: if we get the chance, remove the req parameter and // TODO: if we get the chance, remove the req parameter and
// hardcode TIOCSWINSZ. // hardcode TIOCSWINSZ.
err := ioctl(fd, req, uintptr(unsafe.Pointer(value))) return ioctlPtr(fd, req, unsafe.Pointer(value))
runtime.KeepAlive(value)
return err
} }
// IoctlSetTermios performs an ioctl on fd with a *Termios. // IoctlSetTermios performs an ioctl on fd with a *Termios.
@ -46,9 +43,7 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
// The req value will usually be TCSETA or TIOCSETA. // The req value will usually be TCSETA or TIOCSETA.
func IoctlSetTermios(fd int, req uint, value *Termios) error { func IoctlSetTermios(fd int, req uint, value *Termios) error {
// TODO: if we get the chance, remove the req parameter. // TODO: if we get the chance, remove the req parameter.
err := ioctl(fd, req, uintptr(unsafe.Pointer(value))) return ioctlPtr(fd, req, unsafe.Pointer(value))
runtime.KeepAlive(value)
return err
} }
// IoctlGetInt performs an ioctl operation which gets an integer value // IoctlGetInt performs an ioctl operation which gets an integer value
@ -58,18 +53,18 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error {
// for those, IoctlRetInt should be used instead of this function. // for those, IoctlRetInt should be used instead of this function.
func IoctlGetInt(fd int, req uint) (int, error) { func IoctlGetInt(fd int, req uint) (int, error) {
var value int var value int
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return value, err return value, err
} }
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
var value Winsize var value Winsize
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return &value, err return &value, err
} }
func IoctlGetTermios(fd int, req uint) (*Termios, error) { func IoctlGetTermios(fd int, req uint) (*Termios, error) {
var value Termios var value Termios
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return &value, err return &value, err
} }

View file

@ -4,9 +4,7 @@
package unix package unix
import ( import "unsafe"
"unsafe"
)
// IoctlRetInt performs an ioctl operation specified by req on a device // IoctlRetInt performs an ioctl operation specified by req on a device
// associated with opened file descriptor fd, and returns a non-negative // associated with opened file descriptor fd, and returns a non-negative
@ -217,3 +215,19 @@ func IoctlKCMAttach(fd int, info KCMAttach) error {
func IoctlKCMUnattach(fd int, info KCMUnattach) error { func IoctlKCMUnattach(fd int, info KCMUnattach) error {
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info)) return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
} }
// IoctlLoopGetStatus64 gets the status of the loop device associated with the
// file descriptor fd using the LOOP_GET_STATUS64 operation.
func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) {
var value LoopInfo64
if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil {
return nil, err
}
return &value, nil
}
// IoctlLoopSetStatus64 sets the status of the loop device associated with the
// file descriptor fd using the LOOP_SET_STATUS64 operation.
func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {
return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value))
}

View file

@ -27,9 +27,7 @@ func IoctlSetInt(fd int, req uint, value int) error {
func IoctlSetWinsize(fd int, req uint, value *Winsize) error { func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
// TODO: if we get the chance, remove the req parameter and // TODO: if we get the chance, remove the req parameter and
// hardcode TIOCSWINSZ. // hardcode TIOCSWINSZ.
err := ioctl(fd, req, uintptr(unsafe.Pointer(value))) return ioctlPtr(fd, req, unsafe.Pointer(value))
runtime.KeepAlive(value)
return err
} }
// IoctlSetTermios performs an ioctl on fd with a *Termios. // IoctlSetTermios performs an ioctl on fd with a *Termios.
@ -51,13 +49,13 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error {
// for those, IoctlRetInt should be used instead of this function. // for those, IoctlRetInt should be used instead of this function.
func IoctlGetInt(fd int, req uint) (int, error) { func IoctlGetInt(fd int, req uint) (int, error) {
var value int var value int
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return value, err return value, err
} }
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
var value Winsize var value Winsize
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return &value, err return &value, err
} }

View file

@ -73,12 +73,12 @@ aix_ppc64)
darwin_amd64) darwin_amd64)
mkerrors="$mkerrors -m64" mkerrors="$mkerrors -m64"
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go" mkasm="go run mkasm.go"
;; ;;
darwin_arm64) darwin_arm64)
mkerrors="$mkerrors -m64" mkerrors="$mkerrors -m64"
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go" mkasm="go run mkasm.go"
;; ;;
dragonfly_amd64) dragonfly_amd64)
mkerrors="$mkerrors -m64" mkerrors="$mkerrors -m64"
@ -110,6 +110,11 @@ freebsd_arm64)
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'" mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;; ;;
freebsd_riscv64)
mkerrors="$mkerrors -m64"
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
netbsd_386) netbsd_386)
mkerrors="$mkerrors -m32" mkerrors="$mkerrors -m32"
mksyscall="go run mksyscall.go -l32 -netbsd" mksyscall="go run mksyscall.go -l32 -netbsd"
@ -137,42 +142,60 @@ netbsd_arm64)
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;; ;;
openbsd_386) openbsd_386)
mkasm="go run mkasm.go"
mkerrors="$mkerrors -m32" mkerrors="$mkerrors -m32"
mksyscall="go run mksyscall.go -l32 -openbsd" mksyscall="go run mksyscall.go -l32 -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go" mksysctl="go run mksysctl_openbsd.go"
mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;; ;;
openbsd_amd64) openbsd_amd64)
mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64" mkerrors="$mkerrors -m64"
mksyscall="go run mksyscall.go -openbsd" mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go" mksysctl="go run mksysctl_openbsd.go"
mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;; ;;
openbsd_arm) openbsd_arm)
mkasm="go run mkasm.go"
mkerrors="$mkerrors" mkerrors="$mkerrors"
mksyscall="go run mksyscall.go -l32 -openbsd -arm" mksyscall="go run mksyscall.go -l32 -openbsd -arm -libc"
mksysctl="go run mksysctl_openbsd.go" mksysctl="go run mksysctl_openbsd.go"
mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
# Let the type of C char be signed for making the bare syscall # Let the type of C char be signed for making the bare syscall
# API consistent across platforms. # API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;; ;;
openbsd_arm64) openbsd_arm64)
mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64" mkerrors="$mkerrors -m64"
mksyscall="go run mksyscall.go -openbsd" mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go" mksysctl="go run mksysctl_openbsd.go"
mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
# Let the type of C char be signed for making the bare syscall # Let the type of C char be signed for making the bare syscall
# API consistent across platforms. # API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;; ;;
openbsd_mips64) openbsd_mips64)
mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64" mkerrors="$mkerrors -m64"
mksyscall="go run mksyscall.go -openbsd" mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
# 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"
;;
openbsd_ppc64)
mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64"
mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
# 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"
;;
openbsd_riscv64)
mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64"
mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go" mksysctl="go run mksysctl_openbsd.go"
mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
# Let the type of C char be signed for making the bare syscall # Let the type of C char be signed for making the bare syscall
# API consistent across platforms. # API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
@ -209,11 +232,6 @@ esac
if [ "$GOOSARCH" == "aix_ppc64" ]; then if [ "$GOOSARCH" == "aix_ppc64" ]; then
# aix/ppc64 script generates files instead of writing to stdin. # aix/ppc64 script generates files instead of writing to stdin.
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ; echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
elif [ "$GOOS" == "darwin" ]; then
# 1.12 and later, syscalls via libSystem
echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
# 1.13 and later, syscalls via libSystem (including syscallPtr)
echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
elif [ "$GOOS" == "illumos" ]; then elif [ "$GOOS" == "illumos" ]; then
# illumos code generation requires a --illumos switch # illumos code generation requires a --illumos switch
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go"; echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
@ -227,5 +245,5 @@ esac
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; fi if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; fi
if [ -n "$mkasm" ]; then echo "$mkasm $GOARCH"; fi if [ -n "$mkasm" ]; then echo "$mkasm $GOOS $GOARCH"; fi
) | $run ) | $run

View file

@ -203,6 +203,7 @@ struct ltchars {
#include <sys/timerfd.h> #include <sys/timerfd.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/xattr.h> #include <sys/xattr.h>
#include <linux/audit.h>
#include <linux/bpf.h> #include <linux/bpf.h>
#include <linux/can.h> #include <linux/can.h>
#include <linux/can/error.h> #include <linux/can/error.h>
@ -296,6 +297,10 @@ struct ltchars {
#define SOL_NETLINK 270 #define SOL_NETLINK 270
#endif #endif
#ifndef SOL_SMC
#define SOL_SMC 286
#endif
#ifdef SOL_BLUETOOTH #ifdef SOL_BLUETOOTH
// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
// but it is already in bluetooth_linux.go // but it is already in bluetooth_linux.go
@ -554,6 +559,7 @@ ccflags="$@"
$2 ~ /^CLONE_[A-Z_]+/ || $2 ~ /^CLONE_[A-Z_]+/ ||
$2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ && $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ &&
$2 ~ /^(BPF|DLT)_/ || $2 ~ /^(BPF|DLT)_/ ||
$2 ~ /^AUDIT_/ ||
$2 ~ /^(CLOCK|TIMER)_/ || $2 ~ /^(CLOCK|TIMER)_/ ||
$2 ~ /^CAN_/ || $2 ~ /^CAN_/ ||
$2 ~ /^CAP_/ || $2 ~ /^CAP_/ ||
@ -576,7 +582,6 @@ ccflags="$@"
$2 ~ /^SEEK_/ || $2 ~ /^SEEK_/ ||
$2 ~ /^SPLICE_/ || $2 ~ /^SPLICE_/ ||
$2 ~ /^SYNC_FILE_RANGE_/ || $2 ~ /^SYNC_FILE_RANGE_/ ||
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
$2 !~ /IOC_MAGIC/ && $2 !~ /IOC_MAGIC/ &&
$2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ || $2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ ||
$2 ~ /^(VM|VMADDR)_/ || $2 ~ /^(VM|VMADDR)_/ ||
@ -637,7 +642,7 @@ errors=$(
signals=$( signals=$(
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags | echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
sort sort
) )
@ -647,7 +652,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
sort >_error.grep sort >_error.grep
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags | echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
sort >_signal.grep sort >_signal.grep
echo '// mkerrors.sh' "$@" echo '// mkerrors.sh' "$@"

View file

@ -7,6 +7,12 @@
package unix package unix
import "unsafe"
func ptrace(request int, pid int, addr uintptr, data uintptr) error { func ptrace(request int, pid int, addr uintptr, data uintptr) error {
return ptrace1(request, pid, addr, data) return ptrace1(request, pid, addr, data)
} }
func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) error {
return ptrace1Ptr(request, pid, addr, data)
}

View file

@ -7,6 +7,12 @@
package unix package unix
import "unsafe"
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
return ENOTSUP return ENOTSUP
} }
func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
return ENOTSUP
}

View file

@ -52,6 +52,20 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
return msgs, nil return msgs, nil
} }
// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header,
// message data (a slice of b), and the remainder of b after that single message.
// When there are no remaining messages, len(remainder) == 0.
func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) {
h, dbuf, err := socketControlMessageHeaderAndData(b)
if err != nil {
return Cmsghdr{}, nil, nil, err
}
if i := cmsgAlignOf(int(h.Len)); i < len(b) {
remainder = b[i:]
}
return *h, dbuf, remainder, nil
}
func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) { func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
h := (*Cmsghdr)(unsafe.Pointer(&b[0])) h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) { if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {

27
vendor/golang.org/x/sys/unix/str.go generated vendored
View file

@ -1,27 +0,0 @@
// Copyright 2009 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.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
return "-" + uitoa(uint(-val))
}
return uitoa(uint(val))
}
func uitoa(val uint) string {
var buf [32]byte // big enough for int64
i := len(buf) - 1
for val >= 10 {
buf[i] = byte(val%10 + '0')
i--
val /= 10
}
buf[i] = byte(val + '0')
return string(buf[i:])
}

View file

@ -29,8 +29,6 @@ import (
"bytes" "bytes"
"strings" "strings"
"unsafe" "unsafe"
"golang.org/x/sys/internal/unsafeheader"
) )
// ByteSliceFromString returns a NUL-terminated slice of bytes // ByteSliceFromString returns a NUL-terminated slice of bytes
@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1) ptr = unsafe.Pointer(uintptr(ptr) + 1)
} }
var s []byte return string(unsafe.Slice(p, n))
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
h.Data = unsafe.Pointer(p)
h.Len = n
h.Cap = n
return string(s)
} }
// Single-word zero for use when we need a valid pointer to 0 bytes. // Single-word zero for use when we need a valid pointer to 0 bytes.

View file

@ -218,13 +218,62 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
} }
func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) { func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
// Recvmsg not implemented on AIX var msg Msghdr
return -1, -1, -1, ENOSYS msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var dummy byte
if len(oob) > 0 {
// receive at least one normal byte
if emptyIovecs(iov) {
var iova [1]Iovec
iova[0].Base = &dummy
iova[0].SetLen(1)
iov = iova[:]
}
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
msg.SetControllen(len(oob))
}
if len(iov) > 0 {
msg.Iov = &iov[0]
msg.SetIovlen(len(iov))
}
if n, err = recvmsg(fd, &msg, flags); n == -1 {
return
}
oobn = int(msg.Controllen)
recvflags = int(msg.Flags)
return
} }
func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) { func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
// SendmsgN not implemented on AIX var msg Msghdr
return -1, ENOSYS msg.Name = (*byte)(unsafe.Pointer(ptr))
msg.Namelen = uint32(salen)
var dummy byte
var empty bool
if len(oob) > 0 {
// send at least one normal byte
empty = emptyIovecs(iov)
if empty {
var iova [1]Iovec
iova[0].Base = &dummy
iova[0].SetLen(1)
iov = iova[:]
}
msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
msg.SetControllen(len(oob))
}
if len(iov) > 0 {
msg.Iov = &iov[0]
msg.SetIovlen(len(iov))
}
if n, err = sendmsg(fd, &msg, flags); err != nil {
return 0, err
}
if len(oob) > 0 && empty {
n = 0
}
return n, nil
} }
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
@ -243,9 +292,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
break break
} }
} }
sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
sa.Name = string(bytes)
return sa, nil return sa, nil
case AF_INET: case AF_INET:
@ -362,6 +409,7 @@ func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }
func (w WaitStatus) TrapCause() int { return -1 } func (w WaitStatus) TrapCause() int { return -1 }
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = ioctl
// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX // fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
// There is no way to create a custom fcntl and to keep //sys fcntl easily, // There is no way to create a custom fcntl and to keep //sys fcntl easily,

View file

@ -245,8 +245,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
break break
} }
} }
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
sa.Name = string(bytes)
return sa, nil return sa, nil
case AF_INET: case AF_INET:
@ -363,7 +362,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
var empty bool var empty bool
if len(oob) > 0 { if len(oob) > 0 {
// send at least one normal byte // send at least one normal byte
empty := emptyIovecs(iov) empty = emptyIovecs(iov)
if empty { if empty {
var iova [1]Iovec var iova [1]Iovec
iova[0].Base = &dummy iova[0].Base = &dummy

View file

@ -1,32 +0,0 @@
// 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.
//go:build darwin && go1.12 && !go1.13
// +build darwin,go1.12,!go1.13
package unix
import (
"unsafe"
)
const _SYS_GETDIRENTRIES64 = 344
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// To implement this using libSystem we'd need syscall_syscallPtr for
// fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
// back to raw syscalls for this func on Go 1.12.
var p unsafe.Pointer
if len(buf) > 0 {
p = unsafe.Pointer(&buf[0])
} else {
p = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
n = int(r0)
if e1 != 0 {
return n, errnoErr(e1)
}
return n, nil
}

View file

@ -1,108 +0,0 @@
// 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.
//go:build darwin && go1.13
// +build darwin,go1.13
package unix
import (
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
)
//sys closedir(dir uintptr) (err error)
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
func fdopendir(fd int) (dir uintptr, err error) {
r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
dir = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_fdopendir_trampoline_addr uintptr
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
// We store the number of entries to skip in the seek
// offset of fd. See issue #31368.
// It's not the full required semantics, but should handle the case
// of calling Getdirentries or ReadDirent repeatedly.
// It won't handle assigning the results of lseek to *basep, or handle
// the directory being edited underfoot.
skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
if err != nil {
return 0, err
}
// We need to duplicate the incoming file descriptor
// because the caller expects to retain control of it, but
// fdopendir expects to take control of its argument.
// Just Dup'ing the file descriptor is not enough, as the
// result shares underlying state. Use Openat to make a really
// new file descriptor referring to the same directory.
fd2, err := Openat(fd, ".", O_RDONLY, 0)
if err != nil {
return 0, err
}
d, err := fdopendir(fd2)
if err != nil {
Close(fd2)
return 0, err
}
defer closedir(d)
var cnt int64
for {
var entry Dirent
var entryp *Dirent
e := readdir_r(d, &entry, &entryp)
if e != 0 {
return n, errnoErr(e)
}
if entryp == nil {
break
}
if skip > 0 {
skip--
cnt++
continue
}
reclen := int(entry.Reclen)
if reclen > len(buf) {
// Not enough room. Return for now.
// The counter will let us know where we should start up again.
// Note: this strategy for suspending in the middle and
// restarting is O(n^2) in the length of the directory. Oh well.
break
}
// Copy entry into return buffer.
var s []byte
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
hdr.Data = unsafe.Pointer(&entry)
hdr.Cap = reclen
hdr.Len = reclen
copy(buf, s)
buf = buf[reclen:]
n += reclen
cnt++
}
// Set the seek offset of the input fd to record
// how many files we've already returned.
_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
if err != nil {
return n, err
}
return n, nil
}

View file

@ -14,11 +14,100 @@ package unix
import ( import (
"fmt" "fmt"
"runtime"
"syscall" "syscall"
"unsafe" "unsafe"
) )
//sys closedir(dir uintptr) (err error)
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
func fdopendir(fd int) (dir uintptr, err error) {
r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
dir = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
var libc_fdopendir_trampoline_addr uintptr
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// Simulate Getdirentries using fdopendir/readdir_r/closedir.
// We store the number of entries to skip in the seek
// offset of fd. See issue #31368.
// It's not the full required semantics, but should handle the case
// of calling Getdirentries or ReadDirent repeatedly.
// It won't handle assigning the results of lseek to *basep, or handle
// the directory being edited underfoot.
skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
if err != nil {
return 0, err
}
// We need to duplicate the incoming file descriptor
// because the caller expects to retain control of it, but
// fdopendir expects to take control of its argument.
// Just Dup'ing the file descriptor is not enough, as the
// result shares underlying state. Use Openat to make a really
// new file descriptor referring to the same directory.
fd2, err := Openat(fd, ".", O_RDONLY, 0)
if err != nil {
return 0, err
}
d, err := fdopendir(fd2)
if err != nil {
Close(fd2)
return 0, err
}
defer closedir(d)
var cnt int64
for {
var entry Dirent
var entryp *Dirent
e := readdir_r(d, &entry, &entryp)
if e != 0 {
return n, errnoErr(e)
}
if entryp == nil {
break
}
if skip > 0 {
skip--
cnt++
continue
}
reclen := int(entry.Reclen)
if reclen > len(buf) {
// Not enough room. Return for now.
// The counter will let us know where we should start up again.
// Note: this strategy for suspending in the middle and
// restarting is O(n^2) in the length of the directory. Oh well.
break
}
// Copy entry into return buffer.
s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
copy(buf, s)
buf = buf[reclen:]
n += reclen
cnt++
}
// Set the seek offset of the input fd to record
// how many files we've already returned.
_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
if err != nil {
return n, err
}
return n, nil
}
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
type SockaddrDatalink struct { type SockaddrDatalink struct {
Len uint8 Len uint8
@ -140,6 +229,7 @@ func direntNamlen(buf []byte) (uint64, bool) {
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } 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) } func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
func PtraceDenyAttach() (err error) { return ptrace(PT_DENY_ATTACH, 0, 0, 0) }
//sysnb pipe(p *[2]int32) (err error) //sysnb pipe(p *[2]int32) (err error)
@ -285,11 +375,10 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) } func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
func IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error { func IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error {
err := ioctl(fd, CTLIOCGINFO, uintptr(unsafe.Pointer(ctlInfo))) return ioctlPtr(fd, CTLIOCGINFO, unsafe.Pointer(ctlInfo))
runtime.KeepAlive(ctlInfo)
return err
} }
// IfreqMTU is struct ifreq used to get or set a network device's MTU. // IfreqMTU is struct ifreq used to get or set a network device's MTU.
@ -303,16 +392,14 @@ type IfreqMTU struct {
func IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) { func IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) {
var ifreq IfreqMTU var ifreq IfreqMTU
copy(ifreq.Name[:], ifname) copy(ifreq.Name[:], ifname)
err := ioctl(fd, SIOCGIFMTU, uintptr(unsafe.Pointer(&ifreq))) err := ioctlPtr(fd, SIOCGIFMTU, unsafe.Pointer(&ifreq))
return &ifreq, err return &ifreq, err
} }
// IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU // IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU
// of the network device specified by ifreq.Name. // of the network device specified by ifreq.Name.
func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error { func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
err := ioctl(fd, SIOCSIFMTU, uintptr(unsafe.Pointer(ifreq))) return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
runtime.KeepAlive(ifreq)
return err
} }
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL

View file

@ -47,5 +47,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace //sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64 //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64

View file

@ -47,5 +47,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
//sys Lstat(path string, stat *Stat_t) (err error) //sys Lstat(path string, stat *Stat_t) (err error)
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace //sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys ptrace1Ptr(request int, pid int, addr unsafe.Pointer, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error) //sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error) //sys Statfs(path string, stat *Statfs_t) (err error)

View file

@ -172,6 +172,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
} }
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@ -255,6 +256,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Chmod(path string, mode uint32) (err error) //sys Chmod(path string, mode uint32) (err error)
//sys Chown(path string, uid int, gid int) (err error) //sys Chown(path string, uid int, gid int) (err error)
//sys Chroot(path string) (err error) //sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error) //sys Close(fd int) (err error)
//sys Dup(fd int) (nfd int, err error) //sys Dup(fd int) (nfd int, err error)
//sys Dup2(from int, to int) (err error) //sys Dup2(from int, to int) (err error)

View file

@ -161,7 +161,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return return
} }
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@ -253,6 +254,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
} }
//sys ptrace(request int, pid int, addr uintptr, data int) (err error) //sys ptrace(request int, pid int, addr uintptr, data int) (err error)
//sys ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) = SYS_PTRACE
func PtraceAttach(pid int) (err error) { func PtraceAttach(pid int) (err error) {
return ptrace(PT_ATTACH, pid, 0, 0) return ptrace(PT_ATTACH, pid, 0, 0)
@ -267,19 +269,36 @@ func PtraceDetach(pid int) (err error) {
} }
func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) { func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
return ptrace(PT_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0) return ptracePtr(PT_GETFPREGS, pid, unsafe.Pointer(fpregsout), 0)
} }
func PtraceGetRegs(pid int, regsout *Reg) (err error) { func PtraceGetRegs(pid int, regsout *Reg) (err error) {
return ptrace(PT_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0) return ptracePtr(PT_GETREGS, pid, unsafe.Pointer(regsout), 0)
}
func PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count int, err error) {
ioDesc := PtraceIoDesc{
Op: int32(req),
Offs: offs,
}
if countin > 0 {
_ = out[:countin] // check bounds
ioDesc.Addr = &out[0]
} else if out != nil {
ioDesc.Addr = (*byte)(unsafe.Pointer(&_zero))
}
ioDesc.SetLen(countin)
err = ptracePtr(PT_IO, pid, unsafe.Pointer(&ioDesc), 0)
return int(ioDesc.Len), err
} }
func PtraceLwpEvents(pid int, enable int) (err error) { func PtraceLwpEvents(pid int, enable int) (err error) {
return ptrace(PT_LWP_EVENTS, pid, 0, enable) return ptrace(PT_LWP_EVENTS, pid, 0, enable)
} }
func PtraceLwpInfo(pid int, info uintptr) (err error) { func PtraceLwpInfo(pid int, info *PtraceLwpInfoStruct) (err error) {
return ptrace(PT_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{}))) return ptracePtr(PT_LWPINFO, pid, unsafe.Pointer(info), int(unsafe.Sizeof(*info)))
} }
func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) { func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
@ -299,13 +318,25 @@ func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
} }
func PtraceSetRegs(pid int, regs *Reg) (err error) { func PtraceSetRegs(pid int, regs *Reg) (err error) {
return ptrace(PT_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0) return ptracePtr(PT_SETREGS, pid, unsafe.Pointer(regs), 0)
} }
func PtraceSingleStep(pid int) (err error) { func PtraceSingleStep(pid int) (err error) {
return ptrace(PT_STEP, pid, 1, 0) return ptrace(PT_STEP, pid, 1, 0)
} }
func Dup3(oldfd, newfd, flags int) error {
if oldfd == newfd || flags&^O_CLOEXEC != 0 {
return EINVAL
}
how := F_DUP2FD
if flags&O_CLOEXEC != 0 {
how = F_DUP2FD_CLOEXEC
}
_, err := fcntl(oldfd, how, newfd)
return err
}
/* /*
* Exposed directly * Exposed directly
*/ */
@ -319,6 +350,7 @@ func PtraceSingleStep(pid int) (err error) {
//sys Chmod(path string, mode uint32) (err error) //sys Chmod(path string, mode uint32) (err error)
//sys Chown(path string, uid int, gid int) (err error) //sys Chown(path string, uid int, gid int) (err error)
//sys Chroot(path string) (err error) //sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error) //sys Close(fd int) (err error)
//sys Dup(fd int) (nfd int, err error) //sys Dup(fd int) (nfd int, err error)
//sys Dup2(from int, to int) (err error) //sys Dup2(from int, to int) (err error)

View file

@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length) cmsg.Len = uint32(length)
} }
func (d *PtraceIoDesc) SetLen(length int) {
d.Len = uint32(length)
}
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
var writtenOut uint64 = 0 var writtenOut uint64 = 0
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
@ -57,11 +61,5 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceGetFsBase(pid int, fsbase *int64) (err error) { func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0) return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 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: uint32(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
} }

View file

@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length) cmsg.Len = uint32(length)
} }
func (d *PtraceIoDesc) SetLen(length int) {
d.Len = uint64(length)
}
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
var writtenOut uint64 = 0 var writtenOut uint64 = 0
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
@ -57,11 +61,5 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceGetFsBase(pid int, fsbase *int64) (err error) { func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
return ptrace(PT_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0) return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 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: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
} }

View file

@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length) cmsg.Len = uint32(length)
} }
func (d *PtraceIoDesc) SetLen(length int) {
d.Len = uint32(length)
}
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
var writtenOut uint64 = 0 var writtenOut uint64 = 0
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
@ -55,9 +59,3 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
} }
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}

View file

@ -42,6 +42,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length) cmsg.Len = uint32(length)
} }
func (d *PtraceIoDesc) SetLen(length int) {
d.Len = uint64(length)
}
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
var writtenOut uint64 = 0 var writtenOut uint64 = 0
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
@ -55,9 +59,3 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
} }
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}

View file

@ -0,0 +1,61 @@
// Copyright 2022 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.
//go:build riscv64 && freebsd
// +build riscv64,freebsd
package unix
import (
"syscall"
"unsafe"
)
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
}
func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)
k.Filter = int16(mode)
k.Flags = uint16(flags)
}
func (iov *Iovec) SetLen(length int) {
iov.Len = uint64(length)
}
func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
func (msghdr *Msghdr) SetIovlen(length int) {
msghdr.Iovlen = int32(length)
}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
func (d *PtraceIoDesc) SetLen(length int) {
d.Len = uint64(length)
}
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
var writtenOut uint64 = 0
_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
written = int(writtenOut)
if e1 != 0 {
err = e1
}
return
}
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)

30
vendor/golang.org/x/sys/unix/syscall_hurd.go generated vendored Normal file
View file

@ -0,0 +1,30 @@
// Copyright 2022 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.
//go:build hurd
// +build hurd
package unix
/*
#include <stdint.h>
int ioctl(int, unsigned long int, uintptr_t);
*/
import "C"
func ioctl(fd int, req uint, arg uintptr) (err error) {
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
if r0 == -1 && er != nil {
err = er
}
return
}
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
if r0 == -1 && er != nil {
err = er
}
return
}

29
vendor/golang.org/x/sys/unix/syscall_hurd_386.go generated vendored Normal file
View file

@ -0,0 +1,29 @@
// Copyright 2022 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.
//go:build 386 && hurd
// +build 386,hurd
package unix
const (
TIOCGETA = 0x62251713
)
type Winsize struct {
Row uint16
Col uint16
Xpixel uint16
Ypixel uint16
}
type Termios struct {
Iflag uint32
Oflag uint32
Cflag uint32
Lflag uint32
Cc [20]uint8
Ispeed int32
Ospeed int32
}

View file

@ -10,8 +10,6 @@
package unix package unix
import ( import (
"fmt"
"runtime"
"unsafe" "unsafe"
) )
@ -79,107 +77,3 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
} }
return return
} }
//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
var clp, datap *strbuf
if len(cl) > 0 {
clp = &strbuf{
Len: int32(len(cl)),
Buf: (*int8)(unsafe.Pointer(&cl[0])),
}
}
if len(data) > 0 {
datap = &strbuf{
Len: int32(len(data)),
Buf: (*int8)(unsafe.Pointer(&data[0])),
}
}
return putmsg(fd, clp, datap, flags)
}
//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
var clp, datap *strbuf
if len(cl) > 0 {
clp = &strbuf{
Maxlen: int32(len(cl)),
Buf: (*int8)(unsafe.Pointer(&cl[0])),
}
}
if len(data) > 0 {
datap = &strbuf{
Maxlen: int32(len(data)),
Buf: (*int8)(unsafe.Pointer(&data[0])),
}
}
if err = getmsg(fd, clp, datap, &flags); err != nil {
return nil, nil, 0, err
}
if len(cl) > 0 {
retCl = cl[:clp.Len]
}
if len(data) > 0 {
retData = data[:datap.Len]
}
return retCl, retData, flags, nil
}
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
return ioctlRet(fd, req, uintptr(arg))
}
func IoctlSetString(fd int, req uint, val string) error {
bs := make([]byte, len(val)+1)
copy(bs[:len(bs)-1], val)
err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
runtime.KeepAlive(&bs[0])
return err
}
// Lifreq Helpers
func (l *Lifreq) SetName(name string) error {
if len(name) >= len(l.Name) {
return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
}
for i := range name {
l.Name[i] = int8(name[i])
}
return nil
}
func (l *Lifreq) SetLifruInt(d int) {
*(*int)(unsafe.Pointer(&l.Lifru[0])) = d
}
func (l *Lifreq) GetLifruInt() int {
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
}
func (l *Lifreq) SetLifruUint(d uint) {
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
}
func (l *Lifreq) GetLifruUint() uint {
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
}
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
}
// Strioctl Helpers
func (s *Strioctl) SetInt(i int) {
s.Len = int32(unsafe.Sizeof(i))
s.Dp = (*int8)(unsafe.Pointer(&i))
}
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
}

View file

@ -13,6 +13,7 @@ package unix
import ( import (
"encoding/binary" "encoding/binary"
"strconv"
"syscall" "syscall"
"time" "time"
"unsafe" "unsafe"
@ -233,7 +234,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error {
func Futimes(fd int, tv []Timeval) (err error) { func Futimes(fd int, tv []Timeval) (err error) {
// Believe it or not, this is the best we can do on Linux // Believe it or not, this is the best we can do on Linux
// (and is what glibc does). // (and is what glibc does).
return Utimes("/proc/self/fd/"+itoa(fd), tv) return Utimes("/proc/self/fd/"+strconv.Itoa(fd), tv)
} }
const ImplementsGetwd = true const ImplementsGetwd = true
@ -1014,8 +1015,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
for n < len(pp.Path) && pp.Path[n] != 0 { for n < len(pp.Path) && pp.Path[n] != 0 {
n++ n++
} }
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
sa.Name = string(bytes)
return sa, nil return sa, nil
case AF_INET: case AF_INET:
@ -1364,6 +1364,10 @@ func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o))) return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
} }
func SetsockoptTCPMD5Sig(fd, level, opt int, s *TCPMD5Sig) error {
return setsockopt(fd, level, opt, unsafe.Pointer(s), unsafe.Sizeof(*s))
}
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html) // Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
// KeyctlInt calls keyctl commands in which each argument is an int. // KeyctlInt calls keyctl commands in which each argument is an int.
@ -1541,7 +1545,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
var dummy byte var dummy byte
var empty bool var empty bool
if len(oob) > 0 { if len(oob) > 0 {
empty := emptyIovecs(iov) empty = emptyIovecs(iov)
if empty { if empty {
var sockType int var sockType int
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE) sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
@ -1553,6 +1557,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
var iova [1]Iovec var iova [1]Iovec
iova[0].Base = &dummy iova[0].Base = &dummy
iova[0].SetLen(1) iova[0].SetLen(1)
iov = iova[:]
} }
} }
msg.Control = &oob[0] msg.Control = &oob[0]
@ -1577,6 +1582,7 @@ func BindToDevice(fd int, device string) (err error) {
} }
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
//sys ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) = SYS_PTRACE
func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) { func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
// The peek requests are machine-size oriented, so we wrap it // The peek requests are machine-size oriented, so we wrap it
@ -1594,7 +1600,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
// boundary. // boundary.
n := 0 n := 0
if addr%SizeofPtr != 0 { if addr%SizeofPtr != 0 {
err = ptrace(req, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0]))) err = ptracePtr(req, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))
if err != nil { if err != nil {
return 0, err return 0, err
} }
@ -1606,7 +1612,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
for len(out) > 0 { for len(out) > 0 {
// We use an internal buffer to guarantee alignment. // We use an internal buffer to guarantee alignment.
// It's not documented if this is necessary, but we're paranoid. // It's not documented if this is necessary, but we're paranoid.
err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0]))) err = ptracePtr(req, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))
if err != nil { if err != nil {
return n, err return n, err
} }
@ -1638,7 +1644,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
n := 0 n := 0
if addr%SizeofPtr != 0 { if addr%SizeofPtr != 0 {
var buf [SizeofPtr]byte var buf [SizeofPtr]byte
err = ptrace(peekReq, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0]))) err = ptracePtr(peekReq, pid, addr-addr%SizeofPtr, unsafe.Pointer(&buf[0]))
if err != nil { if err != nil {
return 0, err return 0, err
} }
@ -1665,7 +1671,7 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
// Trailing edge. // Trailing edge.
if len(data) > 0 { if len(data) > 0 {
var buf [SizeofPtr]byte var buf [SizeofPtr]byte
err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0]))) err = ptracePtr(peekReq, pid, addr+uintptr(n), unsafe.Pointer(&buf[0]))
if err != nil { if err != nil {
return n, err return n, err
} }
@ -1694,11 +1700,11 @@ func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) {
} }
func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
} }
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
} }
func PtraceSetOptions(pid int, options int) (err error) { func PtraceSetOptions(pid int, options int) (err error) {
@ -1707,7 +1713,7 @@ func PtraceSetOptions(pid int, options int) (err error) {
func PtraceGetEventMsg(pid int) (msg uint, err error) { func PtraceGetEventMsg(pid int) (msg uint, err error) {
var data _C_long var data _C_long
err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data))) err = ptracePtr(PTRACE_GETEVENTMSG, pid, 0, unsafe.Pointer(&data))
msg = uint(data) msg = uint(data)
return return
} }
@ -1798,6 +1804,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sysnb Capset(hdr *CapUserHeader, data *CapUserData) (err error) //sysnb Capset(hdr *CapUserHeader, data *CapUserData) (err error)
//sys Chdir(path string) (err error) //sys Chdir(path string) (err error)
//sys Chroot(path string) (err error) //sys Chroot(path string) (err error)
//sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
//sys ClockGetres(clockid int32, res *Timespec) (err error) //sys ClockGetres(clockid int32, res *Timespec) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) //sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
@ -1891,17 +1898,28 @@ func PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uint
return int(ret), nil return int(ret), nil
} }
// issue 1435.
// On linux Setuid and Setgid only affects the current thread, not the process.
// This does not match what most callers expect so we must return an error
// here rather than letting the caller think that the call succeeded.
func Setuid(uid int) (err error) { func Setuid(uid int) (err error) {
return EOPNOTSUPP return syscall.Setuid(uid)
} }
func Setgid(uid int) (err error) { func Setgid(gid int) (err error) {
return EOPNOTSUPP return syscall.Setgid(gid)
}
func Setreuid(ruid, euid int) (err error) {
return syscall.Setreuid(ruid, euid)
}
func Setregid(rgid, egid int) (err error) {
return syscall.Setregid(rgid, egid)
}
func Setresuid(ruid, euid, suid int) (err error) {
return syscall.Setresuid(ruid, euid, suid)
}
func Setresgid(rgid, egid, sgid int) (err error) {
return syscall.Setresgid(rgid, egid, sgid)
} }
// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set. // SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.
@ -1960,36 +1978,46 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
//sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2 //sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2
//sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2 //sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2
func bytes2iovec(bs [][]byte) []Iovec { // minIovec is the size of the small initial allocation used by
iovecs := make([]Iovec, len(bs)) // Readv, Writev, etc.
for i, b := range bs { //
iovecs[i].SetLen(len(b)) // This small allocation gets stack allocated, which lets the
// common use case of len(iovs) <= minIovs avoid more expensive
// heap allocations.
const minIovec = 8
// appendBytes converts bs to Iovecs and appends them to vecs.
func appendBytes(vecs []Iovec, bs [][]byte) []Iovec {
for _, b := range bs {
var v Iovec
v.SetLen(len(b))
if len(b) > 0 { if len(b) > 0 {
iovecs[i].Base = &b[0] v.Base = &b[0]
} else { } else {
iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero)) v.Base = (*byte)(unsafe.Pointer(&_zero))
} }
vecs = append(vecs, v)
} }
return iovecs return vecs
} }
// offs2lohi splits offs into its lower and upper unsigned long. On 64-bit // offs2lohi splits offs into its low and high order bits.
// systems, hi will always be 0. On 32-bit systems, offs will be split in half.
// preadv/pwritev chose this calling convention so they don't need to add a
// padding-register for alignment on ARM.
func offs2lohi(offs int64) (lo, hi uintptr) { func offs2lohi(offs int64) (lo, hi uintptr) {
return uintptr(offs), uintptr(uint64(offs) >> SizeofLong) const longBits = SizeofLong * 8
return uintptr(offs), uintptr(uint64(offs) >> (longBits - 1) >> 1) // two shifts to avoid false positive in vet
} }
func Readv(fd int, iovs [][]byte) (n int, err error) { func Readv(fd int, iovs [][]byte) (n int, err error) {
iovecs := bytes2iovec(iovs) iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
n, err = readv(fd, iovecs) n, err = readv(fd, iovecs)
readvRacedetect(iovecs, n, err) readvRacedetect(iovecs, n, err)
return n, err return n, err
} }
func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
iovecs := bytes2iovec(iovs) iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
lo, hi := offs2lohi(offset) lo, hi := offs2lohi(offset)
n, err = preadv(fd, iovecs, lo, hi) n, err = preadv(fd, iovecs, lo, hi)
readvRacedetect(iovecs, n, err) readvRacedetect(iovecs, n, err)
@ -1997,7 +2025,8 @@ func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
} }
func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) {
iovecs := bytes2iovec(iovs) iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
lo, hi := offs2lohi(offset) lo, hi := offs2lohi(offset)
n, err = preadv2(fd, iovecs, lo, hi, flags) n, err = preadv2(fd, iovecs, lo, hi, flags)
readvRacedetect(iovecs, n, err) readvRacedetect(iovecs, n, err)
@ -2024,7 +2053,8 @@ func readvRacedetect(iovecs []Iovec, n int, err error) {
} }
func Writev(fd int, iovs [][]byte) (n int, err error) { func Writev(fd int, iovs [][]byte) (n int, err error) {
iovecs := bytes2iovec(iovs) iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
if raceenabled { if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync)) raceReleaseMerge(unsafe.Pointer(&ioSync))
} }
@ -2034,7 +2064,8 @@ func Writev(fd int, iovs [][]byte) (n int, err error) {
} }
func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {
iovecs := bytes2iovec(iovs) iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
if raceenabled { if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync)) raceReleaseMerge(unsafe.Pointer(&ioSync))
} }
@ -2045,7 +2076,8 @@ func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {
} }
func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) {
iovecs := bytes2iovec(iovs) iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
if raceenabled { if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync)) raceReleaseMerge(unsafe.Pointer(&ioSync))
} }
@ -2126,6 +2158,14 @@ func isGroupMember(gid int) bool {
return false return false
} }
func isCapDacOverrideSet() bool {
hdr := CapUserHeader{Version: LINUX_CAPABILITY_VERSION_3}
data := [2]CapUserData{}
err := Capget(&hdr, &data[0])
return err == nil && data[0].Effective&(1<<CAP_DAC_OVERRIDE) != 0
}
//sys faccessat(dirfd int, path string, mode uint32) (err error) //sys faccessat(dirfd int, path string, mode uint32) (err error)
//sys Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) //sys Faccessat2(dirfd int, path string, mode uint32, flags int) (err error)
@ -2161,6 +2201,12 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var uid int var uid int
if flags&AT_EACCESS != 0 { if flags&AT_EACCESS != 0 {
uid = Geteuid() uid = Geteuid()
if uid != 0 && isCapDacOverrideSet() {
// If CAP_DAC_OVERRIDE is set, file access check is
// done by the kernel in the same way as for root
// (see generic_permission() in the Linux sources).
uid = 0
}
} else { } else {
uid = Getuid() uid = Getuid()
} }
@ -2240,7 +2286,7 @@ func (fh *FileHandle) Bytes() []byte {
if n == 0 { if n == 0 {
return nil return nil
} }
return (*[1 << 30]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type)) + 4))[:n:n] return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n)
} }
// NameToHandleAt wraps the name_to_handle_at system call; it obtains // NameToHandleAt wraps the name_to_handle_at system call; it obtains
@ -2356,6 +2402,16 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
return prev, nil return prev, nil
} }
//sysnb rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) = SYS_RT_SIGPROCMASK
func PthreadSigmask(how int, set, oldset *Sigset_t) error {
if oldset != nil {
// Explicitly clear in case Sigset_t is larger than _C__NSIG.
*oldset = Sigset_t{}
}
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
}
/* /*
* Unimplemented * Unimplemented
*/ */
@ -2414,7 +2470,6 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
// RestartSyscall // RestartSyscall
// RtSigaction // RtSigaction
// RtSigpending // RtSigpending
// RtSigprocmask
// RtSigqueueinfo // RtSigqueueinfo
// RtSigreturn // RtSigreturn
// RtSigsuspend // RtSigsuspend

View file

@ -41,10 +41,6 @@ func setTimeval(sec, usec int64) Timeval {
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32 //sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32 //sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)

View file

@ -46,11 +46,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)

View file

@ -62,10 +62,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32 //sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32 //sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64

View file

@ -39,11 +39,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb setrlimit(resource int, rlim *Rlimit) (err error) //sysnb setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)

View file

@ -34,10 +34,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)

View file

@ -37,11 +37,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Statfs(path string, buf *Statfs_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error)

View file

@ -32,10 +32,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)

View file

@ -34,10 +34,6 @@ import (
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64

View file

@ -34,11 +34,7 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error) //sys Stat(path string, stat *Stat_t) (err error)

View file

@ -38,11 +38,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)

View file

@ -34,11 +34,7 @@ import (
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error) //sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, buf *Statfs_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error)

View file

@ -31,11 +31,7 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error) //sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error) //sys Stat(path string, stat *Stat_t) (err error)

View file

@ -13,7 +13,6 @@
package unix package unix
import ( import (
"runtime"
"syscall" "syscall"
"unsafe" "unsafe"
) )
@ -110,6 +109,20 @@ func direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
} }
func SysctlUvmexp(name string) (*Uvmexp, error) {
mib, err := sysctlmib(name)
if err != nil {
return nil, err
}
n := uintptr(SizeofUvmexp)
var u Uvmexp
if err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil {
return nil, err
}
return &u, nil
}
func Pipe(p []int) (err error) { func Pipe(p []int) (err error) {
return Pipe2(p, 0) return Pipe2(p, 0)
} }
@ -164,13 +177,13 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
} }
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) { func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
var value Ptmget var value Ptmget
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) err := ioctlPtr(fd, req, unsafe.Pointer(&value))
runtime.KeepAlive(value)
return &value, err return &value, err
} }
@ -245,6 +258,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
//sys Chmod(path string, mode uint32) (err error) //sys Chmod(path string, mode uint32) (err error)
//sys Chown(path string, uid int, gid int) (err error) //sys Chown(path string, uid int, gid int) (err error)
//sys Chroot(path string) (err error) //sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error) //sys Close(fd int) (err error)
//sys Dup(fd int) (nfd int, err error) //sys Dup(fd int) (nfd int, err error)
//sys Dup2(from int, to int) (err error) //sys Dup2(from int, to int) (err error)

View file

@ -152,6 +152,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
} }
//sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@ -220,6 +221,7 @@ func Uname(uname *Utsname) error {
//sys Chmod(path string, mode uint32) (err error) //sys Chmod(path string, mode uint32) (err error)
//sys Chown(path string, uid int, gid int) (err error) //sys Chown(path string, uid int, gid int) (err error)
//sys Chroot(path string) (err error) //sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error) //sys Close(fd int) (err error)
//sys Dup(fd int) (nfd int, err error) //sys Dup(fd int) (nfd int, err error)
//sys Dup2(from int, to int) (err error) //sys Dup2(from int, to int) (err error)

27
vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go generated vendored Normal file
View file

@ -0,0 +1,27 @@
// Copyright 2022 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.
//go:build openbsd
// +build openbsd
package unix
import _ "unsafe"
// Implemented in the runtime package (runtime/sys_openbsd3.go)
func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno)
func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
//go:linkname syscall_syscall syscall.syscall
//go:linkname syscall_syscall6 syscall.syscall6
//go:linkname syscall_syscall10 syscall.syscall10
//go:linkname syscall_rawSyscall syscall.rawSyscall
//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) {
return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0)
}

42
vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go generated vendored Normal file
View file

@ -0,0 +1,42 @@
// 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.
//go:build ppc64 && openbsd
// +build ppc64,openbsd
package unix
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
}
func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)
k.Filter = int16(mode)
k.Flags = uint16(flags)
}
func (iov *Iovec) SetLen(length int) {
iov.Len = uint64(length)
}
func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
func (msghdr *Msghdr) SetIovlen(length int) {
msghdr.Iovlen = uint32(length)
}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
// of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
const SYS___SYSCTL = SYS_SYSCTL

View file

@ -0,0 +1,42 @@
// 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.
//go:build riscv64 && openbsd
// +build riscv64,openbsd
package unix
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
}
func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)
k.Filter = int16(mode)
k.Flags = uint16(flags)
}
func (iov *Iovec) SetLen(length int) {
iov.Len = uint64(length)
}
func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
func (msghdr *Msghdr) SetIovlen(length int) {
msghdr.Iovlen = uint32(length)
}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
// of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
const SYS___SYSCTL = SYS_SYSCTL

View file

@ -408,8 +408,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
for n < len(pp.Path) && pp.Path[n] != 0 { for n < len(pp.Path) && pp.Path[n] != 0 {
n++ n++
} }
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
sa.Name = string(bytes)
return sa, nil return sa, nil
case AF_INET: case AF_INET:
@ -547,21 +546,25 @@ func Minor(dev uint64) uint32 {
*/ */
//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl //sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
//sys ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
func ioctl(fd int, req uint, arg uintptr) (err error) { func ioctl(fd int, req uint, arg uintptr) (err error) {
_, err = ioctlRet(fd, req, arg) _, err = ioctlRet(fd, req, arg)
return err return err
} }
func IoctlSetTermio(fd int, req uint, value *Termio) error { func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
err := ioctl(fd, req, uintptr(unsafe.Pointer(value))) _, err = ioctlPtrRet(fd, req, arg)
runtime.KeepAlive(value)
return err return err
} }
func IoctlSetTermio(fd int, req uint, value *Termio) error {
return ioctlPtr(fd, req, unsafe.Pointer(value))
}
func IoctlGetTermio(fd int, req uint) (*Termio, error) { func IoctlGetTermio(fd int, req uint) (*Termio, error) {
var value Termio var value Termio
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return &value, err return &value, err
} }
@ -590,6 +593,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Chmod(path string, mode uint32) (err error) //sys Chmod(path string, mode uint32) (err error)
//sys Chown(path string, uid int, gid int) (err error) //sys Chown(path string, uid int, gid int) (err error)
//sys Chroot(path string) (err error) //sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error) //sys Close(fd int) (err error)
//sys Creat(path string, mode uint32) (fd int, err error) //sys Creat(path string, mode uint32) (fd int, err error)
//sys Dup(fd int) (nfd int, err error) //sys Dup(fd int) (nfd int, err error)
@ -750,8 +754,8 @@ type EventPort struct {
// we should handle things gracefully. To do so, we need to keep an extra // we should handle things gracefully. To do so, we need to keep an extra
// reference to the cookie around until the event is processed // reference to the cookie around until the event is processed
// thus the otherwise seemingly extraneous "cookies" map // thus the otherwise seemingly extraneous "cookies" map
// The key of this map is a pointer to the corresponding &fCookie.cookie // The key of this map is a pointer to the corresponding fCookie
cookies map[*interface{}]*fileObjCookie cookies map[*fileObjCookie]struct{}
} }
// PortEvent is an abstraction of the port_event C struct. // PortEvent is an abstraction of the port_event C struct.
@ -778,7 +782,7 @@ func NewEventPort() (*EventPort, error) {
port: port, port: port,
fds: make(map[uintptr]*fileObjCookie), fds: make(map[uintptr]*fileObjCookie),
paths: make(map[string]*fileObjCookie), paths: make(map[string]*fileObjCookie),
cookies: make(map[*interface{}]*fileObjCookie), cookies: make(map[*fileObjCookie]struct{}),
} }
return e, nil return e, nil
} }
@ -799,6 +803,7 @@ func (e *EventPort) Close() error {
} }
e.fds = nil e.fds = nil
e.paths = nil e.paths = nil
e.cookies = nil
return nil return nil
} }
@ -826,17 +831,16 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
if _, found := e.paths[path]; found { if _, found := e.paths[path]; found {
return fmt.Errorf("%v is already associated with this Event Port", path) return fmt.Errorf("%v is already associated with this Event Port", path)
} }
fobj, err := createFileObj(path, stat) fCookie, err := createFileObjCookie(path, stat, cookie)
if err != nil { if err != nil {
return err return err
} }
fCookie := &fileObjCookie{fobj, cookie} _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fCookie.fobj)), events, (*byte)(unsafe.Pointer(fCookie)))
_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
if err != nil { if err != nil {
return err return err
} }
e.paths[path] = fCookie e.paths[path] = fCookie
e.cookies[&fCookie.cookie] = fCookie e.cookies[fCookie] = struct{}{}
return nil return nil
} }
@ -858,7 +862,7 @@ func (e *EventPort) DissociatePath(path string) error {
if err == nil { if err == nil {
// dissociate was successful, safe to delete the cookie // dissociate was successful, safe to delete the cookie
fCookie := e.paths[path] fCookie := e.paths[path]
delete(e.cookies, &fCookie.cookie) delete(e.cookies, fCookie)
} }
delete(e.paths, path) delete(e.paths, path)
return err return err
@ -871,13 +875,16 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
if _, found := e.fds[fd]; found { if _, found := e.fds[fd]; found {
return fmt.Errorf("%v is already associated with this Event Port", fd) return fmt.Errorf("%v is already associated with this Event Port", fd)
} }
fCookie := &fileObjCookie{nil, cookie} fCookie, err := createFileObjCookie("", nil, cookie)
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie))) if err != nil {
return err
}
_, err = port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(fCookie)))
if err != nil { if err != nil {
return err return err
} }
e.fds[fd] = fCookie e.fds[fd] = fCookie
e.cookies[&fCookie.cookie] = fCookie e.cookies[fCookie] = struct{}{}
return nil return nil
} }
@ -896,27 +903,31 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
if err == nil { if err == nil {
// dissociate was successful, safe to delete the cookie // dissociate was successful, safe to delete the cookie
fCookie := e.fds[fd] fCookie := e.fds[fd]
delete(e.cookies, &fCookie.cookie) delete(e.cookies, fCookie)
} }
delete(e.fds, fd) delete(e.fds, fd)
return err return err
} }
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) { func createFileObjCookie(name string, stat os.FileInfo, cookie interface{}) (*fileObjCookie, error) {
fobj := new(fileObj) fCookie := new(fileObjCookie)
bs, err := ByteSliceFromString(name) fCookie.cookie = cookie
if err != nil { if name != "" && stat != nil {
return nil, err fCookie.fobj = new(fileObj)
bs, err := ByteSliceFromString(name)
if err != nil {
return nil, err
}
fCookie.fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
s := stat.Sys().(*syscall.Stat_t)
fCookie.fobj.Atim.Sec = s.Atim.Sec
fCookie.fobj.Atim.Nsec = s.Atim.Nsec
fCookie.fobj.Mtim.Sec = s.Mtim.Sec
fCookie.fobj.Mtim.Nsec = s.Mtim.Nsec
fCookie.fobj.Ctim.Sec = s.Ctim.Sec
fCookie.fobj.Ctim.Nsec = s.Ctim.Nsec
} }
fobj.Name = (*int8)(unsafe.Pointer(&bs[0])) return fCookie, nil
s := stat.Sys().(*syscall.Stat_t)
fobj.Atim.Sec = s.Atim.Sec
fobj.Atim.Nsec = s.Atim.Nsec
fobj.Mtim.Sec = s.Mtim.Sec
fobj.Mtim.Nsec = s.Mtim.Nsec
fobj.Ctim.Sec = s.Ctim.Sec
fobj.Ctim.Nsec = s.Ctim.Nsec
return fobj, nil
} }
// GetOne wraps port_get(3c) and returns a single PortEvent. // GetOne wraps port_get(3c) and returns a single PortEvent.
@ -929,44 +940,50 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
p := new(PortEvent) p := new(PortEvent)
e.mu.Lock() e.mu.Lock()
defer e.mu.Unlock() defer e.mu.Unlock()
e.peIntToExt(pe, p) err = e.peIntToExt(pe, p)
if err != nil {
return nil, err
}
return p, nil return p, nil
} }
// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent // peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
// NOTE: Always call this function while holding the e.mu mutex // NOTE: Always call this function while holding the e.mu mutex
func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) { func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) error {
if e.cookies == nil {
return fmt.Errorf("this EventPort is already closed")
}
peExt.Events = peInt.Events peExt.Events = peInt.Events
peExt.Source = peInt.Source peExt.Source = peInt.Source
cookie := (*interface{})(unsafe.Pointer(peInt.User)) fCookie := (*fileObjCookie)(unsafe.Pointer(peInt.User))
peExt.Cookie = *cookie _, found := e.cookies[fCookie]
if !found {
panic("unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254")
}
peExt.Cookie = fCookie.cookie
delete(e.cookies, fCookie)
switch peInt.Source { switch peInt.Source {
case PORT_SOURCE_FD: case PORT_SOURCE_FD:
delete(e.cookies, cookie)
peExt.Fd = uintptr(peInt.Object) peExt.Fd = uintptr(peInt.Object)
// Only remove the fds entry if it exists and this cookie matches // Only remove the fds entry if it exists and this cookie matches
if fobj, ok := e.fds[peExt.Fd]; ok { if fobj, ok := e.fds[peExt.Fd]; ok {
if &fobj.cookie == cookie { if fobj == fCookie {
delete(e.fds, peExt.Fd) delete(e.fds, peExt.Fd)
} }
} }
case PORT_SOURCE_FILE: case PORT_SOURCE_FILE:
if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) { peExt.fobj = fCookie.fobj
// Use our stashed reference rather than using unsafe on what we got back
// the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
peExt.fobj = fCookie.fobj
} else {
panic("mismanaged memory")
}
delete(e.cookies, cookie)
peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name))) peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
// Only remove the paths entry if it exists and this cookie matches // Only remove the paths entry if it exists and this cookie matches
if fobj, ok := e.paths[peExt.Path]; ok { if fobj, ok := e.paths[peExt.Path]; ok {
if &fobj.cookie == cookie { if fobj == fCookie {
delete(e.paths, peExt.Path) delete(e.paths, peExt.Path)
} }
} }
} }
return nil
} }
// Pending wraps port_getn(3c) and returns how many events are pending. // Pending wraps port_getn(3c) and returns how many events are pending.
@ -990,7 +1007,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
got := uint32(min) got := uint32(min)
max := uint32(len(s)) max := uint32(len(s))
var err error var err error
ps := make([]portEvent, max, max) ps := make([]portEvent, max)
_, err = port_getn(e.port, &ps[0], max, &got, timeout) _, err = port_getn(e.port, &ps[0], max, &got, timeout)
// got will be trustworthy with ETIME, but not any other error. // got will be trustworthy with ETIME, but not any other error.
if err != nil && err != ETIME { if err != nil && err != ETIME {
@ -998,8 +1015,122 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
} }
e.mu.Lock() e.mu.Lock()
defer e.mu.Unlock() defer e.mu.Unlock()
valid := 0
for i := 0; i < int(got); i++ { for i := 0; i < int(got); i++ {
e.peIntToExt(&ps[i], &s[i]) err2 := e.peIntToExt(&ps[i], &s[i])
if err2 != nil {
if valid == 0 && err == nil {
// If err2 is the only error and there are no valid events
// to return, return it to the caller.
err = err2
}
break
}
valid = i + 1
} }
return int(got), err return valid, err
}
//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
var clp, datap *strbuf
if len(cl) > 0 {
clp = &strbuf{
Len: int32(len(cl)),
Buf: (*int8)(unsafe.Pointer(&cl[0])),
}
}
if len(data) > 0 {
datap = &strbuf{
Len: int32(len(data)),
Buf: (*int8)(unsafe.Pointer(&data[0])),
}
}
return putmsg(fd, clp, datap, flags)
}
//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
var clp, datap *strbuf
if len(cl) > 0 {
clp = &strbuf{
Maxlen: int32(len(cl)),
Buf: (*int8)(unsafe.Pointer(&cl[0])),
}
}
if len(data) > 0 {
datap = &strbuf{
Maxlen: int32(len(data)),
Buf: (*int8)(unsafe.Pointer(&data[0])),
}
}
if err = getmsg(fd, clp, datap, &flags); err != nil {
return nil, nil, 0, err
}
if len(cl) > 0 {
retCl = cl[:clp.Len]
}
if len(data) > 0 {
retData = data[:datap.Len]
}
return retCl, retData, flags, nil
}
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
return ioctlRet(fd, req, uintptr(arg))
}
func IoctlSetString(fd int, req uint, val string) error {
bs := make([]byte, len(val)+1)
copy(bs[:len(bs)-1], val)
err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))
runtime.KeepAlive(&bs[0])
return err
}
// Lifreq Helpers
func (l *Lifreq) SetName(name string) error {
if len(name) >= len(l.Name) {
return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
}
for i := range name {
l.Name[i] = int8(name[i])
}
return nil
}
func (l *Lifreq) SetLifruInt(d int) {
*(*int)(unsafe.Pointer(&l.Lifru[0])) = d
}
func (l *Lifreq) GetLifruInt() int {
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
}
func (l *Lifreq) SetLifruUint(d uint) {
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
}
func (l *Lifreq) GetLifruUint() uint {
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
}
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
return ioctlPtr(fd, req, unsafe.Pointer(l))
}
// Strioctl Helpers
func (s *Strioctl) SetInt(i int) {
s.Len = int32(unsafe.Sizeof(i))
s.Dp = (*int8)(unsafe.Pointer(&i))
}
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
return ioctlPtrRet(fd, req, unsafe.Pointer(s))
} }

View file

@ -13,8 +13,6 @@ import (
"sync" "sync"
"syscall" "syscall"
"unsafe" "unsafe"
"golang.org/x/sys/internal/unsafeheader"
) )
var ( var (
@ -117,11 +115,7 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
} }
// Use unsafe to convert addr into a []byte. // Use unsafe to convert addr into a []byte.
var b []byte b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
hdr.Data = unsafe.Pointer(addr)
hdr.Cap = length
hdr.Len = length
// Register mapping in m and return it. // Register mapping in m and return it.
p := &b[cap(b)-1] p := &b[cap(b)-1]
@ -337,6 +331,19 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
return return
} }
// Recvmsg receives a message from a socket using the recvmsg system call. The
// received non-control data will be written to p, and any "out of band"
// control data will be written to oob. The flags are passed to recvmsg.
//
// The results are:
// - n is the number of non-control data bytes read into p
// - oobn is the number of control data bytes read into oob; this may be interpreted using [ParseSocketControlMessage]
// - recvflags is flags returned by recvmsg
// - from is the address of the sender
//
// If the underlying socket type is not SOCK_DGRAM, a received message
// containing oob data and a single '\0' of non-control data is treated as if
// the message contained only control data, i.e. n will be zero on return.
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var iov [1]Iovec var iov [1]Iovec
if len(p) > 0 { if len(p) > 0 {
@ -352,13 +359,9 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
return return
} }
// RecvmsgBuffers receives a message from a socket using the recvmsg // RecvmsgBuffers receives a message from a socket using the recvmsg system
// system call. The flags are passed to recvmsg. Any non-control data // call. This function is equivalent to Recvmsg, but non-control data read is
// read is scattered into the buffers slices. The results are: // scattered into the buffers slices.
// - n is the number of non-control data read into bufs
// - oobn is the number of control data read into oob; this may be interpreted using [ParseSocketControlMessage]
// - recvflags is flags returned by recvmsg
// - from is the address of the sender
func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
iov := make([]Iovec, len(buffers)) iov := make([]Iovec, len(buffers))
for i := range buffers { for i := range buffers {
@ -377,11 +380,38 @@ func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn in
return return
} }
// Sendmsg sends a message on a socket to an address using the sendmsg system
// call. This function is equivalent to SendmsgN, but does not return the
// number of bytes actually sent.
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
_, err = SendmsgN(fd, p, oob, to, flags) _, err = SendmsgN(fd, p, oob, to, flags)
return return
} }
// SendmsgN sends a message on a socket to an address using the sendmsg system
// call. p contains the non-control data to send, and oob contains the "out of
// band" control data. The flags are passed to sendmsg. The number of
// non-control bytes actually written to the socket is returned.
//
// Some socket types do not support sending control data without accompanying
// non-control data. If p is empty, and oob contains control data, and the
// underlying socket type is not SOCK_DGRAM, p will be treated as containing a
// single '\0' and the return value will indicate zero bytes sent.
//
// The Go function Recvmsg, if called with an empty p and a non-empty oob,
// will read and ignore this additional '\0'. If the message is received by
// code that does not use Recvmsg, or that does not use Go at all, that code
// will need to be written to expect and ignore the additional '\0'.
//
// If you need to send non-empty oob with p actually empty, and if the
// underlying socket type supports it, you can do so via a raw system call as
// follows:
//
// msg := &unix.Msghdr{
// Control: &oob[0],
// }
// msg.SetControllen(len(oob))
// n, _, errno := unix.Syscall(unix.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(msg)), flags)
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
var iov [1]Iovec var iov [1]Iovec
if len(p) > 0 { if len(p) > 0 {
@ -400,9 +430,8 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
} }
// SendmsgBuffers sends a message on a socket to an address using the sendmsg // SendmsgBuffers sends a message on a socket to an address using the sendmsg
// system call. The flags are passed to sendmsg. Any non-control data written // system call. This function is equivalent to SendmsgN, but the non-control
// is gathered from buffers. The function returns the number of bytes written // data is gathered from buffers.
// to the socket.
func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) { func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) {
iov := make([]Iovec, len(buffers)) iov := make([]Iovec, len(buffers))
for i := range buffers { for i := range buffers {
@ -429,11 +458,15 @@ func Send(s int, buf []byte, flags int) (err error) {
} }
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) { func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
ptr, n, err := to.sockaddr() var ptr unsafe.Pointer
if err != nil { var salen _Socklen
return err if to != nil {
ptr, salen, err = to.sockaddr()
if err != nil {
return err
}
} }
return sendto(fd, p, flags, ptr, n) return sendto(fd, p, flags, ptr, salen)
} }
func SetsockoptByte(fd, level, opt int, value byte) (err error) { func SetsockoptByte(fd, level, opt int, value byte) (err error) {
@ -545,7 +578,7 @@ func Lutimes(path string, tv []Timeval) error {
return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW) return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
} }
// emptyIovec reports whether there are no bytes in the slice of Iovec. // emptyIovecs reports whether there are no bytes in the slice of Iovec.
func emptyIovecs(iov []Iovec) bool { func emptyIovecs(iov []Iovec) bool {
for i := range iov { for i := range iov {
if iov[i].Len > 0 { if iov[i].Len > 0 {

View file

@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64 //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
// +build darwin dragonfly freebsd linux netbsd openbsd solaris // +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
// +build gc // +build gc
// +build !ppc64le
// +build !ppc64
package unix package unix

View file

@ -9,8 +9,10 @@ package unix
import ( import (
"bytes" "bytes"
"fmt"
"runtime" "runtime"
"sort" "sort"
"strings"
"sync" "sync"
"syscall" "syscall"
"unsafe" "unsafe"
@ -55,7 +57,13 @@ func (d *Dirent) NameString() string {
if d == nil { if d == nil {
return "" return ""
} }
return string(d.Name[:d.Namlen]) s := string(d.Name[:])
idx := strings.IndexByte(s, 0)
if idx == -1 {
return s
} else {
return s[:idx]
}
} }
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
@ -131,8 +139,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
for n < int(pp.Len) && pp.Path[n] != 0 { for n < int(pp.Len) && pp.Path[n] != 0 {
n++ n++
} }
bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n))
sa.Name = string(bytes)
return sa, nil return sa, nil
case AF_INET: case AF_INET:
@ -206,6 +213,7 @@ func (cmsg *Cmsghdr) SetLen(length int) {
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP
//sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP //sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP
//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL //sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
//sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A //sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A
//sys Chdir(path string) (err error) = SYS___CHDIR_A //sys Chdir(path string) (err error) = SYS___CHDIR_A
@ -1230,6 +1238,14 @@ func Readdir(dir uintptr) (*Dirent, error) {
return &ent, err return &ent, err
} }
func readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) {
r0, _, e1 := syscall_syscall(SYS___READDIR_R_A, dirp, uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
if int64(r0) == -1 {
err = errnoErr(Errno(e1))
}
return
}
func Closedir(dir uintptr) error { func Closedir(dir uintptr) error {
_, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0) _, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
if e != 0 { if e != 0 {
@ -1821,3 +1837,158 @@ func Unmount(name string, mtm int) (err error) {
} }
return err return err
} }
func fdToPath(dirfd int) (path string, err error) {
var buffer [1024]byte
// w_ctrl()
ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4,
[]uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))})
if ret == 0 {
zb := bytes.IndexByte(buffer[:], 0)
if zb == -1 {
zb = len(buffer)
}
// __e2a_l()
runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4,
[]uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)})
return string(buffer[:zb]), nil
}
// __errno()
errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4,
[]uintptr{}))))
// __errno2()
errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4,
[]uintptr{}))
// strerror_r()
ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4,
[]uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024})
if ret == 0 {
zb := bytes.IndexByte(buffer[:], 0)
if zb == -1 {
zb = len(buffer)
}
return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2)
} else {
return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2)
}
}
func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) {
var d Dirent
d.Ino = uint64(dirent.Ino)
offset, err := Telldir(dir)
if err != nil {
return d, err
}
d.Off = int64(offset)
s := string(bytes.Split(dirent.Name[:], []byte{0})[0])
copy(d.Name[:], s)
d.Reclen = uint16(24 + len(d.NameString()))
var st Stat_t
path = path + "/" + s
err = Lstat(path, &st)
if err != nil {
return d, err
}
d.Type = uint8(st.Mode >> 24)
return d, err
}
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// Simulation of Getdirentries port from the Darwin implementation.
// COMMENTS FROM DARWIN:
// It's not the full required semantics, but should handle the case
// of calling Getdirentries or ReadDirent repeatedly.
// It won't handle assigning the results of lseek to *basep, or handle
// the directory being edited underfoot.
skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
if err != nil {
return 0, err
}
// Get path from fd to avoid unavailable call (fdopendir)
path, err := fdToPath(fd)
if err != nil {
return 0, err
}
d, err := Opendir(path)
if err != nil {
return 0, err
}
defer Closedir(d)
var cnt int64
for {
var entryLE direntLE
var entrypLE *direntLE
e := readdir_r(d, &entryLE, &entrypLE)
if e != nil {
return n, e
}
if entrypLE == nil {
break
}
if skip > 0 {
skip--
cnt++
continue
}
// Dirent on zos has a different structure
entry, e := direntLeToDirentUnix(&entryLE, d, path)
if e != nil {
return n, e
}
reclen := int(entry.Reclen)
if reclen > len(buf) {
// Not enough room. Return for now.
// The counter will let us know where we should start up again.
// Note: this strategy for suspending in the middle and
// restarting is O(n^2) in the length of the directory. Oh well.
break
}
// Copy entry into return buffer.
s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
copy(buf, s)
buf = buf[reclen:]
n += reclen
cnt++
}
// Set the seek offset of the input fd to record
// how many files we've already returned.
_, err = Seek(fd, cnt, 0 /* SEEK_SET */)
if err != nil {
return n, err
}
return n, nil
}
func ReadDirent(fd int, buf []byte) (n int, err error) {
var base = (*uintptr)(unsafe.Pointer(new(uint64)))
return Getdirentries(fd, buf, base)
}
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
}

View file

@ -7,11 +7,7 @@
package unix package unix
import ( import "unsafe"
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
)
// SysvShmAttach attaches the Sysv shared memory segment associated with the // SysvShmAttach attaches the Sysv shared memory segment associated with the
// shared memory identifier id. // shared memory identifier id.
@ -34,12 +30,7 @@ func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
} }
// Use unsafe to convert addr into a []byte. // Use unsafe to convert addr into a []byte.
// TODO: convert to unsafe.Slice once we can assume Go 1.17 b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))
var b []byte
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
hdr.Data = unsafe.Pointer(addr)
hdr.Cap = int(info.Segsz)
hdr.Len = int(info.Segsz)
return b, nil return b, nil
} }

View file

@ -9,7 +9,7 @@ package unix
import "time" import "time"
// TimespecToNSec returns the time stored in ts as nanoseconds. // TimespecToNsec returns the time stored in ts as nanoseconds.
func TimespecToNsec(ts Timespec) int64 { return ts.Nano() } func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
// NsecToTimespec converts a number of nanoseconds into a Timespec. // NsecToTimespec converts a number of nanoseconds into a Timespec.

View file

@ -36,9 +36,14 @@ func xattrnamespace(fullattr string) (ns int, attr string, err error) {
func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) { func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
if len(dest) > idx { if len(dest) > idx {
return unsafe.Pointer(&dest[idx]) return unsafe.Pointer(&dest[idx])
} else {
return unsafe.Pointer(_zero)
} }
if dest != nil {
// extattr_get_file and extattr_list_file treat NULL differently from
// a non-NULL pointer of length zero. Preserve the property of nilness,
// even if we can't use dest directly.
return unsafe.Pointer(&_zero)
}
return nil
} }
// FreeBSD and NetBSD implement their own syscalls to handle extended attributes // FreeBSD and NetBSD implement their own syscalls to handle extended attributes
@ -160,13 +165,12 @@ func Lremovexattr(link string, attr string) (err error) {
} }
func Listxattr(file string, dest []byte) (sz int, err error) { func Listxattr(file string, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest) destsiz := len(dest)
// FreeBSD won't allow you to list xattrs from multiple namespaces // FreeBSD won't allow you to list xattrs from multiple namespaces
s := 0 s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz) stmp, e := ListxattrNS(file, nsid, dest[pos:])
/* Errors accessing system attrs are ignored so that /* Errors accessing system attrs are ignored so that
* we can implement the Linux-like behavior of omitting errors that * we can implement the Linux-like behavior of omitting errors that
@ -175,66 +179,102 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
* Linux will still error if we ask for user attributes on a file that * Linux will still error if we ask for user attributes on a file that
* we don't have read permissions on, so don't ignore those errors * we don't have read permissions on, so don't ignore those errors
*/ */
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { if e != nil {
continue if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
} else if e != nil { continue
}
return s, e return s, e
} }
s += stmp s += stmp
destsiz -= s pos = s
if destsiz < 0 { if pos > destsiz {
destsiz = 0 pos = destsiz
} }
d = initxattrdest(dest, s) }
return s, nil
}
func ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
s, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
if e != nil {
return 0, err
} }
return s, nil return s, nil
} }
func Flistxattr(fd int, dest []byte) (sz int, err error) { func Flistxattr(fd int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest) destsiz := len(dest)
s := 0 s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz) stmp, e := FlistxattrNS(fd, nsid, dest[pos:])
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
continue if e != nil {
} else if e != nil { if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
continue
}
return s, e return s, e
} }
s += stmp s += stmp
destsiz -= s pos = s
if destsiz < 0 { if pos > destsiz {
destsiz = 0 pos = destsiz
} }
d = initxattrdest(dest, s) }
return s, nil
}
func FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
s, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
if e != nil {
return 0, err
} }
return s, nil return s, nil
} }
func Llistxattr(link string, dest []byte) (sz int, err error) { func Llistxattr(link string, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest) destsiz := len(dest)
s := 0 s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz) stmp, e := LlistxattrNS(link, nsid, dest[pos:])
if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
continue if e != nil {
} else if e != nil { if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
continue
}
return s, e return s, e
} }
s += stmp s += stmp
destsiz -= s pos = s
if destsiz < 0 { if pos > destsiz {
destsiz = 0 pos = destsiz
} }
d = initxattrdest(dest, s) }
return s, nil
}
func LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
s, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
if e != nil {
return 0, err
} }
return s, nil return s, nil

2148
vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -70,6 +70,7 @@ const (
ALG_SET_DRBG_ENTROPY = 0x6 ALG_SET_DRBG_ENTROPY = 0x6
ALG_SET_IV = 0x2 ALG_SET_IV = 0x2
ALG_SET_KEY = 0x1 ALG_SET_KEY = 0x1
ALG_SET_KEY_BY_KEY_SERIAL = 0x7
ALG_SET_OP = 0x3 ALG_SET_OP = 0x3
ANON_INODE_FS_MAGIC = 0x9041934 ANON_INODE_FS_MAGIC = 0x9041934
ARPHRD_6LOWPAN = 0x339 ARPHRD_6LOWPAN = 0x339
@ -140,6 +141,306 @@ const (
ARPHRD_VOID = 0xffff ARPHRD_VOID = 0xffff
ARPHRD_VSOCKMON = 0x33a ARPHRD_VSOCKMON = 0x33a
ARPHRD_X25 = 0x10f ARPHRD_X25 = 0x10f
AUDIT_ADD = 0x3eb
AUDIT_ADD_RULE = 0x3f3
AUDIT_ALWAYS = 0x2
AUDIT_ANOM_ABEND = 0x6a5
AUDIT_ANOM_CREAT = 0x6a7
AUDIT_ANOM_LINK = 0x6a6
AUDIT_ANOM_PROMISCUOUS = 0x6a4
AUDIT_ARCH = 0xb
AUDIT_ARCH_AARCH64 = 0xc00000b7
AUDIT_ARCH_ALPHA = 0xc0009026
AUDIT_ARCH_ARCOMPACT = 0x4000005d
AUDIT_ARCH_ARCOMPACTBE = 0x5d
AUDIT_ARCH_ARCV2 = 0x400000c3
AUDIT_ARCH_ARCV2BE = 0xc3
AUDIT_ARCH_ARM = 0x40000028
AUDIT_ARCH_ARMEB = 0x28
AUDIT_ARCH_C6X = 0x4000008c
AUDIT_ARCH_C6XBE = 0x8c
AUDIT_ARCH_CRIS = 0x4000004c
AUDIT_ARCH_CSKY = 0x400000fc
AUDIT_ARCH_FRV = 0x5441
AUDIT_ARCH_H8300 = 0x2e
AUDIT_ARCH_HEXAGON = 0xa4
AUDIT_ARCH_I386 = 0x40000003
AUDIT_ARCH_IA64 = 0xc0000032
AUDIT_ARCH_LOONGARCH32 = 0x40000102
AUDIT_ARCH_LOONGARCH64 = 0xc0000102
AUDIT_ARCH_M32R = 0x58
AUDIT_ARCH_M68K = 0x4
AUDIT_ARCH_MICROBLAZE = 0xbd
AUDIT_ARCH_MIPS = 0x8
AUDIT_ARCH_MIPS64 = 0x80000008
AUDIT_ARCH_MIPS64N32 = 0xa0000008
AUDIT_ARCH_MIPSEL = 0x40000008
AUDIT_ARCH_MIPSEL64 = 0xc0000008
AUDIT_ARCH_MIPSEL64N32 = 0xe0000008
AUDIT_ARCH_NDS32 = 0x400000a7
AUDIT_ARCH_NDS32BE = 0xa7
AUDIT_ARCH_NIOS2 = 0x40000071
AUDIT_ARCH_OPENRISC = 0x5c
AUDIT_ARCH_PARISC = 0xf
AUDIT_ARCH_PARISC64 = 0x8000000f
AUDIT_ARCH_PPC = 0x14
AUDIT_ARCH_PPC64 = 0x80000015
AUDIT_ARCH_PPC64LE = 0xc0000015
AUDIT_ARCH_RISCV32 = 0x400000f3
AUDIT_ARCH_RISCV64 = 0xc00000f3
AUDIT_ARCH_S390 = 0x16
AUDIT_ARCH_S390X = 0x80000016
AUDIT_ARCH_SH = 0x2a
AUDIT_ARCH_SH64 = 0x8000002a
AUDIT_ARCH_SHEL = 0x4000002a
AUDIT_ARCH_SHEL64 = 0xc000002a
AUDIT_ARCH_SPARC = 0x2
AUDIT_ARCH_SPARC64 = 0x8000002b
AUDIT_ARCH_TILEGX = 0xc00000bf
AUDIT_ARCH_TILEGX32 = 0x400000bf
AUDIT_ARCH_TILEPRO = 0x400000bc
AUDIT_ARCH_UNICORE = 0x4000006e
AUDIT_ARCH_X86_64 = 0xc000003e
AUDIT_ARCH_XTENSA = 0x5e
AUDIT_ARG0 = 0xc8
AUDIT_ARG1 = 0xc9
AUDIT_ARG2 = 0xca
AUDIT_ARG3 = 0xcb
AUDIT_AVC = 0x578
AUDIT_AVC_PATH = 0x57a
AUDIT_BITMASK_SIZE = 0x40
AUDIT_BIT_MASK = 0x8000000
AUDIT_BIT_TEST = 0x48000000
AUDIT_BPF = 0x536
AUDIT_BPRM_FCAPS = 0x529
AUDIT_CAPSET = 0x52a
AUDIT_CLASS_CHATTR = 0x2
AUDIT_CLASS_CHATTR_32 = 0x3
AUDIT_CLASS_DIR_WRITE = 0x0
AUDIT_CLASS_DIR_WRITE_32 = 0x1
AUDIT_CLASS_READ = 0x4
AUDIT_CLASS_READ_32 = 0x5
AUDIT_CLASS_SIGNAL = 0x8
AUDIT_CLASS_SIGNAL_32 = 0x9
AUDIT_CLASS_WRITE = 0x6
AUDIT_CLASS_WRITE_32 = 0x7
AUDIT_COMPARE_AUID_TO_EUID = 0x10
AUDIT_COMPARE_AUID_TO_FSUID = 0xe
AUDIT_COMPARE_AUID_TO_OBJ_UID = 0x5
AUDIT_COMPARE_AUID_TO_SUID = 0xf
AUDIT_COMPARE_EGID_TO_FSGID = 0x17
AUDIT_COMPARE_EGID_TO_OBJ_GID = 0x4
AUDIT_COMPARE_EGID_TO_SGID = 0x18
AUDIT_COMPARE_EUID_TO_FSUID = 0x12
AUDIT_COMPARE_EUID_TO_OBJ_UID = 0x3
AUDIT_COMPARE_EUID_TO_SUID = 0x11
AUDIT_COMPARE_FSGID_TO_OBJ_GID = 0x9
AUDIT_COMPARE_FSUID_TO_OBJ_UID = 0x8
AUDIT_COMPARE_GID_TO_EGID = 0x14
AUDIT_COMPARE_GID_TO_FSGID = 0x15
AUDIT_COMPARE_GID_TO_OBJ_GID = 0x2
AUDIT_COMPARE_GID_TO_SGID = 0x16
AUDIT_COMPARE_SGID_TO_FSGID = 0x19
AUDIT_COMPARE_SGID_TO_OBJ_GID = 0x7
AUDIT_COMPARE_SUID_TO_FSUID = 0x13
AUDIT_COMPARE_SUID_TO_OBJ_UID = 0x6
AUDIT_COMPARE_UID_TO_AUID = 0xa
AUDIT_COMPARE_UID_TO_EUID = 0xb
AUDIT_COMPARE_UID_TO_FSUID = 0xc
AUDIT_COMPARE_UID_TO_OBJ_UID = 0x1
AUDIT_COMPARE_UID_TO_SUID = 0xd
AUDIT_CONFIG_CHANGE = 0x519
AUDIT_CWD = 0x51b
AUDIT_DAEMON_ABORT = 0x4b2
AUDIT_DAEMON_CONFIG = 0x4b3
AUDIT_DAEMON_END = 0x4b1
AUDIT_DAEMON_START = 0x4b0
AUDIT_DEL = 0x3ec
AUDIT_DEL_RULE = 0x3f4
AUDIT_DEVMAJOR = 0x64
AUDIT_DEVMINOR = 0x65
AUDIT_DIR = 0x6b
AUDIT_DM_CTRL = 0x53a
AUDIT_DM_EVENT = 0x53b
AUDIT_EGID = 0x6
AUDIT_EOE = 0x528
AUDIT_EQUAL = 0x40000000
AUDIT_EUID = 0x2
AUDIT_EVENT_LISTENER = 0x537
AUDIT_EXE = 0x70
AUDIT_EXECVE = 0x51d
AUDIT_EXIT = 0x67
AUDIT_FAIL_PANIC = 0x2
AUDIT_FAIL_PRINTK = 0x1
AUDIT_FAIL_SILENT = 0x0
AUDIT_FANOTIFY = 0x533
AUDIT_FD_PAIR = 0x525
AUDIT_FEATURE_BITMAP_ALL = 0x7f
AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT = 0x1
AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME = 0x2
AUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND = 0x8
AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH = 0x4
AUDIT_FEATURE_BITMAP_FILTER_FS = 0x40
AUDIT_FEATURE_BITMAP_LOST_RESET = 0x20
AUDIT_FEATURE_BITMAP_SESSIONID_FILTER = 0x10
AUDIT_FEATURE_CHANGE = 0x530
AUDIT_FEATURE_LOGINUID_IMMUTABLE = 0x1
AUDIT_FEATURE_ONLY_UNSET_LOGINUID = 0x0
AUDIT_FEATURE_VERSION = 0x1
AUDIT_FIELD_COMPARE = 0x6f
AUDIT_FILETYPE = 0x6c
AUDIT_FILTERKEY = 0xd2
AUDIT_FILTER_ENTRY = 0x2
AUDIT_FILTER_EXCLUDE = 0x5
AUDIT_FILTER_EXIT = 0x4
AUDIT_FILTER_FS = 0x6
AUDIT_FILTER_PREPEND = 0x10
AUDIT_FILTER_TASK = 0x1
AUDIT_FILTER_TYPE = 0x5
AUDIT_FILTER_URING_EXIT = 0x7
AUDIT_FILTER_USER = 0x0
AUDIT_FILTER_WATCH = 0x3
AUDIT_FIRST_KERN_ANOM_MSG = 0x6a4
AUDIT_FIRST_USER_MSG = 0x44c
AUDIT_FIRST_USER_MSG2 = 0x834
AUDIT_FSGID = 0x8
AUDIT_FSTYPE = 0x1a
AUDIT_FSUID = 0x4
AUDIT_GET = 0x3e8
AUDIT_GET_FEATURE = 0x3fb
AUDIT_GID = 0x5
AUDIT_GREATER_THAN = 0x20000000
AUDIT_GREATER_THAN_OR_EQUAL = 0x60000000
AUDIT_INODE = 0x66
AUDIT_INTEGRITY_DATA = 0x708
AUDIT_INTEGRITY_EVM_XATTR = 0x70e
AUDIT_INTEGRITY_HASH = 0x70b
AUDIT_INTEGRITY_METADATA = 0x709
AUDIT_INTEGRITY_PCR = 0x70c
AUDIT_INTEGRITY_POLICY_RULE = 0x70f
AUDIT_INTEGRITY_RULE = 0x70d
AUDIT_INTEGRITY_STATUS = 0x70a
AUDIT_IPC = 0x517
AUDIT_IPC_SET_PERM = 0x51f
AUDIT_KERNEL = 0x7d0
AUDIT_KERNEL_OTHER = 0x524
AUDIT_KERN_MODULE = 0x532
AUDIT_LAST_FEATURE = 0x1
AUDIT_LAST_KERN_ANOM_MSG = 0x707
AUDIT_LAST_USER_MSG = 0x4af
AUDIT_LAST_USER_MSG2 = 0xbb7
AUDIT_LESS_THAN = 0x10000000
AUDIT_LESS_THAN_OR_EQUAL = 0x50000000
AUDIT_LIST = 0x3ea
AUDIT_LIST_RULES = 0x3f5
AUDIT_LOGIN = 0x3ee
AUDIT_LOGINUID = 0x9
AUDIT_LOGINUID_SET = 0x18
AUDIT_MAC_CALIPSO_ADD = 0x58a
AUDIT_MAC_CALIPSO_DEL = 0x58b
AUDIT_MAC_CIPSOV4_ADD = 0x57f
AUDIT_MAC_CIPSOV4_DEL = 0x580
AUDIT_MAC_CONFIG_CHANGE = 0x57d
AUDIT_MAC_IPSEC_ADDSA = 0x583
AUDIT_MAC_IPSEC_ADDSPD = 0x585
AUDIT_MAC_IPSEC_DELSA = 0x584
AUDIT_MAC_IPSEC_DELSPD = 0x586
AUDIT_MAC_IPSEC_EVENT = 0x587
AUDIT_MAC_MAP_ADD = 0x581
AUDIT_MAC_MAP_DEL = 0x582
AUDIT_MAC_POLICY_LOAD = 0x57b
AUDIT_MAC_STATUS = 0x57c
AUDIT_MAC_UNLBL_ALLOW = 0x57e
AUDIT_MAC_UNLBL_STCADD = 0x588
AUDIT_MAC_UNLBL_STCDEL = 0x589
AUDIT_MAKE_EQUIV = 0x3f7
AUDIT_MAX_FIELDS = 0x40
AUDIT_MAX_FIELD_COMPARE = 0x19
AUDIT_MAX_KEY_LEN = 0x100
AUDIT_MESSAGE_TEXT_MAX = 0x2170
AUDIT_MMAP = 0x52b
AUDIT_MQ_GETSETATTR = 0x523
AUDIT_MQ_NOTIFY = 0x522
AUDIT_MQ_OPEN = 0x520
AUDIT_MQ_SENDRECV = 0x521
AUDIT_MSGTYPE = 0xc
AUDIT_NEGATE = 0x80000000
AUDIT_NETFILTER_CFG = 0x52d
AUDIT_NETFILTER_PKT = 0x52c
AUDIT_NEVER = 0x0
AUDIT_NLGRP_MAX = 0x1
AUDIT_NOT_EQUAL = 0x30000000
AUDIT_NR_FILTERS = 0x8
AUDIT_OBJ_GID = 0x6e
AUDIT_OBJ_LEV_HIGH = 0x17
AUDIT_OBJ_LEV_LOW = 0x16
AUDIT_OBJ_PID = 0x526
AUDIT_OBJ_ROLE = 0x14
AUDIT_OBJ_TYPE = 0x15
AUDIT_OBJ_UID = 0x6d
AUDIT_OBJ_USER = 0x13
AUDIT_OPENAT2 = 0x539
AUDIT_OPERATORS = 0x78000000
AUDIT_PATH = 0x516
AUDIT_PERM = 0x6a
AUDIT_PERM_ATTR = 0x8
AUDIT_PERM_EXEC = 0x1
AUDIT_PERM_READ = 0x4
AUDIT_PERM_WRITE = 0x2
AUDIT_PERS = 0xa
AUDIT_PID = 0x0
AUDIT_POSSIBLE = 0x1
AUDIT_PPID = 0x12
AUDIT_PROCTITLE = 0x52f
AUDIT_REPLACE = 0x531
AUDIT_SADDR_FAM = 0x71
AUDIT_SECCOMP = 0x52e
AUDIT_SELINUX_ERR = 0x579
AUDIT_SESSIONID = 0x19
AUDIT_SET = 0x3e9
AUDIT_SET_FEATURE = 0x3fa
AUDIT_SGID = 0x7
AUDIT_SID_UNSET = 0xffffffff
AUDIT_SIGNAL_INFO = 0x3f2
AUDIT_SOCKADDR = 0x51a
AUDIT_SOCKETCALL = 0x518
AUDIT_STATUS_BACKLOG_LIMIT = 0x10
AUDIT_STATUS_BACKLOG_WAIT_TIME = 0x20
AUDIT_STATUS_BACKLOG_WAIT_TIME_ACTUAL = 0x80
AUDIT_STATUS_ENABLED = 0x1
AUDIT_STATUS_FAILURE = 0x2
AUDIT_STATUS_LOST = 0x40
AUDIT_STATUS_PID = 0x4
AUDIT_STATUS_RATE_LIMIT = 0x8
AUDIT_SUBJ_CLR = 0x11
AUDIT_SUBJ_ROLE = 0xe
AUDIT_SUBJ_SEN = 0x10
AUDIT_SUBJ_TYPE = 0xf
AUDIT_SUBJ_USER = 0xd
AUDIT_SUCCESS = 0x68
AUDIT_SUID = 0x3
AUDIT_SYSCALL = 0x514
AUDIT_SYSCALL_CLASSES = 0x10
AUDIT_TIME_ADJNTPVAL = 0x535
AUDIT_TIME_INJOFFSET = 0x534
AUDIT_TRIM = 0x3f6
AUDIT_TTY = 0x527
AUDIT_TTY_GET = 0x3f8
AUDIT_TTY_SET = 0x3f9
AUDIT_UID = 0x1
AUDIT_UID_UNSET = 0xffffffff
AUDIT_UNUSED_BITS = 0x7fffc00
AUDIT_URINGOP = 0x538
AUDIT_USER = 0x3ed
AUDIT_USER_AVC = 0x453
AUDIT_USER_TTY = 0x464
AUDIT_VERSION_BACKLOG_LIMIT = 0x1
AUDIT_VERSION_BACKLOG_WAIT_TIME = 0x2
AUDIT_VERSION_LATEST = 0x7f
AUDIT_WATCH = 0x69
AUDIT_WATCH_INS = 0x3ef
AUDIT_WATCH_LIST = 0x3f1
AUDIT_WATCH_REM = 0x3f0
AUTOFS_SUPER_MAGIC = 0x187 AUTOFS_SUPER_MAGIC = 0x187
B0 = 0x0 B0 = 0x0
B110 = 0x3 B110 = 0x3
@ -157,7 +458,6 @@ const (
B600 = 0x8 B600 = 0x8
B75 = 0x2 B75 = 0x2
B9600 = 0xd B9600 = 0xd
BALLOON_KVM_MAGIC = 0x13661366
BDEVFS_MAGIC = 0x62646576 BDEVFS_MAGIC = 0x62646576
BINDERFS_SUPER_MAGIC = 0x6c6f6f70 BINDERFS_SUPER_MAGIC = 0x6c6f6f70
BINFMTFS_MAGIC = 0x42494e4d BINFMTFS_MAGIC = 0x42494e4d
@ -263,6 +563,7 @@ const (
BUS_USB = 0x3 BUS_USB = 0x3
BUS_VIRTUAL = 0x6 BUS_VIRTUAL = 0x6
CAN_BCM = 0x2 CAN_BCM = 0x2
CAN_BUS_OFF_THRESHOLD = 0x100
CAN_CTRLMODE_3_SAMPLES = 0x4 CAN_CTRLMODE_3_SAMPLES = 0x4
CAN_CTRLMODE_BERR_REPORTING = 0x10 CAN_CTRLMODE_BERR_REPORTING = 0x10
CAN_CTRLMODE_CC_LEN8_DLC = 0x100 CAN_CTRLMODE_CC_LEN8_DLC = 0x100
@ -277,9 +578,12 @@ const (
CAN_EFF_FLAG = 0x80000000 CAN_EFF_FLAG = 0x80000000
CAN_EFF_ID_BITS = 0x1d CAN_EFF_ID_BITS = 0x1d
CAN_EFF_MASK = 0x1fffffff CAN_EFF_MASK = 0x1fffffff
CAN_ERROR_PASSIVE_THRESHOLD = 0x80
CAN_ERROR_WARNING_THRESHOLD = 0x60
CAN_ERR_ACK = 0x20 CAN_ERR_ACK = 0x20
CAN_ERR_BUSERROR = 0x80 CAN_ERR_BUSERROR = 0x80
CAN_ERR_BUSOFF = 0x40 CAN_ERR_BUSOFF = 0x40
CAN_ERR_CNT = 0x200
CAN_ERR_CRTL = 0x4 CAN_ERR_CRTL = 0x4
CAN_ERR_CRTL_ACTIVE = 0x40 CAN_ERR_CRTL_ACTIVE = 0x40
CAN_ERR_CRTL_RX_OVERFLOW = 0x1 CAN_ERR_CRTL_RX_OVERFLOW = 0x1
@ -471,6 +775,8 @@ const (
DEVLINK_GENL_MCGRP_CONFIG_NAME = "config" DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
DEVLINK_GENL_NAME = "devlink" DEVLINK_GENL_NAME = "devlink"
DEVLINK_GENL_VERSION = 0x1 DEVLINK_GENL_VERSION = 0x1
DEVLINK_PORT_FN_CAP_MIGRATABLE = 0x2
DEVLINK_PORT_FN_CAP_ROCE = 0x1
DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14 DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS = 0x3 DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS = 0x3
DEVMEM_MAGIC = 0x454d444d DEVMEM_MAGIC = 0x454d444d
@ -520,9 +826,9 @@ const (
DM_UUID_FLAG = 0x4000 DM_UUID_FLAG = 0x4000
DM_UUID_LEN = 0x81 DM_UUID_LEN = 0x81
DM_VERSION = 0xc138fd00 DM_VERSION = 0xc138fd00
DM_VERSION_EXTRA = "-ioctl (2022-02-22)" DM_VERSION_EXTRA = "-ioctl (2022-07-28)"
DM_VERSION_MAJOR = 0x4 DM_VERSION_MAJOR = 0x4
DM_VERSION_MINOR = 0x2e DM_VERSION_MINOR = 0x2f
DM_VERSION_PATCHLEVEL = 0x0 DM_VERSION_PATCHLEVEL = 0x0
DT_BLK = 0x6 DT_BLK = 0x6
DT_CHR = 0x2 DT_CHR = 0x2
@ -538,6 +844,55 @@ const (
EFD_SEMAPHORE = 0x1 EFD_SEMAPHORE = 0x1
EFIVARFS_MAGIC = 0xde5e81e4 EFIVARFS_MAGIC = 0xde5e81e4
EFS_SUPER_MAGIC = 0x414a53 EFS_SUPER_MAGIC = 0x414a53
EM_386 = 0x3
EM_486 = 0x6
EM_68K = 0x4
EM_860 = 0x7
EM_88K = 0x5
EM_AARCH64 = 0xb7
EM_ALPHA = 0x9026
EM_ALTERA_NIOS2 = 0x71
EM_ARCOMPACT = 0x5d
EM_ARCV2 = 0xc3
EM_ARM = 0x28
EM_BLACKFIN = 0x6a
EM_BPF = 0xf7
EM_CRIS = 0x4c
EM_CSKY = 0xfc
EM_CYGNUS_M32R = 0x9041
EM_CYGNUS_MN10300 = 0xbeef
EM_FRV = 0x5441
EM_H8_300 = 0x2e
EM_HEXAGON = 0xa4
EM_IA_64 = 0x32
EM_LOONGARCH = 0x102
EM_M32 = 0x1
EM_M32R = 0x58
EM_MICROBLAZE = 0xbd
EM_MIPS = 0x8
EM_MIPS_RS3_LE = 0xa
EM_MIPS_RS4_BE = 0xa
EM_MN10300 = 0x59
EM_NDS32 = 0xa7
EM_NONE = 0x0
EM_OPENRISC = 0x5c
EM_PARISC = 0xf
EM_PPC = 0x14
EM_PPC64 = 0x15
EM_RISCV = 0xf3
EM_S390 = 0x16
EM_S390_OLD = 0xa390
EM_SH = 0x2a
EM_SPARC = 0x2
EM_SPARC32PLUS = 0x12
EM_SPARCV9 = 0x2b
EM_SPU = 0x17
EM_TILEGX = 0xbf
EM_TILEPRO = 0xbc
EM_TI_C6000 = 0x8c
EM_UNICORE = 0x6e
EM_X86_64 = 0x3e
EM_XTENSA = 0x5e
ENCODING_DEFAULT = 0x0 ENCODING_DEFAULT = 0x0
ENCODING_FM_MARK = 0x3 ENCODING_FM_MARK = 0x3
ENCODING_FM_SPACE = 0x4 ENCODING_FM_SPACE = 0x4
@ -700,6 +1055,7 @@ const (
ETH_P_CAIF = 0xf7 ETH_P_CAIF = 0xf7
ETH_P_CAN = 0xc ETH_P_CAN = 0xc
ETH_P_CANFD = 0xd ETH_P_CANFD = 0xd
ETH_P_CANXL = 0xe
ETH_P_CFM = 0x8902 ETH_P_CFM = 0x8902
ETH_P_CONTROL = 0x16 ETH_P_CONTROL = 0x16
ETH_P_CUST = 0x6006 ETH_P_CUST = 0x6006
@ -711,6 +1067,7 @@ const (
ETH_P_DNA_RT = 0x6003 ETH_P_DNA_RT = 0x6003
ETH_P_DSA = 0x1b ETH_P_DSA = 0x1b
ETH_P_DSA_8021Q = 0xdadb ETH_P_DSA_8021Q = 0xdadb
ETH_P_DSA_A5PSW = 0xe001
ETH_P_ECONET = 0x18 ETH_P_ECONET = 0x18
ETH_P_EDSA = 0xdada ETH_P_EDSA = 0xdada
ETH_P_ERSPAN = 0x88be ETH_P_ERSPAN = 0x88be
@ -845,8 +1202,10 @@ const (
FAN_MARK_EVICTABLE = 0x200 FAN_MARK_EVICTABLE = 0x200
FAN_MARK_FILESYSTEM = 0x100 FAN_MARK_FILESYSTEM = 0x100
FAN_MARK_FLUSH = 0x80 FAN_MARK_FLUSH = 0x80
FAN_MARK_IGNORE = 0x400
FAN_MARK_IGNORED_MASK = 0x20 FAN_MARK_IGNORED_MASK = 0x20
FAN_MARK_IGNORED_SURV_MODIFY = 0x40 FAN_MARK_IGNORED_SURV_MODIFY = 0x40
FAN_MARK_IGNORE_SURV = 0x440
FAN_MARK_INODE = 0x0 FAN_MARK_INODE = 0x0
FAN_MARK_MOUNT = 0x10 FAN_MARK_MOUNT = 0x10
FAN_MARK_ONLYDIR = 0x8 FAN_MARK_ONLYDIR = 0x8
@ -904,7 +1263,10 @@ const (
FSCRYPT_MODE_AES_128_CBC = 0x5 FSCRYPT_MODE_AES_128_CBC = 0x5
FSCRYPT_MODE_AES_128_CTS = 0x6 FSCRYPT_MODE_AES_128_CTS = 0x6
FSCRYPT_MODE_AES_256_CTS = 0x4 FSCRYPT_MODE_AES_256_CTS = 0x4
FSCRYPT_MODE_AES_256_HCTR2 = 0xa
FSCRYPT_MODE_AES_256_XTS = 0x1 FSCRYPT_MODE_AES_256_XTS = 0x1
FSCRYPT_MODE_SM4_CTS = 0x8
FSCRYPT_MODE_SM4_XTS = 0x7
FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2 FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3 FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0 FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
@ -923,8 +1285,6 @@ const (
FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
FS_ENCRYPTION_MODE_INVALID = 0x0 FS_ENCRYPTION_MODE_INVALID = 0x0
FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617 FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616 FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
@ -1081,6 +1441,7 @@ const (
IFF_NOARP = 0x80 IFF_NOARP = 0x80
IFF_NOFILTER = 0x1000 IFF_NOFILTER = 0x1000
IFF_NOTRAILERS = 0x20 IFF_NOTRAILERS = 0x20
IFF_NO_CARRIER = 0x40
IFF_NO_PI = 0x1000 IFF_NO_PI = 0x1000
IFF_ONE_QUEUE = 0x2000 IFF_ONE_QUEUE = 0x2000
IFF_PERSIST = 0x800 IFF_PERSIST = 0x800
@ -1412,6 +1773,7 @@ const (
LANDLOCK_ACCESS_FS_REFER = 0x2000 LANDLOCK_ACCESS_FS_REFER = 0x2000
LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10 LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10
LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20 LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20
LANDLOCK_ACCESS_FS_TRUNCATE = 0x4000
LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2 LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
LANDLOCK_CREATE_RULESET_VERSION = 0x1 LANDLOCK_CREATE_RULESET_VERSION = 0x1
LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_OFF = 0x0
@ -1451,11 +1813,13 @@ const (
LWTUNNEL_IP_OPT_GENEVE_MAX = 0x3 LWTUNNEL_IP_OPT_GENEVE_MAX = 0x3
LWTUNNEL_IP_OPT_VXLAN_MAX = 0x1 LWTUNNEL_IP_OPT_VXLAN_MAX = 0x1
MADV_COLD = 0x14 MADV_COLD = 0x14
MADV_COLLAPSE = 0x19
MADV_DODUMP = 0x11 MADV_DODUMP = 0x11
MADV_DOFORK = 0xb MADV_DOFORK = 0xb
MADV_DONTDUMP = 0x10 MADV_DONTDUMP = 0x10
MADV_DONTFORK = 0xa MADV_DONTFORK = 0xa
MADV_DONTNEED = 0x4 MADV_DONTNEED = 0x4
MADV_DONTNEED_LOCKED = 0x18
MADV_FREE = 0x8 MADV_FREE = 0x8
MADV_HUGEPAGE = 0xe MADV_HUGEPAGE = 0xe
MADV_HWPOISON = 0x64 MADV_HWPOISON = 0x64
@ -1497,7 +1861,7 @@ const (
MFD_ALLOW_SEALING = 0x2 MFD_ALLOW_SEALING = 0x2
MFD_CLOEXEC = 0x1 MFD_CLOEXEC = 0x1
MFD_HUGETLB = 0x4 MFD_HUGETLB = 0x4
MFD_HUGE_16GB = -0x78000000 MFD_HUGE_16GB = 0x88000000
MFD_HUGE_16MB = 0x60000000 MFD_HUGE_16MB = 0x60000000
MFD_HUGE_1GB = 0x78000000 MFD_HUGE_1GB = 0x78000000
MFD_HUGE_1MB = 0x50000000 MFD_HUGE_1MB = 0x50000000
@ -1804,6 +2168,7 @@ const (
PACKET_FANOUT_DATA = 0x16 PACKET_FANOUT_DATA = 0x16
PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_EBPF = 0x7
PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_DEFRAG = 0x8000
PACKET_FANOUT_FLAG_IGNORE_OUTGOING = 0x4000
PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
PACKET_FANOUT_HASH = 0x0 PACKET_FANOUT_HASH = 0x0
@ -1863,6 +2228,11 @@ const (
PERF_AUX_FLAG_PARTIAL = 0x4 PERF_AUX_FLAG_PARTIAL = 0x4
PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00 PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00
PERF_AUX_FLAG_TRUNCATED = 0x1 PERF_AUX_FLAG_TRUNCATED = 0x1
PERF_BR_ARM64_DEBUG_DATA = 0x7
PERF_BR_ARM64_DEBUG_EXIT = 0x5
PERF_BR_ARM64_DEBUG_HALT = 0x4
PERF_BR_ARM64_DEBUG_INST = 0x6
PERF_BR_ARM64_FIQ = 0x3
PERF_FLAG_FD_CLOEXEC = 0x8 PERF_FLAG_FD_CLOEXEC = 0x8
PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_FD_OUTPUT = 0x2
@ -1883,6 +2253,8 @@ const (
PERF_MEM_LOCK_NA = 0x1 PERF_MEM_LOCK_NA = 0x1
PERF_MEM_LOCK_SHIFT = 0x18 PERF_MEM_LOCK_SHIFT = 0x18
PERF_MEM_LVLNUM_ANY_CACHE = 0xb PERF_MEM_LVLNUM_ANY_CACHE = 0xb
PERF_MEM_LVLNUM_CXL = 0x9
PERF_MEM_LVLNUM_IO = 0xa
PERF_MEM_LVLNUM_L1 = 0x1 PERF_MEM_LVLNUM_L1 = 0x1
PERF_MEM_LVLNUM_L2 = 0x2 PERF_MEM_LVLNUM_L2 = 0x2
PERF_MEM_LVLNUM_L3 = 0x3 PERF_MEM_LVLNUM_L3 = 0x3
@ -1916,6 +2288,7 @@ const (
PERF_MEM_REMOTE_REMOTE = 0x1 PERF_MEM_REMOTE_REMOTE = 0x1
PERF_MEM_REMOTE_SHIFT = 0x25 PERF_MEM_REMOTE_SHIFT = 0x25
PERF_MEM_SNOOPX_FWD = 0x1 PERF_MEM_SNOOPX_FWD = 0x1
PERF_MEM_SNOOPX_PEER = 0x2
PERF_MEM_SNOOPX_SHIFT = 0x26 PERF_MEM_SNOOPX_SHIFT = 0x26
PERF_MEM_SNOOP_HIT = 0x4 PERF_MEM_SNOOP_HIT = 0x4
PERF_MEM_SNOOP_HITM = 0x10 PERF_MEM_SNOOP_HITM = 0x10
@ -1952,7 +2325,6 @@ const (
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7 PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000 PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
PIPEFS_MAGIC = 0x50495045 PIPEFS_MAGIC = 0x50495045
PPC_CMM_MAGIC = 0xc7571590
PPPIOCGNPMODE = 0xc008744c PPPIOCGNPMODE = 0xc008744c
PPPIOCNEWUNIT = 0xc004743e PPPIOCNEWUNIT = 0xc004743e
PRIO_PGRP = 0x1 PRIO_PGRP = 0x1
@ -2591,6 +2963,7 @@ const (
SOL_RAW = 0xff SOL_RAW = 0xff
SOL_RDS = 0x114 SOL_RDS = 0x114
SOL_RXRPC = 0x110 SOL_RXRPC = 0x110
SOL_SMC = 0x11e
SOL_TCP = 0x6 SOL_TCP = 0x6
SOL_TIPC = 0x10f SOL_TIPC = 0x10f
SOL_TLS = 0x11a SOL_TLS = 0x11a
@ -2649,6 +3022,7 @@ const (
STATX_BLOCKS = 0x400 STATX_BLOCKS = 0x400
STATX_BTIME = 0x800 STATX_BTIME = 0x800
STATX_CTIME = 0x80 STATX_CTIME = 0x80
STATX_DIOALIGN = 0x2000
STATX_GID = 0x10 STATX_GID = 0x10
STATX_INO = 0x100 STATX_INO = 0x100
STATX_MNT_ID = 0x1000 STATX_MNT_ID = 0x1000
@ -3042,9 +3416,7 @@ const (
XDP_ZEROCOPY = 0x4 XDP_ZEROCOPY = 0x4
XENFS_SUPER_MAGIC = 0xabba1974 XENFS_SUPER_MAGIC = 0xabba1974
XFS_SUPER_MAGIC = 0x58465342 XFS_SUPER_MAGIC = 0x58465342
Z3FOLD_MAGIC = 0x33
ZONEFS_MAGIC = 0x5a4f4653 ZONEFS_MAGIC = 0x5a4f4653
ZSMALLOC_MAGIC = 0x58295829
_HIDIOCGRAWNAME_LEN = 0x80 _HIDIOCGRAWNAME_LEN = 0x80
_HIDIOCGRAWPHYS_LEN = 0x40 _HIDIOCGRAWPHYS_LEN = 0x40
_HIDIOCGRAWUNIQ_LEN = 0x40 _HIDIOCGRAWUNIQ_LEN = 0x40

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m32 // mkerrors.sh -Wall -Werror -static -I/tmp/386/include -m32
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && linux //go:build 386 && linux
// +build 386,linux // +build 386,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/386/include -m32 _const.go
package unix package unix
@ -133,6 +133,7 @@ const (
MEMGETREGIONCOUNT = 0x80044d07 MEMGETREGIONCOUNT = 0x80044d07
MEMISLOCKED = 0x80084d17 MEMISLOCKED = 0x80084d17
MEMLOCK = 0x40084d05 MEMLOCK = 0x40084d05
MEMREAD = 0xc03c4d1a
MEMREADOOB = 0xc00c4d04 MEMREADOOB = 0xc00c4d04
MEMSETBADBLOCK = 0x40084d0c MEMSETBADBLOCK = 0x40084d0c
MEMUNLOCK = 0x40084d06 MEMUNLOCK = 0x40084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m64 // mkerrors.sh -Wall -Werror -static -I/tmp/amd64/include -m64
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && linux //go:build amd64 && linux
// +build amd64,linux // +build amd64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/amd64/include -m64 _const.go
package unix package unix
@ -133,6 +133,7 @@ const (
MEMGETREGIONCOUNT = 0x80044d07 MEMGETREGIONCOUNT = 0x80044d07
MEMISLOCKED = 0x80084d17 MEMISLOCKED = 0x80084d17
MEMLOCK = 0x40084d05 MEMLOCK = 0x40084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x40084d0c MEMSETBADBLOCK = 0x40084d0c
MEMUNLOCK = 0x40084d06 MEMUNLOCK = 0x40084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/arm/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && linux //go:build arm && linux
// +build arm,linux // +build arm,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/arm/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x80044d07 MEMGETREGIONCOUNT = 0x80044d07
MEMISLOCKED = 0x80084d17 MEMISLOCKED = 0x80084d17
MEMLOCK = 0x40084d05 MEMLOCK = 0x40084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc00c4d04 MEMREADOOB = 0xc00c4d04
MEMSETBADBLOCK = 0x40084d0c MEMSETBADBLOCK = 0x40084d0c
MEMUNLOCK = 0x40084d06 MEMUNLOCK = 0x40084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char // mkerrors.sh -Wall -Werror -static -I/tmp/arm64/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && linux //go:build arm64 && linux
// +build arm64,linux // +build arm64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char _const.go
package unix package unix
@ -134,6 +134,7 @@ const (
MEMGETREGIONCOUNT = 0x80044d07 MEMGETREGIONCOUNT = 0x80044d07
MEMISLOCKED = 0x80084d17 MEMISLOCKED = 0x80084d17
MEMLOCK = 0x40084d05 MEMLOCK = 0x40084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x40084d0c MEMSETBADBLOCK = 0x40084d0c
MEMUNLOCK = 0x40084d06 MEMUNLOCK = 0x40084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/loong64/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build loong64 && linux //go:build loong64 && linux
// +build loong64,linux // +build loong64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/loong64/include _const.go
package unix package unix
@ -132,6 +132,7 @@ const (
MEMGETREGIONCOUNT = 0x80044d07 MEMGETREGIONCOUNT = 0x80044d07
MEMISLOCKED = 0x80084d17 MEMISLOCKED = 0x80084d17
MEMLOCK = 0x40084d05 MEMLOCK = 0x40084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x40084d0c MEMSETBADBLOCK = 0x40084d0c
MEMUNLOCK = 0x40084d06 MEMUNLOCK = 0x40084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/mips/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips && linux //go:build mips && linux
// +build mips,linux // +build mips,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/mips/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc00c4d04 MEMREADOOB = 0xc00c4d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/mips64/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && linux //go:build mips64 && linux
// +build mips64,linux // +build mips64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/mips64le/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64le && linux //go:build mips64le && linux
// +build mips64le,linux // +build mips64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64le/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/mipsle/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mipsle && linux //go:build mipsle && linux
// +build mipsle,linux // +build mipsle,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/mipsle/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc00c4d04 MEMREADOOB = 0xc00c4d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/ppc/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && linux //go:build ppc && linux
// +build ppc,linux // +build ppc,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc00c4d04 MEMREADOOB = 0xc00c4d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/ppc64/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && linux //go:build ppc64 && linux
// +build ppc64,linux // +build ppc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/ppc64le/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64le && linux //go:build ppc64le && linux
// +build ppc64le,linux // +build ppc64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64le/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/riscv64/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && linux //go:build riscv64 && linux
// +build riscv64,linux // +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/riscv64/include _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x80044d07 MEMGETREGIONCOUNT = 0x80044d07
MEMISLOCKED = 0x80084d17 MEMISLOCKED = 0x80084d17
MEMLOCK = 0x40084d05 MEMLOCK = 0x40084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x40084d0c MEMSETBADBLOCK = 0x40084d0c
MEMUNLOCK = 0x40084d06 MEMUNLOCK = 0x40084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char // mkerrors.sh -Wall -Werror -static -I/tmp/s390x/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build s390x && linux //go:build s390x && linux
// +build s390x,linux // +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char _const.go
package unix package unix
@ -131,6 +131,7 @@ const (
MEMGETREGIONCOUNT = 0x80044d07 MEMGETREGIONCOUNT = 0x80044d07
MEMISLOCKED = 0x80084d17 MEMISLOCKED = 0x80084d17
MEMLOCK = 0x40084d05 MEMLOCK = 0x40084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x40084d0c MEMSETBADBLOCK = 0x40084d0c
MEMUNLOCK = 0x40084d06 MEMUNLOCK = 0x40084d06

View file

@ -1,11 +1,11 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include // mkerrors.sh -Wall -Werror -static -I/tmp/sparc64/include
// Code generated by the command above; see README.md. DO NOT EDIT. // Code generated by the command above; see README.md. DO NOT EDIT.
//go:build sparc64 && linux //go:build sparc64 && linux
// +build sparc64,linux // +build sparc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go // cgo -godefs -- -Wall -Werror -static -I/tmp/sparc64/include _const.go
package unix package unix
@ -136,6 +136,7 @@ const (
MEMGETREGIONCOUNT = 0x40044d07 MEMGETREGIONCOUNT = 0x40044d07
MEMISLOCKED = 0x40084d17 MEMISLOCKED = 0x40084d17
MEMLOCK = 0x80084d05 MEMLOCK = 0x80084d05
MEMREAD = 0xc0404d1a
MEMREADOOB = 0xc0104d04 MEMREADOOB = 0xc0104d04
MEMSETBADBLOCK = 0x80084d0c MEMSETBADBLOCK = 0x80084d0c
MEMUNLOCK = 0x80084d06 MEMUNLOCK = 0x80084d06

View file

@ -46,6 +46,7 @@ const (
AF_SNA = 0xb AF_SNA = 0xb
AF_UNIX = 0x1 AF_UNIX = 0x1
AF_UNSPEC = 0x0 AF_UNSPEC = 0x0
ALTWERASE = 0x200
ARPHRD_ETHER = 0x1 ARPHRD_ETHER = 0x1
ARPHRD_FRELAY = 0xf ARPHRD_FRELAY = 0xf
ARPHRD_IEEE1394 = 0x18 ARPHRD_IEEE1394 = 0x18
@ -108,6 +109,15 @@ const (
BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_IN = 0x1
BPF_DIRECTION_OUT = 0x2 BPF_DIRECTION_OUT = 0x2
BPF_DIV = 0x30 BPF_DIV = 0x30
BPF_FILDROP_CAPTURE = 0x1
BPF_FILDROP_DROP = 0x2
BPF_FILDROP_PASS = 0x0
BPF_F_DIR_IN = 0x10
BPF_F_DIR_MASK = 0x30
BPF_F_DIR_OUT = 0x20
BPF_F_DIR_SHIFT = 0x4
BPF_F_FLOWID = 0x8
BPF_F_PRI_MASK = 0x7
BPF_H = 0x8 BPF_H = 0x8
BPF_IMM = 0x0 BPF_IMM = 0x0
BPF_IND = 0x40 BPF_IND = 0x40
@ -136,6 +146,7 @@ const (
BPF_OR = 0x40 BPF_OR = 0x40
BPF_RELEASE = 0x30bb6 BPF_RELEASE = 0x30bb6
BPF_RET = 0x6 BPF_RET = 0x6
BPF_RND = 0xc0
BPF_RSH = 0x70 BPF_RSH = 0x70
BPF_ST = 0x2 BPF_ST = 0x2
BPF_STX = 0x3 BPF_STX = 0x3
@ -147,6 +158,12 @@ const (
BRKINT = 0x2 BRKINT = 0x2
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_BOOTTIME = 0x6
CLOCK_MONOTONIC = 0x3
CLOCK_PROCESS_CPUTIME_ID = 0x2
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x4
CLOCK_UPTIME = 0x5
CPUSTATES = 0x6 CPUSTATES = 0x6
CP_IDLE = 0x5 CP_IDLE = 0x5
CP_INTR = 0x4 CP_INTR = 0x4
@ -170,7 +187,65 @@ const (
CTL_KERN = 0x1 CTL_KERN = 0x1
CTL_MAXNAME = 0xc CTL_MAXNAME = 0xc
CTL_NET = 0x4 CTL_NET = 0x4
DIOCADDQUEUE = 0xc100445d
DIOCADDRULE = 0xccc84404
DIOCADDSTATE = 0xc1084425
DIOCCHANGERULE = 0xccc8441a
DIOCCLRIFFLAG = 0xc024445a
DIOCCLRSRCNODES = 0x20004455
DIOCCLRSTATES = 0xc0d04412
DIOCCLRSTATUS = 0xc0244416
DIOCGETLIMIT = 0xc0084427
DIOCGETQSTATS = 0xc1084460
DIOCGETQUEUE = 0xc100445f
DIOCGETQUEUES = 0xc100445e
DIOCGETRULE = 0xccc84407
DIOCGETRULES = 0xccc84406
DIOCGETRULESET = 0xc444443b
DIOCGETRULESETS = 0xc444443a
DIOCGETSRCNODES = 0xc0084454
DIOCGETSTATE = 0xc1084413
DIOCGETSTATES = 0xc0084419
DIOCGETSTATUS = 0xc1e84415
DIOCGETSYNFLWATS = 0xc0084463
DIOCGETTIMEOUT = 0xc008441e
DIOCIGETIFACES = 0xc0244457
DIOCKILLSRCNODES = 0xc068445b
DIOCKILLSTATES = 0xc0d04429
DIOCNATLOOK = 0xc0504417
DIOCOSFPADD = 0xc084444f
DIOCOSFPFLUSH = 0x2000444e DIOCOSFPFLUSH = 0x2000444e
DIOCOSFPGET = 0xc0844450
DIOCRADDADDRS = 0xc44c4443
DIOCRADDTABLES = 0xc44c443d
DIOCRCLRADDRS = 0xc44c4442
DIOCRCLRASTATS = 0xc44c4448
DIOCRCLRTABLES = 0xc44c443c
DIOCRCLRTSTATS = 0xc44c4441
DIOCRDELADDRS = 0xc44c4444
DIOCRDELTABLES = 0xc44c443e
DIOCRGETADDRS = 0xc44c4446
DIOCRGETASTATS = 0xc44c4447
DIOCRGETTABLES = 0xc44c443f
DIOCRGETTSTATS = 0xc44c4440
DIOCRINADEFINE = 0xc44c444d
DIOCRSETADDRS = 0xc44c4445
DIOCRSETTFLAGS = 0xc44c444a
DIOCRTSTADDRS = 0xc44c4449
DIOCSETDEBUG = 0xc0044418
DIOCSETHOSTID = 0xc0044456
DIOCSETIFFLAG = 0xc0244459
DIOCSETLIMIT = 0xc0084428
DIOCSETREASS = 0xc004445c
DIOCSETSTATUSIF = 0xc0244414
DIOCSETSYNCOOKIES = 0xc0014462
DIOCSETSYNFLWATS = 0xc0084461
DIOCSETTIMEOUT = 0xc008441d
DIOCSTART = 0x20004401
DIOCSTOP = 0x20004402
DIOCXBEGIN = 0xc00c4451
DIOCXCOMMIT = 0xc00c4452
DIOCXROLLBACK = 0xc00c4453
DLT_ARCNET = 0x7 DLT_ARCNET = 0x7
DLT_ATM_RFC1483 = 0xb DLT_ATM_RFC1483 = 0xb
DLT_AX25 = 0x3 DLT_AX25 = 0x3
@ -186,6 +261,7 @@ const (
DLT_LOOP = 0xc DLT_LOOP = 0xc
DLT_MPLS = 0xdb DLT_MPLS = 0xdb
DLT_NULL = 0x0 DLT_NULL = 0x0
DLT_OPENFLOW = 0x10b
DLT_PFLOG = 0x75 DLT_PFLOG = 0x75
DLT_PFSYNC = 0x12 DLT_PFSYNC = 0x12
DLT_PPP = 0x9 DLT_PPP = 0x9
@ -196,6 +272,23 @@ const (
DLT_RAW = 0xe DLT_RAW = 0xe
DLT_SLIP = 0x8 DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xf DLT_SLIP_BSDOS = 0xf
DLT_USBPCAP = 0xf9
DLT_USER0 = 0x93
DLT_USER1 = 0x94
DLT_USER10 = 0x9d
DLT_USER11 = 0x9e
DLT_USER12 = 0x9f
DLT_USER13 = 0xa0
DLT_USER14 = 0xa1
DLT_USER15 = 0xa2
DLT_USER2 = 0x95
DLT_USER3 = 0x96
DLT_USER4 = 0x97
DLT_USER5 = 0x98
DLT_USER6 = 0x99
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
DT_BLK = 0x6 DT_BLK = 0x6
DT_CHR = 0x2 DT_CHR = 0x2
DT_DIR = 0x4 DT_DIR = 0x4
@ -215,6 +308,8 @@ const (
EMUL_ENABLED = 0x1 EMUL_ENABLED = 0x1
EMUL_NATIVE = 0x2 EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9 ENDRUNDISC = 0x9
ETH64_8021_RSVD_MASK = 0xfffffffffff0
ETH64_8021_RSVD_PREFIX = 0x180c2000000
ETHERMIN = 0x2e ETHERMIN = 0x2e
ETHERMTU = 0x5dc ETHERMTU = 0x5dc
ETHERTYPE_8023 = 0x4 ETHERTYPE_8023 = 0x4
@ -267,6 +362,7 @@ const (
ETHERTYPE_DN = 0x6003 ETHERTYPE_DN = 0x6003
ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DOGFIGHT = 0x1989
ETHERTYPE_DSMD = 0x8039 ETHERTYPE_DSMD = 0x8039
ETHERTYPE_EAPOL = 0x888e
ETHERTYPE_ECMA = 0x803 ETHERTYPE_ECMA = 0x803
ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ENCRYPT = 0x803d
ETHERTYPE_ES = 0x805d ETHERTYPE_ES = 0x805d
@ -298,6 +394,7 @@ const (
ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LLDP = 0x88cc
ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOGICRAFT = 0x8148
ETHERTYPE_LOOPBACK = 0x9000 ETHERTYPE_LOOPBACK = 0x9000
ETHERTYPE_MACSEC = 0x88e5
ETHERTYPE_MATRA = 0x807a ETHERTYPE_MATRA = 0x807a
ETHERTYPE_MAX = 0xffff ETHERTYPE_MAX = 0xffff
ETHERTYPE_MERIT = 0x807c ETHERTYPE_MERIT = 0x807c
@ -326,15 +423,17 @@ const (
ETHERTYPE_NCD = 0x8149 ETHERTYPE_NCD = 0x8149
ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NESTAR = 0x8006
ETHERTYPE_NETBEUI = 0x8191 ETHERTYPE_NETBEUI = 0x8191
ETHERTYPE_NHRP = 0x2001
ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NOVELL = 0x8138
ETHERTYPE_NS = 0x600 ETHERTYPE_NS = 0x600
ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSAT = 0x601
ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSCOMPAT = 0x807
ETHERTYPE_NSH = 0x984f
ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_NTRAILER = 0x10
ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9 = 0x7007
ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_OS9NET = 0x7009
ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PACER = 0x80c6
ETHERTYPE_PAE = 0x888e ETHERTYPE_PBB = 0x88e7
ETHERTYPE_PCS = 0x4242 ETHERTYPE_PCS = 0x4242
ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PLANNING = 0x8044
ETHERTYPE_PPP = 0x880b ETHERTYPE_PPP = 0x880b
@ -409,28 +508,40 @@ const (
ETHER_CRC_POLY_LE = 0xedb88320 ETHER_CRC_POLY_LE = 0xedb88320
ETHER_HDR_LEN = 0xe ETHER_HDR_LEN = 0xe
ETHER_MAX_DIX_LEN = 0x600 ETHER_MAX_DIX_LEN = 0x600
ETHER_MAX_HARDMTU_LEN = 0xff9b
ETHER_MAX_LEN = 0x5ee ETHER_MAX_LEN = 0x5ee
ETHER_MIN_LEN = 0x40 ETHER_MIN_LEN = 0x40
ETHER_TYPE_LEN = 0x2 ETHER_TYPE_LEN = 0x2
ETHER_VLAN_ENCAP_LEN = 0x4 ETHER_VLAN_ENCAP_LEN = 0x4
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_DEVICE = -0x8
EVFILT_EXCEPT = -0x9
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0x7 EVFILT_SYSCOUNT = 0x9
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_VNODE = -0x4 EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2 EVFILT_WRITE = -0x2
EVL_ENCAPLEN = 0x4
EVL_PRIO_BITS = 0xd
EVL_PRIO_MAX = 0x7
EVL_VLID_MASK = 0xfff
EVL_VLID_MAX = 0xffe
EVL_VLID_MIN = 0x1
EVL_VLID_NULL = 0x0
EV_ADD = 0x1 EV_ADD = 0x1
EV_CLEAR = 0x20 EV_CLEAR = 0x20
EV_DELETE = 0x2 EV_DELETE = 0x2
EV_DISABLE = 0x8 EV_DISABLE = 0x8
EV_DISPATCH = 0x80
EV_ENABLE = 0x4 EV_ENABLE = 0x4
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_SYSFLAGS = 0xf000 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf800
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
@ -443,6 +554,7 @@ const (
F_GETFL = 0x3 F_GETFL = 0x3
F_GETLK = 0x7 F_GETLK = 0x7
F_GETOWN = 0x5 F_GETOWN = 0x5
F_ISATTY = 0xb
F_OK = 0x0 F_OK = 0x0
F_RDLCK = 0x1 F_RDLCK = 0x1
F_SETFD = 0x2 F_SETFD = 0x2
@ -460,7 +572,6 @@ const (
IEXTEN = 0x400 IEXTEN = 0x400
IFAN_ARRIVAL = 0x0 IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1 IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x8e52 IFF_CANTCHANGE = 0x8e52
@ -471,12 +582,12 @@ const (
IFF_LOOPBACK = 0x8 IFF_LOOPBACK = 0x8
IFF_MULTICAST = 0x8000 IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80 IFF_NOARP = 0x80
IFF_NOTRAILERS = 0x20
IFF_OACTIVE = 0x400 IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10 IFF_POINTOPOINT = 0x10
IFF_PROMISC = 0x100 IFF_PROMISC = 0x100
IFF_RUNNING = 0x40 IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800 IFF_SIMPLEX = 0x800
IFF_STATICARP = 0x20
IFF_UP = 0x1 IFF_UP = 0x1
IFNAMSIZ = 0x10 IFNAMSIZ = 0x10
IFT_1822 = 0x2 IFT_1822 = 0x2
@ -605,6 +716,7 @@ const (
IFT_LINEGROUP = 0xd2 IFT_LINEGROUP = 0xd2
IFT_LOCALTALK = 0x2a IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18 IFT_LOOP = 0x18
IFT_MBIM = 0xfa
IFT_MEDIAMAILOVERIP = 0x8b IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7 IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26 IFT_MIOX25 = 0x26
@ -695,6 +807,7 @@ const (
IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERCABLE = 0xc6
IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68 IFT_VOICEOVERIP = 0x68
IFT_WIREGUARD = 0xfb
IFT_X213 = 0x5d IFT_X213 = 0x5d
IFT_X25 = 0x5 IFT_X25 = 0x5
IFT_X25DDN = 0x4 IFT_X25DDN = 0x4
@ -729,8 +842,6 @@ const (
IPPROTO_AH = 0x33 IPPROTO_AH = 0x33
IPPROTO_CARP = 0x70 IPPROTO_CARP = 0x70
IPPROTO_DIVERT = 0x102 IPPROTO_DIVERT = 0x102
IPPROTO_DIVERT_INIT = 0x2
IPPROTO_DIVERT_RESP = 0x1
IPPROTO_DONE = 0x101 IPPROTO_DONE = 0x101
IPPROTO_DSTOPTS = 0x3c IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8 IPPROTO_EGP = 0x8
@ -762,9 +873,11 @@ const (
IPPROTO_RAW = 0xff IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6 IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11 IPPROTO_UDP = 0x11
IPPROTO_UDPLITE = 0x88
IPV6_AUTH_LEVEL = 0x35 IPV6_AUTH_LEVEL = 0x35
IPV6_AUTOFLOWLABEL = 0x3b IPV6_AUTOFLOWLABEL = 0x3b
IPV6_CHECKSUM = 0x1a IPV6_CHECKSUM = 0x1a
@ -787,6 +900,7 @@ const (
IPV6_LEAVE_GROUP = 0xd IPV6_LEAVE_GROUP = 0xd
IPV6_MAXHLIM = 0xff IPV6_MAXHLIM = 0xff
IPV6_MAXPACKET = 0xffff IPV6_MAXPACKET = 0xffff
IPV6_MINHOPCOUNT = 0x41
IPV6_MMTU = 0x500 IPV6_MMTU = 0x500
IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_IF = 0x9
@ -826,12 +940,12 @@ const (
IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000 IP_DF = 0x4000
IP_DIVERTFL = 0x1022
IP_DROP_MEMBERSHIP = 0xd IP_DROP_MEMBERSHIP = 0xd
IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_NETWORK_LEVEL = 0x16
IP_ESP_TRANS_LEVEL = 0x15 IP_ESP_TRANS_LEVEL = 0x15
IP_HDRINCL = 0x2 IP_HDRINCL = 0x2
IP_IPCOMP_LEVEL = 0x1d IP_IPCOMP_LEVEL = 0x1d
IP_IPDEFTTL = 0x25
IP_IPSECFLOWINFO = 0x24 IP_IPSECFLOWINFO = 0x24
IP_IPSEC_LOCAL_AUTH = 0x1b IP_IPSEC_LOCAL_AUTH = 0x1b
IP_IPSEC_LOCAL_CRED = 0x19 IP_IPSEC_LOCAL_CRED = 0x19
@ -865,10 +979,15 @@ const (
IP_RETOPTS = 0x8 IP_RETOPTS = 0x8
IP_RF = 0x8000 IP_RF = 0x8000
IP_RTABLE = 0x1021 IP_RTABLE = 0x1021
IP_SENDSRCADDR = 0x7
IP_TOS = 0x3 IP_TOS = 0x3
IP_TTL = 0x4 IP_TTL = 0x4
ISIG = 0x80 ISIG = 0x80
ISTRIP = 0x20 ISTRIP = 0x20
ITIMER_PROF = 0x2
ITIMER_REAL = 0x0
ITIMER_VIRTUAL = 0x1
IUCLC = 0x1000
IXANY = 0x800 IXANY = 0x800
IXOFF = 0x400 IXOFF = 0x400
IXON = 0x200 IXON = 0x200
@ -900,10 +1019,11 @@ const (
MAP_INHERIT_COPY = 0x1 MAP_INHERIT_COPY = 0x1
MAP_INHERIT_NONE = 0x2 MAP_INHERIT_NONE = 0x2
MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_SHARE = 0x0
MAP_NOEXTEND = 0x100 MAP_INHERIT_ZERO = 0x3
MAP_NORESERVE = 0x40 MAP_NOEXTEND = 0x0
MAP_NORESERVE = 0x0
MAP_PRIVATE = 0x2 MAP_PRIVATE = 0x2
MAP_RENAME = 0x20 MAP_RENAME = 0x0
MAP_SHARED = 0x1 MAP_SHARED = 0x1
MAP_STACK = 0x4000 MAP_STACK = 0x4000
MAP_TRYFIXED = 0x0 MAP_TRYFIXED = 0x0
@ -922,6 +1042,7 @@ const (
MNT_NOATIME = 0x8000 MNT_NOATIME = 0x8000
MNT_NODEV = 0x10 MNT_NODEV = 0x10
MNT_NOEXEC = 0x4 MNT_NOEXEC = 0x4
MNT_NOPERM = 0x20
MNT_NOSUID = 0x8 MNT_NOSUID = 0x8
MNT_NOWAIT = 0x2 MNT_NOWAIT = 0x2
MNT_QUOTA = 0x2000 MNT_QUOTA = 0x2000
@ -929,13 +1050,29 @@ const (
MNT_RELOAD = 0x40000 MNT_RELOAD = 0x40000
MNT_ROOTFS = 0x4000 MNT_ROOTFS = 0x4000
MNT_SOFTDEP = 0x4000000 MNT_SOFTDEP = 0x4000000
MNT_STALLED = 0x100000
MNT_SWAPPABLE = 0x200000
MNT_SYNCHRONOUS = 0x2 MNT_SYNCHRONOUS = 0x2
MNT_UPDATE = 0x10000 MNT_UPDATE = 0x10000
MNT_VISFLAGMASK = 0x400ffff MNT_VISFLAGMASK = 0x400ffff
MNT_WAIT = 0x1 MNT_WAIT = 0x1
MNT_WANTRDWR = 0x2000000 MNT_WANTRDWR = 0x2000000
MNT_WXALLOWED = 0x800 MNT_WXALLOWED = 0x800
MOUNT_AFS = "afs"
MOUNT_CD9660 = "cd9660"
MOUNT_EXT2FS = "ext2fs"
MOUNT_FFS = "ffs"
MOUNT_FUSEFS = "fuse"
MOUNT_MFS = "mfs"
MOUNT_MSDOS = "msdos"
MOUNT_NCPFS = "ncpfs"
MOUNT_NFS = "nfs"
MOUNT_NTFS = "ntfs"
MOUNT_TMPFS = "tmpfs"
MOUNT_UDF = "udf"
MOUNT_UFS = "ffs"
MSG_BCAST = 0x100 MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4 MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80 MSG_DONTWAIT = 0x80
@ -946,6 +1083,7 @@ const (
MSG_PEEK = 0x2 MSG_PEEK = 0x2
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x1000
MS_ASYNC = 0x1 MS_ASYNC = 0x1
MS_INVALIDATE = 0x4 MS_INVALIDATE = 0x4
MS_SYNC = 0x2 MS_SYNC = 0x2
@ -953,12 +1091,16 @@ const (
NET_RT_DUMP = 0x1 NET_RT_DUMP = 0x1
NET_RT_FLAGS = 0x2 NET_RT_FLAGS = 0x2
NET_RT_IFLIST = 0x3 NET_RT_IFLIST = 0x3
NET_RT_MAXID = 0x6 NET_RT_IFNAMES = 0x6
NET_RT_MAXID = 0x8
NET_RT_SOURCE = 0x7
NET_RT_STATS = 0x4 NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5 NET_RT_TABLE = 0x5
NFDBITS = 0x20 NFDBITS = 0x20
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_CHANGE = 0x1
NOTE_CHILD = 0x4 NOTE_CHILD = 0x4
NOTE_DELETE = 0x1 NOTE_DELETE = 0x1
NOTE_EOF = 0x2 NOTE_EOF = 0x2
@ -968,6 +1110,7 @@ const (
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_OOB = 0x4
NOTE_PCTRLMASK = 0xf0000000 NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_RENAME = 0x20 NOTE_RENAME = 0x20
@ -977,11 +1120,13 @@ const (
NOTE_TRUNCATE = 0x80 NOTE_TRUNCATE = 0x80
NOTE_WRITE = 0x2 NOTE_WRITE = 0x2
OCRNL = 0x10 OCRNL = 0x10
OLCUC = 0x20
ONLCR = 0x2 ONLCR = 0x2
ONLRET = 0x80 ONLRET = 0x80
ONOCR = 0x40 ONOCR = 0x40
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_APPEND = 0x8 O_APPEND = 0x8
O_ASYNC = 0x40 O_ASYNC = 0x40
@ -1015,7 +1160,6 @@ const (
PROT_NONE = 0x0 PROT_NONE = 0x0
PROT_READ = 0x1 PROT_READ = 0x1
PROT_WRITE = 0x2 PROT_WRITE = 0x2
PT_MASK = 0x3ff000
RLIMIT_CORE = 0x4 RLIMIT_CORE = 0x4
RLIMIT_CPU = 0x0 RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2 RLIMIT_DATA = 0x2
@ -1027,19 +1171,25 @@ const (
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
RTAX_BFD = 0xb
RTAX_BRD = 0x7 RTAX_BRD = 0x7
RTAX_DNS = 0xc
RTAX_DST = 0x0 RTAX_DST = 0x0
RTAX_GATEWAY = 0x1 RTAX_GATEWAY = 0x1
RTAX_GENMASK = 0x3 RTAX_GENMASK = 0x3
RTAX_IFA = 0x5 RTAX_IFA = 0x5
RTAX_IFP = 0x4 RTAX_IFP = 0x4
RTAX_LABEL = 0xa RTAX_LABEL = 0xa
RTAX_MAX = 0xb RTAX_MAX = 0xf
RTAX_NETMASK = 0x2 RTAX_NETMASK = 0x2
RTAX_SEARCH = 0xe
RTAX_SRC = 0x8 RTAX_SRC = 0x8
RTAX_SRCMASK = 0x9 RTAX_SRCMASK = 0x9
RTAX_STATIC = 0xd
RTA_AUTHOR = 0x40 RTA_AUTHOR = 0x40
RTA_BFD = 0x800
RTA_BRD = 0x80 RTA_BRD = 0x80
RTA_DNS = 0x1000
RTA_DST = 0x1 RTA_DST = 0x1
RTA_GATEWAY = 0x2 RTA_GATEWAY = 0x2
RTA_GENMASK = 0x8 RTA_GENMASK = 0x8
@ -1047,49 +1197,57 @@ const (
RTA_IFP = 0x10 RTA_IFP = 0x10
RTA_LABEL = 0x400 RTA_LABEL = 0x400
RTA_NETMASK = 0x4 RTA_NETMASK = 0x4
RTA_SEARCH = 0x4000
RTA_SRC = 0x100 RTA_SRC = 0x100
RTA_SRCMASK = 0x200 RTA_SRCMASK = 0x200
RTA_STATIC = 0x2000
RTF_ANNOUNCE = 0x4000 RTF_ANNOUNCE = 0x4000
RTF_BFD = 0x1000000
RTF_BLACKHOLE = 0x1000 RTF_BLACKHOLE = 0x1000
RTF_BROADCAST = 0x400000
RTF_CACHED = 0x20000
RTF_CLONED = 0x10000 RTF_CLONED = 0x10000
RTF_CLONING = 0x100 RTF_CLONING = 0x100
RTF_CONNECTED = 0x800000
RTF_DONE = 0x40 RTF_DONE = 0x40
RTF_DYNAMIC = 0x10 RTF_DYNAMIC = 0x10
RTF_FMASK = 0x10f808 RTF_FMASK = 0x110fc08
RTF_GATEWAY = 0x2 RTF_GATEWAY = 0x2
RTF_HOST = 0x4 RTF_HOST = 0x4
RTF_LLINFO = 0x400 RTF_LLINFO = 0x400
RTF_MASK = 0x80 RTF_LOCAL = 0x200000
RTF_MODIFIED = 0x20 RTF_MODIFIED = 0x20
RTF_MPATH = 0x40000 RTF_MPATH = 0x40000
RTF_MPLS = 0x100000 RTF_MPLS = 0x100000
RTF_MULTICAST = 0x200
RTF_PERMANENT_ARP = 0x2000 RTF_PERMANENT_ARP = 0x2000
RTF_PROTO1 = 0x8000 RTF_PROTO1 = 0x8000
RTF_PROTO2 = 0x4000 RTF_PROTO2 = 0x4000
RTF_PROTO3 = 0x2000 RTF_PROTO3 = 0x2000
RTF_REJECT = 0x8 RTF_REJECT = 0x8
RTF_SOURCE = 0x20000
RTF_STATIC = 0x800 RTF_STATIC = 0x800
RTF_TUNNEL = 0x100000
RTF_UP = 0x1 RTF_UP = 0x1
RTF_USETRAILERS = 0x8000 RTF_USETRAILERS = 0x8000
RTF_XRESOLVE = 0x200 RTM_80211INFO = 0x15
RTM_ADD = 0x1 RTM_ADD = 0x1
RTM_BFD = 0x12
RTM_CHANGE = 0x3 RTM_CHANGE = 0x3
RTM_CHGADDRATTR = 0x14
RTM_DELADDR = 0xd RTM_DELADDR = 0xd
RTM_DELETE = 0x2 RTM_DELETE = 0x2
RTM_DESYNC = 0x10 RTM_DESYNC = 0x10
RTM_GET = 0x4 RTM_GET = 0x4
RTM_IFANNOUNCE = 0xf RTM_IFANNOUNCE = 0xf
RTM_IFINFO = 0xe RTM_IFINFO = 0xe
RTM_LOCK = 0x8 RTM_INVALIDATE = 0x11
RTM_LOSING = 0x5 RTM_LOSING = 0x5
RTM_MAXSIZE = 0x800 RTM_MAXSIZE = 0x800
RTM_MISS = 0x7 RTM_MISS = 0x7
RTM_NEWADDR = 0xc RTM_NEWADDR = 0xc
RTM_PROPOSAL = 0x13
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_SOURCE = 0x16
RTM_VERSION = 0x5 RTM_VERSION = 0x5
RTV_EXPIRE = 0x4 RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2 RTV_HOPCOUNT = 0x2
@ -1099,67 +1257,74 @@ const (
RTV_RTTVAR = 0x80 RTV_RTTVAR = 0x80
RTV_SPIPE = 0x10 RTV_SPIPE = 0x10
RTV_SSTHRESH = 0x20 RTV_SSTHRESH = 0x20
RT_TABLEID_BITS = 0x8
RT_TABLEID_MASK = 0xff
RT_TABLEID_MAX = 0xff RT_TABLEID_MAX = 0xff
RUSAGE_CHILDREN = -0x1 RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0 RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1 RUSAGE_THREAD = 0x1
SCM_RIGHTS = 0x1 SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x4 SCM_TIMESTAMP = 0x4
SEEK_CUR = 0x1
SEEK_END = 0x2
SEEK_SET = 0x0
SHUT_RD = 0x0 SHUT_RD = 0x0
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931 SIOCADDMULTI = 0x80206931
SIOCAIFADDR = 0x8040691a SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80246987 SIOCAIFGROUP = 0x80246987
SIOCALIFADDR = 0x8218691c
SIOCATMARK = 0x40047307 SIOCATMARK = 0x40047307
SIOCBRDGADD = 0x8054693c SIOCBRDGADD = 0x805c693c
SIOCBRDGADDS = 0x80546941 SIOCBRDGADDL = 0x805c6949
SIOCBRDGARL = 0x806e694d SIOCBRDGADDS = 0x805c6941
SIOCBRDGARL = 0x808c694d
SIOCBRDGDADDR = 0x81286947 SIOCBRDGDADDR = 0x81286947
SIOCBRDGDEL = 0x8054693d SIOCBRDGDEL = 0x805c693d
SIOCBRDGDELS = 0x80546942 SIOCBRDGDELS = 0x805c6942
SIOCBRDGFLUSH = 0x80546948 SIOCBRDGFLUSH = 0x805c6948
SIOCBRDGFRL = 0x806e694e SIOCBRDGFRL = 0x808c694e
SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGCACHE = 0xc0146941
SIOCBRDGGFD = 0xc0146952 SIOCBRDGGFD = 0xc0146952
SIOCBRDGGHT = 0xc0146951 SIOCBRDGGHT = 0xc0146951
SIOCBRDGGIFFLGS = 0xc054693e SIOCBRDGGIFFLGS = 0xc05c693e
SIOCBRDGGMA = 0xc0146953 SIOCBRDGGMA = 0xc0146953
SIOCBRDGGPARAM = 0xc03c6958 SIOCBRDGGPARAM = 0xc03c6958
SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGPRI = 0xc0146950
SIOCBRDGGRL = 0xc028694f SIOCBRDGGRL = 0xc028694f
SIOCBRDGGSIFS = 0xc054693c
SIOCBRDGGTO = 0xc0146946 SIOCBRDGGTO = 0xc0146946
SIOCBRDGIFS = 0xc0546942 SIOCBRDGIFS = 0xc05c6942
SIOCBRDGRTS = 0xc0186943 SIOCBRDGRTS = 0xc0186943
SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSADDR = 0xc1286944
SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSCACHE = 0x80146940
SIOCBRDGSFD = 0x80146952 SIOCBRDGSFD = 0x80146952
SIOCBRDGSHT = 0x80146951 SIOCBRDGSHT = 0x80146951
SIOCBRDGSIFCOST = 0x80546955 SIOCBRDGSIFCOST = 0x805c6955
SIOCBRDGSIFFLGS = 0x8054693f SIOCBRDGSIFFLGS = 0x805c693f
SIOCBRDGSIFPRIO = 0x80546954 SIOCBRDGSIFPRIO = 0x805c6954
SIOCBRDGSIFPROT = 0x805c694a
SIOCBRDGSMA = 0x80146953 SIOCBRDGSMA = 0x80146953
SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPRI = 0x80146950
SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSPROTO = 0x8014695a
SIOCBRDGSTO = 0x80146945 SIOCBRDGSTO = 0x80146945
SIOCBRDGSTXHC = 0x80146959 SIOCBRDGSTXHC = 0x80146959
SIOCDELLABEL = 0x80206997
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80246989 SIOCDIFGROUP = 0x80246989
SIOCDIFPARENT = 0x802069b4
SIOCDIFPHYADDR = 0x80206949 SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8218691e SIOCDPWE3NEIGHBOR = 0x802069de
SIOCDVNETID = 0x802069af
SIOCGETKALIVE = 0xc01869a4 SIOCGETKALIVE = 0xc01869a4
SIOCGETLABEL = 0x8020699a SIOCGETLABEL = 0x8020699a
SIOCGETMPWCFG = 0xc02069ae
SIOCGETPFLOW = 0xc02069fe SIOCGETPFLOW = 0xc02069fe
SIOCGETPFSYNC = 0xc02069f8 SIOCGETPFSYNC = 0xc02069f8
SIOCGETSGCNT = 0xc0147534 SIOCGETSGCNT = 0xc0147534
SIOCGETVIFCNT = 0xc0147533 SIOCGETVIFCNT = 0xc0147533
SIOCGETVLAN = 0xc0206990 SIOCGETVLAN = 0xc0206990
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921 SIOCGIFADDR = 0xc0206921
SIOCGIFASYNCMAP = 0xc020697c
SIOCGIFBRDADDR = 0xc0206923 SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCONF = 0xc0086924 SIOCGIFCONF = 0xc0086924
SIOCGIFDATA = 0xc020691b SIOCGIFDATA = 0xc020691b
@ -1168,40 +1333,53 @@ const (
SIOCGIFFLAGS = 0xc0206911 SIOCGIFFLAGS = 0xc0206911
SIOCGIFGATTR = 0xc024698b SIOCGIFGATTR = 0xc024698b
SIOCGIFGENERIC = 0xc020693a SIOCGIFGENERIC = 0xc020693a
SIOCGIFGLIST = 0xc024698d
SIOCGIFGMEMB = 0xc024698a SIOCGIFGMEMB = 0xc024698a
SIOCGIFGROUP = 0xc0246988 SIOCGIFGROUP = 0xc0246988
SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFHARDMTU = 0xc02069a5
SIOCGIFMEDIA = 0xc0286936 SIOCGIFLLPRIO = 0xc02069b6
SIOCGIFMEDIA = 0xc0386938
SIOCGIFMETRIC = 0xc0206917 SIOCGIFMETRIC = 0xc0206917
SIOCGIFMTU = 0xc020697e SIOCGIFMTU = 0xc020697e
SIOCGIFNETMASK = 0xc0206925 SIOCGIFNETMASK = 0xc0206925
SIOCGIFPDSTADDR = 0xc0206948 SIOCGIFPAIR = 0xc02069b1
SIOCGIFPARENT = 0xc02069b3
SIOCGIFPRIORITY = 0xc020699c SIOCGIFPRIORITY = 0xc020699c
SIOCGIFPSRCADDR = 0xc0206947
SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRDOMAIN = 0xc02069a0
SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRTLABEL = 0xc0206983
SIOCGIFTIMESLOT = 0xc0206986 SIOCGIFRXR = 0x802069aa
SIOCGIFSFFPAGE = 0xc1126939
SIOCGIFXFLAGS = 0xc020699e SIOCGIFXFLAGS = 0xc020699e
SIOCGLIFADDR = 0xc218691d
SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYADDR = 0xc218694b
SIOCGLIFPHYDF = 0xc02069c2
SIOCGLIFPHYECN = 0xc02069c8
SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYRTABLE = 0xc02069a2
SIOCGLIFPHYTTL = 0xc02069a9 SIOCGLIFPHYTTL = 0xc02069a9
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309 SIOCGPGRP = 0x40047309
SIOCGPWE3 = 0xc0206998
SIOCGPWE3CTRLWORD = 0xc02069dc
SIOCGPWE3FAT = 0xc02069dd
SIOCGPWE3NEIGHBOR = 0xc21869de
SIOCGRXHPRIO = 0xc02069db
SIOCGSPPPPARAMS = 0xc0206994 SIOCGSPPPPARAMS = 0xc0206994
SIOCGTXHPRIO = 0xc02069c6
SIOCGUMBINFO = 0xc02069be
SIOCGUMBPARAM = 0xc02069c0
SIOCGVH = 0xc02069f6 SIOCGVH = 0xc02069f6
SIOCGVNETFLOWID = 0xc02069c4
SIOCGVNETID = 0xc02069a7 SIOCGVNETID = 0xc02069a7
SIOCIFAFATTACH = 0x801169ab
SIOCIFAFDETACH = 0x801169ac
SIOCIFCREATE = 0x8020697a SIOCIFCREATE = 0x8020697a
SIOCIFDESTROY = 0x80206979 SIOCIFDESTROY = 0x80206979
SIOCIFGCLONERS = 0xc00c6978 SIOCIFGCLONERS = 0xc00c6978
SIOCSETKALIVE = 0x801869a3 SIOCSETKALIVE = 0x801869a3
SIOCSETLABEL = 0x80206999 SIOCSETLABEL = 0x80206999
SIOCSETMPWCFG = 0x802069ad
SIOCSETPFLOW = 0x802069fd SIOCSETPFLOW = 0x802069fd
SIOCSETPFSYNC = 0x802069f7 SIOCSETPFSYNC = 0x802069f7
SIOCSETVLAN = 0x8020698f SIOCSETVLAN = 0x8020698f
SIOCSHIWAT = 0x80047300
SIOCSIFADDR = 0x8020690c SIOCSIFADDR = 0x8020690c
SIOCSIFASYNCMAP = 0x8020697d
SIOCSIFBRDADDR = 0x80206913 SIOCSIFBRDADDR = 0x80206913
SIOCSIFDESCR = 0x80206980 SIOCSIFDESCR = 0x80206980
SIOCSIFDSTADDR = 0x8020690e SIOCSIFDSTADDR = 0x8020690e
@ -1209,25 +1387,37 @@ const (
SIOCSIFGATTR = 0x8024698c SIOCSIFGATTR = 0x8024698c
SIOCSIFGENERIC = 0x80206939 SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020691f SIOCSIFLLADDR = 0x8020691f
SIOCSIFMEDIA = 0xc0206935 SIOCSIFLLPRIO = 0x802069b5
SIOCSIFMEDIA = 0xc0206937
SIOCSIFMETRIC = 0x80206918 SIOCSIFMETRIC = 0x80206918
SIOCSIFMTU = 0x8020697f SIOCSIFMTU = 0x8020697f
SIOCSIFNETMASK = 0x80206916 SIOCSIFNETMASK = 0x80206916
SIOCSIFPHYADDR = 0x80406946 SIOCSIFPAIR = 0x802069b0
SIOCSIFPARENT = 0x802069b2
SIOCSIFPRIORITY = 0x8020699b SIOCSIFPRIORITY = 0x8020699b
SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRDOMAIN = 0x8020699f
SIOCSIFRTLABEL = 0x80206982 SIOCSIFRTLABEL = 0x80206982
SIOCSIFTIMESLOT = 0x80206985
SIOCSIFXFLAGS = 0x8020699d SIOCSIFXFLAGS = 0x8020699d
SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYADDR = 0x8218694a
SIOCSLIFPHYDF = 0x802069c1
SIOCSLIFPHYECN = 0x802069c7
SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYRTABLE = 0x802069a1
SIOCSLIFPHYTTL = 0x802069a8 SIOCSLIFPHYTTL = 0x802069a8
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308 SIOCSPGRP = 0x80047308
SIOCSPWE3CTRLWORD = 0x802069dc
SIOCSPWE3FAT = 0x802069dd
SIOCSPWE3NEIGHBOR = 0x821869de
SIOCSRXHPRIO = 0x802069db
SIOCSSPPPPARAMS = 0x80206993 SIOCSSPPPPARAMS = 0x80206993
SIOCSTXHPRIO = 0x802069c5
SIOCSUMBPARAM = 0x802069bf
SIOCSVH = 0xc02069f5 SIOCSVH = 0xc02069f5
SIOCSVNETFLOWID = 0x802069c3
SIOCSVNETID = 0x802069a6 SIOCSVNETID = 0x802069a6
SOCK_CLOEXEC = 0x8000
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_DNS = 0x1000
SOCK_NONBLOCK = 0x4000
SOCK_RAW = 0x3 SOCK_RAW = 0x3
SOCK_RDM = 0x4 SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5 SOCK_SEQPACKET = 0x5
@ -1238,6 +1428,7 @@ const (
SO_BINDANY = 0x1000 SO_BINDANY = 0x1000
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_DEBUG = 0x1 SO_DEBUG = 0x1
SO_DOMAIN = 0x1024
SO_DONTROUTE = 0x10 SO_DONTROUTE = 0x10
SO_ERROR = 0x1007 SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8 SO_KEEPALIVE = 0x8
@ -1245,6 +1436,7 @@ const (
SO_NETPROC = 0x1020 SO_NETPROC = 0x1020
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PEERCRED = 0x1022 SO_PEERCRED = 0x1022
SO_PROTOCOL = 0x1025
SO_RCVBUF = 0x1002 SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004 SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
@ -1258,6 +1450,7 @@ const (
SO_TIMESTAMP = 0x800 SO_TIMESTAMP = 0x800
SO_TYPE = 0x1008 SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40 SO_USELOOPBACK = 0x40
SO_ZEROIZE = 0x2000
S_BLKSIZE = 0x200 S_BLKSIZE = 0x200
S_IEXEC = 0x40 S_IEXEC = 0x40
S_IFBLK = 0x6000 S_IFBLK = 0x6000
@ -1287,9 +1480,24 @@ const (
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCP_MAXBURST = 0x4 TCOOFF = 0x1
TCOON = 0x2
TCPOPT_EOL = 0x0
TCPOPT_MAXSEG = 0x2
TCPOPT_NOP = 0x1
TCPOPT_SACK = 0x5
TCPOPT_SACK_HDR = 0x1010500
TCPOPT_SACK_PERMITTED = 0x4
TCPOPT_SACK_PERMIT_HDR = 0x1010402
TCPOPT_SIGNATURE = 0x13
TCPOPT_TIMESTAMP = 0x8
TCPOPT_TSTAMP_HDR = 0x101080a
TCPOPT_WINDOW = 0x3
TCP_INFO = 0x9
TCP_MAXSEG = 0x2 TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff TCP_MAXWIN = 0xffff
TCP_MAX_SACK = 0x3 TCP_MAX_SACK = 0x3
@ -1298,11 +1506,15 @@ const (
TCP_MSS = 0x200 TCP_MSS = 0x200
TCP_NODELAY = 0x1 TCP_NODELAY = 0x1
TCP_NOPUSH = 0x10 TCP_NOPUSH = 0x10
TCP_NSTATES = 0xb TCP_SACKHOLE_LIMIT = 0x80
TCP_SACK_ENABLE = 0x8 TCP_SACK_ENABLE = 0x8
TCSAFLUSH = 0x2 TCSAFLUSH = 0x2
TIMER_ABSTIME = 0x1
TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478 TIOCCDTR = 0x20007478
TIOCCHKVERAUTH = 0x2000741e
TIOCCLRVERAUTH = 0x2000741d
TIOCCONS = 0x80047462 TIOCCONS = 0x80047462
TIOCDRAIN = 0x2000745e TIOCDRAIN = 0x2000745e
TIOCEXCL = 0x2000740d TIOCEXCL = 0x2000740d
@ -1357,17 +1569,21 @@ const (
TIOCSETAF = 0x802c7416 TIOCSETAF = 0x802c7416
TIOCSETAW = 0x802c7415 TIOCSETAW = 0x802c7415
TIOCSETD = 0x8004741b TIOCSETD = 0x8004741b
TIOCSETVERAUTH = 0x8004741c
TIOCSFLAGS = 0x8004745c TIOCSFLAGS = 0x8004745c
TIOCSIG = 0x8004745f TIOCSIG = 0x8004745f
TIOCSPGRP = 0x80047476 TIOCSPGRP = 0x80047476
TIOCSTART = 0x2000746e TIOCSTART = 0x2000746e
TIOCSTAT = 0x80047465 TIOCSTAT = 0x20007465
TIOCSTI = 0x80017472
TIOCSTOP = 0x2000746f TIOCSTOP = 0x2000746f
TIOCSTSTAMP = 0x8008745a TIOCSTSTAMP = 0x8008745a
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCUCNTL = 0x80047466 TIOCUCNTL = 0x80047466
TIOCUCNTL_CBRK = 0x7a
TIOCUCNTL_SBRK = 0x7b
TOSTOP = 0x400000 TOSTOP = 0x400000
UTIME_NOW = -0x2
UTIME_OMIT = -0x1
VDISCARD = 0xf VDISCARD = 0xf
VDSUSP = 0xb VDSUSP = 0xb
VEOF = 0x0 VEOF = 0x0
@ -1378,6 +1594,19 @@ const (
VKILL = 0x5 VKILL = 0x5
VLNEXT = 0xe VLNEXT = 0xe
VMIN = 0x10 VMIN = 0x10
VM_ANONMIN = 0x7
VM_LOADAVG = 0x2
VM_MALLOC_CONF = 0xc
VM_MAXID = 0xd
VM_MAXSLP = 0xa
VM_METER = 0x1
VM_NKMEMPAGES = 0x6
VM_PSSTRINGS = 0x3
VM_SWAPENCRYPT = 0x5
VM_USPACE = 0xb
VM_UVMEXP = 0x4
VM_VNODEMIN = 0x9
VM_VTEXTMIN = 0x8
VQUIT = 0x9 VQUIT = 0x9
VREPRINT = 0x6 VREPRINT = 0x6
VSTART = 0xc VSTART = 0xc
@ -1390,8 +1619,8 @@ const (
WCONTINUED = 0x8 WCONTINUED = 0x8
WCOREFLAG = 0x80 WCOREFLAG = 0x80
WNOHANG = 0x1 WNOHANG = 0x1
WSTOPPED = 0x7f
WUNTRACED = 0x2 WUNTRACED = 0x2
XCASE = 0x1000000
) )
// Errors // Errors
@ -1405,6 +1634,7 @@ const (
EALREADY = syscall.Errno(0x25) EALREADY = syscall.Errno(0x25)
EAUTH = syscall.Errno(0x50) EAUTH = syscall.Errno(0x50)
EBADF = syscall.Errno(0x9) EBADF = syscall.Errno(0x9)
EBADMSG = syscall.Errno(0x5c)
EBADRPC = syscall.Errno(0x48) EBADRPC = syscall.Errno(0x48)
EBUSY = syscall.Errno(0x10) EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x58) ECANCELED = syscall.Errno(0x58)
@ -1431,7 +1661,7 @@ const (
EIPSEC = syscall.Errno(0x52) EIPSEC = syscall.Errno(0x52)
EISCONN = syscall.Errno(0x38) EISCONN = syscall.Errno(0x38)
EISDIR = syscall.Errno(0x15) EISDIR = syscall.Errno(0x15)
ELAST = syscall.Errno(0x5b) ELAST = syscall.Errno(0x5f)
ELOOP = syscall.Errno(0x3e) ELOOP = syscall.Errno(0x3e)
EMEDIUMTYPE = syscall.Errno(0x56) EMEDIUMTYPE = syscall.Errno(0x56)
EMFILE = syscall.Errno(0x18) EMFILE = syscall.Errno(0x18)
@ -1459,12 +1689,14 @@ const (
ENOTCONN = syscall.Errno(0x39) ENOTCONN = syscall.Errno(0x39)
ENOTDIR = syscall.Errno(0x14) ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x42) ENOTEMPTY = syscall.Errno(0x42)
ENOTRECOVERABLE = syscall.Errno(0x5d)
ENOTSOCK = syscall.Errno(0x26) ENOTSOCK = syscall.Errno(0x26)
ENOTSUP = syscall.Errno(0x5b) ENOTSUP = syscall.Errno(0x5b)
ENOTTY = syscall.Errno(0x19) ENOTTY = syscall.Errno(0x19)
ENXIO = syscall.Errno(0x6) ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x2d) EOPNOTSUPP = syscall.Errno(0x2d)
EOVERFLOW = syscall.Errno(0x57) EOVERFLOW = syscall.Errno(0x57)
EOWNERDEAD = syscall.Errno(0x5e)
EPERM = syscall.Errno(0x1) EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x2e) EPFNOSUPPORT = syscall.Errno(0x2e)
EPIPE = syscall.Errno(0x20) EPIPE = syscall.Errno(0x20)
@ -1472,6 +1704,7 @@ const (
EPROCUNAVAIL = syscall.Errno(0x4c) EPROCUNAVAIL = syscall.Errno(0x4c)
EPROGMISMATCH = syscall.Errno(0x4b) EPROGMISMATCH = syscall.Errno(0x4b)
EPROGUNAVAIL = syscall.Errno(0x4a) EPROGUNAVAIL = syscall.Errno(0x4a)
EPROTO = syscall.Errno(0x5f)
EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTONOSUPPORT = syscall.Errno(0x2b)
EPROTOTYPE = syscall.Errno(0x29) EPROTOTYPE = syscall.Errno(0x29)
ERANGE = syscall.Errno(0x22) ERANGE = syscall.Errno(0x22)
@ -1568,7 +1801,7 @@ var errorList = [...]struct {
{32, "EPIPE", "broken pipe"}, {32, "EPIPE", "broken pipe"},
{33, "EDOM", "numerical argument out of domain"}, {33, "EDOM", "numerical argument out of domain"},
{34, "ERANGE", "result too large"}, {34, "ERANGE", "result too large"},
{35, "EWOULDBLOCK", "resource temporarily unavailable"}, {35, "EAGAIN", "resource temporarily unavailable"},
{36, "EINPROGRESS", "operation now in progress"}, {36, "EINPROGRESS", "operation now in progress"},
{37, "EALREADY", "operation already in progress"}, {37, "EALREADY", "operation already in progress"},
{38, "ENOTSOCK", "socket operation on non-socket"}, {38, "ENOTSOCK", "socket operation on non-socket"},
@ -1624,7 +1857,11 @@ var errorList = [...]struct {
{88, "ECANCELED", "operation canceled"}, {88, "ECANCELED", "operation canceled"},
{89, "EIDRM", "identifier removed"}, {89, "EIDRM", "identifier removed"},
{90, "ENOMSG", "no message of desired type"}, {90, "ENOMSG", "no message of desired type"},
{91, "ELAST", "not supported"}, {91, "ENOTSUP", "not supported"},
{92, "EBADMSG", "bad message"},
{93, "ENOTRECOVERABLE", "state not recoverable"},
{94, "EOWNERDEAD", "previous owner died"},
{95, "ELAST", "protocol error"},
} }
// Signal table // Signal table
@ -1638,7 +1875,7 @@ var signalList = [...]struct {
{3, "SIGQUIT", "quit"}, {3, "SIGQUIT", "quit"},
{4, "SIGILL", "illegal instruction"}, {4, "SIGILL", "illegal instruction"},
{5, "SIGTRAP", "trace/BPT trap"}, {5, "SIGTRAP", "trace/BPT trap"},
{6, "SIGABRT", "abort trap"}, {6, "SIGIOT", "abort trap"},
{7, "SIGEMT", "EMT trap"}, {7, "SIGEMT", "EMT trap"},
{8, "SIGFPE", "floating point exception"}, {8, "SIGFPE", "floating point exception"},
{9, "SIGKILL", "killed"}, {9, "SIGKILL", "killed"},
@ -1665,4 +1902,5 @@ var signalList = [...]struct {
{30, "SIGUSR1", "user defined signal 1"}, {30, "SIGUSR1", "user defined signal 1"},
{31, "SIGUSR2", "user defined signal 2"}, {31, "SIGUSR2", "user defined signal 2"},
{32, "SIGTHR", "thread AST"}, {32, "SIGTHR", "thread AST"},
{28672, "SIGSTKSZ", "unknown signal"},
} }

View file

@ -109,6 +109,15 @@ const (
BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_IN = 0x1
BPF_DIRECTION_OUT = 0x2 BPF_DIRECTION_OUT = 0x2
BPF_DIV = 0x30 BPF_DIV = 0x30
BPF_FILDROP_CAPTURE = 0x1
BPF_FILDROP_DROP = 0x2
BPF_FILDROP_PASS = 0x0
BPF_F_DIR_IN = 0x10
BPF_F_DIR_MASK = 0x30
BPF_F_DIR_OUT = 0x20
BPF_F_DIR_SHIFT = 0x4
BPF_F_FLOWID = 0x8
BPF_F_PRI_MASK = 0x7
BPF_H = 0x8 BPF_H = 0x8
BPF_IMM = 0x0 BPF_IMM = 0x0
BPF_IND = 0x40 BPF_IND = 0x40
@ -137,6 +146,7 @@ const (
BPF_OR = 0x40 BPF_OR = 0x40
BPF_RELEASE = 0x30bb6 BPF_RELEASE = 0x30bb6
BPF_RET = 0x6 BPF_RET = 0x6
BPF_RND = 0xc0
BPF_RSH = 0x70 BPF_RSH = 0x70
BPF_ST = 0x2 BPF_ST = 0x2
BPF_STX = 0x3 BPF_STX = 0x3
@ -177,7 +187,65 @@ const (
CTL_KERN = 0x1 CTL_KERN = 0x1
CTL_MAXNAME = 0xc CTL_MAXNAME = 0xc
CTL_NET = 0x4 CTL_NET = 0x4
DIOCADDQUEUE = 0xc110445d
DIOCADDRULE = 0xcd604404
DIOCADDSTATE = 0xc1084425
DIOCCHANGERULE = 0xcd60441a
DIOCCLRIFFLAG = 0xc028445a
DIOCCLRSRCNODES = 0x20004455
DIOCCLRSTATES = 0xc0e04412
DIOCCLRSTATUS = 0xc0284416
DIOCGETLIMIT = 0xc0084427
DIOCGETQSTATS = 0xc1204460
DIOCGETQUEUE = 0xc110445f
DIOCGETQUEUES = 0xc110445e
DIOCGETRULE = 0xcd604407
DIOCGETRULES = 0xcd604406
DIOCGETRULESET = 0xc444443b
DIOCGETRULESETS = 0xc444443a
DIOCGETSRCNODES = 0xc0104454
DIOCGETSTATE = 0xc1084413
DIOCGETSTATES = 0xc0104419
DIOCGETSTATUS = 0xc1e84415
DIOCGETSYNFLWATS = 0xc0084463
DIOCGETTIMEOUT = 0xc008441e
DIOCIGETIFACES = 0xc0284457
DIOCKILLSRCNODES = 0xc080445b
DIOCKILLSTATES = 0xc0e04429
DIOCNATLOOK = 0xc0504417
DIOCOSFPADD = 0xc088444f
DIOCOSFPFLUSH = 0x2000444e DIOCOSFPFLUSH = 0x2000444e
DIOCOSFPGET = 0xc0884450
DIOCRADDADDRS = 0xc4504443
DIOCRADDTABLES = 0xc450443d
DIOCRCLRADDRS = 0xc4504442
DIOCRCLRASTATS = 0xc4504448
DIOCRCLRTABLES = 0xc450443c
DIOCRCLRTSTATS = 0xc4504441
DIOCRDELADDRS = 0xc4504444
DIOCRDELTABLES = 0xc450443e
DIOCRGETADDRS = 0xc4504446
DIOCRGETASTATS = 0xc4504447
DIOCRGETTABLES = 0xc450443f
DIOCRGETTSTATS = 0xc4504440
DIOCRINADEFINE = 0xc450444d
DIOCRSETADDRS = 0xc4504445
DIOCRSETTFLAGS = 0xc450444a
DIOCRTSTADDRS = 0xc4504449
DIOCSETDEBUG = 0xc0044418
DIOCSETHOSTID = 0xc0044456
DIOCSETIFFLAG = 0xc0284459
DIOCSETLIMIT = 0xc0084428
DIOCSETREASS = 0xc004445c
DIOCSETSTATUSIF = 0xc0284414
DIOCSETSYNCOOKIES = 0xc0014462
DIOCSETSYNFLWATS = 0xc0084461
DIOCSETTIMEOUT = 0xc008441d
DIOCSTART = 0x20004401
DIOCSTOP = 0x20004402
DIOCXBEGIN = 0xc0104451
DIOCXCOMMIT = 0xc0104452
DIOCXROLLBACK = 0xc0104453
DLT_ARCNET = 0x7 DLT_ARCNET = 0x7
DLT_ATM_RFC1483 = 0xb DLT_ATM_RFC1483 = 0xb
DLT_AX25 = 0x3 DLT_AX25 = 0x3
@ -240,6 +308,8 @@ const (
EMUL_ENABLED = 0x1 EMUL_ENABLED = 0x1
EMUL_NATIVE = 0x2 EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9 ENDRUNDISC = 0x9
ETH64_8021_RSVD_MASK = 0xfffffffffff0
ETH64_8021_RSVD_PREFIX = 0x180c2000000
ETHERMIN = 0x2e ETHERMIN = 0x2e
ETHERMTU = 0x5dc ETHERMTU = 0x5dc
ETHERTYPE_8023 = 0x4 ETHERTYPE_8023 = 0x4
@ -292,6 +362,7 @@ const (
ETHERTYPE_DN = 0x6003 ETHERTYPE_DN = 0x6003
ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DOGFIGHT = 0x1989
ETHERTYPE_DSMD = 0x8039 ETHERTYPE_DSMD = 0x8039
ETHERTYPE_EAPOL = 0x888e
ETHERTYPE_ECMA = 0x803 ETHERTYPE_ECMA = 0x803
ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ENCRYPT = 0x803d
ETHERTYPE_ES = 0x805d ETHERTYPE_ES = 0x805d
@ -323,6 +394,7 @@ const (
ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LLDP = 0x88cc
ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOGICRAFT = 0x8148
ETHERTYPE_LOOPBACK = 0x9000 ETHERTYPE_LOOPBACK = 0x9000
ETHERTYPE_MACSEC = 0x88e5
ETHERTYPE_MATRA = 0x807a ETHERTYPE_MATRA = 0x807a
ETHERTYPE_MAX = 0xffff ETHERTYPE_MAX = 0xffff
ETHERTYPE_MERIT = 0x807c ETHERTYPE_MERIT = 0x807c
@ -351,15 +423,17 @@ const (
ETHERTYPE_NCD = 0x8149 ETHERTYPE_NCD = 0x8149
ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NESTAR = 0x8006
ETHERTYPE_NETBEUI = 0x8191 ETHERTYPE_NETBEUI = 0x8191
ETHERTYPE_NHRP = 0x2001
ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NOVELL = 0x8138
ETHERTYPE_NS = 0x600 ETHERTYPE_NS = 0x600
ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSAT = 0x601
ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSCOMPAT = 0x807
ETHERTYPE_NSH = 0x984f
ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_NTRAILER = 0x10
ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9 = 0x7007
ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_OS9NET = 0x7009
ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PACER = 0x80c6
ETHERTYPE_PAE = 0x888e ETHERTYPE_PBB = 0x88e7
ETHERTYPE_PCS = 0x4242 ETHERTYPE_PCS = 0x4242
ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PLANNING = 0x8044
ETHERTYPE_PPP = 0x880b ETHERTYPE_PPP = 0x880b
@ -441,10 +515,11 @@ const (
ETHER_VLAN_ENCAP_LEN = 0x4 ETHER_VLAN_ENCAP_LEN = 0x4
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_DEVICE = -0x8 EVFILT_DEVICE = -0x8
EVFILT_EXCEPT = -0x9
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0x8 EVFILT_SYSCOUNT = 0x9
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_VNODE = -0x4 EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2 EVFILT_WRITE = -0x2
@ -466,7 +541,7 @@ const (
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf800
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
@ -732,6 +807,7 @@ const (
IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERCABLE = 0xc6
IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68 IFT_VOICEOVERIP = 0x68
IFT_WIREGUARD = 0xfb
IFT_X213 = 0x5d IFT_X213 = 0x5d
IFT_X25 = 0x5 IFT_X25 = 0x5
IFT_X25DDN = 0x4 IFT_X25DDN = 0x4
@ -797,9 +873,11 @@ const (
IPPROTO_RAW = 0xff IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6 IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11 IPPROTO_UDP = 0x11
IPPROTO_UDPLITE = 0x88
IPV6_AUTH_LEVEL = 0x35 IPV6_AUTH_LEVEL = 0x35
IPV6_AUTOFLOWLABEL = 0x3b IPV6_AUTOFLOWLABEL = 0x3b
IPV6_CHECKSUM = 0x1a IPV6_CHECKSUM = 0x1a
@ -906,6 +984,9 @@ const (
IP_TTL = 0x4 IP_TTL = 0x4
ISIG = 0x80 ISIG = 0x80
ISTRIP = 0x20 ISTRIP = 0x20
ITIMER_PROF = 0x2
ITIMER_REAL = 0x0
ITIMER_VIRTUAL = 0x1
IUCLC = 0x1000 IUCLC = 0x1000
IXANY = 0x800 IXANY = 0x800
IXOFF = 0x400 IXOFF = 0x400
@ -970,12 +1051,26 @@ const (
MNT_ROOTFS = 0x4000 MNT_ROOTFS = 0x4000
MNT_SOFTDEP = 0x4000000 MNT_SOFTDEP = 0x4000000
MNT_STALLED = 0x100000 MNT_STALLED = 0x100000
MNT_SWAPPABLE = 0x200000
MNT_SYNCHRONOUS = 0x2 MNT_SYNCHRONOUS = 0x2
MNT_UPDATE = 0x10000 MNT_UPDATE = 0x10000
MNT_VISFLAGMASK = 0x400ffff MNT_VISFLAGMASK = 0x400ffff
MNT_WAIT = 0x1 MNT_WAIT = 0x1
MNT_WANTRDWR = 0x2000000 MNT_WANTRDWR = 0x2000000
MNT_WXALLOWED = 0x800 MNT_WXALLOWED = 0x800
MOUNT_AFS = "afs"
MOUNT_CD9660 = "cd9660"
MOUNT_EXT2FS = "ext2fs"
MOUNT_FFS = "ffs"
MOUNT_FUSEFS = "fuse"
MOUNT_MFS = "mfs"
MOUNT_MSDOS = "msdos"
MOUNT_NCPFS = "ncpfs"
MOUNT_NFS = "nfs"
MOUNT_NTFS = "ntfs"
MOUNT_TMPFS = "tmpfs"
MOUNT_UDF = "udf"
MOUNT_UFS = "ffs"
MSG_BCAST = 0x100 MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800 MSG_CMSG_CLOEXEC = 0x800
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
@ -988,6 +1083,7 @@ const (
MSG_PEEK = 0x2 MSG_PEEK = 0x2
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x1000
MS_ASYNC = 0x1 MS_ASYNC = 0x1
MS_INVALIDATE = 0x4 MS_INVALIDATE = 0x4
MS_SYNC = 0x2 MS_SYNC = 0x2
@ -996,7 +1092,8 @@ const (
NET_RT_FLAGS = 0x2 NET_RT_FLAGS = 0x2
NET_RT_IFLIST = 0x3 NET_RT_IFLIST = 0x3
NET_RT_IFNAMES = 0x6 NET_RT_IFNAMES = 0x6
NET_RT_MAXID = 0x7 NET_RT_MAXID = 0x8
NET_RT_SOURCE = 0x7
NET_RT_STATS = 0x4 NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5 NET_RT_TABLE = 0x5
NFDBITS = 0x20 NFDBITS = 0x20
@ -1013,6 +1110,7 @@ const (
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_OOB = 0x4
NOTE_PCTRLMASK = 0xf0000000 NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_RENAME = 0x20 NOTE_RENAME = 0x20
@ -1130,9 +1228,11 @@ const (
RTF_STATIC = 0x800 RTF_STATIC = 0x800
RTF_UP = 0x1 RTF_UP = 0x1
RTF_USETRAILERS = 0x8000 RTF_USETRAILERS = 0x8000
RTM_80211INFO = 0x15
RTM_ADD = 0x1 RTM_ADD = 0x1
RTM_BFD = 0x12 RTM_BFD = 0x12
RTM_CHANGE = 0x3 RTM_CHANGE = 0x3
RTM_CHGADDRATTR = 0x14
RTM_DELADDR = 0xd RTM_DELADDR = 0xd
RTM_DELETE = 0x2 RTM_DELETE = 0x2
RTM_DESYNC = 0x10 RTM_DESYNC = 0x10
@ -1140,7 +1240,6 @@ const (
RTM_IFANNOUNCE = 0xf RTM_IFANNOUNCE = 0xf
RTM_IFINFO = 0xe RTM_IFINFO = 0xe
RTM_INVALIDATE = 0x11 RTM_INVALIDATE = 0x11
RTM_LOCK = 0x8
RTM_LOSING = 0x5 RTM_LOSING = 0x5
RTM_MAXSIZE = 0x800 RTM_MAXSIZE = 0x800
RTM_MISS = 0x7 RTM_MISS = 0x7
@ -1148,7 +1247,7 @@ const (
RTM_PROPOSAL = 0x13 RTM_PROPOSAL = 0x13
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_SOURCE = 0x16
RTM_VERSION = 0x5 RTM_VERSION = 0x5
RTV_EXPIRE = 0x4 RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2 RTV_HOPCOUNT = 0x2
@ -1166,6 +1265,9 @@ const (
RUSAGE_THREAD = 0x1 RUSAGE_THREAD = 0x1
SCM_RIGHTS = 0x1 SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x4 SCM_TIMESTAMP = 0x4
SEEK_CUR = 0x1
SEEK_END = 0x2
SEEK_SET = 0x0
SHUT_RD = 0x0 SHUT_RD = 0x0
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
@ -1182,35 +1284,37 @@ const (
SIOCBRDGDELS = 0x80606942 SIOCBRDGDELS = 0x80606942
SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFLUSH = 0x80606948
SIOCBRDGFRL = 0x808c694e SIOCBRDGFRL = 0x808c694e
SIOCBRDGGCACHE = 0xc0186941 SIOCBRDGGCACHE = 0xc0146941
SIOCBRDGGFD = 0xc0186952 SIOCBRDGGFD = 0xc0146952
SIOCBRDGGHT = 0xc0186951 SIOCBRDGGHT = 0xc0146951
SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGIFFLGS = 0xc060693e
SIOCBRDGGMA = 0xc0186953 SIOCBRDGGMA = 0xc0146953
SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPARAM = 0xc0406958
SIOCBRDGGPRI = 0xc0186950 SIOCBRDGGPRI = 0xc0146950
SIOCBRDGGRL = 0xc030694f SIOCBRDGGRL = 0xc030694f
SIOCBRDGGTO = 0xc0186946 SIOCBRDGGTO = 0xc0146946
SIOCBRDGIFS = 0xc0606942 SIOCBRDGIFS = 0xc0606942
SIOCBRDGRTS = 0xc0206943 SIOCBRDGRTS = 0xc0206943
SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSADDR = 0xc1286944
SIOCBRDGSCACHE = 0x80186940 SIOCBRDGSCACHE = 0x80146940
SIOCBRDGSFD = 0x80186952 SIOCBRDGSFD = 0x80146952
SIOCBRDGSHT = 0x80186951 SIOCBRDGSHT = 0x80146951
SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFCOST = 0x80606955
SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFFLGS = 0x8060693f
SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPRIO = 0x80606954
SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSIFPROT = 0x8060694a
SIOCBRDGSMA = 0x80186953 SIOCBRDGSMA = 0x80146953
SIOCBRDGSPRI = 0x80186950 SIOCBRDGSPRI = 0x80146950
SIOCBRDGSPROTO = 0x8018695a SIOCBRDGSPROTO = 0x8014695a
SIOCBRDGSTO = 0x80186945 SIOCBRDGSTO = 0x80146945
SIOCBRDGSTXHC = 0x80186959 SIOCBRDGSTXHC = 0x80146959
SIOCDELLABEL = 0x80206997
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80286989 SIOCDIFGROUP = 0x80286989
SIOCDIFPARENT = 0x802069b4 SIOCDIFPARENT = 0x802069b4
SIOCDIFPHYADDR = 0x80206949 SIOCDIFPHYADDR = 0x80206949
SIOCDPWE3NEIGHBOR = 0x802069de
SIOCDVNETID = 0x802069af SIOCDVNETID = 0x802069af
SIOCGETKALIVE = 0xc01869a4 SIOCGETKALIVE = 0xc01869a4
SIOCGETLABEL = 0x8020699a SIOCGETLABEL = 0x8020699a
@ -1229,6 +1333,7 @@ const (
SIOCGIFFLAGS = 0xc0206911 SIOCGIFFLAGS = 0xc0206911
SIOCGIFGATTR = 0xc028698b SIOCGIFGATTR = 0xc028698b
SIOCGIFGENERIC = 0xc020693a SIOCGIFGENERIC = 0xc020693a
SIOCGIFGLIST = 0xc028698d
SIOCGIFGMEMB = 0xc028698a SIOCGIFGMEMB = 0xc028698a
SIOCGIFGROUP = 0xc0286988 SIOCGIFGROUP = 0xc0286988
SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFHARDMTU = 0xc02069a5
@ -1243,13 +1348,21 @@ const (
SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRDOMAIN = 0xc02069a0
SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRTLABEL = 0xc0206983
SIOCGIFRXR = 0x802069aa SIOCGIFRXR = 0x802069aa
SIOCGIFSFFPAGE = 0xc1126939
SIOCGIFXFLAGS = 0xc020699e SIOCGIFXFLAGS = 0xc020699e
SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYADDR = 0xc218694b
SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYDF = 0xc02069c2
SIOCGLIFPHYECN = 0xc02069c8
SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYRTABLE = 0xc02069a2
SIOCGLIFPHYTTL = 0xc02069a9 SIOCGLIFPHYTTL = 0xc02069a9
SIOCGPGRP = 0x40047309 SIOCGPGRP = 0x40047309
SIOCGPWE3 = 0xc0206998
SIOCGPWE3CTRLWORD = 0xc02069dc
SIOCGPWE3FAT = 0xc02069dd
SIOCGPWE3NEIGHBOR = 0xc21869de
SIOCGRXHPRIO = 0xc02069db
SIOCGSPPPPARAMS = 0xc0206994 SIOCGSPPPPARAMS = 0xc0206994
SIOCGTXHPRIO = 0xc02069c6
SIOCGUMBINFO = 0xc02069be SIOCGUMBINFO = 0xc02069be
SIOCGUMBPARAM = 0xc02069c0 SIOCGUMBPARAM = 0xc02069c0
SIOCGVH = 0xc02069f6 SIOCGVH = 0xc02069f6
@ -1287,19 +1400,20 @@ const (
SIOCSIFXFLAGS = 0x8020699d SIOCSIFXFLAGS = 0x8020699d
SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYADDR = 0x8218694a
SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYDF = 0x802069c1
SIOCSLIFPHYECN = 0x802069c7
SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYRTABLE = 0x802069a1
SIOCSLIFPHYTTL = 0x802069a8 SIOCSLIFPHYTTL = 0x802069a8
SIOCSPGRP = 0x80047308 SIOCSPGRP = 0x80047308
SIOCSPWE3CTRLWORD = 0x802069dc
SIOCSPWE3FAT = 0x802069dd
SIOCSPWE3NEIGHBOR = 0x821869de
SIOCSRXHPRIO = 0x802069db
SIOCSSPPPPARAMS = 0x80206993 SIOCSSPPPPARAMS = 0x80206993
SIOCSTXHPRIO = 0x802069c5
SIOCSUMBPARAM = 0x802069bf SIOCSUMBPARAM = 0x802069bf
SIOCSVH = 0xc02069f5 SIOCSVH = 0xc02069f5
SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETFLOWID = 0x802069c3
SIOCSVNETID = 0x802069a6 SIOCSVNETID = 0x802069a6
SIOCSWGDPID = 0xc018695b
SIOCSWGMAXFLOW = 0xc0186960
SIOCSWGMAXGROUP = 0xc018695d
SIOCSWSDPID = 0x8018695c
SIOCSWSPORTNO = 0xc060695f
SOCK_CLOEXEC = 0x8000 SOCK_CLOEXEC = 0x8000
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_DNS = 0x1000 SOCK_DNS = 0x1000
@ -1314,6 +1428,7 @@ const (
SO_BINDANY = 0x1000 SO_BINDANY = 0x1000
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_DEBUG = 0x1 SO_DEBUG = 0x1
SO_DOMAIN = 0x1024
SO_DONTROUTE = 0x10 SO_DONTROUTE = 0x10
SO_ERROR = 0x1007 SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8 SO_KEEPALIVE = 0x8
@ -1321,6 +1436,7 @@ const (
SO_NETPROC = 0x1020 SO_NETPROC = 0x1020
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PEERCRED = 0x1022 SO_PEERCRED = 0x1022
SO_PROTOCOL = 0x1025
SO_RCVBUF = 0x1002 SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004 SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
@ -1370,7 +1486,18 @@ const (
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1 TCOOFF = 0x1
TCOON = 0x2 TCOON = 0x2
TCP_MAXBURST = 0x4 TCPOPT_EOL = 0x0
TCPOPT_MAXSEG = 0x2
TCPOPT_NOP = 0x1
TCPOPT_SACK = 0x5
TCPOPT_SACK_HDR = 0x1010500
TCPOPT_SACK_PERMITTED = 0x4
TCPOPT_SACK_PERMIT_HDR = 0x1010402
TCPOPT_SIGNATURE = 0x13
TCPOPT_TIMESTAMP = 0x8
TCPOPT_TSTAMP_HDR = 0x101080a
TCPOPT_WINDOW = 0x3
TCP_INFO = 0x9
TCP_MAXSEG = 0x2 TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff TCP_MAXWIN = 0xffff
TCP_MAX_SACK = 0x3 TCP_MAX_SACK = 0x3
@ -1379,8 +1506,11 @@ const (
TCP_MSS = 0x200 TCP_MSS = 0x200
TCP_NODELAY = 0x1 TCP_NODELAY = 0x1
TCP_NOPUSH = 0x10 TCP_NOPUSH = 0x10
TCP_SACKHOLE_LIMIT = 0x80
TCP_SACK_ENABLE = 0x8 TCP_SACK_ENABLE = 0x8
TCSAFLUSH = 0x2 TCSAFLUSH = 0x2
TIMER_ABSTIME = 0x1
TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478 TIOCCDTR = 0x20007478
TIOCCHKVERAUTH = 0x2000741e TIOCCHKVERAUTH = 0x2000741e
@ -1445,7 +1575,6 @@ const (
TIOCSPGRP = 0x80047476 TIOCSPGRP = 0x80047476
TIOCSTART = 0x2000746e TIOCSTART = 0x2000746e
TIOCSTAT = 0x20007465 TIOCSTAT = 0x20007465
TIOCSTI = 0x80017472
TIOCSTOP = 0x2000746f TIOCSTOP = 0x2000746f
TIOCSTSTAMP = 0x8008745a TIOCSTSTAMP = 0x8008745a
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
@ -1467,7 +1596,8 @@ const (
VMIN = 0x10 VMIN = 0x10
VM_ANONMIN = 0x7 VM_ANONMIN = 0x7
VM_LOADAVG = 0x2 VM_LOADAVG = 0x2
VM_MAXID = 0xc VM_MALLOC_CONF = 0xc
VM_MAXID = 0xd
VM_MAXSLP = 0xa VM_MAXSLP = 0xa
VM_METER = 0x1 VM_METER = 0x1
VM_NKMEMPAGES = 0x6 VM_NKMEMPAGES = 0x6
@ -1745,7 +1875,7 @@ var signalList = [...]struct {
{3, "SIGQUIT", "quit"}, {3, "SIGQUIT", "quit"},
{4, "SIGILL", "illegal instruction"}, {4, "SIGILL", "illegal instruction"},
{5, "SIGTRAP", "trace/BPT trap"}, {5, "SIGTRAP", "trace/BPT trap"},
{6, "SIGABRT", "abort trap"}, {6, "SIGIOT", "abort trap"},
{7, "SIGEMT", "EMT trap"}, {7, "SIGEMT", "EMT trap"},
{8, "SIGFPE", "floating point exception"}, {8, "SIGFPE", "floating point exception"},
{9, "SIGKILL", "killed"}, {9, "SIGKILL", "killed"},
@ -1772,4 +1902,5 @@ var signalList = [...]struct {
{30, "SIGUSR1", "user defined signal 1"}, {30, "SIGUSR1", "user defined signal 1"},
{31, "SIGUSR2", "user defined signal 2"}, {31, "SIGUSR2", "user defined signal 2"},
{32, "SIGTHR", "thread AST"}, {32, "SIGTHR", "thread AST"},
{28672, "SIGSTKSZ", "unknown signal"},
} }

View file

@ -46,6 +46,7 @@ const (
AF_SNA = 0xb AF_SNA = 0xb
AF_UNIX = 0x1 AF_UNIX = 0x1
AF_UNSPEC = 0x0 AF_UNSPEC = 0x0
ALTWERASE = 0x200
ARPHRD_ETHER = 0x1 ARPHRD_ETHER = 0x1
ARPHRD_FRELAY = 0xf ARPHRD_FRELAY = 0xf
ARPHRD_IEEE1394 = 0x18 ARPHRD_IEEE1394 = 0x18
@ -82,7 +83,7 @@ const (
BIOCGFILDROP = 0x40044278 BIOCGFILDROP = 0x40044278
BIOCGHDRCMPLT = 0x40044274 BIOCGHDRCMPLT = 0x40044274
BIOCGRSIG = 0x40044273 BIOCGRSIG = 0x40044273
BIOCGRTIMEOUT = 0x400c426e BIOCGRTIMEOUT = 0x4010426e
BIOCGSTATS = 0x4008426f BIOCGSTATS = 0x4008426f
BIOCIMMEDIATE = 0x80044270 BIOCIMMEDIATE = 0x80044270
BIOCLOCK = 0x20004276 BIOCLOCK = 0x20004276
@ -96,7 +97,7 @@ const (
BIOCSFILDROP = 0x80044279 BIOCSFILDROP = 0x80044279
BIOCSHDRCMPLT = 0x80044275 BIOCSHDRCMPLT = 0x80044275
BIOCSRSIG = 0x80044272 BIOCSRSIG = 0x80044272
BIOCSRTIMEOUT = 0x800c426d BIOCSRTIMEOUT = 0x8010426d
BIOCVERSION = 0x40044271 BIOCVERSION = 0x40044271
BPF_A = 0x10 BPF_A = 0x10
BPF_ABS = 0x20 BPF_ABS = 0x20
@ -108,6 +109,15 @@ const (
BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_IN = 0x1
BPF_DIRECTION_OUT = 0x2 BPF_DIRECTION_OUT = 0x2
BPF_DIV = 0x30 BPF_DIV = 0x30
BPF_FILDROP_CAPTURE = 0x1
BPF_FILDROP_DROP = 0x2
BPF_FILDROP_PASS = 0x0
BPF_F_DIR_IN = 0x10
BPF_F_DIR_MASK = 0x30
BPF_F_DIR_OUT = 0x20
BPF_F_DIR_SHIFT = 0x4
BPF_F_FLOWID = 0x8
BPF_F_PRI_MASK = 0x7
BPF_H = 0x8 BPF_H = 0x8
BPF_IMM = 0x0 BPF_IMM = 0x0
BPF_IND = 0x40 BPF_IND = 0x40
@ -136,6 +146,7 @@ const (
BPF_OR = 0x40 BPF_OR = 0x40
BPF_RELEASE = 0x30bb6 BPF_RELEASE = 0x30bb6
BPF_RET = 0x6 BPF_RET = 0x6
BPF_RND = 0xc0
BPF_RSH = 0x70 BPF_RSH = 0x70
BPF_ST = 0x2 BPF_ST = 0x2
BPF_STX = 0x3 BPF_STX = 0x3
@ -147,6 +158,12 @@ const (
BRKINT = 0x2 BRKINT = 0x2
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_BOOTTIME = 0x6
CLOCK_MONOTONIC = 0x3
CLOCK_PROCESS_CPUTIME_ID = 0x2
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x4
CLOCK_UPTIME = 0x5
CPUSTATES = 0x6 CPUSTATES = 0x6
CP_IDLE = 0x5 CP_IDLE = 0x5
CP_INTR = 0x4 CP_INTR = 0x4
@ -170,7 +187,65 @@ const (
CTL_KERN = 0x1 CTL_KERN = 0x1
CTL_MAXNAME = 0xc CTL_MAXNAME = 0xc
CTL_NET = 0x4 CTL_NET = 0x4
DIOCADDQUEUE = 0xc100445d
DIOCADDRULE = 0xcce04404
DIOCADDSTATE = 0xc1084425
DIOCCHANGERULE = 0xcce0441a
DIOCCLRIFFLAG = 0xc024445a
DIOCCLRSRCNODES = 0x20004455
DIOCCLRSTATES = 0xc0d04412
DIOCCLRSTATUS = 0xc0244416
DIOCGETLIMIT = 0xc0084427
DIOCGETQSTATS = 0xc1084460
DIOCGETQUEUE = 0xc100445f
DIOCGETQUEUES = 0xc100445e
DIOCGETRULE = 0xcce04407
DIOCGETRULES = 0xcce04406
DIOCGETRULESET = 0xc444443b
DIOCGETRULESETS = 0xc444443a
DIOCGETSRCNODES = 0xc0084454
DIOCGETSTATE = 0xc1084413
DIOCGETSTATES = 0xc0084419
DIOCGETSTATUS = 0xc1e84415
DIOCGETSYNFLWATS = 0xc0084463
DIOCGETTIMEOUT = 0xc008441e
DIOCIGETIFACES = 0xc0244457
DIOCKILLSRCNODES = 0xc068445b
DIOCKILLSTATES = 0xc0d04429
DIOCNATLOOK = 0xc0504417
DIOCOSFPADD = 0xc088444f
DIOCOSFPFLUSH = 0x2000444e DIOCOSFPFLUSH = 0x2000444e
DIOCOSFPGET = 0xc0884450
DIOCRADDADDRS = 0xc44c4443
DIOCRADDTABLES = 0xc44c443d
DIOCRCLRADDRS = 0xc44c4442
DIOCRCLRASTATS = 0xc44c4448
DIOCRCLRTABLES = 0xc44c443c
DIOCRCLRTSTATS = 0xc44c4441
DIOCRDELADDRS = 0xc44c4444
DIOCRDELTABLES = 0xc44c443e
DIOCRGETADDRS = 0xc44c4446
DIOCRGETASTATS = 0xc44c4447
DIOCRGETTABLES = 0xc44c443f
DIOCRGETTSTATS = 0xc44c4440
DIOCRINADEFINE = 0xc44c444d
DIOCRSETADDRS = 0xc44c4445
DIOCRSETTFLAGS = 0xc44c444a
DIOCRTSTADDRS = 0xc44c4449
DIOCSETDEBUG = 0xc0044418
DIOCSETHOSTID = 0xc0044456
DIOCSETIFFLAG = 0xc0244459
DIOCSETLIMIT = 0xc0084428
DIOCSETREASS = 0xc004445c
DIOCSETSTATUSIF = 0xc0244414
DIOCSETSYNCOOKIES = 0xc0014462
DIOCSETSYNFLWATS = 0xc0084461
DIOCSETTIMEOUT = 0xc008441d
DIOCSTART = 0x20004401
DIOCSTOP = 0x20004402
DIOCXBEGIN = 0xc00c4451
DIOCXCOMMIT = 0xc00c4452
DIOCXROLLBACK = 0xc00c4453
DLT_ARCNET = 0x7 DLT_ARCNET = 0x7
DLT_ATM_RFC1483 = 0xb DLT_ATM_RFC1483 = 0xb
DLT_AX25 = 0x3 DLT_AX25 = 0x3
@ -186,6 +261,7 @@ const (
DLT_LOOP = 0xc DLT_LOOP = 0xc
DLT_MPLS = 0xdb DLT_MPLS = 0xdb
DLT_NULL = 0x0 DLT_NULL = 0x0
DLT_OPENFLOW = 0x10b
DLT_PFLOG = 0x75 DLT_PFLOG = 0x75
DLT_PFSYNC = 0x12 DLT_PFSYNC = 0x12
DLT_PPP = 0x9 DLT_PPP = 0x9
@ -196,6 +272,23 @@ const (
DLT_RAW = 0xe DLT_RAW = 0xe
DLT_SLIP = 0x8 DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xf DLT_SLIP_BSDOS = 0xf
DLT_USBPCAP = 0xf9
DLT_USER0 = 0x93
DLT_USER1 = 0x94
DLT_USER10 = 0x9d
DLT_USER11 = 0x9e
DLT_USER12 = 0x9f
DLT_USER13 = 0xa0
DLT_USER14 = 0xa1
DLT_USER15 = 0xa2
DLT_USER2 = 0x95
DLT_USER3 = 0x96
DLT_USER4 = 0x97
DLT_USER5 = 0x98
DLT_USER6 = 0x99
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
DT_BLK = 0x6 DT_BLK = 0x6
DT_CHR = 0x2 DT_CHR = 0x2
DT_DIR = 0x4 DT_DIR = 0x4
@ -215,6 +308,8 @@ const (
EMUL_ENABLED = 0x1 EMUL_ENABLED = 0x1
EMUL_NATIVE = 0x2 EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9 ENDRUNDISC = 0x9
ETH64_8021_RSVD_MASK = 0xfffffffffff0
ETH64_8021_RSVD_PREFIX = 0x180c2000000
ETHERMIN = 0x2e ETHERMIN = 0x2e
ETHERMTU = 0x5dc ETHERMTU = 0x5dc
ETHERTYPE_8023 = 0x4 ETHERTYPE_8023 = 0x4
@ -267,6 +362,7 @@ const (
ETHERTYPE_DN = 0x6003 ETHERTYPE_DN = 0x6003
ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DOGFIGHT = 0x1989
ETHERTYPE_DSMD = 0x8039 ETHERTYPE_DSMD = 0x8039
ETHERTYPE_EAPOL = 0x888e
ETHERTYPE_ECMA = 0x803 ETHERTYPE_ECMA = 0x803
ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ENCRYPT = 0x803d
ETHERTYPE_ES = 0x805d ETHERTYPE_ES = 0x805d
@ -298,6 +394,7 @@ const (
ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LLDP = 0x88cc
ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOGICRAFT = 0x8148
ETHERTYPE_LOOPBACK = 0x9000 ETHERTYPE_LOOPBACK = 0x9000
ETHERTYPE_MACSEC = 0x88e5
ETHERTYPE_MATRA = 0x807a ETHERTYPE_MATRA = 0x807a
ETHERTYPE_MAX = 0xffff ETHERTYPE_MAX = 0xffff
ETHERTYPE_MERIT = 0x807c ETHERTYPE_MERIT = 0x807c
@ -326,15 +423,17 @@ const (
ETHERTYPE_NCD = 0x8149 ETHERTYPE_NCD = 0x8149
ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NESTAR = 0x8006
ETHERTYPE_NETBEUI = 0x8191 ETHERTYPE_NETBEUI = 0x8191
ETHERTYPE_NHRP = 0x2001
ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NOVELL = 0x8138
ETHERTYPE_NS = 0x600 ETHERTYPE_NS = 0x600
ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSAT = 0x601
ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSCOMPAT = 0x807
ETHERTYPE_NSH = 0x984f
ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_NTRAILER = 0x10
ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9 = 0x7007
ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_OS9NET = 0x7009
ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PACER = 0x80c6
ETHERTYPE_PAE = 0x888e ETHERTYPE_PBB = 0x88e7
ETHERTYPE_PCS = 0x4242 ETHERTYPE_PCS = 0x4242
ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PLANNING = 0x8044
ETHERTYPE_PPP = 0x880b ETHERTYPE_PPP = 0x880b
@ -409,28 +508,40 @@ const (
ETHER_CRC_POLY_LE = 0xedb88320 ETHER_CRC_POLY_LE = 0xedb88320
ETHER_HDR_LEN = 0xe ETHER_HDR_LEN = 0xe
ETHER_MAX_DIX_LEN = 0x600 ETHER_MAX_DIX_LEN = 0x600
ETHER_MAX_HARDMTU_LEN = 0xff9b
ETHER_MAX_LEN = 0x5ee ETHER_MAX_LEN = 0x5ee
ETHER_MIN_LEN = 0x40 ETHER_MIN_LEN = 0x40
ETHER_TYPE_LEN = 0x2 ETHER_TYPE_LEN = 0x2
ETHER_VLAN_ENCAP_LEN = 0x4 ETHER_VLAN_ENCAP_LEN = 0x4
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_DEVICE = -0x8
EVFILT_EXCEPT = -0x9
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0x7 EVFILT_SYSCOUNT = 0x9
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_VNODE = -0x4 EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2 EVFILT_WRITE = -0x2
EVL_ENCAPLEN = 0x4
EVL_PRIO_BITS = 0xd
EVL_PRIO_MAX = 0x7
EVL_VLID_MASK = 0xfff
EVL_VLID_MAX = 0xffe
EVL_VLID_MIN = 0x1
EVL_VLID_NULL = 0x0
EV_ADD = 0x1 EV_ADD = 0x1
EV_CLEAR = 0x20 EV_CLEAR = 0x20
EV_DELETE = 0x2 EV_DELETE = 0x2
EV_DISABLE = 0x8 EV_DISABLE = 0x8
EV_DISPATCH = 0x80
EV_ENABLE = 0x4 EV_ENABLE = 0x4
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_SYSFLAGS = 0xf000 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf800
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
@ -443,6 +554,8 @@ const (
F_GETFL = 0x3 F_GETFL = 0x3
F_GETLK = 0x7 F_GETLK = 0x7
F_GETOWN = 0x5 F_GETOWN = 0x5
F_ISATTY = 0xb
F_OK = 0x0
F_RDLCK = 0x1 F_RDLCK = 0x1
F_SETFD = 0x2 F_SETFD = 0x2
F_SETFL = 0x4 F_SETFL = 0x4
@ -459,7 +572,6 @@ const (
IEXTEN = 0x400 IEXTEN = 0x400
IFAN_ARRIVAL = 0x0 IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1 IFAN_DEPARTURE = 0x1
IFA_ROUTE = 0x1
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x8e52 IFF_CANTCHANGE = 0x8e52
@ -470,12 +582,12 @@ const (
IFF_LOOPBACK = 0x8 IFF_LOOPBACK = 0x8
IFF_MULTICAST = 0x8000 IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80 IFF_NOARP = 0x80
IFF_NOTRAILERS = 0x20
IFF_OACTIVE = 0x400 IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10 IFF_POINTOPOINT = 0x10
IFF_PROMISC = 0x100 IFF_PROMISC = 0x100
IFF_RUNNING = 0x40 IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800 IFF_SIMPLEX = 0x800
IFF_STATICARP = 0x20
IFF_UP = 0x1 IFF_UP = 0x1
IFNAMSIZ = 0x10 IFNAMSIZ = 0x10
IFT_1822 = 0x2 IFT_1822 = 0x2
@ -604,6 +716,7 @@ const (
IFT_LINEGROUP = 0xd2 IFT_LINEGROUP = 0xd2
IFT_LOCALTALK = 0x2a IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18 IFT_LOOP = 0x18
IFT_MBIM = 0xfa
IFT_MEDIAMAILOVERIP = 0x8b IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7 IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26 IFT_MIOX25 = 0x26
@ -694,6 +807,7 @@ const (
IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERCABLE = 0xc6
IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68 IFT_VOICEOVERIP = 0x68
IFT_WIREGUARD = 0xfb
IFT_X213 = 0x5d IFT_X213 = 0x5d
IFT_X25 = 0x5 IFT_X25 = 0x5
IFT_X25DDN = 0x4 IFT_X25DDN = 0x4
@ -728,8 +842,6 @@ const (
IPPROTO_AH = 0x33 IPPROTO_AH = 0x33
IPPROTO_CARP = 0x70 IPPROTO_CARP = 0x70
IPPROTO_DIVERT = 0x102 IPPROTO_DIVERT = 0x102
IPPROTO_DIVERT_INIT = 0x2
IPPROTO_DIVERT_RESP = 0x1
IPPROTO_DONE = 0x101 IPPROTO_DONE = 0x101
IPPROTO_DSTOPTS = 0x3c IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8 IPPROTO_EGP = 0x8
@ -761,9 +873,11 @@ const (
IPPROTO_RAW = 0xff IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6 IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11 IPPROTO_UDP = 0x11
IPPROTO_UDPLITE = 0x88
IPV6_AUTH_LEVEL = 0x35 IPV6_AUTH_LEVEL = 0x35
IPV6_AUTOFLOWLABEL = 0x3b IPV6_AUTOFLOWLABEL = 0x3b
IPV6_CHECKSUM = 0x1a IPV6_CHECKSUM = 0x1a
@ -786,6 +900,7 @@ const (
IPV6_LEAVE_GROUP = 0xd IPV6_LEAVE_GROUP = 0xd
IPV6_MAXHLIM = 0xff IPV6_MAXHLIM = 0xff
IPV6_MAXPACKET = 0xffff IPV6_MAXPACKET = 0xffff
IPV6_MINHOPCOUNT = 0x41
IPV6_MMTU = 0x500 IPV6_MMTU = 0x500
IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_IF = 0x9
@ -825,12 +940,12 @@ const (
IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000 IP_DF = 0x4000
IP_DIVERTFL = 0x1022
IP_DROP_MEMBERSHIP = 0xd IP_DROP_MEMBERSHIP = 0xd
IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_NETWORK_LEVEL = 0x16
IP_ESP_TRANS_LEVEL = 0x15 IP_ESP_TRANS_LEVEL = 0x15
IP_HDRINCL = 0x2 IP_HDRINCL = 0x2
IP_IPCOMP_LEVEL = 0x1d IP_IPCOMP_LEVEL = 0x1d
IP_IPDEFTTL = 0x25
IP_IPSECFLOWINFO = 0x24 IP_IPSECFLOWINFO = 0x24
IP_IPSEC_LOCAL_AUTH = 0x1b IP_IPSEC_LOCAL_AUTH = 0x1b
IP_IPSEC_LOCAL_CRED = 0x19 IP_IPSEC_LOCAL_CRED = 0x19
@ -864,10 +979,15 @@ const (
IP_RETOPTS = 0x8 IP_RETOPTS = 0x8
IP_RF = 0x8000 IP_RF = 0x8000
IP_RTABLE = 0x1021 IP_RTABLE = 0x1021
IP_SENDSRCADDR = 0x7
IP_TOS = 0x3 IP_TOS = 0x3
IP_TTL = 0x4 IP_TTL = 0x4
ISIG = 0x80 ISIG = 0x80
ISTRIP = 0x20 ISTRIP = 0x20
ITIMER_PROF = 0x2
ITIMER_REAL = 0x0
ITIMER_VIRTUAL = 0x1
IUCLC = 0x1000
IXANY = 0x800 IXANY = 0x800
IXOFF = 0x400 IXOFF = 0x400
IXON = 0x200 IXON = 0x200
@ -922,6 +1042,7 @@ const (
MNT_NOATIME = 0x8000 MNT_NOATIME = 0x8000
MNT_NODEV = 0x10 MNT_NODEV = 0x10
MNT_NOEXEC = 0x4 MNT_NOEXEC = 0x4
MNT_NOPERM = 0x20
MNT_NOSUID = 0x8 MNT_NOSUID = 0x8
MNT_NOWAIT = 0x2 MNT_NOWAIT = 0x2
MNT_QUOTA = 0x2000 MNT_QUOTA = 0x2000
@ -929,12 +1050,27 @@ const (
MNT_RELOAD = 0x40000 MNT_RELOAD = 0x40000
MNT_ROOTFS = 0x4000 MNT_ROOTFS = 0x4000
MNT_SOFTDEP = 0x4000000 MNT_SOFTDEP = 0x4000000
MNT_STALLED = 0x100000
MNT_SWAPPABLE = 0x200000
MNT_SYNCHRONOUS = 0x2 MNT_SYNCHRONOUS = 0x2
MNT_UPDATE = 0x10000 MNT_UPDATE = 0x10000
MNT_VISFLAGMASK = 0x400ffff MNT_VISFLAGMASK = 0x400ffff
MNT_WAIT = 0x1 MNT_WAIT = 0x1
MNT_WANTRDWR = 0x2000000 MNT_WANTRDWR = 0x2000000
MNT_WXALLOWED = 0x800 MNT_WXALLOWED = 0x800
MOUNT_AFS = "afs"
MOUNT_CD9660 = "cd9660"
MOUNT_EXT2FS = "ext2fs"
MOUNT_FFS = "ffs"
MOUNT_FUSEFS = "fuse"
MOUNT_MFS = "mfs"
MOUNT_MSDOS = "msdos"
MOUNT_NCPFS = "ncpfs"
MOUNT_NFS = "nfs"
MOUNT_NTFS = "ntfs"
MOUNT_TMPFS = "tmpfs"
MOUNT_UDF = "udf"
MOUNT_UFS = "ffs"
MSG_BCAST = 0x100 MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800 MSG_CMSG_CLOEXEC = 0x800
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
@ -947,6 +1083,7 @@ const (
MSG_PEEK = 0x2 MSG_PEEK = 0x2
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x1000
MS_ASYNC = 0x1 MS_ASYNC = 0x1
MS_INVALIDATE = 0x4 MS_INVALIDATE = 0x4
MS_SYNC = 0x2 MS_SYNC = 0x2
@ -954,12 +1091,16 @@ const (
NET_RT_DUMP = 0x1 NET_RT_DUMP = 0x1
NET_RT_FLAGS = 0x2 NET_RT_FLAGS = 0x2
NET_RT_IFLIST = 0x3 NET_RT_IFLIST = 0x3
NET_RT_MAXID = 0x6 NET_RT_IFNAMES = 0x6
NET_RT_MAXID = 0x8
NET_RT_SOURCE = 0x7
NET_RT_STATS = 0x4 NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5 NET_RT_TABLE = 0x5
NFDBITS = 0x20 NFDBITS = 0x20
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_CHANGE = 0x1
NOTE_CHILD = 0x4 NOTE_CHILD = 0x4
NOTE_DELETE = 0x1 NOTE_DELETE = 0x1
NOTE_EOF = 0x2 NOTE_EOF = 0x2
@ -969,6 +1110,7 @@ const (
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_OOB = 0x4
NOTE_PCTRLMASK = 0xf0000000 NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_RENAME = 0x20 NOTE_RENAME = 0x20
@ -978,11 +1120,13 @@ const (
NOTE_TRUNCATE = 0x80 NOTE_TRUNCATE = 0x80
NOTE_WRITE = 0x2 NOTE_WRITE = 0x2
OCRNL = 0x10 OCRNL = 0x10
OLCUC = 0x20
ONLCR = 0x2 ONLCR = 0x2
ONLRET = 0x80 ONLRET = 0x80
ONOCR = 0x40 ONOCR = 0x40
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_APPEND = 0x8 O_APPEND = 0x8
O_ASYNC = 0x40 O_ASYNC = 0x40
@ -1027,19 +1171,25 @@ const (
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
RTAX_BFD = 0xb
RTAX_BRD = 0x7 RTAX_BRD = 0x7
RTAX_DNS = 0xc
RTAX_DST = 0x0 RTAX_DST = 0x0
RTAX_GATEWAY = 0x1 RTAX_GATEWAY = 0x1
RTAX_GENMASK = 0x3 RTAX_GENMASK = 0x3
RTAX_IFA = 0x5 RTAX_IFA = 0x5
RTAX_IFP = 0x4 RTAX_IFP = 0x4
RTAX_LABEL = 0xa RTAX_LABEL = 0xa
RTAX_MAX = 0xb RTAX_MAX = 0xf
RTAX_NETMASK = 0x2 RTAX_NETMASK = 0x2
RTAX_SEARCH = 0xe
RTAX_SRC = 0x8 RTAX_SRC = 0x8
RTAX_SRCMASK = 0x9 RTAX_SRCMASK = 0x9
RTAX_STATIC = 0xd
RTA_AUTHOR = 0x40 RTA_AUTHOR = 0x40
RTA_BFD = 0x800
RTA_BRD = 0x80 RTA_BRD = 0x80
RTA_DNS = 0x1000
RTA_DST = 0x1 RTA_DST = 0x1
RTA_GATEWAY = 0x2 RTA_GATEWAY = 0x2
RTA_GENMASK = 0x8 RTA_GENMASK = 0x8
@ -1047,24 +1197,29 @@ const (
RTA_IFP = 0x10 RTA_IFP = 0x10
RTA_LABEL = 0x400 RTA_LABEL = 0x400
RTA_NETMASK = 0x4 RTA_NETMASK = 0x4
RTA_SEARCH = 0x4000
RTA_SRC = 0x100 RTA_SRC = 0x100
RTA_SRCMASK = 0x200 RTA_SRCMASK = 0x200
RTA_STATIC = 0x2000
RTF_ANNOUNCE = 0x4000 RTF_ANNOUNCE = 0x4000
RTF_BFD = 0x1000000
RTF_BLACKHOLE = 0x1000 RTF_BLACKHOLE = 0x1000
RTF_BROADCAST = 0x400000 RTF_BROADCAST = 0x400000
RTF_CACHED = 0x20000
RTF_CLONED = 0x10000 RTF_CLONED = 0x10000
RTF_CLONING = 0x100 RTF_CLONING = 0x100
RTF_CONNECTED = 0x800000
RTF_DONE = 0x40 RTF_DONE = 0x40
RTF_DYNAMIC = 0x10 RTF_DYNAMIC = 0x10
RTF_FMASK = 0x70f808 RTF_FMASK = 0x110fc08
RTF_GATEWAY = 0x2 RTF_GATEWAY = 0x2
RTF_HOST = 0x4 RTF_HOST = 0x4
RTF_LLINFO = 0x400 RTF_LLINFO = 0x400
RTF_LOCAL = 0x200000 RTF_LOCAL = 0x200000
RTF_MASK = 0x80
RTF_MODIFIED = 0x20 RTF_MODIFIED = 0x20
RTF_MPATH = 0x40000 RTF_MPATH = 0x40000
RTF_MPLS = 0x100000 RTF_MPLS = 0x100000
RTF_MULTICAST = 0x200
RTF_PERMANENT_ARP = 0x2000 RTF_PERMANENT_ARP = 0x2000
RTF_PROTO1 = 0x8000 RTF_PROTO1 = 0x8000
RTF_PROTO2 = 0x4000 RTF_PROTO2 = 0x4000
@ -1073,23 +1228,26 @@ const (
RTF_STATIC = 0x800 RTF_STATIC = 0x800
RTF_UP = 0x1 RTF_UP = 0x1
RTF_USETRAILERS = 0x8000 RTF_USETRAILERS = 0x8000
RTF_XRESOLVE = 0x200 RTM_80211INFO = 0x15
RTM_ADD = 0x1 RTM_ADD = 0x1
RTM_BFD = 0x12
RTM_CHANGE = 0x3 RTM_CHANGE = 0x3
RTM_CHGADDRATTR = 0x14
RTM_DELADDR = 0xd RTM_DELADDR = 0xd
RTM_DELETE = 0x2 RTM_DELETE = 0x2
RTM_DESYNC = 0x10 RTM_DESYNC = 0x10
RTM_GET = 0x4 RTM_GET = 0x4
RTM_IFANNOUNCE = 0xf RTM_IFANNOUNCE = 0xf
RTM_IFINFO = 0xe RTM_IFINFO = 0xe
RTM_LOCK = 0x8 RTM_INVALIDATE = 0x11
RTM_LOSING = 0x5 RTM_LOSING = 0x5
RTM_MAXSIZE = 0x800 RTM_MAXSIZE = 0x800
RTM_MISS = 0x7 RTM_MISS = 0x7
RTM_NEWADDR = 0xc RTM_NEWADDR = 0xc
RTM_PROPOSAL = 0x13
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_SOURCE = 0x16
RTM_VERSION = 0x5 RTM_VERSION = 0x5
RTV_EXPIRE = 0x4 RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2 RTV_HOPCOUNT = 0x2
@ -1099,67 +1257,74 @@ const (
RTV_RTTVAR = 0x80 RTV_RTTVAR = 0x80
RTV_SPIPE = 0x10 RTV_SPIPE = 0x10
RTV_SSTHRESH = 0x20 RTV_SSTHRESH = 0x20
RT_TABLEID_BITS = 0x8
RT_TABLEID_MASK = 0xff
RT_TABLEID_MAX = 0xff RT_TABLEID_MAX = 0xff
RUSAGE_CHILDREN = -0x1 RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0 RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1 RUSAGE_THREAD = 0x1
SCM_RIGHTS = 0x1 SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x4 SCM_TIMESTAMP = 0x4
SEEK_CUR = 0x1
SEEK_END = 0x2
SEEK_SET = 0x0
SHUT_RD = 0x0 SHUT_RD = 0x0
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931 SIOCADDMULTI = 0x80206931
SIOCAIFADDR = 0x8040691a SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80246987 SIOCAIFGROUP = 0x80246987
SIOCALIFADDR = 0x8218691c
SIOCATMARK = 0x40047307 SIOCATMARK = 0x40047307
SIOCBRDGADD = 0x8054693c SIOCBRDGADD = 0x8060693c
SIOCBRDGADDS = 0x80546941 SIOCBRDGADDL = 0x80606949
SIOCBRDGARL = 0x806e694d SIOCBRDGADDS = 0x80606941
SIOCBRDGARL = 0x808c694d
SIOCBRDGDADDR = 0x81286947 SIOCBRDGDADDR = 0x81286947
SIOCBRDGDEL = 0x8054693d SIOCBRDGDEL = 0x8060693d
SIOCBRDGDELS = 0x80546942 SIOCBRDGDELS = 0x80606942
SIOCBRDGFLUSH = 0x80546948 SIOCBRDGFLUSH = 0x80606948
SIOCBRDGFRL = 0x806e694e SIOCBRDGFRL = 0x808c694e
SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGCACHE = 0xc0146941
SIOCBRDGGFD = 0xc0146952 SIOCBRDGGFD = 0xc0146952
SIOCBRDGGHT = 0xc0146951 SIOCBRDGGHT = 0xc0146951
SIOCBRDGGIFFLGS = 0xc054693e SIOCBRDGGIFFLGS = 0xc060693e
SIOCBRDGGMA = 0xc0146953 SIOCBRDGGMA = 0xc0146953
SIOCBRDGGPARAM = 0xc03c6958 SIOCBRDGGPARAM = 0xc0406958
SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGPRI = 0xc0146950
SIOCBRDGGRL = 0xc028694f SIOCBRDGGRL = 0xc028694f
SIOCBRDGGSIFS = 0xc054693c
SIOCBRDGGTO = 0xc0146946 SIOCBRDGGTO = 0xc0146946
SIOCBRDGIFS = 0xc0546942 SIOCBRDGIFS = 0xc0606942
SIOCBRDGRTS = 0xc0186943 SIOCBRDGRTS = 0xc0186943
SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSADDR = 0xc1286944
SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSCACHE = 0x80146940
SIOCBRDGSFD = 0x80146952 SIOCBRDGSFD = 0x80146952
SIOCBRDGSHT = 0x80146951 SIOCBRDGSHT = 0x80146951
SIOCBRDGSIFCOST = 0x80546955 SIOCBRDGSIFCOST = 0x80606955
SIOCBRDGSIFFLGS = 0x8054693f SIOCBRDGSIFFLGS = 0x8060693f
SIOCBRDGSIFPRIO = 0x80546954 SIOCBRDGSIFPRIO = 0x80606954
SIOCBRDGSIFPROT = 0x8060694a
SIOCBRDGSMA = 0x80146953 SIOCBRDGSMA = 0x80146953
SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPRI = 0x80146950
SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSPROTO = 0x8014695a
SIOCBRDGSTO = 0x80146945 SIOCBRDGSTO = 0x80146945
SIOCBRDGSTXHC = 0x80146959 SIOCBRDGSTXHC = 0x80146959
SIOCDELLABEL = 0x80206997
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80246989 SIOCDIFGROUP = 0x80246989
SIOCDIFPARENT = 0x802069b4
SIOCDIFPHYADDR = 0x80206949 SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8218691e SIOCDPWE3NEIGHBOR = 0x802069de
SIOCDVNETID = 0x802069af
SIOCGETKALIVE = 0xc01869a4 SIOCGETKALIVE = 0xc01869a4
SIOCGETLABEL = 0x8020699a SIOCGETLABEL = 0x8020699a
SIOCGETMPWCFG = 0xc02069ae
SIOCGETPFLOW = 0xc02069fe SIOCGETPFLOW = 0xc02069fe
SIOCGETPFSYNC = 0xc02069f8 SIOCGETPFSYNC = 0xc02069f8
SIOCGETSGCNT = 0xc0147534 SIOCGETSGCNT = 0xc0147534
SIOCGETVIFCNT = 0xc0147533 SIOCGETVIFCNT = 0xc0147533
SIOCGETVLAN = 0xc0206990 SIOCGETVLAN = 0xc0206990
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921 SIOCGIFADDR = 0xc0206921
SIOCGIFASYNCMAP = 0xc020697c
SIOCGIFBRDADDR = 0xc0206923 SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCONF = 0xc0086924 SIOCGIFCONF = 0xc0086924
SIOCGIFDATA = 0xc020691b SIOCGIFDATA = 0xc020691b
@ -1168,41 +1333,53 @@ const (
SIOCGIFFLAGS = 0xc0206911 SIOCGIFFLAGS = 0xc0206911
SIOCGIFGATTR = 0xc024698b SIOCGIFGATTR = 0xc024698b
SIOCGIFGENERIC = 0xc020693a SIOCGIFGENERIC = 0xc020693a
SIOCGIFGLIST = 0xc024698d
SIOCGIFGMEMB = 0xc024698a SIOCGIFGMEMB = 0xc024698a
SIOCGIFGROUP = 0xc0246988 SIOCGIFGROUP = 0xc0246988
SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFHARDMTU = 0xc02069a5
SIOCGIFMEDIA = 0xc0286936 SIOCGIFLLPRIO = 0xc02069b6
SIOCGIFMEDIA = 0xc0386938
SIOCGIFMETRIC = 0xc0206917 SIOCGIFMETRIC = 0xc0206917
SIOCGIFMTU = 0xc020697e SIOCGIFMTU = 0xc020697e
SIOCGIFNETMASK = 0xc0206925 SIOCGIFNETMASK = 0xc0206925
SIOCGIFPDSTADDR = 0xc0206948 SIOCGIFPAIR = 0xc02069b1
SIOCGIFPARENT = 0xc02069b3
SIOCGIFPRIORITY = 0xc020699c SIOCGIFPRIORITY = 0xc020699c
SIOCGIFPSRCADDR = 0xc0206947
SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRDOMAIN = 0xc02069a0
SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRTLABEL = 0xc0206983
SIOCGIFRXR = 0x802069aa SIOCGIFRXR = 0x802069aa
SIOCGIFTIMESLOT = 0xc0206986 SIOCGIFSFFPAGE = 0xc1126939
SIOCGIFXFLAGS = 0xc020699e SIOCGIFXFLAGS = 0xc020699e
SIOCGLIFADDR = 0xc218691d
SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYADDR = 0xc218694b
SIOCGLIFPHYDF = 0xc02069c2
SIOCGLIFPHYECN = 0xc02069c8
SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYRTABLE = 0xc02069a2
SIOCGLIFPHYTTL = 0xc02069a9 SIOCGLIFPHYTTL = 0xc02069a9
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309 SIOCGPGRP = 0x40047309
SIOCGPWE3 = 0xc0206998
SIOCGPWE3CTRLWORD = 0xc02069dc
SIOCGPWE3FAT = 0xc02069dd
SIOCGPWE3NEIGHBOR = 0xc21869de
SIOCGRXHPRIO = 0xc02069db
SIOCGSPPPPARAMS = 0xc0206994 SIOCGSPPPPARAMS = 0xc0206994
SIOCGTXHPRIO = 0xc02069c6
SIOCGUMBINFO = 0xc02069be
SIOCGUMBPARAM = 0xc02069c0
SIOCGVH = 0xc02069f6 SIOCGVH = 0xc02069f6
SIOCGVNETFLOWID = 0xc02069c4
SIOCGVNETID = 0xc02069a7 SIOCGVNETID = 0xc02069a7
SIOCIFAFATTACH = 0x801169ab
SIOCIFAFDETACH = 0x801169ac
SIOCIFCREATE = 0x8020697a SIOCIFCREATE = 0x8020697a
SIOCIFDESTROY = 0x80206979 SIOCIFDESTROY = 0x80206979
SIOCIFGCLONERS = 0xc00c6978 SIOCIFGCLONERS = 0xc00c6978
SIOCSETKALIVE = 0x801869a3 SIOCSETKALIVE = 0x801869a3
SIOCSETLABEL = 0x80206999 SIOCSETLABEL = 0x80206999
SIOCSETMPWCFG = 0x802069ad
SIOCSETPFLOW = 0x802069fd SIOCSETPFLOW = 0x802069fd
SIOCSETPFSYNC = 0x802069f7 SIOCSETPFSYNC = 0x802069f7
SIOCSETVLAN = 0x8020698f SIOCSETVLAN = 0x8020698f
SIOCSHIWAT = 0x80047300
SIOCSIFADDR = 0x8020690c SIOCSIFADDR = 0x8020690c
SIOCSIFASYNCMAP = 0x8020697d
SIOCSIFBRDADDR = 0x80206913 SIOCSIFBRDADDR = 0x80206913
SIOCSIFDESCR = 0x80206980 SIOCSIFDESCR = 0x80206980
SIOCSIFDSTADDR = 0x8020690e SIOCSIFDSTADDR = 0x8020690e
@ -1210,26 +1387,36 @@ const (
SIOCSIFGATTR = 0x8024698c SIOCSIFGATTR = 0x8024698c
SIOCSIFGENERIC = 0x80206939 SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020691f SIOCSIFLLADDR = 0x8020691f
SIOCSIFMEDIA = 0xc0206935 SIOCSIFLLPRIO = 0x802069b5
SIOCSIFMEDIA = 0xc0206937
SIOCSIFMETRIC = 0x80206918 SIOCSIFMETRIC = 0x80206918
SIOCSIFMTU = 0x8020697f SIOCSIFMTU = 0x8020697f
SIOCSIFNETMASK = 0x80206916 SIOCSIFNETMASK = 0x80206916
SIOCSIFPHYADDR = 0x80406946 SIOCSIFPAIR = 0x802069b0
SIOCSIFPARENT = 0x802069b2
SIOCSIFPRIORITY = 0x8020699b SIOCSIFPRIORITY = 0x8020699b
SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRDOMAIN = 0x8020699f
SIOCSIFRTLABEL = 0x80206982 SIOCSIFRTLABEL = 0x80206982
SIOCSIFTIMESLOT = 0x80206985
SIOCSIFXFLAGS = 0x8020699d SIOCSIFXFLAGS = 0x8020699d
SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYADDR = 0x8218694a
SIOCSLIFPHYDF = 0x802069c1
SIOCSLIFPHYECN = 0x802069c7
SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYRTABLE = 0x802069a1
SIOCSLIFPHYTTL = 0x802069a8 SIOCSLIFPHYTTL = 0x802069a8
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308 SIOCSPGRP = 0x80047308
SIOCSPWE3CTRLWORD = 0x802069dc
SIOCSPWE3FAT = 0x802069dd
SIOCSPWE3NEIGHBOR = 0x821869de
SIOCSRXHPRIO = 0x802069db
SIOCSSPPPPARAMS = 0x80206993 SIOCSSPPPPARAMS = 0x80206993
SIOCSTXHPRIO = 0x802069c5
SIOCSUMBPARAM = 0x802069bf
SIOCSVH = 0xc02069f5 SIOCSVH = 0xc02069f5
SIOCSVNETFLOWID = 0x802069c3
SIOCSVNETID = 0x802069a6 SIOCSVNETID = 0x802069a6
SOCK_CLOEXEC = 0x8000 SOCK_CLOEXEC = 0x8000
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_DNS = 0x1000
SOCK_NONBLOCK = 0x4000 SOCK_NONBLOCK = 0x4000
SOCK_RAW = 0x3 SOCK_RAW = 0x3
SOCK_RDM = 0x4 SOCK_RDM = 0x4
@ -1241,6 +1428,7 @@ const (
SO_BINDANY = 0x1000 SO_BINDANY = 0x1000
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_DEBUG = 0x1 SO_DEBUG = 0x1
SO_DOMAIN = 0x1024
SO_DONTROUTE = 0x10 SO_DONTROUTE = 0x10
SO_ERROR = 0x1007 SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8 SO_KEEPALIVE = 0x8
@ -1248,6 +1436,7 @@ const (
SO_NETPROC = 0x1020 SO_NETPROC = 0x1020
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PEERCRED = 0x1022 SO_PEERCRED = 0x1022
SO_PROTOCOL = 0x1025
SO_RCVBUF = 0x1002 SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004 SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
@ -1261,6 +1450,7 @@ const (
SO_TIMESTAMP = 0x800 SO_TIMESTAMP = 0x800
SO_TYPE = 0x1008 SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40 SO_USELOOPBACK = 0x40
SO_ZEROIZE = 0x2000
S_BLKSIZE = 0x200 S_BLKSIZE = 0x200
S_IEXEC = 0x40 S_IEXEC = 0x40
S_IFBLK = 0x6000 S_IFBLK = 0x6000
@ -1290,9 +1480,24 @@ const (
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCP_MAXBURST = 0x4 TCOOFF = 0x1
TCOON = 0x2
TCPOPT_EOL = 0x0
TCPOPT_MAXSEG = 0x2
TCPOPT_NOP = 0x1
TCPOPT_SACK = 0x5
TCPOPT_SACK_HDR = 0x1010500
TCPOPT_SACK_PERMITTED = 0x4
TCPOPT_SACK_PERMIT_HDR = 0x1010402
TCPOPT_SIGNATURE = 0x13
TCPOPT_TIMESTAMP = 0x8
TCPOPT_TSTAMP_HDR = 0x101080a
TCPOPT_WINDOW = 0x3
TCP_INFO = 0x9
TCP_MAXSEG = 0x2 TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff TCP_MAXWIN = 0xffff
TCP_MAX_SACK = 0x3 TCP_MAX_SACK = 0x3
@ -1301,11 +1506,15 @@ const (
TCP_MSS = 0x200 TCP_MSS = 0x200
TCP_NODELAY = 0x1 TCP_NODELAY = 0x1
TCP_NOPUSH = 0x10 TCP_NOPUSH = 0x10
TCP_NSTATES = 0xb TCP_SACKHOLE_LIMIT = 0x80
TCP_SACK_ENABLE = 0x8 TCP_SACK_ENABLE = 0x8
TCSAFLUSH = 0x2 TCSAFLUSH = 0x2
TIMER_ABSTIME = 0x1
TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478 TIOCCDTR = 0x20007478
TIOCCHKVERAUTH = 0x2000741e
TIOCCLRVERAUTH = 0x2000741d
TIOCCONS = 0x80047462 TIOCCONS = 0x80047462
TIOCDRAIN = 0x2000745e TIOCDRAIN = 0x2000745e
TIOCEXCL = 0x2000740d TIOCEXCL = 0x2000740d
@ -1321,7 +1530,7 @@ const (
TIOCGFLAGS = 0x4004745d TIOCGFLAGS = 0x4004745d
TIOCGPGRP = 0x40047477 TIOCGPGRP = 0x40047477
TIOCGSID = 0x40047463 TIOCGSID = 0x40047463
TIOCGTSTAMP = 0x400c745b TIOCGTSTAMP = 0x4010745b
TIOCGWINSZ = 0x40087468 TIOCGWINSZ = 0x40087468
TIOCMBIC = 0x8004746b TIOCMBIC = 0x8004746b
TIOCMBIS = 0x8004746c TIOCMBIS = 0x8004746c
@ -1360,17 +1569,21 @@ const (
TIOCSETAF = 0x802c7416 TIOCSETAF = 0x802c7416
TIOCSETAW = 0x802c7415 TIOCSETAW = 0x802c7415
TIOCSETD = 0x8004741b TIOCSETD = 0x8004741b
TIOCSETVERAUTH = 0x8004741c
TIOCSFLAGS = 0x8004745c TIOCSFLAGS = 0x8004745c
TIOCSIG = 0x8004745f TIOCSIG = 0x8004745f
TIOCSPGRP = 0x80047476 TIOCSPGRP = 0x80047476
TIOCSTART = 0x2000746e TIOCSTART = 0x2000746e
TIOCSTAT = 0x80047465 TIOCSTAT = 0x20007465
TIOCSTI = 0x80017472
TIOCSTOP = 0x2000746f TIOCSTOP = 0x2000746f
TIOCSTSTAMP = 0x8008745a TIOCSTSTAMP = 0x8008745a
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCUCNTL = 0x80047466 TIOCUCNTL = 0x80047466
TIOCUCNTL_CBRK = 0x7a
TIOCUCNTL_SBRK = 0x7b
TOSTOP = 0x400000 TOSTOP = 0x400000
UTIME_NOW = -0x2
UTIME_OMIT = -0x1
VDISCARD = 0xf VDISCARD = 0xf
VDSUSP = 0xb VDSUSP = 0xb
VEOF = 0x0 VEOF = 0x0
@ -1381,6 +1594,19 @@ const (
VKILL = 0x5 VKILL = 0x5
VLNEXT = 0xe VLNEXT = 0xe
VMIN = 0x10 VMIN = 0x10
VM_ANONMIN = 0x7
VM_LOADAVG = 0x2
VM_MALLOC_CONF = 0xc
VM_MAXID = 0xd
VM_MAXSLP = 0xa
VM_METER = 0x1
VM_NKMEMPAGES = 0x6
VM_PSSTRINGS = 0x3
VM_SWAPENCRYPT = 0x5
VM_USPACE = 0xb
VM_UVMEXP = 0x4
VM_VNODEMIN = 0x9
VM_VTEXTMIN = 0x8
VQUIT = 0x9 VQUIT = 0x9
VREPRINT = 0x6 VREPRINT = 0x6
VSTART = 0xc VSTART = 0xc
@ -1394,6 +1620,7 @@ const (
WCOREFLAG = 0x80 WCOREFLAG = 0x80
WNOHANG = 0x1 WNOHANG = 0x1
WUNTRACED = 0x2 WUNTRACED = 0x2
XCASE = 0x1000000
) )
// Errors // Errors
@ -1407,6 +1634,7 @@ const (
EALREADY = syscall.Errno(0x25) EALREADY = syscall.Errno(0x25)
EAUTH = syscall.Errno(0x50) EAUTH = syscall.Errno(0x50)
EBADF = syscall.Errno(0x9) EBADF = syscall.Errno(0x9)
EBADMSG = syscall.Errno(0x5c)
EBADRPC = syscall.Errno(0x48) EBADRPC = syscall.Errno(0x48)
EBUSY = syscall.Errno(0x10) EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x58) ECANCELED = syscall.Errno(0x58)
@ -1433,7 +1661,7 @@ const (
EIPSEC = syscall.Errno(0x52) EIPSEC = syscall.Errno(0x52)
EISCONN = syscall.Errno(0x38) EISCONN = syscall.Errno(0x38)
EISDIR = syscall.Errno(0x15) EISDIR = syscall.Errno(0x15)
ELAST = syscall.Errno(0x5b) ELAST = syscall.Errno(0x5f)
ELOOP = syscall.Errno(0x3e) ELOOP = syscall.Errno(0x3e)
EMEDIUMTYPE = syscall.Errno(0x56) EMEDIUMTYPE = syscall.Errno(0x56)
EMFILE = syscall.Errno(0x18) EMFILE = syscall.Errno(0x18)
@ -1461,12 +1689,14 @@ const (
ENOTCONN = syscall.Errno(0x39) ENOTCONN = syscall.Errno(0x39)
ENOTDIR = syscall.Errno(0x14) ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x42) ENOTEMPTY = syscall.Errno(0x42)
ENOTRECOVERABLE = syscall.Errno(0x5d)
ENOTSOCK = syscall.Errno(0x26) ENOTSOCK = syscall.Errno(0x26)
ENOTSUP = syscall.Errno(0x5b) ENOTSUP = syscall.Errno(0x5b)
ENOTTY = syscall.Errno(0x19) ENOTTY = syscall.Errno(0x19)
ENXIO = syscall.Errno(0x6) ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x2d) EOPNOTSUPP = syscall.Errno(0x2d)
EOVERFLOW = syscall.Errno(0x57) EOVERFLOW = syscall.Errno(0x57)
EOWNERDEAD = syscall.Errno(0x5e)
EPERM = syscall.Errno(0x1) EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x2e) EPFNOSUPPORT = syscall.Errno(0x2e)
EPIPE = syscall.Errno(0x20) EPIPE = syscall.Errno(0x20)
@ -1474,6 +1704,7 @@ const (
EPROCUNAVAIL = syscall.Errno(0x4c) EPROCUNAVAIL = syscall.Errno(0x4c)
EPROGMISMATCH = syscall.Errno(0x4b) EPROGMISMATCH = syscall.Errno(0x4b)
EPROGUNAVAIL = syscall.Errno(0x4a) EPROGUNAVAIL = syscall.Errno(0x4a)
EPROTO = syscall.Errno(0x5f)
EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTONOSUPPORT = syscall.Errno(0x2b)
EPROTOTYPE = syscall.Errno(0x29) EPROTOTYPE = syscall.Errno(0x29)
ERANGE = syscall.Errno(0x22) ERANGE = syscall.Errno(0x22)
@ -1570,7 +1801,7 @@ var errorList = [...]struct {
{32, "EPIPE", "broken pipe"}, {32, "EPIPE", "broken pipe"},
{33, "EDOM", "numerical argument out of domain"}, {33, "EDOM", "numerical argument out of domain"},
{34, "ERANGE", "result too large"}, {34, "ERANGE", "result too large"},
{35, "EWOULDBLOCK", "resource temporarily unavailable"}, {35, "EAGAIN", "resource temporarily unavailable"},
{36, "EINPROGRESS", "operation now in progress"}, {36, "EINPROGRESS", "operation now in progress"},
{37, "EALREADY", "operation already in progress"}, {37, "EALREADY", "operation already in progress"},
{38, "ENOTSOCK", "socket operation on non-socket"}, {38, "ENOTSOCK", "socket operation on non-socket"},
@ -1626,7 +1857,11 @@ var errorList = [...]struct {
{88, "ECANCELED", "operation canceled"}, {88, "ECANCELED", "operation canceled"},
{89, "EIDRM", "identifier removed"}, {89, "EIDRM", "identifier removed"},
{90, "ENOMSG", "no message of desired type"}, {90, "ENOMSG", "no message of desired type"},
{91, "ELAST", "not supported"}, {91, "ENOTSUP", "not supported"},
{92, "EBADMSG", "bad message"},
{93, "ENOTRECOVERABLE", "state not recoverable"},
{94, "EOWNERDEAD", "previous owner died"},
{95, "ELAST", "protocol error"},
} }
// Signal table // Signal table
@ -1640,7 +1875,7 @@ var signalList = [...]struct {
{3, "SIGQUIT", "quit"}, {3, "SIGQUIT", "quit"},
{4, "SIGILL", "illegal instruction"}, {4, "SIGILL", "illegal instruction"},
{5, "SIGTRAP", "trace/BPT trap"}, {5, "SIGTRAP", "trace/BPT trap"},
{6, "SIGABRT", "abort trap"}, {6, "SIGIOT", "abort trap"},
{7, "SIGEMT", "EMT trap"}, {7, "SIGEMT", "EMT trap"},
{8, "SIGFPE", "floating point exception"}, {8, "SIGFPE", "floating point exception"},
{9, "SIGKILL", "killed"}, {9, "SIGKILL", "killed"},
@ -1667,4 +1902,5 @@ var signalList = [...]struct {
{30, "SIGUSR1", "user defined signal 1"}, {30, "SIGUSR1", "user defined signal 1"},
{31, "SIGUSR2", "user defined signal 2"}, {31, "SIGUSR2", "user defined signal 2"},
{32, "SIGTHR", "thread AST"}, {32, "SIGTHR", "thread AST"},
{28672, "SIGSTKSZ", "unknown signal"},
} }

View file

@ -112,6 +112,12 @@ const (
BPF_FILDROP_CAPTURE = 0x1 BPF_FILDROP_CAPTURE = 0x1
BPF_FILDROP_DROP = 0x2 BPF_FILDROP_DROP = 0x2
BPF_FILDROP_PASS = 0x0 BPF_FILDROP_PASS = 0x0
BPF_F_DIR_IN = 0x10
BPF_F_DIR_MASK = 0x30
BPF_F_DIR_OUT = 0x20
BPF_F_DIR_SHIFT = 0x4
BPF_F_FLOWID = 0x8
BPF_F_PRI_MASK = 0x7
BPF_H = 0x8 BPF_H = 0x8
BPF_IMM = 0x0 BPF_IMM = 0x0
BPF_IND = 0x40 BPF_IND = 0x40
@ -140,6 +146,7 @@ const (
BPF_OR = 0x40 BPF_OR = 0x40
BPF_RELEASE = 0x30bb6 BPF_RELEASE = 0x30bb6
BPF_RET = 0x6 BPF_RET = 0x6
BPF_RND = 0xc0
BPF_RSH = 0x70 BPF_RSH = 0x70
BPF_ST = 0x2 BPF_ST = 0x2
BPF_STX = 0x3 BPF_STX = 0x3
@ -180,7 +187,65 @@ const (
CTL_KERN = 0x1 CTL_KERN = 0x1
CTL_MAXNAME = 0xc CTL_MAXNAME = 0xc
CTL_NET = 0x4 CTL_NET = 0x4
DIOCADDQUEUE = 0xc110445d
DIOCADDRULE = 0xcd604404
DIOCADDSTATE = 0xc1084425
DIOCCHANGERULE = 0xcd60441a
DIOCCLRIFFLAG = 0xc028445a
DIOCCLRSRCNODES = 0x20004455
DIOCCLRSTATES = 0xc0e04412
DIOCCLRSTATUS = 0xc0284416
DIOCGETLIMIT = 0xc0084427
DIOCGETQSTATS = 0xc1204460
DIOCGETQUEUE = 0xc110445f
DIOCGETQUEUES = 0xc110445e
DIOCGETRULE = 0xcd604407
DIOCGETRULES = 0xcd604406
DIOCGETRULESET = 0xc444443b
DIOCGETRULESETS = 0xc444443a
DIOCGETSRCNODES = 0xc0104454
DIOCGETSTATE = 0xc1084413
DIOCGETSTATES = 0xc0104419
DIOCGETSTATUS = 0xc1e84415
DIOCGETSYNFLWATS = 0xc0084463
DIOCGETTIMEOUT = 0xc008441e
DIOCIGETIFACES = 0xc0284457
DIOCKILLSRCNODES = 0xc080445b
DIOCKILLSTATES = 0xc0e04429
DIOCNATLOOK = 0xc0504417
DIOCOSFPADD = 0xc088444f
DIOCOSFPFLUSH = 0x2000444e DIOCOSFPFLUSH = 0x2000444e
DIOCOSFPGET = 0xc0884450
DIOCRADDADDRS = 0xc4504443
DIOCRADDTABLES = 0xc450443d
DIOCRCLRADDRS = 0xc4504442
DIOCRCLRASTATS = 0xc4504448
DIOCRCLRTABLES = 0xc450443c
DIOCRCLRTSTATS = 0xc4504441
DIOCRDELADDRS = 0xc4504444
DIOCRDELTABLES = 0xc450443e
DIOCRGETADDRS = 0xc4504446
DIOCRGETASTATS = 0xc4504447
DIOCRGETTABLES = 0xc450443f
DIOCRGETTSTATS = 0xc4504440
DIOCRINADEFINE = 0xc450444d
DIOCRSETADDRS = 0xc4504445
DIOCRSETTFLAGS = 0xc450444a
DIOCRTSTADDRS = 0xc4504449
DIOCSETDEBUG = 0xc0044418
DIOCSETHOSTID = 0xc0044456
DIOCSETIFFLAG = 0xc0284459
DIOCSETLIMIT = 0xc0084428
DIOCSETREASS = 0xc004445c
DIOCSETSTATUSIF = 0xc0284414
DIOCSETSYNCOOKIES = 0xc0014462
DIOCSETSYNFLWATS = 0xc0084461
DIOCSETTIMEOUT = 0xc008441d
DIOCSTART = 0x20004401
DIOCSTOP = 0x20004402
DIOCXBEGIN = 0xc0104451
DIOCXCOMMIT = 0xc0104452
DIOCXROLLBACK = 0xc0104453
DLT_ARCNET = 0x7 DLT_ARCNET = 0x7
DLT_ATM_RFC1483 = 0xb DLT_ATM_RFC1483 = 0xb
DLT_AX25 = 0x3 DLT_AX25 = 0x3
@ -243,6 +308,8 @@ const (
EMUL_ENABLED = 0x1 EMUL_ENABLED = 0x1
EMUL_NATIVE = 0x2 EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9 ENDRUNDISC = 0x9
ETH64_8021_RSVD_MASK = 0xfffffffffff0
ETH64_8021_RSVD_PREFIX = 0x180c2000000
ETHERMIN = 0x2e ETHERMIN = 0x2e
ETHERMTU = 0x5dc ETHERMTU = 0x5dc
ETHERTYPE_8023 = 0x4 ETHERTYPE_8023 = 0x4
@ -295,6 +362,7 @@ const (
ETHERTYPE_DN = 0x6003 ETHERTYPE_DN = 0x6003
ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DOGFIGHT = 0x1989
ETHERTYPE_DSMD = 0x8039 ETHERTYPE_DSMD = 0x8039
ETHERTYPE_EAPOL = 0x888e
ETHERTYPE_ECMA = 0x803 ETHERTYPE_ECMA = 0x803
ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ENCRYPT = 0x803d
ETHERTYPE_ES = 0x805d ETHERTYPE_ES = 0x805d
@ -326,6 +394,7 @@ const (
ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LLDP = 0x88cc
ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOGICRAFT = 0x8148
ETHERTYPE_LOOPBACK = 0x9000 ETHERTYPE_LOOPBACK = 0x9000
ETHERTYPE_MACSEC = 0x88e5
ETHERTYPE_MATRA = 0x807a ETHERTYPE_MATRA = 0x807a
ETHERTYPE_MAX = 0xffff ETHERTYPE_MAX = 0xffff
ETHERTYPE_MERIT = 0x807c ETHERTYPE_MERIT = 0x807c
@ -354,15 +423,16 @@ const (
ETHERTYPE_NCD = 0x8149 ETHERTYPE_NCD = 0x8149
ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NESTAR = 0x8006
ETHERTYPE_NETBEUI = 0x8191 ETHERTYPE_NETBEUI = 0x8191
ETHERTYPE_NHRP = 0x2001
ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NOVELL = 0x8138
ETHERTYPE_NS = 0x600 ETHERTYPE_NS = 0x600
ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSAT = 0x601
ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSCOMPAT = 0x807
ETHERTYPE_NSH = 0x984f
ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_NTRAILER = 0x10
ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9 = 0x7007
ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_OS9NET = 0x7009
ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PACER = 0x80c6
ETHERTYPE_PAE = 0x888e
ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PBB = 0x88e7
ETHERTYPE_PCS = 0x4242 ETHERTYPE_PCS = 0x4242
ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PLANNING = 0x8044
@ -445,10 +515,11 @@ const (
ETHER_VLAN_ENCAP_LEN = 0x4 ETHER_VLAN_ENCAP_LEN = 0x4
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_DEVICE = -0x8 EVFILT_DEVICE = -0x8
EVFILT_EXCEPT = -0x9
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0x8 EVFILT_SYSCOUNT = 0x9
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_VNODE = -0x4 EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2 EVFILT_WRITE = -0x2
@ -470,7 +541,7 @@ const (
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf800
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
@ -736,6 +807,7 @@ const (
IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERCABLE = 0xc6
IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68 IFT_VOICEOVERIP = 0x68
IFT_WIREGUARD = 0xfb
IFT_X213 = 0x5d IFT_X213 = 0x5d
IFT_X25 = 0x5 IFT_X25 = 0x5
IFT_X25DDN = 0x4 IFT_X25DDN = 0x4
@ -801,9 +873,11 @@ const (
IPPROTO_RAW = 0xff IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6 IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11 IPPROTO_UDP = 0x11
IPPROTO_UDPLITE = 0x88
IPV6_AUTH_LEVEL = 0x35 IPV6_AUTH_LEVEL = 0x35
IPV6_AUTOFLOWLABEL = 0x3b IPV6_AUTOFLOWLABEL = 0x3b
IPV6_CHECKSUM = 0x1a IPV6_CHECKSUM = 0x1a
@ -910,6 +984,9 @@ const (
IP_TTL = 0x4 IP_TTL = 0x4
ISIG = 0x80 ISIG = 0x80
ISTRIP = 0x20 ISTRIP = 0x20
ITIMER_PROF = 0x2
ITIMER_REAL = 0x0
ITIMER_VIRTUAL = 0x1
IUCLC = 0x1000 IUCLC = 0x1000
IXANY = 0x800 IXANY = 0x800
IXOFF = 0x400 IXOFF = 0x400
@ -981,6 +1058,19 @@ const (
MNT_WAIT = 0x1 MNT_WAIT = 0x1
MNT_WANTRDWR = 0x2000000 MNT_WANTRDWR = 0x2000000
MNT_WXALLOWED = 0x800 MNT_WXALLOWED = 0x800
MOUNT_AFS = "afs"
MOUNT_CD9660 = "cd9660"
MOUNT_EXT2FS = "ext2fs"
MOUNT_FFS = "ffs"
MOUNT_FUSEFS = "fuse"
MOUNT_MFS = "mfs"
MOUNT_MSDOS = "msdos"
MOUNT_NCPFS = "ncpfs"
MOUNT_NFS = "nfs"
MOUNT_NTFS = "ntfs"
MOUNT_TMPFS = "tmpfs"
MOUNT_UDF = "udf"
MOUNT_UFS = "ffs"
MSG_BCAST = 0x100 MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800 MSG_CMSG_CLOEXEC = 0x800
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
@ -993,6 +1083,7 @@ const (
MSG_PEEK = 0x2 MSG_PEEK = 0x2
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x1000
MS_ASYNC = 0x1 MS_ASYNC = 0x1
MS_INVALIDATE = 0x4 MS_INVALIDATE = 0x4
MS_SYNC = 0x2 MS_SYNC = 0x2
@ -1001,7 +1092,8 @@ const (
NET_RT_FLAGS = 0x2 NET_RT_FLAGS = 0x2
NET_RT_IFLIST = 0x3 NET_RT_IFLIST = 0x3
NET_RT_IFNAMES = 0x6 NET_RT_IFNAMES = 0x6
NET_RT_MAXID = 0x7 NET_RT_MAXID = 0x8
NET_RT_SOURCE = 0x7
NET_RT_STATS = 0x4 NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5 NET_RT_TABLE = 0x5
NFDBITS = 0x20 NFDBITS = 0x20
@ -1018,6 +1110,7 @@ const (
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_OOB = 0x4
NOTE_PCTRLMASK = 0xf0000000 NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_RENAME = 0x20 NOTE_RENAME = 0x20
@ -1154,7 +1247,7 @@ const (
RTM_PROPOSAL = 0x13 RTM_PROPOSAL = 0x13
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_SOURCE = 0x16
RTM_VERSION = 0x5 RTM_VERSION = 0x5
RTV_EXPIRE = 0x4 RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2 RTV_HOPCOUNT = 0x2
@ -1172,6 +1265,9 @@ const (
RUSAGE_THREAD = 0x1 RUSAGE_THREAD = 0x1
SCM_RIGHTS = 0x1 SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x4 SCM_TIMESTAMP = 0x4
SEEK_CUR = 0x1
SEEK_END = 0x2
SEEK_SET = 0x0
SHUT_RD = 0x0 SHUT_RD = 0x0
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
@ -1188,30 +1284,30 @@ const (
SIOCBRDGDELS = 0x80606942 SIOCBRDGDELS = 0x80606942
SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFLUSH = 0x80606948
SIOCBRDGFRL = 0x808c694e SIOCBRDGFRL = 0x808c694e
SIOCBRDGGCACHE = 0xc0186941 SIOCBRDGGCACHE = 0xc0146941
SIOCBRDGGFD = 0xc0186952 SIOCBRDGGFD = 0xc0146952
SIOCBRDGGHT = 0xc0186951 SIOCBRDGGHT = 0xc0146951
SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGIFFLGS = 0xc060693e
SIOCBRDGGMA = 0xc0186953 SIOCBRDGGMA = 0xc0146953
SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPARAM = 0xc0406958
SIOCBRDGGPRI = 0xc0186950 SIOCBRDGGPRI = 0xc0146950
SIOCBRDGGRL = 0xc030694f SIOCBRDGGRL = 0xc030694f
SIOCBRDGGTO = 0xc0186946 SIOCBRDGGTO = 0xc0146946
SIOCBRDGIFS = 0xc0606942 SIOCBRDGIFS = 0xc0606942
SIOCBRDGRTS = 0xc0206943 SIOCBRDGRTS = 0xc0206943
SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSADDR = 0xc1286944
SIOCBRDGSCACHE = 0x80186940 SIOCBRDGSCACHE = 0x80146940
SIOCBRDGSFD = 0x80186952 SIOCBRDGSFD = 0x80146952
SIOCBRDGSHT = 0x80186951 SIOCBRDGSHT = 0x80146951
SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFCOST = 0x80606955
SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFFLGS = 0x8060693f
SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPRIO = 0x80606954
SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSIFPROT = 0x8060694a
SIOCBRDGSMA = 0x80186953 SIOCBRDGSMA = 0x80146953
SIOCBRDGSPRI = 0x80186950 SIOCBRDGSPRI = 0x80146950
SIOCBRDGSPROTO = 0x8018695a SIOCBRDGSPROTO = 0x8014695a
SIOCBRDGSTO = 0x80186945 SIOCBRDGSTO = 0x80146945
SIOCBRDGSTXHC = 0x80186959 SIOCBRDGSTXHC = 0x80146959
SIOCDELLABEL = 0x80206997 SIOCDELLABEL = 0x80206997
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
@ -1264,6 +1360,7 @@ const (
SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3CTRLWORD = 0xc02069dc
SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3FAT = 0xc02069dd
SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGPWE3NEIGHBOR = 0xc21869de
SIOCGRXHPRIO = 0xc02069db
SIOCGSPPPPARAMS = 0xc0206994 SIOCGSPPPPARAMS = 0xc0206994
SIOCGTXHPRIO = 0xc02069c6 SIOCGTXHPRIO = 0xc02069c6
SIOCGUMBINFO = 0xc02069be SIOCGUMBINFO = 0xc02069be
@ -1310,17 +1407,13 @@ const (
SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3CTRLWORD = 0x802069dc
SIOCSPWE3FAT = 0x802069dd SIOCSPWE3FAT = 0x802069dd
SIOCSPWE3NEIGHBOR = 0x821869de SIOCSPWE3NEIGHBOR = 0x821869de
SIOCSRXHPRIO = 0x802069db
SIOCSSPPPPARAMS = 0x80206993 SIOCSSPPPPARAMS = 0x80206993
SIOCSTXHPRIO = 0x802069c5 SIOCSTXHPRIO = 0x802069c5
SIOCSUMBPARAM = 0x802069bf SIOCSUMBPARAM = 0x802069bf
SIOCSVH = 0xc02069f5 SIOCSVH = 0xc02069f5
SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETFLOWID = 0x802069c3
SIOCSVNETID = 0x802069a6 SIOCSVNETID = 0x802069a6
SIOCSWGDPID = 0xc018695b
SIOCSWGMAXFLOW = 0xc0186960
SIOCSWGMAXGROUP = 0xc018695d
SIOCSWSDPID = 0x8018695c
SIOCSWSPORTNO = 0xc060695f
SOCK_CLOEXEC = 0x8000 SOCK_CLOEXEC = 0x8000
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_DNS = 0x1000 SOCK_DNS = 0x1000
@ -1335,6 +1428,7 @@ const (
SO_BINDANY = 0x1000 SO_BINDANY = 0x1000
SO_BROADCAST = 0x20 SO_BROADCAST = 0x20
SO_DEBUG = 0x1 SO_DEBUG = 0x1
SO_DOMAIN = 0x1024
SO_DONTROUTE = 0x10 SO_DONTROUTE = 0x10
SO_ERROR = 0x1007 SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8 SO_KEEPALIVE = 0x8
@ -1342,6 +1436,7 @@ const (
SO_NETPROC = 0x1020 SO_NETPROC = 0x1020
SO_OOBINLINE = 0x100 SO_OOBINLINE = 0x100
SO_PEERCRED = 0x1022 SO_PEERCRED = 0x1022
SO_PROTOCOL = 0x1025
SO_RCVBUF = 0x1002 SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004 SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006 SO_RCVTIMEO = 0x1006
@ -1391,7 +1486,18 @@ const (
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1 TCOOFF = 0x1
TCOON = 0x2 TCOON = 0x2
TCP_MAXBURST = 0x4 TCPOPT_EOL = 0x0
TCPOPT_MAXSEG = 0x2
TCPOPT_NOP = 0x1
TCPOPT_SACK = 0x5
TCPOPT_SACK_HDR = 0x1010500
TCPOPT_SACK_PERMITTED = 0x4
TCPOPT_SACK_PERMIT_HDR = 0x1010402
TCPOPT_SIGNATURE = 0x13
TCPOPT_TIMESTAMP = 0x8
TCPOPT_TSTAMP_HDR = 0x101080a
TCPOPT_WINDOW = 0x3
TCP_INFO = 0x9
TCP_MAXSEG = 0x2 TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff TCP_MAXWIN = 0xffff
TCP_MAX_SACK = 0x3 TCP_MAX_SACK = 0x3
@ -1400,6 +1506,7 @@ const (
TCP_MSS = 0x200 TCP_MSS = 0x200
TCP_NODELAY = 0x1 TCP_NODELAY = 0x1
TCP_NOPUSH = 0x10 TCP_NOPUSH = 0x10
TCP_SACKHOLE_LIMIT = 0x80
TCP_SACK_ENABLE = 0x8 TCP_SACK_ENABLE = 0x8
TCSAFLUSH = 0x2 TCSAFLUSH = 0x2
TIMER_ABSTIME = 0x1 TIMER_ABSTIME = 0x1
@ -1768,7 +1875,7 @@ var signalList = [...]struct {
{3, "SIGQUIT", "quit"}, {3, "SIGQUIT", "quit"},
{4, "SIGILL", "illegal instruction"}, {4, "SIGILL", "illegal instruction"},
{5, "SIGTRAP", "trace/BPT trap"}, {5, "SIGTRAP", "trace/BPT trap"},
{6, "SIGABRT", "abort trap"}, {6, "SIGIOT", "abort trap"},
{7, "SIGEMT", "EMT trap"}, {7, "SIGEMT", "EMT trap"},
{8, "SIGFPE", "floating point exception"}, {8, "SIGFPE", "floating point exception"},
{9, "SIGKILL", "killed"}, {9, "SIGKILL", "killed"},
@ -1795,4 +1902,5 @@ var signalList = [...]struct {
{30, "SIGUSR1", "user defined signal 1"}, {30, "SIGUSR1", "user defined signal 1"},
{31, "SIGUSR2", "user defined signal 2"}, {31, "SIGUSR2", "user defined signal 2"},
{32, "SIGTHR", "thread AST"}, {32, "SIGTHR", "thread AST"},
{28672, "SIGSTKSZ", "unknown signal"},
} }

View file

@ -112,6 +112,12 @@ const (
BPF_FILDROP_CAPTURE = 0x1 BPF_FILDROP_CAPTURE = 0x1
BPF_FILDROP_DROP = 0x2 BPF_FILDROP_DROP = 0x2
BPF_FILDROP_PASS = 0x0 BPF_FILDROP_PASS = 0x0
BPF_F_DIR_IN = 0x10
BPF_F_DIR_MASK = 0x30
BPF_F_DIR_OUT = 0x20
BPF_F_DIR_SHIFT = 0x4
BPF_F_FLOWID = 0x8
BPF_F_PRI_MASK = 0x7
BPF_H = 0x8 BPF_H = 0x8
BPF_IMM = 0x0 BPF_IMM = 0x0
BPF_IND = 0x40 BPF_IND = 0x40
@ -140,6 +146,7 @@ const (
BPF_OR = 0x40 BPF_OR = 0x40
BPF_RELEASE = 0x30bb6 BPF_RELEASE = 0x30bb6
BPF_RET = 0x6 BPF_RET = 0x6
BPF_RND = 0xc0
BPF_RSH = 0x70 BPF_RSH = 0x70
BPF_ST = 0x2 BPF_ST = 0x2
BPF_STX = 0x3 BPF_STX = 0x3
@ -301,6 +308,8 @@ const (
EMUL_ENABLED = 0x1 EMUL_ENABLED = 0x1
EMUL_NATIVE = 0x2 EMUL_NATIVE = 0x2
ENDRUNDISC = 0x9 ENDRUNDISC = 0x9
ETH64_8021_RSVD_MASK = 0xfffffffffff0
ETH64_8021_RSVD_PREFIX = 0x180c2000000
ETHERMIN = 0x2e ETHERMIN = 0x2e
ETHERMTU = 0x5dc ETHERMTU = 0x5dc
ETHERTYPE_8023 = 0x4 ETHERTYPE_8023 = 0x4
@ -353,6 +362,7 @@ const (
ETHERTYPE_DN = 0x6003 ETHERTYPE_DN = 0x6003
ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DOGFIGHT = 0x1989
ETHERTYPE_DSMD = 0x8039 ETHERTYPE_DSMD = 0x8039
ETHERTYPE_EAPOL = 0x888e
ETHERTYPE_ECMA = 0x803 ETHERTYPE_ECMA = 0x803
ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ENCRYPT = 0x803d
ETHERTYPE_ES = 0x805d ETHERTYPE_ES = 0x805d
@ -413,15 +423,16 @@ const (
ETHERTYPE_NCD = 0x8149 ETHERTYPE_NCD = 0x8149
ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NESTAR = 0x8006
ETHERTYPE_NETBEUI = 0x8191 ETHERTYPE_NETBEUI = 0x8191
ETHERTYPE_NHRP = 0x2001
ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NOVELL = 0x8138
ETHERTYPE_NS = 0x600 ETHERTYPE_NS = 0x600
ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSAT = 0x601
ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSCOMPAT = 0x807
ETHERTYPE_NSH = 0x984f
ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_NTRAILER = 0x10
ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9 = 0x7007
ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_OS9NET = 0x7009
ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PACER = 0x80c6
ETHERTYPE_PAE = 0x888e
ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PBB = 0x88e7
ETHERTYPE_PCS = 0x4242 ETHERTYPE_PCS = 0x4242
ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PLANNING = 0x8044
@ -504,10 +515,11 @@ const (
ETHER_VLAN_ENCAP_LEN = 0x4 ETHER_VLAN_ENCAP_LEN = 0x4
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_DEVICE = -0x8 EVFILT_DEVICE = -0x8
EVFILT_EXCEPT = -0x9
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0x8 EVFILT_SYSCOUNT = 0x9
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_VNODE = -0x4 EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2 EVFILT_WRITE = -0x2
@ -529,7 +541,7 @@ const (
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf800
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
@ -795,6 +807,7 @@ const (
IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERCABLE = 0xc6
IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68 IFT_VOICEOVERIP = 0x68
IFT_WIREGUARD = 0xfb
IFT_X213 = 0x5d IFT_X213 = 0x5d
IFT_X25 = 0x5 IFT_X25 = 0x5
IFT_X25DDN = 0x4 IFT_X25DDN = 0x4
@ -860,6 +873,7 @@ const (
IPPROTO_RAW = 0xff IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6 IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11 IPPROTO_UDP = 0x11
@ -970,6 +984,9 @@ const (
IP_TTL = 0x4 IP_TTL = 0x4
ISIG = 0x80 ISIG = 0x80
ISTRIP = 0x20 ISTRIP = 0x20
ITIMER_PROF = 0x2
ITIMER_REAL = 0x0
ITIMER_VIRTUAL = 0x1
IUCLC = 0x1000 IUCLC = 0x1000
IXANY = 0x800 IXANY = 0x800
IXOFF = 0x400 IXOFF = 0x400
@ -1041,6 +1058,19 @@ const (
MNT_WAIT = 0x1 MNT_WAIT = 0x1
MNT_WANTRDWR = 0x2000000 MNT_WANTRDWR = 0x2000000
MNT_WXALLOWED = 0x800 MNT_WXALLOWED = 0x800
MOUNT_AFS = "afs"
MOUNT_CD9660 = "cd9660"
MOUNT_EXT2FS = "ext2fs"
MOUNT_FFS = "ffs"
MOUNT_FUSEFS = "fuse"
MOUNT_MFS = "mfs"
MOUNT_MSDOS = "msdos"
MOUNT_NCPFS = "ncpfs"
MOUNT_NFS = "nfs"
MOUNT_NTFS = "ntfs"
MOUNT_TMPFS = "tmpfs"
MOUNT_UDF = "udf"
MOUNT_UFS = "ffs"
MSG_BCAST = 0x100 MSG_BCAST = 0x100
MSG_CMSG_CLOEXEC = 0x800 MSG_CMSG_CLOEXEC = 0x800
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
@ -1053,6 +1083,7 @@ const (
MSG_PEEK = 0x2 MSG_PEEK = 0x2
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x1000
MS_ASYNC = 0x1 MS_ASYNC = 0x1
MS_INVALIDATE = 0x4 MS_INVALIDATE = 0x4
MS_SYNC = 0x2 MS_SYNC = 0x2
@ -1061,7 +1092,8 @@ const (
NET_RT_FLAGS = 0x2 NET_RT_FLAGS = 0x2
NET_RT_IFLIST = 0x3 NET_RT_IFLIST = 0x3
NET_RT_IFNAMES = 0x6 NET_RT_IFNAMES = 0x6
NET_RT_MAXID = 0x7 NET_RT_MAXID = 0x8
NET_RT_SOURCE = 0x7
NET_RT_STATS = 0x4 NET_RT_STATS = 0x4
NET_RT_TABLE = 0x5 NET_RT_TABLE = 0x5
NFDBITS = 0x20 NFDBITS = 0x20
@ -1078,6 +1110,7 @@ const (
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_OOB = 0x4
NOTE_PCTRLMASK = 0xf0000000 NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_RENAME = 0x20 NOTE_RENAME = 0x20
@ -1214,7 +1247,7 @@ const (
RTM_PROPOSAL = 0x13 RTM_PROPOSAL = 0x13
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_SOURCE = 0x16
RTM_VERSION = 0x5 RTM_VERSION = 0x5
RTV_EXPIRE = 0x4 RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2 RTV_HOPCOUNT = 0x2
@ -1232,6 +1265,9 @@ const (
RUSAGE_THREAD = 0x1 RUSAGE_THREAD = 0x1
SCM_RIGHTS = 0x1 SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x4 SCM_TIMESTAMP = 0x4
SEEK_CUR = 0x1
SEEK_END = 0x2
SEEK_SET = 0x0
SHUT_RD = 0x0 SHUT_RD = 0x0
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
@ -1248,30 +1284,30 @@ const (
SIOCBRDGDELS = 0x80606942 SIOCBRDGDELS = 0x80606942
SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFLUSH = 0x80606948
SIOCBRDGFRL = 0x808c694e SIOCBRDGFRL = 0x808c694e
SIOCBRDGGCACHE = 0xc0186941 SIOCBRDGGCACHE = 0xc0146941
SIOCBRDGGFD = 0xc0186952 SIOCBRDGGFD = 0xc0146952
SIOCBRDGGHT = 0xc0186951 SIOCBRDGGHT = 0xc0146951
SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGIFFLGS = 0xc060693e
SIOCBRDGGMA = 0xc0186953 SIOCBRDGGMA = 0xc0146953
SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPARAM = 0xc0406958
SIOCBRDGGPRI = 0xc0186950 SIOCBRDGGPRI = 0xc0146950
SIOCBRDGGRL = 0xc030694f SIOCBRDGGRL = 0xc030694f
SIOCBRDGGTO = 0xc0186946 SIOCBRDGGTO = 0xc0146946
SIOCBRDGIFS = 0xc0606942 SIOCBRDGIFS = 0xc0606942
SIOCBRDGRTS = 0xc0206943 SIOCBRDGRTS = 0xc0206943
SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSADDR = 0xc1286944
SIOCBRDGSCACHE = 0x80186940 SIOCBRDGSCACHE = 0x80146940
SIOCBRDGSFD = 0x80186952 SIOCBRDGSFD = 0x80146952
SIOCBRDGSHT = 0x80186951 SIOCBRDGSHT = 0x80146951
SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFCOST = 0x80606955
SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFFLGS = 0x8060693f
SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPRIO = 0x80606954
SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSIFPROT = 0x8060694a
SIOCBRDGSMA = 0x80186953 SIOCBRDGSMA = 0x80146953
SIOCBRDGSPRI = 0x80186950 SIOCBRDGSPRI = 0x80146950
SIOCBRDGSPROTO = 0x8018695a SIOCBRDGSPROTO = 0x8014695a
SIOCBRDGSTO = 0x80186945 SIOCBRDGSTO = 0x80146945
SIOCBRDGSTXHC = 0x80186959 SIOCBRDGSTXHC = 0x80146959
SIOCDELLABEL = 0x80206997 SIOCDELLABEL = 0x80206997
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
@ -1378,11 +1414,6 @@ const (
SIOCSVH = 0xc02069f5 SIOCSVH = 0xc02069f5
SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETFLOWID = 0x802069c3
SIOCSVNETID = 0x802069a6 SIOCSVNETID = 0x802069a6
SIOCSWGDPID = 0xc018695b
SIOCSWGMAXFLOW = 0xc0186960
SIOCSWGMAXGROUP = 0xc018695d
SIOCSWSDPID = 0x8018695c
SIOCSWSPORTNO = 0xc060695f
SOCK_CLOEXEC = 0x8000 SOCK_CLOEXEC = 0x8000
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_DNS = 0x1000 SOCK_DNS = 0x1000
@ -1455,7 +1486,18 @@ const (
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1 TCOOFF = 0x1
TCOON = 0x2 TCOON = 0x2
TCP_MAXBURST = 0x4 TCPOPT_EOL = 0x0
TCPOPT_MAXSEG = 0x2
TCPOPT_NOP = 0x1
TCPOPT_SACK = 0x5
TCPOPT_SACK_HDR = 0x1010500
TCPOPT_SACK_PERMITTED = 0x4
TCPOPT_SACK_PERMIT_HDR = 0x1010402
TCPOPT_SIGNATURE = 0x13
TCPOPT_TIMESTAMP = 0x8
TCPOPT_TSTAMP_HDR = 0x101080a
TCPOPT_WINDOW = 0x3
TCP_INFO = 0x9
TCP_MAXSEG = 0x2 TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff TCP_MAXWIN = 0xffff
TCP_MAX_SACK = 0x3 TCP_MAX_SACK = 0x3
@ -1833,7 +1875,7 @@ var signalList = [...]struct {
{3, "SIGQUIT", "quit"}, {3, "SIGQUIT", "quit"},
{4, "SIGILL", "illegal instruction"}, {4, "SIGILL", "illegal instruction"},
{5, "SIGTRAP", "trace/BPT trap"}, {5, "SIGTRAP", "trace/BPT trap"},
{6, "SIGABRT", "abort trap"}, {6, "SIGIOT", "abort trap"},
{7, "SIGEMT", "EMT trap"}, {7, "SIGEMT", "EMT trap"},
{8, "SIGFPE", "floating point exception"}, {8, "SIGFPE", "floating point exception"},
{9, "SIGKILL", "killed"}, {9, "SIGKILL", "killed"},
@ -1860,4 +1902,5 @@ var signalList = [...]struct {
{30, "SIGUSR1", "user defined signal 1"}, {30, "SIGUSR1", "user defined signal 1"},
{31, "SIGUSR2", "user defined signal 2"}, {31, "SIGUSR2", "user defined signal 2"},
{32, "SIGTHR", "thread AST"}, {32, "SIGTHR", "thread AST"},
{81920, "SIGSTKSZ", "unknown signal"},
} }

1905
vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go generated vendored Normal file

File diff suppressed because it is too large Load diff

1904
vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -15,12 +15,12 @@ type PtraceRegsArm struct {
// PtraceGetRegsArm fetches the registers used by arm binaries. // PtraceGetRegsArm fetches the registers used by arm binaries.
func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
} }
// PtraceSetRegsArm sets the registers used by arm binaries. // PtraceSetRegsArm sets the registers used by arm binaries.
func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
} }
// PtraceRegsArm64 is the registers used by arm64 binaries. // PtraceRegsArm64 is the registers used by arm64 binaries.
@ -33,10 +33,10 @@ type PtraceRegsArm64 struct {
// PtraceGetRegsArm64 fetches the registers used by arm64 binaries. // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
} }
// PtraceSetRegsArm64 sets the registers used by arm64 binaries. // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
} }

View file

@ -7,11 +7,11 @@ import "unsafe"
// PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
} }
// PtraceSetRegSetArm64 sets the registers used by arm64 binaries. // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
} }

Some files were not shown because too many files have changed in this diff Show more