mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-21 12:09:40 -06:00
reva update bring #419
This commit is contained in:
4
go.mod
4
go.mod
@@ -64,7 +64,7 @@ require (
|
|||||||
github.com/open-policy-agent/opa v1.10.1
|
github.com/open-policy-agent/opa v1.10.1
|
||||||
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
|
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
|
||||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76
|
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76
|
||||||
github.com/opencloud-eu/reva/v2 v2.39.2
|
github.com/opencloud-eu/reva/v2 v2.39.3-0.20251113164418-9fd6b6864c10
|
||||||
github.com/opensearch-project/opensearch-go/v4 v4.5.0
|
github.com/opensearch-project/opensearch-go/v4 v4.5.0
|
||||||
github.com/orcaman/concurrent-map v1.0.0
|
github.com/orcaman/concurrent-map v1.0.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
@@ -377,7 +377,7 @@ require (
|
|||||||
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
go.yaml.in/yaml/v2 v2.4.3 // indirect
|
||||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||||
golang.org/x/mod v0.29.0 // indirect
|
golang.org/x/mod v0.29.0 // indirect
|
||||||
golang.org/x/sys v0.37.0 // indirect
|
golang.org/x/sys v0.38.0 // indirect
|
||||||
golang.org/x/time v0.14.0 // indirect
|
golang.org/x/time v0.14.0 // indirect
|
||||||
golang.org/x/tools v0.38.0 // indirect
|
golang.org/x/tools v0.38.0 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
|
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
|
||||||
|
|||||||
8
go.sum
8
go.sum
@@ -951,8 +951,8 @@ github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+l
|
|||||||
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89/go.mod h1:vigJkNss1N2QEceCuNw/ullDehncuJNFB6mEnzfq9UI=
|
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89/go.mod h1:vigJkNss1N2QEceCuNw/ullDehncuJNFB6mEnzfq9UI=
|
||||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 h1:vD/EdfDUrv4omSFjrinT8Mvf+8D7f9g4vgQ2oiDrVUI=
|
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 h1:vD/EdfDUrv4omSFjrinT8Mvf+8D7f9g4vgQ2oiDrVUI=
|
||||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
|
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
|
||||||
github.com/opencloud-eu/reva/v2 v2.39.2 h1:IzEd6ZOZXrKX8smbLzAUlPWpqOqNQYH7sfn3fGuYYrg=
|
github.com/opencloud-eu/reva/v2 v2.39.3-0.20251113164418-9fd6b6864c10 h1:9b5O3lzYHmR+aDNo81UYMcDGfUARrHw5Suk4YmqNgJA=
|
||||||
github.com/opencloud-eu/reva/v2 v2.39.2/go.mod h1:bw+f5zuqMLhkrwVPTMXmCdtbtrOh3RsdBHfdDC+taPM=
|
github.com/opencloud-eu/reva/v2 v2.39.3-0.20251113164418-9fd6b6864c10/go.mod h1:YxP7b+8olAhgbQBUUnsRQokgf1RkwpEBLq614XXXXHA=
|
||||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||||
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
|
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
|
||||||
@@ -1557,8 +1557,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
|||||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
|
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||||
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
SHELL := bash
|
SHELL := bash
|
||||||
NAME := web
|
NAME := web
|
||||||
WEB_ASSETS_VERSION = v4.2.0
|
WEB_ASSETS_VERSION = v4.2.1-alpha.1
|
||||||
WEB_ASSETS_BRANCH = main
|
WEB_ASSETS_BRANCH = main
|
||||||
|
|
||||||
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
|
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ func (s *Service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt
|
|||||||
st = status.NewPermissionDenied(ctx, err, "permission denied")
|
st = status.NewPermissionDenied(ctx, err, "permission denied")
|
||||||
case errtypes.NotSupported:
|
case errtypes.NotSupported:
|
||||||
// if trying to create a user home fall back to CreateHome
|
// if trying to create a user home fall back to CreateHome
|
||||||
if u, ok := ctxpkg.ContextGetUser(ctx); ok && req.Type == "personal" && utils.UserEqual(req.GetOwner().Id, u.Id) {
|
if u, ok := ctxpkg.ContextGetUser(ctx); ok && req.Type == "personal" && utils.UserEqual(req.GetOwner().GetId(), u.GetId()) {
|
||||||
if err := s.Storage.CreateHome(ctx); err != nil {
|
if err := s.Storage.CreateHome(ctx); err != nil {
|
||||||
st = status.NewInternal(ctx, "error creating home")
|
st = status.NewInternal(ctx, "error creating home")
|
||||||
} else {
|
} else {
|
||||||
@@ -583,7 +583,7 @@ func (s *Service) ListStorageSpaces(ctx context.Context, req *provider.ListStora
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, sp := range spaces {
|
for _, sp := range spaces {
|
||||||
if sp.Id == nil || sp.Id.OpaqueId == "" {
|
if sp.GetId() == nil || sp.GetId().GetOpaqueId() == "" {
|
||||||
log.Error().Str("service", "storageprovider").Str("driver", s.conf.Driver).Interface("space", sp).Msg("space is missing space id and root id")
|
log.Error().Str("service", "storageprovider").Str("driver", s.conf.Driver).Interface("space", sp).Msg("space is missing space id and root id")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,7 @@ func (s *Service) UpdateStorageSpace(ctx context.Context, req *provider.UpdateSt
|
|||||||
func (s *Service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteStorageSpaceRequest) (*provider.DeleteStorageSpaceResponse, error) {
|
func (s *Service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteStorageSpaceRequest) (*provider.DeleteStorageSpaceResponse, error) {
|
||||||
// we need to get the space before so we can return critical information
|
// we need to get the space before so we can return critical information
|
||||||
// FIXME: why is this string parsing necessary?
|
// FIXME: why is this string parsing necessary?
|
||||||
idraw, _ := storagespace.ParseID(req.Id.GetOpaqueId())
|
idraw, _ := storagespace.ParseID(req.GetId().GetOpaqueId())
|
||||||
idraw.OpaqueId = idraw.GetSpaceId()
|
idraw.OpaqueId = idraw.GetSpaceId()
|
||||||
id := &provider.StorageSpaceId{OpaqueId: storagespace.FormatResourceID(&idraw)}
|
id := &provider.StorageSpaceId{OpaqueId: storagespace.FormatResourceID(&idraw)}
|
||||||
|
|
||||||
@@ -629,7 +629,7 @@ func (s *Service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteSt
|
|||||||
case errtypes.BadRequest:
|
case errtypes.BadRequest:
|
||||||
st = status.NewInvalid(ctx, err.Error())
|
st = status.NewInvalid(ctx, err.Error())
|
||||||
default:
|
default:
|
||||||
st = status.NewInternal(ctx, "error deleting space: "+req.Id.String())
|
st = status.NewInternal(ctx, "error deleting space: "+req.GetId().String())
|
||||||
}
|
}
|
||||||
return &provider.DeleteStorageSpaceResponse{
|
return &provider.DeleteStorageSpaceResponse{
|
||||||
Status: st,
|
Status: st,
|
||||||
@@ -650,13 +650,13 @@ func (s *Service) DeleteStorageSpace(ctx context.Context, req *provider.DeleteSt
|
|||||||
case errtypes.BadRequest:
|
case errtypes.BadRequest:
|
||||||
st = status.NewInvalid(ctx, err.Error())
|
st = status.NewInvalid(ctx, err.Error())
|
||||||
default:
|
default:
|
||||||
st = status.NewInternal(ctx, "error deleting space: "+req.Id.String())
|
st = status.NewInternal(ctx, "error deleting space: "+req.GetId().String())
|
||||||
}
|
}
|
||||||
appctx.GetLogger(ctx).
|
appctx.GetLogger(ctx).
|
||||||
Error().
|
Error().
|
||||||
Err(err).
|
Err(err).
|
||||||
Interface("status", st).
|
Interface("status", st).
|
||||||
Interface("storage_space_id", req.Id).
|
Interface("storage_space_id", req.GetId()).
|
||||||
Msg("failed to delete storage space")
|
Msg("failed to delete storage space")
|
||||||
return &provider.DeleteStorageSpaceResponse{
|
return &provider.DeleteStorageSpaceResponse{
|
||||||
Status: st,
|
Status: st,
|
||||||
@@ -751,7 +751,7 @@ func (s *Service) Delete(ctx context.Context, req *provider.DeleteRequest) (*pro
|
|||||||
Status: status.NewStatusFromErrType(ctx, "delete", err),
|
Status: status.NewStatusFromErrType(ctx, "delete", err),
|
||||||
Opaque: &typesv1beta1.Opaque{
|
Opaque: &typesv1beta1.Opaque{
|
||||||
Map: map[string]*typesv1beta1.OpaqueEntry{
|
Map: map[string]*typesv1beta1.OpaqueEntry{
|
||||||
"opaque_id": {Decoder: "plain", Value: []byte(md.Id.OpaqueId)},
|
"opaque_id": {Decoder: "plain", Value: []byte(md.GetId().GetOpaqueId())},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
|
|||||||
30
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/trashbin/trashbin.go
generated
vendored
30
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/trashbin/trashbin.go
generated
vendored
@@ -455,6 +455,36 @@ func (tb *Trashbin) PurgeRecycleItem(ctx context.Context, spaceID, key, relative
|
|||||||
if err := os.Remove(it.path); err != nil && !os.IsNotExist(err) {
|
if err := os.Remove(it.path); err != nil && !os.IsNotExist(err) {
|
||||||
tb.log.Error().Err(err).Str("path", it.path).Msg("Failed to delete file")
|
tb.log.Error().Err(err).Str("path", it.path).Msg("Failed to delete file")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete revisions
|
||||||
|
globPattern := tb.lu.InternalPath(spaceID, id+node.RevisionIDDelimiter) + "*"
|
||||||
|
revs, err := filepath.Glob(globPattern)
|
||||||
|
if err != nil {
|
||||||
|
tb.log.Error().Err(err).Str("path", globPattern).Msg("glob failed badly")
|
||||||
|
}
|
||||||
|
for _, rev := range revs {
|
||||||
|
if tb.lu.MetadataBackend().IsMetaFile(rev) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := os.Remove(rev); err != nil {
|
||||||
|
tb.log.Error().Err(err).Str("revision", rev).Msg("error removing revision file")
|
||||||
|
}
|
||||||
|
|
||||||
|
// delete the metadata mlock file
|
||||||
|
parts := strings.SplitN(filepath.Base(rev), node.RevisionIDDelimiter, 2)
|
||||||
|
if len(parts) != 2 {
|
||||||
|
tb.log.Error().Str("path", rev).Msg("could not split revision")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
revId := id + node.RevisionIDDelimiter + parts[1]
|
||||||
|
mlockFile := tb.lu.MetadataBackend().LockfilePath(&trashNode{spaceID: spaceID, id: revId})
|
||||||
|
if err := os.Remove(mlockFile); err != nil {
|
||||||
|
tb.log.Error().Err(err).Str("path", mlockFile).Msg("error removing metadata mlock file")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/tree.go
generated
vendored
3
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/fs/posix/tree/tree.go
generated
vendored
@@ -581,6 +581,9 @@ func (t *Tree) Delete(ctx context.Context, n *node.Node) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove metadata mlock file if it exists
|
||||||
|
_ = os.Remove(t.lookup.MetadataBackend().LockfilePath(n))
|
||||||
|
|
||||||
err := t.trashbin.MoveToTrash(ctx, n, path)
|
err := t.trashbin.MoveToTrash(ctx, n, path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -125,7 +125,8 @@ func (b HybridBackend) list(ctx context.Context, n MetadataNode, acquireLock boo
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer cleanupLockfile(ctx, f)
|
// Warning: do not remove the lockfile or we may lock the same file more than once, https://github.com/opencloud-eu/opencloud/issues/1793
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
}
|
}
|
||||||
return xattr.List(filePath)
|
return xattr.List(filePath)
|
||||||
@@ -378,7 +379,8 @@ func (b HybridBackend) Remove(ctx context.Context, n MetadataNode, key string, a
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer cleanupLockfile(ctx, lockedFile)
|
// Warning: do not remove the lockfile or we may lock the same file more than once, https://github.com/opencloud-eu/opencloud/issues/1793
|
||||||
|
defer lockedFile.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
if isOffloadingAttribute(key) {
|
if isOffloadingAttribute(key) {
|
||||||
@@ -467,9 +469,6 @@ func (b HybridBackend) Purge(ctx context.Context, n MetadataNode) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete the metadata lockfile
|
|
||||||
_ = os.Remove(b.LockfilePath(n))
|
|
||||||
|
|
||||||
return b.metaCache.RemoveMetadata(b.cacheKey(n))
|
return b.metaCache.RemoveMetadata(b.cacheKey(n))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,15 +285,6 @@ func (b MessagePackBackend) Purge(_ context.Context, n MetadataNode) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
internalPath := n.InternalPath()
|
|
||||||
// for trash files always use the path without the timestamp
|
|
||||||
parts := strings.SplitN(n.GetID(), ".T.", 2)
|
|
||||||
if len(parts) > 1 {
|
|
||||||
internalPath = strings.TrimSuffix(internalPath, ".T."+parts[1])
|
|
||||||
}
|
|
||||||
|
|
||||||
_ = os.Remove(internalPath + ".mlock")
|
|
||||||
|
|
||||||
return os.Remove(b.MetadataPath(n))
|
return os.Remove(b.MetadataPath(n))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ func (b XattrsBackend) list(ctx context.Context, n MetadataNode, acquireLock boo
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer cleanupLockfile(ctx, f)
|
// Warning: do not remove the lockfile or we may lock the same file more than once, https://github.com/opencloud-eu/opencloud/issues/1793
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
}
|
}
|
||||||
return xattr.List(filePath)
|
return xattr.List(filePath)
|
||||||
@@ -177,7 +178,8 @@ func (b XattrsBackend) SetMultiple(ctx context.Context, n MetadataNode, attribs
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer cleanupLockfile(ctx, lockedFile)
|
// Warning: do not remove the lockfile or we may lock the same file more than once, https://github.com/opencloud-eu/opencloud/issues/1793
|
||||||
|
defer lockedFile.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// error handling: Count if there are errors while setting the attribs.
|
// error handling: Count if there are errors while setting the attribs.
|
||||||
@@ -211,7 +213,8 @@ func (b XattrsBackend) Remove(ctx context.Context, n MetadataNode, key string, a
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer cleanupLockfile(ctx, lockedFile)
|
// Warning: do not remove the lockfile or we may lock the same file more than once, https://github.com/opencloud-eu/opencloud/issues/1793
|
||||||
|
defer lockedFile.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
err := xattr.Remove(path, key)
|
err := xattr.Remove(path, key)
|
||||||
@@ -248,9 +251,6 @@ func (b XattrsBackend) Purge(ctx context.Context, n MetadataNode) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete the metadata lockfile
|
|
||||||
_ = os.Remove(b.LockfilePath(n))
|
|
||||||
|
|
||||||
return b.metaCache.RemoveMetadata(b.cacheKey(n))
|
return b.metaCache.RemoveMetadata(b.cacheKey(n))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,11 +286,6 @@ func (b XattrsBackend) Lock(n MetadataNode) (UnlockFunc, error) {
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func cleanupLockfile(_ context.Context, f *lockedfile.File) {
|
|
||||||
_ = f.Close()
|
|
||||||
// Warning: do not remove the lockfile or we may lock the same file more than once, https://github.com/opencloud-eu/opencloud/issues/1793
|
|
||||||
}
|
|
||||||
|
|
||||||
// AllWithLockedSource reads all extended attributes from the given reader.
|
// AllWithLockedSource reads all extended attributes from the given reader.
|
||||||
// The path argument is used for storing the data in the cache
|
// The path argument is used for storing the data in the cache
|
||||||
func (b XattrsBackend) AllWithLockedSource(ctx context.Context, n MetadataNode, _ io.Reader) (map[string][]byte, error) {
|
func (b XattrsBackend) AllWithLockedSource(ctx context.Context, n MetadataNode, _ io.Reader) (map[string][]byte, error) {
|
||||||
|
|||||||
45
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/spaces.go
generated
vendored
45
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/spaces.go
generated
vendored
@@ -204,7 +204,7 @@ func (fs *Decomposedfs) CreateStorageSpace(ctx context.Context, req *provider.Cr
|
|||||||
err = fs.updateIndexes(ctx, &provider.Grantee{
|
err = fs.updateIndexes(ctx, &provider.Grantee{
|
||||||
Type: provider.GranteeType_GRANTEE_TYPE_USER,
|
Type: provider.GranteeType_GRANTEE_TYPE_USER,
|
||||||
Id: &provider.Grantee_UserId{UserId: req.GetOwner().GetId()},
|
Id: &provider.Grantee_UserId{UserId: req.GetOwner().GetId()},
|
||||||
}, req.Type, root.ID, root.ID)
|
}, req.Type, root.GetID(), root.GetID())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ func (fs *Decomposedfs) CreateStorageSpace(ctx context.Context, req *provider.Cr
|
|||||||
Grantee: &provider.Grantee{
|
Grantee: &provider.Grantee{
|
||||||
Type: provider.GranteeType_GRANTEE_TYPE_USER,
|
Type: provider.GranteeType_GRANTEE_TYPE_USER,
|
||||||
Id: &provider.Grantee_UserId{
|
Id: &provider.Grantee_UserId{
|
||||||
UserId: u.Id,
|
UserId: u.GetId(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Permissions: ocsconv.NewManagerRole().CS3ResourcePermissions(),
|
Permissions: ocsconv.NewManagerRole().CS3ResourcePermissions(),
|
||||||
@@ -295,7 +295,8 @@ func (fs *Decomposedfs) ListStorageSpaces(ctx context.Context, filter []*provide
|
|||||||
spaceTypes[spaceTypeAny] = struct{}{}
|
spaceTypes[spaceTypeAny] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
authenticatedUserID := ctxpkg.ContextMustGetUser(ctx).GetId().GetOpaqueId()
|
authenticatedUser := ctxpkg.ContextMustGetUser(ctx)
|
||||||
|
authenticatedUserID := authenticatedUser.GetId().GetOpaqueId()
|
||||||
|
|
||||||
if !fs.p.ListSpacesOfUser(ctx, requestedUserID) {
|
if !fs.p.ListSpacesOfUser(ctx, requestedUserID) {
|
||||||
return nil, errtypes.PermissionDenied(fmt.Sprintf("user %s is not allowed to list spaces of other users", authenticatedUserID))
|
return nil, errtypes.PermissionDenied(fmt.Sprintf("user %s is not allowed to list spaces of other users", authenticatedUserID))
|
||||||
@@ -500,10 +501,14 @@ func (fs *Decomposedfs) ListStorageSpaces(ctx context.Context, filter []*provide
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
for r := range results {
|
for r := range results {
|
||||||
|
if authenticatedUser.GetId().GetTenantId() != r.GetOwner().GetId().GetTenantId() {
|
||||||
|
appctx.GetLogger(ctx).Warn().Str("id", r.GetId().GetOpaqueId()).Msg("space belongs to a different tenant")
|
||||||
|
continue
|
||||||
|
}
|
||||||
r.HasTrashedItems = true
|
r.HasTrashedItems = true
|
||||||
resourceID, err := storagespace.ParseID(r.GetId().GetOpaqueId())
|
resourceID, err := storagespace.ParseID(r.GetId().GetOpaqueId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
appctx.GetLogger(ctx).Error().Err(err).Str("id", r.Id.GetOpaqueId()).Msg("could not parse space id")
|
appctx.GetLogger(ctx).Error().Err(err).Str("id", r.GetId().GetOpaqueId()).Msg("could not parse space id")
|
||||||
r.HasTrashedItems = false
|
r.HasTrashedItems = false
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -577,7 +582,7 @@ func (fs *Decomposedfs) UpdateStorageSpace(ctx context.Context, req *provider.Up
|
|||||||
}
|
}
|
||||||
|
|
||||||
space := req.StorageSpace
|
space := req.StorageSpace
|
||||||
_, spaceID, _, _ := storagespace.SplitID(space.Id.OpaqueId)
|
_, spaceID, _, _ := storagespace.SplitID(space.GetId().GetOpaqueId())
|
||||||
|
|
||||||
metadata := make(node.Attributes, 5)
|
metadata := make(node.Attributes, 5)
|
||||||
if space.Name != "" {
|
if space.Name != "" {
|
||||||
@@ -723,7 +728,7 @@ func (fs *Decomposedfs) DeleteStorageSpace(ctx context.Context, req *provider.De
|
|||||||
_, purge = opaque.Map["purge"]
|
_, purge = opaque.Map["purge"]
|
||||||
}
|
}
|
||||||
|
|
||||||
_, spaceID, _, err := storagespace.SplitID(req.Id.GetOpaqueId())
|
_, spaceID, _, err := storagespace.SplitID(req.GetId().GetOpaqueId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -735,7 +740,7 @@ func (fs *Decomposedfs) DeleteStorageSpace(ctx context.Context, req *provider.De
|
|||||||
|
|
||||||
st, err := n.SpaceRoot.XattrString(ctx, prefixes.SpaceTypeAttr)
|
st, err := n.SpaceRoot.XattrString(ctx, prefixes.SpaceTypeAttr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errtypes.InternalError(fmt.Sprintf("space %s does not have a spacetype, possible corrupt decompsedfs", n.ID))
|
return errtypes.InternalError(fmt.Sprintf("space %s does not have a spacetype, possible corrupt decompsedfs", n.GetID()))
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := canDeleteSpace(ctx, spaceID, st, purge, n, fs.p); err != nil {
|
if err := canDeleteSpace(ctx, spaceID, st, purge, n, fs.p); err != nil {
|
||||||
@@ -877,18 +882,18 @@ func (fs *Decomposedfs) StorageSpaceFromNode(ctx context.Context, n *node.Node,
|
|||||||
case err != nil:
|
case err != nil:
|
||||||
return nil, err
|
return nil, err
|
||||||
case !rp.Stat:
|
case !rp.Stat:
|
||||||
return nil, errtypes.NotFound(fmt.Sprintf("space %s not found", n.ID))
|
return nil, errtypes.NotFound(fmt.Sprintf("space %s not found", n.GetID()))
|
||||||
}
|
}
|
||||||
|
|
||||||
if n.SpaceRoot.IsDisabled(ctx) {
|
if n.SpaceRoot.IsDisabled(ctx) {
|
||||||
rp, err := fs.p.AssemblePermissions(ctx, n)
|
rp, err := fs.p.AssemblePermissions(ctx, n)
|
||||||
if err != nil || !permissions.IsManager(rp) {
|
if err != nil || !permissions.IsManager(rp) {
|
||||||
return nil, errtypes.PermissionDenied(fmt.Sprintf("user %s is not allowed to list deleted spaces %s", user.Username, n.ID))
|
return nil, errtypes.PermissionDenied(fmt.Sprintf("user %s is not allowed to list deleted spaces %s", user.Username, n.GetID()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sublog := appctx.GetLogger(ctx).With().Str("spaceid", n.SpaceID).Logger()
|
sublog := appctx.GetLogger(ctx).With().Str("spaceid", n.GetSpaceID()).Logger()
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
// TODO apply more filters
|
// TODO apply more filters
|
||||||
@@ -939,13 +944,13 @@ func (fs *Decomposedfs) StorageSpaceFromNode(ctx context.Context, n *node.Node,
|
|||||||
switch {
|
switch {
|
||||||
case g.Grantee.Type == provider.GranteeType_GRANTEE_TYPE_USER:
|
case g.Grantee.Type == provider.GranteeType_GRANTEE_TYPE_USER:
|
||||||
// remove from user index
|
// remove from user index
|
||||||
if err := fs.userSpaceIndex.Remove(g.Grantee.GetUserId().GetOpaqueId(), n.SpaceID); err != nil {
|
if err := fs.userSpaceIndex.Remove(g.Grantee.GetUserId().GetOpaqueId(), n.GetSpaceID()); err != nil {
|
||||||
sublog.Error().Err(err).Str("grantee", id).
|
sublog.Error().Err(err).Str("grantee", id).
|
||||||
Msg("failed to delete expired user space index")
|
Msg("failed to delete expired user space index")
|
||||||
}
|
}
|
||||||
case g.Grantee.Type == provider.GranteeType_GRANTEE_TYPE_GROUP:
|
case g.Grantee.Type == provider.GranteeType_GRANTEE_TYPE_GROUP:
|
||||||
// remove from group index
|
// remove from group index
|
||||||
if err := fs.groupSpaceIndex.Remove(g.Grantee.GetGroupId().GetOpaqueId(), n.SpaceID); err != nil {
|
if err := fs.groupSpaceIndex.Remove(g.Grantee.GetGroupId().GetOpaqueId(), n.GetSpaceID()); err != nil {
|
||||||
sublog.Error().Err(err).Str("grantee", id).
|
sublog.Error().Err(err).Str("grantee", id).
|
||||||
Msg("failed to delete expired group space index")
|
Msg("failed to delete expired group space index")
|
||||||
}
|
}
|
||||||
@@ -977,8 +982,8 @@ func (fs *Decomposedfs) StorageSpaceFromNode(ctx context.Context, n *node.Node,
|
|||||||
ssID, err := storagespace.FormatReference(
|
ssID, err := storagespace.FormatReference(
|
||||||
&provider.Reference{
|
&provider.Reference{
|
||||||
ResourceId: &provider.ResourceId{
|
ResourceId: &provider.ResourceId{
|
||||||
SpaceId: n.SpaceRoot.SpaceID,
|
SpaceId: n.SpaceRoot.GetSpaceID(),
|
||||||
OpaqueId: n.SpaceRoot.ID},
|
OpaqueId: n.SpaceRoot.GetID()},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -1003,8 +1008,8 @@ func (fs *Decomposedfs) StorageSpaceFromNode(ctx context.Context, n *node.Node,
|
|||||||
},
|
},
|
||||||
Id: &provider.StorageSpaceId{OpaqueId: ssID},
|
Id: &provider.StorageSpaceId{OpaqueId: ssID},
|
||||||
Root: &provider.ResourceId{
|
Root: &provider.ResourceId{
|
||||||
SpaceId: n.SpaceRoot.SpaceID,
|
SpaceId: n.SpaceRoot.GetSpaceID(),
|
||||||
OpaqueId: n.SpaceRoot.ID,
|
OpaqueId: n.SpaceRoot.GetID(),
|
||||||
},
|
},
|
||||||
Name: sname,
|
Name: sname,
|
||||||
// SpaceType is read from xattr below
|
// SpaceType is read from xattr below
|
||||||
@@ -1046,7 +1051,7 @@ func (fs *Decomposedfs) StorageSpaceFromNode(ctx context.Context, n *node.Node,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
etag, err := node.CalculateEtag(n.ID, tmtime)
|
etag, err := node.CalculateEtag(n.GetID(), tmtime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1075,7 +1080,7 @@ func (fs *Decomposedfs) StorageSpaceFromNode(ctx context.Context, n *node.Node,
|
|||||||
}
|
}
|
||||||
if si := spaceAttributes.String(prefixes.SpaceImageAttr); si != "" {
|
if si := spaceAttributes.String(prefixes.SpaceImageAttr); si != "" {
|
||||||
space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "image", storagespace.FormatResourceID(
|
space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "image", storagespace.FormatResourceID(
|
||||||
&provider.ResourceId{StorageId: space.Root.StorageId, SpaceId: space.Root.SpaceId, OpaqueId: si},
|
&provider.ResourceId{StorageId: space.Root.StorageId, SpaceId: space.GetRoot().GetSpaceId(), OpaqueId: si},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
if sd := spaceAttributes.String(prefixes.SpaceDescriptionAttr); sd != "" {
|
if sd := spaceAttributes.String(prefixes.SpaceDescriptionAttr); sd != "" {
|
||||||
@@ -1083,7 +1088,7 @@ func (fs *Decomposedfs) StorageSpaceFromNode(ctx context.Context, n *node.Node,
|
|||||||
}
|
}
|
||||||
if sr := spaceAttributes.String(prefixes.SpaceReadmeAttr); sr != "" {
|
if sr := spaceAttributes.String(prefixes.SpaceReadmeAttr); sr != "" {
|
||||||
space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "readme", storagespace.FormatResourceID(
|
space.Opaque = utils.AppendPlainToOpaque(space.Opaque, "readme", storagespace.FormatResourceID(
|
||||||
&provider.ResourceId{StorageId: space.Root.StorageId, SpaceId: space.Root.SpaceId, OpaqueId: sr},
|
&provider.ResourceId{StorageId: space.Root.StorageId, SpaceId: space.GetRoot().GetSpaceId(), OpaqueId: sr},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
if sa := spaceAttributes.String(prefixes.SpaceAliasAttr); sa != "" {
|
if sa := spaceAttributes.String(prefixes.SpaceAliasAttr); sa != "" {
|
||||||
@@ -1157,5 +1162,5 @@ func canDeleteSpace(ctx context.Context, spaceID string, typ string, purge bool,
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return errtypes.PermissionDenied(fmt.Sprintf("user is not allowed to delete space %s", n.ID))
|
return errtypes.PermissionDenied(fmt.Sprintf("user is not allowed to delete space %s", n.GetID()))
|
||||||
}
|
}
|
||||||
|
|||||||
22
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/tree/tree.go
generated
vendored
22
vendor/github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/tree/tree.go
generated
vendored
@@ -503,6 +503,9 @@ func (t *Tree) Delete(ctx context.Context, n *node.Node) (err error) {
|
|||||||
// Remove lock file if it exists
|
// Remove lock file if it exists
|
||||||
_ = os.Remove(n.LockFilePaths()[0])
|
_ = os.Remove(n.LockFilePaths()[0])
|
||||||
|
|
||||||
|
// Remove metadata mlock file if it exists
|
||||||
|
_ = os.Remove(t.lookup.MetadataBackend().LockfilePath(n))
|
||||||
|
|
||||||
// finally remove the entry from the parent dir
|
// finally remove the entry from the parent dir
|
||||||
if err = os.Remove(path); err != nil {
|
if err = os.Remove(path); err != nil {
|
||||||
// To roll back changes
|
// To roll back changes
|
||||||
@@ -704,7 +707,7 @@ func (t *Tree) InitNewNode(ctx context.Context, n *node.Node, fsize uint64) (met
|
|||||||
|
|
||||||
func (t *Tree) removeNode(ctx context.Context, n *node.Node) error {
|
func (t *Tree) removeNode(ctx context.Context, n *node.Node) error {
|
||||||
path := n.InternalPath()
|
path := n.InternalPath()
|
||||||
logger := appctx.GetLogger(ctx)
|
logger := appctx.GetLogger(ctx).With().Str("spaceid", n.SpaceID).Str("nodeid", n.ID).Logger()
|
||||||
|
|
||||||
if n.IsDir(ctx) {
|
if n.IsDir(ctx) {
|
||||||
item, err := t.ListFolder(ctx, n)
|
item, err := t.ListFolder(ctx, n)
|
||||||
@@ -719,12 +722,7 @@ func (t *Tree) removeNode(ctx context.Context, n *node.Node) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete the actual node
|
// delete any metadata from disk and cache
|
||||||
if err := utils.RemoveItem(path); err != nil {
|
|
||||||
logger.Error().Err(err).Str("path", path).Msg("error purging node")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := t.lookup.MetadataBackend().Purge(ctx, n); err != nil {
|
if err := t.lookup.MetadataBackend().Purge(ctx, n); err != nil {
|
||||||
logger.Error().Err(err).Str("path", t.lookup.MetadataBackend().MetadataPath(n)).Msg("error purging node metadata")
|
logger.Error().Err(err).Str("path", t.lookup.MetadataBackend().MetadataPath(n)).Msg("error purging node metadata")
|
||||||
return err
|
return err
|
||||||
@@ -733,7 +731,7 @@ func (t *Tree) removeNode(ctx context.Context, n *node.Node) error {
|
|||||||
// delete blob from blobstore
|
// delete blob from blobstore
|
||||||
if n.BlobID != "" {
|
if n.BlobID != "" {
|
||||||
if err := t.DeleteBlob(n); err != nil {
|
if err := t.DeleteBlob(n); err != nil {
|
||||||
logger.Error().Err(err).Str("blobID", n.BlobID).Msg("error purging nodes blob")
|
logger.Error().Err(err).Str("blobID", n.BlobID).Msg("error purging node blob")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -760,7 +758,7 @@ func (t *Tree) removeNode(ctx context.Context, n *node.Node) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := utils.RemoveItem(rev); err != nil {
|
if err := os.Remove(rev); err != nil {
|
||||||
logger.Error().Err(err).Str("revision", rev).Msg("error removing revision node")
|
logger.Error().Err(err).Str("revision", rev).Msg("error removing revision node")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -777,6 +775,12 @@ func (t *Tree) removeNode(ctx context.Context, n *node.Node) error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete the actual node and empty parent dirs
|
||||||
|
if err := utils.RemoveItem(path); err != nil {
|
||||||
|
logger.Error().Err(err).Str("path", path).Msg("error purging node")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
3
vendor/golang.org/x/sys/cpu/cpu.go
generated
vendored
3
vendor/golang.org/x/sys/cpu/cpu.go
generated
vendored
@@ -92,6 +92,9 @@ var ARM64 struct {
|
|||||||
HasSHA2 bool // SHA2 hardware implementation
|
HasSHA2 bool // SHA2 hardware implementation
|
||||||
HasCRC32 bool // CRC32 hardware implementation
|
HasCRC32 bool // CRC32 hardware implementation
|
||||||
HasATOMICS bool // Atomic memory operation instruction set
|
HasATOMICS bool // Atomic memory operation instruction set
|
||||||
|
HasHPDS bool // Hierarchical permission disables in translations tables
|
||||||
|
HasLOR bool // Limited ordering regions
|
||||||
|
HasPAN bool // Privileged access never
|
||||||
HasFPHP bool // Half precision floating-point instruction set
|
HasFPHP bool // Half precision floating-point instruction set
|
||||||
HasASIMDHP bool // Advanced SIMD half precision instruction set
|
HasASIMDHP bool // Advanced SIMD half precision instruction set
|
||||||
HasCPUID bool // CPUID identification scheme registers
|
HasCPUID bool // CPUID identification scheme registers
|
||||||
|
|||||||
20
vendor/golang.org/x/sys/cpu/cpu_arm64.go
generated
vendored
20
vendor/golang.org/x/sys/cpu/cpu_arm64.go
generated
vendored
@@ -65,10 +65,10 @@ func setMinimalFeatures() {
|
|||||||
func readARM64Registers() {
|
func readARM64Registers() {
|
||||||
Initialized = true
|
Initialized = true
|
||||||
|
|
||||||
parseARM64SystemRegisters(getisar0(), getisar1(), getpfr0())
|
parseARM64SystemRegisters(getisar0(), getisar1(), getmmfr1(), getpfr0())
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
|
func parseARM64SystemRegisters(isar0, isar1, mmfr1, pfr0 uint64) {
|
||||||
// ID_AA64ISAR0_EL1
|
// ID_AA64ISAR0_EL1
|
||||||
switch extractBits(isar0, 4, 7) {
|
switch extractBits(isar0, 4, 7) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -152,6 +152,22 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
|
|||||||
ARM64.HasI8MM = true
|
ARM64.HasI8MM = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ID_AA64MMFR1_EL1
|
||||||
|
switch extractBits(mmfr1, 12, 15) {
|
||||||
|
case 1, 2:
|
||||||
|
ARM64.HasHPDS = true
|
||||||
|
}
|
||||||
|
|
||||||
|
switch extractBits(mmfr1, 16, 19) {
|
||||||
|
case 1:
|
||||||
|
ARM64.HasLOR = true
|
||||||
|
}
|
||||||
|
|
||||||
|
switch extractBits(mmfr1, 20, 23) {
|
||||||
|
case 1, 2, 3:
|
||||||
|
ARM64.HasPAN = true
|
||||||
|
}
|
||||||
|
|
||||||
// ID_AA64PFR0_EL1
|
// ID_AA64PFR0_EL1
|
||||||
switch extractBits(pfr0, 16, 19) {
|
switch extractBits(pfr0, 16, 19) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
19
vendor/golang.org/x/sys/cpu/cpu_arm64.s
generated
vendored
19
vendor/golang.org/x/sys/cpu/cpu_arm64.s
generated
vendored
@@ -9,31 +9,34 @@
|
|||||||
// func getisar0() uint64
|
// func getisar0() uint64
|
||||||
TEXT ·getisar0(SB),NOSPLIT,$0-8
|
TEXT ·getisar0(SB),NOSPLIT,$0-8
|
||||||
// get Instruction Set Attributes 0 into x0
|
// get Instruction Set Attributes 0 into x0
|
||||||
// mrs x0, ID_AA64ISAR0_EL1 = d5380600
|
MRS ID_AA64ISAR0_EL1, R0
|
||||||
WORD $0xd5380600
|
|
||||||
MOVD R0, ret+0(FP)
|
MOVD R0, ret+0(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// func getisar1() uint64
|
// func getisar1() uint64
|
||||||
TEXT ·getisar1(SB),NOSPLIT,$0-8
|
TEXT ·getisar1(SB),NOSPLIT,$0-8
|
||||||
// get Instruction Set Attributes 1 into x0
|
// get Instruction Set Attributes 1 into x0
|
||||||
// mrs x0, ID_AA64ISAR1_EL1 = d5380620
|
MRS ID_AA64ISAR1_EL1, R0
|
||||||
WORD $0xd5380620
|
MOVD R0, ret+0(FP)
|
||||||
|
RET
|
||||||
|
|
||||||
|
// func getmmfr1() uint64
|
||||||
|
TEXT ·getmmfr1(SB),NOSPLIT,$0-8
|
||||||
|
// get Memory Model Feature Register 1 into x0
|
||||||
|
MRS ID_AA64MMFR1_EL1, R0
|
||||||
MOVD R0, ret+0(FP)
|
MOVD R0, ret+0(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// func getpfr0() uint64
|
// func getpfr0() uint64
|
||||||
TEXT ·getpfr0(SB),NOSPLIT,$0-8
|
TEXT ·getpfr0(SB),NOSPLIT,$0-8
|
||||||
// get Processor Feature Register 0 into x0
|
// get Processor Feature Register 0 into x0
|
||||||
// mrs x0, ID_AA64PFR0_EL1 = d5380400
|
MRS ID_AA64PFR0_EL1, R0
|
||||||
WORD $0xd5380400
|
|
||||||
MOVD R0, ret+0(FP)
|
MOVD R0, ret+0(FP)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
// func getzfr0() uint64
|
// func getzfr0() uint64
|
||||||
TEXT ·getzfr0(SB),NOSPLIT,$0-8
|
TEXT ·getzfr0(SB),NOSPLIT,$0-8
|
||||||
// get SVE Feature Register 0 into x0
|
// get SVE Feature Register 0 into x0
|
||||||
// mrs x0, ID_AA64ZFR0_EL1 = d5380480
|
MRS ID_AA64ZFR0_EL1, R0
|
||||||
WORD $0xd5380480
|
|
||||||
MOVD R0, ret+0(FP)
|
MOVD R0, ret+0(FP)
|
||||||
RET
|
RET
|
||||||
|
|||||||
1
vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
generated
vendored
1
vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
generated
vendored
@@ -8,5 +8,6 @@ package cpu
|
|||||||
|
|
||||||
func getisar0() uint64
|
func getisar0() uint64
|
||||||
func getisar1() uint64
|
func getisar1() uint64
|
||||||
|
func getmmfr1() uint64
|
||||||
func getpfr0() uint64
|
func getpfr0() uint64
|
||||||
func getzfr0() uint64
|
func getzfr0() uint64
|
||||||
|
|||||||
1
vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
generated
vendored
1
vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
generated
vendored
@@ -8,4 +8,5 @@ package cpu
|
|||||||
|
|
||||||
func getisar0() uint64 { return 0 }
|
func getisar0() uint64 { return 0 }
|
||||||
func getisar1() uint64 { return 0 }
|
func getisar1() uint64 { return 0 }
|
||||||
|
func getmmfr1() uint64 { return 0 }
|
||||||
func getpfr0() uint64 { return 0 }
|
func getpfr0() uint64 { return 0 }
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
generated
vendored
@@ -167,7 +167,7 @@ func doinit() {
|
|||||||
setMinimalFeatures()
|
setMinimalFeatures()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64pfr0)
|
parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64mmfr1, cpuid.aa64pfr0)
|
||||||
|
|
||||||
Initialized = true
|
Initialized = true
|
||||||
}
|
}
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
generated
vendored
@@ -59,7 +59,7 @@ func doinit() {
|
|||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
parseARM64SystemRegisters(isar0, isar1, 0)
|
parseARM64SystemRegisters(isar0, isar1, 0, 0)
|
||||||
|
|
||||||
Initialized = true
|
Initialized = true
|
||||||
}
|
}
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
2
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@@ -226,6 +226,7 @@ struct ltchars {
|
|||||||
#include <linux/cryptouser.h>
|
#include <linux/cryptouser.h>
|
||||||
#include <linux/devlink.h>
|
#include <linux/devlink.h>
|
||||||
#include <linux/dm-ioctl.h>
|
#include <linux/dm-ioctl.h>
|
||||||
|
#include <linux/elf.h>
|
||||||
#include <linux/errqueue.h>
|
#include <linux/errqueue.h>
|
||||||
#include <linux/ethtool_netlink.h>
|
#include <linux/ethtool_netlink.h>
|
||||||
#include <linux/falloc.h>
|
#include <linux/falloc.h>
|
||||||
@@ -529,6 +530,7 @@ ccflags="$@"
|
|||||||
$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
|
$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
|
||||||
$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
|
$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
|
||||||
$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
|
$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
|
||||||
|
$2 ~ /^(DT|EI|ELF|EV|NN|NT|PF|SHF|SHN|SHT|STB|STT|VER)_/ ||
|
||||||
$2 ~ /^O?XTABS$/ ||
|
$2 ~ /^O?XTABS$/ ||
|
||||||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||||
$2 ~ /^IN_/ ||
|
$2 ~ /^IN_/ ||
|
||||||
|
|||||||
6
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
6
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@@ -2643,3 +2643,9 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
|
|||||||
|
|
||||||
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
||||||
//sys Mseal(b []byte, flags uint) (err error)
|
//sys Mseal(b []byte, flags uint) (err error)
|
||||||
|
|
||||||
|
//sys setMemPolicy(mode int, mask *CPUSet, size int) (err error) = SYS_SET_MEMPOLICY
|
||||||
|
|
||||||
|
func SetMemPolicy(mode int, mask *CPUSet) error {
|
||||||
|
return setMemPolicy(mode, mask, _CPU_SETSIZE)
|
||||||
|
}
|
||||||
|
|||||||
359
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
359
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
@@ -853,20 +853,86 @@ const (
|
|||||||
DM_VERSION_MAJOR = 0x4
|
DM_VERSION_MAJOR = 0x4
|
||||||
DM_VERSION_MINOR = 0x32
|
DM_VERSION_MINOR = 0x32
|
||||||
DM_VERSION_PATCHLEVEL = 0x0
|
DM_VERSION_PATCHLEVEL = 0x0
|
||||||
|
DT_ADDRRNGHI = 0x6ffffeff
|
||||||
|
DT_ADDRRNGLO = 0x6ffffe00
|
||||||
DT_BLK = 0x6
|
DT_BLK = 0x6
|
||||||
DT_CHR = 0x2
|
DT_CHR = 0x2
|
||||||
|
DT_DEBUG = 0x15
|
||||||
DT_DIR = 0x4
|
DT_DIR = 0x4
|
||||||
|
DT_ENCODING = 0x20
|
||||||
DT_FIFO = 0x1
|
DT_FIFO = 0x1
|
||||||
|
DT_FINI = 0xd
|
||||||
|
DT_FLAGS_1 = 0x6ffffffb
|
||||||
|
DT_GNU_HASH = 0x6ffffef5
|
||||||
|
DT_HASH = 0x4
|
||||||
|
DT_HIOS = 0x6ffff000
|
||||||
|
DT_HIPROC = 0x7fffffff
|
||||||
|
DT_INIT = 0xc
|
||||||
|
DT_JMPREL = 0x17
|
||||||
DT_LNK = 0xa
|
DT_LNK = 0xa
|
||||||
|
DT_LOOS = 0x6000000d
|
||||||
|
DT_LOPROC = 0x70000000
|
||||||
|
DT_NEEDED = 0x1
|
||||||
|
DT_NULL = 0x0
|
||||||
|
DT_PLTGOT = 0x3
|
||||||
|
DT_PLTREL = 0x14
|
||||||
|
DT_PLTRELSZ = 0x2
|
||||||
DT_REG = 0x8
|
DT_REG = 0x8
|
||||||
|
DT_REL = 0x11
|
||||||
|
DT_RELA = 0x7
|
||||||
|
DT_RELACOUNT = 0x6ffffff9
|
||||||
|
DT_RELAENT = 0x9
|
||||||
|
DT_RELASZ = 0x8
|
||||||
|
DT_RELCOUNT = 0x6ffffffa
|
||||||
|
DT_RELENT = 0x13
|
||||||
|
DT_RELSZ = 0x12
|
||||||
|
DT_RPATH = 0xf
|
||||||
DT_SOCK = 0xc
|
DT_SOCK = 0xc
|
||||||
|
DT_SONAME = 0xe
|
||||||
|
DT_STRSZ = 0xa
|
||||||
|
DT_STRTAB = 0x5
|
||||||
|
DT_SYMBOLIC = 0x10
|
||||||
|
DT_SYMENT = 0xb
|
||||||
|
DT_SYMTAB = 0x6
|
||||||
|
DT_TEXTREL = 0x16
|
||||||
DT_UNKNOWN = 0x0
|
DT_UNKNOWN = 0x0
|
||||||
|
DT_VALRNGHI = 0x6ffffdff
|
||||||
|
DT_VALRNGLO = 0x6ffffd00
|
||||||
|
DT_VERDEF = 0x6ffffffc
|
||||||
|
DT_VERDEFNUM = 0x6ffffffd
|
||||||
|
DT_VERNEED = 0x6ffffffe
|
||||||
|
DT_VERNEEDNUM = 0x6fffffff
|
||||||
|
DT_VERSYM = 0x6ffffff0
|
||||||
DT_WHT = 0xe
|
DT_WHT = 0xe
|
||||||
ECHO = 0x8
|
ECHO = 0x8
|
||||||
ECRYPTFS_SUPER_MAGIC = 0xf15f
|
ECRYPTFS_SUPER_MAGIC = 0xf15f
|
||||||
EFD_SEMAPHORE = 0x1
|
EFD_SEMAPHORE = 0x1
|
||||||
EFIVARFS_MAGIC = 0xde5e81e4
|
EFIVARFS_MAGIC = 0xde5e81e4
|
||||||
EFS_SUPER_MAGIC = 0x414a53
|
EFS_SUPER_MAGIC = 0x414a53
|
||||||
|
EI_CLASS = 0x4
|
||||||
|
EI_DATA = 0x5
|
||||||
|
EI_MAG0 = 0x0
|
||||||
|
EI_MAG1 = 0x1
|
||||||
|
EI_MAG2 = 0x2
|
||||||
|
EI_MAG3 = 0x3
|
||||||
|
EI_NIDENT = 0x10
|
||||||
|
EI_OSABI = 0x7
|
||||||
|
EI_PAD = 0x8
|
||||||
|
EI_VERSION = 0x6
|
||||||
|
ELFCLASS32 = 0x1
|
||||||
|
ELFCLASS64 = 0x2
|
||||||
|
ELFCLASSNONE = 0x0
|
||||||
|
ELFCLASSNUM = 0x3
|
||||||
|
ELFDATA2LSB = 0x1
|
||||||
|
ELFDATA2MSB = 0x2
|
||||||
|
ELFDATANONE = 0x0
|
||||||
|
ELFMAG = "\177ELF"
|
||||||
|
ELFMAG0 = 0x7f
|
||||||
|
ELFMAG1 = 'E'
|
||||||
|
ELFMAG2 = 'L'
|
||||||
|
ELFMAG3 = 'F'
|
||||||
|
ELFOSABI_LINUX = 0x3
|
||||||
|
ELFOSABI_NONE = 0x0
|
||||||
EM_386 = 0x3
|
EM_386 = 0x3
|
||||||
EM_486 = 0x6
|
EM_486 = 0x6
|
||||||
EM_68K = 0x4
|
EM_68K = 0x4
|
||||||
@@ -1152,14 +1218,24 @@ const (
|
|||||||
ETH_P_WCCP = 0x883e
|
ETH_P_WCCP = 0x883e
|
||||||
ETH_P_X25 = 0x805
|
ETH_P_X25 = 0x805
|
||||||
ETH_P_XDSA = 0xf8
|
ETH_P_XDSA = 0xf8
|
||||||
|
ET_CORE = 0x4
|
||||||
|
ET_DYN = 0x3
|
||||||
|
ET_EXEC = 0x2
|
||||||
|
ET_HIPROC = 0xffff
|
||||||
|
ET_LOPROC = 0xff00
|
||||||
|
ET_NONE = 0x0
|
||||||
|
ET_REL = 0x1
|
||||||
EV_ABS = 0x3
|
EV_ABS = 0x3
|
||||||
EV_CNT = 0x20
|
EV_CNT = 0x20
|
||||||
|
EV_CURRENT = 0x1
|
||||||
EV_FF = 0x15
|
EV_FF = 0x15
|
||||||
EV_FF_STATUS = 0x17
|
EV_FF_STATUS = 0x17
|
||||||
EV_KEY = 0x1
|
EV_KEY = 0x1
|
||||||
EV_LED = 0x11
|
EV_LED = 0x11
|
||||||
EV_MAX = 0x1f
|
EV_MAX = 0x1f
|
||||||
EV_MSC = 0x4
|
EV_MSC = 0x4
|
||||||
|
EV_NONE = 0x0
|
||||||
|
EV_NUM = 0x2
|
||||||
EV_PWR = 0x16
|
EV_PWR = 0x16
|
||||||
EV_REL = 0x2
|
EV_REL = 0x2
|
||||||
EV_REP = 0x14
|
EV_REP = 0x14
|
||||||
@@ -2276,7 +2352,167 @@ const (
|
|||||||
NLM_F_REPLACE = 0x100
|
NLM_F_REPLACE = 0x100
|
||||||
NLM_F_REQUEST = 0x1
|
NLM_F_REQUEST = 0x1
|
||||||
NLM_F_ROOT = 0x100
|
NLM_F_ROOT = 0x100
|
||||||
|
NN_386_IOPERM = "LINUX"
|
||||||
|
NN_386_TLS = "LINUX"
|
||||||
|
NN_ARC_V2 = "LINUX"
|
||||||
|
NN_ARM_FPMR = "LINUX"
|
||||||
|
NN_ARM_GCS = "LINUX"
|
||||||
|
NN_ARM_HW_BREAK = "LINUX"
|
||||||
|
NN_ARM_HW_WATCH = "LINUX"
|
||||||
|
NN_ARM_PACA_KEYS = "LINUX"
|
||||||
|
NN_ARM_PACG_KEYS = "LINUX"
|
||||||
|
NN_ARM_PAC_ENABLED_KEYS = "LINUX"
|
||||||
|
NN_ARM_PAC_MASK = "LINUX"
|
||||||
|
NN_ARM_POE = "LINUX"
|
||||||
|
NN_ARM_SSVE = "LINUX"
|
||||||
|
NN_ARM_SVE = "LINUX"
|
||||||
|
NN_ARM_SYSTEM_CALL = "LINUX"
|
||||||
|
NN_ARM_TAGGED_ADDR_CTRL = "LINUX"
|
||||||
|
NN_ARM_TLS = "LINUX"
|
||||||
|
NN_ARM_VFP = "LINUX"
|
||||||
|
NN_ARM_ZA = "LINUX"
|
||||||
|
NN_ARM_ZT = "LINUX"
|
||||||
|
NN_AUXV = "CORE"
|
||||||
|
NN_FILE = "CORE"
|
||||||
|
NN_GNU_PROPERTY_TYPE_0 = "GNU"
|
||||||
|
NN_LOONGARCH_CPUCFG = "LINUX"
|
||||||
|
NN_LOONGARCH_CSR = "LINUX"
|
||||||
|
NN_LOONGARCH_HW_BREAK = "LINUX"
|
||||||
|
NN_LOONGARCH_HW_WATCH = "LINUX"
|
||||||
|
NN_LOONGARCH_LASX = "LINUX"
|
||||||
|
NN_LOONGARCH_LBT = "LINUX"
|
||||||
|
NN_LOONGARCH_LSX = "LINUX"
|
||||||
|
NN_MIPS_DSP = "LINUX"
|
||||||
|
NN_MIPS_FP_MODE = "LINUX"
|
||||||
|
NN_MIPS_MSA = "LINUX"
|
||||||
|
NN_PPC_DEXCR = "LINUX"
|
||||||
|
NN_PPC_DSCR = "LINUX"
|
||||||
|
NN_PPC_EBB = "LINUX"
|
||||||
|
NN_PPC_HASHKEYR = "LINUX"
|
||||||
|
NN_PPC_PKEY = "LINUX"
|
||||||
|
NN_PPC_PMU = "LINUX"
|
||||||
|
NN_PPC_PPR = "LINUX"
|
||||||
|
NN_PPC_SPE = "LINUX"
|
||||||
|
NN_PPC_TAR = "LINUX"
|
||||||
|
NN_PPC_TM_CDSCR = "LINUX"
|
||||||
|
NN_PPC_TM_CFPR = "LINUX"
|
||||||
|
NN_PPC_TM_CGPR = "LINUX"
|
||||||
|
NN_PPC_TM_CPPR = "LINUX"
|
||||||
|
NN_PPC_TM_CTAR = "LINUX"
|
||||||
|
NN_PPC_TM_CVMX = "LINUX"
|
||||||
|
NN_PPC_TM_CVSX = "LINUX"
|
||||||
|
NN_PPC_TM_SPR = "LINUX"
|
||||||
|
NN_PPC_VMX = "LINUX"
|
||||||
|
NN_PPC_VSX = "LINUX"
|
||||||
|
NN_PRFPREG = "CORE"
|
||||||
|
NN_PRPSINFO = "CORE"
|
||||||
|
NN_PRSTATUS = "CORE"
|
||||||
|
NN_PRXFPREG = "LINUX"
|
||||||
|
NN_RISCV_CSR = "LINUX"
|
||||||
|
NN_RISCV_TAGGED_ADDR_CTRL = "LINUX"
|
||||||
|
NN_RISCV_VECTOR = "LINUX"
|
||||||
|
NN_S390_CTRS = "LINUX"
|
||||||
|
NN_S390_GS_BC = "LINUX"
|
||||||
|
NN_S390_GS_CB = "LINUX"
|
||||||
|
NN_S390_HIGH_GPRS = "LINUX"
|
||||||
|
NN_S390_LAST_BREAK = "LINUX"
|
||||||
|
NN_S390_PREFIX = "LINUX"
|
||||||
|
NN_S390_PV_CPU_DATA = "LINUX"
|
||||||
|
NN_S390_RI_CB = "LINUX"
|
||||||
|
NN_S390_SYSTEM_CALL = "LINUX"
|
||||||
|
NN_S390_TDB = "LINUX"
|
||||||
|
NN_S390_TIMER = "LINUX"
|
||||||
|
NN_S390_TODCMP = "LINUX"
|
||||||
|
NN_S390_TODPREG = "LINUX"
|
||||||
|
NN_S390_VXRS_HIGH = "LINUX"
|
||||||
|
NN_S390_VXRS_LOW = "LINUX"
|
||||||
|
NN_SIGINFO = "CORE"
|
||||||
|
NN_TASKSTRUCT = "CORE"
|
||||||
|
NN_VMCOREDD = "LINUX"
|
||||||
|
NN_X86_SHSTK = "LINUX"
|
||||||
|
NN_X86_XSAVE_LAYOUT = "LINUX"
|
||||||
|
NN_X86_XSTATE = "LINUX"
|
||||||
NSFS_MAGIC = 0x6e736673
|
NSFS_MAGIC = 0x6e736673
|
||||||
|
NT_386_IOPERM = 0x201
|
||||||
|
NT_386_TLS = 0x200
|
||||||
|
NT_ARC_V2 = 0x600
|
||||||
|
NT_ARM_FPMR = 0x40e
|
||||||
|
NT_ARM_GCS = 0x410
|
||||||
|
NT_ARM_HW_BREAK = 0x402
|
||||||
|
NT_ARM_HW_WATCH = 0x403
|
||||||
|
NT_ARM_PACA_KEYS = 0x407
|
||||||
|
NT_ARM_PACG_KEYS = 0x408
|
||||||
|
NT_ARM_PAC_ENABLED_KEYS = 0x40a
|
||||||
|
NT_ARM_PAC_MASK = 0x406
|
||||||
|
NT_ARM_POE = 0x40f
|
||||||
|
NT_ARM_SSVE = 0x40b
|
||||||
|
NT_ARM_SVE = 0x405
|
||||||
|
NT_ARM_SYSTEM_CALL = 0x404
|
||||||
|
NT_ARM_TAGGED_ADDR_CTRL = 0x409
|
||||||
|
NT_ARM_TLS = 0x401
|
||||||
|
NT_ARM_VFP = 0x400
|
||||||
|
NT_ARM_ZA = 0x40c
|
||||||
|
NT_ARM_ZT = 0x40d
|
||||||
|
NT_AUXV = 0x6
|
||||||
|
NT_FILE = 0x46494c45
|
||||||
|
NT_GNU_PROPERTY_TYPE_0 = 0x5
|
||||||
|
NT_LOONGARCH_CPUCFG = 0xa00
|
||||||
|
NT_LOONGARCH_CSR = 0xa01
|
||||||
|
NT_LOONGARCH_HW_BREAK = 0xa05
|
||||||
|
NT_LOONGARCH_HW_WATCH = 0xa06
|
||||||
|
NT_LOONGARCH_LASX = 0xa03
|
||||||
|
NT_LOONGARCH_LBT = 0xa04
|
||||||
|
NT_LOONGARCH_LSX = 0xa02
|
||||||
|
NT_MIPS_DSP = 0x800
|
||||||
|
NT_MIPS_FP_MODE = 0x801
|
||||||
|
NT_MIPS_MSA = 0x802
|
||||||
|
NT_PPC_DEXCR = 0x111
|
||||||
|
NT_PPC_DSCR = 0x105
|
||||||
|
NT_PPC_EBB = 0x106
|
||||||
|
NT_PPC_HASHKEYR = 0x112
|
||||||
|
NT_PPC_PKEY = 0x110
|
||||||
|
NT_PPC_PMU = 0x107
|
||||||
|
NT_PPC_PPR = 0x104
|
||||||
|
NT_PPC_SPE = 0x101
|
||||||
|
NT_PPC_TAR = 0x103
|
||||||
|
NT_PPC_TM_CDSCR = 0x10f
|
||||||
|
NT_PPC_TM_CFPR = 0x109
|
||||||
|
NT_PPC_TM_CGPR = 0x108
|
||||||
|
NT_PPC_TM_CPPR = 0x10e
|
||||||
|
NT_PPC_TM_CTAR = 0x10d
|
||||||
|
NT_PPC_TM_CVMX = 0x10a
|
||||||
|
NT_PPC_TM_CVSX = 0x10b
|
||||||
|
NT_PPC_TM_SPR = 0x10c
|
||||||
|
NT_PPC_VMX = 0x100
|
||||||
|
NT_PPC_VSX = 0x102
|
||||||
|
NT_PRFPREG = 0x2
|
||||||
|
NT_PRPSINFO = 0x3
|
||||||
|
NT_PRSTATUS = 0x1
|
||||||
|
NT_PRXFPREG = 0x46e62b7f
|
||||||
|
NT_RISCV_CSR = 0x900
|
||||||
|
NT_RISCV_TAGGED_ADDR_CTRL = 0x902
|
||||||
|
NT_RISCV_VECTOR = 0x901
|
||||||
|
NT_S390_CTRS = 0x304
|
||||||
|
NT_S390_GS_BC = 0x30c
|
||||||
|
NT_S390_GS_CB = 0x30b
|
||||||
|
NT_S390_HIGH_GPRS = 0x300
|
||||||
|
NT_S390_LAST_BREAK = 0x306
|
||||||
|
NT_S390_PREFIX = 0x305
|
||||||
|
NT_S390_PV_CPU_DATA = 0x30e
|
||||||
|
NT_S390_RI_CB = 0x30d
|
||||||
|
NT_S390_SYSTEM_CALL = 0x307
|
||||||
|
NT_S390_TDB = 0x308
|
||||||
|
NT_S390_TIMER = 0x301
|
||||||
|
NT_S390_TODCMP = 0x302
|
||||||
|
NT_S390_TODPREG = 0x303
|
||||||
|
NT_S390_VXRS_HIGH = 0x30a
|
||||||
|
NT_S390_VXRS_LOW = 0x309
|
||||||
|
NT_SIGINFO = 0x53494749
|
||||||
|
NT_TASKSTRUCT = 0x4
|
||||||
|
NT_VMCOREDD = 0x700
|
||||||
|
NT_X86_SHSTK = 0x204
|
||||||
|
NT_X86_XSAVE_LAYOUT = 0x205
|
||||||
|
NT_X86_XSTATE = 0x202
|
||||||
OCFS2_SUPER_MAGIC = 0x7461636f
|
OCFS2_SUPER_MAGIC = 0x7461636f
|
||||||
OCRNL = 0x8
|
OCRNL = 0x8
|
||||||
OFDEL = 0x80
|
OFDEL = 0x80
|
||||||
@@ -2463,6 +2699,59 @@ const (
|
|||||||
PERF_RECORD_MISC_USER = 0x2
|
PERF_RECORD_MISC_USER = 0x2
|
||||||
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
||||||
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
|
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
|
||||||
|
PF_ALG = 0x26
|
||||||
|
PF_APPLETALK = 0x5
|
||||||
|
PF_ASH = 0x12
|
||||||
|
PF_ATMPVC = 0x8
|
||||||
|
PF_ATMSVC = 0x14
|
||||||
|
PF_AX25 = 0x3
|
||||||
|
PF_BLUETOOTH = 0x1f
|
||||||
|
PF_BRIDGE = 0x7
|
||||||
|
PF_CAIF = 0x25
|
||||||
|
PF_CAN = 0x1d
|
||||||
|
PF_DECnet = 0xc
|
||||||
|
PF_ECONET = 0x13
|
||||||
|
PF_FILE = 0x1
|
||||||
|
PF_IB = 0x1b
|
||||||
|
PF_IEEE802154 = 0x24
|
||||||
|
PF_INET = 0x2
|
||||||
|
PF_INET6 = 0xa
|
||||||
|
PF_IPX = 0x4
|
||||||
|
PF_IRDA = 0x17
|
||||||
|
PF_ISDN = 0x22
|
||||||
|
PF_IUCV = 0x20
|
||||||
|
PF_KCM = 0x29
|
||||||
|
PF_KEY = 0xf
|
||||||
|
PF_LLC = 0x1a
|
||||||
|
PF_LOCAL = 0x1
|
||||||
|
PF_MAX = 0x2e
|
||||||
|
PF_MCTP = 0x2d
|
||||||
|
PF_MPLS = 0x1c
|
||||||
|
PF_NETBEUI = 0xd
|
||||||
|
PF_NETLINK = 0x10
|
||||||
|
PF_NETROM = 0x6
|
||||||
|
PF_NFC = 0x27
|
||||||
|
PF_PACKET = 0x11
|
||||||
|
PF_PHONET = 0x23
|
||||||
|
PF_PPPOX = 0x18
|
||||||
|
PF_QIPCRTR = 0x2a
|
||||||
|
PF_R = 0x4
|
||||||
|
PF_RDS = 0x15
|
||||||
|
PF_ROSE = 0xb
|
||||||
|
PF_ROUTE = 0x10
|
||||||
|
PF_RXRPC = 0x21
|
||||||
|
PF_SECURITY = 0xe
|
||||||
|
PF_SMC = 0x2b
|
||||||
|
PF_SNA = 0x16
|
||||||
|
PF_TIPC = 0x1e
|
||||||
|
PF_UNIX = 0x1
|
||||||
|
PF_UNSPEC = 0x0
|
||||||
|
PF_VSOCK = 0x28
|
||||||
|
PF_W = 0x2
|
||||||
|
PF_WANPIPE = 0x19
|
||||||
|
PF_X = 0x1
|
||||||
|
PF_X25 = 0x9
|
||||||
|
PF_XDP = 0x2c
|
||||||
PID_FS_MAGIC = 0x50494446
|
PID_FS_MAGIC = 0x50494446
|
||||||
PIPEFS_MAGIC = 0x50495045
|
PIPEFS_MAGIC = 0x50495045
|
||||||
PPPIOCGNPMODE = 0xc008744c
|
PPPIOCGNPMODE = 0xc008744c
|
||||||
@@ -2758,6 +3047,23 @@ const (
|
|||||||
PTRACE_SYSCALL_INFO_NONE = 0x0
|
PTRACE_SYSCALL_INFO_NONE = 0x0
|
||||||
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
|
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
|
||||||
PTRACE_TRACEME = 0x0
|
PTRACE_TRACEME = 0x0
|
||||||
|
PT_AARCH64_MEMTAG_MTE = 0x70000002
|
||||||
|
PT_DYNAMIC = 0x2
|
||||||
|
PT_GNU_EH_FRAME = 0x6474e550
|
||||||
|
PT_GNU_PROPERTY = 0x6474e553
|
||||||
|
PT_GNU_RELRO = 0x6474e552
|
||||||
|
PT_GNU_STACK = 0x6474e551
|
||||||
|
PT_HIOS = 0x6fffffff
|
||||||
|
PT_HIPROC = 0x7fffffff
|
||||||
|
PT_INTERP = 0x3
|
||||||
|
PT_LOAD = 0x1
|
||||||
|
PT_LOOS = 0x60000000
|
||||||
|
PT_LOPROC = 0x70000000
|
||||||
|
PT_NOTE = 0x4
|
||||||
|
PT_NULL = 0x0
|
||||||
|
PT_PHDR = 0x6
|
||||||
|
PT_SHLIB = 0x5
|
||||||
|
PT_TLS = 0x7
|
||||||
P_ALL = 0x0
|
P_ALL = 0x0
|
||||||
P_PGID = 0x2
|
P_PGID = 0x2
|
||||||
P_PID = 0x1
|
P_PID = 0x1
|
||||||
@@ -3091,6 +3397,47 @@ const (
|
|||||||
SEEK_MAX = 0x4
|
SEEK_MAX = 0x4
|
||||||
SEEK_SET = 0x0
|
SEEK_SET = 0x0
|
||||||
SELINUX_MAGIC = 0xf97cff8c
|
SELINUX_MAGIC = 0xf97cff8c
|
||||||
|
SHF_ALLOC = 0x2
|
||||||
|
SHF_EXCLUDE = 0x8000000
|
||||||
|
SHF_EXECINSTR = 0x4
|
||||||
|
SHF_GROUP = 0x200
|
||||||
|
SHF_INFO_LINK = 0x40
|
||||||
|
SHF_LINK_ORDER = 0x80
|
||||||
|
SHF_MASKOS = 0xff00000
|
||||||
|
SHF_MASKPROC = 0xf0000000
|
||||||
|
SHF_MERGE = 0x10
|
||||||
|
SHF_ORDERED = 0x4000000
|
||||||
|
SHF_OS_NONCONFORMING = 0x100
|
||||||
|
SHF_RELA_LIVEPATCH = 0x100000
|
||||||
|
SHF_RO_AFTER_INIT = 0x200000
|
||||||
|
SHF_STRINGS = 0x20
|
||||||
|
SHF_TLS = 0x400
|
||||||
|
SHF_WRITE = 0x1
|
||||||
|
SHN_ABS = 0xfff1
|
||||||
|
SHN_COMMON = 0xfff2
|
||||||
|
SHN_HIPROC = 0xff1f
|
||||||
|
SHN_HIRESERVE = 0xffff
|
||||||
|
SHN_LIVEPATCH = 0xff20
|
||||||
|
SHN_LOPROC = 0xff00
|
||||||
|
SHN_LORESERVE = 0xff00
|
||||||
|
SHN_UNDEF = 0x0
|
||||||
|
SHT_DYNAMIC = 0x6
|
||||||
|
SHT_DYNSYM = 0xb
|
||||||
|
SHT_HASH = 0x5
|
||||||
|
SHT_HIPROC = 0x7fffffff
|
||||||
|
SHT_HIUSER = 0xffffffff
|
||||||
|
SHT_LOPROC = 0x70000000
|
||||||
|
SHT_LOUSER = 0x80000000
|
||||||
|
SHT_NOBITS = 0x8
|
||||||
|
SHT_NOTE = 0x7
|
||||||
|
SHT_NULL = 0x0
|
||||||
|
SHT_NUM = 0xc
|
||||||
|
SHT_PROGBITS = 0x1
|
||||||
|
SHT_REL = 0x9
|
||||||
|
SHT_RELA = 0x4
|
||||||
|
SHT_SHLIB = 0xa
|
||||||
|
SHT_STRTAB = 0x3
|
||||||
|
SHT_SYMTAB = 0x2
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
@@ -3317,6 +3664,16 @@ const (
|
|||||||
STATX_UID = 0x8
|
STATX_UID = 0x8
|
||||||
STATX_WRITE_ATOMIC = 0x10000
|
STATX_WRITE_ATOMIC = 0x10000
|
||||||
STATX__RESERVED = 0x80000000
|
STATX__RESERVED = 0x80000000
|
||||||
|
STB_GLOBAL = 0x1
|
||||||
|
STB_LOCAL = 0x0
|
||||||
|
STB_WEAK = 0x2
|
||||||
|
STT_COMMON = 0x5
|
||||||
|
STT_FILE = 0x4
|
||||||
|
STT_FUNC = 0x2
|
||||||
|
STT_NOTYPE = 0x0
|
||||||
|
STT_OBJECT = 0x1
|
||||||
|
STT_SECTION = 0x3
|
||||||
|
STT_TLS = 0x6
|
||||||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||||
SYNC_FILE_RANGE_WRITE = 0x2
|
SYNC_FILE_RANGE_WRITE = 0x2
|
||||||
@@ -3553,6 +3910,8 @@ const (
|
|||||||
UTIME_OMIT = 0x3ffffffe
|
UTIME_OMIT = 0x3ffffffe
|
||||||
V9FS_MAGIC = 0x1021997
|
V9FS_MAGIC = 0x1021997
|
||||||
VERASE = 0x2
|
VERASE = 0x2
|
||||||
|
VER_FLG_BASE = 0x1
|
||||||
|
VER_FLG_WEAK = 0x2
|
||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
|||||||
10
vendor/golang.org/x/sys/unix/zsyscall_linux.go
generated
vendored
10
vendor/golang.org/x/sys/unix/zsyscall_linux.go
generated
vendored
@@ -2238,3 +2238,13 @@ func Mseal(b []byte, flags uint) (err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func setMemPolicy(mode int, mask *CPUSet, size int) (err error) {
|
||||||
|
_, _, e1 := Syscall(SYS_SET_MEMPOLICY, uintptr(mode), uintptr(unsafe.Pointer(mask)), uintptr(size))
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
31
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
31
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
@@ -3590,6 +3590,8 @@ type Nhmsg struct {
|
|||||||
Flags uint32
|
Flags uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SizeofNhmsg = 0x8
|
||||||
|
|
||||||
type NexthopGrp struct {
|
type NexthopGrp struct {
|
||||||
Id uint32
|
Id uint32
|
||||||
Weight uint8
|
Weight uint8
|
||||||
@@ -3597,6 +3599,8 @@ type NexthopGrp struct {
|
|||||||
Resvd2 uint16
|
Resvd2 uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SizeofNexthopGrp = 0x8
|
||||||
|
|
||||||
const (
|
const (
|
||||||
NHA_UNSPEC = 0x0
|
NHA_UNSPEC = 0x0
|
||||||
NHA_ID = 0x1
|
NHA_ID = 0x1
|
||||||
@@ -6332,3 +6336,30 @@ type SockDiagReq struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const RTM_NEWNVLAN = 0x70
|
const RTM_NEWNVLAN = 0x70
|
||||||
|
|
||||||
|
const (
|
||||||
|
MPOL_BIND = 0x2
|
||||||
|
MPOL_DEFAULT = 0x0
|
||||||
|
MPOL_F_ADDR = 0x2
|
||||||
|
MPOL_F_MEMS_ALLOWED = 0x4
|
||||||
|
MPOL_F_MOF = 0x8
|
||||||
|
MPOL_F_MORON = 0x10
|
||||||
|
MPOL_F_NODE = 0x1
|
||||||
|
MPOL_F_NUMA_BALANCING = 0x2000
|
||||||
|
MPOL_F_RELATIVE_NODES = 0x4000
|
||||||
|
MPOL_F_SHARED = 0x1
|
||||||
|
MPOL_F_STATIC_NODES = 0x8000
|
||||||
|
MPOL_INTERLEAVE = 0x3
|
||||||
|
MPOL_LOCAL = 0x4
|
||||||
|
MPOL_MAX = 0x7
|
||||||
|
MPOL_MF_INTERNAL = 0x10
|
||||||
|
MPOL_MF_LAZY = 0x8
|
||||||
|
MPOL_MF_MOVE_ALL = 0x4
|
||||||
|
MPOL_MF_MOVE = 0x2
|
||||||
|
MPOL_MF_STRICT = 0x1
|
||||||
|
MPOL_MF_VALID = 0x7
|
||||||
|
MPOL_MODE_FLAGS = 0xe000
|
||||||
|
MPOL_PREFERRED = 0x1
|
||||||
|
MPOL_PREFERRED_MANY = 0x5
|
||||||
|
MPOL_WEIGHTED_INTERLEAVE = 0x6
|
||||||
|
)
|
||||||
|
|||||||
15
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
15
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@@ -892,8 +892,12 @@ const socket_error = uintptr(^uint32(0))
|
|||||||
//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
|
//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
|
//sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx
|
||||||
//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex
|
//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex
|
||||||
|
//sys GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) = iphlpapi.GetIpForwardEntry2
|
||||||
|
//sys GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) = iphlpapi.GetIpForwardTable2
|
||||||
//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry
|
//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry
|
||||||
|
//sys FreeMibTable(memory unsafe.Pointer) = iphlpapi.FreeMibTable
|
||||||
//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange
|
//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange
|
||||||
|
//sys NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyRouteChange2
|
||||||
//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange
|
//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange
|
||||||
//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2
|
//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2
|
||||||
|
|
||||||
@@ -916,6 +920,17 @@ type RawSockaddrInet6 struct {
|
|||||||
Scope_id uint32
|
Scope_id uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RawSockaddrInet is a union that contains an IPv4, an IPv6 address, or an address family. See
|
||||||
|
// https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-sockaddr_inet.
|
||||||
|
//
|
||||||
|
// A [*RawSockaddrInet] may be converted to a [*RawSockaddrInet4] or [*RawSockaddrInet6] using
|
||||||
|
// unsafe, depending on the address family.
|
||||||
|
type RawSockaddrInet struct {
|
||||||
|
Family uint16
|
||||||
|
Port uint16
|
||||||
|
Data [6]uint32
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
|
|||||||
76
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
76
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
@@ -2320,6 +2320,82 @@ type MibIfRow2 struct {
|
|||||||
OutQLen uint64
|
OutQLen uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IP_ADDRESS_PREFIX stores an IP address prefix. See
|
||||||
|
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-ip_address_prefix.
|
||||||
|
type IpAddressPrefix struct {
|
||||||
|
Prefix RawSockaddrInet
|
||||||
|
PrefixLength uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
// NL_ROUTE_ORIGIN enumeration from nldef.h or
|
||||||
|
// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_origin.
|
||||||
|
const (
|
||||||
|
NlroManual = 0
|
||||||
|
NlroWellKnown = 1
|
||||||
|
NlroDHCP = 2
|
||||||
|
NlroRouterAdvertisement = 3
|
||||||
|
Nlro6to4 = 4
|
||||||
|
)
|
||||||
|
|
||||||
|
// NL_ROUTE_ORIGIN enumeration from nldef.h or
|
||||||
|
// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_protocol.
|
||||||
|
const (
|
||||||
|
MIB_IPPROTO_OTHER = 1
|
||||||
|
MIB_IPPROTO_LOCAL = 2
|
||||||
|
MIB_IPPROTO_NETMGMT = 3
|
||||||
|
MIB_IPPROTO_ICMP = 4
|
||||||
|
MIB_IPPROTO_EGP = 5
|
||||||
|
MIB_IPPROTO_GGP = 6
|
||||||
|
MIB_IPPROTO_HELLO = 7
|
||||||
|
MIB_IPPROTO_RIP = 8
|
||||||
|
MIB_IPPROTO_IS_IS = 9
|
||||||
|
MIB_IPPROTO_ES_IS = 10
|
||||||
|
MIB_IPPROTO_CISCO = 11
|
||||||
|
MIB_IPPROTO_BBN = 12
|
||||||
|
MIB_IPPROTO_OSPF = 13
|
||||||
|
MIB_IPPROTO_BGP = 14
|
||||||
|
MIB_IPPROTO_IDPR = 15
|
||||||
|
MIB_IPPROTO_EIGRP = 16
|
||||||
|
MIB_IPPROTO_DVMRP = 17
|
||||||
|
MIB_IPPROTO_RPL = 18
|
||||||
|
MIB_IPPROTO_DHCP = 19
|
||||||
|
MIB_IPPROTO_NT_AUTOSTATIC = 10002
|
||||||
|
MIB_IPPROTO_NT_STATIC = 10006
|
||||||
|
MIB_IPPROTO_NT_STATIC_NON_DOD = 10007
|
||||||
|
)
|
||||||
|
|
||||||
|
// MIB_IPFORWARD_ROW2 stores information about an IP route entry. See
|
||||||
|
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_row2.
|
||||||
|
type MibIpForwardRow2 struct {
|
||||||
|
InterfaceLuid uint64
|
||||||
|
InterfaceIndex uint32
|
||||||
|
DestinationPrefix IpAddressPrefix
|
||||||
|
NextHop RawSockaddrInet
|
||||||
|
SitePrefixLength uint8
|
||||||
|
ValidLifetime uint32
|
||||||
|
PreferredLifetime uint32
|
||||||
|
Metric uint32
|
||||||
|
Protocol uint32
|
||||||
|
Loopback uint8
|
||||||
|
AutoconfigureAddress uint8
|
||||||
|
Publish uint8
|
||||||
|
Immortal uint8
|
||||||
|
Age uint32
|
||||||
|
Origin uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
// MIB_IPFORWARD_TABLE2 contains a table of IP route entries. See
|
||||||
|
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_table2.
|
||||||
|
type MibIpForwardTable2 struct {
|
||||||
|
NumEntries uint32
|
||||||
|
Table [1]MibIpForwardRow2
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rows returns the IP route entries in the table.
|
||||||
|
func (t *MibIpForwardTable2) Rows() []MibIpForwardRow2 {
|
||||||
|
return unsafe.Slice(&t.Table[0], t.NumEntries)
|
||||||
|
}
|
||||||
|
|
||||||
// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See
|
// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row.
|
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row.
|
||||||
type MibUnicastIpAddressRow struct {
|
type MibUnicastIpAddressRow struct {
|
||||||
|
|||||||
37
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
37
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
@@ -182,13 +182,17 @@ var (
|
|||||||
procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
|
procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
|
||||||
procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
|
procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
|
||||||
procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2")
|
procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2")
|
||||||
|
procFreeMibTable = modiphlpapi.NewProc("FreeMibTable")
|
||||||
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
|
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
|
||||||
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
|
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
|
||||||
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
|
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
|
||||||
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
|
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
|
||||||
procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex")
|
procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex")
|
||||||
|
procGetIpForwardEntry2 = modiphlpapi.NewProc("GetIpForwardEntry2")
|
||||||
|
procGetIpForwardTable2 = modiphlpapi.NewProc("GetIpForwardTable2")
|
||||||
procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry")
|
procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry")
|
||||||
procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange")
|
procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange")
|
||||||
|
procNotifyRouteChange2 = modiphlpapi.NewProc("NotifyRouteChange2")
|
||||||
procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange")
|
procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange")
|
||||||
procAddDllDirectory = modkernel32.NewProc("AddDllDirectory")
|
procAddDllDirectory = modkernel32.NewProc("AddDllDirectory")
|
||||||
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
|
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
|
||||||
@@ -1624,6 +1628,11 @@ func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func FreeMibTable(memory unsafe.Pointer) {
|
||||||
|
syscall.SyscallN(procFreeMibTable.Addr(), uintptr(memory))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
|
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
|
||||||
r0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)))
|
r0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)))
|
||||||
if r0 != 0 {
|
if r0 != 0 {
|
||||||
@@ -1664,6 +1673,22 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) {
|
||||||
|
r0, _, _ := syscall.SyscallN(procGetIpForwardEntry2.Addr(), uintptr(unsafe.Pointer(row)))
|
||||||
|
if r0 != 0 {
|
||||||
|
errcode = syscall.Errno(r0)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) {
|
||||||
|
r0, _, _ := syscall.SyscallN(procGetIpForwardTable2.Addr(), uintptr(family), uintptr(unsafe.Pointer(table)))
|
||||||
|
if r0 != 0 {
|
||||||
|
errcode = syscall.Errno(r0)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) {
|
func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) {
|
||||||
r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row)))
|
r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row)))
|
||||||
if r0 != 0 {
|
if r0 != 0 {
|
||||||
@@ -1684,6 +1709,18 @@ func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsa
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
|
||||||
|
var _p0 uint32
|
||||||
|
if initialNotification {
|
||||||
|
_p0 = 1
|
||||||
|
}
|
||||||
|
r0, _, _ := syscall.SyscallN(procNotifyRouteChange2.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
|
||||||
|
if r0 != 0 {
|
||||||
|
errcode = syscall.Errno(r0)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
|
func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
|
||||||
var _p0 uint32
|
var _p0 uint32
|
||||||
if initialNotification {
|
if initialNotification {
|
||||||
|
|||||||
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@@ -1342,7 +1342,7 @@ github.com/opencloud-eu/icap-client
|
|||||||
# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76
|
# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/opencloud-eu/libre-graph-api-go
|
github.com/opencloud-eu/libre-graph-api-go
|
||||||
# github.com/opencloud-eu/reva/v2 v2.39.2
|
# github.com/opencloud-eu/reva/v2 v2.39.3-0.20251113164418-9fd6b6864c10
|
||||||
## explicit; go 1.24.1
|
## explicit; go 1.24.1
|
||||||
github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace
|
github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace
|
||||||
github.com/opencloud-eu/reva/v2/cmd/revad/runtime
|
github.com/opencloud-eu/reva/v2/cmd/revad/runtime
|
||||||
@@ -2442,7 +2442,7 @@ golang.org/x/oauth2/internal
|
|||||||
golang.org/x/sync/errgroup
|
golang.org/x/sync/errgroup
|
||||||
golang.org/x/sync/semaphore
|
golang.org/x/sync/semaphore
|
||||||
golang.org/x/sync/singleflight
|
golang.org/x/sync/singleflight
|
||||||
# golang.org/x/sys v0.37.0
|
# golang.org/x/sys v0.38.0
|
||||||
## explicit; go 1.24.0
|
## explicit; go 1.24.0
|
||||||
golang.org/x/sys/cpu
|
golang.org/x/sys/cpu
|
||||||
golang.org/x/sys/execabs
|
golang.org/x/sys/execabs
|
||||||
|
|||||||
Reference in New Issue
Block a user