Update dependencies
This commit is contained in:
parent
4a1131b7c8
commit
9400460704
16
go.mod
16
go.mod
@ -3,14 +3,14 @@ module github.com/datarhei/core/v16
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/99designs/gqlgen v0.17.10
|
||||
github.com/99designs/gqlgen v0.17.12
|
||||
github.com/atrox/haikunatorgo/v2 v2.0.1
|
||||
github.com/datarhei/gosrt v0.1.1
|
||||
github.com/datarhei/joy4 v0.0.0-20210125162555-2102a8289cce
|
||||
github.com/go-openapi/spec v0.20.6 // indirect
|
||||
github.com/go-openapi/swag v0.21.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.11.0
|
||||
github.com/golang-jwt/jwt/v4 v4.4.1
|
||||
github.com/golang-jwt/jwt/v4 v4.4.2
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/iancoleman/orderedmap v0.2.0 // indirect
|
||||
github.com/invopop/jsonschema v0.4.0
|
||||
@ -24,18 +24,18 @@ require (
|
||||
github.com/prep/average v0.0.0-20200506183628-d26c465f48c3
|
||||
github.com/prometheus/client_golang v1.12.2
|
||||
github.com/prometheus/common v0.35.0 // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.22.5
|
||||
github.com/stretchr/testify v1.7.2
|
||||
github.com/shirou/gopsutil/v3 v3.22.6
|
||||
github.com/stretchr/testify v1.7.5
|
||||
github.com/swaggo/echo-swagger v1.3.3
|
||||
github.com/swaggo/swag v1.8.3
|
||||
github.com/tklauser/numcpus v0.5.0 // indirect
|
||||
github.com/vektah/gqlparser/v2 v2.4.5
|
||||
github.com/vektah/gqlparser/v2 v2.4.6
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
|
||||
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
|
||||
golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 // indirect
|
||||
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d // indirect
|
||||
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
|
||||
golang.org/x/tools v0.1.11 // indirect
|
||||
)
|
||||
|
||||
31
go.sum
31
go.sum
@ -31,8 +31,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
|
||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/99designs/gqlgen v0.17.10 h1:+JtGPZ6jqL0IcmLopq4iaEbh5Ggye+NiutU57w82xvk=
|
||||
github.com/99designs/gqlgen v0.17.10/go.mod h1:tjgUrZGpynt+w38zmgTn5QGgd3EUhkHa4VRcX6/AyGo=
|
||||
github.com/99designs/gqlgen v0.17.12 h1:lH/H5dTYCY5eLNRKXeq22l0wFMavpOnN6v9GAIw+fxY=
|
||||
github.com/99designs/gqlgen v0.17.12/go.mod h1:w1brbeOdqVyNJI553BGwtwdVcYu1LKeYE1opLWN9RgQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
@ -126,8 +126,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||
github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ=
|
||||
github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||
github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
|
||||
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
@ -312,8 +312,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/shirou/gopsutil/v3 v3.22.5 h1:atX36I/IXgFiB81687vSiBI5zrMsxcIBkP9cQMJQoJA=
|
||||
github.com/shirou/gopsutil/v3 v3.22.5/go.mod h1:so9G9VzeHt/hsd0YwqprnjHnfARAUktauykSbr+y2gA=
|
||||
github.com/shirou/gopsutil/v3 v3.22.6 h1:FnHOFOh+cYAM0C30P+zysPISzlknLC5Z1G4EAElznfQ=
|
||||
github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
@ -322,6 +322,7 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
@ -329,8 +330,9 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.7.5 h1:s5PTfem8p8EbKQOctVV53k6jCJt3UX4IEJzwh+C324Q=
|
||||
github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/swaggo/echo-swagger v1.3.3 h1:Fx8kQ8IcIIEL3ZE20wzvcT8gFnPo/4U+fsnS3I1wvCw=
|
||||
github.com/swaggo/echo-swagger v1.3.3/go.mod h1:vbKcEBeJgOexLuPcsdZhrRAV508fsE79xaKIqmvse98=
|
||||
github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe h1:K8pHPVoTgxFJt1lXuIzzOX7zZhZFldJQK/CgKx9BFIc=
|
||||
@ -350,8 +352,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
|
||||
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/vektah/gqlparser/v2 v2.4.5 h1:C02NsyEsL4TXJB7ndonqTfuQOL4XPIu0aAWugdmTgmc=
|
||||
github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
github.com/vektah/gqlparser/v2 v2.4.6 h1:Yjzp66g6oVq93Jihbi0qhGnf/6zIWjcm8H6gA27zstE=
|
||||
github.com/vektah/gqlparser/v2 v2.4.6/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
@ -383,8 +385,9 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@ -457,8 +460,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc=
|
||||
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 h1:8NSylCMxLW4JvserAndSgFL7aPli6A68yf0bYFTcWCM=
|
||||
golang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@ -527,8 +530,8 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d h1:/m5NbqQelATgoSPVC2Z23sR4kVNokFwDDyWh/3rGY+I=
|
||||
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/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-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
||||
1433
vendor/github.com/99designs/gqlgen/CHANGELOG.md
generated
vendored
1433
vendor/github.com/99designs/gqlgen/CHANGELOG.md
generated
vendored
File diff suppressed because it is too large
Load Diff
7
vendor/github.com/99designs/gqlgen/codegen/config/config.go
generated
vendored
7
vendor/github.com/99designs/gqlgen/codegen/config/config.go
generated
vendored
@ -2,7 +2,6 @@ package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
@ -61,7 +60,7 @@ func LoadDefaultConfig() (*Config, error) {
|
||||
filename = filepath.ToSlash(filename)
|
||||
var err error
|
||||
var schemaRaw []byte
|
||||
schemaRaw, err = ioutil.ReadFile(filename)
|
||||
schemaRaw, err = os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to open schema: %w", err)
|
||||
}
|
||||
@ -98,7 +97,7 @@ var path2regex = strings.NewReplacer(
|
||||
func LoadConfig(filename string) (*Config, error) {
|
||||
config := DefaultConfig()
|
||||
|
||||
b, err := ioutil.ReadFile(filename)
|
||||
b, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read config: %w", err)
|
||||
}
|
||||
@ -177,7 +176,7 @@ func CompleteConfig(config *Config) error {
|
||||
filename = filepath.ToSlash(filename)
|
||||
var err error
|
||||
var schemaRaw []byte
|
||||
schemaRaw, err = ioutil.ReadFile(filename)
|
||||
schemaRaw, err = os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to open schema: %w", err)
|
||||
}
|
||||
|
||||
7
vendor/github.com/99designs/gqlgen/codegen/field.go
generated
vendored
7
vendor/github.com/99designs/gqlgen/codegen/field.go
generated
vendored
@ -12,6 +12,8 @@ import (
|
||||
"github.com/99designs/gqlgen/codegen/config"
|
||||
"github.com/99designs/gqlgen/codegen/templates"
|
||||
"github.com/vektah/gqlparser/v2/ast"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
type Field struct {
|
||||
@ -469,10 +471,11 @@ func (f *Field) GoNameUnexported() string {
|
||||
}
|
||||
|
||||
func (f *Field) ShortInvocation() string {
|
||||
caser := cases.Title(language.English, cases.NoLower)
|
||||
if f.Object.Kind == ast.InputObject {
|
||||
return fmt.Sprintf("%s().%s(ctx, &it, data)", strings.Title(f.Object.Definition.Name), f.GoFieldName)
|
||||
return fmt.Sprintf("%s().%s(ctx, &it, data)", caser.String(f.Object.Definition.Name), f.GoFieldName)
|
||||
}
|
||||
return fmt.Sprintf("%s().%s(%s)", strings.Title(f.Object.Definition.Name), f.GoFieldName, f.CallArgs())
|
||||
return fmt.Sprintf("%s().%s(%s)", caser.String(f.Object.Definition.Name), f.GoFieldName, f.CallArgs())
|
||||
}
|
||||
|
||||
func (f *Field) ArgsFunc() string {
|
||||
|
||||
11
vendor/github.com/99designs/gqlgen/codegen/generate.go
generated
vendored
11
vendor/github.com/99designs/gqlgen/codegen/generate.go
generated
vendored
@ -1,9 +1,10 @@
|
||||
package codegen
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
@ -13,6 +14,9 @@ import (
|
||||
"github.com/vektah/gqlparser/v2/ast"
|
||||
)
|
||||
|
||||
//go:embed *.gotpl
|
||||
var codegenTemplates embed.FS
|
||||
|
||||
func GenerateCode(data *Data) error {
|
||||
if !data.Config.Exec.IsDefined() {
|
||||
return fmt.Errorf("missing exec config")
|
||||
@ -36,6 +40,7 @@ func generateSingleFile(data *Data) error {
|
||||
RegionTags: true,
|
||||
GeneratedHeader: true,
|
||||
Packages: data.Config.Packages,
|
||||
TemplateFS: codegenTemplates,
|
||||
})
|
||||
}
|
||||
|
||||
@ -82,6 +87,7 @@ func generatePerSchema(data *Data) error {
|
||||
RegionTags: true,
|
||||
GeneratedHeader: true,
|
||||
Packages: data.Config.Packages,
|
||||
TemplateFS: codegenTemplates,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@ -131,7 +137,7 @@ func generateRootFile(data *Data) error {
|
||||
_, thisFile, _, _ := runtime.Caller(0)
|
||||
rootDir := filepath.Dir(thisFile)
|
||||
templatePath := filepath.Join(rootDir, "root_.gotpl")
|
||||
templateBytes, err := ioutil.ReadFile(templatePath)
|
||||
templateBytes, err := os.ReadFile(templatePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -145,6 +151,7 @@ func generateRootFile(data *Data) error {
|
||||
RegionTags: false,
|
||||
GeneratedHeader: true,
|
||||
Packages: data.Config.Packages,
|
||||
TemplateFS: codegenTemplates,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
7
vendor/github.com/99designs/gqlgen/codegen/input.gotpl
generated
vendored
7
vendor/github.com/99designs/gqlgen/codegen/input.gotpl
generated
vendored
@ -14,7 +14,12 @@
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
|
||||
for k, v := range asMap {
|
||||
fieldsInOrder := [...]string{ {{ range .Fields }}{{ quote .Name }},{{ end }} }
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
switch k {
|
||||
{{- range $field := .Fields }}
|
||||
case {{$field.Name|quote}}:
|
||||
|
||||
6
vendor/github.com/99designs/gqlgen/codegen/object.go
generated
vendored
6
vendor/github.com/99designs/gqlgen/codegen/object.go
generated
vendored
@ -9,6 +9,8 @@ import (
|
||||
|
||||
"github.com/99designs/gqlgen/codegen/config"
|
||||
"github.com/vektah/gqlparser/v2/ast"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
type GoFieldType int
|
||||
@ -38,7 +40,7 @@ func (b *builder) buildObject(typ *ast.Definition) (*Object, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s: %w", typ.Name, err)
|
||||
}
|
||||
|
||||
caser := cases.Title(language.English, cases.NoLower)
|
||||
obj := &Object{
|
||||
Definition: typ,
|
||||
Root: b.Schema.Query == typ || b.Schema.Mutation == typ || b.Schema.Subscription == typ,
|
||||
@ -46,7 +48,7 @@ func (b *builder) buildObject(typ *ast.Definition) (*Object, error) {
|
||||
Stream: typ == b.Schema.Subscription,
|
||||
Directives: dirs,
|
||||
ResolverInterface: types.NewNamed(
|
||||
types.NewTypeName(0, b.Config.Exec.Pkg(), strings.Title(typ.Name)+"Resolver", nil),
|
||||
types.NewTypeName(0, b.Config.Exec.Pkg(), caser.String(typ.Name)+"Resolver", nil),
|
||||
nil,
|
||||
nil,
|
||||
),
|
||||
|
||||
5
vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
generated
vendored
5
vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
generated
vendored
@ -35,6 +35,11 @@ type ResolverRoot interface {
|
||||
{{ucFirst $object.Name}}() {{ucFirst $object.Name}}Resolver
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- range $object := .Inputs -}}
|
||||
{{ if $object.HasResolvers -}}
|
||||
{{ucFirst $object.Name}}() {{ucFirst $object.Name}}Resolver
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
}
|
||||
|
||||
type DirectiveRoot struct {
|
||||
|
||||
96
vendor/github.com/99designs/gqlgen/codegen/templates/templates.go
generated
vendored
96
vendor/github.com/99designs/gqlgen/codegen/templates/templates.go
generated
vendored
@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"go/types"
|
||||
"io/ioutil"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
@ -36,6 +36,11 @@ type Options struct {
|
||||
// the plugin processor will look for .gotpl files
|
||||
// in the same directory of where you wrote the plugin.
|
||||
Template string
|
||||
|
||||
// Use the go:embed API to collect all the template files you want to pass into Render
|
||||
// this is an alternative to passing the Template option
|
||||
TemplateFS fs.FS
|
||||
|
||||
// Filename is the name of the file that will be
|
||||
// written to the system disk once the template is rendered.
|
||||
Filename string
|
||||
@ -63,55 +68,27 @@ func Render(cfg Options) error {
|
||||
}
|
||||
CurrentImports = &Imports{packages: cfg.Packages, destDir: filepath.Dir(cfg.Filename)}
|
||||
|
||||
// load path relative to calling source file
|
||||
_, callerFile, _, _ := runtime.Caller(1)
|
||||
rootDir := filepath.Dir(callerFile)
|
||||
|
||||
funcs := Funcs()
|
||||
for n, f := range cfg.Funcs {
|
||||
funcs[n] = f
|
||||
}
|
||||
|
||||
t := template.New("").Funcs(funcs)
|
||||
t, err := parseTemplates(cfg, t)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var roots []string
|
||||
if cfg.Template != "" {
|
||||
var err error
|
||||
t, err = t.New("template.gotpl").Parse(cfg.Template)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error with provided template: %w", err)
|
||||
roots := make([]string, 0, len(t.Templates()))
|
||||
for _, template := range t.Templates() {
|
||||
// templates that end with _.gotpl are special files we don't want to include
|
||||
if strings.HasSuffix(template.Name(), "_.gotpl") ||
|
||||
// filter out templates added with {{ template xxx }} syntax inside the template file
|
||||
!strings.HasSuffix(template.Name(), ".gotpl") {
|
||||
continue
|
||||
}
|
||||
roots = append(roots, "template.gotpl")
|
||||
} else {
|
||||
// load all the templates in the directory
|
||||
err := filepath.Walk(rootDir, func(path string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
name := filepath.ToSlash(strings.TrimPrefix(path, rootDir+string(os.PathSeparator)))
|
||||
if !strings.HasSuffix(info.Name(), ".gotpl") {
|
||||
return nil
|
||||
}
|
||||
// omit any templates with "_" at the end of their name, which are meant for specific contexts only
|
||||
if strings.HasSuffix(info.Name(), "_.gotpl") {
|
||||
return nil
|
||||
}
|
||||
b, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t, err = t.New(name).Parse(string(b))
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: %w", cfg.Filename, err)
|
||||
}
|
||||
|
||||
roots = append(roots, name)
|
||||
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("locating templates: %w", err)
|
||||
}
|
||||
roots = append(roots, template.Name())
|
||||
}
|
||||
|
||||
// then execute all the important looking ones in order, adding them to the same file
|
||||
@ -125,6 +102,7 @@ func Render(cfg Options) error {
|
||||
}
|
||||
return roots[i] < roots[j]
|
||||
})
|
||||
|
||||
var buf bytes.Buffer
|
||||
for _, root := range roots {
|
||||
if cfg.RegionTags {
|
||||
@ -156,7 +134,7 @@ func Render(cfg Options) error {
|
||||
result.WriteString("import (\n")
|
||||
result.WriteString(CurrentImports.String())
|
||||
result.WriteString(")\n")
|
||||
_, err := buf.WriteTo(&result)
|
||||
_, err = buf.WriteTo(&result)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -171,6 +149,34 @@ func Render(cfg Options) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func parseTemplates(cfg Options, t *template.Template) (*template.Template, error) {
|
||||
if cfg.Template != "" {
|
||||
var err error
|
||||
t, err = t.New("template.gotpl").Parse(cfg.Template)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error with provided template: %w", err)
|
||||
}
|
||||
return t, nil
|
||||
}
|
||||
|
||||
var fileSystem fs.FS
|
||||
if cfg.TemplateFS != nil {
|
||||
fileSystem = cfg.TemplateFS
|
||||
} else {
|
||||
// load path relative to calling source file
|
||||
_, callerFile, _, _ := runtime.Caller(1)
|
||||
rootDir := filepath.Dir(callerFile)
|
||||
fileSystem = os.DirFS(rootDir)
|
||||
}
|
||||
|
||||
t, err := t.ParseFS(fileSystem, "*.gotpl")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("locating templates: %w", err)
|
||||
}
|
||||
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func center(width int, pad string, s string) string {
|
||||
if len(s)+2 > width {
|
||||
return s
|
||||
@ -576,7 +582,7 @@ func resolveName(name string, skip int) string {
|
||||
func render(filename string, tpldata interface{}) (*bytes.Buffer, error) {
|
||||
t := template.New("").Funcs(Funcs())
|
||||
|
||||
b, err := ioutil.ReadFile(filename)
|
||||
b, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -602,7 +608,7 @@ func write(filename string, b []byte, packages *code.Packages) error {
|
||||
formatted = b
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(filename, formatted, 0o644)
|
||||
err = os.WriteFile(filename, formatted, 0o644)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to write %s: %w", filename, err)
|
||||
}
|
||||
|
||||
1
vendor/github.com/99designs/gqlgen/codegen/templates/test.gotpl
generated
vendored
Normal file
1
vendor/github.com/99designs/gqlgen/codegen/templates/test.gotpl
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
this is my test package
|
||||
1
vendor/github.com/99designs/gqlgen/codegen/templates/test_.gotpl
generated
vendored
Normal file
1
vendor/github.com/99designs/gqlgen/codegen/templates/test_.gotpl
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
this will not be included
|
||||
3
vendor/github.com/99designs/gqlgen/go.mod
generated
vendored
3
vendor/github.com/99designs/gqlgen/go.mod
generated
vendored
@ -13,7 +13,8 @@ require (
|
||||
github.com/mitchellh/mapstructure v1.3.1
|
||||
github.com/stretchr/testify v1.7.1
|
||||
github.com/urfave/cli/v2 v2.8.1
|
||||
github.com/vektah/gqlparser/v2 v2.4.5
|
||||
github.com/vektah/gqlparser/v2 v2.4.6
|
||||
golang.org/x/text v0.3.7
|
||||
golang.org/x/tools v0.1.10
|
||||
google.golang.org/protobuf v1.28.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
|
||||
5
vendor/github.com/99designs/gqlgen/go.sum
generated
vendored
5
vendor/github.com/99designs/gqlgen/go.sum
generated
vendored
@ -49,8 +49,8 @@ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMT
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4=
|
||||
github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY=
|
||||
github.com/vektah/gqlparser/v2 v2.4.5 h1:C02NsyEsL4TXJB7ndonqTfuQOL4XPIu0aAWugdmTgmc=
|
||||
github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
github.com/vektah/gqlparser/v2 v2.4.6 h1:Yjzp66g6oVq93Jihbi0qhGnf/6zIWjcm8H6gA27zstE=
|
||||
github.com/vektah/gqlparser/v2 v2.4.6/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||
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/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
@ -79,6 +79,7 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
|
||||
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.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
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=
|
||||
|
||||
7
vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
generated
vendored
7
vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
generated
vendored
@ -3,7 +3,6 @@ package transport
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mime"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -124,7 +123,7 @@ func (f MultipartForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.G
|
||||
|
||||
var upload graphql.Upload
|
||||
if r.ContentLength < f.maxMemory() {
|
||||
fileBytes, err := ioutil.ReadAll(part)
|
||||
fileBytes, err := io.ReadAll(part)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusUnprocessableEntity)
|
||||
writeJsonErrorf(w, "failed to read file for key %s", key)
|
||||
@ -132,7 +131,7 @@ func (f MultipartForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.G
|
||||
}
|
||||
for _, path := range paths {
|
||||
upload = graphql.Upload{
|
||||
File: &bytesReader{s: &fileBytes, i: 0, prevRune: -1},
|
||||
File: &bytesReader{s: &fileBytes, i: 0},
|
||||
Size: int64(len(fileBytes)),
|
||||
Filename: filename,
|
||||
ContentType: contentType,
|
||||
@ -145,7 +144,7 @@ func (f MultipartForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.G
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tmpFile, err := ioutil.TempFile(os.TempDir(), "gqlgen-")
|
||||
tmpFile, err := os.CreateTemp(os.TempDir(), "gqlgen-")
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusUnprocessableEntity)
|
||||
writeJsonErrorf(w, "failed to create temp file for key %s", key)
|
||||
|
||||
23
vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
generated
vendored
23
vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
generated
vendored
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/99designs/gqlgen/graphql"
|
||||
@ -27,16 +28,22 @@ func (h GET) Supports(r *http.Request) bool {
|
||||
}
|
||||
|
||||
func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
|
||||
query, err := url.ParseQuery(r.URL.RawQuery)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
writeJsonError(w, err.Error())
|
||||
return
|
||||
}
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
raw := &graphql.RawParams{
|
||||
Query: r.URL.Query().Get("query"),
|
||||
OperationName: r.URL.Query().Get("operationName"),
|
||||
Query: query.Get("query"),
|
||||
OperationName: query.Get("operationName"),
|
||||
Headers: r.Header,
|
||||
}
|
||||
raw.ReadTime.Start = graphql.Now()
|
||||
|
||||
if variables := r.URL.Query().Get("variables"); variables != "" {
|
||||
if variables := query.Get("variables"); variables != "" {
|
||||
if err := jsonDecode(strings.NewReader(variables), &raw.Variables); err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
writeJsonError(w, "variables could not be decoded")
|
||||
@ -44,7 +51,7 @@ func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecut
|
||||
}
|
||||
}
|
||||
|
||||
if extensions := r.URL.Query().Get("extensions"); extensions != "" {
|
||||
if extensions := query.Get("extensions"); extensions != "" {
|
||||
if err := jsonDecode(strings.NewReader(extensions), &raw.Extensions); err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
writeJsonError(w, "extensions could not be decoded")
|
||||
@ -54,10 +61,10 @@ func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecut
|
||||
|
||||
raw.ReadTime.End = graphql.Now()
|
||||
|
||||
rc, err := exec.CreateOperationContext(r.Context(), raw)
|
||||
if err != nil {
|
||||
w.WriteHeader(statusFor(err))
|
||||
resp := exec.DispatchError(graphql.WithOperationContext(r.Context(), rc), err)
|
||||
rc, gqlError := exec.CreateOperationContext(r.Context(), raw)
|
||||
if gqlError != nil {
|
||||
w.WriteHeader(statusFor(gqlError))
|
||||
resp := exec.DispatchError(graphql.WithOperationContext(r.Context(), rc), gqlError)
|
||||
writeJson(w, resp)
|
||||
return
|
||||
}
|
||||
|
||||
28
vendor/github.com/99designs/gqlgen/graphql/handler/transport/reader.go
generated
vendored
28
vendor/github.com/99designs/gqlgen/graphql/handler/transport/reader.go
generated
vendored
@ -6,9 +6,8 @@ import (
|
||||
)
|
||||
|
||||
type bytesReader struct {
|
||||
s *[]byte
|
||||
i int64 // current reading index
|
||||
prevRune int // index of previous rune; or < 0
|
||||
s *[]byte
|
||||
i int64 // current reading index
|
||||
}
|
||||
|
||||
func (r *bytesReader) Read(b []byte) (n int, err error) {
|
||||
@ -18,8 +17,29 @@ func (r *bytesReader) Read(b []byte) (n int, err error) {
|
||||
if r.i >= int64(len(*r.s)) {
|
||||
return 0, io.EOF
|
||||
}
|
||||
r.prevRune = -1
|
||||
n = copy(b, (*r.s)[r.i:])
|
||||
r.i += int64(n)
|
||||
return
|
||||
}
|
||||
|
||||
func (r *bytesReader) Seek(offset int64, whence int) (int64, error) {
|
||||
if r.s == nil {
|
||||
return 0, errors.New("byte slice pointer is nil")
|
||||
}
|
||||
var abs int64
|
||||
switch whence {
|
||||
case io.SeekStart:
|
||||
abs = offset
|
||||
case io.SeekCurrent:
|
||||
abs = r.i + offset
|
||||
case io.SeekEnd:
|
||||
abs = int64(len(*r.s)) + offset
|
||||
default:
|
||||
return 0, errors.New("invalid whence")
|
||||
}
|
||||
if abs < 0 {
|
||||
return 0, errors.New("negative position")
|
||||
}
|
||||
r.i = abs
|
||||
return abs, nil
|
||||
}
|
||||
|
||||
2
vendor/github.com/99designs/gqlgen/graphql/upload.go
generated
vendored
2
vendor/github.com/99designs/gqlgen/graphql/upload.go
generated
vendored
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type Upload struct {
|
||||
File io.Reader
|
||||
File io.ReadSeeker
|
||||
Filename string
|
||||
Size int64
|
||||
ContentType string
|
||||
|
||||
2
vendor/github.com/99designs/gqlgen/graphql/version.go
generated
vendored
2
vendor/github.com/99designs/gqlgen/graphql/version.go
generated
vendored
@ -1,3 +1,3 @@
|
||||
package graphql
|
||||
|
||||
const Version = "v0.17.10"
|
||||
const Version = "v0.17.12"
|
||||
|
||||
6
vendor/github.com/99designs/gqlgen/internal/code/imports.go
generated
vendored
6
vendor/github.com/99designs/gqlgen/internal/code/imports.go
generated
vendored
@ -4,7 +4,7 @@ import (
|
||||
"go/build"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
@ -26,7 +26,7 @@ func NameForDir(dir string) string {
|
||||
if err != nil {
|
||||
return SanitizePackageName(filepath.Base(dir))
|
||||
}
|
||||
files, err := ioutil.ReadDir(dir)
|
||||
files, err := os.ReadDir(dir)
|
||||
if err != nil {
|
||||
return SanitizePackageName(filepath.Base(dir))
|
||||
}
|
||||
@ -73,7 +73,7 @@ func goModuleRoot(dir string) (string, bool) {
|
||||
break
|
||||
}
|
||||
|
||||
if content, err := ioutil.ReadFile(filepath.Join(modDir, "go.mod")); err == nil {
|
||||
if content, err := os.ReadFile(filepath.Join(modDir, "go.mod")); err == nil {
|
||||
moduleName := string(modregex.FindSubmatch(content)[1])
|
||||
result = goModuleSearchResult{
|
||||
path: moduleName,
|
||||
|
||||
35
vendor/github.com/99designs/gqlgen/internal/rewrite/rewriter.go
generated
vendored
35
vendor/github.com/99designs/gqlgen/internal/rewrite/rewriter.go
generated
vendored
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/token"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -56,7 +56,7 @@ func (r *Rewriter) getSource(start, end token.Pos) string {
|
||||
|
||||
func (r *Rewriter) getFile(filename string) string {
|
||||
if _, ok := r.files[filename]; !ok {
|
||||
b, err := ioutil.ReadFile(filename)
|
||||
b, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("unable to load file, already exists: %w", err))
|
||||
}
|
||||
@ -68,6 +68,37 @@ func (r *Rewriter) getFile(filename string) string {
|
||||
return r.files[filename]
|
||||
}
|
||||
|
||||
func (r *Rewriter) GetMethodComment(structname string, methodname string) string {
|
||||
for _, f := range r.pkg.Syntax {
|
||||
for _, d := range f.Decls {
|
||||
d, isFunc := d.(*ast.FuncDecl)
|
||||
if !isFunc {
|
||||
continue
|
||||
}
|
||||
if d.Name.Name != methodname {
|
||||
continue
|
||||
}
|
||||
if d.Recv == nil || len(d.Recv.List) == 0 {
|
||||
continue
|
||||
}
|
||||
recv := d.Recv.List[0].Type
|
||||
if star, isStar := recv.(*ast.StarExpr); isStar {
|
||||
recv = star.X
|
||||
}
|
||||
ident, ok := recv.(*ast.Ident)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
if ident.Name != structname {
|
||||
continue
|
||||
}
|
||||
return d.Doc.Text()
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
func (r *Rewriter) GetMethodBody(structname string, methodname string) string {
|
||||
for _, f := range r.pkg.Syntax {
|
||||
for _, d := range f.Decls {
|
||||
|
||||
6
vendor/github.com/99designs/gqlgen/main.go
generated
vendored
6
vendor/github.com/99designs/gqlgen/main.go
generated
vendored
@ -6,8 +6,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
"io/fs"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -43,7 +43,7 @@ func initFile(filename, contents string) error {
|
||||
if err := os.MkdirAll(filepath.Dir(filename), 0o755); err != nil {
|
||||
return fmt.Errorf("unable to create directory for file '%s': %w\n", filename, err)
|
||||
}
|
||||
if err := ioutil.WriteFile(filename, []byte(contents), 0o644); err != nil {
|
||||
if err := os.WriteFile(filename, []byte(contents), 0o644); err != nil {
|
||||
return fmt.Errorf("unable to write file '%s': %w\n", filename, err)
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ func main() {
|
||||
if context.Bool("verbose") {
|
||||
log.SetFlags(0)
|
||||
} else {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
log.SetOutput(io.Discard)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
7
vendor/github.com/99designs/gqlgen/plugin/federation/federation.go
generated
vendored
7
vendor/github.com/99designs/gqlgen/plugin/federation/federation.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
package federation
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
@ -14,6 +15,9 @@ import (
|
||||
"github.com/99designs/gqlgen/plugin/federation/fieldset"
|
||||
)
|
||||
|
||||
//go:embed federation.gotpl
|
||||
var federationTemplate string
|
||||
|
||||
type federation struct {
|
||||
Entities []*Entity
|
||||
Version int
|
||||
@ -85,7 +89,7 @@ func (f *federation) InjectSourceEarly() *ast.Source {
|
||||
input := `
|
||||
scalar _Any
|
||||
scalar _FieldSet
|
||||
|
||||
|
||||
directive @external on FIELD_DEFINITION
|
||||
directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
|
||||
directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
|
||||
@ -274,6 +278,7 @@ func (f *federation) GenerateCode(data *codegen.Data) error {
|
||||
Data: f,
|
||||
GeneratedHeader: true,
|
||||
Packages: data.Config.Packages,
|
||||
Template: federationTemplate,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
5
vendor/github.com/99designs/gqlgen/plugin/modelgen/models.go
generated
vendored
5
vendor/github.com/99designs/gqlgen/plugin/modelgen/models.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
package modelgen
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"go/types"
|
||||
"sort"
|
||||
@ -12,6 +13,9 @@ import (
|
||||
"github.com/vektah/gqlparser/v2/ast"
|
||||
)
|
||||
|
||||
//go:embed models.gotpl
|
||||
var modelTemplate string
|
||||
|
||||
type BuildMutateHook = func(b *ModelBuild) *ModelBuild
|
||||
|
||||
type FieldMutateHook = func(td *ast.Definition, fd *ast.FieldDefinition, f *Field) (*Field, error)
|
||||
@ -269,6 +273,7 @@ func (m *Plugin) MutateConfig(cfg *config.Config) error {
|
||||
Data: b,
|
||||
GeneratedHeader: true,
|
||||
Packages: cfg.Packages,
|
||||
Template: modelTemplate,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
21
vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.go
generated
vendored
21
vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.go
generated
vendored
@ -1,7 +1,9 @@
|
||||
package resolvergen
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -12,8 +14,13 @@ import (
|
||||
"github.com/99designs/gqlgen/codegen/templates"
|
||||
"github.com/99designs/gqlgen/internal/rewrite"
|
||||
"github.com/99designs/gqlgen/plugin"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
//go:embed resolver.gotpl
|
||||
var resolverTemplate string
|
||||
|
||||
func New() plugin.Plugin {
|
||||
return &Plugin{}
|
||||
}
|
||||
@ -58,7 +65,7 @@ func (m *Plugin) generateSingleFile(data *codegen.Data) error {
|
||||
continue
|
||||
}
|
||||
|
||||
resolver := Resolver{o, f, `panic("not implemented")`}
|
||||
resolver := Resolver{o, f, "// foo", `panic("not implemented")`}
|
||||
file.Resolvers = append(file.Resolvers, &resolver)
|
||||
}
|
||||
}
|
||||
@ -76,6 +83,7 @@ func (m *Plugin) generateSingleFile(data *codegen.Data) error {
|
||||
Filename: data.Config.Resolver.Filename,
|
||||
Data: resolverBuild,
|
||||
Packages: data.Config.Packages,
|
||||
Template: resolverTemplate,
|
||||
})
|
||||
}
|
||||
|
||||
@ -98,8 +106,9 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error {
|
||||
files[fn] = &File{}
|
||||
}
|
||||
|
||||
caser := cases.Title(language.English, cases.NoLower)
|
||||
rewriter.MarkStructCopied(templates.LcFirst(o.Name) + templates.UcFirst(data.Config.Resolver.Type))
|
||||
rewriter.GetMethodBody(data.Config.Resolver.Type, strings.Title(o.Name))
|
||||
rewriter.GetMethodBody(data.Config.Resolver.Type, caser.String(o.Name))
|
||||
files[fn].Objects = append(files[fn].Objects, o)
|
||||
}
|
||||
for _, f := range o.Fields {
|
||||
@ -109,11 +118,15 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error {
|
||||
|
||||
structName := templates.LcFirst(o.Name) + templates.UcFirst(data.Config.Resolver.Type)
|
||||
implementation := strings.TrimSpace(rewriter.GetMethodBody(structName, f.GoFieldName))
|
||||
comment := strings.TrimSpace(strings.TrimLeft(rewriter.GetMethodComment(structName, f.GoFieldName), `\`))
|
||||
if implementation == "" {
|
||||
implementation = `panic(fmt.Errorf("not implemented"))`
|
||||
}
|
||||
if comment == "" {
|
||||
comment = fmt.Sprintf("%v is the resolver for the %v field.", f.GoFieldName, f.Name)
|
||||
}
|
||||
|
||||
resolver := Resolver{o, f, implementation}
|
||||
resolver := Resolver{o, f, comment, implementation}
|
||||
fn := gqlToResolverName(data.Config.Resolver.Dir(), f.Position.Src.Name, data.Config.Resolver.FilenameTemplate)
|
||||
if files[fn] == nil {
|
||||
files[fn] = &File{}
|
||||
@ -143,6 +156,7 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error {
|
||||
Filename: filename,
|
||||
Data: resolverBuild,
|
||||
Packages: data.Config.Packages,
|
||||
Template: resolverTemplate,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@ -198,6 +212,7 @@ func (f *File) Imports() string {
|
||||
type Resolver struct {
|
||||
Object *codegen.Object
|
||||
Field *codegen.Field
|
||||
Comment string
|
||||
Implementation string
|
||||
}
|
||||
|
||||
|
||||
1
vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.gotpl
generated
vendored
1
vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.gotpl
generated
vendored
@ -19,6 +19,7 @@
|
||||
{{ end }}
|
||||
|
||||
{{ range $resolver := .Resolvers -}}
|
||||
// {{ $resolver.Comment }}
|
||||
func (r *{{lcFirst $resolver.Object.Name}}{{ucFirst $.ResolverType}}) {{$resolver.Field.GoFieldName}}{{ $resolver.Field.ShortResolverDeclaration }} {
|
||||
{{ $resolver.Implementation }}
|
||||
}
|
||||
|
||||
5
vendor/github.com/99designs/gqlgen/plugin/servergen/server.go
generated
vendored
5
vendor/github.com/99designs/gqlgen/plugin/servergen/server.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
package servergen
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"errors"
|
||||
"io/fs"
|
||||
"log"
|
||||
@ -11,6 +12,9 @@ import (
|
||||
"github.com/99designs/gqlgen/plugin"
|
||||
)
|
||||
|
||||
//go:embed server.gotpl
|
||||
var serverTemplate string
|
||||
|
||||
func New(filename string) plugin.Plugin {
|
||||
return &Plugin{filename}
|
||||
}
|
||||
@ -37,6 +41,7 @@ func (m *Plugin) GenerateCode(data *codegen.Data) error {
|
||||
Filename: m.filename,
|
||||
Data: serverBuild,
|
||||
Packages: data.Config.Packages,
|
||||
Template: serverTemplate,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
29
vendor/github.com/golang-jwt/jwt/v4/README.md
generated
vendored
29
vendor/github.com/golang-jwt/jwt/v4/README.md
generated
vendored
@ -36,9 +36,23 @@ The part in the middle is the interesting bit. It's called the Claims and conta
|
||||
|
||||
This library supports the parsing and verification as well as the generation and signing of JWTs. Current supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own.
|
||||
|
||||
## Installation Guidelines
|
||||
|
||||
1. To install the jwt package, you first need to have [Go](https://go.dev/doc/install) installed, then you can use the command below to add `jwt-go` as a dependency in your Go program.
|
||||
|
||||
```sh
|
||||
go get -u github.com/golang-jwt/jwt/v4
|
||||
```
|
||||
|
||||
2. Import it in your code:
|
||||
|
||||
```go
|
||||
import "github.com/golang-jwt/jwt/v4"
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
See [the project documentation](https://pkg.go.dev/github.com/golang-jwt/jwt) for examples of usage:
|
||||
See [the project documentation](https://pkg.go.dev/github.com/golang-jwt/jwt/v4) for examples of usage:
|
||||
|
||||
* [Simple example of parsing and validating a token](https://pkg.go.dev/github.com/golang-jwt/jwt#example-Parse-Hmac)
|
||||
* [Simple example of building and signing a token](https://pkg.go.dev/github.com/golang-jwt/jwt#example-New-Hmac)
|
||||
@ -46,14 +60,15 @@ See [the project documentation](https://pkg.go.dev/github.com/golang-jwt/jwt) fo
|
||||
|
||||
## Extensions
|
||||
|
||||
This library publishes all the necessary components for adding your own signing methods. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod`.
|
||||
This library publishes all the necessary components for adding your own signing methods or key functions. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod` or provide a `jwt.Keyfunc`.
|
||||
|
||||
A common use case would be integrating with different 3rd party signature providers, like key management services from various cloud providers or Hardware Security Modules (HSMs).
|
||||
A common use case would be integrating with different 3rd party signature providers, like key management services from various cloud providers or Hardware Security Modules (HSMs) or to implement additional standards.
|
||||
|
||||
| Extension | Purpose | Repo |
|
||||
|-----------|----------------------------------------------------------------------------------------------|--------------------------------------------|
|
||||
| GCP | Integrates with multiple Google Cloud Platform signing tools (AppEngine, IAM API, Cloud KMS) | https://github.com/someone1/gcp-jwt-go |
|
||||
| AWS | Integrates with AWS Key Management Service, KMS | https://github.com/matelang/jwt-go-aws-kms |
|
||||
| Extension | Purpose | Repo |
|
||||
| --------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
||||
| GCP | Integrates with multiple Google Cloud Platform signing tools (AppEngine, IAM API, Cloud KMS) | https://github.com/someone1/gcp-jwt-go |
|
||||
| AWS | Integrates with AWS Key Management Service, KMS | https://github.com/matelang/jwt-go-aws-kms |
|
||||
| JWKS | Provides support for JWKS ([RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517)) as a `jwt.Keyfunc` | https://github.com/MicahParks/keyfunc |
|
||||
|
||||
*Disclaimer*: Unless otherwise specified, these integrations are maintained by third parties and should not be considered as a primary offer by any of the mentioned cloud providers
|
||||
|
||||
|
||||
19
vendor/github.com/golang-jwt/jwt/v4/SECURITY.md
generated
vendored
Normal file
19
vendor/github.com/golang-jwt/jwt/v4/SECURITY.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
As of February 2022 (and until this document is updated), the latest version `v4` is supported.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you think you found a vulnerability, and even if you are not sure, please report it to jwt-go-security@googlegroups.com or one of the other [golang-jwt maintainers](https://github.com/orgs/golang-jwt/people). Please try be explicit, describe steps to reproduce the security issue with code example(s).
|
||||
|
||||
You will receive a response within a timely manner. If the issue is confirmed, we will do our best to release a patch as soon as possible given the complexity of the problem.
|
||||
|
||||
## Public Discussions
|
||||
|
||||
Please avoid publicly discussing a potential security vulnerability.
|
||||
|
||||
Let's take this offline and find a solution first, this limits the potential impact as much as possible.
|
||||
|
||||
We appreciate your help!
|
||||
1
vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go
generated
vendored
1
vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build go1.4
|
||||
// +build go1.4
|
||||
|
||||
package jwt
|
||||
|
||||
1
vendor/github.com/golang-jwt/jwt/v4/token.go
generated
vendored
1
vendor/github.com/golang-jwt/jwt/v4/token.go
generated
vendored
@ -7,7 +7,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
// DecodePaddingAllowed will switch the codec used for decoding JWTs respectively. Note that the JWS RFC7515
|
||||
// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations
|
||||
// of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global
|
||||
|
||||
18
vendor/github.com/golang-jwt/jwt/v4/types.go
generated
vendored
18
vendor/github.com/golang-jwt/jwt/v4/types.go
generated
vendored
@ -53,9 +53,23 @@ func (date NumericDate) MarshalJSON() (b []byte, err error) {
|
||||
if TimePrecision < time.Second {
|
||||
prec = int(math.Log10(float64(time.Second) / float64(TimePrecision)))
|
||||
}
|
||||
f := float64(date.Truncate(TimePrecision).UnixNano()) / float64(time.Second)
|
||||
truncatedDate := date.Truncate(TimePrecision)
|
||||
|
||||
return []byte(strconv.FormatFloat(f, 'f', prec, 64)), nil
|
||||
// For very large timestamps, UnixNano would overflow an int64, but this
|
||||
// function requires nanosecond level precision, so we have to use the
|
||||
// following technique to get round the issue:
|
||||
// 1. Take the normal unix timestamp to form the whole number part of the
|
||||
// output,
|
||||
// 2. Take the result of the Nanosecond function, which retuns the offset
|
||||
// within the second of the particular unix time instance, to form the
|
||||
// decimal part of the output
|
||||
// 3. Concatenate them to produce the final result
|
||||
seconds := strconv.FormatInt(truncatedDate.Unix(), 10)
|
||||
nanosecondsOffset := strconv.FormatFloat(float64(truncatedDate.Nanosecond())/float64(time.Second), 'f', prec, 64)
|
||||
|
||||
output := append([]byte(seconds), []byte(nanosecondsOffset)[1:]...)
|
||||
|
||||
return output, nil
|
||||
}
|
||||
|
||||
// UnmarshalJSON is an implementation of the json.RawMessage interface and deserializses a
|
||||
|
||||
58
vendor/github.com/shirou/gopsutil/v3/cpu/cpu_aix.go
generated
vendored
58
vendor/github.com/shirou/gopsutil/v3/cpu/cpu_aix.go
generated
vendored
@ -5,70 +5,12 @@ package cpu
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/power-devops/perfstat"
|
||||
)
|
||||
|
||||
func Times(percpu bool) ([]TimesStat, error) {
|
||||
return TimesWithContext(context.Background(), percpu)
|
||||
}
|
||||
|
||||
func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) {
|
||||
var ret []TimesStat
|
||||
if percpu {
|
||||
cpus, err := perfstat.CpuStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, c := range cpus {
|
||||
ct := &TimesStat{
|
||||
CPU: c.Name,
|
||||
Idle: float64(c.Idle),
|
||||
User: float64(c.User),
|
||||
System: float64(c.Sys),
|
||||
Iowait: float64(c.Wait),
|
||||
}
|
||||
ret = append(ret, *ct)
|
||||
}
|
||||
} else {
|
||||
c, err := perfstat.CpuUtilTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ct := &TimesStat{
|
||||
CPU: "cpu-total",
|
||||
Idle: float64(c.IdlePct),
|
||||
User: float64(c.UserPct),
|
||||
System: float64(c.KernPct),
|
||||
Iowait: float64(c.WaitPct),
|
||||
}
|
||||
ret = append(ret, *ct)
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func Info() ([]InfoStat, error) {
|
||||
return InfoWithContext(context.Background())
|
||||
}
|
||||
|
||||
func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
|
||||
c, err := perfstat.CpuTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
info := InfoStat{
|
||||
CPU: 0,
|
||||
Mhz: float64(c.ProcessorHz / 1000000),
|
||||
Cores: int32(c.NCpusCfg),
|
||||
}
|
||||
result := []InfoStat{info}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func CountsWithContext(ctx context.Context, logical bool) (int, error) {
|
||||
c, err := perfstat.CpuTotalStat()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return c.NCpusCfg, nil
|
||||
}
|
||||
|
||||
66
vendor/github.com/shirou/gopsutil/v3/cpu/cpu_aix_cgo.go
generated
vendored
Normal file
66
vendor/github.com/shirou/gopsutil/v3/cpu/cpu_aix_cgo.go
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
//go:build aix && cgo
|
||||
// +build aix,cgo
|
||||
|
||||
package cpu
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/power-devops/perfstat"
|
||||
)
|
||||
|
||||
func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) {
|
||||
var ret []TimesStat
|
||||
if percpu {
|
||||
cpus, err := perfstat.CpuStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, c := range cpus {
|
||||
ct := &TimesStat{
|
||||
CPU: c.Name,
|
||||
Idle: float64(c.Idle),
|
||||
User: float64(c.User),
|
||||
System: float64(c.Sys),
|
||||
Iowait: float64(c.Wait),
|
||||
}
|
||||
ret = append(ret, *ct)
|
||||
}
|
||||
} else {
|
||||
c, err := perfstat.CpuUtilTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ct := &TimesStat{
|
||||
CPU: "cpu-total",
|
||||
Idle: float64(c.IdlePct),
|
||||
User: float64(c.UserPct),
|
||||
System: float64(c.KernPct),
|
||||
Iowait: float64(c.WaitPct),
|
||||
}
|
||||
ret = append(ret, *ct)
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
|
||||
c, err := perfstat.CpuTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
info := InfoStat{
|
||||
CPU: 0,
|
||||
Mhz: float64(c.ProcessorHz / 1000000),
|
||||
Cores: int32(c.NCpusCfg),
|
||||
}
|
||||
result := []InfoStat{info}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func CountsWithContext(ctx context.Context, logical bool) (int, error) {
|
||||
c, err := perfstat.CpuTotalStat()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return c.NCpusCfg, nil
|
||||
}
|
||||
95
vendor/github.com/shirou/gopsutil/v3/cpu/cpu_aix_nocgo.go
generated
vendored
Normal file
95
vendor/github.com/shirou/gopsutil/v3/cpu/cpu_aix_nocgo.go
generated
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
//go:build aix && !cgo
|
||||
// +build aix,!cgo
|
||||
|
||||
package cpu
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"strings"
|
||||
"strconv"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
)
|
||||
|
||||
var whiteSpaces = regexp.MustCompile(`\s+`)
|
||||
|
||||
func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) {
|
||||
if percpu {
|
||||
return []TimesStat{}, common.ErrNotImplementedError
|
||||
} else {
|
||||
out, err := invoke.CommandWithContext(ctx, "sar", "-u", "10", "1")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lines := strings.Split(string(out), "\n")
|
||||
if len(lines) < 5 {
|
||||
return []TimesStat{}, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
ret := TimesStat{CPU: "cpu-total"}
|
||||
h := whiteSpaces.Split(lines[len(lines)-3], -1) // headers
|
||||
v := whiteSpaces.Split(lines[len(lines)-2], -1) // values
|
||||
for i, header := range h {
|
||||
if t, err := strconv.ParseFloat(v[i], 64); err == nil {
|
||||
switch header {
|
||||
case `%usr`:
|
||||
ret.User = t
|
||||
case `%sys`:
|
||||
ret.System = t
|
||||
case `%wio`:
|
||||
ret.Iowait = t
|
||||
case `%idle`:
|
||||
ret.Idle = t
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return []TimesStat{ret}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
|
||||
out, err := invoke.CommandWithContext(ctx, "prtconf")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ret := InfoStat{}
|
||||
for _, line := range strings.Split(string(out), "\n") {
|
||||
if strings.HasPrefix(line, "Number Of Processors:") {
|
||||
p := whiteSpaces.Split(line, 4)
|
||||
if len(p) > 3 {
|
||||
if t, err := strconv.ParseUint(p[3], 10, 64); err == nil {
|
||||
ret.Cores = int32(t)
|
||||
}
|
||||
}
|
||||
} else if strings.HasPrefix(line, "Processor Clock Speed:") {
|
||||
p := whiteSpaces.Split(line, 5)
|
||||
if len(p) > 4 {
|
||||
if t, err := strconv.ParseFloat(p[3], 64); err == nil {
|
||||
switch strings.ToUpper(p[4]) {
|
||||
case "MHZ":
|
||||
ret.Mhz = t
|
||||
case "GHZ":
|
||||
ret.Mhz = t * 1000.0
|
||||
case "KHZ":
|
||||
ret.Mhz = t / 1000.0
|
||||
default:
|
||||
ret.Mhz = t
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
return []InfoStat{ret}, nil
|
||||
}
|
||||
|
||||
func CountsWithContext(ctx context.Context, logical bool) (int, error) {
|
||||
info, err := InfoWithContext(ctx)
|
||||
if err == nil {
|
||||
return int(info[0].Cores), nil
|
||||
}
|
||||
return 0, err
|
||||
}
|
||||
67
vendor/github.com/shirou/gopsutil/v3/disk/disk_aix.go
generated
vendored
67
vendor/github.com/shirou/gopsutil/v3/disk/disk_aix.go
generated
vendored
@ -5,81 +5,14 @@ package disk
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/power-devops/perfstat"
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
)
|
||||
|
||||
var FSType map[int]string
|
||||
|
||||
func init() {
|
||||
FSType = map[int]string{
|
||||
0: "jfs2", 1: "namefs", 2: "nfs", 3: "jfs", 5: "cdrom", 6: "proc",
|
||||
16: "special-fs", 17: "cache-fs", 18: "nfs3", 19: "automount-fs", 20: "pool-fs", 32: "vxfs",
|
||||
33: "veritas-fs", 34: "udfs", 35: "nfs4", 36: "nfs4-pseudo", 37: "smbfs", 38: "mcr-pseudofs",
|
||||
39: "ahafs", 40: "sterm-nfs", 41: "asmfs",
|
||||
}
|
||||
}
|
||||
|
||||
func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, error) {
|
||||
f, err := perfstat.FileSystemStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := make([]PartitionStat, len(f))
|
||||
|
||||
for _, fs := range f {
|
||||
fstyp, exists := FSType[fs.FSType]
|
||||
if !exists {
|
||||
fstyp = "unknown"
|
||||
}
|
||||
info := PartitionStat{
|
||||
Device: fs.Device,
|
||||
Mountpoint: fs.MountPoint,
|
||||
Fstype: fstyp,
|
||||
}
|
||||
ret = append(ret, info)
|
||||
}
|
||||
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func IOCountersWithContext(ctx context.Context, names ...string) (map[string]IOCountersStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func UsageWithContext(ctx context.Context, path string) (*UsageStat, error) {
|
||||
f, err := perfstat.FileSystemStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
blocksize := uint64(512)
|
||||
for _, fs := range f {
|
||||
if path == fs.MountPoint {
|
||||
fstyp, exists := FSType[fs.FSType]
|
||||
if !exists {
|
||||
fstyp = "unknown"
|
||||
}
|
||||
info := UsageStat{
|
||||
Path: path,
|
||||
Fstype: fstyp,
|
||||
Total: uint64(fs.TotalBlocks) * blocksize,
|
||||
Free: uint64(fs.FreeBlocks) * blocksize,
|
||||
Used: uint64(fs.TotalBlocks-fs.FreeBlocks) * blocksize,
|
||||
InodesTotal: uint64(fs.TotalInodes),
|
||||
InodesFree: uint64(fs.FreeInodes),
|
||||
InodesUsed: uint64(fs.TotalInodes - fs.FreeInodes),
|
||||
}
|
||||
info.UsedPercent = (float64(info.Used) / float64(info.Total)) * 100.0
|
||||
info.InodesUsedPercent = (float64(info.InodesUsed) / float64(info.InodesTotal)) * 100.0
|
||||
return &info, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("mountpoint %s not found", path)
|
||||
}
|
||||
|
||||
func SerialNumberWithContext(ctx context.Context, name string) (string, error) {
|
||||
return "", common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
76
vendor/github.com/shirou/gopsutil/v3/disk/disk_aix_cgo.go
generated
vendored
Normal file
76
vendor/github.com/shirou/gopsutil/v3/disk/disk_aix_cgo.go
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
//go:build aix && cgo
|
||||
// +build aix,cgo
|
||||
|
||||
package disk
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/power-devops/perfstat"
|
||||
)
|
||||
|
||||
var FSType map[int]string
|
||||
|
||||
func init() {
|
||||
FSType = map[int]string{
|
||||
0: "jfs2", 1: "namefs", 2: "nfs", 3: "jfs", 5: "cdrom", 6: "proc",
|
||||
16: "special-fs", 17: "cache-fs", 18: "nfs3", 19: "automount-fs", 20: "pool-fs", 32: "vxfs",
|
||||
33: "veritas-fs", 34: "udfs", 35: "nfs4", 36: "nfs4-pseudo", 37: "smbfs", 38: "mcr-pseudofs",
|
||||
39: "ahafs", 40: "sterm-nfs", 41: "asmfs",
|
||||
}
|
||||
}
|
||||
|
||||
func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, error) {
|
||||
f, err := perfstat.FileSystemStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ret := make([]PartitionStat, len(f))
|
||||
|
||||
for _, fs := range f {
|
||||
fstyp, exists := FSType[fs.FSType]
|
||||
if !exists {
|
||||
fstyp = "unknown"
|
||||
}
|
||||
info := PartitionStat{
|
||||
Device: fs.Device,
|
||||
Mountpoint: fs.MountPoint,
|
||||
Fstype: fstyp,
|
||||
}
|
||||
ret = append(ret, info)
|
||||
}
|
||||
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func UsageWithContext(ctx context.Context, path string) (*UsageStat, error) {
|
||||
f, err := perfstat.FileSystemStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
blocksize := uint64(512)
|
||||
for _, fs := range f {
|
||||
if path == fs.MountPoint {
|
||||
fstyp, exists := FSType[fs.FSType]
|
||||
if !exists {
|
||||
fstyp = "unknown"
|
||||
}
|
||||
info := UsageStat{
|
||||
Path: path,
|
||||
Fstype: fstyp,
|
||||
Total: uint64(fs.TotalBlocks) * blocksize,
|
||||
Free: uint64(fs.FreeBlocks) * blocksize,
|
||||
Used: uint64(fs.TotalBlocks-fs.FreeBlocks) * blocksize,
|
||||
InodesTotal: uint64(fs.TotalInodes),
|
||||
InodesFree: uint64(fs.FreeInodes),
|
||||
InodesUsed: uint64(fs.TotalInodes - fs.FreeInodes),
|
||||
}
|
||||
info.UsedPercent = (float64(info.Used) / float64(info.Total)) * 100.0
|
||||
info.InodesUsedPercent = (float64(info.InodesUsed) / float64(info.InodesTotal)) * 100.0
|
||||
return &info, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("mountpoint %s not found", path)
|
||||
}
|
||||
18
vendor/github.com/shirou/gopsutil/v3/disk/disk_aix_nocgo.go
generated
vendored
Normal file
18
vendor/github.com/shirou/gopsutil/v3/disk/disk_aix_nocgo.go
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
//go:build aix && !cgo
|
||||
// +build aix,!cgo
|
||||
|
||||
package disk
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
)
|
||||
|
||||
func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, error) {
|
||||
return []PartitionStat{}, common.ErrNotImplementedError
|
||||
}
|
||||
|
||||
func UsageWithContext(ctx context.Context, path string) (*UsageStat, error) {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
8
vendor/github.com/shirou/gopsutil/v3/disk/disk_openbsd.go
generated
vendored
8
vendor/github.com/shirou/gopsutil/v3/disk/disk_openbsd.go
generated
vendored
@ -57,9 +57,9 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
|
||||
}
|
||||
|
||||
d := PartitionStat{
|
||||
Device: common.IntToString(stat.F_mntfromname[:]),
|
||||
Mountpoint: common.IntToString(stat.F_mntonname[:]),
|
||||
Fstype: common.IntToString(stat.F_fstypename[:]),
|
||||
Device: common.ByteToString(stat.F_mntfromname[:]),
|
||||
Mountpoint: common.ByteToString(stat.F_mntonname[:]),
|
||||
Fstype: common.ByteToString(stat.F_fstypename[:]),
|
||||
Opts: opts,
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ func UsageWithContext(ctx context.Context, path string) (*UsageStat, error) {
|
||||
}
|
||||
|
||||
func getFsType(stat unix.Statfs_t) string {
|
||||
return common.IntToString(stat.F_fstypename[:])
|
||||
return common.ByteToString(stat.F_fstypename[:])
|
||||
}
|
||||
|
||||
func SerialNumberWithContext(ctx context.Context, name string) (string, error) {
|
||||
|
||||
2
vendor/github.com/shirou/gopsutil/v3/mem/mem.go
generated
vendored
2
vendor/github.com/shirou/gopsutil/v3/mem/mem.go
generated
vendored
@ -75,6 +75,8 @@ type VirtualMemoryStat struct {
|
||||
VmallocChunk uint64 `json:"vmallocChunk"`
|
||||
HugePagesTotal uint64 `json:"hugePagesTotal"`
|
||||
HugePagesFree uint64 `json:"hugePagesFree"`
|
||||
HugePagesRsvd uint64 `json:"hugePagesRsvd"`
|
||||
HugePagesSurp uint64 `json:"hugePagesSurp"`
|
||||
HugePageSize uint64 `json:"hugePageSize"`
|
||||
}
|
||||
|
||||
|
||||
43
vendor/github.com/shirou/gopsutil/v3/mem/mem_aix.go
generated
vendored
43
vendor/github.com/shirou/gopsutil/v3/mem/mem_aix.go
generated
vendored
@ -5,55 +5,12 @@ package mem
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/power-devops/perfstat"
|
||||
)
|
||||
|
||||
func VirtualMemory() (*VirtualMemoryStat, error) {
|
||||
return VirtualMemoryWithContext(context.Background())
|
||||
}
|
||||
|
||||
func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) {
|
||||
m, err := perfstat.MemoryTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pagesize := uint64(4096)
|
||||
ret := VirtualMemoryStat{
|
||||
Total: uint64(m.RealTotal) * pagesize,
|
||||
Available: uint64(m.RealAvailable) * pagesize,
|
||||
Free: uint64(m.RealFree) * pagesize,
|
||||
Used: uint64(m.RealInUse) * pagesize,
|
||||
UsedPercent: 100 * float64(m.RealInUse) / float64(m.RealTotal),
|
||||
Active: uint64(m.VirtualActive) * pagesize,
|
||||
SwapTotal: uint64(m.PgSpTotal) * pagesize,
|
||||
SwapFree: uint64(m.PgSpFree) * pagesize,
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
|
||||
func SwapMemory() (*SwapMemoryStat, error) {
|
||||
return SwapMemoryWithContext(context.Background())
|
||||
}
|
||||
|
||||
func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
|
||||
m, err := perfstat.MemoryTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pagesize := uint64(4096)
|
||||
swapUsed := uint64(m.PgSpTotal-m.PgSpFree-m.PgSpRsvd) * pagesize
|
||||
swapTotal := uint64(m.PgSpTotal) * pagesize
|
||||
ret := SwapMemoryStat{
|
||||
Total: swapTotal,
|
||||
Free: uint64(m.PgSpFree) * pagesize,
|
||||
Used: swapUsed,
|
||||
UsedPercent: float64(100*swapUsed) / float64(swapTotal),
|
||||
Sin: uint64(m.PgSpIn),
|
||||
Sout: uint64(m.PgSpOut),
|
||||
PgIn: uint64(m.PageIn),
|
||||
PgOut: uint64(m.PageOut),
|
||||
PgFault: uint64(m.PageFaults),
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
|
||||
51
vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_cgo.go
generated
vendored
Normal file
51
vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_cgo.go
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
//go:build aix && cgo
|
||||
// +build aix,cgo
|
||||
|
||||
package mem
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/power-devops/perfstat"
|
||||
)
|
||||
|
||||
func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) {
|
||||
m, err := perfstat.MemoryTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pagesize := uint64(4096)
|
||||
ret := VirtualMemoryStat{
|
||||
Total: uint64(m.RealTotal) * pagesize,
|
||||
Available: uint64(m.RealAvailable) * pagesize,
|
||||
Free: uint64(m.RealFree) * pagesize,
|
||||
Used: uint64(m.RealInUse) * pagesize,
|
||||
UsedPercent: 100 * float64(m.RealInUse) / float64(m.RealTotal),
|
||||
Active: uint64(m.VirtualActive) * pagesize,
|
||||
SwapTotal: uint64(m.PgSpTotal) * pagesize,
|
||||
SwapFree: uint64(m.PgSpFree) * pagesize,
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
|
||||
func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
|
||||
m, err := perfstat.MemoryTotalStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pagesize := uint64(4096)
|
||||
swapUsed := uint64(m.PgSpTotal-m.PgSpFree-m.PgSpRsvd) * pagesize
|
||||
swapTotal := uint64(m.PgSpTotal) * pagesize
|
||||
ret := SwapMemoryStat{
|
||||
Total: swapTotal,
|
||||
Free: uint64(m.PgSpFree) * pagesize,
|
||||
Used: swapUsed,
|
||||
UsedPercent: float64(100*swapUsed) / float64(swapTotal),
|
||||
Sin: uint64(m.PgSpIn),
|
||||
Sout: uint64(m.PgSpOut),
|
||||
PgIn: uint64(m.PageIn),
|
||||
PgOut: uint64(m.PageOut),
|
||||
PgFault: uint64(m.PageFaults),
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
81
vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_nocgo.go
generated
vendored
Normal file
81
vendor/github.com/shirou/gopsutil/v3/mem/mem_aix_nocgo.go
generated
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
//go:build aix && !cgo
|
||||
// +build aix,!cgo
|
||||
|
||||
package mem
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
)
|
||||
|
||||
var whiteSpaces = regexp.MustCompile(`\s+`)
|
||||
|
||||
func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) {
|
||||
vmem, swap, err := callSVMon(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if vmem.Total == 0 {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
vmem.SwapTotal = swap.Total
|
||||
vmem.SwapFree = swap.Free
|
||||
return vmem, nil
|
||||
}
|
||||
|
||||
func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
|
||||
_, swap, err := callSVMon(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if swap.Total == 0 {
|
||||
return nil, common.ErrNotImplementedError
|
||||
}
|
||||
return swap, nil
|
||||
}
|
||||
|
||||
func callSVMon(ctx context.Context) (*VirtualMemoryStat, *SwapMemoryStat, error) {
|
||||
out, err := invoke.CommandWithContext(ctx, "svmon", "-G")
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
pagesize := uint64(4096)
|
||||
vmem := &VirtualMemoryStat{}
|
||||
swap := &SwapMemoryStat{}
|
||||
for _, line := range strings.Split(string(out), "\n") {
|
||||
if strings.HasPrefix(line, "memory") {
|
||||
p := whiteSpaces.Split(line, 7)
|
||||
if len(p) > 2 {
|
||||
if t, err := strconv.ParseUint(p[1], 10, 64); err == nil {
|
||||
vmem.Total = t * pagesize
|
||||
}
|
||||
if t, err := strconv.ParseUint(p[2], 10, 64); err == nil {
|
||||
vmem.Used = t * pagesize
|
||||
if vmem.Total > 0 {
|
||||
vmem.UsedPercent = 100 * float64(vmem.Used) / float64(vmem.Total)
|
||||
}
|
||||
}
|
||||
if t, err := strconv.ParseUint(p[3], 10, 64); err == nil {
|
||||
vmem.Free = t * pagesize
|
||||
}
|
||||
}
|
||||
} else if strings.HasPrefix(line, "pg space") {
|
||||
p := whiteSpaces.Split(line, 4)
|
||||
if len(p) > 3 {
|
||||
if t, err := strconv.ParseUint(p[2], 10, 64); err == nil {
|
||||
swap.Total = t * pagesize
|
||||
}
|
||||
if t, err := strconv.ParseUint(p[3], 10, 64); err == nil {
|
||||
swap.Free = swap.Total - t * pagesize
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
return vmem, swap, nil
|
||||
}
|
||||
12
vendor/github.com/shirou/gopsutil/v3/mem/mem_linux.go
generated
vendored
12
vendor/github.com/shirou/gopsutil/v3/mem/mem_linux.go
generated
vendored
@ -292,6 +292,18 @@ func fillFromMeminfoWithContext() (*VirtualMemoryStat, *VirtualMemoryExStat, err
|
||||
return ret, retEx, err
|
||||
}
|
||||
ret.HugePagesFree = t
|
||||
case "HugePages_Rsvd":
|
||||
t, err := strconv.ParseUint(value, 10, 64)
|
||||
if err != nil {
|
||||
return ret, retEx, err
|
||||
}
|
||||
ret.HugePagesRsvd = t
|
||||
case "HugePages_Surp":
|
||||
t, err := strconv.ParseUint(value, 10, 64)
|
||||
if err != nil {
|
||||
return ret, retEx, err
|
||||
}
|
||||
ret.HugePagesSurp = t
|
||||
case "Hugepagesize":
|
||||
t, err := strconv.ParseUint(value, 10, 64)
|
||||
if err != nil {
|
||||
|
||||
82
vendor/github.com/shirou/gopsutil/v3/net/net_aix.go
generated
vendored
82
vendor/github.com/shirou/gopsutil/v3/net/net_aix.go
generated
vendored
@ -14,92 +14,10 @@ import (
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
)
|
||||
|
||||
func parseNetstatI(output string) ([]IOCountersStat, error) {
|
||||
lines := strings.Split(string(output), "\n")
|
||||
ret := make([]IOCountersStat, 0, len(lines)-1)
|
||||
exists := make([]string, 0, len(ret))
|
||||
|
||||
// Check first line is header
|
||||
if len(lines) > 0 && strings.Fields(lines[0])[0] != "Name" {
|
||||
return nil, fmt.Errorf("not a 'netstat -i' output")
|
||||
}
|
||||
|
||||
for _, line := range lines[1:] {
|
||||
values := strings.Fields(line)
|
||||
if len(values) < 1 || values[0] == "Name" {
|
||||
continue
|
||||
}
|
||||
if common.StringsHas(exists, values[0]) {
|
||||
// skip if already get
|
||||
continue
|
||||
}
|
||||
exists = append(exists, values[0])
|
||||
|
||||
if len(values) < 9 {
|
||||
continue
|
||||
}
|
||||
|
||||
base := 1
|
||||
// sometimes Address is omitted
|
||||
if len(values) < 10 {
|
||||
base = 0
|
||||
}
|
||||
|
||||
parsed := make([]uint64, 0, 5)
|
||||
vv := []string{
|
||||
values[base+3], // Ipkts == PacketsRecv
|
||||
values[base+4], // Ierrs == Errin
|
||||
values[base+5], // Opkts == PacketsSent
|
||||
values[base+6], // Oerrs == Errout
|
||||
values[base+8], // Drops == Dropout
|
||||
}
|
||||
|
||||
for _, target := range vv {
|
||||
if target == "-" {
|
||||
parsed = append(parsed, 0)
|
||||
continue
|
||||
}
|
||||
|
||||
t, err := strconv.ParseUint(target, 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
parsed = append(parsed, t)
|
||||
}
|
||||
|
||||
n := IOCountersStat{
|
||||
Name: values[0],
|
||||
PacketsRecv: parsed[0],
|
||||
Errin: parsed[1],
|
||||
PacketsSent: parsed[2],
|
||||
Errout: parsed[3],
|
||||
Dropout: parsed[4],
|
||||
}
|
||||
ret = append(ret, n)
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func IOCounters(pernic bool) ([]IOCountersStat, error) {
|
||||
return IOCountersWithContext(context.Background(), pernic)
|
||||
}
|
||||
|
||||
func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) {
|
||||
out, err := invoke.CommandWithContext(ctx, "netstat", "-idn")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
iocounters, err := parseNetstatI(string(out))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if pernic == false {
|
||||
return getIOCountersAll(iocounters)
|
||||
}
|
||||
return iocounters, nil
|
||||
}
|
||||
|
||||
// IOCountersByFile exists just for compatibility with Linux.
|
||||
func IOCountersByFile(pernic bool, filename string) ([]IOCountersStat, error) {
|
||||
return IOCountersByFileWithContext(context.Background(), pernic, filename)
|
||||
|
||||
36
vendor/github.com/shirou/gopsutil/v3/net/net_aix_cgo.go
generated
vendored
Normal file
36
vendor/github.com/shirou/gopsutil/v3/net/net_aix_cgo.go
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
//go:build aix && cgo
|
||||
// +build aix,cgo
|
||||
|
||||
package net
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/power-devops/perfstat"
|
||||
)
|
||||
|
||||
func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) {
|
||||
ifs, err := perfstat.NetIfaceStat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
iocounters := make([]IOCountersStat, 0, len(ifs))
|
||||
for _, netif := range ifs {
|
||||
n := IOCountersStat{
|
||||
Name: netif.Name,
|
||||
BytesSent: uint64(netif.OBytes),
|
||||
BytesRecv: uint64(netif.IBytes),
|
||||
PacketsSent: uint64(netif.OPackets),
|
||||
PacketsRecv: uint64(netif.IPackets),
|
||||
Errin: uint64(netif.OErrors),
|
||||
Errout: uint64(netif.IErrors),
|
||||
Dropout: uint64(netif.XmitDrops),
|
||||
}
|
||||
iocounters = append(iocounters, n)
|
||||
}
|
||||
if pernic == false {
|
||||
return getIOCountersAll(iocounters)
|
||||
}
|
||||
return iocounters, nil
|
||||
}
|
||||
95
vendor/github.com/shirou/gopsutil/v3/net/net_aix_nocgo.go
generated
vendored
Normal file
95
vendor/github.com/shirou/gopsutil/v3/net/net_aix_nocgo.go
generated
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
//go:build aix && !cgo
|
||||
// +build aix,!cgo
|
||||
|
||||
package net
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/internal/common"
|
||||
)
|
||||
|
||||
func parseNetstatI(output string) ([]IOCountersStat, error) {
|
||||
lines := strings.Split(string(output), "\n")
|
||||
ret := make([]IOCountersStat, 0, len(lines)-1)
|
||||
exists := make([]string, 0, len(ret))
|
||||
|
||||
// Check first line is header
|
||||
if len(lines) > 0 && strings.Fields(lines[0])[0] != "Name" {
|
||||
return nil, fmt.Errorf("not a 'netstat -i' output")
|
||||
}
|
||||
|
||||
for _, line := range lines[1:] {
|
||||
values := strings.Fields(line)
|
||||
if len(values) < 1 || values[0] == "Name" {
|
||||
continue
|
||||
}
|
||||
if common.StringsHas(exists, values[0]) {
|
||||
// skip if already get
|
||||
continue
|
||||
}
|
||||
exists = append(exists, values[0])
|
||||
|
||||
if len(values) < 9 {
|
||||
continue
|
||||
}
|
||||
|
||||
base := 1
|
||||
// sometimes Address is omitted
|
||||
if len(values) < 10 {
|
||||
base = 0
|
||||
}
|
||||
|
||||
parsed := make([]uint64, 0, 5)
|
||||
vv := []string{
|
||||
values[base+3], // Ipkts == PacketsRecv
|
||||
values[base+4], // Ierrs == Errin
|
||||
values[base+5], // Opkts == PacketsSent
|
||||
values[base+6], // Oerrs == Errout
|
||||
values[base+8], // Drops == Dropout
|
||||
}
|
||||
|
||||
for _, target := range vv {
|
||||
if target == "-" {
|
||||
parsed = append(parsed, 0)
|
||||
continue
|
||||
}
|
||||
|
||||
t, err := strconv.ParseUint(target, 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
parsed = append(parsed, t)
|
||||
}
|
||||
|
||||
n := IOCountersStat{
|
||||
Name: values[0],
|
||||
PacketsRecv: parsed[0],
|
||||
Errin: parsed[1],
|
||||
PacketsSent: parsed[2],
|
||||
Errout: parsed[3],
|
||||
Dropout: parsed[4],
|
||||
}
|
||||
ret = append(ret, n)
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) {
|
||||
out, err := invoke.CommandWithContext(ctx, "netstat", "-idn")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
iocounters, err := parseNetstatI(string(out))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if pernic == false {
|
||||
return getIOCountersAll(iocounters)
|
||||
}
|
||||
return iocounters, nil
|
||||
}
|
||||
24
vendor/github.com/stretchr/testify/assert/assertion_compare.go
generated
vendored
24
vendor/github.com/stretchr/testify/assert/assertion_compare.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
package assert
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"time"
|
||||
@ -32,7 +33,8 @@ var (
|
||||
|
||||
stringType = reflect.TypeOf("")
|
||||
|
||||
timeType = reflect.TypeOf(time.Time{})
|
||||
timeType = reflect.TypeOf(time.Time{})
|
||||
bytesType = reflect.TypeOf([]byte{})
|
||||
)
|
||||
|
||||
func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
|
||||
@ -323,6 +325,26 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
|
||||
|
||||
return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64)
|
||||
}
|
||||
case reflect.Slice:
|
||||
{
|
||||
// We only care about the []byte type.
|
||||
if !canConvert(obj1Value, bytesType) {
|
||||
break
|
||||
}
|
||||
|
||||
// []byte can be compared!
|
||||
bytesObj1, ok := obj1.([]byte)
|
||||
if !ok {
|
||||
bytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte)
|
||||
|
||||
}
|
||||
bytesObj2, ok := obj2.([]byte)
|
||||
if !ok {
|
||||
bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte)
|
||||
}
|
||||
|
||||
return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true
|
||||
}
|
||||
}
|
||||
|
||||
return compareEqual, false
|
||||
|
||||
7
vendor/github.com/stretchr/testify/assert/assertions.go
generated
vendored
7
vendor/github.com/stretchr/testify/assert/assertions.go
generated
vendored
@ -563,16 +563,17 @@ func isEmpty(object interface{}) bool {
|
||||
|
||||
switch objValue.Kind() {
|
||||
// collection types are empty when they have no element
|
||||
case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
|
||||
case reflect.Chan, reflect.Map, reflect.Slice:
|
||||
return objValue.Len() == 0
|
||||
// pointers are empty if nil or if the value they point to is empty
|
||||
// pointers are empty if nil or if the value they point to is empty
|
||||
case reflect.Ptr:
|
||||
if objValue.IsNil() {
|
||||
return true
|
||||
}
|
||||
deref := objValue.Elem().Interface()
|
||||
return isEmpty(deref)
|
||||
// for all other types, compare against the zero value
|
||||
// for all other types, compare against the zero value
|
||||
// array types are empty when they match their zero-initialized state
|
||||
default:
|
||||
zero := reflect.Zero(objValue.Type())
|
||||
return reflect.DeepEqual(object, zero.Interface())
|
||||
|
||||
7
vendor/github.com/vektah/gqlparser/v2/validator/schema.go
generated
vendored
7
vendor/github.com/vektah/gqlparser/v2/validator/schema.go
generated
vendored
@ -277,6 +277,13 @@ func validateDefinition(schema *Schema, def *Definition) *gqlerror.Error {
|
||||
if len(def.EnumValues) == 0 {
|
||||
return gqlerror.ErrorPosf(def.Position, "%s %s: must define one or more unique enum values.", def.Kind, def.Name)
|
||||
}
|
||||
for _, value := range def.EnumValues {
|
||||
for _, nonEnum := range [3]string{"true", "false", "null"} {
|
||||
if value.Name == nonEnum {
|
||||
return gqlerror.ErrorPosf(def.Position, "%s %s: non-enum value %s.", def.Kind, def.Name, value.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
case InputObject:
|
||||
if len(def.Fields) == 0 {
|
||||
return gqlerror.ErrorPosf(def.Position, "%s %s: must define one or more input fields.", def.Kind, def.Name)
|
||||
|
||||
8
vendor/github.com/vektah/gqlparser/v2/validator/schema_test.yml
generated
vendored
8
vendor/github.com/vektah/gqlparser/v2/validator/schema_test.yml
generated
vendored
@ -668,3 +668,11 @@ type references:
|
||||
error:
|
||||
message: "Undefined type FooBar."
|
||||
locations: [{line: 1, column: 21}]
|
||||
|
||||
- name: Invalid enum value
|
||||
input: |
|
||||
enum Enum { true }
|
||||
|
||||
error:
|
||||
message: "ENUM Enum: non-enum value true."
|
||||
locations: [{line: 1, column: 6}]
|
||||
|
||||
12
vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
generated
vendored
Normal file
12
vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// 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 !linux && riscv64
|
||||
// +build !linux,riscv64
|
||||
|
||||
package cpu
|
||||
|
||||
func archInit() {
|
||||
Initialized = true
|
||||
}
|
||||
233
vendor/golang.org/x/sys/unix/errors_freebsd_386.go
generated
vendored
233
vendor/golang.org/x/sys/unix/errors_freebsd_386.go
generated
vendored
@ -1,233 +0,0 @@
|
||||
// Copyright 2017 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IFF_SMART = 0x20
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_IPXIP = 0xf9
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_FAITH = 0x16
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
SIOCADDRT = 0x8030720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8030720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
||||
233
vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
generated
vendored
233
vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
generated
vendored
@ -1,233 +0,0 @@
|
||||
// Copyright 2017 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IFF_SMART = 0x20
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_IPXIP = 0xf9
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_FAITH = 0x16
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
SIOCADDRT = 0x8040720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8040720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
||||
226
vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
generated
vendored
226
vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
generated
vendored
@ -1,226 +0,0 @@
|
||||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
IFT_1822 = 0x2
|
||||
IFT_A12MPPSWITCH = 0x82
|
||||
IFT_AAL2 = 0xbb
|
||||
IFT_AAL5 = 0x31
|
||||
IFT_ADSL = 0x5e
|
||||
IFT_AFLANE8023 = 0x3b
|
||||
IFT_AFLANE8025 = 0x3c
|
||||
IFT_ARAP = 0x58
|
||||
IFT_ARCNET = 0x23
|
||||
IFT_ARCNETPLUS = 0x24
|
||||
IFT_ASYNC = 0x54
|
||||
IFT_ATM = 0x25
|
||||
IFT_ATMDXI = 0x69
|
||||
IFT_ATMFUNI = 0x6a
|
||||
IFT_ATMIMA = 0x6b
|
||||
IFT_ATMLOGICAL = 0x50
|
||||
IFT_ATMRADIO = 0xbd
|
||||
IFT_ATMSUBINTERFACE = 0x86
|
||||
IFT_ATMVCIENDPT = 0xc2
|
||||
IFT_ATMVIRTUAL = 0x95
|
||||
IFT_BGPPOLICYACCOUNTING = 0xa2
|
||||
IFT_BSC = 0x53
|
||||
IFT_CCTEMUL = 0x3d
|
||||
IFT_CEPT = 0x13
|
||||
IFT_CES = 0x85
|
||||
IFT_CHANNEL = 0x46
|
||||
IFT_CNR = 0x55
|
||||
IFT_COFFEE = 0x84
|
||||
IFT_COMPOSITELINK = 0x9b
|
||||
IFT_DCN = 0x8d
|
||||
IFT_DIGITALPOWERLINE = 0x8a
|
||||
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
|
||||
IFT_DLSW = 0x4a
|
||||
IFT_DOCSCABLEDOWNSTREAM = 0x80
|
||||
IFT_DOCSCABLEMACLAYER = 0x7f
|
||||
IFT_DOCSCABLEUPSTREAM = 0x81
|
||||
IFT_DS0 = 0x51
|
||||
IFT_DS0BUNDLE = 0x52
|
||||
IFT_DS1FDL = 0xaa
|
||||
IFT_DS3 = 0x1e
|
||||
IFT_DTM = 0x8c
|
||||
IFT_DVBASILN = 0xac
|
||||
IFT_DVBASIOUT = 0xad
|
||||
IFT_DVBRCCDOWNSTREAM = 0x93
|
||||
IFT_DVBRCCMACLAYER = 0x92
|
||||
IFT_DVBRCCUPSTREAM = 0x94
|
||||
IFT_ENC = 0xf4
|
||||
IFT_EON = 0x19
|
||||
IFT_EPLRS = 0x57
|
||||
IFT_ESCON = 0x49
|
||||
IFT_ETHER = 0x6
|
||||
IFT_FAST = 0x7d
|
||||
IFT_FASTETHER = 0x3e
|
||||
IFT_FASTETHERFX = 0x45
|
||||
IFT_FDDI = 0xf
|
||||
IFT_FIBRECHANNEL = 0x38
|
||||
IFT_FRAMERELAYINTERCONNECT = 0x3a
|
||||
IFT_FRAMERELAYMPI = 0x5c
|
||||
IFT_FRDLCIENDPT = 0xc1
|
||||
IFT_FRELAY = 0x20
|
||||
IFT_FRELAYDCE = 0x2c
|
||||
IFT_FRF16MFRBUNDLE = 0xa3
|
||||
IFT_FRFORWARD = 0x9e
|
||||
IFT_G703AT2MB = 0x43
|
||||
IFT_G703AT64K = 0x42
|
||||
IFT_GIF = 0xf0
|
||||
IFT_GIGABITETHERNET = 0x75
|
||||
IFT_GR303IDT = 0xb2
|
||||
IFT_GR303RDT = 0xb1
|
||||
IFT_H323GATEKEEPER = 0xa4
|
||||
IFT_H323PROXY = 0xa5
|
||||
IFT_HDH1822 = 0x3
|
||||
IFT_HDLC = 0x76
|
||||
IFT_HDSL2 = 0xa8
|
||||
IFT_HIPERLAN2 = 0xb7
|
||||
IFT_HIPPI = 0x2f
|
||||
IFT_HIPPIINTERFACE = 0x39
|
||||
IFT_HOSTPAD = 0x5a
|
||||
IFT_HSSI = 0x2e
|
||||
IFT_HY = 0xe
|
||||
IFT_IBM370PARCHAN = 0x48
|
||||
IFT_IDSL = 0x9a
|
||||
IFT_IEEE80211 = 0x47
|
||||
IFT_IEEE80212 = 0x37
|
||||
IFT_IEEE8023ADLAG = 0xa1
|
||||
IFT_IFGSN = 0x91
|
||||
IFT_IMT = 0xbe
|
||||
IFT_INTERLEAVE = 0x7c
|
||||
IFT_IP = 0x7e
|
||||
IFT_IPFORWARD = 0x8e
|
||||
IFT_IPOVERATM = 0x72
|
||||
IFT_IPOVERCDLC = 0x6d
|
||||
IFT_IPOVERCLAW = 0x6e
|
||||
IFT_IPSWITCH = 0x4e
|
||||
IFT_ISDN = 0x3f
|
||||
IFT_ISDNBASIC = 0x14
|
||||
IFT_ISDNPRIMARY = 0x15
|
||||
IFT_ISDNS = 0x4b
|
||||
IFT_ISDNU = 0x4c
|
||||
IFT_ISO88022LLC = 0x29
|
||||
IFT_ISO88023 = 0x7
|
||||
IFT_ISO88024 = 0x8
|
||||
IFT_ISO88025 = 0x9
|
||||
IFT_ISO88025CRFPINT = 0x62
|
||||
IFT_ISO88025DTR = 0x56
|
||||
IFT_ISO88025FIBER = 0x73
|
||||
IFT_ISO88026 = 0xa
|
||||
IFT_ISUP = 0xb3
|
||||
IFT_L3IPXVLAN = 0x89
|
||||
IFT_LAPB = 0x10
|
||||
IFT_LAPD = 0x4d
|
||||
IFT_LAPF = 0x77
|
||||
IFT_LOCALTALK = 0x2a
|
||||
IFT_LOOP = 0x18
|
||||
IFT_MEDIAMAILOVERIP = 0x8b
|
||||
IFT_MFSIGLINK = 0xa7
|
||||
IFT_MIOX25 = 0x26
|
||||
IFT_MODEM = 0x30
|
||||
IFT_MPC = 0x71
|
||||
IFT_MPLS = 0xa6
|
||||
IFT_MPLSTUNNEL = 0x96
|
||||
IFT_MSDSL = 0x8f
|
||||
IFT_MVL = 0xbf
|
||||
IFT_MYRINET = 0x63
|
||||
IFT_NFAS = 0xaf
|
||||
IFT_NSIP = 0x1b
|
||||
IFT_OPTICALCHANNEL = 0xc3
|
||||
IFT_OPTICALTRANSPORT = 0xc4
|
||||
IFT_OTHER = 0x1
|
||||
IFT_P10 = 0xc
|
||||
IFT_P80 = 0xd
|
||||
IFT_PARA = 0x22
|
||||
IFT_PFLOG = 0xf6
|
||||
IFT_PFSYNC = 0xf7
|
||||
IFT_PLC = 0xae
|
||||
IFT_POS = 0xab
|
||||
IFT_PPPMULTILINKBUNDLE = 0x6c
|
||||
IFT_PROPBWAP2MP = 0xb8
|
||||
IFT_PROPCNLS = 0x59
|
||||
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
|
||||
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
|
||||
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPWIRELESSP2P = 0x9d
|
||||
IFT_PTPSERIAL = 0x16
|
||||
IFT_PVC = 0xf1
|
||||
IFT_QLLC = 0x44
|
||||
IFT_RADIOMAC = 0xbc
|
||||
IFT_RADSL = 0x5f
|
||||
IFT_REACHDSL = 0xc0
|
||||
IFT_RFC1483 = 0x9f
|
||||
IFT_RS232 = 0x21
|
||||
IFT_RSRB = 0x4f
|
||||
IFT_SDLC = 0x11
|
||||
IFT_SDSL = 0x60
|
||||
IFT_SHDSL = 0xa9
|
||||
IFT_SIP = 0x1f
|
||||
IFT_SLIP = 0x1c
|
||||
IFT_SMDSDXI = 0x2b
|
||||
IFT_SMDSICIP = 0x34
|
||||
IFT_SONET = 0x27
|
||||
IFT_SONETOVERHEADCHANNEL = 0xb9
|
||||
IFT_SONETPATH = 0x32
|
||||
IFT_SONETVT = 0x33
|
||||
IFT_SRP = 0x97
|
||||
IFT_SS7SIGLINK = 0x9c
|
||||
IFT_STACKTOSTACK = 0x6f
|
||||
IFT_STARLAN = 0xb
|
||||
IFT_STF = 0xd7
|
||||
IFT_T1 = 0x12
|
||||
IFT_TDLC = 0x74
|
||||
IFT_TERMPAD = 0x5b
|
||||
IFT_TR008 = 0xb0
|
||||
IFT_TRANSPHDLC = 0x7b
|
||||
IFT_TUNNEL = 0x83
|
||||
IFT_ULTRA = 0x1d
|
||||
IFT_USB = 0xa0
|
||||
IFT_V11 = 0x40
|
||||
IFT_V35 = 0x2d
|
||||
IFT_V36 = 0x41
|
||||
IFT_V37 = 0x78
|
||||
IFT_VDSL = 0x61
|
||||
IFT_VIRTUALIPADDRESS = 0x70
|
||||
IFT_VOICEEM = 0x64
|
||||
IFT_VOICEENCAP = 0x67
|
||||
IFT_VOICEFXO = 0x65
|
||||
IFT_VOICEFXS = 0x66
|
||||
IFT_VOICEOVERATM = 0x98
|
||||
IFT_VOICEOVERFRAMERELAY = 0x99
|
||||
IFT_VOICEOVERIP = 0x68
|
||||
IFT_X213 = 0x5d
|
||||
IFT_X25 = 0x5
|
||||
IFT_X25DDN = 0x4
|
||||
IFT_X25HUNTGROUP = 0x7a
|
||||
IFT_X25MLP = 0x79
|
||||
IFT_X25PLE = 0x28
|
||||
IFT_XETHER = 0x1a
|
||||
|
||||
// missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
|
||||
IFF_SMART = 0x20
|
||||
IFT_FAITH = 0xf2
|
||||
IFT_IPXIP = 0xf9
|
||||
IPPROTO_MAXID = 0x34
|
||||
IPV6_FAITH = 0x1d
|
||||
IP_FAITH = 0x16
|
||||
MAP_NORESERVE = 0x40
|
||||
MAP_RENAME = 0x20
|
||||
NET_RT_MAXID = 0x6
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTM_OLDADD = 0x9
|
||||
RTM_OLDDEL = 0xa
|
||||
SIOCADDRT = 0x8030720a
|
||||
SIOCALIFADDR = 0x8118691b
|
||||
SIOCDELRT = 0x8030720b
|
||||
SIOCDLIFADDR = 0x8118691d
|
||||
SIOCGLIFADDR = 0xc118691c
|
||||
SIOCGLIFPHYADDR = 0xc118694b
|
||||
SIOCSLIFPHYADDR = 0x8118694a
|
||||
)
|
||||
17
vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
generated
vendored
17
vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
generated
vendored
@ -1,17 +0,0 @@
|
||||
// Copyright 2020 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.
|
||||
|
||||
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
|
||||
// them here for backwards compatibility.
|
||||
|
||||
package unix
|
||||
|
||||
const (
|
||||
DLT_HHDLC = 0x79
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_NORTREF = 0x2
|
||||
)
|
||||
8
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
8
vendor/golang.org/x/sys/unix/mkall.sh
generated
vendored
@ -89,25 +89,25 @@ dragonfly_amd64)
|
||||
freebsd_386)
|
||||
mkerrors="$mkerrors -m32"
|
||||
mksyscall="go run mksyscall.go -l32"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
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"
|
||||
;;
|
||||
freebsd_amd64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
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"
|
||||
;;
|
||||
freebsd_arm)
|
||||
mkerrors="$mkerrors"
|
||||
mksyscall="go run mksyscall.go -l32 -arm"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'"
|
||||
# Let the type of C char be signed for making the bare syscall
|
||||
# API consistent across platforms.
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
|
||||
;;
|
||||
freebsd_arm64)
|
||||
mkerrors="$mkerrors -m64"
|
||||
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
|
||||
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)
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
3
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@ -128,6 +128,7 @@ includes_FreeBSD='
|
||||
#include <sys/mount.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_types.h>
|
||||
@ -529,7 +530,7 @@ ccflags="$@"
|
||||
$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
|
||||
$2 ~ /^NS_GET_/ ||
|
||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
|
||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ ||
|
||||
$2 ~ /^KEXEC_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
|
||||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
|
||||
|
||||
4
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
@ -217,12 +217,12 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func recvmsgRaw(fd int, p, 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
|
||||
return -1, -1, -1, ENOSYS
|
||||
}
|
||||
|
||||
func sendmsgN(fd int, p, 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
|
||||
return -1, ENOSYS
|
||||
}
|
||||
|
||||
46
vendor/golang.org/x/sys/unix/syscall_bsd.go
generated
vendored
46
vendor/golang.org/x/sys/unix/syscall_bsd.go
generated
vendored
@ -325,27 +325,26 @@ func GetsockoptString(fd, level, opt int) (string, error) {
|
||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
|
||||
func recvmsgRaw(fd int, p, 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) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*byte)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
// receive at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
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))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = recvmsg(fd, &msg, flags); err != nil {
|
||||
return
|
||||
}
|
||||
@ -356,31 +355,32 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
||||
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||
|
||||
func sendmsgN(fd int, p, 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) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*byte)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
var empty bool
|
||||
if len(oob) > 0 {
|
||||
// send at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
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))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
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 && len(p) == 0 {
|
||||
if len(oob) > 0 && empty {
|
||||
n = 0
|
||||
}
|
||||
return n, nil
|
||||
|
||||
325
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
325
vendor/golang.org/x/sys/unix/syscall_freebsd.go
generated
vendored
@ -17,25 +17,12 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
SYS_FSTAT_FREEBSD12 = 551 // { int fstat(int fd, _Out_ struct stat *sb); }
|
||||
SYS_FSTATAT_FREEBSD12 = 552 // { int fstatat(int fd, _In_z_ char *path, \
|
||||
SYS_GETDIRENTRIES_FREEBSD12 = 554 // { ssize_t getdirentries(int fd, \
|
||||
SYS_STATFS_FREEBSD12 = 555 // { int statfs(_In_z_ char *path, \
|
||||
SYS_FSTATFS_FREEBSD12 = 556 // { int fstatfs(int fd, \
|
||||
SYS_GETFSSTAT_FREEBSD12 = 557 // { int getfsstat( \
|
||||
SYS_MKNODAT_FREEBSD12 = 559 // { int mknodat(int fd, _In_z_ char *path, \
|
||||
)
|
||||
|
||||
// See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html.
|
||||
var (
|
||||
osreldateOnce sync.Once
|
||||
osreldate uint32
|
||||
)
|
||||
|
||||
// INO64_FIRST from /usr/src/lib/libc/sys/compat-ino64.h
|
||||
const _ino64First = 1200031
|
||||
|
||||
func supportsABI(ver uint32) bool {
|
||||
osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") })
|
||||
return osreldate >= ver
|
||||
@ -159,38 +146,18 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
|
||||
|
||||
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
var (
|
||||
_p0 unsafe.Pointer
|
||||
bufsize uintptr
|
||||
oldBuf []statfs_freebsd11_t
|
||||
needsConvert bool
|
||||
_p0 unsafe.Pointer
|
||||
bufsize uintptr
|
||||
)
|
||||
|
||||
if len(buf) > 0 {
|
||||
if supportsABI(_ino64First) {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
} else {
|
||||
n := len(buf)
|
||||
oldBuf = make([]statfs_freebsd11_t, n)
|
||||
_p0 = unsafe.Pointer(&oldBuf[0])
|
||||
bufsize = unsafe.Sizeof(statfs_freebsd11_t{}) * uintptr(n)
|
||||
needsConvert = true
|
||||
}
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
|
||||
}
|
||||
var sysno uintptr = SYS_GETFSSTAT
|
||||
if supportsABI(_ino64First) {
|
||||
sysno = SYS_GETFSSTAT_FREEBSD12
|
||||
}
|
||||
r0, _, e1 := Syscall(sysno, uintptr(_p0), bufsize, uintptr(flags))
|
||||
r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
if e1 == 0 && needsConvert {
|
||||
for i := range oldBuf {
|
||||
buf[i].convertFrom(&oldBuf[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -245,87 +212,11 @@ func Uname(uname *Utsname) error {
|
||||
}
|
||||
|
||||
func Stat(path string, st *Stat_t) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatat_freebsd12(AT_FDCWD, path, st, 0)
|
||||
}
|
||||
err = stat(path, &oldStat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
return Fstatat(AT_FDCWD, path, st, 0)
|
||||
}
|
||||
|
||||
func Lstat(path string, st *Stat_t) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatat_freebsd12(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
err = lstat(path, &oldStat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Fstat(fd int, st *Stat_t) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstat_freebsd12(fd, st)
|
||||
}
|
||||
err = fstat(fd, &oldStat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Fstatat(fd int, path string, st *Stat_t, flags int) (err error) {
|
||||
var oldStat stat_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatat_freebsd12(fd, path, st, flags)
|
||||
}
|
||||
err = fstatat(fd, path, &oldStat, flags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStat)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Statfs(path string, st *Statfs_t) (err error) {
|
||||
var oldStatfs statfs_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return statfs_freebsd12(path, st)
|
||||
}
|
||||
err = statfs(path, &oldStatfs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStatfs)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Fstatfs(fd int, st *Statfs_t) (err error) {
|
||||
var oldStatfs statfs_freebsd11_t
|
||||
if supportsABI(_ino64First) {
|
||||
return fstatfs_freebsd12(fd, st)
|
||||
}
|
||||
err = fstatfs(fd, &oldStatfs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
st.convertFrom(&oldStatfs)
|
||||
return nil
|
||||
return Fstatat(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
@ -333,162 +224,25 @@ func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
}
|
||||
|
||||
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
if supportsABI(_ino64First) {
|
||||
if basep == nil || unsafe.Sizeof(*basep) == 8 {
|
||||
return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep)))
|
||||
}
|
||||
// The freebsd12 syscall needs a 64-bit base. On 32-bit machines
|
||||
// we can't just use the basep passed in. See #32498.
|
||||
var base uint64 = uint64(*basep)
|
||||
n, err = getdirentries_freebsd12(fd, buf, &base)
|
||||
*basep = uintptr(base)
|
||||
if base>>32 != 0 {
|
||||
// We can't stuff the base back into a uintptr, so any
|
||||
// future calls would be suspect. Generate an error.
|
||||
// EIO is allowed by getdirentries.
|
||||
err = EIO
|
||||
}
|
||||
return
|
||||
if basep == nil || unsafe.Sizeof(*basep) == 8 {
|
||||
return getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep)))
|
||||
}
|
||||
|
||||
// The old syscall entries are smaller than the new. Use 1/4 of the original
|
||||
// buffer size rounded up to DIRBLKSIZ (see /usr/src/lib/libc/sys/getdirentries.c).
|
||||
oldBufLen := roundup(len(buf)/4, _dirblksiz)
|
||||
oldBuf := make([]byte, oldBufLen)
|
||||
n, err = getdirentries(fd, oldBuf, basep)
|
||||
if err == nil && n > 0 {
|
||||
n = convertFromDirents11(buf, oldBuf[:n])
|
||||
// The syscall needs a 64-bit base. On 32-bit machines
|
||||
// we can't just use the basep passed in. See #32498.
|
||||
var base uint64 = uint64(*basep)
|
||||
n, err = getdirentries(fd, buf, &base)
|
||||
*basep = uintptr(base)
|
||||
if base>>32 != 0 {
|
||||
// We can't stuff the base back into a uintptr, so any
|
||||
// future calls would be suspect. Generate an error.
|
||||
// EIO is allowed by getdirentries.
|
||||
err = EIO
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Mknod(path string, mode uint32, dev uint64) (err error) {
|
||||
var oldDev int
|
||||
if supportsABI(_ino64First) {
|
||||
return mknodat_freebsd12(AT_FDCWD, path, mode, dev)
|
||||
}
|
||||
oldDev = int(dev)
|
||||
return mknod(path, mode, oldDev)
|
||||
}
|
||||
|
||||
func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var oldDev int
|
||||
if supportsABI(_ino64First) {
|
||||
return mknodat_freebsd12(fd, path, mode, dev)
|
||||
}
|
||||
oldDev = int(dev)
|
||||
return mknodat(fd, path, mode, oldDev)
|
||||
}
|
||||
|
||||
// round x to the nearest multiple of y, larger or equal to x.
|
||||
//
|
||||
// from /usr/include/sys/param.h Macros for counting and rounding.
|
||||
// #define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
|
||||
func roundup(x, y int) int {
|
||||
return ((x + y - 1) / y) * y
|
||||
}
|
||||
|
||||
func (s *Stat_t) convertFrom(old *stat_freebsd11_t) {
|
||||
*s = Stat_t{
|
||||
Dev: uint64(old.Dev),
|
||||
Ino: uint64(old.Ino),
|
||||
Nlink: uint64(old.Nlink),
|
||||
Mode: old.Mode,
|
||||
Uid: old.Uid,
|
||||
Gid: old.Gid,
|
||||
Rdev: uint64(old.Rdev),
|
||||
Atim: old.Atim,
|
||||
Mtim: old.Mtim,
|
||||
Ctim: old.Ctim,
|
||||
Btim: old.Btim,
|
||||
Size: old.Size,
|
||||
Blocks: old.Blocks,
|
||||
Blksize: old.Blksize,
|
||||
Flags: old.Flags,
|
||||
Gen: uint64(old.Gen),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Statfs_t) convertFrom(old *statfs_freebsd11_t) {
|
||||
*s = Statfs_t{
|
||||
Version: _statfsVersion,
|
||||
Type: old.Type,
|
||||
Flags: old.Flags,
|
||||
Bsize: old.Bsize,
|
||||
Iosize: old.Iosize,
|
||||
Blocks: old.Blocks,
|
||||
Bfree: old.Bfree,
|
||||
Bavail: old.Bavail,
|
||||
Files: old.Files,
|
||||
Ffree: old.Ffree,
|
||||
Syncwrites: old.Syncwrites,
|
||||
Asyncwrites: old.Asyncwrites,
|
||||
Syncreads: old.Syncreads,
|
||||
Asyncreads: old.Asyncreads,
|
||||
// Spare
|
||||
Namemax: old.Namemax,
|
||||
Owner: old.Owner,
|
||||
Fsid: old.Fsid,
|
||||
// Charspare
|
||||
// Fstypename
|
||||
// Mntfromname
|
||||
// Mntonname
|
||||
}
|
||||
|
||||
sl := old.Fstypename[:]
|
||||
n := clen(*(*[]byte)(unsafe.Pointer(&sl)))
|
||||
copy(s.Fstypename[:], old.Fstypename[:n])
|
||||
|
||||
sl = old.Mntfromname[:]
|
||||
n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
|
||||
copy(s.Mntfromname[:], old.Mntfromname[:n])
|
||||
|
||||
sl = old.Mntonname[:]
|
||||
n = clen(*(*[]byte)(unsafe.Pointer(&sl)))
|
||||
copy(s.Mntonname[:], old.Mntonname[:n])
|
||||
}
|
||||
|
||||
func convertFromDirents11(buf []byte, old []byte) int {
|
||||
const (
|
||||
fixedSize = int(unsafe.Offsetof(Dirent{}.Name))
|
||||
oldFixedSize = int(unsafe.Offsetof(dirent_freebsd11{}.Name))
|
||||
)
|
||||
|
||||
dstPos := 0
|
||||
srcPos := 0
|
||||
for dstPos+fixedSize < len(buf) && srcPos+oldFixedSize < len(old) {
|
||||
var dstDirent Dirent
|
||||
var srcDirent dirent_freebsd11
|
||||
|
||||
// If multiple direntries are written, sometimes when we reach the final one,
|
||||
// we may have cap of old less than size of dirent_freebsd11.
|
||||
copy((*[unsafe.Sizeof(srcDirent)]byte)(unsafe.Pointer(&srcDirent))[:], old[srcPos:])
|
||||
|
||||
reclen := roundup(fixedSize+int(srcDirent.Namlen)+1, 8)
|
||||
if dstPos+reclen > len(buf) {
|
||||
break
|
||||
}
|
||||
|
||||
dstDirent.Fileno = uint64(srcDirent.Fileno)
|
||||
dstDirent.Off = 0
|
||||
dstDirent.Reclen = uint16(reclen)
|
||||
dstDirent.Type = srcDirent.Type
|
||||
dstDirent.Pad0 = 0
|
||||
dstDirent.Namlen = uint16(srcDirent.Namlen)
|
||||
dstDirent.Pad1 = 0
|
||||
|
||||
copy(dstDirent.Name[:], srcDirent.Name[:srcDirent.Namlen])
|
||||
copy(buf[dstPos:], (*[unsafe.Sizeof(dstDirent)]byte)(unsafe.Pointer(&dstDirent))[:])
|
||||
padding := buf[dstPos+fixedSize+int(dstDirent.Namlen) : dstPos+reclen]
|
||||
for i := range padding {
|
||||
padding[i] = 0
|
||||
}
|
||||
|
||||
dstPos += int(dstDirent.Reclen)
|
||||
srcPos += int(srcDirent.Reclen)
|
||||
}
|
||||
|
||||
return dstPos
|
||||
return Mknodat(AT_FDCWD, path, mode, dev)
|
||||
}
|
||||
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||
@ -501,31 +255,31 @@ 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)
|
||||
|
||||
func PtraceAttach(pid int) (err error) {
|
||||
return ptrace(PTRACE_ATTACH, pid, 0, 0)
|
||||
return ptrace(PT_ATTACH, pid, 0, 0)
|
||||
}
|
||||
|
||||
func PtraceCont(pid int, signal int) (err error) {
|
||||
return ptrace(PTRACE_CONT, pid, 1, signal)
|
||||
return ptrace(PT_CONTINUE, pid, 1, signal)
|
||||
}
|
||||
|
||||
func PtraceDetach(pid int) (err error) {
|
||||
return ptrace(PTRACE_DETACH, pid, 1, 0)
|
||||
return ptrace(PT_DETACH, pid, 1, 0)
|
||||
}
|
||||
|
||||
func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
|
||||
return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
|
||||
return ptrace(PT_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
|
||||
}
|
||||
|
||||
func PtraceGetRegs(pid int, regsout *Reg) (err error) {
|
||||
return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
|
||||
return ptrace(PT_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
|
||||
}
|
||||
|
||||
func PtraceLwpEvents(pid int, enable int) (err error) {
|
||||
return ptrace(PTRACE_LWPEVENTS, pid, 0, enable)
|
||||
return ptrace(PT_LWP_EVENTS, pid, 0, enable)
|
||||
}
|
||||
|
||||
func PtraceLwpInfo(pid int, info uintptr) (err error) {
|
||||
return ptrace(PTRACE_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
|
||||
return ptrace(PT_LWPINFO, pid, info, int(unsafe.Sizeof(PtraceLwpInfoStruct{})))
|
||||
}
|
||||
|
||||
func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
|
||||
@ -545,11 +299,11 @@ func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
|
||||
}
|
||||
|
||||
func PtraceSetRegs(pid int, regs *Reg) (err error) {
|
||||
return ptrace(PTRACE_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
|
||||
return ptrace(PT_SETREGS, pid, uintptr(unsafe.Pointer(regs)), 0)
|
||||
}
|
||||
|
||||
func PtraceSingleStep(pid int) (err error) {
|
||||
return ptrace(PTRACE_SINGLESTEP, pid, 1, 0)
|
||||
return ptrace(PT_STEP, pid, 1, 0)
|
||||
}
|
||||
|
||||
/*
|
||||
@ -591,16 +345,12 @@ func PtraceSingleStep(pid int) (err error) {
|
||||
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||
//sys Flock(fd int, how int) (err error)
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys fstat(fd int, stat *stat_freebsd11_t) (err error)
|
||||
//sys fstat_freebsd12(fd int, stat *Stat_t) (err error)
|
||||
//sys fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
|
||||
//sys fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
//sys fstatfs(fd int, stat *statfs_freebsd11_t) (err error)
|
||||
//sys fstatfs_freebsd12(fd int, stat *Statfs_t) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||
//sys Fsync(fd int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error)
|
||||
//sys getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
|
||||
//sys getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error)
|
||||
//sys getdirentries(fd int, buf []byte, basep *uint64) (n int, err error)
|
||||
//sys Getdtablesize() (size int)
|
||||
//sysnb Getegid() (egid int)
|
||||
//sysnb Geteuid() (uid int)
|
||||
@ -622,13 +372,10 @@ func PtraceSingleStep(pid int) (err error) {
|
||||
//sys Link(path string, link string) (err error)
|
||||
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
|
||||
//sys Listen(s int, backlog int) (err error)
|
||||
//sys lstat(path string, stat *stat_freebsd11_t) (err error)
|
||||
//sys Mkdir(path string, mode uint32) (err error)
|
||||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||
//sys Mkfifo(path string, mode uint32) (err error)
|
||||
//sys mknod(path string, mode uint32, dev int) (err error)
|
||||
//sys mknodat(fd int, path string, mode uint32, dev int) (err error)
|
||||
//sys mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error)
|
||||
//sys Mknodat(fd int, path string, mode uint32, dev uint64) (err error)
|
||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
|
||||
@ -658,9 +405,7 @@ func PtraceSingleStep(pid int) (err error) {
|
||||
//sysnb Setsid() (pid int, err error)
|
||||
//sysnb Settimeofday(tp *Timeval) (err error)
|
||||
//sysnb Setuid(uid int) (err error)
|
||||
//sys stat(path string, stat *stat_freebsd11_t) (err error)
|
||||
//sys statfs(path string, stat *statfs_freebsd11_t) (err error)
|
||||
//sys statfs_freebsd12(path string, stat *Statfs_t) (err error)
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error)
|
||||
//sys Symlink(path string, link string) (err error)
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Sync() (err error)
|
||||
|
||||
4
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
generated
vendored
@ -57,11 +57,11 @@ 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 PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
||||
return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
|
||||
return ptrace(PT_GETFSBASE, pid, uintptr(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(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
4
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
generated
vendored
@ -57,11 +57,11 @@ 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 PtraceGetFsBase(pid int, fsbase *int64) (err error) {
|
||||
return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
|
||||
return ptrace(PT_GETFSBASE, pid, uintptr(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(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
generated
vendored
@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
generated
vendored
@ -58,6 +58,6 @@ func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||
|
||||
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
|
||||
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
|
||||
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
|
||||
return int(ioDesc.Len), err
|
||||
}
|
||||
|
||||
5
vendor/golang.org/x/sys/unix/syscall_illumos.go
generated
vendored
5
vendor/golang.org/x/sys/unix/syscall_illumos.go
generated
vendored
@ -20,10 +20,9 @@ func bytes2iovec(bs [][]byte) []Iovec {
|
||||
for i, b := range bs {
|
||||
iovecs[i].SetLen(len(b))
|
||||
if len(b) > 0 {
|
||||
// somehow Iovec.Base on illumos is (*int8), not (*byte)
|
||||
iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0]))
|
||||
iovecs[i].Base = &b[0]
|
||||
} else {
|
||||
iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero))
|
||||
iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
}
|
||||
return iovecs
|
||||
|
||||
45
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
45
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -1499,18 +1499,13 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
|
||||
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
|
||||
//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
|
||||
|
||||
func recvmsgRaw(fd int, p, 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) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
if len(p) == 0 {
|
||||
if emptyIovecs(iov) {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
@ -1518,15 +1513,19 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
||||
}
|
||||
// receive at least one normal byte
|
||||
if sockType != SOCK_DGRAM {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = recvmsg(fd, &msg, flags); err != nil {
|
||||
return
|
||||
}
|
||||
@ -1535,18 +1534,15 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
||||
return
|
||||
}
|
||||
|
||||
func sendmsgN(fd int, p, 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) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(ptr)
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy byte
|
||||
var empty bool
|
||||
if len(oob) > 0 {
|
||||
if len(p) == 0 {
|
||||
empty := emptyIovecs(iov)
|
||||
if empty {
|
||||
var sockType int
|
||||
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
|
||||
if err != nil {
|
||||
@ -1554,19 +1550,22 @@ func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags i
|
||||
}
|
||||
// send at least one normal byte
|
||||
if sockType != SOCK_DGRAM {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
}
|
||||
}
|
||||
msg.Control = &oob[0]
|
||||
msg.SetControllen(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
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 && len(p) == 0 {
|
||||
if len(oob) > 0 && empty {
|
||||
n = 0
|
||||
}
|
||||
return n, nil
|
||||
|
||||
4
vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
generated
vendored
@ -26,6 +26,10 @@ 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)
|
||||
}
|
||||
|
||||
50
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
50
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@ -451,26 +451,25 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
||||
|
||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
|
||||
|
||||
func recvmsgRaw(fd int, p, 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) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(rsa))
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*int8)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy int8
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
// receive at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
if emptyIovecs(iov) {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Accrightslen = int32(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
if len(iov) > 0 {
|
||||
msg.Iov = &iov[0]
|
||||
msg.SetIovlen(len(iov))
|
||||
}
|
||||
if n, err = recvmsg(fd, &msg, flags); n == -1 {
|
||||
return
|
||||
}
|
||||
@ -480,30 +479,31 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
||||
|
||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
|
||||
|
||||
func sendmsgN(fd int, p, 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) {
|
||||
var msg Msghdr
|
||||
msg.Name = (*byte)(unsafe.Pointer(ptr))
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*int8)(unsafe.Pointer(&p[0]))
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy int8
|
||||
var dummy byte
|
||||
var empty bool
|
||||
if len(oob) > 0 {
|
||||
// send at least one normal byte
|
||||
if len(p) == 0 {
|
||||
iov.Base = &dummy
|
||||
iov.SetLen(1)
|
||||
empty = emptyIovecs(iov)
|
||||
if empty {
|
||||
var iova [1]Iovec
|
||||
iova[0].Base = &dummy
|
||||
iova[0].SetLen(1)
|
||||
iov = iova[:]
|
||||
}
|
||||
msg.Accrightslen = int32(len(oob))
|
||||
}
|
||||
msg.Iov = &iov
|
||||
msg.Iovlen = 1
|
||||
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 && len(p) == 0 {
|
||||
if len(oob) > 0 && empty {
|
||||
n = 0
|
||||
}
|
||||
return n, nil
|
||||
|
||||
74
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
74
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@ -338,8 +338,13 @@ func Recvfrom(fd int, p []byte, flags int) (n 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
|
||||
if len(p) > 0 {
|
||||
iov[0].Base = &p[0]
|
||||
iov[0].SetLen(len(p))
|
||||
}
|
||||
var rsa RawSockaddrAny
|
||||
n, oobn, recvflags, err = recvmsgRaw(fd, p, oob, flags, &rsa)
|
||||
n, oobn, recvflags, err = recvmsgRaw(fd, iov[:], oob, flags, &rsa)
|
||||
// source address is only specified if the socket is unconnected
|
||||
if rsa.Addr.Family != AF_UNSPEC {
|
||||
from, err = anyToSockaddr(fd, &rsa)
|
||||
@ -347,12 +352,42 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
||||
return
|
||||
}
|
||||
|
||||
// RecvmsgBuffers receives a message from a socket using the recvmsg
|
||||
// system call. The flags are passed to recvmsg. Any non-control data
|
||||
// read is scattered into the buffers slices. The results are:
|
||||
// - 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) {
|
||||
iov := make([]Iovec, len(buffers))
|
||||
for i := range buffers {
|
||||
if len(buffers[i]) > 0 {
|
||||
iov[i].Base = &buffers[i][0]
|
||||
iov[i].SetLen(len(buffers[i]))
|
||||
} else {
|
||||
iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
}
|
||||
var rsa RawSockaddrAny
|
||||
n, oobn, recvflags, err = recvmsgRaw(fd, iov, oob, flags, &rsa)
|
||||
if err == nil && rsa.Addr.Family != AF_UNSPEC {
|
||||
from, err = anyToSockaddr(fd, &rsa)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
||||
_, err = SendmsgN(fd, p, oob, to, flags)
|
||||
return
|
||||
}
|
||||
|
||||
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
||||
var iov [1]Iovec
|
||||
if len(p) > 0 {
|
||||
iov[0].Base = &p[0]
|
||||
iov[0].SetLen(len(p))
|
||||
}
|
||||
var ptr unsafe.Pointer
|
||||
var salen _Socklen
|
||||
if to != nil {
|
||||
@ -361,7 +396,32 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
return sendmsgN(fd, p, oob, ptr, salen, flags)
|
||||
return sendmsgN(fd, iov[:], oob, ptr, salen, flags)
|
||||
}
|
||||
|
||||
// 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
|
||||
// is gathered from buffers. The function returns the number of bytes written
|
||||
// to the socket.
|
||||
func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
||||
iov := make([]Iovec, len(buffers))
|
||||
for i := range buffers {
|
||||
if len(buffers[i]) > 0 {
|
||||
iov[i].Base = &buffers[i][0]
|
||||
iov[i].SetLen(len(buffers[i]))
|
||||
} else {
|
||||
iov[i].Base = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
}
|
||||
var ptr unsafe.Pointer
|
||||
var salen _Socklen
|
||||
if to != nil {
|
||||
ptr, salen, err = to.sockaddr()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
return sendmsgN(fd, iov, oob, ptr, salen, flags)
|
||||
}
|
||||
|
||||
func Send(s int, buf []byte, flags int) (err error) {
|
||||
@ -484,3 +544,13 @@ func Lutimes(path string, tv []Timeval) error {
|
||||
}
|
||||
return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
|
||||
// emptyIovec reports whether there are no bytes in the slice of Iovec.
|
||||
func emptyIovecs(iov []Iovec) bool {
|
||||
for i := range iov {
|
||||
if iov[i].Len > 0 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
109
vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
generated
vendored
109
vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
generated
vendored
@ -151,6 +151,7 @@ const (
|
||||
BIOCSETF = 0x80084267
|
||||
BIOCSETFNR = 0x80084282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8008427b
|
||||
BIOCSETZBUF = 0x800c4281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
@ -447,7 +448,7 @@ const (
|
||||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
@ -487,10 +488,11 @@ const (
|
||||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x113
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
@ -734,6 +736,7 @@ const (
|
||||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
@ -814,7 +817,6 @@ const (
|
||||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
@ -911,6 +913,7 @@ const (
|
||||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
@ -989,8 +992,12 @@ const (
|
||||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
@ -1000,7 +1007,6 @@ const (
|
||||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
@ -1179,6 +1185,8 @@ const (
|
||||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
@ -1189,6 +1197,10 @@ const (
|
||||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1196,6 +1208,60 @@ const (
|
||||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETFSBASE = 0x47
|
||||
PT_GETGSBASE = 0x49
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GETXMMREGS = 0x40
|
||||
PT_GETXSTATE = 0x45
|
||||
PT_GETXSTATE_INFO = 0x44
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETFSBASE = 0x48
|
||||
PT_SETGSBASE = 0x4a
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SETXMMREGS = 0x41
|
||||
PT_SETXSTATE = 0x46
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
@ -1320,10 +1386,12 @@ const (
|
||||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0086924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
@ -1414,6 +1482,7 @@ const (
|
||||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
@ -1472,22 +1541,40 @@ const (
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
@ -1496,12 +1583,18 @@ const (
|
||||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
@ -1541,6 +1634,7 @@ const (
|
||||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
@ -1554,7 +1648,6 @@ const (
|
||||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_SESS_CWV = 0x42a
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
@ -1694,12 +1787,13 @@ const (
|
||||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
@ -1842,7 +1936,7 @@ var errorList = [...]struct {
|
||||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
@ -1904,6 +1998,7 @@ var errorList = [...]struct {
|
||||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
||||
107
vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
generated
vendored
107
vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
generated
vendored
@ -151,6 +151,7 @@ const (
|
||||
BIOCSETF = 0x80104267
|
||||
BIOCSETFNR = 0x80104282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8010427b
|
||||
BIOCSETZBUF = 0x80184281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
@ -447,7 +448,7 @@ const (
|
||||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
@ -487,10 +488,11 @@ const (
|
||||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x113
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
@ -734,6 +736,7 @@ const (
|
||||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
@ -814,7 +817,6 @@ const (
|
||||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
@ -911,6 +913,7 @@ const (
|
||||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
@ -989,8 +992,12 @@ const (
|
||||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
@ -1000,7 +1007,6 @@ const (
|
||||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
@ -1180,6 +1186,8 @@ const (
|
||||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
@ -1190,6 +1198,10 @@ const (
|
||||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1197,6 +1209,58 @@ const (
|
||||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETFSBASE = 0x47
|
||||
PT_GETGSBASE = 0x49
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GETXSTATE = 0x45
|
||||
PT_GETXSTATE_INFO = 0x44
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETFSBASE = 0x48
|
||||
PT_SETGSBASE = 0x4a
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SETXSTATE = 0x46
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
@ -1321,10 +1385,12 @@ const (
|
||||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0106924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
@ -1415,6 +1481,7 @@ const (
|
||||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
@ -1473,22 +1540,40 @@ const (
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
@ -1497,12 +1582,18 @@ const (
|
||||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
@ -1542,6 +1633,7 @@ const (
|
||||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
@ -1555,7 +1647,6 @@ const (
|
||||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_SESS_CWV = 0x42a
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
@ -1693,12 +1784,13 @@ const (
|
||||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
@ -1841,7 +1933,7 @@ var errorList = [...]struct {
|
||||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
@ -1903,6 +1995,7 @@ var errorList = [...]struct {
|
||||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
||||
220
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
generated
vendored
220
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
generated
vendored
@ -151,6 +151,7 @@ const (
|
||||
BIOCSETF = 0x80084267
|
||||
BIOCSETFNR = 0x80084282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8008427b
|
||||
BIOCSETZBUF = 0x800c4281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
@ -362,7 +363,7 @@ const (
|
||||
CTL_KERN = 0x1
|
||||
CTL_MAXNAME = 0x18
|
||||
CTL_NET = 0x4
|
||||
DIOCGATTR = 0xc144648e
|
||||
DIOCGATTR = 0xc148648e
|
||||
DIOCGDELETE = 0x80106488
|
||||
DIOCGFLUSH = 0x20006487
|
||||
DIOCGFRONTSTUFF = 0x40086486
|
||||
@ -377,7 +378,7 @@ const (
|
||||
DIOCGSTRIPESIZE = 0x4008648b
|
||||
DIOCSKERNELDUMP = 0x804c6490
|
||||
DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
|
||||
DIOCZONECMD = 0xc06c648f
|
||||
DIOCZONECMD = 0xc078648f
|
||||
DLT_A429 = 0xb8
|
||||
DLT_A653_ICM = 0xb9
|
||||
DLT_AIRONET_HEADER = 0x78
|
||||
@ -407,7 +408,9 @@ const (
|
||||
DLT_C_HDLC_WITH_DIR = 0xcd
|
||||
DLT_DBUS = 0xe7
|
||||
DLT_DECT = 0xdd
|
||||
DLT_DISPLAYPORT_AUX = 0x113
|
||||
DLT_DOCSIS = 0x8f
|
||||
DLT_DOCSIS31_XRA31 = 0x111
|
||||
DLT_DVB_CI = 0xeb
|
||||
DLT_ECONET = 0x73
|
||||
DLT_EN10MB = 0x1
|
||||
@ -417,6 +420,7 @@ const (
|
||||
DLT_ERF = 0xc5
|
||||
DLT_ERF_ETH = 0xaf
|
||||
DLT_ERF_POS = 0xb0
|
||||
DLT_ETHERNET_MPACKET = 0x112
|
||||
DLT_FC_2 = 0xe0
|
||||
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
|
||||
DLT_FDDI = 0xa
|
||||
@ -444,7 +448,7 @@ const (
|
||||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
@ -484,9 +488,11 @@ const (
|
||||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x109
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
@ -502,7 +508,9 @@ const (
|
||||
DLT_NFC_LLCP = 0xf5
|
||||
DLT_NFLOG = 0xef
|
||||
DLT_NG40 = 0xf4
|
||||
DLT_NORDIC_BLE = 0x110
|
||||
DLT_NULL = 0x0
|
||||
DLT_OPENFLOW = 0x10b
|
||||
DLT_PCI_EXP = 0x7d
|
||||
DLT_PFLOG = 0x75
|
||||
DLT_PFSYNC = 0x79
|
||||
@ -526,15 +534,18 @@ const (
|
||||
DLT_RTAC_SERIAL = 0xfa
|
||||
DLT_SCCP = 0x8e
|
||||
DLT_SCTP = 0xf8
|
||||
DLT_SDLC = 0x10c
|
||||
DLT_SITA = 0xc4
|
||||
DLT_SLIP = 0x8
|
||||
DLT_SLIP_BSDOS = 0xd
|
||||
DLT_STANAG_5066_D_PDU = 0xed
|
||||
DLT_SUNATM = 0x7b
|
||||
DLT_SYMANTEC_FIREWALL = 0x63
|
||||
DLT_TI_LLN_SNIFFER = 0x10d
|
||||
DLT_TZSP = 0x80
|
||||
DLT_USB = 0xba
|
||||
DLT_USBPCAP = 0xf9
|
||||
DLT_USB_DARWIN = 0x10a
|
||||
DLT_USB_FREEBSD = 0xba
|
||||
DLT_USB_LINUX = 0xbd
|
||||
DLT_USB_LINUX_MMAPPED = 0xdc
|
||||
@ -554,6 +565,7 @@ const (
|
||||
DLT_USER7 = 0x9a
|
||||
DLT_USER8 = 0x9b
|
||||
DLT_USER9 = 0x9c
|
||||
DLT_VSOCK = 0x10f
|
||||
DLT_WATTSTOPPER_DLM = 0x107
|
||||
DLT_WIHART = 0xdf
|
||||
DLT_WIRESHARK_UPPER_PDU = 0xfc
|
||||
@ -578,6 +590,7 @@ const (
|
||||
ECHONL = 0x10
|
||||
ECHOPRT = 0x20
|
||||
EVFILT_AIO = -0x3
|
||||
EVFILT_EMPTY = -0xd
|
||||
EVFILT_FS = -0x9
|
||||
EVFILT_LIO = -0xa
|
||||
EVFILT_PROC = -0x5
|
||||
@ -585,11 +598,12 @@ const (
|
||||
EVFILT_READ = -0x1
|
||||
EVFILT_SENDFILE = -0xc
|
||||
EVFILT_SIGNAL = -0x6
|
||||
EVFILT_SYSCOUNT = 0xc
|
||||
EVFILT_SYSCOUNT = 0xd
|
||||
EVFILT_TIMER = -0x7
|
||||
EVFILT_USER = -0xb
|
||||
EVFILT_VNODE = -0x4
|
||||
EVFILT_WRITE = -0x2
|
||||
EVNAMEMAP_NAME_SIZE = 0x40
|
||||
EV_ADD = 0x1
|
||||
EV_CLEAR = 0x20
|
||||
EV_DELETE = 0x2
|
||||
@ -606,6 +620,7 @@ const (
|
||||
EV_RECEIPT = 0x40
|
||||
EV_SYSFLAGS = 0xf000
|
||||
EXTA = 0x4b00
|
||||
EXTATTR_MAXNAMELEN = 0xff
|
||||
EXTATTR_NAMESPACE_EMPTY = 0x0
|
||||
EXTATTR_NAMESPACE_SYSTEM = 0x2
|
||||
EXTATTR_NAMESPACE_USER = 0x1
|
||||
@ -647,6 +662,7 @@ const (
|
||||
IEXTEN = 0x400
|
||||
IFAN_ARRIVAL = 0x0
|
||||
IFAN_DEPARTURE = 0x1
|
||||
IFCAP_WOL_MAGIC = 0x2000
|
||||
IFF_ALLMULTI = 0x200
|
||||
IFF_ALTPHYS = 0x4000
|
||||
IFF_BROADCAST = 0x2
|
||||
@ -663,6 +679,7 @@ const (
|
||||
IFF_MONITOR = 0x40000
|
||||
IFF_MULTICAST = 0x8000
|
||||
IFF_NOARP = 0x80
|
||||
IFF_NOGROUP = 0x800000
|
||||
IFF_OACTIVE = 0x400
|
||||
IFF_POINTOPOINT = 0x10
|
||||
IFF_PPROMISC = 0x20000
|
||||
@ -719,6 +736,7 @@ const (
|
||||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
@ -799,7 +817,6 @@ const (
|
||||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
@ -837,6 +854,7 @@ const (
|
||||
IPV6_DSTOPTS = 0x32
|
||||
IPV6_FLOWID = 0x43
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_LEN = 0x14
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FLOWTYPE = 0x44
|
||||
IPV6_FRAGTTL = 0x78
|
||||
@ -857,13 +875,13 @@ const (
|
||||
IPV6_MAX_GROUP_SRC_FILTER = 0x200
|
||||
IPV6_MAX_MEMBERSHIPS = 0xfff
|
||||
IPV6_MAX_SOCK_SRC_FILTER = 0x80
|
||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||
IPV6_MMTU = 0x500
|
||||
IPV6_MSFILTER = 0x4a
|
||||
IPV6_MULTICAST_HOPS = 0xa
|
||||
IPV6_MULTICAST_IF = 0x9
|
||||
IPV6_MULTICAST_LOOP = 0xb
|
||||
IPV6_NEXTHOP = 0x30
|
||||
IPV6_ORIGDSTADDR = 0x48
|
||||
IPV6_PATHMTU = 0x2c
|
||||
IPV6_PKTINFO = 0x2e
|
||||
IPV6_PORTRANGE = 0xe
|
||||
@ -875,6 +893,7 @@ const (
|
||||
IPV6_RECVFLOWID = 0x46
|
||||
IPV6_RECVHOPLIMIT = 0x25
|
||||
IPV6_RECVHOPOPTS = 0x27
|
||||
IPV6_RECVORIGDSTADDR = 0x48
|
||||
IPV6_RECVPATHMTU = 0x2b
|
||||
IPV6_RECVPKTINFO = 0x24
|
||||
IPV6_RECVRSSBUCKETID = 0x47
|
||||
@ -894,6 +913,7 @@ const (
|
||||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
@ -935,10 +955,8 @@ const (
|
||||
IP_MAX_MEMBERSHIPS = 0xfff
|
||||
IP_MAX_SOCK_MUTE_FILTER = 0x80
|
||||
IP_MAX_SOCK_SRC_FILTER = 0x80
|
||||
IP_MAX_SOURCE_FILTER = 0x400
|
||||
IP_MF = 0x2000
|
||||
IP_MINTTL = 0x42
|
||||
IP_MIN_MEMBERSHIPS = 0x1f
|
||||
IP_MSFILTER = 0x4a
|
||||
IP_MSS = 0x240
|
||||
IP_MULTICAST_IF = 0x9
|
||||
@ -948,6 +966,7 @@ const (
|
||||
IP_OFFMASK = 0x1fff
|
||||
IP_ONESBCAST = 0x17
|
||||
IP_OPTIONS = 0x1
|
||||
IP_ORIGDSTADDR = 0x1b
|
||||
IP_PORTRANGE = 0x13
|
||||
IP_PORTRANGE_DEFAULT = 0x0
|
||||
IP_PORTRANGE_HIGH = 0x1
|
||||
@ -956,6 +975,7 @@ const (
|
||||
IP_RECVFLOWID = 0x5d
|
||||
IP_RECVIF = 0x14
|
||||
IP_RECVOPTS = 0x5
|
||||
IP_RECVORIGDSTADDR = 0x1b
|
||||
IP_RECVRETOPTS = 0x6
|
||||
IP_RECVRSSBUCKETID = 0x5e
|
||||
IP_RECVTOS = 0x44
|
||||
@ -972,8 +992,12 @@ const (
|
||||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
@ -983,7 +1007,6 @@ const (
|
||||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
@ -1071,10 +1094,12 @@ const (
|
||||
MNT_SUSPEND = 0x4
|
||||
MNT_SYNCHRONOUS = 0x2
|
||||
MNT_UNION = 0x20
|
||||
MNT_UNTRUSTED = 0x800000000
|
||||
MNT_UPDATE = 0x10000
|
||||
MNT_UPDATEMASK = 0x2d8d0807e
|
||||
MNT_UPDATEMASK = 0xad8d0807e
|
||||
MNT_USER = 0x8000
|
||||
MNT_VISFLAGMASK = 0x3fef0ffff
|
||||
MNT_VERIFIED = 0x400000000
|
||||
MNT_VISFLAGMASK = 0xffef0ffff
|
||||
MNT_WAIT = 0x1
|
||||
MSG_CMSG_CLOEXEC = 0x40000
|
||||
MSG_COMPAT = 0x8000
|
||||
@ -1103,6 +1128,7 @@ const (
|
||||
NFDBITS = 0x20
|
||||
NOFLSH = 0x80000000
|
||||
NOKERNINFO = 0x2000000
|
||||
NOTE_ABSTIME = 0x10
|
||||
NOTE_ATTRIB = 0x8
|
||||
NOTE_CHILD = 0x4
|
||||
NOTE_CLOSE = 0x100
|
||||
@ -1159,6 +1185,8 @@ const (
|
||||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
@ -1169,6 +1197,10 @@ const (
|
||||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1176,6 +1208,53 @@ const (
|
||||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GETVFPREGS = 0x40
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SETVFPREGS = 0x41
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
@ -1257,7 +1336,6 @@ const (
|
||||
RTV_WEIGHT = 0x100
|
||||
RT_ALL_FIBS = -0x1
|
||||
RT_BLACKHOLE = 0x40
|
||||
RT_CACHING_CONTEXT = 0x1
|
||||
RT_DEFAULT_FIB = 0x0
|
||||
RT_HAS_GW = 0x80
|
||||
RT_HAS_HEADER = 0x10
|
||||
@ -1267,15 +1345,17 @@ const (
|
||||
RT_LLE_CACHE = 0x100
|
||||
RT_MAY_LOOP = 0x8
|
||||
RT_MAY_LOOP_BIT = 0x3
|
||||
RT_NORTREF = 0x2
|
||||
RT_REJECT = 0x20
|
||||
RUSAGE_CHILDREN = -0x1
|
||||
RUSAGE_SELF = 0x0
|
||||
RUSAGE_THREAD = 0x1
|
||||
SCM_BINTIME = 0x4
|
||||
SCM_CREDS = 0x3
|
||||
SCM_MONOTONIC = 0x6
|
||||
SCM_REALTIME = 0x5
|
||||
SCM_RIGHTS = 0x1
|
||||
SCM_TIMESTAMP = 0x2
|
||||
SCM_TIME_INFO = 0x7
|
||||
SEEK_CUR = 0x1
|
||||
SEEK_DATA = 0x3
|
||||
SEEK_END = 0x2
|
||||
@ -1299,10 +1379,12 @@ const (
|
||||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0086924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
@ -1318,8 +1400,11 @@ const (
|
||||
SIOCGIFPDSTADDR = 0xc0206948
|
||||
SIOCGIFPHYS = 0xc0206935
|
||||
SIOCGIFPSRCADDR = 0xc0206947
|
||||
SIOCGIFRSSHASH = 0xc0186997
|
||||
SIOCGIFRSSKEY = 0xc0946996
|
||||
SIOCGIFSTATUS = 0xc331693b
|
||||
SIOCGIFXMEDIA = 0xc028698b
|
||||
SIOCGLANPCP = 0xc0206998
|
||||
SIOCGLOWAT = 0x40047303
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGPRIVATE_0 = 0xc0206950
|
||||
@ -1350,6 +1435,7 @@ const (
|
||||
SIOCSIFPHYS = 0x80206936
|
||||
SIOCSIFRVNET = 0xc020695b
|
||||
SIOCSIFVNET = 0xc020695a
|
||||
SIOCSLANPCP = 0x80206999
|
||||
SIOCSLOWAT = 0x80047302
|
||||
SIOCSPGRP = 0x80047308
|
||||
SIOCSTUNFIB = 0x8020695f
|
||||
@ -1369,6 +1455,7 @@ const (
|
||||
SO_BINTIME = 0x2000
|
||||
SO_BROADCAST = 0x20
|
||||
SO_DEBUG = 0x1
|
||||
SO_DOMAIN = 0x1019
|
||||
SO_DONTROUTE = 0x10
|
||||
SO_ERROR = 0x1007
|
||||
SO_KEEPALIVE = 0x8
|
||||
@ -1377,6 +1464,7 @@ const (
|
||||
SO_LISTENINCQLEN = 0x1013
|
||||
SO_LISTENQLEN = 0x1012
|
||||
SO_LISTENQLIMIT = 0x1011
|
||||
SO_MAX_PACING_RATE = 0x1018
|
||||
SO_NOSIGPIPE = 0x800
|
||||
SO_NO_DDP = 0x8000
|
||||
SO_NO_OFFLOAD = 0x4000
|
||||
@ -1387,13 +1475,22 @@ const (
|
||||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
SO_SETFIB = 0x1014
|
||||
SO_SNDBUF = 0x1001
|
||||
SO_SNDLOWAT = 0x1003
|
||||
SO_SNDTIMEO = 0x1005
|
||||
SO_TIMESTAMP = 0x400
|
||||
SO_TS_BINTIME = 0x1
|
||||
SO_TS_CLOCK = 0x1017
|
||||
SO_TS_CLOCK_MAX = 0x3
|
||||
SO_TS_DEFAULT = 0x0
|
||||
SO_TS_MONOTONIC = 0x3
|
||||
SO_TS_REALTIME = 0x2
|
||||
SO_TS_REALTIME_MICRO = 0x0
|
||||
SO_TYPE = 0x1008
|
||||
SO_USELOOPBACK = 0x40
|
||||
SO_USER_COOKIE = 0x1015
|
||||
@ -1437,10 +1534,69 @@ const (
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
TCP_BBR_RACK_RTT_USE = 0x44a
|
||||
TCP_BBR_RECFORCE = 0x42c
|
||||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
TCP_DATA_AFTER_CLOSE = 0x44c
|
||||
TCP_DELACK = 0x48
|
||||
TCP_FASTOPEN = 0x401
|
||||
TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
|
||||
TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
|
||||
TCP_FASTOPEN_PSK_LEN = 0x10
|
||||
TCP_FUNCTION_BLK = 0x2000
|
||||
TCP_FUNCTION_NAME_LEN_MAX = 0x20
|
||||
TCP_INFO = 0x20
|
||||
@ -1448,6 +1604,12 @@ const (
|
||||
TCP_KEEPIDLE = 0x100
|
||||
TCP_KEEPINIT = 0x80
|
||||
TCP_KEEPINTVL = 0x200
|
||||
TCP_LOG = 0x22
|
||||
TCP_LOGBUF = 0x23
|
||||
TCP_LOGDUMP = 0x25
|
||||
TCP_LOGDUMPID = 0x26
|
||||
TCP_LOGID = 0x24
|
||||
TCP_LOG_ID_LEN = 0x40
|
||||
TCP_MAXBURST = 0x4
|
||||
TCP_MAXHLEN = 0x3c
|
||||
TCP_MAXOLEN = 0x28
|
||||
@ -1463,8 +1625,30 @@ const (
|
||||
TCP_NOPUSH = 0x4
|
||||
TCP_PCAP_IN = 0x1000
|
||||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
TCP_RACK_MIN_TO = 0x422
|
||||
TCP_RACK_PACE_ALWAYS = 0x41f
|
||||
TCP_RACK_PACE_MAX_SEG = 0x41e
|
||||
TCP_RACK_PACE_REDUCE = 0x41d
|
||||
TCP_RACK_PKT_DELAY = 0x428
|
||||
TCP_RACK_PROP = 0x41b
|
||||
TCP_RACK_PROP_RATE = 0x420
|
||||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
TCP_RACK_TLP_USE = 0x447
|
||||
TCP_VENDOR = 0x80000000
|
||||
TCSAFLUSH = 0x2
|
||||
TIMER_ABSTIME = 0x1
|
||||
TIMER_RELTIME = 0x0
|
||||
TIOCCBRK = 0x2000747a
|
||||
TIOCCDTR = 0x20007478
|
||||
TIOCCONS = 0x80047462
|
||||
@ -1528,6 +1712,8 @@ const (
|
||||
TIOCTIMESTAMP = 0x40107459
|
||||
TIOCUCNTL = 0x80047466
|
||||
TOSTOP = 0x400000
|
||||
UTIME_NOW = -0x1
|
||||
UTIME_OMIT = -0x2
|
||||
VDISCARD = 0xf
|
||||
VDSUSP = 0xb
|
||||
VEOF = 0x0
|
||||
@ -1592,12 +1778,13 @@ const (
|
||||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
@ -1740,7 +1927,7 @@ var errorList = [...]struct {
|
||||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
@ -1802,6 +1989,7 @@ var errorList = [...]struct {
|
||||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
||||
100
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
generated
vendored
100
vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
generated
vendored
@ -151,6 +151,7 @@ const (
|
||||
BIOCSETF = 0x80104267
|
||||
BIOCSETFNR = 0x80104282
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSETVLANPCP = 0x80044285
|
||||
BIOCSETWF = 0x8010427b
|
||||
BIOCSETZBUF = 0x80184281
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
@ -447,7 +448,7 @@ const (
|
||||
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
|
||||
DLT_INFINIBAND = 0xf7
|
||||
DLT_IPFILTER = 0x74
|
||||
DLT_IPMB = 0xc7
|
||||
DLT_IPMB_KONTRON = 0xc7
|
||||
DLT_IPMB_LINUX = 0xd1
|
||||
DLT_IPMI_HPM_2 = 0x104
|
||||
DLT_IPNET = 0xe2
|
||||
@ -487,10 +488,11 @@ const (
|
||||
DLT_LINUX_LAPD = 0xb1
|
||||
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
|
||||
DLT_LINUX_SLL = 0x71
|
||||
DLT_LINUX_SLL2 = 0x114
|
||||
DLT_LOOP = 0x6c
|
||||
DLT_LORATAP = 0x10e
|
||||
DLT_LTALK = 0x72
|
||||
DLT_MATCHING_MAX = 0x113
|
||||
DLT_MATCHING_MAX = 0x114
|
||||
DLT_MATCHING_MIN = 0x68
|
||||
DLT_MFR = 0xb6
|
||||
DLT_MOST = 0xd3
|
||||
@ -734,6 +736,7 @@ const (
|
||||
IPPROTO_CMTP = 0x26
|
||||
IPPROTO_CPHB = 0x49
|
||||
IPPROTO_CPNX = 0x48
|
||||
IPPROTO_DCCP = 0x21
|
||||
IPPROTO_DDP = 0x25
|
||||
IPPROTO_DGP = 0x56
|
||||
IPPROTO_DIVERT = 0x102
|
||||
@ -814,7 +817,6 @@ const (
|
||||
IPPROTO_SCTP = 0x84
|
||||
IPPROTO_SDRP = 0x2a
|
||||
IPPROTO_SEND = 0x103
|
||||
IPPROTO_SEP = 0x21
|
||||
IPPROTO_SHIM6 = 0x8c
|
||||
IPPROTO_SKIP = 0x39
|
||||
IPPROTO_SPACER = 0x7fff
|
||||
@ -911,6 +913,7 @@ const (
|
||||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
IPV6_VLAN_PCP = 0x4b
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_ADD_SOURCE_MEMBERSHIP = 0x46
|
||||
IP_BINDANY = 0x18
|
||||
@ -989,8 +992,12 @@ const (
|
||||
IP_TOS = 0x3
|
||||
IP_TTL = 0x4
|
||||
IP_UNBLOCK_SOURCE = 0x49
|
||||
IP_VLAN_PCP = 0x4b
|
||||
ISIG = 0x80
|
||||
ISTRIP = 0x20
|
||||
ITIMER_PROF = 0x2
|
||||
ITIMER_REAL = 0x0
|
||||
ITIMER_VIRTUAL = 0x1
|
||||
IXANY = 0x800
|
||||
IXOFF = 0x400
|
||||
IXON = 0x200
|
||||
@ -1000,7 +1007,6 @@ const (
|
||||
KERN_VERSION = 0x4
|
||||
LOCAL_CONNWAIT = 0x4
|
||||
LOCAL_CREDS = 0x2
|
||||
LOCAL_CREDS_PERSISTENT = 0x3
|
||||
LOCAL_PEERCRED = 0x1
|
||||
LOCAL_VENDOR = 0x80000000
|
||||
LOCK_EX = 0x2
|
||||
@ -1180,6 +1186,8 @@ const (
|
||||
O_NONBLOCK = 0x4
|
||||
O_RDONLY = 0x0
|
||||
O_RDWR = 0x2
|
||||
O_RESOLVE_BENEATH = 0x800000
|
||||
O_SEARCH = 0x40000
|
||||
O_SHLOCK = 0x10
|
||||
O_SYNC = 0x80
|
||||
O_TRUNC = 0x400
|
||||
@ -1190,6 +1198,10 @@ const (
|
||||
PARMRK = 0x8
|
||||
PARODD = 0x2000
|
||||
PENDIN = 0x20000000
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_WRITE_I = 0x4
|
||||
PRIO_PGRP = 0x1
|
||||
PRIO_PROCESS = 0x0
|
||||
PRIO_USER = 0x2
|
||||
@ -1197,6 +1209,51 @@ const (
|
||||
PROT_NONE = 0x0
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
PTRACE_DEFAULT = 0x1
|
||||
PTRACE_EXEC = 0x1
|
||||
PTRACE_FORK = 0x8
|
||||
PTRACE_LWP = 0x10
|
||||
PTRACE_SCE = 0x2
|
||||
PTRACE_SCX = 0x4
|
||||
PTRACE_SYSCALL = 0x6
|
||||
PTRACE_VFORK = 0x20
|
||||
PT_ATTACH = 0xa
|
||||
PT_CLEARSTEP = 0x10
|
||||
PT_CONTINUE = 0x7
|
||||
PT_DETACH = 0xb
|
||||
PT_FIRSTMACH = 0x40
|
||||
PT_FOLLOW_FORK = 0x17
|
||||
PT_GETDBREGS = 0x25
|
||||
PT_GETFPREGS = 0x23
|
||||
PT_GETLWPLIST = 0xf
|
||||
PT_GETNUMLWPS = 0xe
|
||||
PT_GETREGS = 0x21
|
||||
PT_GET_EVENT_MASK = 0x19
|
||||
PT_GET_SC_ARGS = 0x1b
|
||||
PT_GET_SC_RET = 0x1c
|
||||
PT_IO = 0xc
|
||||
PT_KILL = 0x8
|
||||
PT_LWPINFO = 0xd
|
||||
PT_LWP_EVENTS = 0x18
|
||||
PT_READ_D = 0x2
|
||||
PT_READ_I = 0x1
|
||||
PT_RESUME = 0x13
|
||||
PT_SETDBREGS = 0x26
|
||||
PT_SETFPREGS = 0x24
|
||||
PT_SETREGS = 0x22
|
||||
PT_SETSTEP = 0x11
|
||||
PT_SET_EVENT_MASK = 0x1a
|
||||
PT_STEP = 0x9
|
||||
PT_SUSPEND = 0x12
|
||||
PT_SYSCALL = 0x16
|
||||
PT_TO_SCE = 0x14
|
||||
PT_TO_SCX = 0x15
|
||||
PT_TRACE_ME = 0x0
|
||||
PT_VM_ENTRY = 0x29
|
||||
PT_VM_TIMESTAMP = 0x28
|
||||
PT_WRITE_D = 0x5
|
||||
PT_WRITE_I = 0x4
|
||||
P_ZONEID = 0xc
|
||||
RLIMIT_AS = 0xa
|
||||
RLIMIT_CORE = 0x4
|
||||
RLIMIT_CPU = 0x0
|
||||
@ -1321,10 +1378,12 @@ const (
|
||||
SIOCGHWADDR = 0xc020693e
|
||||
SIOCGI2C = 0xc020693d
|
||||
SIOCGIFADDR = 0xc0206921
|
||||
SIOCGIFALIAS = 0xc044692d
|
||||
SIOCGIFBRDADDR = 0xc0206923
|
||||
SIOCGIFCAP = 0xc020691f
|
||||
SIOCGIFCONF = 0xc0106924
|
||||
SIOCGIFDESCR = 0xc020692a
|
||||
SIOCGIFDOWNREASON = 0xc058699a
|
||||
SIOCGIFDSTADDR = 0xc0206922
|
||||
SIOCGIFFIB = 0xc020695c
|
||||
SIOCGIFFLAGS = 0xc0206911
|
||||
@ -1415,6 +1474,7 @@ const (
|
||||
SO_RCVBUF = 0x1002
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RERROR = 0x20000
|
||||
SO_REUSEADDR = 0x4
|
||||
SO_REUSEPORT = 0x200
|
||||
SO_REUSEPORT_LB = 0x10000
|
||||
@ -1473,22 +1533,40 @@ const (
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCPOPT_EOL = 0x0
|
||||
TCPOPT_FAST_OPEN = 0x22
|
||||
TCPOPT_MAXSEG = 0x2
|
||||
TCPOPT_NOP = 0x1
|
||||
TCPOPT_PAD = 0x0
|
||||
TCPOPT_SACK = 0x5
|
||||
TCPOPT_SACK_PERMITTED = 0x4
|
||||
TCPOPT_SIGNATURE = 0x13
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_BBR_ACK_COMP_ALG = 0x448
|
||||
TCP_BBR_ALGORITHM = 0x43b
|
||||
TCP_BBR_DRAIN_INC_EXTRA = 0x43c
|
||||
TCP_BBR_DRAIN_PG = 0x42e
|
||||
TCP_BBR_EXTRA_GAIN = 0x449
|
||||
TCP_BBR_EXTRA_STATE = 0x453
|
||||
TCP_BBR_FLOOR_MIN_TSO = 0x454
|
||||
TCP_BBR_HDWR_PACE = 0x451
|
||||
TCP_BBR_HOLD_TARGET = 0x436
|
||||
TCP_BBR_IWINTSO = 0x42b
|
||||
TCP_BBR_LOWGAIN_FD = 0x436
|
||||
TCP_BBR_LOWGAIN_HALF = 0x435
|
||||
TCP_BBR_LOWGAIN_THRESH = 0x434
|
||||
TCP_BBR_MAX_RTO = 0x439
|
||||
TCP_BBR_MIN_RTO = 0x438
|
||||
TCP_BBR_MIN_TOPACEOUT = 0x455
|
||||
TCP_BBR_ONE_RETRAN = 0x431
|
||||
TCP_BBR_PACE_CROSS = 0x442
|
||||
TCP_BBR_PACE_DEL_TAR = 0x43f
|
||||
TCP_BBR_PACE_OH = 0x435
|
||||
TCP_BBR_PACE_PER_SEC = 0x43e
|
||||
TCP_BBR_PACE_SEG_MAX = 0x440
|
||||
TCP_BBR_PACE_SEG_MIN = 0x441
|
||||
TCP_BBR_POLICER_DETECT = 0x457
|
||||
TCP_BBR_PROBE_RTT_GAIN = 0x44d
|
||||
TCP_BBR_PROBE_RTT_INT = 0x430
|
||||
TCP_BBR_PROBE_RTT_LEN = 0x44e
|
||||
@ -1497,12 +1575,18 @@ const (
|
||||
TCP_BBR_REC_OVER_HPTS = 0x43a
|
||||
TCP_BBR_RETRAN_WTSO = 0x44b
|
||||
TCP_BBR_RWND_IS_APP = 0x42f
|
||||
TCP_BBR_SEND_IWND_IN_TSO = 0x44f
|
||||
TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
|
||||
TCP_BBR_STARTUP_LOSS_EXIT = 0x432
|
||||
TCP_BBR_STARTUP_PG = 0x42d
|
||||
TCP_BBR_TMR_PACE_OH = 0x448
|
||||
TCP_BBR_TSLIMITS = 0x434
|
||||
TCP_BBR_TSTMP_RAISES = 0x456
|
||||
TCP_BBR_UNLIMITED = 0x43b
|
||||
TCP_BBR_USEDEL_RATE = 0x437
|
||||
TCP_BBR_USE_LOWGAIN = 0x433
|
||||
TCP_BBR_USE_RACK_CHEAT = 0x450
|
||||
TCP_BBR_UTTER_MAX_TSO = 0x452
|
||||
TCP_CA_NAME_MAX = 0x10
|
||||
TCP_CCALGOOPT = 0x41
|
||||
TCP_CONGESTION = 0x40
|
||||
@ -1542,6 +1626,7 @@ const (
|
||||
TCP_PCAP_OUT = 0x800
|
||||
TCP_RACK_EARLY_RECOV = 0x423
|
||||
TCP_RACK_EARLY_SEG = 0x424
|
||||
TCP_RACK_GP_INCREASE = 0x446
|
||||
TCP_RACK_IDLE_REDUCE_HIGH = 0x444
|
||||
TCP_RACK_MIN_PACE = 0x445
|
||||
TCP_RACK_MIN_PACE_SEG = 0x446
|
||||
@ -1555,7 +1640,6 @@ const (
|
||||
TCP_RACK_PRR_SENDALOT = 0x421
|
||||
TCP_RACK_REORD_FADE = 0x426
|
||||
TCP_RACK_REORD_THRESH = 0x425
|
||||
TCP_RACK_SESS_CWV = 0x42a
|
||||
TCP_RACK_TLP_INC_VAR = 0x429
|
||||
TCP_RACK_TLP_REDUCE = 0x41c
|
||||
TCP_RACK_TLP_THRESH = 0x427
|
||||
@ -1694,12 +1778,13 @@ const (
|
||||
EIDRM = syscall.Errno(0x52)
|
||||
EILSEQ = syscall.Errno(0x56)
|
||||
EINPROGRESS = syscall.Errno(0x24)
|
||||
EINTEGRITY = syscall.Errno(0x61)
|
||||
EINTR = syscall.Errno(0x4)
|
||||
EINVAL = syscall.Errno(0x16)
|
||||
EIO = syscall.Errno(0x5)
|
||||
EISCONN = syscall.Errno(0x38)
|
||||
EISDIR = syscall.Errno(0x15)
|
||||
ELAST = syscall.Errno(0x60)
|
||||
ELAST = syscall.Errno(0x61)
|
||||
ELOOP = syscall.Errno(0x3e)
|
||||
EMFILE = syscall.Errno(0x18)
|
||||
EMLINK = syscall.Errno(0x1f)
|
||||
@ -1842,7 +1927,7 @@ var errorList = [...]struct {
|
||||
{32, "EPIPE", "broken pipe"},
|
||||
{33, "EDOM", "numerical argument out of domain"},
|
||||
{34, "ERANGE", "result too large"},
|
||||
{35, "EAGAIN", "resource temporarily unavailable"},
|
||||
{35, "EWOULDBLOCK", "resource temporarily unavailable"},
|
||||
{36, "EINPROGRESS", "operation now in progress"},
|
||||
{37, "EALREADY", "operation already in progress"},
|
||||
{38, "ENOTSOCK", "socket operation on non-socket"},
|
||||
@ -1904,6 +1989,7 @@ var errorList = [...]struct {
|
||||
{94, "ECAPMODE", "not permitted in capability mode"},
|
||||
{95, "ENOTRECOVERABLE", "state not recoverable"},
|
||||
{96, "EOWNERDEAD", "previous owner died"},
|
||||
{97, "EINTEGRITY", "integrity check failed"},
|
||||
}
|
||||
|
||||
// Signal table
|
||||
|
||||
141
vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
generated
vendored
141
vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
generated
vendored
@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
|
||||
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
func Fstatfs(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fsync(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdtablesize() (size int) {
|
||||
r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
|
||||
size = int(r0)
|
||||
@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func lstat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mkdir(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1317,43 +1250,13 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknod(path string, mode uint32, dev int) (err error) {
|
||||
func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat(fd int, path string, mode uint32, dev int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 0)
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func stat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlink(path string, link string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
||||
139
vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
generated
vendored
139
vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
generated
vendored
@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
|
||||
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
func Fstatfs(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fsync(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdtablesize() (size int) {
|
||||
r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
|
||||
size = int(r0)
|
||||
@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func lstat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mkdir(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1317,22 +1250,7 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknod(path string, mode uint32, dev int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat(fd int, path string, mode uint32, dev int) (err error) {
|
||||
func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -1347,21 +1265,6 @@ func mknodat(fd int, path string, mode uint32, dev int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func stat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlink(path string, link string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
||||
173
vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
generated
vendored
173
vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
generated
vendored
@ -351,22 +351,6 @@ func Munlockall() (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pipe2(p *[2]_C_int, flags int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
||||
if e1 != 0 {
|
||||
@ -404,6 +388,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(mib) > 0 {
|
||||
_p0 = unsafe.Pointer(&mib[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
|
||||
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
func Fstatfs(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fsync(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdtablesize() (size int) {
|
||||
r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
|
||||
size = int(r0)
|
||||
@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func lstat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mkdir(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1317,43 +1250,13 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknod(path string, mode uint32, dev int) (err error) {
|
||||
func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat(fd int, path string, mode uint32, dev int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, uintptr(dev), uintptr(dev>>32))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func stat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlink(path string, link string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
||||
139
vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
generated
vendored
139
vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
generated
vendored
@ -912,7 +912,7 @@ func Fpathconf(fd int, name int) (val int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -922,17 +922,7 @@ func fstat(fd int, stat *stat_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstat_freebsd12(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) {
|
||||
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -947,22 +937,7 @@ func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error)
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
func Fstatfs(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@ -972,16 +947,6 @@ func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fsync(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
@ -1002,7 +967,7 @@ func Ftruncate(fd int, length int64) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
func getdirentries(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
@ -1019,23 +984,6 @@ func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getdtablesize() (size int) {
|
||||
r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
|
||||
size = int(r0)
|
||||
@ -1257,21 +1205,6 @@ func Listen(s int, backlog int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func lstat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Mkdir(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
@ -1317,22 +1250,7 @@ func Mkfifo(path string, mode uint32) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknod(path string, mode uint32, dev int) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat(fd int, path string, mode uint32, dev int) (err error) {
|
||||
func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -1347,21 +1265,6 @@ func mknodat(fd int, path string, mode uint32, dev int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
@ -1753,22 +1656,7 @@ func Setuid(uid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func stat(path string, stat *stat_freebsd11_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
func Statfs(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
@ -1783,21 +1671,6 @@ func statfs(path string, stat *statfs_freebsd11_t) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Symlink(path string, link string) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
||||
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
generated
vendored
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
|
||||
// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build 386 && freebsd
|
||||
@ -19,10 +19,9 @@ const (
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
|
||||
SYS_BREAK = 17 // { caddr_t break(char *nsize); }
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
@ -43,7 +42,6 @@ const (
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
|
||||
@ -58,15 +56,14 @@ const (
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, size_t count); }
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
|
||||
SYS_UMASK = 60 // { int umask(int newmask); }
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise ovadvise_args int
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, int prot); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
@ -124,14 +121,10 @@ const (
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
@ -143,12 +136,12 @@ const (
|
||||
SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||
SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
|
||||
SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||
SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
@ -157,50 +150,44 @@ const (
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
|
||||
SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
|
||||
SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, size_t count); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat *stat); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||
SYS_AIO_RETURN = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
|
||||
SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, size_t buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
|
||||
@ -226,14 +213,13 @@ const (
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
|
||||
@ -251,10 +237,6 @@ const (
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_STATFS = 396 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
|
||||
SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
|
||||
SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
|
||||
@ -267,14 +249,14 @@ const (
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( const struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); }
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
@ -288,10 +270,10 @@ const (
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( const struct timespec *timeout); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); }
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, u_int length); }
|
||||
@ -300,17 +282,17 @@ const (
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); }
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len,unsigned msg_prio, const struct timespec *abs_timeout);}
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
@ -319,7 +301,7 @@ const (
|
||||
SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
|
||||
SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
|
||||
@ -338,14 +320,12 @@ const (
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); }
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); }
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
@ -391,7 +371,24 @@ const (
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
|
||||
SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); }
|
||||
SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
|
||||
SYS_NUMA_GETAFFINITY = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
|
||||
SYS_NUMA_SETAFFINITY = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
|
||||
SYS_FDATASYNC = 550 // { int fdatasync(int fd); }
|
||||
SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
|
||||
SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
|
||||
SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
|
||||
SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
|
||||
SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
|
||||
SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
|
||||
SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
|
||||
SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
|
||||
SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
|
||||
SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
|
||||
)
|
||||
|
||||
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
generated
vendored
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
|
||||
// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build amd64 && freebsd
|
||||
@ -19,10 +19,9 @@ const (
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
|
||||
SYS_BREAK = 17 // { caddr_t break(char *nsize); }
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
@ -43,7 +42,6 @@ const (
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
|
||||
@ -58,15 +56,14 @@ const (
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, size_t count); }
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
|
||||
SYS_UMASK = 60 // { int umask(int newmask); }
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise ovadvise_args int
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, int prot); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
@ -124,14 +121,10 @@ const (
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
@ -143,12 +136,12 @@ const (
|
||||
SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||
SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
|
||||
SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||
SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
@ -157,50 +150,44 @@ const (
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
|
||||
SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
|
||||
SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, size_t count); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat *stat); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||
SYS_AIO_RETURN = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
|
||||
SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, size_t buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
|
||||
@ -226,14 +213,13 @@ const (
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
|
||||
@ -251,10 +237,6 @@ const (
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_STATFS = 396 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
|
||||
SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
|
||||
SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
|
||||
@ -267,14 +249,14 @@ const (
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( const struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); }
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
@ -288,10 +270,10 @@ const (
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( const struct timespec *timeout); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); }
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, u_int length); }
|
||||
@ -300,17 +282,17 @@ const (
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); }
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len,unsigned msg_prio, const struct timespec *abs_timeout);}
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
@ -319,7 +301,7 @@ const (
|
||||
SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
|
||||
SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
|
||||
@ -338,14 +320,12 @@ const (
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); }
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); }
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
@ -391,7 +371,24 @@ const (
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
|
||||
SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); }
|
||||
SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
|
||||
SYS_NUMA_GETAFFINITY = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
|
||||
SYS_NUMA_SETAFFINITY = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
|
||||
SYS_FDATASYNC = 550 // { int fdatasync(int fd); }
|
||||
SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
|
||||
SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
|
||||
SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
|
||||
SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
|
||||
SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
|
||||
SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
|
||||
SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
|
||||
SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
|
||||
SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
|
||||
SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
|
||||
)
|
||||
|
||||
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
generated
vendored
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
|
||||
// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm && freebsd
|
||||
@ -19,10 +19,9 @@ const (
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
|
||||
SYS_BREAK = 17 // { caddr_t break(char *nsize); }
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
@ -43,7 +42,6 @@ const (
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
|
||||
@ -58,15 +56,14 @@ const (
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, size_t count); }
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
|
||||
SYS_UMASK = 60 // { int umask(int newmask); }
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise ovadvise_args int
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, int prot); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
@ -124,14 +121,10 @@ const (
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
@ -143,12 +136,12 @@ const (
|
||||
SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||
SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
|
||||
SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||
SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
@ -157,50 +150,44 @@ const (
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
|
||||
SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
|
||||
SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, size_t count); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat *stat); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||
SYS_AIO_RETURN = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
|
||||
SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, size_t buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
|
||||
@ -226,14 +213,13 @@ const (
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
|
||||
@ -251,10 +237,6 @@ const (
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_STATFS = 396 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
|
||||
SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
|
||||
SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
|
||||
@ -267,14 +249,14 @@ const (
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( const struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); }
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
@ -288,10 +270,10 @@ const (
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( const struct timespec *timeout); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); }
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, u_int length); }
|
||||
@ -300,17 +282,17 @@ const (
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); }
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len,unsigned msg_prio, const struct timespec *abs_timeout);}
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
@ -319,7 +301,7 @@ const (
|
||||
SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
|
||||
SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
|
||||
@ -338,14 +320,12 @@ const (
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); }
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); }
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
@ -391,7 +371,24 @@ const (
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
|
||||
SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); }
|
||||
SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
|
||||
SYS_NUMA_GETAFFINITY = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
|
||||
SYS_NUMA_SETAFFINITY = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
|
||||
SYS_FDATASYNC = 550 // { int fdatasync(int fd); }
|
||||
SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
|
||||
SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
|
||||
SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
|
||||
SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
|
||||
SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
|
||||
SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
|
||||
SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
|
||||
SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
|
||||
SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
|
||||
SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
|
||||
)
|
||||
|
||||
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
generated
vendored
107
vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
|
||||
// go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm64 && freebsd
|
||||
@ -19,10 +19,9 @@ const (
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
|
||||
SYS_BREAK = 17 // { caddr_t break(char *nsize); }
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
@ -43,7 +42,6 @@ const (
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
|
||||
@ -58,15 +56,14 @@ const (
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, size_t count); }
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
|
||||
SYS_UMASK = 60 // { int umask(int newmask); }
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise ovadvise_args int
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, int prot); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
|
||||
@ -124,14 +121,10 @@ const (
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
@ -143,12 +136,12 @@ const (
|
||||
SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); }
|
||||
SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
|
||||
SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
|
||||
SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); }
|
||||
SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
|
||||
SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); }
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
@ -157,50 +150,44 @@ const (
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); }
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); }
|
||||
SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,int which, clockid_t *clock_id); }
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); }
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); }
|
||||
SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, size_t count); }
|
||||
SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); }
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); }
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat *stat); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat *stat); }
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
|
||||
SYS_AIO_RETURN = 314 // { ssize_t aio_return(struct aiocb *aiocbp); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend( struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
|
||||
SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
|
||||
SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, size_t buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
|
||||
@ -226,14 +213,13 @@ const (
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete( struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_AIO_WAITCOMPLETE = 359 // { ssize_t aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); }
|
||||
@ -251,10 +237,6 @@ const (
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); }
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_STATFS = 396 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); }
|
||||
SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); }
|
||||
SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); }
|
||||
@ -267,14 +249,14 @@ const (
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); }
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); }
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( const struct __ucontext *sigcntxp); }
|
||||
SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); }
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( const struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); }
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); }
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); }
|
||||
@ -288,10 +270,10 @@ const (
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); }
|
||||
SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( const struct timespec *timeout); }
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); }
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, u_int length); }
|
||||
@ -300,17 +282,17 @@ const (
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); }
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); }
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); }
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len,unsigned msg_prio, const struct timespec *abs_timeout);}
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); }
|
||||
SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
|
||||
SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); }
|
||||
SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
@ -319,7 +301,7 @@ const (
|
||||
SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
|
||||
SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr * from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); }
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); }
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
|
||||
@ -338,14 +320,12 @@ const (
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); }
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); }
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); }
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); }
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); }
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); }
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); }
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); }
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); }
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
@ -391,7 +371,24 @@ const (
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); }
|
||||
SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); }
|
||||
SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); }
|
||||
SYS_NUMA_GETAFFINITY = 548 // { int numa_getaffinity(cpuwhich_t which, id_t id, struct vm_domain_policy_entry *policy); }
|
||||
SYS_NUMA_SETAFFINITY = 549 // { int numa_setaffinity(cpuwhich_t which, id_t id, const struct vm_domain_policy_entry *policy); }
|
||||
SYS_FDATASYNC = 550 // { int fdatasync(int fd); }
|
||||
SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); }
|
||||
SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
|
||||
SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); }
|
||||
SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); }
|
||||
SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); }
|
||||
SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
|
||||
SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
|
||||
SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
|
||||
SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); }
|
||||
SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); }
|
||||
SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); }
|
||||
SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); }
|
||||
SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); }
|
||||
SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); }
|
||||
SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); }
|
||||
SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
|
||||
SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); }
|
||||
)
|
||||
|
||||
97
vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
generated
vendored
97
vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
generated
vendored
@ -90,27 +90,6 @@ type Stat_t struct {
|
||||
Spare [10]uint64
|
||||
}
|
||||
|
||||
type stat_freebsd11_t struct {
|
||||
Dev uint32
|
||||
Ino uint32
|
||||
Mode uint16
|
||||
Nlink uint16
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize int32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
Lspare int32
|
||||
Btim Timespec
|
||||
_ [8]byte
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
@ -136,31 +115,6 @@ type Statfs_t struct {
|
||||
Mntonname [1024]byte
|
||||
}
|
||||
|
||||
type statfs_freebsd11_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
Flags uint64
|
||||
Bsize uint64
|
||||
Iosize uint64
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Bavail int64
|
||||
Files uint64
|
||||
Ffree int64
|
||||
Syncwrites uint64
|
||||
Asyncwrites uint64
|
||||
Syncreads uint64
|
||||
Asyncreads uint64
|
||||
Spare [10]uint64
|
||||
Namemax uint32
|
||||
Owner uint32
|
||||
Fsid Fsid
|
||||
Charspare [80]int8
|
||||
Fstypename [16]byte
|
||||
Mntfromname [88]byte
|
||||
Mntonname [88]byte
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
@ -181,14 +135,6 @@ type Dirent struct {
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type dirent_freebsd11 struct {
|
||||
Fileno uint32
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Namlen uint8
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
Val [2]int32
|
||||
}
|
||||
@ -337,41 +283,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PTRACE_ATTACH = 0xa
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_DETACH = 0xb
|
||||
PTRACE_GETFPREGS = 0x23
|
||||
PTRACE_GETFSBASE = 0x47
|
||||
PTRACE_GETLWPLIST = 0xf
|
||||
PTRACE_GETNUMLWPS = 0xe
|
||||
PTRACE_GETREGS = 0x21
|
||||
PTRACE_GETXSTATE = 0x45
|
||||
PTRACE_IO = 0xc
|
||||
PTRACE_KILL = 0x8
|
||||
PTRACE_LWPEVENTS = 0x18
|
||||
PTRACE_LWPINFO = 0xd
|
||||
PTRACE_SETFPREGS = 0x24
|
||||
PTRACE_SETREGS = 0x22
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_TRACEME = 0x0
|
||||
)
|
||||
|
||||
const (
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_I = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
PL_FLAG_BORN = 0x100
|
||||
PL_FLAG_EXITED = 0x200
|
||||
PL_FLAG_SI = 0x20
|
||||
)
|
||||
|
||||
const (
|
||||
TRAP_BRKPT = 0x1
|
||||
TRAP_TRACE = 0x2
|
||||
PTRACE_TRACEME = 0x0
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_KILL = 0x8
|
||||
)
|
||||
|
||||
type PtraceLwpInfoStruct struct {
|
||||
@ -432,6 +346,8 @@ type FpReg struct {
|
||||
Pad [64]uint8
|
||||
}
|
||||
|
||||
type FpExtendedPrecision struct{}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
@ -444,8 +360,9 @@ type Kevent_t struct {
|
||||
Filter int16
|
||||
Flags uint16
|
||||
Fflags uint32
|
||||
Data int32
|
||||
Data int64
|
||||
Udata *byte
|
||||
Ext [4]uint64
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
|
||||
94
vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
generated
vendored
94
vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
generated
vendored
@ -86,26 +86,6 @@ type Stat_t struct {
|
||||
Spare [10]uint64
|
||||
}
|
||||
|
||||
type stat_freebsd11_t struct {
|
||||
Dev uint32
|
||||
Ino uint32
|
||||
Mode uint16
|
||||
Nlink uint16
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize int32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
Lspare int32
|
||||
Btim Timespec
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
@ -131,31 +111,6 @@ type Statfs_t struct {
|
||||
Mntonname [1024]byte
|
||||
}
|
||||
|
||||
type statfs_freebsd11_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
Flags uint64
|
||||
Bsize uint64
|
||||
Iosize uint64
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Bavail int64
|
||||
Files uint64
|
||||
Ffree int64
|
||||
Syncwrites uint64
|
||||
Asyncwrites uint64
|
||||
Syncreads uint64
|
||||
Asyncreads uint64
|
||||
Spare [10]uint64
|
||||
Namemax uint32
|
||||
Owner uint32
|
||||
Fsid Fsid
|
||||
Charspare [80]int8
|
||||
Fstypename [16]byte
|
||||
Mntfromname [88]byte
|
||||
Mntonname [88]byte
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
@ -177,14 +132,6 @@ type Dirent struct {
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type dirent_freebsd11 struct {
|
||||
Fileno uint32
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Namlen uint8
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
Val [2]int32
|
||||
}
|
||||
@ -333,41 +280,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PTRACE_ATTACH = 0xa
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_DETACH = 0xb
|
||||
PTRACE_GETFPREGS = 0x23
|
||||
PTRACE_GETFSBASE = 0x47
|
||||
PTRACE_GETLWPLIST = 0xf
|
||||
PTRACE_GETNUMLWPS = 0xe
|
||||
PTRACE_GETREGS = 0x21
|
||||
PTRACE_GETXSTATE = 0x45
|
||||
PTRACE_IO = 0xc
|
||||
PTRACE_KILL = 0x8
|
||||
PTRACE_LWPEVENTS = 0x18
|
||||
PTRACE_LWPINFO = 0xd
|
||||
PTRACE_SETFPREGS = 0x24
|
||||
PTRACE_SETREGS = 0x22
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_TRACEME = 0x0
|
||||
)
|
||||
|
||||
const (
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_I = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
PL_FLAG_BORN = 0x100
|
||||
PL_FLAG_EXITED = 0x200
|
||||
PL_FLAG_SI = 0x20
|
||||
)
|
||||
|
||||
const (
|
||||
TRAP_BRKPT = 0x1
|
||||
TRAP_TRACE = 0x2
|
||||
PTRACE_TRACEME = 0x0
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_KILL = 0x8
|
||||
)
|
||||
|
||||
type PtraceLwpInfoStruct struct {
|
||||
@ -435,6 +350,8 @@ type FpReg struct {
|
||||
Spare [12]uint64
|
||||
}
|
||||
|
||||
type FpExtendedPrecision struct{}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
@ -449,6 +366,7 @@ type Kevent_t struct {
|
||||
Fflags uint32
|
||||
Data int64
|
||||
Udata *byte
|
||||
Ext [4]uint64
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
|
||||
145
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
generated
vendored
145
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
generated
vendored
@ -33,7 +33,7 @@ type Timeval struct {
|
||||
_ [4]byte
|
||||
}
|
||||
|
||||
type Time_t int32
|
||||
type Time_t int64
|
||||
|
||||
type Rusage struct {
|
||||
Utime Timeval
|
||||
@ -88,26 +88,6 @@ type Stat_t struct {
|
||||
Spare [10]uint64
|
||||
}
|
||||
|
||||
type stat_freebsd11_t struct {
|
||||
Dev uint32
|
||||
Ino uint32
|
||||
Mode uint16
|
||||
Nlink uint16
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize int32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
Lspare int32
|
||||
Btim Timespec
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
@ -133,31 +113,6 @@ type Statfs_t struct {
|
||||
Mntonname [1024]byte
|
||||
}
|
||||
|
||||
type statfs_freebsd11_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
Flags uint64
|
||||
Bsize uint64
|
||||
Iosize uint64
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Bavail int64
|
||||
Files uint64
|
||||
Ffree int64
|
||||
Syncwrites uint64
|
||||
Asyncwrites uint64
|
||||
Syncreads uint64
|
||||
Asyncreads uint64
|
||||
Spare [10]uint64
|
||||
Namemax uint32
|
||||
Owner uint32
|
||||
Fsid Fsid
|
||||
Charspare [80]int8
|
||||
Fstypename [16]byte
|
||||
Mntfromname [88]byte
|
||||
Mntonname [88]byte
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
@ -179,14 +134,6 @@ type Dirent struct {
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type dirent_freebsd11 struct {
|
||||
Fileno uint32
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Namlen uint8
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
Val [2]int32
|
||||
}
|
||||
@ -335,41 +282,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PTRACE_ATTACH = 0xa
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_DETACH = 0xb
|
||||
PTRACE_GETFPREGS = 0x23
|
||||
PTRACE_GETFSBASE = 0x47
|
||||
PTRACE_GETLWPLIST = 0xf
|
||||
PTRACE_GETNUMLWPS = 0xe
|
||||
PTRACE_GETREGS = 0x21
|
||||
PTRACE_GETXSTATE = 0x45
|
||||
PTRACE_IO = 0xc
|
||||
PTRACE_KILL = 0x8
|
||||
PTRACE_LWPEVENTS = 0x18
|
||||
PTRACE_LWPINFO = 0xd
|
||||
PTRACE_SETFPREGS = 0x24
|
||||
PTRACE_SETREGS = 0x22
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_TRACEME = 0x0
|
||||
)
|
||||
|
||||
const (
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_I = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
PL_FLAG_BORN = 0x100
|
||||
PL_FLAG_EXITED = 0x200
|
||||
PL_FLAG_SI = 0x20
|
||||
)
|
||||
|
||||
const (
|
||||
TRAP_BRKPT = 0x1
|
||||
TRAP_TRACE = 0x2
|
||||
PTRACE_TRACEME = 0x0
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_KILL = 0x8
|
||||
)
|
||||
|
||||
type PtraceLwpInfoStruct struct {
|
||||
@ -386,15 +301,15 @@ type PtraceLwpInfoStruct struct {
|
||||
}
|
||||
|
||||
type __Siginfo struct {
|
||||
Signo int32
|
||||
Errno int32
|
||||
Code int32
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Status int32
|
||||
Addr *byte
|
||||
Value [4]byte
|
||||
X_reason [32]byte
|
||||
Signo int32
|
||||
Errno int32
|
||||
Code int32
|
||||
Pid int32
|
||||
Uid uint32
|
||||
Status int32
|
||||
Addr *byte
|
||||
Value [4]byte
|
||||
_ [32]byte
|
||||
}
|
||||
|
||||
type Sigset_t struct {
|
||||
@ -402,16 +317,22 @@ type Sigset_t struct {
|
||||
}
|
||||
|
||||
type Reg struct {
|
||||
R [13]uint32
|
||||
R_sp uint32
|
||||
R_lr uint32
|
||||
R_pc uint32
|
||||
R_cpsr uint32
|
||||
R [13]uint32
|
||||
Sp uint32
|
||||
Lr uint32
|
||||
Pc uint32
|
||||
Cpsr uint32
|
||||
}
|
||||
|
||||
type FpReg struct {
|
||||
Fpr_fpsr uint32
|
||||
Fpr [8][3]uint32
|
||||
Fpsr uint32
|
||||
Fpr [8]FpExtendedPrecision
|
||||
}
|
||||
|
||||
type FpExtendedPrecision struct {
|
||||
Exponent uint32
|
||||
Mantissa_hi uint32
|
||||
Mantissa_lo uint32
|
||||
}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
@ -426,8 +347,11 @@ type Kevent_t struct {
|
||||
Filter int16
|
||||
Flags uint16
|
||||
Fflags uint32
|
||||
Data int32
|
||||
_ [4]byte
|
||||
Data int64
|
||||
Udata *byte
|
||||
_ [4]byte
|
||||
Ext [4]uint64
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
@ -453,7 +377,7 @@ type ifMsghdr struct {
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Index uint16
|
||||
_ [2]byte
|
||||
_ uint16
|
||||
Data ifData
|
||||
}
|
||||
|
||||
@ -464,7 +388,6 @@ type IfMsghdr struct {
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Index uint16
|
||||
_ [2]byte
|
||||
Data IfData
|
||||
}
|
||||
|
||||
@ -532,7 +455,7 @@ type IfaMsghdr struct {
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Index uint16
|
||||
_ [2]byte
|
||||
_ uint16
|
||||
Metric int32
|
||||
}
|
||||
|
||||
@ -543,7 +466,7 @@ type IfmaMsghdr struct {
|
||||
Addrs int32
|
||||
Flags int32
|
||||
Index uint16
|
||||
_ [2]byte
|
||||
_ uint16
|
||||
}
|
||||
|
||||
type IfAnnounceMsghdr struct {
|
||||
@ -560,7 +483,7 @@ type RtMsghdr struct {
|
||||
Version uint8
|
||||
Type uint8
|
||||
Index uint16
|
||||
_ [2]byte
|
||||
_ uint16
|
||||
Flags int32
|
||||
Addrs int32
|
||||
Pid int32
|
||||
|
||||
92
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
generated
vendored
92
vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
generated
vendored
@ -86,26 +86,6 @@ type Stat_t struct {
|
||||
Spare [10]uint64
|
||||
}
|
||||
|
||||
type stat_freebsd11_t struct {
|
||||
Dev uint32
|
||||
Ino uint32
|
||||
Mode uint16
|
||||
Nlink uint16
|
||||
Uid uint32
|
||||
Gid uint32
|
||||
Rdev uint32
|
||||
Atim Timespec
|
||||
Mtim Timespec
|
||||
Ctim Timespec
|
||||
Size int64
|
||||
Blocks int64
|
||||
Blksize int32
|
||||
Flags uint32
|
||||
Gen uint32
|
||||
Lspare int32
|
||||
Btim Timespec
|
||||
}
|
||||
|
||||
type Statfs_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
@ -131,31 +111,6 @@ type Statfs_t struct {
|
||||
Mntonname [1024]byte
|
||||
}
|
||||
|
||||
type statfs_freebsd11_t struct {
|
||||
Version uint32
|
||||
Type uint32
|
||||
Flags uint64
|
||||
Bsize uint64
|
||||
Iosize uint64
|
||||
Blocks uint64
|
||||
Bfree uint64
|
||||
Bavail int64
|
||||
Files uint64
|
||||
Ffree int64
|
||||
Syncwrites uint64
|
||||
Asyncwrites uint64
|
||||
Syncreads uint64
|
||||
Asyncreads uint64
|
||||
Spare [10]uint64
|
||||
Namemax uint32
|
||||
Owner uint32
|
||||
Fsid Fsid
|
||||
Charspare [80]int8
|
||||
Fstypename [16]byte
|
||||
Mntfromname [88]byte
|
||||
Mntonname [88]byte
|
||||
}
|
||||
|
||||
type Flock_t struct {
|
||||
Start int64
|
||||
Len int64
|
||||
@ -177,14 +132,6 @@ type Dirent struct {
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type dirent_freebsd11 struct {
|
||||
Fileno uint32
|
||||
Reclen uint16
|
||||
Type uint8
|
||||
Namlen uint8
|
||||
Name [256]int8
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
Val [2]int32
|
||||
}
|
||||
@ -333,39 +280,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PTRACE_ATTACH = 0xa
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_DETACH = 0xb
|
||||
PTRACE_GETFPREGS = 0x23
|
||||
PTRACE_GETLWPLIST = 0xf
|
||||
PTRACE_GETNUMLWPS = 0xe
|
||||
PTRACE_GETREGS = 0x21
|
||||
PTRACE_IO = 0xc
|
||||
PTRACE_KILL = 0x8
|
||||
PTRACE_LWPEVENTS = 0x18
|
||||
PTRACE_LWPINFO = 0xd
|
||||
PTRACE_SETFPREGS = 0x24
|
||||
PTRACE_SETREGS = 0x22
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_TRACEME = 0x0
|
||||
)
|
||||
|
||||
const (
|
||||
PIOD_READ_D = 0x1
|
||||
PIOD_WRITE_D = 0x2
|
||||
PIOD_READ_I = 0x3
|
||||
PIOD_WRITE_I = 0x4
|
||||
)
|
||||
|
||||
const (
|
||||
PL_FLAG_BORN = 0x100
|
||||
PL_FLAG_EXITED = 0x200
|
||||
PL_FLAG_SI = 0x20
|
||||
)
|
||||
|
||||
const (
|
||||
TRAP_BRKPT = 0x1
|
||||
TRAP_TRACE = 0x2
|
||||
PTRACE_TRACEME = 0x0
|
||||
PTRACE_CONT = 0x7
|
||||
PTRACE_KILL = 0x8
|
||||
)
|
||||
|
||||
type PtraceLwpInfoStruct struct {
|
||||
@ -413,6 +330,8 @@ type FpReg struct {
|
||||
_ [8]byte
|
||||
}
|
||||
|
||||
type FpExtendedPrecision struct{}
|
||||
|
||||
type PtraceIoDesc struct {
|
||||
Op int32
|
||||
Offs *byte
|
||||
@ -427,6 +346,7 @@ type Kevent_t struct {
|
||||
Fflags uint32
|
||||
Data int64
|
||||
Udata *byte
|
||||
Ext [4]uint64
|
||||
}
|
||||
|
||||
type FdSet struct {
|
||||
|
||||
2
vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
generated
vendored
@ -178,7 +178,7 @@ type Linger struct {
|
||||
}
|
||||
|
||||
type Iovec struct {
|
||||
Base *int8
|
||||
Base *byte
|
||||
Len uint64
|
||||
}
|
||||
|
||||
|
||||
9
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
9
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@ -861,6 +861,7 @@ const socket_error = uintptr(^uint32(0))
|
||||
//sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses
|
||||
//sys GetACP() (acp uint32) = kernel32.GetACP
|
||||
//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
|
||||
//sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx
|
||||
|
||||
// For testing: clients can set this flag to force
|
||||
// creation of IPv6 sockets to return EAFNOSUPPORT.
|
||||
@ -1045,6 +1046,14 @@ func Connect(fd Handle, sa Sockaddr) (err error) {
|
||||
return connect(fd, ptr, n)
|
||||
}
|
||||
|
||||
func GetBestInterfaceEx(sa Sockaddr, pdwBestIfIndex *uint32) (err error) {
|
||||
ptr, _, err := sa.sockaddr()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return getBestInterfaceEx(ptr, pdwBestIfIndex)
|
||||
}
|
||||
|
||||
func Getsockname(fd Handle) (sa Sockaddr, err error) {
|
||||
var rsa RawSockaddrAny
|
||||
l := int32(unsafe.Sizeof(rsa))
|
||||
|
||||
81
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
81
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
@ -160,6 +160,10 @@ const (
|
||||
|
||||
MAX_COMPUTERNAME_LENGTH = 15
|
||||
|
||||
MAX_DHCPV6_DUID_LENGTH = 130
|
||||
|
||||
MAX_DNS_SUFFIX_STRING_LENGTH = 256
|
||||
|
||||
TIME_ZONE_ID_UNKNOWN = 0
|
||||
TIME_ZONE_ID_STANDARD = 1
|
||||
|
||||
@ -2000,27 +2004,62 @@ type IpAdapterPrefix struct {
|
||||
}
|
||||
|
||||
type IpAdapterAddresses struct {
|
||||
Length uint32
|
||||
IfIndex uint32
|
||||
Next *IpAdapterAddresses
|
||||
AdapterName *byte
|
||||
FirstUnicastAddress *IpAdapterUnicastAddress
|
||||
FirstAnycastAddress *IpAdapterAnycastAddress
|
||||
FirstMulticastAddress *IpAdapterMulticastAddress
|
||||
FirstDnsServerAddress *IpAdapterDnsServerAdapter
|
||||
DnsSuffix *uint16
|
||||
Description *uint16
|
||||
FriendlyName *uint16
|
||||
PhysicalAddress [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte
|
||||
PhysicalAddressLength uint32
|
||||
Flags uint32
|
||||
Mtu uint32
|
||||
IfType uint32
|
||||
OperStatus uint32
|
||||
Ipv6IfIndex uint32
|
||||
ZoneIndices [16]uint32
|
||||
FirstPrefix *IpAdapterPrefix
|
||||
/* more fields might be present here. */
|
||||
Length uint32
|
||||
IfIndex uint32
|
||||
Next *IpAdapterAddresses
|
||||
AdapterName *byte
|
||||
FirstUnicastAddress *IpAdapterUnicastAddress
|
||||
FirstAnycastAddress *IpAdapterAnycastAddress
|
||||
FirstMulticastAddress *IpAdapterMulticastAddress
|
||||
FirstDnsServerAddress *IpAdapterDnsServerAdapter
|
||||
DnsSuffix *uint16
|
||||
Description *uint16
|
||||
FriendlyName *uint16
|
||||
PhysicalAddress [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte
|
||||
PhysicalAddressLength uint32
|
||||
Flags uint32
|
||||
Mtu uint32
|
||||
IfType uint32
|
||||
OperStatus uint32
|
||||
Ipv6IfIndex uint32
|
||||
ZoneIndices [16]uint32
|
||||
FirstPrefix *IpAdapterPrefix
|
||||
TransmitLinkSpeed uint64
|
||||
ReceiveLinkSpeed uint64
|
||||
FirstWinsServerAddress *IpAdapterWinsServerAddress
|
||||
FirstGatewayAddress *IpAdapterGatewayAddress
|
||||
Ipv4Metric uint32
|
||||
Ipv6Metric uint32
|
||||
Luid uint64
|
||||
Dhcpv4Server SocketAddress
|
||||
CompartmentId uint32
|
||||
NetworkGuid GUID
|
||||
ConnectionType uint32
|
||||
TunnelType uint32
|
||||
Dhcpv6Server SocketAddress
|
||||
Dhcpv6ClientDuid [MAX_DHCPV6_DUID_LENGTH]byte
|
||||
Dhcpv6ClientDuidLength uint32
|
||||
Dhcpv6Iaid uint32
|
||||
FirstDnsSuffix *IpAdapterDNSSuffix
|
||||
}
|
||||
|
||||
type IpAdapterWinsServerAddress struct {
|
||||
Length uint32
|
||||
Reserved uint32
|
||||
Next *IpAdapterWinsServerAddress
|
||||
Address SocketAddress
|
||||
}
|
||||
|
||||
type IpAdapterGatewayAddress struct {
|
||||
Length uint32
|
||||
Reserved uint32
|
||||
Next *IpAdapterGatewayAddress
|
||||
Address SocketAddress
|
||||
}
|
||||
|
||||
type IpAdapterDNSSuffix struct {
|
||||
Next *IpAdapterDNSSuffix
|
||||
String [MAX_DNS_SUFFIX_STRING_LENGTH]uint16
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
9
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
9
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
@ -177,6 +177,7 @@ var (
|
||||
procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
|
||||
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
|
||||
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
|
||||
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
|
||||
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
|
||||
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
|
||||
procCancelIo = modkernel32.NewProc("CancelIo")
|
||||
@ -1539,6 +1540,14 @@ func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
|
||||
return
|
||||
}
|
||||
|
||||
func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) {
|
||||
r0, _, _ := syscall.Syscall(procGetBestInterfaceEx.Addr(), 2, uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)), 0)
|
||||
if r0 != 0 {
|
||||
errcode = syscall.Errno(r0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
|
||||
r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
|
||||
if r0 != 0 {
|
||||
|
||||
162
vendor/golang.org/x/text/cases/cases.go
generated
vendored
Normal file
162
vendor/golang.org/x/text/cases/cases.go
generated
vendored
Normal file
@ -0,0 +1,162 @@
|
||||
// Copyright 2014 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:generate go run gen.go gen_trieval.go
|
||||
|
||||
// Package cases provides general and language-specific case mappers.
|
||||
package cases // import "golang.org/x/text/cases"
|
||||
|
||||
import (
|
||||
"golang.org/x/text/language"
|
||||
"golang.org/x/text/transform"
|
||||
)
|
||||
|
||||
// References:
|
||||
// - Unicode Reference Manual Chapter 3.13, 4.2, and 5.18.
|
||||
// - https://www.unicode.org/reports/tr29/
|
||||
// - https://www.unicode.org/Public/6.3.0/ucd/CaseFolding.txt
|
||||
// - https://www.unicode.org/Public/6.3.0/ucd/SpecialCasing.txt
|
||||
// - https://www.unicode.org/Public/6.3.0/ucd/DerivedCoreProperties.txt
|
||||
// - https://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakProperty.txt
|
||||
// - https://www.unicode.org/Public/6.3.0/ucd/auxiliary/WordBreakTest.txt
|
||||
// - http://userguide.icu-project.org/transforms/casemappings
|
||||
|
||||
// TODO:
|
||||
// - Case folding
|
||||
// - Wide and Narrow?
|
||||
// - Segmenter option for title casing.
|
||||
// - ASCII fast paths
|
||||
// - Encode Soft-Dotted property within trie somehow.
|
||||
|
||||
// A Caser transforms given input to a certain case. It implements
|
||||
// transform.Transformer.
|
||||
//
|
||||
// A Caser may be stateful and should therefore not be shared between
|
||||
// goroutines.
|
||||
type Caser struct {
|
||||
t transform.SpanningTransformer
|
||||
}
|
||||
|
||||
// Bytes returns a new byte slice with the result of converting b to the case
|
||||
// form implemented by c.
|
||||
func (c Caser) Bytes(b []byte) []byte {
|
||||
b, _, _ = transform.Bytes(c.t, b)
|
||||
return b
|
||||
}
|
||||
|
||||
// String returns a string with the result of transforming s to the case form
|
||||
// implemented by c.
|
||||
func (c Caser) String(s string) string {
|
||||
s, _, _ = transform.String(c.t, s)
|
||||
return s
|
||||
}
|
||||
|
||||
// Reset resets the Caser to be reused for new input after a previous call to
|
||||
// Transform.
|
||||
func (c Caser) Reset() { c.t.Reset() }
|
||||
|
||||
// Transform implements the transform.Transformer interface and transforms the
|
||||
// given input to the case form implemented by c.
|
||||
func (c Caser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
return c.t.Transform(dst, src, atEOF)
|
||||
}
|
||||
|
||||
// Span implements the transform.SpanningTransformer interface.
|
||||
func (c Caser) Span(src []byte, atEOF bool) (n int, err error) {
|
||||
return c.t.Span(src, atEOF)
|
||||
}
|
||||
|
||||
// Upper returns a Caser for language-specific uppercasing.
|
||||
func Upper(t language.Tag, opts ...Option) Caser {
|
||||
return Caser{makeUpper(t, getOpts(opts...))}
|
||||
}
|
||||
|
||||
// Lower returns a Caser for language-specific lowercasing.
|
||||
func Lower(t language.Tag, opts ...Option) Caser {
|
||||
return Caser{makeLower(t, getOpts(opts...))}
|
||||
}
|
||||
|
||||
// Title returns a Caser for language-specific title casing. It uses an
|
||||
// approximation of the default Unicode Word Break algorithm.
|
||||
func Title(t language.Tag, opts ...Option) Caser {
|
||||
return Caser{makeTitle(t, getOpts(opts...))}
|
||||
}
|
||||
|
||||
// Fold returns a Caser that implements Unicode case folding. The returned Caser
|
||||
// is stateless and safe to use concurrently by multiple goroutines.
|
||||
//
|
||||
// Case folding does not normalize the input and may not preserve a normal form.
|
||||
// Use the collate or search package for more convenient and linguistically
|
||||
// sound comparisons. Use golang.org/x/text/secure/precis for string comparisons
|
||||
// where security aspects are a concern.
|
||||
func Fold(opts ...Option) Caser {
|
||||
return Caser{makeFold(getOpts(opts...))}
|
||||
}
|
||||
|
||||
// An Option is used to modify the behavior of a Caser.
|
||||
type Option func(o options) options
|
||||
|
||||
// TODO: consider these options to take a boolean as well, like FinalSigma.
|
||||
// The advantage of using this approach is that other providers of a lower-case
|
||||
// algorithm could set different defaults by prefixing a user-provided slice
|
||||
// of options with their own. This is handy, for instance, for the precis
|
||||
// package which would override the default to not handle the Greek final sigma.
|
||||
|
||||
var (
|
||||
// NoLower disables the lowercasing of non-leading letters for a title
|
||||
// caser.
|
||||
NoLower Option = noLower
|
||||
|
||||
// Compact omits mappings in case folding for characters that would grow the
|
||||
// input. (Unimplemented.)
|
||||
Compact Option = compact
|
||||
)
|
||||
|
||||
// TODO: option to preserve a normal form, if applicable?
|
||||
|
||||
type options struct {
|
||||
noLower bool
|
||||
simple bool
|
||||
|
||||
// TODO: segmenter, max ignorable, alternative versions, etc.
|
||||
|
||||
ignoreFinalSigma bool
|
||||
}
|
||||
|
||||
func getOpts(o ...Option) (res options) {
|
||||
for _, f := range o {
|
||||
res = f(res)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func noLower(o options) options {
|
||||
o.noLower = true
|
||||
return o
|
||||
}
|
||||
|
||||
func compact(o options) options {
|
||||
o.simple = true
|
||||
return o
|
||||
}
|
||||
|
||||
// HandleFinalSigma specifies whether the special handling of Greek final sigma
|
||||
// should be enabled. Unicode prescribes handling the Greek final sigma for all
|
||||
// locales, but standards like IDNA and PRECIS override this default.
|
||||
func HandleFinalSigma(enable bool) Option {
|
||||
if enable {
|
||||
return handleFinalSigma
|
||||
}
|
||||
return ignoreFinalSigma
|
||||
}
|
||||
|
||||
func ignoreFinalSigma(o options) options {
|
||||
o.ignoreFinalSigma = true
|
||||
return o
|
||||
}
|
||||
|
||||
func handleFinalSigma(o options) options {
|
||||
o.ignoreFinalSigma = false
|
||||
return o
|
||||
}
|
||||
376
vendor/golang.org/x/text/cases/context.go
generated
vendored
Normal file
376
vendor/golang.org/x/text/cases/context.go
generated
vendored
Normal file
@ -0,0 +1,376 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cases
|
||||
|
||||
import "golang.org/x/text/transform"
|
||||
|
||||
// A context is used for iterating over source bytes, fetching case info and
|
||||
// writing to a destination buffer.
|
||||
//
|
||||
// Casing operations may need more than one rune of context to decide how a rune
|
||||
// should be cased. Casing implementations should call checkpoint on context
|
||||
// whenever it is known to be safe to return the runes processed so far.
|
||||
//
|
||||
// It is recommended for implementations to not allow for more than 30 case
|
||||
// ignorables as lookahead (analogous to the limit in norm) and to use state if
|
||||
// unbounded lookahead is needed for cased runes.
|
||||
type context struct {
|
||||
dst, src []byte
|
||||
atEOF bool
|
||||
|
||||
pDst int // pDst points past the last written rune in dst.
|
||||
pSrc int // pSrc points to the start of the currently scanned rune.
|
||||
|
||||
// checkpoints safe to return in Transform, where nDst <= pDst and nSrc <= pSrc.
|
||||
nDst, nSrc int
|
||||
err error
|
||||
|
||||
sz int // size of current rune
|
||||
info info // case information of currently scanned rune
|
||||
|
||||
// State preserved across calls to Transform.
|
||||
isMidWord bool // false if next cased letter needs to be title-cased.
|
||||
}
|
||||
|
||||
func (c *context) Reset() {
|
||||
c.isMidWord = false
|
||||
}
|
||||
|
||||
// ret returns the return values for the Transform method. It checks whether
|
||||
// there were insufficient bytes in src to complete and introduces an error
|
||||
// accordingly, if necessary.
|
||||
func (c *context) ret() (nDst, nSrc int, err error) {
|
||||
if c.err != nil || c.nSrc == len(c.src) {
|
||||
return c.nDst, c.nSrc, c.err
|
||||
}
|
||||
// This point is only reached by mappers if there was no short destination
|
||||
// buffer. This means that the source buffer was exhausted and that c.sz was
|
||||
// set to 0 by next.
|
||||
if c.atEOF && c.pSrc == len(c.src) {
|
||||
return c.pDst, c.pSrc, nil
|
||||
}
|
||||
return c.nDst, c.nSrc, transform.ErrShortSrc
|
||||
}
|
||||
|
||||
// retSpan returns the return values for the Span method. It checks whether
|
||||
// there were insufficient bytes in src to complete and introduces an error
|
||||
// accordingly, if necessary.
|
||||
func (c *context) retSpan() (n int, err error) {
|
||||
_, nSrc, err := c.ret()
|
||||
return nSrc, err
|
||||
}
|
||||
|
||||
// checkpoint sets the return value buffer points for Transform to the current
|
||||
// positions.
|
||||
func (c *context) checkpoint() {
|
||||
if c.err == nil {
|
||||
c.nDst, c.nSrc = c.pDst, c.pSrc+c.sz
|
||||
}
|
||||
}
|
||||
|
||||
// unreadRune causes the last rune read by next to be reread on the next
|
||||
// invocation of next. Only one unreadRune may be called after a call to next.
|
||||
func (c *context) unreadRune() {
|
||||
c.sz = 0
|
||||
}
|
||||
|
||||
func (c *context) next() bool {
|
||||
c.pSrc += c.sz
|
||||
if c.pSrc == len(c.src) || c.err != nil {
|
||||
c.info, c.sz = 0, 0
|
||||
return false
|
||||
}
|
||||
v, sz := trie.lookup(c.src[c.pSrc:])
|
||||
c.info, c.sz = info(v), sz
|
||||
if c.sz == 0 {
|
||||
if c.atEOF {
|
||||
// A zero size means we have an incomplete rune. If we are atEOF,
|
||||
// this means it is an illegal rune, which we will consume one
|
||||
// byte at a time.
|
||||
c.sz = 1
|
||||
} else {
|
||||
c.err = transform.ErrShortSrc
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// writeBytes adds bytes to dst.
|
||||
func (c *context) writeBytes(b []byte) bool {
|
||||
if len(c.dst)-c.pDst < len(b) {
|
||||
c.err = transform.ErrShortDst
|
||||
return false
|
||||
}
|
||||
// This loop is faster than using copy.
|
||||
for _, ch := range b {
|
||||
c.dst[c.pDst] = ch
|
||||
c.pDst++
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// writeString writes the given string to dst.
|
||||
func (c *context) writeString(s string) bool {
|
||||
if len(c.dst)-c.pDst < len(s) {
|
||||
c.err = transform.ErrShortDst
|
||||
return false
|
||||
}
|
||||
// This loop is faster than using copy.
|
||||
for i := 0; i < len(s); i++ {
|
||||
c.dst[c.pDst] = s[i]
|
||||
c.pDst++
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// copy writes the current rune to dst.
|
||||
func (c *context) copy() bool {
|
||||
return c.writeBytes(c.src[c.pSrc : c.pSrc+c.sz])
|
||||
}
|
||||
|
||||
// copyXOR copies the current rune to dst and modifies it by applying the XOR
|
||||
// pattern of the case info. It is the responsibility of the caller to ensure
|
||||
// that this is a rune with a XOR pattern defined.
|
||||
func (c *context) copyXOR() bool {
|
||||
if !c.copy() {
|
||||
return false
|
||||
}
|
||||
if c.info&xorIndexBit == 0 {
|
||||
// Fast path for 6-bit XOR pattern, which covers most cases.
|
||||
c.dst[c.pDst-1] ^= byte(c.info >> xorShift)
|
||||
} else {
|
||||
// Interpret XOR bits as an index.
|
||||
// TODO: test performance for unrolling this loop. Verify that we have
|
||||
// at least two bytes and at most three.
|
||||
idx := c.info >> xorShift
|
||||
for p := c.pDst - 1; ; p-- {
|
||||
c.dst[p] ^= xorData[idx]
|
||||
idx--
|
||||
if xorData[idx] == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// hasPrefix returns true if src[pSrc:] starts with the given string.
|
||||
func (c *context) hasPrefix(s string) bool {
|
||||
b := c.src[c.pSrc:]
|
||||
if len(b) < len(s) {
|
||||
return false
|
||||
}
|
||||
for i, c := range b[:len(s)] {
|
||||
if c != s[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// caseType returns an info with only the case bits, normalized to either
|
||||
// cLower, cUpper, cTitle or cUncased.
|
||||
func (c *context) caseType() info {
|
||||
cm := c.info & 0x7
|
||||
if cm < 4 {
|
||||
return cm
|
||||
}
|
||||
if cm >= cXORCase {
|
||||
// xor the last bit of the rune with the case type bits.
|
||||
b := c.src[c.pSrc+c.sz-1]
|
||||
return info(b&1) ^ cm&0x3
|
||||
}
|
||||
if cm == cIgnorableCased {
|
||||
return cLower
|
||||
}
|
||||
return cUncased
|
||||
}
|
||||
|
||||
// lower writes the lowercase version of the current rune to dst.
|
||||
func lower(c *context) bool {
|
||||
ct := c.caseType()
|
||||
if c.info&hasMappingMask == 0 || ct == cLower {
|
||||
return c.copy()
|
||||
}
|
||||
if c.info&exceptionBit == 0 {
|
||||
return c.copyXOR()
|
||||
}
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
offset := 2 + e[0]&lengthMask // size of header + fold string
|
||||
if nLower := (e[1] >> lengthBits) & lengthMask; nLower != noChange {
|
||||
return c.writeString(e[offset : offset+nLower])
|
||||
}
|
||||
return c.copy()
|
||||
}
|
||||
|
||||
func isLower(c *context) bool {
|
||||
ct := c.caseType()
|
||||
if c.info&hasMappingMask == 0 || ct == cLower {
|
||||
return true
|
||||
}
|
||||
if c.info&exceptionBit == 0 {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
if nLower := (e[1] >> lengthBits) & lengthMask; nLower != noChange {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// upper writes the uppercase version of the current rune to dst.
|
||||
func upper(c *context) bool {
|
||||
ct := c.caseType()
|
||||
if c.info&hasMappingMask == 0 || ct == cUpper {
|
||||
return c.copy()
|
||||
}
|
||||
if c.info&exceptionBit == 0 {
|
||||
return c.copyXOR()
|
||||
}
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
offset := 2 + e[0]&lengthMask // size of header + fold string
|
||||
// Get length of first special case mapping.
|
||||
n := (e[1] >> lengthBits) & lengthMask
|
||||
if ct == cTitle {
|
||||
// The first special case mapping is for lower. Set n to the second.
|
||||
if n == noChange {
|
||||
n = 0
|
||||
}
|
||||
n, e = e[1]&lengthMask, e[n:]
|
||||
}
|
||||
if n != noChange {
|
||||
return c.writeString(e[offset : offset+n])
|
||||
}
|
||||
return c.copy()
|
||||
}
|
||||
|
||||
// isUpper writes the isUppercase version of the current rune to dst.
|
||||
func isUpper(c *context) bool {
|
||||
ct := c.caseType()
|
||||
if c.info&hasMappingMask == 0 || ct == cUpper {
|
||||
return true
|
||||
}
|
||||
if c.info&exceptionBit == 0 {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
// Get length of first special case mapping.
|
||||
n := (e[1] >> lengthBits) & lengthMask
|
||||
if ct == cTitle {
|
||||
n = e[1] & lengthMask
|
||||
}
|
||||
if n != noChange {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// title writes the title case version of the current rune to dst.
|
||||
func title(c *context) bool {
|
||||
ct := c.caseType()
|
||||
if c.info&hasMappingMask == 0 || ct == cTitle {
|
||||
return c.copy()
|
||||
}
|
||||
if c.info&exceptionBit == 0 {
|
||||
if ct == cLower {
|
||||
return c.copyXOR()
|
||||
}
|
||||
return c.copy()
|
||||
}
|
||||
// Get the exception data.
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
offset := 2 + e[0]&lengthMask // size of header + fold string
|
||||
|
||||
nFirst := (e[1] >> lengthBits) & lengthMask
|
||||
if nTitle := e[1] & lengthMask; nTitle != noChange {
|
||||
if nFirst != noChange {
|
||||
e = e[nFirst:]
|
||||
}
|
||||
return c.writeString(e[offset : offset+nTitle])
|
||||
}
|
||||
if ct == cLower && nFirst != noChange {
|
||||
// Use the uppercase version instead.
|
||||
return c.writeString(e[offset : offset+nFirst])
|
||||
}
|
||||
// Already in correct case.
|
||||
return c.copy()
|
||||
}
|
||||
|
||||
// isTitle reports whether the current rune is in title case.
|
||||
func isTitle(c *context) bool {
|
||||
ct := c.caseType()
|
||||
if c.info&hasMappingMask == 0 || ct == cTitle {
|
||||
return true
|
||||
}
|
||||
if c.info&exceptionBit == 0 {
|
||||
if ct == cLower {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
// Get the exception data.
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
if nTitle := e[1] & lengthMask; nTitle != noChange {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
nFirst := (e[1] >> lengthBits) & lengthMask
|
||||
if ct == cLower && nFirst != noChange {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// foldFull writes the foldFull version of the current rune to dst.
|
||||
func foldFull(c *context) bool {
|
||||
if c.info&hasMappingMask == 0 {
|
||||
return c.copy()
|
||||
}
|
||||
ct := c.caseType()
|
||||
if c.info&exceptionBit == 0 {
|
||||
if ct != cLower || c.info&inverseFoldBit != 0 {
|
||||
return c.copyXOR()
|
||||
}
|
||||
return c.copy()
|
||||
}
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
n := e[0] & lengthMask
|
||||
if n == 0 {
|
||||
if ct == cLower {
|
||||
return c.copy()
|
||||
}
|
||||
n = (e[1] >> lengthBits) & lengthMask
|
||||
}
|
||||
return c.writeString(e[2 : 2+n])
|
||||
}
|
||||
|
||||
// isFoldFull reports whether the current run is mapped to foldFull
|
||||
func isFoldFull(c *context) bool {
|
||||
if c.info&hasMappingMask == 0 {
|
||||
return true
|
||||
}
|
||||
ct := c.caseType()
|
||||
if c.info&exceptionBit == 0 {
|
||||
if ct != cLower || c.info&inverseFoldBit != 0 {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
e := exceptions[c.info>>exceptionShift:]
|
||||
n := e[0] & lengthMask
|
||||
if n == 0 && ct == cLower {
|
||||
return true
|
||||
}
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
34
vendor/golang.org/x/text/cases/fold.go
generated
vendored
Normal file
34
vendor/golang.org/x/text/cases/fold.go
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cases
|
||||
|
||||
import "golang.org/x/text/transform"
|
||||
|
||||
type caseFolder struct{ transform.NopResetter }
|
||||
|
||||
// caseFolder implements the Transformer interface for doing case folding.
|
||||
func (t *caseFolder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
c := context{dst: dst, src: src, atEOF: atEOF}
|
||||
for c.next() {
|
||||
foldFull(&c)
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.ret()
|
||||
}
|
||||
|
||||
func (t *caseFolder) Span(src []byte, atEOF bool) (n int, err error) {
|
||||
c := context{src: src, atEOF: atEOF}
|
||||
for c.next() && isFoldFull(&c) {
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.retSpan()
|
||||
}
|
||||
|
||||
func makeFold(o options) transform.SpanningTransformer {
|
||||
// TODO: Special case folding, through option Language, Special/Turkic, or
|
||||
// both.
|
||||
// TODO: Implement Compact options.
|
||||
return &caseFolder{}
|
||||
}
|
||||
62
vendor/golang.org/x/text/cases/icu.go
generated
vendored
Normal file
62
vendor/golang.org/x/text/cases/icu.go
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
// Copyright 2016 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 icu
|
||||
// +build icu
|
||||
|
||||
package cases
|
||||
|
||||
// Ideally these functions would be defined in a test file, but go test doesn't
|
||||
// allow CGO in tests. The build tag should ensure either way that these
|
||||
// functions will not end up in the package.
|
||||
|
||||
// TODO: Ensure that the correct ICU version is set.
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -licui18n.57 -licuuc.57
|
||||
#include <stdlib.h>
|
||||
#include <unicode/ustring.h>
|
||||
#include <unicode/utypes.h>
|
||||
#include <unicode/localpointer.h>
|
||||
#include <unicode/ucasemap.h>
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import "unsafe"
|
||||
|
||||
func doICU(tag, caser, input string) string {
|
||||
err := C.UErrorCode(0)
|
||||
loc := C.CString(tag)
|
||||
cm := C.ucasemap_open(loc, C.uint32_t(0), &err)
|
||||
|
||||
buf := make([]byte, len(input)*4)
|
||||
dst := (*C.char)(unsafe.Pointer(&buf[0]))
|
||||
src := C.CString(input)
|
||||
|
||||
cn := C.int32_t(0)
|
||||
|
||||
switch caser {
|
||||
case "fold":
|
||||
cn = C.ucasemap_utf8FoldCase(cm,
|
||||
dst, C.int32_t(len(buf)),
|
||||
src, C.int32_t(len(input)),
|
||||
&err)
|
||||
case "lower":
|
||||
cn = C.ucasemap_utf8ToLower(cm,
|
||||
dst, C.int32_t(len(buf)),
|
||||
src, C.int32_t(len(input)),
|
||||
&err)
|
||||
case "upper":
|
||||
cn = C.ucasemap_utf8ToUpper(cm,
|
||||
dst, C.int32_t(len(buf)),
|
||||
src, C.int32_t(len(input)),
|
||||
&err)
|
||||
case "title":
|
||||
cn = C.ucasemap_utf8ToTitle(cm,
|
||||
dst, C.int32_t(len(buf)),
|
||||
src, C.int32_t(len(input)),
|
||||
&err)
|
||||
}
|
||||
return string(buf[:cn])
|
||||
}
|
||||
82
vendor/golang.org/x/text/cases/info.go
generated
vendored
Normal file
82
vendor/golang.org/x/text/cases/info.go
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cases
|
||||
|
||||
func (c info) cccVal() info {
|
||||
if c&exceptionBit != 0 {
|
||||
return info(exceptions[c>>exceptionShift]) & cccMask
|
||||
}
|
||||
return c & cccMask
|
||||
}
|
||||
|
||||
func (c info) cccType() info {
|
||||
ccc := c.cccVal()
|
||||
if ccc <= cccZero {
|
||||
return cccZero
|
||||
}
|
||||
return ccc
|
||||
}
|
||||
|
||||
// TODO: Implement full Unicode breaking algorithm:
|
||||
// 1) Implement breaking in separate package.
|
||||
// 2) Use the breaker here.
|
||||
// 3) Compare table size and performance of using the more generic breaker.
|
||||
//
|
||||
// Note that we can extend the current algorithm to be much more accurate. This
|
||||
// only makes sense, though, if the performance and/or space penalty of using
|
||||
// the generic breaker is big. Extra data will only be needed for non-cased
|
||||
// runes, which means there are sufficient bits left in the caseType.
|
||||
// ICU prohibits breaking in such cases as well.
|
||||
|
||||
// For the purpose of title casing we use an approximation of the Unicode Word
|
||||
// Breaking algorithm defined in Annex #29:
|
||||
// https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table.
|
||||
//
|
||||
// For our approximation, we group the Word Break types into the following
|
||||
// categories, with associated rules:
|
||||
//
|
||||
// 1) Letter:
|
||||
// ALetter, Hebrew_Letter, Numeric, ExtendNumLet, Extend, Format_FE, ZWJ.
|
||||
// Rule: Never break between consecutive runes of this category.
|
||||
//
|
||||
// 2) Mid:
|
||||
// MidLetter, MidNumLet, Single_Quote.
|
||||
// (Cf. case-ignorable: MidLetter, MidNumLet, Single_Quote or cat is Mn,
|
||||
// Me, Cf, Lm or Sk).
|
||||
// Rule: Don't break between Letter and Mid, but break between two Mids.
|
||||
//
|
||||
// 3) Break:
|
||||
// Any other category: NewLine, MidNum, CR, LF, Double_Quote, Katakana, and
|
||||
// Other.
|
||||
// These categories should always result in a break between two cased letters.
|
||||
// Rule: Always break.
|
||||
//
|
||||
// Note 1: the Katakana and MidNum categories can, in esoteric cases, result in
|
||||
// preventing a break between two cased letters. For now we will ignore this
|
||||
// (e.g. [ALetter] [ExtendNumLet] [Katakana] [ExtendNumLet] [ALetter] and
|
||||
// [ALetter] [Numeric] [MidNum] [Numeric] [ALetter].)
|
||||
//
|
||||
// Note 2: the rule for Mid is very approximate, but works in most cases. To
|
||||
// improve, we could store the categories in the trie value and use a FA to
|
||||
// manage breaks. See TODO comment above.
|
||||
//
|
||||
// Note 3: according to the spec, it is possible for the Extend category to
|
||||
// introduce breaks between other categories grouped in Letter. However, this
|
||||
// is undesirable for our purposes. ICU prevents breaks in such cases as well.
|
||||
|
||||
// isBreak returns whether this rune should introduce a break.
|
||||
func (c info) isBreak() bool {
|
||||
return c.cccVal() == cccBreak
|
||||
}
|
||||
|
||||
// isLetter returns whether the rune is of break type ALetter, Hebrew_Letter,
|
||||
// Numeric, ExtendNumLet, or Extend.
|
||||
func (c info) isLetter() bool {
|
||||
ccc := c.cccVal()
|
||||
if ccc == cccZero {
|
||||
return !c.isCaseIgnorable()
|
||||
}
|
||||
return ccc != cccBreak
|
||||
}
|
||||
816
vendor/golang.org/x/text/cases/map.go
generated
vendored
Normal file
816
vendor/golang.org/x/text/cases/map.go
generated
vendored
Normal file
@ -0,0 +1,816 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cases
|
||||
|
||||
// This file contains the definitions of case mappings for all supported
|
||||
// languages. The rules for the language-specific tailorings were taken and
|
||||
// modified from the CLDR transform definitions in common/transforms.
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/text/internal"
|
||||
"golang.org/x/text/language"
|
||||
"golang.org/x/text/transform"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
)
|
||||
|
||||
// A mapFunc takes a context set to the current rune and writes the mapped
|
||||
// version to the same context. It may advance the context to the next rune. It
|
||||
// returns whether a checkpoint is possible: whether the pDst bytes written to
|
||||
// dst so far won't need changing as we see more source bytes.
|
||||
type mapFunc func(*context) bool
|
||||
|
||||
// A spanFunc takes a context set to the current rune and returns whether this
|
||||
// rune would be altered when written to the output. It may advance the context
|
||||
// to the next rune. It returns whether a checkpoint is possible.
|
||||
type spanFunc func(*context) bool
|
||||
|
||||
// maxIgnorable defines the maximum number of ignorables to consider for
|
||||
// lookahead operations.
|
||||
const maxIgnorable = 30
|
||||
|
||||
// supported lists the language tags for which we have tailorings.
|
||||
const supported = "und af az el lt nl tr"
|
||||
|
||||
func init() {
|
||||
tags := []language.Tag{}
|
||||
for _, s := range strings.Split(supported, " ") {
|
||||
tags = append(tags, language.MustParse(s))
|
||||
}
|
||||
matcher = internal.NewInheritanceMatcher(tags)
|
||||
Supported = language.NewCoverage(tags)
|
||||
}
|
||||
|
||||
var (
|
||||
matcher *internal.InheritanceMatcher
|
||||
|
||||
Supported language.Coverage
|
||||
|
||||
// We keep the following lists separate, instead of having a single per-
|
||||
// language struct, to give the compiler a chance to remove unused code.
|
||||
|
||||
// Some uppercase mappers are stateless, so we can precompute the
|
||||
// Transformers and save a bit on runtime allocations.
|
||||
upperFunc = []struct {
|
||||
upper mapFunc
|
||||
span spanFunc
|
||||
}{
|
||||
{nil, nil}, // und
|
||||
{nil, nil}, // af
|
||||
{aztrUpper(upper), isUpper}, // az
|
||||
{elUpper, noSpan}, // el
|
||||
{ltUpper(upper), noSpan}, // lt
|
||||
{nil, nil}, // nl
|
||||
{aztrUpper(upper), isUpper}, // tr
|
||||
}
|
||||
|
||||
undUpper transform.SpanningTransformer = &undUpperCaser{}
|
||||
undLower transform.SpanningTransformer = &undLowerCaser{}
|
||||
undLowerIgnoreSigma transform.SpanningTransformer = &undLowerIgnoreSigmaCaser{}
|
||||
|
||||
lowerFunc = []mapFunc{
|
||||
nil, // und
|
||||
nil, // af
|
||||
aztrLower, // az
|
||||
nil, // el
|
||||
ltLower, // lt
|
||||
nil, // nl
|
||||
aztrLower, // tr
|
||||
}
|
||||
|
||||
titleInfos = []struct {
|
||||
title mapFunc
|
||||
lower mapFunc
|
||||
titleSpan spanFunc
|
||||
rewrite func(*context)
|
||||
}{
|
||||
{title, lower, isTitle, nil}, // und
|
||||
{title, lower, isTitle, afnlRewrite}, // af
|
||||
{aztrUpper(title), aztrLower, isTitle, nil}, // az
|
||||
{title, lower, isTitle, nil}, // el
|
||||
{ltUpper(title), ltLower, noSpan, nil}, // lt
|
||||
{nlTitle, lower, nlTitleSpan, afnlRewrite}, // nl
|
||||
{aztrUpper(title), aztrLower, isTitle, nil}, // tr
|
||||
}
|
||||
)
|
||||
|
||||
func makeUpper(t language.Tag, o options) transform.SpanningTransformer {
|
||||
_, i, _ := matcher.Match(t)
|
||||
f := upperFunc[i].upper
|
||||
if f == nil {
|
||||
return undUpper
|
||||
}
|
||||
return &simpleCaser{f: f, span: upperFunc[i].span}
|
||||
}
|
||||
|
||||
func makeLower(t language.Tag, o options) transform.SpanningTransformer {
|
||||
_, i, _ := matcher.Match(t)
|
||||
f := lowerFunc[i]
|
||||
if f == nil {
|
||||
if o.ignoreFinalSigma {
|
||||
return undLowerIgnoreSigma
|
||||
}
|
||||
return undLower
|
||||
}
|
||||
if o.ignoreFinalSigma {
|
||||
return &simpleCaser{f: f, span: isLower}
|
||||
}
|
||||
return &lowerCaser{
|
||||
first: f,
|
||||
midWord: finalSigma(f),
|
||||
}
|
||||
}
|
||||
|
||||
func makeTitle(t language.Tag, o options) transform.SpanningTransformer {
|
||||
_, i, _ := matcher.Match(t)
|
||||
x := &titleInfos[i]
|
||||
lower := x.lower
|
||||
if o.noLower {
|
||||
lower = (*context).copy
|
||||
} else if !o.ignoreFinalSigma {
|
||||
lower = finalSigma(lower)
|
||||
}
|
||||
return &titleCaser{
|
||||
title: x.title,
|
||||
lower: lower,
|
||||
titleSpan: x.titleSpan,
|
||||
rewrite: x.rewrite,
|
||||
}
|
||||
}
|
||||
|
||||
func noSpan(c *context) bool {
|
||||
c.err = transform.ErrEndOfSpan
|
||||
return false
|
||||
}
|
||||
|
||||
// TODO: consider a similar special case for the fast majority lower case. This
|
||||
// is a bit more involved so will require some more precise benchmarking to
|
||||
// justify it.
|
||||
|
||||
type undUpperCaser struct{ transform.NopResetter }
|
||||
|
||||
// undUpperCaser implements the Transformer interface for doing an upper case
|
||||
// mapping for the root locale (und). It eliminates the need for an allocation
|
||||
// as it prevents escaping by not using function pointers.
|
||||
func (t undUpperCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
c := context{dst: dst, src: src, atEOF: atEOF}
|
||||
for c.next() {
|
||||
upper(&c)
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.ret()
|
||||
}
|
||||
|
||||
func (t undUpperCaser) Span(src []byte, atEOF bool) (n int, err error) {
|
||||
c := context{src: src, atEOF: atEOF}
|
||||
for c.next() && isUpper(&c) {
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.retSpan()
|
||||
}
|
||||
|
||||
// undLowerIgnoreSigmaCaser implements the Transformer interface for doing
|
||||
// a lower case mapping for the root locale (und) ignoring final sigma
|
||||
// handling. This casing algorithm is used in some performance-critical packages
|
||||
// like secure/precis and x/net/http/idna, which warrants its special-casing.
|
||||
type undLowerIgnoreSigmaCaser struct{ transform.NopResetter }
|
||||
|
||||
func (t undLowerIgnoreSigmaCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
c := context{dst: dst, src: src, atEOF: atEOF}
|
||||
for c.next() && lower(&c) {
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.ret()
|
||||
|
||||
}
|
||||
|
||||
// Span implements a generic lower-casing. This is possible as isLower works
|
||||
// for all lowercasing variants. All lowercase variants only vary in how they
|
||||
// transform a non-lowercase letter. They will never change an already lowercase
|
||||
// letter. In addition, there is no state.
|
||||
func (t undLowerIgnoreSigmaCaser) Span(src []byte, atEOF bool) (n int, err error) {
|
||||
c := context{src: src, atEOF: atEOF}
|
||||
for c.next() && isLower(&c) {
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.retSpan()
|
||||
}
|
||||
|
||||
type simpleCaser struct {
|
||||
context
|
||||
f mapFunc
|
||||
span spanFunc
|
||||
}
|
||||
|
||||
// simpleCaser implements the Transformer interface for doing a case operation
|
||||
// on a rune-by-rune basis.
|
||||
func (t *simpleCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
c := context{dst: dst, src: src, atEOF: atEOF}
|
||||
for c.next() && t.f(&c) {
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.ret()
|
||||
}
|
||||
|
||||
func (t *simpleCaser) Span(src []byte, atEOF bool) (n int, err error) {
|
||||
c := context{src: src, atEOF: atEOF}
|
||||
for c.next() && t.span(&c) {
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.retSpan()
|
||||
}
|
||||
|
||||
// undLowerCaser implements the Transformer interface for doing a lower case
|
||||
// mapping for the root locale (und) ignoring final sigma handling. This casing
|
||||
// algorithm is used in some performance-critical packages like secure/precis
|
||||
// and x/net/http/idna, which warrants its special-casing.
|
||||
type undLowerCaser struct{ transform.NopResetter }
|
||||
|
||||
func (t undLowerCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
c := context{dst: dst, src: src, atEOF: atEOF}
|
||||
|
||||
for isInterWord := true; c.next(); {
|
||||
if isInterWord {
|
||||
if c.info.isCased() {
|
||||
if !lower(&c) {
|
||||
break
|
||||
}
|
||||
isInterWord = false
|
||||
} else if !c.copy() {
|
||||
break
|
||||
}
|
||||
} else {
|
||||
if c.info.isNotCasedAndNotCaseIgnorable() {
|
||||
if !c.copy() {
|
||||
break
|
||||
}
|
||||
isInterWord = true
|
||||
} else if !c.hasPrefix("Σ") {
|
||||
if !lower(&c) {
|
||||
break
|
||||
}
|
||||
} else if !finalSigmaBody(&c) {
|
||||
break
|
||||
}
|
||||
}
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.ret()
|
||||
}
|
||||
|
||||
func (t undLowerCaser) Span(src []byte, atEOF bool) (n int, err error) {
|
||||
c := context{src: src, atEOF: atEOF}
|
||||
for c.next() && isLower(&c) {
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.retSpan()
|
||||
}
|
||||
|
||||
// lowerCaser implements the Transformer interface. The default Unicode lower
|
||||
// casing requires different treatment for the first and subsequent characters
|
||||
// of a word, most notably to handle the Greek final Sigma.
|
||||
type lowerCaser struct {
|
||||
undLowerIgnoreSigmaCaser
|
||||
|
||||
context
|
||||
|
||||
first, midWord mapFunc
|
||||
}
|
||||
|
||||
func (t *lowerCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
t.context = context{dst: dst, src: src, atEOF: atEOF}
|
||||
c := &t.context
|
||||
|
||||
for isInterWord := true; c.next(); {
|
||||
if isInterWord {
|
||||
if c.info.isCased() {
|
||||
if !t.first(c) {
|
||||
break
|
||||
}
|
||||
isInterWord = false
|
||||
} else if !c.copy() {
|
||||
break
|
||||
}
|
||||
} else {
|
||||
if c.info.isNotCasedAndNotCaseIgnorable() {
|
||||
if !c.copy() {
|
||||
break
|
||||
}
|
||||
isInterWord = true
|
||||
} else if !t.midWord(c) {
|
||||
break
|
||||
}
|
||||
}
|
||||
c.checkpoint()
|
||||
}
|
||||
return c.ret()
|
||||
}
|
||||
|
||||
// titleCaser implements the Transformer interface. Title casing algorithms
|
||||
// distinguish between the first letter of a word and subsequent letters of the
|
||||
// same word. It uses state to avoid requiring a potentially infinite lookahead.
|
||||
type titleCaser struct {
|
||||
context
|
||||
|
||||
// rune mappings used by the actual casing algorithms.
|
||||
title mapFunc
|
||||
lower mapFunc
|
||||
titleSpan spanFunc
|
||||
|
||||
rewrite func(*context)
|
||||
}
|
||||
|
||||
// Transform implements the standard Unicode title case algorithm as defined in
|
||||
// Chapter 3 of The Unicode Standard:
|
||||
// toTitlecase(X): Find the word boundaries in X according to Unicode Standard
|
||||
// Annex #29, "Unicode Text Segmentation." For each word boundary, find the
|
||||
// first cased character F following the word boundary. If F exists, map F to
|
||||
// Titlecase_Mapping(F); then map all characters C between F and the following
|
||||
// word boundary to Lowercase_Mapping(C).
|
||||
func (t *titleCaser) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
t.context = context{dst: dst, src: src, atEOF: atEOF, isMidWord: t.isMidWord}
|
||||
c := &t.context
|
||||
|
||||
if !c.next() {
|
||||
return c.ret()
|
||||
}
|
||||
|
||||
for {
|
||||
p := c.info
|
||||
if t.rewrite != nil {
|
||||
t.rewrite(c)
|
||||
}
|
||||
|
||||
wasMid := p.isMid()
|
||||
// Break out of this loop on failure to ensure we do not modify the
|
||||
// state incorrectly.
|
||||
if p.isCased() {
|
||||
if !c.isMidWord {
|
||||
if !t.title(c) {
|
||||
break
|
||||
}
|
||||
c.isMidWord = true
|
||||
} else if !t.lower(c) {
|
||||
break
|
||||
}
|
||||
} else if !c.copy() {
|
||||
break
|
||||
} else if p.isBreak() {
|
||||
c.isMidWord = false
|
||||
}
|
||||
|
||||
// As we save the state of the transformer, it is safe to call
|
||||
// checkpoint after any successful write.
|
||||
if !(c.isMidWord && wasMid) {
|
||||
c.checkpoint()
|
||||
}
|
||||
|
||||
if !c.next() {
|
||||
break
|
||||
}
|
||||
if wasMid && c.info.isMid() {
|
||||
c.isMidWord = false
|
||||
}
|
||||
}
|
||||
return c.ret()
|
||||
}
|
||||
|
||||
func (t *titleCaser) Span(src []byte, atEOF bool) (n int, err error) {
|
||||
t.context = context{src: src, atEOF: atEOF, isMidWord: t.isMidWord}
|
||||
c := &t.context
|
||||
|
||||
if !c.next() {
|
||||
return c.retSpan()
|
||||
}
|
||||
|
||||
for {
|
||||
p := c.info
|
||||
if t.rewrite != nil {
|
||||
t.rewrite(c)
|
||||
}
|
||||
|
||||
wasMid := p.isMid()
|
||||
// Break out of this loop on failure to ensure we do not modify the
|
||||
// state incorrectly.
|
||||
if p.isCased() {
|
||||
if !c.isMidWord {
|
||||
if !t.titleSpan(c) {
|
||||
break
|
||||
}
|
||||
c.isMidWord = true
|
||||
} else if !isLower(c) {
|
||||
break
|
||||
}
|
||||
} else if p.isBreak() {
|
||||
c.isMidWord = false
|
||||
}
|
||||
// As we save the state of the transformer, it is safe to call
|
||||
// checkpoint after any successful write.
|
||||
if !(c.isMidWord && wasMid) {
|
||||
c.checkpoint()
|
||||
}
|
||||
|
||||
if !c.next() {
|
||||
break
|
||||
}
|
||||
if wasMid && c.info.isMid() {
|
||||
c.isMidWord = false
|
||||
}
|
||||
}
|
||||
return c.retSpan()
|
||||
}
|
||||
|
||||
// finalSigma adds Greek final Sigma handing to another casing function. It
|
||||
// determines whether a lowercased sigma should be σ or ς, by looking ahead for
|
||||
// case-ignorables and a cased letters.
|
||||
func finalSigma(f mapFunc) mapFunc {
|
||||
return func(c *context) bool {
|
||||
if !c.hasPrefix("Σ") {
|
||||
return f(c)
|
||||
}
|
||||
return finalSigmaBody(c)
|
||||
}
|
||||
}
|
||||
|
||||
func finalSigmaBody(c *context) bool {
|
||||
// Current rune must be ∑.
|
||||
|
||||
// ::NFD();
|
||||
// # 03A3; 03C2; 03A3; 03A3; Final_Sigma; # GREEK CAPITAL LETTER SIGMA
|
||||
// Σ } [:case-ignorable:]* [:cased:] → σ;
|
||||
// [:cased:] [:case-ignorable:]* { Σ → ς;
|
||||
// ::Any-Lower;
|
||||
// ::NFC();
|
||||
|
||||
p := c.pDst
|
||||
c.writeString("ς")
|
||||
|
||||
// TODO: we should do this here, but right now this will never have an
|
||||
// effect as this is called when the prefix is Sigma, whereas Dutch and
|
||||
// Afrikaans only test for an apostrophe.
|
||||
//
|
||||
// if t.rewrite != nil {
|
||||
// t.rewrite(c)
|
||||
// }
|
||||
|
||||
// We need to do one more iteration after maxIgnorable, as a cased
|
||||
// letter is not an ignorable and may modify the result.
|
||||
wasMid := false
|
||||
for i := 0; i < maxIgnorable+1; i++ {
|
||||
if !c.next() {
|
||||
return false
|
||||
}
|
||||
if !c.info.isCaseIgnorable() {
|
||||
// All Midword runes are also case ignorable, so we are
|
||||
// guaranteed to have a letter or word break here. As we are
|
||||
// unreading the run, there is no need to unset c.isMidWord;
|
||||
// the title caser will handle this.
|
||||
if c.info.isCased() {
|
||||
// p+1 is guaranteed to be in bounds: if writing ς was
|
||||
// successful, p+1 will contain the second byte of ς. If not,
|
||||
// this function will have returned after c.next returned false.
|
||||
c.dst[p+1]++ // ς → σ
|
||||
}
|
||||
c.unreadRune()
|
||||
return true
|
||||
}
|
||||
// A case ignorable may also introduce a word break, so we may need
|
||||
// to continue searching even after detecting a break.
|
||||
isMid := c.info.isMid()
|
||||
if (wasMid && isMid) || c.info.isBreak() {
|
||||
c.isMidWord = false
|
||||
}
|
||||
wasMid = isMid
|
||||
c.copy()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// finalSigmaSpan would be the same as isLower.
|
||||
|
||||
// elUpper implements Greek upper casing, which entails removing a predefined
|
||||
// set of non-blocked modifiers. Note that these accents should not be removed
|
||||
// for title casing!
|
||||
// Example: "Οδός" -> "ΟΔΟΣ".
|
||||
func elUpper(c *context) bool {
|
||||
// From CLDR:
|
||||
// [:Greek:] [^[:ccc=Not_Reordered:][:ccc=Above:]]*? { [\u0313\u0314\u0301\u0300\u0306\u0342\u0308\u0304] → ;
|
||||
// [:Greek:] [^[:ccc=Not_Reordered:][:ccc=Iota_Subscript:]]*? { \u0345 → ;
|
||||
|
||||
r, _ := utf8.DecodeRune(c.src[c.pSrc:])
|
||||
oldPDst := c.pDst
|
||||
if !upper(c) {
|
||||
return false
|
||||
}
|
||||
if !unicode.Is(unicode.Greek, r) {
|
||||
return true
|
||||
}
|
||||
i := 0
|
||||
// Take the properties of the uppercased rune that is already written to the
|
||||
// destination. This saves us the trouble of having to uppercase the
|
||||
// decomposed rune again.
|
||||
if b := norm.NFD.Properties(c.dst[oldPDst:]).Decomposition(); b != nil {
|
||||
// Restore the destination position and process the decomposed rune.
|
||||
r, sz := utf8.DecodeRune(b)
|
||||
if r <= 0xFF { // See A.6.1
|
||||
return true
|
||||
}
|
||||
c.pDst = oldPDst
|
||||
// Insert the first rune and ignore the modifiers. See A.6.2.
|
||||
c.writeBytes(b[:sz])
|
||||
i = len(b[sz:]) / 2 // Greek modifiers are always of length 2.
|
||||
}
|
||||
|
||||
for ; i < maxIgnorable && c.next(); i++ {
|
||||
switch r, _ := utf8.DecodeRune(c.src[c.pSrc:]); r {
|
||||
// Above and Iota Subscript
|
||||
case 0x0300, // U+0300 COMBINING GRAVE ACCENT
|
||||
0x0301, // U+0301 COMBINING ACUTE ACCENT
|
||||
0x0304, // U+0304 COMBINING MACRON
|
||||
0x0306, // U+0306 COMBINING BREVE
|
||||
0x0308, // U+0308 COMBINING DIAERESIS
|
||||
0x0313, // U+0313 COMBINING COMMA ABOVE
|
||||
0x0314, // U+0314 COMBINING REVERSED COMMA ABOVE
|
||||
0x0342, // U+0342 COMBINING GREEK PERISPOMENI
|
||||
0x0345: // U+0345 COMBINING GREEK YPOGEGRAMMENI
|
||||
// No-op. Gobble the modifier.
|
||||
|
||||
default:
|
||||
switch v, _ := trie.lookup(c.src[c.pSrc:]); info(v).cccType() {
|
||||
case cccZero:
|
||||
c.unreadRune()
|
||||
return true
|
||||
|
||||
// We don't need to test for IotaSubscript as the only rune that
|
||||
// qualifies (U+0345) was already excluded in the switch statement
|
||||
// above. See A.4.
|
||||
|
||||
case cccAbove:
|
||||
return c.copy()
|
||||
default:
|
||||
// Some other modifier. We're still allowed to gobble Greek
|
||||
// modifiers after this.
|
||||
c.copy()
|
||||
}
|
||||
}
|
||||
}
|
||||
return i == maxIgnorable
|
||||
}
|
||||
|
||||
// TODO: implement elUpperSpan (low-priority: complex and infrequent).
|
||||
|
||||
func ltLower(c *context) bool {
|
||||
// From CLDR:
|
||||
// # Introduce an explicit dot above when lowercasing capital I's and J's
|
||||
// # whenever there are more accents above.
|
||||
// # (of the accents used in Lithuanian: grave, acute, tilde above, and ogonek)
|
||||
// # 0049; 0069 0307; 0049; 0049; lt More_Above; # LATIN CAPITAL LETTER I
|
||||
// # 004A; 006A 0307; 004A; 004A; lt More_Above; # LATIN CAPITAL LETTER J
|
||||
// # 012E; 012F 0307; 012E; 012E; lt More_Above; # LATIN CAPITAL LETTER I WITH OGONEK
|
||||
// # 00CC; 0069 0307 0300; 00CC; 00CC; lt; # LATIN CAPITAL LETTER I WITH GRAVE
|
||||
// # 00CD; 0069 0307 0301; 00CD; 00CD; lt; # LATIN CAPITAL LETTER I WITH ACUTE
|
||||
// # 0128; 0069 0307 0303; 0128; 0128; lt; # LATIN CAPITAL LETTER I WITH TILDE
|
||||
// ::NFD();
|
||||
// I } [^[:ccc=Not_Reordered:][:ccc=Above:]]* [:ccc=Above:] → i \u0307;
|
||||
// J } [^[:ccc=Not_Reordered:][:ccc=Above:]]* [:ccc=Above:] → j \u0307;
|
||||
// I \u0328 (Į) } [^[:ccc=Not_Reordered:][:ccc=Above:]]* [:ccc=Above:] → i \u0328 \u0307;
|
||||
// I \u0300 (Ì) → i \u0307 \u0300;
|
||||
// I \u0301 (Í) → i \u0307 \u0301;
|
||||
// I \u0303 (Ĩ) → i \u0307 \u0303;
|
||||
// ::Any-Lower();
|
||||
// ::NFC();
|
||||
|
||||
i := 0
|
||||
if r := c.src[c.pSrc]; r < utf8.RuneSelf {
|
||||
lower(c)
|
||||
if r != 'I' && r != 'J' {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
p := norm.NFD.Properties(c.src[c.pSrc:])
|
||||
if d := p.Decomposition(); len(d) >= 3 && (d[0] == 'I' || d[0] == 'J') {
|
||||
// UTF-8 optimization: the decomposition will only have an above
|
||||
// modifier if the last rune of the decomposition is in [U+300-U+311].
|
||||
// In all other cases, a decomposition starting with I is always
|
||||
// an I followed by modifiers that are not cased themselves. See A.2.
|
||||
if d[1] == 0xCC && d[2] <= 0x91 { // A.2.4.
|
||||
if !c.writeBytes(d[:1]) {
|
||||
return false
|
||||
}
|
||||
c.dst[c.pDst-1] += 'a' - 'A' // lower
|
||||
|
||||
// Assumption: modifier never changes on lowercase. See A.1.
|
||||
// Assumption: all modifiers added have CCC = Above. See A.2.3.
|
||||
return c.writeString("\u0307") && c.writeBytes(d[1:])
|
||||
}
|
||||
// In all other cases the additional modifiers will have a CCC
|
||||
// that is less than 230 (Above). We will insert the U+0307, if
|
||||
// needed, after these modifiers so that a string in FCD form
|
||||
// will remain so. See A.2.2.
|
||||
lower(c)
|
||||
i = 1
|
||||
} else {
|
||||
return lower(c)
|
||||
}
|
||||
}
|
||||
|
||||
for ; i < maxIgnorable && c.next(); i++ {
|
||||
switch c.info.cccType() {
|
||||
case cccZero:
|
||||
c.unreadRune()
|
||||
return true
|
||||
case cccAbove:
|
||||
return c.writeString("\u0307") && c.copy() // See A.1.
|
||||
default:
|
||||
c.copy() // See A.1.
|
||||
}
|
||||
}
|
||||
return i == maxIgnorable
|
||||
}
|
||||
|
||||
// ltLowerSpan would be the same as isLower.
|
||||
|
||||
func ltUpper(f mapFunc) mapFunc {
|
||||
return func(c *context) bool {
|
||||
// Unicode:
|
||||
// 0307; 0307; ; ; lt After_Soft_Dotted; # COMBINING DOT ABOVE
|
||||
//
|
||||
// From CLDR:
|
||||
// # Remove \u0307 following soft-dotteds (i, j, and the like), with possible
|
||||
// # intervening non-230 marks.
|
||||
// ::NFD();
|
||||
// [:Soft_Dotted:] [^[:ccc=Not_Reordered:][:ccc=Above:]]* { \u0307 → ;
|
||||
// ::Any-Upper();
|
||||
// ::NFC();
|
||||
|
||||
// TODO: See A.5. A soft-dotted rune never has an exception. This would
|
||||
// allow us to overload the exception bit and encode this property in
|
||||
// info. Need to measure performance impact of this.
|
||||
r, _ := utf8.DecodeRune(c.src[c.pSrc:])
|
||||
oldPDst := c.pDst
|
||||
if !f(c) {
|
||||
return false
|
||||
}
|
||||
if !unicode.Is(unicode.Soft_Dotted, r) {
|
||||
return true
|
||||
}
|
||||
|
||||
// We don't need to do an NFD normalization, as a soft-dotted rune never
|
||||
// contains U+0307. See A.3.
|
||||
|
||||
i := 0
|
||||
for ; i < maxIgnorable && c.next(); i++ {
|
||||
switch c.info.cccType() {
|
||||
case cccZero:
|
||||
c.unreadRune()
|
||||
return true
|
||||
case cccAbove:
|
||||
if c.hasPrefix("\u0307") {
|
||||
// We don't do a full NFC, but rather combine runes for
|
||||
// some of the common cases. (Returning NFC or
|
||||
// preserving normal form is neither a requirement nor
|
||||
// a possibility anyway).
|
||||
if !c.next() {
|
||||
return false
|
||||
}
|
||||
if c.dst[oldPDst] == 'I' && c.pDst == oldPDst+1 && c.src[c.pSrc] == 0xcc {
|
||||
s := ""
|
||||
switch c.src[c.pSrc+1] {
|
||||
case 0x80: // U+0300 COMBINING GRAVE ACCENT
|
||||
s = "\u00cc" // U+00CC LATIN CAPITAL LETTER I WITH GRAVE
|
||||
case 0x81: // U+0301 COMBINING ACUTE ACCENT
|
||||
s = "\u00cd" // U+00CD LATIN CAPITAL LETTER I WITH ACUTE
|
||||
case 0x83: // U+0303 COMBINING TILDE
|
||||
s = "\u0128" // U+0128 LATIN CAPITAL LETTER I WITH TILDE
|
||||
case 0x88: // U+0308 COMBINING DIAERESIS
|
||||
s = "\u00cf" // U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS
|
||||
default:
|
||||
}
|
||||
if s != "" {
|
||||
c.pDst = oldPDst
|
||||
return c.writeString(s)
|
||||
}
|
||||
}
|
||||
}
|
||||
return c.copy()
|
||||
default:
|
||||
c.copy()
|
||||
}
|
||||
}
|
||||
return i == maxIgnorable
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: implement ltUpperSpan (low priority: complex and infrequent).
|
||||
|
||||
func aztrUpper(f mapFunc) mapFunc {
|
||||
return func(c *context) bool {
|
||||
// i→İ;
|
||||
if c.src[c.pSrc] == 'i' {
|
||||
return c.writeString("İ")
|
||||
}
|
||||
return f(c)
|
||||
}
|
||||
}
|
||||
|
||||
func aztrLower(c *context) (done bool) {
|
||||
// From CLDR:
|
||||
// # I and i-dotless; I-dot and i are case pairs in Turkish and Azeri
|
||||
// # 0130; 0069; 0130; 0130; tr; # LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||
// İ→i;
|
||||
// # When lowercasing, remove dot_above in the sequence I + dot_above, which will turn into i.
|
||||
// # This matches the behavior of the canonically equivalent I-dot_above
|
||||
// # 0307; ; 0307; 0307; tr After_I; # COMBINING DOT ABOVE
|
||||
// # When lowercasing, unless an I is before a dot_above, it turns into a dotless i.
|
||||
// # 0049; 0131; 0049; 0049; tr Not_Before_Dot; # LATIN CAPITAL LETTER I
|
||||
// I([^[:ccc=Not_Reordered:][:ccc=Above:]]*)\u0307 → i$1 ;
|
||||
// I→ı ;
|
||||
// ::Any-Lower();
|
||||
if c.hasPrefix("\u0130") { // İ
|
||||
return c.writeString("i")
|
||||
}
|
||||
if c.src[c.pSrc] != 'I' {
|
||||
return lower(c)
|
||||
}
|
||||
|
||||
// We ignore the lower-case I for now, but insert it later when we know
|
||||
// which form we need.
|
||||
start := c.pSrc + c.sz
|
||||
|
||||
i := 0
|
||||
Loop:
|
||||
// We check for up to n ignorables before \u0307. As \u0307 is an
|
||||
// ignorable as well, n is maxIgnorable-1.
|
||||
for ; i < maxIgnorable && c.next(); i++ {
|
||||
switch c.info.cccType() {
|
||||
case cccAbove:
|
||||
if c.hasPrefix("\u0307") {
|
||||
return c.writeString("i") && c.writeBytes(c.src[start:c.pSrc]) // ignore U+0307
|
||||
}
|
||||
done = true
|
||||
break Loop
|
||||
case cccZero:
|
||||
c.unreadRune()
|
||||
done = true
|
||||
break Loop
|
||||
default:
|
||||
// We'll write this rune after we know which starter to use.
|
||||
}
|
||||
}
|
||||
if i == maxIgnorable {
|
||||
done = true
|
||||
}
|
||||
return c.writeString("ı") && c.writeBytes(c.src[start:c.pSrc+c.sz]) && done
|
||||
}
|
||||
|
||||
// aztrLowerSpan would be the same as isLower.
|
||||
|
||||
func nlTitle(c *context) bool {
|
||||
// From CLDR:
|
||||
// # Special titlecasing for Dutch initial "ij".
|
||||
// ::Any-Title();
|
||||
// # Fix up Ij at the beginning of a "word" (per Any-Title, notUAX #29)
|
||||
// [:^WB=ALetter:] [:WB=Extend:]* [[:WB=MidLetter:][:WB=MidNumLet:]]? { Ij } → IJ ;
|
||||
if c.src[c.pSrc] != 'I' && c.src[c.pSrc] != 'i' {
|
||||
return title(c)
|
||||
}
|
||||
|
||||
if !c.writeString("I") || !c.next() {
|
||||
return false
|
||||
}
|
||||
if c.src[c.pSrc] == 'j' || c.src[c.pSrc] == 'J' {
|
||||
return c.writeString("J")
|
||||
}
|
||||
c.unreadRune()
|
||||
return true
|
||||
}
|
||||
|
||||
func nlTitleSpan(c *context) bool {
|
||||
// From CLDR:
|
||||
// # Special titlecasing for Dutch initial "ij".
|
||||
// ::Any-Title();
|
||||
// # Fix up Ij at the beginning of a "word" (per Any-Title, notUAX #29)
|
||||
// [:^WB=ALetter:] [:WB=Extend:]* [[:WB=MidLetter:][:WB=MidNumLet:]]? { Ij } → IJ ;
|
||||
if c.src[c.pSrc] != 'I' {
|
||||
return isTitle(c)
|
||||
}
|
||||
if !c.next() || c.src[c.pSrc] == 'j' {
|
||||
return false
|
||||
}
|
||||
if c.src[c.pSrc] != 'J' {
|
||||
c.unreadRune()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Not part of CLDR, but see https://unicode.org/cldr/trac/ticket/7078.
|
||||
func afnlRewrite(c *context) {
|
||||
if c.hasPrefix("'") || c.hasPrefix("’") {
|
||||
c.isMidWord = true
|
||||
}
|
||||
}
|
||||
2256
vendor/golang.org/x/text/cases/tables10.0.0.go
generated
vendored
Normal file
2256
vendor/golang.org/x/text/cases/tables10.0.0.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2317
vendor/golang.org/x/text/cases/tables11.0.0.go
generated
vendored
Normal file
2317
vendor/golang.org/x/text/cases/tables11.0.0.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2360
vendor/golang.org/x/text/cases/tables12.0.0.go
generated
vendored
Normal file
2360
vendor/golang.org/x/text/cases/tables12.0.0.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2400
vendor/golang.org/x/text/cases/tables13.0.0.go
generated
vendored
Normal file
2400
vendor/golang.org/x/text/cases/tables13.0.0.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user