feature/ui - zatim ne uplne uhlazena ale celkem pouzitelna appka #1
134
fyne_ui.go
134
fyne_ui.go
@ -1,11 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"errors"
|
||||
encrypt "fckeuspy-go/lib"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/app"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
func NewUI() (stprageDir string, window fyne.Window) {
|
||||
@ -22,10 +27,127 @@ func NewUI() (stprageDir string, window fyne.Window) {
|
||||
prefs.SetInt("winH", int(sz.Height))
|
||||
})
|
||||
|
||||
base, err := os.UserConfigDir()
|
||||
if err != nil {
|
||||
base, _ = os.UserHomeDir()
|
||||
}
|
||||
// docasny bypass
|
||||
/*
|
||||
base, err := os.UserConfigDir()
|
||||
if err != nil {
|
||||
base, _ = os.UserHomeDir()
|
||||
}
|
||||
*/
|
||||
base := "./"
|
||||
|
||||
return filepath.Join(base, "fckeuspy-go"), w
|
||||
//return filepath.Join(base, "fckeuspy-go"), w
|
||||
return filepath.Join(base, ""), w
|
||||
}
|
||||
|
||||
// ShowPasswordVaultDialog zobrazí dialog pro vytvoření nebo otevření trezoru.
|
||||
// Zatím pouze skeleton: vrací heslo přes callback, reálné volání CreateEncryptedStore/OpenEncryptedStore mimo.
|
||||
func ShowPasswordVaultDialog(w fyne.Window, onResult func(create bool, password string)) {
|
||||
pwEntry := widget.NewPasswordEntry()
|
||||
pwEntry.SetPlaceHolder("Heslo…")
|
||||
pw2Entry := widget.NewPasswordEntry()
|
||||
pw2Entry.SetPlaceHolder("Znovu heslo…")
|
||||
strengthBar := widget.NewProgressBar()
|
||||
strengthBar.Min = 0
|
||||
strengthBar.Max = 100
|
||||
strengthLabel := widget.NewLabel("")
|
||||
updateStrength := func(pw string) {
|
||||
score, desc := simpleScore(pw)
|
||||
strengthBar.SetValue(float64(score))
|
||||
strengthLabel.SetText(desc)
|
||||
}
|
||||
pwEntry.OnChanged = updateStrength
|
||||
genBtn := widget.NewButton("Generovat", func() {
|
||||
if v, err := encrypt.GenerateRandomPassword(20); err == nil {
|
||||
pwEntry.SetText(v)
|
||||
pw2Entry.SetText(v)
|
||||
updateStrength(v)
|
||||
}
|
||||
})
|
||||
modeCreate := true
|
||||
var toggle *widget.Button
|
||||
toggle = widget.NewButton("Režim: Vytvořit (klikni pro Otevřít)", func() {
|
||||
modeCreate = !modeCreate
|
||||
if modeCreate {
|
||||
toggle.SetText("Režim: Vytvořit (klikni pro Otevřít)")
|
||||
pw2Entry.Enable()
|
||||
} else {
|
||||
toggle.SetText("Režim: Otevřít (klikni pro Vytvořit)")
|
||||
pw2Entry.Disable()
|
||||
}
|
||||
})
|
||||
form := &widget.Form{Items: []*widget.FormItem{
|
||||
{Text: "Heslo", Widget: pwEntry},
|
||||
{Text: "Potvrzení", Widget: pw2Entry},
|
||||
}}
|
||||
meter := container.NewVBox(strengthBar, strengthLabel)
|
||||
topRow := container.NewBorder(nil, nil, nil, genBtn, meter)
|
||||
content := container.NewVBox(toggle, topRow, form)
|
||||
d := dialog.NewCustomConfirm("Trezor", "OK", "Zrušit", content, func(ok bool) {
|
||||
if !ok {
|
||||
onResult(false, "")
|
||||
return
|
||||
}
|
||||
pw := pwEntry.Text
|
||||
if modeCreate {
|
||||
if pw != pw2Entry.Text {
|
||||
dialog.NewError(errors.New("Hesla se neshodují"), w).Show()
|
||||
return
|
||||
}
|
||||
if err := encrypt.ValidatePasswordForUI(pw); err != nil {
|
||||
dialog.NewError(err, w).Show()
|
||||
return
|
||||
}
|
||||
}
|
||||
onResult(modeCreate, pw)
|
||||
}, w)
|
||||
d.Show()
|
||||
}
|
||||
|
||||
// simpleScore: hrubá heuristika (0-100)
|
||||
func simpleScore(pw string) (int, string) {
|
||||
l := len(pw)
|
||||
var u, lw, dg, sp int
|
||||
specials := "!@#-_+="
|
||||
for _, r := range pw {
|
||||
switch {
|
||||
case r >= 'A' && r <= 'Z':
|
||||
u++
|
||||
case r >= 'a' && r <= 'z':
|
||||
lw++
|
||||
case r >= '0' && r <= '9':
|
||||
dg++
|
||||
default:
|
||||
if strings.ContainsRune(specials, r) {
|
||||
sp++
|
||||
}
|
||||
}
|
||||
}
|
||||
cats := 0
|
||||
if u > 0 {
|
||||
cats++
|
||||
}
|
||||
if lw > 0 {
|
||||
cats++
|
||||
}
|
||||
if dg > 0 {
|
||||
cats++
|
||||
}
|
||||
if sp > 0 {
|
||||
cats++
|
||||
}
|
||||
score := l*4 + cats*10
|
||||
if score > 100 {
|
||||
score = 100
|
||||
}
|
||||
desc := "Slabé"
|
||||
switch {
|
||||
case score >= 85:
|
||||
desc = "Silné"
|
||||
case score >= 60:
|
||||
desc = "Dobré"
|
||||
case score >= 30:
|
||||
desc = "Střední"
|
||||
}
|
||||
return score, desc
|
||||
}
|
||||
|
||||
7
go.mod
7
go.mod
@ -37,9 +37,10 @@ require (
|
||||
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect
|
||||
github.com/stretchr/testify v1.10.0 // indirect
|
||||
github.com/yuin/goldmark v1.7.8 // indirect
|
||||
golang.org/x/crypto v0.42.0 // indirect
|
||||
golang.org/x/image v0.24.0 // indirect
|
||||
golang.org/x/net v0.35.0 // indirect
|
||||
golang.org/x/sys v0.30.0 // indirect
|
||||
golang.org/x/text v0.22.0 // indirect
|
||||
golang.org/x/net v0.43.0 // indirect
|
||||
golang.org/x/sys v0.36.0 // indirect
|
||||
golang.org/x/text v0.29.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
8
go.sum
8
go.sum
@ -73,14 +73,22 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
|
||||
github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
||||
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
|
||||
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
|
||||
golang.org/x/image v0.24.0 h1:AN7zRgVsbvmTfNyqIbbOraYL8mSwcKncEj8ofjgzcMQ=
|
||||
golang.org/x/image v0.24.0/go.mod h1:4b/ITuLfqYq1hqZcjofwctIhi7sZh2WaCjvsBNjjya8=
|
||||
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
|
||||
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
|
||||
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
|
||||
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
|
||||
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
|
||||
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
|
||||
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
|
||||
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
|
||||
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
|
||||
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
140
lib/crypto.go
140
lib/crypto.go
@ -28,10 +28,11 @@ type Envelope struct {
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
priv *rsa.PrivateKey
|
||||
pubPEM []byte
|
||||
certPEM []byte
|
||||
dir string
|
||||
Priv *rsa.PrivateKey `json:"priv,omitempty"`
|
||||
PubPEM []byte `json:"pub,omitempty"`
|
||||
CertPEM []byte `json:"cert,omitempty"`
|
||||
dir string `json:"-"`
|
||||
symKey []byte `json:"-"` // interní AES klíč pro lokální šifrování
|
||||
}
|
||||
|
||||
func NewService(storageDir string) (*Service, error) {
|
||||
@ -42,8 +43,8 @@ func NewService(storageDir string) (*Service, error) {
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func (s *Service) PublicPEM() string { return string(s.pubPEM) }
|
||||
func (s *Service) PublicCert() string { return string(s.certPEM) }
|
||||
func (s *Service) PublicPEM() string { return string(s.PubPEM) }
|
||||
func (s *Service) PublicCert() string { return string(s.CertPEM) }
|
||||
|
||||
func (s *Service) Encrypt(message, peerPEMorCert string) (string, error) {
|
||||
pubKey, err := parsePeerPublicKey(peerPEMorCert)
|
||||
@ -104,7 +105,7 @@ func (s *Service) Decrypt(payload string) (string, error) {
|
||||
}
|
||||
|
||||
label := []byte{}
|
||||
aesKey, err := rsa.DecryptOAEP(sha256.New(), rand.Reader, s.priv, ek, label)
|
||||
aesKey, err := rsa.DecryptOAEP(sha256.New(), rand.Reader, s.Priv, ek, label)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("RSA-OAEP decrypt: %w", err)
|
||||
}
|
||||
@ -165,7 +166,9 @@ func (s *Service) loadOrGenerateKeys() error {
|
||||
privPath := filepath.Join(s.dir, "identity_key.pem")
|
||||
pubPath := filepath.Join(s.dir, "public.pem")
|
||||
certPath := filepath.Join(s.dir, "identity.crt")
|
||||
symPath := filepath.Join(s.dir, "sym.key") // base64(klic)
|
||||
|
||||
fmt.Printf("Using storage dir: %s\n", s.dir)
|
||||
if fileExists(privPath) && fileExists(pubPath) && fileExists(certPath) {
|
||||
pkBytes, err := os.ReadFile(privPath)
|
||||
if err != nil {
|
||||
@ -179,9 +182,28 @@ func (s *Service) loadOrGenerateKeys() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s.priv = key
|
||||
s.pubPEM, _ = os.ReadFile(pubPath)
|
||||
s.certPEM, _ = os.ReadFile(certPath)
|
||||
s.Priv = key
|
||||
s.PubPEM, _ = os.ReadFile(pubPath)
|
||||
s.CertPEM, _ = os.ReadFile(certPath)
|
||||
// Načti symetrický klíč (pokud existuje); pokud ne, vytvoř.
|
||||
if fileExists(symPath) {
|
||||
b, err := os.ReadFile(symPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
decoded, err := base64.StdEncoding.DecodeString(string(b))
|
||||
if err != nil {
|
||||
return fmt.Errorf("sym.key base64 decode: %w", err)
|
||||
}
|
||||
if l := len(decoded); l != 16 && l != 24 && l != 32 {
|
||||
return fmt.Errorf("unsupported sym key length: %d", l)
|
||||
}
|
||||
s.symKey = decoded
|
||||
} else {
|
||||
if err := s.generateAndPersistSymKey(symPath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -189,32 +211,114 @@ func (s *Service) loadOrGenerateKeys() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s.priv = key
|
||||
s.Priv = key
|
||||
|
||||
pubASN1, _ := x509.MarshalPKIXPublicKey(&s.priv.PublicKey)
|
||||
s.pubPEM = pem.EncodeToMemory(&pem.Block{Type: "PUBLIC KEY", Bytes: pubASN1})
|
||||
pubASN1, _ := x509.MarshalPKIXPublicKey(&s.Priv.PublicKey)
|
||||
s.PubPEM = pem.EncodeToMemory(&pem.Block{Type: "PUBLIC KEY", Bytes: pubASN1})
|
||||
|
||||
cert, err := generateSelfSignedCert(s.priv)
|
||||
cert, err := generateSelfSignedCert(s.Priv)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s.certPEM = cert
|
||||
s.CertPEM = cert
|
||||
|
||||
if err := os.MkdirAll(s.dir, 0o700); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.WriteFile(privPath, pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(s.priv)}), fs.FileMode(0o600)); err != nil {
|
||||
if err := os.WriteFile(privPath, pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(s.Priv)}), fs.FileMode(0o600)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.WriteFile(pubPath, s.pubPEM, 0o644); err != nil {
|
||||
if err := os.WriteFile(pubPath, s.PubPEM, 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.WriteFile(certPath, s.certPEM, 0o644); err != nil {
|
||||
if err := os.WriteFile(certPath, s.CertPEM, 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
// Vytvoř symetrický klíč
|
||||
if err := s.generateAndPersistSymKey(symPath); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// generateAndPersistSymKey vytvoří nový AES-256 klíč a uloží jej (pokud existuje dir).
|
||||
func (s *Service) generateAndPersistSymKey(path string) error {
|
||||
k := make([]byte, 32)
|
||||
if _, err := rand.Read(k); err != nil {
|
||||
return err
|
||||
}
|
||||
s.symKey = k
|
||||
if s.dir == "" { // ephemeral (např. web mód bez persistence)
|
||||
return nil
|
||||
}
|
||||
enc := base64.StdEncoding.EncodeToString(k)
|
||||
return os.WriteFile(path, []byte(enc), 0o600)
|
||||
}
|
||||
|
||||
// SymEnvelope je malý formát pro interní symetrické šifrování.
|
||||
type SymEnvelope struct {
|
||||
N string `json:"n"` // base64(nonce)
|
||||
CT string `json:"ct"` // base64(ciphertext||tag)
|
||||
}
|
||||
|
||||
// SymmetricEncrypt šifruje plaintext pomocí interního AES-GCM klíče.
|
||||
func (s *Service) SymmetricEncrypt(plain string) (string, error) {
|
||||
if len(s.symKey) == 0 {
|
||||
return "", errors.New("sym key not initialized")
|
||||
}
|
||||
block, err := aes.NewCipher(s.symKey)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
gcm, err := cipher.NewGCM(block)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
nonce := make([]byte, gcm.NonceSize())
|
||||
if _, err := rand.Read(nonce); err != nil {
|
||||
return "", err
|
||||
}
|
||||
ct := gcm.Seal(nil, nonce, []byte(plain), nil)
|
||||
env := SymEnvelope{
|
||||
N: base64.StdEncoding.EncodeToString(nonce),
|
||||
CT: base64.StdEncoding.EncodeToString(ct),
|
||||
}
|
||||
out, _ := json.Marshal(env)
|
||||
return string(out), nil
|
||||
}
|
||||
|
||||
// SymmetricDecrypt dešifruje JSON envelope vytvořený SymmetricEncrypt.
|
||||
func (s *Service) SymmetricDecrypt(payload string) (string, error) {
|
||||
if len(s.symKey) == 0 {
|
||||
return "", errors.New("sym key not initialized")
|
||||
}
|
||||
var env SymEnvelope
|
||||
if err := json.Unmarshal([]byte(payload), &env); err != nil {
|
||||
return "", fmt.Errorf("invalid sym envelope json: %w", err)
|
||||
}
|
||||
nonce, err := base64.StdEncoding.DecodeString(env.N)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("nonce b64: %w", err)
|
||||
}
|
||||
ct, err := base64.StdEncoding.DecodeString(env.CT)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("ct b64: %w", err)
|
||||
}
|
||||
block, err := aes.NewCipher(s.symKey)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
gcm, err := cipher.NewGCM(block)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
pt, err := gcm.Open(nil, nonce, ct, nil)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("gcm open: %w", err)
|
||||
}
|
||||
return string(pt), nil
|
||||
}
|
||||
|
||||
func generateSelfSignedCert(priv *rsa.PrivateKey) ([]byte, error) {
|
||||
tpl := &x509.Certificate{
|
||||
SerialNumber: big.NewInt(time.Now().UnixNano()),
|
||||
|
||||
483
lib/crypto_storage.go
Normal file
483
lib/crypto_storage.go
Normal file
@ -0,0 +1,483 @@
|
||||
package encrypt
|
||||
|
||||
// Nový návrh: Password-based šifrované úložiště s derivací klíče (scrypt) +
|
||||
// vytvoření uživatelských RSA klíčů při prvotní inicializaci. Private/Public
|
||||
// (a volitelně self-signed cert) se uloží jako položky uvnitř zašifrovaného
|
||||
// JSON. Soubor není možno otevřít bez hesla.
|
||||
//
|
||||
// Formát na disku (JSON):
|
||||
// {
|
||||
// "v":1,
|
||||
// "kdf":"scrypt",
|
||||
// "N":32768, "r":8, "p":1,
|
||||
// "salt":"base64(...)",
|
||||
// "n":"base64(nonce)",
|
||||
// "c":"base64(ciphertext)"
|
||||
// }
|
||||
// Plaintext (po dešifrování):
|
||||
// {
|
||||
// "updated":"RFC3339",
|
||||
// "data":{ key: <json>, ... }
|
||||
// }
|
||||
// Povinné interní klíče:
|
||||
// _identity_private_pem
|
||||
// _identity_public_pem
|
||||
// _identity_cert_pem (volitelně)
|
||||
//
|
||||
// API: CreateEncryptedStore (nový), OpenEncryptedStore, ChangePassword.
|
||||
// Původní NewSecureJSONStore (s KeyProvider) je odstraněn – přechod na heslo.
|
||||
|
||||
import (
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/scrypt"
|
||||
)
|
||||
|
||||
// SecureJSONStore definuje metody úložiště.
|
||||
type SecureJSONStore interface {
|
||||
Put(key string, value any) error
|
||||
Get(key string, dst any) error
|
||||
Delete(key string) error
|
||||
ListKeys() []string
|
||||
Flush() error
|
||||
Close() error
|
||||
ChangePassword(newPassword string) error
|
||||
Has(key string) bool
|
||||
// Identity getters (pem). Vrací prázdný string, pokud neexistují.
|
||||
IdentityPrivatePEM() string
|
||||
IdentityPublicPEM() string
|
||||
IdentityCertPEM() string
|
||||
}
|
||||
|
||||
type internalPlain struct {
|
||||
Updated time.Time `json:"updated"`
|
||||
Data map[string]json.RawMessage `json:"data"`
|
||||
}
|
||||
|
||||
type fileEnvelope struct {
|
||||
Version int `json:"v"`
|
||||
KDF string `json:"kdf"`
|
||||
N int `json:"N"`
|
||||
R int `json:"r"`
|
||||
P int `json:"p"`
|
||||
Salt string `json:"salt"`
|
||||
Nonce string `json:"n"`
|
||||
Cipher string `json:"c"`
|
||||
}
|
||||
|
||||
type secureJSONStore struct {
|
||||
mu sync.RWMutex
|
||||
path string
|
||||
kdfN int
|
||||
kdfR int
|
||||
kdfP int
|
||||
salt []byte
|
||||
key []byte // odvozený AES-256 klíč
|
||||
dirty bool
|
||||
plain internalPlain
|
||||
hasIdent bool
|
||||
}
|
||||
|
||||
const (
|
||||
defaultKDFN = 32768
|
||||
defaultKDFR = 8
|
||||
defaultKDFP = 1
|
||||
)
|
||||
|
||||
// CreateEncryptedStore vytvoří nový soubor; error pokud již existuje.
|
||||
func CreateEncryptedStore(path, password string, generateIdentity bool) (SecureJSONStore, error) {
|
||||
if err := validatePasswordStrength(password); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if _, err := os.Stat(path); err == nil {
|
||||
return nil, fmt.Errorf("store already exists: %s", path)
|
||||
} else if !errors.Is(err, os.ErrNotExist) {
|
||||
return nil, err
|
||||
}
|
||||
s := &secureJSONStore{
|
||||
path: filepath.Clean(path),
|
||||
kdfN: defaultKDFN,
|
||||
kdfR: defaultKDFR,
|
||||
kdfP: defaultKDFP,
|
||||
plain: internalPlain{Updated: time.Now().UTC(), Data: make(map[string]json.RawMessage)},
|
||||
}
|
||||
if err := s.initNew(password, generateIdentity); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := s.Flush(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// OpenEncryptedStore načte existující soubor a ověří heslo.
|
||||
func OpenEncryptedStore(path, password string) (SecureJSONStore, error) {
|
||||
if password == "" {
|
||||
return nil, errors.New("empty password")
|
||||
}
|
||||
if _, err := os.Stat(path); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s := &secureJSONStore{path: filepath.Clean(path)}
|
||||
if err := s.load(password); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// initNew vytvoří salt, odvodí klíč a vytvoří identitu pokud je třeba.
|
||||
func (s *secureJSONStore) initNew(password string, generateIdentity bool) error {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
salt := make([]byte, 16)
|
||||
if _, err := rand.Read(salt); err != nil {
|
||||
return err
|
||||
}
|
||||
key, err := deriveKey(password, salt, s.kdfN, s.kdfR, s.kdfP)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s.salt = salt
|
||||
s.key = key
|
||||
if generateIdentity {
|
||||
if err := s.generateIdentityLocked(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *secureJSONStore) generateIdentityLocked() error {
|
||||
// RSA 2048
|
||||
pk, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
privPEM := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(pk)})
|
||||
pubASN1, _ := x509.MarshalPKIXPublicKey(&pk.PublicKey)
|
||||
pubPEM := pem.EncodeToMemory(&pem.Block{Type: "PUBLIC KEY", Bytes: pubASN1})
|
||||
// Optional self-signed cert (krátký CN)
|
||||
certPEM, _ := generateSelfSignedCert(pk)
|
||||
_ = s.putLocked("_identity_private_pem", string(privPEM))
|
||||
_ = s.putLocked("_identity_public_pem", string(pubPEM))
|
||||
_ = s.putLocked("_identity_cert_pem", string(certPEM))
|
||||
s.hasIdent = true
|
||||
return nil
|
||||
}
|
||||
|
||||
// deriveKey scrypt.
|
||||
func deriveKey(password string, salt []byte, N, r, p int) ([]byte, error) {
|
||||
return scrypt.Key([]byte(password), salt, N, r, p, 32)
|
||||
}
|
||||
|
||||
// load načte soubor, přečte parametry, odvodí klíč a dešifruje.
|
||||
func (s *secureJSONStore) load(password string) error {
|
||||
b, err := os.ReadFile(s.path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var env fileEnvelope
|
||||
if err := json.Unmarshal(b, &env); err != nil {
|
||||
return fmt.Errorf("invalid envelope: %w", err)
|
||||
}
|
||||
if env.Version != 1 || env.KDF != "scrypt" {
|
||||
return errors.New("unsupported version/kdf")
|
||||
}
|
||||
salt, err := base64.StdEncoding.DecodeString(env.Salt)
|
||||
if err != nil {
|
||||
return fmt.Errorf("salt b64: %w", err)
|
||||
}
|
||||
key, err := deriveKey(password, salt, env.N, env.R, env.P)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
nonce, err := base64.StdEncoding.DecodeString(env.Nonce)
|
||||
if err != nil {
|
||||
return fmt.Errorf("nonce b64: %w", err)
|
||||
}
|
||||
cBytes, err := base64.StdEncoding.DecodeString(env.Cipher)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cipher b64: %w", err)
|
||||
}
|
||||
block, err := aes.NewCipher(key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gcm, err := cipher.NewGCM(block)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
plainBytes, err := gcm.Open(nil, nonce, cBytes, nil)
|
||||
if err != nil {
|
||||
return errors.New("invalid password or corrupted store")
|
||||
}
|
||||
var pl internalPlain
|
||||
if err := json.Unmarshal(plainBytes, &pl); err != nil {
|
||||
return fmt.Errorf("plaintext json: %w", err)
|
||||
}
|
||||
if pl.Data == nil {
|
||||
pl.Data = make(map[string]json.RawMessage)
|
||||
}
|
||||
s.mu.Lock()
|
||||
s.kdfN, s.kdfR, s.kdfP = env.N, env.R, env.P
|
||||
s.salt = salt
|
||||
s.key = key
|
||||
s.plain = pl
|
||||
s.dirty = false
|
||||
s.hasIdent = s.hasIdentityLocked()
|
||||
s.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *secureJSONStore) hasIdentityLocked() bool {
|
||||
_, ok1 := s.plain.Data["_identity_private_pem"]
|
||||
_, ok2 := s.plain.Data["_identity_public_pem"]
|
||||
return ok1 && ok2
|
||||
}
|
||||
|
||||
// Put
|
||||
func (s *secureJSONStore) Put(key string, value any) error {
|
||||
if strings.HasPrefix(key, "_identity_") {
|
||||
return errors.New("reserved identity key prefix")
|
||||
}
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
return s.putLocked(key, value)
|
||||
}
|
||||
|
||||
func (s *secureJSONStore) putLocked(key string, value any) error {
|
||||
if key == "" {
|
||||
return errors.New("empty key")
|
||||
}
|
||||
b, err := json.Marshal(value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if s.plain.Data == nil {
|
||||
s.plain.Data = make(map[string]json.RawMessage)
|
||||
}
|
||||
s.plain.Data[key] = json.RawMessage(b)
|
||||
s.plain.Updated = time.Now().UTC()
|
||||
s.dirty = true
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get
|
||||
func (s *secureJSONStore) Get(key string, dst any) error {
|
||||
s.mu.RLock()
|
||||
raw, ok := s.plain.Data[key]
|
||||
s.mu.RUnlock()
|
||||
if !ok {
|
||||
return fmt.Errorf("key not found: %s", key)
|
||||
}
|
||||
return json.Unmarshal(raw, dst)
|
||||
}
|
||||
|
||||
// Delete
|
||||
func (s *secureJSONStore) Delete(key string) error {
|
||||
if strings.HasPrefix(key, "_identity_") {
|
||||
return errors.New("cannot delete identity key")
|
||||
}
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
if _, ok := s.plain.Data[key]; !ok {
|
||||
return fmt.Errorf("key not found: %s", key)
|
||||
}
|
||||
delete(s.plain.Data, key)
|
||||
s.plain.Updated = time.Now().UTC()
|
||||
s.dirty = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *secureJSONStore) Has(key string) bool {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
_, ok := s.plain.Data[key]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ListKeys (bez identity interních klíčů)
|
||||
func (s *secureJSONStore) ListKeys() []string {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
out := make([]string, 0, len(s.plain.Data))
|
||||
for k := range s.plain.Data {
|
||||
if !strings.HasPrefix(k, "_identity_") {
|
||||
out = append(out, k)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// Flush uloží na disk.
|
||||
func (s *secureJSONStore) Flush() error {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
if !s.dirty {
|
||||
return nil
|
||||
}
|
||||
if len(s.key) == 0 {
|
||||
return errors.New("store not initialized")
|
||||
}
|
||||
plainBytes, err := json.Marshal(s.plain)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
block, err := aes.NewCipher(s.key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gcm, err := cipher.NewGCM(block)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
nonce := make([]byte, gcm.NonceSize())
|
||||
if _, err := io.ReadFull(rand.Reader, nonce); err != nil {
|
||||
return err
|
||||
}
|
||||
cipherBytes := gcm.Seal(nil, nonce, plainBytes, nil)
|
||||
env := fileEnvelope{
|
||||
Version: 1,
|
||||
KDF: "scrypt",
|
||||
N: s.kdfN,
|
||||
R: s.kdfR,
|
||||
P: s.kdfP,
|
||||
Salt: base64.StdEncoding.EncodeToString(s.salt),
|
||||
Nonce: base64.StdEncoding.EncodeToString(nonce),
|
||||
Cipher: base64.StdEncoding.EncodeToString(cipherBytes),
|
||||
}
|
||||
out, err := json.MarshalIndent(env, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tmp := s.path + ".tmp"
|
||||
if err := os.WriteFile(tmp, out, 0o600); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.Rename(tmp, s.path); err != nil {
|
||||
return err
|
||||
}
|
||||
s.dirty = false
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *secureJSONStore) Close() error { return s.Flush() }
|
||||
|
||||
// ChangePassword re-derivuje klíč a re-encryptne celý soubor atomicky.
|
||||
func (s *secureJSONStore) ChangePassword(newPassword string) error {
|
||||
if err := validatePasswordStrength(newPassword); err != nil {
|
||||
return err
|
||||
}
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
newSalt := make([]byte, 16)
|
||||
if _, err := rand.Read(newSalt); err != nil {
|
||||
return err
|
||||
}
|
||||
newKey, err := deriveKey(newPassword, newSalt, s.kdfN, s.kdfR, s.kdfP)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Dočasně si zapamatuj starý klíč pro rollback, i když tady rollback neimplementujeme – chyba se projeví před přepsáním.
|
||||
oldKey, oldSalt := s.key, s.salt
|
||||
s.key, s.salt = newKey, newSalt
|
||||
s.dirty = true
|
||||
if err := s.Flush(); err != nil {
|
||||
// rollback (best effort)
|
||||
s.key, s.salt = oldKey, oldSalt
|
||||
s.dirty = true
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Identity helpers
|
||||
func (s *secureJSONStore) IdentityPrivatePEM() string { return s.getString("_identity_private_pem") }
|
||||
func (s *secureJSONStore) IdentityPublicPEM() string { return s.getString("_identity_public_pem") }
|
||||
func (s *secureJSONStore) IdentityCertPEM() string { return s.getString("_identity_cert_pem") }
|
||||
|
||||
func (s *secureJSONStore) getString(key string) string {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
if raw, ok := s.plain.Data[key]; ok {
|
||||
var v string
|
||||
if err := json.Unmarshal(raw, &v); err == nil {
|
||||
return v
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// GenerateRandomPassword vytvoří kryptograficky silné heslo ze sady znaků.
|
||||
func GenerateRandomPassword(length int) (string, error) {
|
||||
if length <= 0 {
|
||||
return "", errors.New("invalid length")
|
||||
}
|
||||
const alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#-_+="
|
||||
buf := make([]byte, length)
|
||||
if _, err := rand.Read(buf); err != nil {
|
||||
return "", err
|
||||
}
|
||||
for i, b := range buf {
|
||||
buf[i] = alphabet[int(b)%len(alphabet)]
|
||||
}
|
||||
return string(buf), nil
|
||||
}
|
||||
|
||||
// validatePasswordStrength provede základní kontrolu síly hesla.
|
||||
// Požadavky: min délka 10, alespoň 3 z kategorií (upper, lower, digit, special !@#-_+=)
|
||||
func validatePasswordStrength(pw string) error {
|
||||
if len(pw) < 10 {
|
||||
return errors.New("password too short (min 10)")
|
||||
}
|
||||
var hasU, hasL, hasD, hasS bool
|
||||
for _, r := range pw {
|
||||
switch {
|
||||
case r >= 'A' && r <= 'Z':
|
||||
hasU = true
|
||||
case r >= 'a' && r <= 'z':
|
||||
hasL = true
|
||||
case r >= '0' && r <= '9':
|
||||
hasD = true
|
||||
default:
|
||||
if strings.ContainsRune("!@#-_+=", r) {
|
||||
hasS = true
|
||||
}
|
||||
}
|
||||
}
|
||||
cats := 0
|
||||
if hasU {
|
||||
cats++
|
||||
}
|
||||
if hasL {
|
||||
cats++
|
||||
}
|
||||
if hasD {
|
||||
cats++
|
||||
}
|
||||
if hasS {
|
||||
cats++
|
||||
}
|
||||
if cats < 3 {
|
||||
return errors.New("password too weak (need 3 types: upper, lower, digit, special)")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ValidatePasswordForUI exportuje validaci pro použití ve Fyne UI.
|
||||
func ValidatePasswordForUI(pw string) error { return validatePasswordStrength(pw) }
|
||||
55
main.go
55
main.go
@ -7,7 +7,12 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -35,25 +40,43 @@ func main() {
|
||||
|
||||
func runFyne() {
|
||||
storageDir, w := NewUI()
|
||||
svc, err := encrypt.NewService(storageDir)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
parts := buildEntries()
|
||||
/*
|
||||
onDecrypt := func(pl string) {
|
||||
go func(js string) {
|
||||
res, err := svc.Decrypt(js)
|
||||
vaultPath := filepath.Join(storageDir, "vault.enc")
|
||||
placeholder := widget.NewLabel("Inicializace trezoru…")
|
||||
w.SetContent(placeholder)
|
||||
|
||||
showDialog := func() {
|
||||
ShowPasswordVaultDialog(w, func(create bool, password string) {
|
||||
if password == "" {
|
||||
return
|
||||
}
|
||||
var store encrypt.SecureJSONStore
|
||||
var err error
|
||||
if create {
|
||||
store, err = encrypt.CreateEncryptedStore(vaultPath, password, true)
|
||||
} else {
|
||||
store, err = encrypt.OpenEncryptedStore(vaultPath, password)
|
||||
if err != nil {
|
||||
fyne.Do(func() { parts.plainOut.SetText(""); parts.showToast("Chyba") })
|
||||
dialog.NewError(err, w).Show()
|
||||
return
|
||||
}
|
||||
fyne.Do(func() { parts.plainOut.SetText(res); parts.showToast("Dešifrováno") })
|
||||
}(pl)
|
||||
}
|
||||
*/
|
||||
root := buildTabbedUI(parts, svc)
|
||||
w.SetContent(root)
|
||||
}
|
||||
if err != nil {
|
||||
dialog.NewError(err, w).Show()
|
||||
return
|
||||
}
|
||||
vs, err := NewVaultService(store)
|
||||
if err != nil {
|
||||
dialog.NewError(err, w).Show()
|
||||
return
|
||||
}
|
||||
parts := buildEntries()
|
||||
fyne.CurrentApp().Driver().AllWindows()[0].SetTitle("Encryptor (Vault)")
|
||||
w.SetContent(buildTabbedUI(parts, vs))
|
||||
})
|
||||
}
|
||||
|
||||
// Pokud soubor neexistuje, dialog v režimu vytvořit (default). Pokud existuje, uživatel může přepnout.
|
||||
showDialog()
|
||||
w.ShowAndRun()
|
||||
}
|
||||
|
||||
|
||||
145
vault_service.go
Normal file
145
vault_service.go
Normal file
@ -0,0 +1,145 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/sha256"
|
||||
"crypto/x509"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
encrypt "fckeuspy-go/lib"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// VaultService implementuje ServiceFacade nad SecureJSONStore.
|
||||
// Využívá existující hybridní šifrování z encrypt.Service (re-use kódu voláním helperů?)
|
||||
// Pro jednoduchost zopakujeme potřebnou část: Encrypt/Decrypt využijí dočasný encrypt.Service
|
||||
// inicializovaný z načtených klíčů.
|
||||
type VaultService struct {
|
||||
store encrypt.SecureJSONStore
|
||||
priv *rsa.PrivateKey
|
||||
pubPEM string
|
||||
certPEM string
|
||||
}
|
||||
|
||||
func NewVaultService(store encrypt.SecureJSONStore) (*VaultService, error) {
|
||||
vs := &VaultService{store: store}
|
||||
if err := vs.loadIdentity(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return vs, nil
|
||||
}
|
||||
|
||||
func (v *VaultService) loadIdentity() error {
|
||||
privPem := v.store.IdentityPrivatePEM()
|
||||
if privPem == "" {
|
||||
return errors.New("missing private key in store")
|
||||
}
|
||||
block, _ := pem.Decode([]byte(privPem))
|
||||
if block == nil || block.Type != "RSA PRIVATE KEY" {
|
||||
return errors.New("invalid private key PEM")
|
||||
}
|
||||
key, err := x509.ParsePKCS1PrivateKey(block.Bytes)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
v.priv = key
|
||||
v.pubPEM = v.store.IdentityPublicPEM()
|
||||
v.certPEM = v.store.IdentityCertPEM()
|
||||
if v.pubPEM == "" { // derive public if missing
|
||||
pubASN1, _ := x509.MarshalPKIXPublicKey(&key.PublicKey)
|
||||
v.pubPEM = string(pem.EncodeToMemory(&pem.Block{Type: "PUBLIC KEY", Bytes: pubASN1}))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *VaultService) PublicPEM() string { return v.pubPEM }
|
||||
func (v *VaultService) PublicCert() string { return v.certPEM }
|
||||
|
||||
// Encrypt provede hybridní šifrování stejně jako původní Service.Encrypt.
|
||||
func (v *VaultService) Encrypt(message, peerPEMorCert string) (string, error) {
|
||||
// Vytvoříme ad-hoc Service s privátním klíčem jen pro volání existující logiky? Nejjednodušší je zkopírovat potřebnou část kódu.
|
||||
return encryptHybrid(v.priv, message, peerPEMorCert)
|
||||
}
|
||||
|
||||
// Decrypt provede rozšifrování.
|
||||
func (v *VaultService) Decrypt(payload string) (string, error) { return decryptHybrid(v.priv, payload) }
|
||||
|
||||
// --- Lokální helpery (duplikace z encrypt.Service, zredukované) ---
|
||||
|
||||
type hybridEnvelope struct {
|
||||
EK string `json:"ek"`
|
||||
N string `json:"n"`
|
||||
CT string `json:"ct"`
|
||||
}
|
||||
|
||||
func encryptHybrid(priv *rsa.PrivateKey, message, peerPEMorCert string) (string, error) {
|
||||
pubKey, err := encrypt.ParsePeerPublicKey(peerPEMorCert)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
aesKey := make([]byte, 32)
|
||||
if _, err := rand.Read(aesKey); err != nil {
|
||||
return "", err
|
||||
}
|
||||
block, err := aes.NewCipher(aesKey)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
gcm, err := cipher.NewGCM(block)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
nonce := make([]byte, gcm.NonceSize())
|
||||
if _, err := rand.Read(nonce); err != nil {
|
||||
return "", err
|
||||
}
|
||||
ct := gcm.Seal(nil, nonce, []byte(message), nil)
|
||||
ek, err := rsa.EncryptOAEP(sha256.New(), rand.Reader, pubKey, aesKey, []byte{})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
env := hybridEnvelope{EK: base64.StdEncoding.EncodeToString(ek), N: base64.StdEncoding.EncodeToString(nonce), CT: base64.StdEncoding.EncodeToString(ct)}
|
||||
out, _ := json.MarshalIndent(env, "", " ")
|
||||
return string(out), nil
|
||||
}
|
||||
|
||||
func decryptHybrid(priv *rsa.PrivateKey, payload string) (string, error) {
|
||||
var env hybridEnvelope
|
||||
if err := json.Unmarshal([]byte(payload), &env); err != nil {
|
||||
return "", fmt.Errorf("invalid JSON: %w", err)
|
||||
}
|
||||
ek, err := base64.StdEncoding.DecodeString(env.EK)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("ek b64: %w", err)
|
||||
}
|
||||
nonce, err := base64.StdEncoding.DecodeString(env.N)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("n b64: %w", err)
|
||||
}
|
||||
ct, err := base64.StdEncoding.DecodeString(env.CT)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("ct b64: %w", err)
|
||||
}
|
||||
aesKey, err := rsa.DecryptOAEP(sha256.New(), rand.Reader, priv, ek, []byte{})
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("RSA-OAEP decrypt: %w", err)
|
||||
}
|
||||
block, err := aes.NewCipher(aesKey)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
gcm, err := cipher.NewGCM(block)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
pt, err := gcm.Open(nil, nonce, ct, nil)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("GCM open: %w", err)
|
||||
}
|
||||
return string(pt), nil
|
||||
}
|
||||
27
vendor/golang.org/x/crypto/LICENSE
generated
vendored
Normal file
27
vendor/golang.org/x/crypto/LICENSE
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright 2009 The Go Authors.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google LLC nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
22
vendor/golang.org/x/crypto/PATENTS
generated
vendored
Normal file
22
vendor/golang.org/x/crypto/PATENTS
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the Go project.
|
||||
|
||||
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer and otherwise run, modify and propagate the contents of this
|
||||
implementation of Go, where such license applies only to those patent
|
||||
claims, both currently owned or controlled by Google and acquired in
|
||||
the future, licensable by Google that are necessarily infringed by this
|
||||
implementation of Go. This grant does not include claims that would be
|
||||
infringed only as a consequence of further modification of this
|
||||
implementation. If you or your agent or exclusive licensee institute or
|
||||
order or agree to the institution of patent litigation against any
|
||||
entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
||||
that this implementation of Go or any code incorporated within this
|
||||
implementation of Go constitutes direct or contributory patent
|
||||
infringement, or inducement of patent infringement, then any patent
|
||||
rights granted to you under this License for this implementation of Go
|
||||
shall terminate as of the date such litigation is filed.
|
||||
77
vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
generated
vendored
Normal file
77
vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
// Copyright 2012 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 pbkdf2 implements the key derivation function PBKDF2 as defined in RFC
|
||||
2898 / PKCS #5 v2.0.
|
||||
|
||||
A key derivation function is useful when encrypting data based on a password
|
||||
or any other not-fully-random data. It uses a pseudorandom function to derive
|
||||
a secure encryption key based on the password.
|
||||
|
||||
While v2.0 of the standard defines only one pseudorandom function to use,
|
||||
HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved
|
||||
Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
|
||||
choose, you can pass the `New` functions from the different SHA packages to
|
||||
pbkdf2.Key.
|
||||
*/
|
||||
package pbkdf2
|
||||
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"hash"
|
||||
)
|
||||
|
||||
// Key derives a key from the password, salt and iteration count, returning a
|
||||
// []byte of length keylen that can be used as cryptographic key. The key is
|
||||
// derived based on the method described as PBKDF2 with the HMAC variant using
|
||||
// the supplied hash function.
|
||||
//
|
||||
// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you
|
||||
// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by
|
||||
// doing:
|
||||
//
|
||||
// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New)
|
||||
//
|
||||
// Remember to get a good random salt. At least 8 bytes is recommended by the
|
||||
// RFC.
|
||||
//
|
||||
// Using a higher iteration count will increase the cost of an exhaustive
|
||||
// search but will also make derivation proportionally slower.
|
||||
func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte {
|
||||
prf := hmac.New(h, password)
|
||||
hashLen := prf.Size()
|
||||
numBlocks := (keyLen + hashLen - 1) / hashLen
|
||||
|
||||
var buf [4]byte
|
||||
dk := make([]byte, 0, numBlocks*hashLen)
|
||||
U := make([]byte, hashLen)
|
||||
for block := 1; block <= numBlocks; block++ {
|
||||
// N.B.: || means concatenation, ^ means XOR
|
||||
// for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter
|
||||
// U_1 = PRF(password, salt || uint(i))
|
||||
prf.Reset()
|
||||
prf.Write(salt)
|
||||
buf[0] = byte(block >> 24)
|
||||
buf[1] = byte(block >> 16)
|
||||
buf[2] = byte(block >> 8)
|
||||
buf[3] = byte(block)
|
||||
prf.Write(buf[:4])
|
||||
dk = prf.Sum(dk)
|
||||
T := dk[len(dk)-hashLen:]
|
||||
copy(U, T)
|
||||
|
||||
// U_n = PRF(password, U_(n-1))
|
||||
for n := 2; n <= iter; n++ {
|
||||
prf.Reset()
|
||||
prf.Write(U)
|
||||
U = U[:0]
|
||||
U = prf.Sum(U)
|
||||
for x := range U {
|
||||
T[x] ^= U[x]
|
||||
}
|
||||
}
|
||||
}
|
||||
return dk[:keyLen]
|
||||
}
|
||||
212
vendor/golang.org/x/crypto/scrypt/scrypt.go
generated
vendored
Normal file
212
vendor/golang.org/x/crypto/scrypt/scrypt.go
generated
vendored
Normal file
@ -0,0 +1,212 @@
|
||||
// Copyright 2012 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 scrypt implements the scrypt key derivation function as defined in
|
||||
// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
|
||||
// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
|
||||
package scrypt
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"math/bits"
|
||||
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
)
|
||||
|
||||
const maxInt = int(^uint(0) >> 1)
|
||||
|
||||
// blockCopy copies n numbers from src into dst.
|
||||
func blockCopy(dst, src []uint32, n int) {
|
||||
copy(dst, src[:n])
|
||||
}
|
||||
|
||||
// blockXOR XORs numbers from dst with n numbers from src.
|
||||
func blockXOR(dst, src []uint32, n int) {
|
||||
for i, v := range src[:n] {
|
||||
dst[i] ^= v
|
||||
}
|
||||
}
|
||||
|
||||
// salsaXOR applies Salsa20/8 to the XOR of 16 numbers from tmp and in,
|
||||
// and puts the result into both tmp and out.
|
||||
func salsaXOR(tmp *[16]uint32, in, out []uint32) {
|
||||
w0 := tmp[0] ^ in[0]
|
||||
w1 := tmp[1] ^ in[1]
|
||||
w2 := tmp[2] ^ in[2]
|
||||
w3 := tmp[3] ^ in[3]
|
||||
w4 := tmp[4] ^ in[4]
|
||||
w5 := tmp[5] ^ in[5]
|
||||
w6 := tmp[6] ^ in[6]
|
||||
w7 := tmp[7] ^ in[7]
|
||||
w8 := tmp[8] ^ in[8]
|
||||
w9 := tmp[9] ^ in[9]
|
||||
w10 := tmp[10] ^ in[10]
|
||||
w11 := tmp[11] ^ in[11]
|
||||
w12 := tmp[12] ^ in[12]
|
||||
w13 := tmp[13] ^ in[13]
|
||||
w14 := tmp[14] ^ in[14]
|
||||
w15 := tmp[15] ^ in[15]
|
||||
|
||||
x0, x1, x2, x3, x4, x5, x6, x7, x8 := w0, w1, w2, w3, w4, w5, w6, w7, w8
|
||||
x9, x10, x11, x12, x13, x14, x15 := w9, w10, w11, w12, w13, w14, w15
|
||||
|
||||
for i := 0; i < 8; i += 2 {
|
||||
x4 ^= bits.RotateLeft32(x0+x12, 7)
|
||||
x8 ^= bits.RotateLeft32(x4+x0, 9)
|
||||
x12 ^= bits.RotateLeft32(x8+x4, 13)
|
||||
x0 ^= bits.RotateLeft32(x12+x8, 18)
|
||||
|
||||
x9 ^= bits.RotateLeft32(x5+x1, 7)
|
||||
x13 ^= bits.RotateLeft32(x9+x5, 9)
|
||||
x1 ^= bits.RotateLeft32(x13+x9, 13)
|
||||
x5 ^= bits.RotateLeft32(x1+x13, 18)
|
||||
|
||||
x14 ^= bits.RotateLeft32(x10+x6, 7)
|
||||
x2 ^= bits.RotateLeft32(x14+x10, 9)
|
||||
x6 ^= bits.RotateLeft32(x2+x14, 13)
|
||||
x10 ^= bits.RotateLeft32(x6+x2, 18)
|
||||
|
||||
x3 ^= bits.RotateLeft32(x15+x11, 7)
|
||||
x7 ^= bits.RotateLeft32(x3+x15, 9)
|
||||
x11 ^= bits.RotateLeft32(x7+x3, 13)
|
||||
x15 ^= bits.RotateLeft32(x11+x7, 18)
|
||||
|
||||
x1 ^= bits.RotateLeft32(x0+x3, 7)
|
||||
x2 ^= bits.RotateLeft32(x1+x0, 9)
|
||||
x3 ^= bits.RotateLeft32(x2+x1, 13)
|
||||
x0 ^= bits.RotateLeft32(x3+x2, 18)
|
||||
|
||||
x6 ^= bits.RotateLeft32(x5+x4, 7)
|
||||
x7 ^= bits.RotateLeft32(x6+x5, 9)
|
||||
x4 ^= bits.RotateLeft32(x7+x6, 13)
|
||||
x5 ^= bits.RotateLeft32(x4+x7, 18)
|
||||
|
||||
x11 ^= bits.RotateLeft32(x10+x9, 7)
|
||||
x8 ^= bits.RotateLeft32(x11+x10, 9)
|
||||
x9 ^= bits.RotateLeft32(x8+x11, 13)
|
||||
x10 ^= bits.RotateLeft32(x9+x8, 18)
|
||||
|
||||
x12 ^= bits.RotateLeft32(x15+x14, 7)
|
||||
x13 ^= bits.RotateLeft32(x12+x15, 9)
|
||||
x14 ^= bits.RotateLeft32(x13+x12, 13)
|
||||
x15 ^= bits.RotateLeft32(x14+x13, 18)
|
||||
}
|
||||
x0 += w0
|
||||
x1 += w1
|
||||
x2 += w2
|
||||
x3 += w3
|
||||
x4 += w4
|
||||
x5 += w5
|
||||
x6 += w6
|
||||
x7 += w7
|
||||
x8 += w8
|
||||
x9 += w9
|
||||
x10 += w10
|
||||
x11 += w11
|
||||
x12 += w12
|
||||
x13 += w13
|
||||
x14 += w14
|
||||
x15 += w15
|
||||
|
||||
out[0], tmp[0] = x0, x0
|
||||
out[1], tmp[1] = x1, x1
|
||||
out[2], tmp[2] = x2, x2
|
||||
out[3], tmp[3] = x3, x3
|
||||
out[4], tmp[4] = x4, x4
|
||||
out[5], tmp[5] = x5, x5
|
||||
out[6], tmp[6] = x6, x6
|
||||
out[7], tmp[7] = x7, x7
|
||||
out[8], tmp[8] = x8, x8
|
||||
out[9], tmp[9] = x9, x9
|
||||
out[10], tmp[10] = x10, x10
|
||||
out[11], tmp[11] = x11, x11
|
||||
out[12], tmp[12] = x12, x12
|
||||
out[13], tmp[13] = x13, x13
|
||||
out[14], tmp[14] = x14, x14
|
||||
out[15], tmp[15] = x15, x15
|
||||
}
|
||||
|
||||
func blockMix(tmp *[16]uint32, in, out []uint32, r int) {
|
||||
blockCopy(tmp[:], in[(2*r-1)*16:], 16)
|
||||
for i := 0; i < 2*r; i += 2 {
|
||||
salsaXOR(tmp, in[i*16:], out[i*8:])
|
||||
salsaXOR(tmp, in[i*16+16:], out[i*8+r*16:])
|
||||
}
|
||||
}
|
||||
|
||||
func integer(b []uint32, r int) uint64 {
|
||||
j := (2*r - 1) * 16
|
||||
return uint64(b[j]) | uint64(b[j+1])<<32
|
||||
}
|
||||
|
||||
func smix(b []byte, r, N int, v, xy []uint32) {
|
||||
var tmp [16]uint32
|
||||
R := 32 * r
|
||||
x := xy
|
||||
y := xy[R:]
|
||||
|
||||
j := 0
|
||||
for i := 0; i < R; i++ {
|
||||
x[i] = binary.LittleEndian.Uint32(b[j:])
|
||||
j += 4
|
||||
}
|
||||
for i := 0; i < N; i += 2 {
|
||||
blockCopy(v[i*R:], x, R)
|
||||
blockMix(&tmp, x, y, r)
|
||||
|
||||
blockCopy(v[(i+1)*R:], y, R)
|
||||
blockMix(&tmp, y, x, r)
|
||||
}
|
||||
for i := 0; i < N; i += 2 {
|
||||
j := int(integer(x, r) & uint64(N-1))
|
||||
blockXOR(x, v[j*R:], R)
|
||||
blockMix(&tmp, x, y, r)
|
||||
|
||||
j = int(integer(y, r) & uint64(N-1))
|
||||
blockXOR(y, v[j*R:], R)
|
||||
blockMix(&tmp, y, x, r)
|
||||
}
|
||||
j = 0
|
||||
for _, v := range x[:R] {
|
||||
binary.LittleEndian.PutUint32(b[j:], v)
|
||||
j += 4
|
||||
}
|
||||
}
|
||||
|
||||
// Key derives a key from the password, salt, and cost parameters, returning
|
||||
// a byte slice of length keyLen that can be used as cryptographic key.
|
||||
//
|
||||
// N is a CPU/memory cost parameter, which must be a power of two greater than 1.
|
||||
// r and p must satisfy r * p < 2³⁰. If the parameters do not satisfy the
|
||||
// limits, the function returns a nil byte slice and an error.
|
||||
//
|
||||
// For example, you can get a derived key for e.g. AES-256 (which needs a
|
||||
// 32-byte key) by doing:
|
||||
//
|
||||
// dk, err := scrypt.Key([]byte("some password"), salt, 32768, 8, 1, 32)
|
||||
//
|
||||
// The recommended parameters for interactive logins as of 2017 are N=32768, r=8
|
||||
// and p=1. The parameters N, r, and p should be increased as memory latency and
|
||||
// CPU parallelism increases; consider setting N to the highest power of 2 you
|
||||
// can derive within 100 milliseconds. Remember to get a good random salt.
|
||||
func Key(password, salt []byte, N, r, p, keyLen int) ([]byte, error) {
|
||||
if N <= 1 || N&(N-1) != 0 {
|
||||
return nil, errors.New("scrypt: N must be > 1 and a power of 2")
|
||||
}
|
||||
if uint64(r)*uint64(p) >= 1<<30 || r > maxInt/128/p || r > maxInt/256 || N > maxInt/128/r {
|
||||
return nil, errors.New("scrypt: parameters are too large")
|
||||
}
|
||||
|
||||
xy := make([]uint32, 64*r)
|
||||
v := make([]uint32, 32*N*r)
|
||||
b := pbkdf2.Key(password, salt, 1, p*128*r, sha256.New)
|
||||
|
||||
for i := 0; i < p; i++ {
|
||||
smix(b[i*128*r:], r, N, v, xy)
|
||||
}
|
||||
|
||||
return pbkdf2.Key(password, b, 1, keyLen, sha256.New), nil
|
||||
}
|
||||
1256
vendor/golang.org/x/net/html/atom/table.go
generated
vendored
1256
vendor/golang.org/x/net/html/atom/table.go
generated
vendored
File diff suppressed because it is too large
Load Diff
4
vendor/golang.org/x/net/html/parse.go
generated
vendored
4
vendor/golang.org/x/net/html/parse.go
generated
vendored
@ -924,7 +924,7 @@ func inBodyIM(p *parser) bool {
|
||||
p.addElement()
|
||||
p.im = inFramesetIM
|
||||
return true
|
||||
case a.Address, a.Article, a.Aside, a.Blockquote, a.Center, a.Details, a.Dialog, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Main, a.Menu, a.Nav, a.Ol, a.P, a.Section, a.Summary, a.Ul:
|
||||
case a.Address, a.Article, a.Aside, a.Blockquote, a.Center, a.Details, a.Dialog, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Main, a.Menu, a.Nav, a.Ol, a.P, a.Search, a.Section, a.Summary, a.Ul:
|
||||
p.popUntil(buttonScope, a.P)
|
||||
p.addElement()
|
||||
case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
|
||||
@ -1136,7 +1136,7 @@ func inBodyIM(p *parser) bool {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
case a.Address, a.Article, a.Aside, a.Blockquote, a.Button, a.Center, a.Details, a.Dialog, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Listing, a.Main, a.Menu, a.Nav, a.Ol, a.Pre, a.Section, a.Summary, a.Ul:
|
||||
case a.Address, a.Article, a.Aside, a.Blockquote, a.Button, a.Center, a.Details, a.Dialog, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Listing, a.Main, a.Menu, a.Nav, a.Ol, a.Pre, a.Search, a.Section, a.Summary, a.Ul:
|
||||
p.popUntil(defaultScope, p.tok.DataAtom)
|
||||
case a.Form:
|
||||
if p.oe.contains(a.Template) {
|
||||
|
||||
18
vendor/golang.org/x/net/html/token.go
generated
vendored
18
vendor/golang.org/x/net/html/token.go
generated
vendored
@ -839,8 +839,22 @@ func (z *Tokenizer) readStartTag() TokenType {
|
||||
if raw {
|
||||
z.rawTag = strings.ToLower(string(z.buf[z.data.start:z.data.end]))
|
||||
}
|
||||
// Look for a self-closing token like "<br/>".
|
||||
if z.err == nil && z.buf[z.raw.end-2] == '/' {
|
||||
// Look for a self-closing token (e.g. <br/>).
|
||||
//
|
||||
// Originally, we did this by just checking that the last character of the
|
||||
// tag (ignoring the closing bracket) was a solidus (/) character, but this
|
||||
// is not always accurate.
|
||||
//
|
||||
// We need to be careful that we don't misinterpret a non-self-closing tag
|
||||
// as self-closing, as can happen if the tag contains unquoted attribute
|
||||
// values (i.e. <p a=/>).
|
||||
//
|
||||
// To avoid this, we check that the last non-bracket character of the tag
|
||||
// (z.raw.end-2) isn't the same character as the last non-quote character of
|
||||
// the last attribute of the tag (z.pendingAttr[1].end-1), if the tag has
|
||||
// attributes.
|
||||
nAttrs := len(z.attr)
|
||||
if z.err == nil && z.buf[z.raw.end-2] == '/' && (nAttrs == 0 || z.raw.end-2 != z.attr[nAttrs-1][1].end-1) {
|
||||
return SelfClosingTagToken
|
||||
}
|
||||
return StartTagToken
|
||||
|
||||
4
vendor/golang.org/x/sys/unix/affinity_linux.go
generated
vendored
4
vendor/golang.org/x/sys/unix/affinity_linux.go
generated
vendored
@ -38,9 +38,7 @@ func SchedSetaffinity(pid int, set *CPUSet) error {
|
||||
|
||||
// Zero clears the set s, so that it contains no CPUs.
|
||||
func (s *CPUSet) Zero() {
|
||||
for i := range s {
|
||||
s[i] = 0
|
||||
}
|
||||
clear(s[:])
|
||||
}
|
||||
|
||||
func cpuBitsIndex(cpu int) int {
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
3
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@ -349,6 +349,9 @@ struct ltchars {
|
||||
#define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN)
|
||||
#define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN)
|
||||
|
||||
// Renamed in v6.16, commit c6d732c38f93 ("net: ethtool: remove duplicate defines for family info")
|
||||
#define ETHTOOL_FAMILY_NAME ETHTOOL_GENL_NAME
|
||||
#define ETHTOOL_FAMILY_VERSION ETHTOOL_GENL_VERSION
|
||||
'
|
||||
|
||||
includes_NetBSD='
|
||||
|
||||
93
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
93
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -602,6 +602,95 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI
|
||||
return
|
||||
}
|
||||
|
||||
const minIovec = 8
|
||||
|
||||
func Readv(fd int, iovs [][]byte) (n int, err error) {
|
||||
iovecs := make([]Iovec, 0, minIovec)
|
||||
iovecs = appendBytes(iovecs, iovs)
|
||||
n, err = readv(fd, iovecs)
|
||||
readvRacedetect(iovecs, n, err)
|
||||
return n, err
|
||||
}
|
||||
|
||||
func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
|
||||
iovecs := make([]Iovec, 0, minIovec)
|
||||
iovecs = appendBytes(iovecs, iovs)
|
||||
n, err = preadv(fd, iovecs, offset)
|
||||
readvRacedetect(iovecs, n, err)
|
||||
return n, err
|
||||
}
|
||||
|
||||
func Writev(fd int, iovs [][]byte) (n int, err error) {
|
||||
iovecs := make([]Iovec, 0, minIovec)
|
||||
iovecs = appendBytes(iovecs, iovs)
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
n, err = writev(fd, iovecs)
|
||||
writevRacedetect(iovecs, n)
|
||||
return n, err
|
||||
}
|
||||
|
||||
func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {
|
||||
iovecs := make([]Iovec, 0, minIovec)
|
||||
iovecs = appendBytes(iovecs, iovs)
|
||||
if raceenabled {
|
||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
n, err = pwritev(fd, iovecs, offset)
|
||||
writevRacedetect(iovecs, n)
|
||||
return n, err
|
||||
}
|
||||
|
||||
func appendBytes(vecs []Iovec, bs [][]byte) []Iovec {
|
||||
for _, b := range bs {
|
||||
var v Iovec
|
||||
v.SetLen(len(b))
|
||||
if len(b) > 0 {
|
||||
v.Base = &b[0]
|
||||
} else {
|
||||
v.Base = (*byte)(unsafe.Pointer(&_zero))
|
||||
}
|
||||
vecs = append(vecs, v)
|
||||
}
|
||||
return vecs
|
||||
}
|
||||
|
||||
func writevRacedetect(iovecs []Iovec, n int) {
|
||||
if !raceenabled {
|
||||
return
|
||||
}
|
||||
for i := 0; n > 0 && i < len(iovecs); i++ {
|
||||
m := int(iovecs[i].Len)
|
||||
if m > n {
|
||||
m = n
|
||||
}
|
||||
n -= m
|
||||
if m > 0 {
|
||||
raceReadRange(unsafe.Pointer(iovecs[i].Base), m)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func readvRacedetect(iovecs []Iovec, n int, err error) {
|
||||
if !raceenabled {
|
||||
return
|
||||
}
|
||||
for i := 0; n > 0 && i < len(iovecs); i++ {
|
||||
m := int(iovecs[i].Len)
|
||||
if m > n {
|
||||
m = n
|
||||
}
|
||||
n -= m
|
||||
if m > 0 {
|
||||
raceWriteRange(unsafe.Pointer(iovecs[i].Base), m)
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
raceAcquire(unsafe.Pointer(&ioSync))
|
||||
}
|
||||
}
|
||||
|
||||
//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error)
|
||||
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||
|
||||
@ -705,3 +794,7 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI
|
||||
//sys write(fd int, p []byte) (n int, err error)
|
||||
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
|
||||
//sys munmap(addr uintptr, length uintptr) (err error)
|
||||
//sys readv(fd int, iovecs []Iovec) (n int, err error)
|
||||
//sys preadv(fd int, iovecs []Iovec, offset int64) (n int, err error)
|
||||
//sys writev(fd int, iovecs []Iovec) (n int, err error)
|
||||
//sys pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error)
|
||||
|
||||
42
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
42
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -13,6 +13,7 @@ package unix
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"slices"
|
||||
"strconv"
|
||||
"syscall"
|
||||
"time"
|
||||
@ -417,7 +418,7 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
return nil, 0, EINVAL
|
||||
}
|
||||
sa.raw.Family = AF_UNIX
|
||||
for i := 0; i < n; i++ {
|
||||
for i := range n {
|
||||
sa.raw.Path[i] = int8(name[i])
|
||||
}
|
||||
// length is family (uint16), name, NUL.
|
||||
@ -507,7 +508,7 @@ func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
psm := (*[2]byte)(unsafe.Pointer(&sa.raw.Psm))
|
||||
psm[0] = byte(sa.PSM)
|
||||
psm[1] = byte(sa.PSM >> 8)
|
||||
for i := 0; i < len(sa.Addr); i++ {
|
||||
for i := range len(sa.Addr) {
|
||||
sa.raw.Bdaddr[i] = sa.Addr[len(sa.Addr)-1-i]
|
||||
}
|
||||
cid := (*[2]byte)(unsafe.Pointer(&sa.raw.Cid))
|
||||
@ -589,11 +590,11 @@ func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
sa.raw.Family = AF_CAN
|
||||
sa.raw.Ifindex = int32(sa.Ifindex)
|
||||
rx := (*[4]byte)(unsafe.Pointer(&sa.RxID))
|
||||
for i := 0; i < 4; i++ {
|
||||
for i := range 4 {
|
||||
sa.raw.Addr[i] = rx[i]
|
||||
}
|
||||
tx := (*[4]byte)(unsafe.Pointer(&sa.TxID))
|
||||
for i := 0; i < 4; i++ {
|
||||
for i := range 4 {
|
||||
sa.raw.Addr[i+4] = tx[i]
|
||||
}
|
||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
|
||||
@ -618,11 +619,11 @@ func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
sa.raw.Family = AF_CAN
|
||||
sa.raw.Ifindex = int32(sa.Ifindex)
|
||||
n := (*[8]byte)(unsafe.Pointer(&sa.Name))
|
||||
for i := 0; i < 8; i++ {
|
||||
for i := range 8 {
|
||||
sa.raw.Addr[i] = n[i]
|
||||
}
|
||||
p := (*[4]byte)(unsafe.Pointer(&sa.PGN))
|
||||
for i := 0; i < 4; i++ {
|
||||
for i := range 4 {
|
||||
sa.raw.Addr[i+8] = p[i]
|
||||
}
|
||||
sa.raw.Addr[12] = sa.Addr
|
||||
@ -911,7 +912,7 @@ func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
// These are EBCDIC encoded by the kernel, but we still need to pad them
|
||||
// with blanks. Initializing with blanks allows the caller to feed in either
|
||||
// a padded or an unpadded string.
|
||||
for i := 0; i < 8; i++ {
|
||||
for i := range 8 {
|
||||
sa.raw.Nodeid[i] = ' '
|
||||
sa.raw.User_id[i] = ' '
|
||||
sa.raw.Name[i] = ' '
|
||||
@ -1148,7 +1149,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
var user [8]byte
|
||||
var name [8]byte
|
||||
|
||||
for i := 0; i < 8; i++ {
|
||||
for i := range 8 {
|
||||
user[i] = byte(pp.User_id[i])
|
||||
name[i] = byte(pp.Name[i])
|
||||
}
|
||||
@ -1173,11 +1174,11 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
Ifindex: int(pp.Ifindex),
|
||||
}
|
||||
name := (*[8]byte)(unsafe.Pointer(&sa.Name))
|
||||
for i := 0; i < 8; i++ {
|
||||
for i := range 8 {
|
||||
name[i] = pp.Addr[i]
|
||||
}
|
||||
pgn := (*[4]byte)(unsafe.Pointer(&sa.PGN))
|
||||
for i := 0; i < 4; i++ {
|
||||
for i := range 4 {
|
||||
pgn[i] = pp.Addr[i+8]
|
||||
}
|
||||
addr := (*[1]byte)(unsafe.Pointer(&sa.Addr))
|
||||
@ -1188,11 +1189,11 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
Ifindex: int(pp.Ifindex),
|
||||
}
|
||||
rx := (*[4]byte)(unsafe.Pointer(&sa.RxID))
|
||||
for i := 0; i < 4; i++ {
|
||||
for i := range 4 {
|
||||
rx[i] = pp.Addr[i]
|
||||
}
|
||||
tx := (*[4]byte)(unsafe.Pointer(&sa.TxID))
|
||||
for i := 0; i < 4; i++ {
|
||||
for i := range 4 {
|
||||
tx[i] = pp.Addr[i+4]
|
||||
}
|
||||
return sa, nil
|
||||
@ -2216,10 +2217,7 @@ func readvRacedetect(iovecs []Iovec, n int, err error) {
|
||||
return
|
||||
}
|
||||
for i := 0; n > 0 && i < len(iovecs); i++ {
|
||||
m := int(iovecs[i].Len)
|
||||
if m > n {
|
||||
m = n
|
||||
}
|
||||
m := min(int(iovecs[i].Len), n)
|
||||
n -= m
|
||||
if m > 0 {
|
||||
raceWriteRange(unsafe.Pointer(iovecs[i].Base), m)
|
||||
@ -2270,10 +2268,7 @@ func writevRacedetect(iovecs []Iovec, n int) {
|
||||
return
|
||||
}
|
||||
for i := 0; n > 0 && i < len(iovecs); i++ {
|
||||
m := int(iovecs[i].Len)
|
||||
if m > n {
|
||||
m = n
|
||||
}
|
||||
m := min(int(iovecs[i].Len), n)
|
||||
n -= m
|
||||
if m > 0 {
|
||||
raceReadRange(unsafe.Pointer(iovecs[i].Base), m)
|
||||
@ -2320,12 +2315,7 @@ func isGroupMember(gid int) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, g := range groups {
|
||||
if g == gid {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.Contains(groups, gid)
|
||||
}
|
||||
|
||||
func isCapDacOverrideSet() bool {
|
||||
|
||||
2
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@ -629,7 +629,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
//sys Kill(pid int, signum syscall.Signal) (err error)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Link(path string, link string) (err error)
|
||||
//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten
|
||||
//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_listen
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
//sys Madvise(b []byte, advice int) (err error)
|
||||
//sys Mkdir(path string, mode uint32) (err error)
|
||||
|
||||
63
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
63
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
@ -319,6 +319,7 @@ const (
|
||||
AUDIT_INTEGRITY_POLICY_RULE = 0x70f
|
||||
AUDIT_INTEGRITY_RULE = 0x70d
|
||||
AUDIT_INTEGRITY_STATUS = 0x70a
|
||||
AUDIT_INTEGRITY_USERSPACE = 0x710
|
||||
AUDIT_IPC = 0x517
|
||||
AUDIT_IPC_SET_PERM = 0x51f
|
||||
AUDIT_IPE_ACCESS = 0x58c
|
||||
@ -327,6 +328,8 @@ const (
|
||||
AUDIT_KERNEL = 0x7d0
|
||||
AUDIT_KERNEL_OTHER = 0x524
|
||||
AUDIT_KERN_MODULE = 0x532
|
||||
AUDIT_LANDLOCK_ACCESS = 0x58f
|
||||
AUDIT_LANDLOCK_DOMAIN = 0x590
|
||||
AUDIT_LAST_FEATURE = 0x1
|
||||
AUDIT_LAST_KERN_ANOM_MSG = 0x707
|
||||
AUDIT_LAST_USER_MSG = 0x4af
|
||||
@ -491,6 +494,7 @@ const (
|
||||
BPF_F_BEFORE = 0x8
|
||||
BPF_F_ID = 0x20
|
||||
BPF_F_NETFILTER_IP_DEFRAG = 0x1
|
||||
BPF_F_PREORDER = 0x40
|
||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||
BPF_F_REDIRECT_FLAGS = 0x19
|
||||
BPF_F_REPLACE = 0x4
|
||||
@ -527,6 +531,7 @@ const (
|
||||
BPF_LDX = 0x1
|
||||
BPF_LEN = 0x80
|
||||
BPF_LL_OFF = -0x200000
|
||||
BPF_LOAD_ACQ = 0x100
|
||||
BPF_LSH = 0x60
|
||||
BPF_MAJOR_VERSION = 0x1
|
||||
BPF_MAXINSNS = 0x1000
|
||||
@ -554,6 +559,7 @@ const (
|
||||
BPF_RET = 0x6
|
||||
BPF_RSH = 0x70
|
||||
BPF_ST = 0x2
|
||||
BPF_STORE_REL = 0x110
|
||||
BPF_STX = 0x3
|
||||
BPF_SUB = 0x10
|
||||
BPF_TAG_SIZE = 0x8
|
||||
@ -843,9 +849,9 @@ const (
|
||||
DM_UUID_FLAG = 0x4000
|
||||
DM_UUID_LEN = 0x81
|
||||
DM_VERSION = 0xc138fd00
|
||||
DM_VERSION_EXTRA = "-ioctl (2023-03-01)"
|
||||
DM_VERSION_EXTRA = "-ioctl (2025-04-28)"
|
||||
DM_VERSION_MAJOR = 0x4
|
||||
DM_VERSION_MINOR = 0x30
|
||||
DM_VERSION_MINOR = 0x32
|
||||
DM_VERSION_PATCHLEVEL = 0x0
|
||||
DT_BLK = 0x6
|
||||
DT_CHR = 0x2
|
||||
@ -936,11 +942,10 @@ const (
|
||||
EPOLL_CTL_MOD = 0x3
|
||||
EPOLL_IOC_TYPE = 0x8a
|
||||
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
|
||||
ESP_V4_FLOW = 0xa
|
||||
ESP_V6_FLOW = 0xc
|
||||
ETHER_FLOW = 0x12
|
||||
ETHTOOL_BUSINFO_LEN = 0x20
|
||||
ETHTOOL_EROMVERS_LEN = 0x20
|
||||
ETHTOOL_FAMILY_NAME = "ethtool"
|
||||
ETHTOOL_FAMILY_VERSION = 0x1
|
||||
ETHTOOL_FEC_AUTO = 0x2
|
||||
ETHTOOL_FEC_BASER = 0x10
|
||||
ETHTOOL_FEC_LLRS = 0x20
|
||||
@ -1203,13 +1208,18 @@ const (
|
||||
FAN_DENY = 0x2
|
||||
FAN_ENABLE_AUDIT = 0x40
|
||||
FAN_EPIDFD = -0x2
|
||||
FAN_ERRNO_BITS = 0x8
|
||||
FAN_ERRNO_MASK = 0xff
|
||||
FAN_ERRNO_SHIFT = 0x18
|
||||
FAN_EVENT_INFO_TYPE_DFID = 0x3
|
||||
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
|
||||
FAN_EVENT_INFO_TYPE_ERROR = 0x5
|
||||
FAN_EVENT_INFO_TYPE_FID = 0x1
|
||||
FAN_EVENT_INFO_TYPE_MNT = 0x7
|
||||
FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
|
||||
FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
|
||||
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
|
||||
FAN_EVENT_INFO_TYPE_RANGE = 0x6
|
||||
FAN_EVENT_METADATA_LEN = 0x18
|
||||
FAN_EVENT_ON_CHILD = 0x8000000
|
||||
FAN_FS_ERROR = 0x8000
|
||||
@ -1224,9 +1234,12 @@ const (
|
||||
FAN_MARK_IGNORED_SURV_MODIFY = 0x40
|
||||
FAN_MARK_IGNORE_SURV = 0x440
|
||||
FAN_MARK_INODE = 0x0
|
||||
FAN_MARK_MNTNS = 0x110
|
||||
FAN_MARK_MOUNT = 0x10
|
||||
FAN_MARK_ONLYDIR = 0x8
|
||||
FAN_MARK_REMOVE = 0x2
|
||||
FAN_MNT_ATTACH = 0x1000000
|
||||
FAN_MNT_DETACH = 0x2000000
|
||||
FAN_MODIFY = 0x2
|
||||
FAN_MOVE = 0xc0
|
||||
FAN_MOVED_FROM = 0x40
|
||||
@ -1240,6 +1253,7 @@ const (
|
||||
FAN_OPEN_EXEC = 0x1000
|
||||
FAN_OPEN_EXEC_PERM = 0x40000
|
||||
FAN_OPEN_PERM = 0x10000
|
||||
FAN_PRE_ACCESS = 0x100000
|
||||
FAN_Q_OVERFLOW = 0x4000
|
||||
FAN_RENAME = 0x10000000
|
||||
FAN_REPORT_DFID_NAME = 0xc00
|
||||
@ -1247,6 +1261,7 @@ const (
|
||||
FAN_REPORT_DIR_FID = 0x400
|
||||
FAN_REPORT_FD_ERROR = 0x2000
|
||||
FAN_REPORT_FID = 0x200
|
||||
FAN_REPORT_MNT = 0x4000
|
||||
FAN_REPORT_NAME = 0x800
|
||||
FAN_REPORT_PIDFD = 0x80
|
||||
FAN_REPORT_TARGET_FID = 0x1000
|
||||
@ -1266,6 +1281,7 @@ const (
|
||||
FIB_RULE_PERMANENT = 0x1
|
||||
FIB_RULE_UNRESOLVED = 0x4
|
||||
FIDEDUPERANGE = 0xc0189436
|
||||
FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED = 0x1
|
||||
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
|
||||
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
|
||||
FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
|
||||
@ -1574,7 +1590,6 @@ const (
|
||||
IPV6_DONTFRAG = 0x3e
|
||||
IPV6_DROP_MEMBERSHIP = 0x15
|
||||
IPV6_DSTOPTS = 0x3b
|
||||
IPV6_FLOW = 0x11
|
||||
IPV6_FREEBIND = 0x4e
|
||||
IPV6_HDRINCL = 0x24
|
||||
IPV6_HOPLIMIT = 0x34
|
||||
@ -1625,7 +1640,6 @@ const (
|
||||
IPV6_TRANSPARENT = 0x4b
|
||||
IPV6_UNICAST_HOPS = 0x10
|
||||
IPV6_UNICAST_IF = 0x4c
|
||||
IPV6_USER_FLOW = 0xe
|
||||
IPV6_V6ONLY = 0x1a
|
||||
IPV6_VERSION = 0x60
|
||||
IPV6_VERSION_MASK = 0xf0
|
||||
@ -1687,7 +1701,6 @@ const (
|
||||
IP_TTL = 0x2
|
||||
IP_UNBLOCK_SOURCE = 0x25
|
||||
IP_UNICAST_IF = 0x32
|
||||
IP_USER_FLOW = 0xd
|
||||
IP_XFRM_POLICY = 0x11
|
||||
ISOFS_SUPER_MAGIC = 0x9660
|
||||
ISTRIP = 0x20
|
||||
@ -1809,7 +1822,11 @@ const (
|
||||
LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
|
||||
LANDLOCK_ACCESS_NET_BIND_TCP = 0x1
|
||||
LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2
|
||||
LANDLOCK_CREATE_RULESET_ERRATA = 0x2
|
||||
LANDLOCK_CREATE_RULESET_VERSION = 0x1
|
||||
LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON = 0x2
|
||||
LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF = 0x1
|
||||
LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF = 0x4
|
||||
LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1
|
||||
LANDLOCK_SCOPE_SIGNAL = 0x2
|
||||
LINUX_REBOOT_CMD_CAD_OFF = 0x0
|
||||
@ -2485,6 +2502,10 @@ const (
|
||||
PR_FP_EXC_UND = 0x40000
|
||||
PR_FP_MODE_FR = 0x1
|
||||
PR_FP_MODE_FRE = 0x2
|
||||
PR_FUTEX_HASH = 0x4e
|
||||
PR_FUTEX_HASH_GET_IMMUTABLE = 0x3
|
||||
PR_FUTEX_HASH_GET_SLOTS = 0x2
|
||||
PR_FUTEX_HASH_SET_SLOTS = 0x1
|
||||
PR_GET_AUXV = 0x41555856
|
||||
PR_GET_CHILD_SUBREAPER = 0x25
|
||||
PR_GET_DUMPABLE = 0x3
|
||||
@ -2644,6 +2665,10 @@ const (
|
||||
PR_TAGGED_ADDR_ENABLE = 0x1
|
||||
PR_TASK_PERF_EVENTS_DISABLE = 0x1f
|
||||
PR_TASK_PERF_EVENTS_ENABLE = 0x20
|
||||
PR_TIMER_CREATE_RESTORE_IDS = 0x4d
|
||||
PR_TIMER_CREATE_RESTORE_IDS_GET = 0x2
|
||||
PR_TIMER_CREATE_RESTORE_IDS_OFF = 0x0
|
||||
PR_TIMER_CREATE_RESTORE_IDS_ON = 0x1
|
||||
PR_TIMING_STATISTICAL = 0x0
|
||||
PR_TIMING_TIMESTAMP = 0x1
|
||||
PR_TSC_ENABLE = 0x1
|
||||
@ -2724,6 +2749,7 @@ const (
|
||||
PTRACE_SETREGSET = 0x4205
|
||||
PTRACE_SETSIGINFO = 0x4203
|
||||
PTRACE_SETSIGMASK = 0x420b
|
||||
PTRACE_SET_SYSCALL_INFO = 0x4212
|
||||
PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210
|
||||
PTRACE_SINGLESTEP = 0x9
|
||||
PTRACE_SYSCALL = 0x18
|
||||
@ -2787,7 +2813,7 @@ const (
|
||||
RTAX_UNSPEC = 0x0
|
||||
RTAX_WINDOW = 0x3
|
||||
RTA_ALIGNTO = 0x4
|
||||
RTA_MAX = 0x1e
|
||||
RTA_MAX = 0x1f
|
||||
RTCF_DIRECTSRC = 0x4000000
|
||||
RTCF_DOREDIRECT = 0x1000000
|
||||
RTCF_LOG = 0x2000000
|
||||
@ -2864,10 +2890,12 @@ const (
|
||||
RTM_DELACTION = 0x31
|
||||
RTM_DELADDR = 0x15
|
||||
RTM_DELADDRLABEL = 0x49
|
||||
RTM_DELANYCAST = 0x3d
|
||||
RTM_DELCHAIN = 0x65
|
||||
RTM_DELLINK = 0x11
|
||||
RTM_DELLINKPROP = 0x6d
|
||||
RTM_DELMDB = 0x55
|
||||
RTM_DELMULTICAST = 0x39
|
||||
RTM_DELNEIGH = 0x1d
|
||||
RTM_DELNETCONF = 0x51
|
||||
RTM_DELNEXTHOP = 0x69
|
||||
@ -2917,11 +2945,13 @@ const (
|
||||
RTM_NEWACTION = 0x30
|
||||
RTM_NEWADDR = 0x14
|
||||
RTM_NEWADDRLABEL = 0x48
|
||||
RTM_NEWANYCAST = 0x3c
|
||||
RTM_NEWCACHEREPORT = 0x60
|
||||
RTM_NEWCHAIN = 0x64
|
||||
RTM_NEWLINK = 0x10
|
||||
RTM_NEWLINKPROP = 0x6c
|
||||
RTM_NEWMDB = 0x54
|
||||
RTM_NEWMULTICAST = 0x38
|
||||
RTM_NEWNDUSEROPT = 0x44
|
||||
RTM_NEWNEIGH = 0x1c
|
||||
RTM_NEWNEIGHTBL = 0x40
|
||||
@ -2970,6 +3000,7 @@ const (
|
||||
RTPROT_NTK = 0xf
|
||||
RTPROT_OPENR = 0x63
|
||||
RTPROT_OSPF = 0xbc
|
||||
RTPROT_OVN = 0x54
|
||||
RTPROT_RA = 0x9
|
||||
RTPROT_REDIRECT = 0x1
|
||||
RTPROT_RIP = 0xbd
|
||||
@ -2987,11 +3018,12 @@ const (
|
||||
RUSAGE_THREAD = 0x1
|
||||
RWF_APPEND = 0x10
|
||||
RWF_ATOMIC = 0x40
|
||||
RWF_DONTCACHE = 0x80
|
||||
RWF_DSYNC = 0x2
|
||||
RWF_HIPRI = 0x1
|
||||
RWF_NOAPPEND = 0x20
|
||||
RWF_NOWAIT = 0x8
|
||||
RWF_SUPPORTED = 0x7f
|
||||
RWF_SUPPORTED = 0xff
|
||||
RWF_SYNC = 0x4
|
||||
RWF_WRITE_LIFE_NOT_SET = 0x0
|
||||
SCHED_BATCH = 0x3
|
||||
@ -3271,6 +3303,7 @@ const (
|
||||
STATX_BTIME = 0x800
|
||||
STATX_CTIME = 0x80
|
||||
STATX_DIOALIGN = 0x2000
|
||||
STATX_DIO_READ_ALIGN = 0x20000
|
||||
STATX_GID = 0x10
|
||||
STATX_INO = 0x100
|
||||
STATX_MNT_ID = 0x1000
|
||||
@ -3322,7 +3355,7 @@ const (
|
||||
TASKSTATS_GENL_NAME = "TASKSTATS"
|
||||
TASKSTATS_GENL_VERSION = 0x1
|
||||
TASKSTATS_TYPE_MAX = 0x6
|
||||
TASKSTATS_VERSION = 0xe
|
||||
TASKSTATS_VERSION = 0x10
|
||||
TCIFLUSH = 0x0
|
||||
TCIOFF = 0x2
|
||||
TCIOFLUSH = 0x2
|
||||
@ -3392,8 +3425,6 @@ const (
|
||||
TCP_TX_DELAY = 0x25
|
||||
TCP_ULP = 0x1f
|
||||
TCP_USER_TIMEOUT = 0x12
|
||||
TCP_V4_FLOW = 0x1
|
||||
TCP_V6_FLOW = 0x5
|
||||
TCP_WINDOW_CLAMP = 0xa
|
||||
TCP_ZEROCOPY_RECEIVE = 0x23
|
||||
TFD_TIMER_ABSTIME = 0x1
|
||||
@ -3503,6 +3534,7 @@ const (
|
||||
TP_STATUS_WRONG_FORMAT = 0x4
|
||||
TRACEFS_MAGIC = 0x74726163
|
||||
TS_COMM_LEN = 0x20
|
||||
UBI_IOCECNFO = 0xc01c6f06
|
||||
UDF_SUPER_MAGIC = 0x15013346
|
||||
UDP_CORK = 0x1
|
||||
UDP_ENCAP = 0x64
|
||||
@ -3515,8 +3547,6 @@ const (
|
||||
UDP_NO_CHECK6_RX = 0x66
|
||||
UDP_NO_CHECK6_TX = 0x65
|
||||
UDP_SEGMENT = 0x67
|
||||
UDP_V4_FLOW = 0x2
|
||||
UDP_V6_FLOW = 0x6
|
||||
UMOUNT_NOFOLLOW = 0x8
|
||||
USBDEVICE_SUPER_MAGIC = 0x9fa2
|
||||
UTIME_NOW = 0x3fffffff
|
||||
@ -3559,7 +3589,7 @@ const (
|
||||
WDIOS_TEMPPANIC = 0x4
|
||||
WDIOS_UNKNOWN = -0x1
|
||||
WEXITED = 0x4
|
||||
WGALLOWEDIP_A_MAX = 0x3
|
||||
WGALLOWEDIP_A_MAX = 0x4
|
||||
WGDEVICE_A_MAX = 0x8
|
||||
WGPEER_A_MAX = 0xa
|
||||
WG_CMD_MAX = 0x1
|
||||
@ -3673,6 +3703,7 @@ const (
|
||||
XDP_SHARED_UMEM = 0x1
|
||||
XDP_STATISTICS = 0x7
|
||||
XDP_TXMD_FLAGS_CHECKSUM = 0x2
|
||||
XDP_TXMD_FLAGS_LAUNCH_TIME = 0x4
|
||||
XDP_TXMD_FLAGS_TIMESTAMP = 0x1
|
||||
XDP_TX_METADATA = 0x2
|
||||
XDP_TX_RING = 0x3
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0xfd12
|
||||
ECCGETLAYOUT = 0x81484d11
|
||||
ECCGETSTATS = 0x80104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -360,6 +361,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x10
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
@ -372,6 +374,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x12
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0xfd12
|
||||
ECCGETLAYOUT = 0x81484d11
|
||||
ECCGETSTATS = 0x80104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -361,6 +362,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x10
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
@ -373,6 +375,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x12
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0xfd12
|
||||
ECCGETLAYOUT = 0x81484d11
|
||||
ECCGETSTATS = 0x80104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -366,6 +367,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x10
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
@ -378,6 +380,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x12
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0xfd12
|
||||
ECCGETLAYOUT = 0x81484d11
|
||||
ECCGETSTATS = 0x80104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -359,6 +360,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x10
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
@ -371,6 +373,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x12
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0xfd12
|
||||
ECCGETLAYOUT = 0x81484d11
|
||||
ECCGETSTATS = 0x80104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -353,6 +354,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x10
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
@ -365,6 +367,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x12
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -359,6 +360,7 @@ const (
|
||||
SO_OOBINLINE = 0x100
|
||||
SO_PASSCRED = 0x11
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
@ -371,6 +373,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -359,6 +360,7 @@ const (
|
||||
SO_OOBINLINE = 0x100
|
||||
SO_PASSCRED = 0x11
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
@ -371,6 +373,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -359,6 +360,7 @@ const (
|
||||
SO_OOBINLINE = 0x100
|
||||
SO_PASSCRED = 0x11
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
@ -371,6 +373,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -359,6 +360,7 @@ const (
|
||||
SO_OOBINLINE = 0x100
|
||||
SO_PASSCRED = 0x11
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x12
|
||||
@ -371,6 +373,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x1004
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x1006
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x1006
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x300
|
||||
CSIZE = 0x300
|
||||
CSTOPB = 0x400
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x40
|
||||
@ -414,6 +415,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x14
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x15
|
||||
@ -426,6 +428,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x10
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x12
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x12
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x300
|
||||
CSIZE = 0x300
|
||||
CSTOPB = 0x400
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x40
|
||||
@ -418,6 +419,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x14
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x15
|
||||
@ -430,6 +432,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x10
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x12
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x12
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x300
|
||||
CSIZE = 0x300
|
||||
CSTOPB = 0x400
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x40
|
||||
@ -418,6 +419,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x14
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x15
|
||||
@ -430,6 +432,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x10
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x12
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x12
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0xfd12
|
||||
ECCGETLAYOUT = 0x81484d11
|
||||
ECCGETSTATS = 0x80104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -350,6 +351,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x10
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
@ -362,6 +364,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x12
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
@ -68,6 +68,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0xfd12
|
||||
ECCGETLAYOUT = 0x81484d11
|
||||
ECCGETSTATS = 0x80104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -422,6 +423,7 @@ const (
|
||||
SO_OOBINLINE = 0xa
|
||||
SO_PASSCRED = 0x10
|
||||
SO_PASSPIDFD = 0x4c
|
||||
SO_PASSRIGHTS = 0x53
|
||||
SO_PASSSEC = 0x22
|
||||
SO_PEEK_OFF = 0x2a
|
||||
SO_PEERCRED = 0x11
|
||||
@ -434,6 +436,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x21
|
||||
SO_RCVLOWAT = 0x12
|
||||
SO_RCVMARK = 0x4b
|
||||
SO_RCVPRIORITY = 0x52
|
||||
SO_RCVTIMEO = 0x14
|
||||
SO_RCVTIMEO_NEW = 0x42
|
||||
SO_RCVTIMEO_OLD = 0x14
|
||||
|
||||
3
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
3
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
@ -71,6 +71,7 @@ const (
|
||||
CS8 = 0x30
|
||||
CSIZE = 0x30
|
||||
CSTOPB = 0x40
|
||||
DM_MPATH_PROBE_PATHS = 0x2000fd12
|
||||
ECCGETLAYOUT = 0x41484d11
|
||||
ECCGETSTATS = 0x40104d12
|
||||
ECHOCTL = 0x200
|
||||
@ -461,6 +462,7 @@ const (
|
||||
SO_OOBINLINE = 0x100
|
||||
SO_PASSCRED = 0x2
|
||||
SO_PASSPIDFD = 0x55
|
||||
SO_PASSRIGHTS = 0x5c
|
||||
SO_PASSSEC = 0x1f
|
||||
SO_PEEK_OFF = 0x26
|
||||
SO_PEERCRED = 0x40
|
||||
@ -473,6 +475,7 @@ const (
|
||||
SO_RCVBUFFORCE = 0x100b
|
||||
SO_RCVLOWAT = 0x800
|
||||
SO_RCVMARK = 0x54
|
||||
SO_RCVPRIORITY = 0x5b
|
||||
SO_RCVTIMEO = 0x2000
|
||||
SO_RCVTIMEO_NEW = 0x44
|
||||
SO_RCVTIMEO_OLD = 0x2000
|
||||
|
||||
84
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
generated
vendored
@ -2512,6 +2512,90 @@ var libc_munmap_trampoline_addr uintptr
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readv(fd int, iovecs []Iovec) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readv_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readv readv "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_preadv_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_preadv preadv "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func writev(fd int, iovecs []Iovec) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_writev_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_writev writev "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_pwritev_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_pwritev pwritev "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_fstat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
|
||||
20
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
20
vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
generated
vendored
@ -738,6 +738,26 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readv(SB)
|
||||
GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)
|
||||
|
||||
TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_preadv(SB)
|
||||
GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)
|
||||
|
||||
TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_writev(SB)
|
||||
GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pwritev(SB)
|
||||
GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstat64_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstat64(SB)
|
||||
GLOBL ·libc_fstat64_trampoline_addr(SB), RODATA, $8
|
||||
|
||||
84
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
84
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
generated
vendored
@ -2512,6 +2512,90 @@ var libc_munmap_trampoline_addr uintptr
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func readv(fd int, iovecs []Iovec) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_readv_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_readv readv "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_preadv_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_preadv preadv "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func writev(fd int, iovecs []Iovec) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_writev_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_writev writev "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(iovecs) > 0 {
|
||||
_p0 = unsafe.Pointer(&iovecs[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var libc_pwritev_trampoline_addr uintptr
|
||||
|
||||
//go:cgo_import_dynamic libc_pwritev pwritev "/usr/lib/libSystem.B.dylib"
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fstat(fd int, stat *Stat_t) (err error) {
|
||||
_, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
||||
if e1 != 0 {
|
||||
|
||||
20
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
20
vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
generated
vendored
@ -738,6 +738,26 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
|
||||
GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
|
||||
|
||||
TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_readv(SB)
|
||||
GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)
|
||||
|
||||
TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_preadv(SB)
|
||||
GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)
|
||||
|
||||
TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_writev(SB)
|
||||
GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)
|
||||
|
||||
TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_pwritev(SB)
|
||||
GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8
|
||||
DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)
|
||||
|
||||
TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
|
||||
JMP libc_fstat(SB)
|
||||
GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
|
||||
|
||||
8
vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
generated
vendored
8
vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
generated
vendored
@ -72,7 +72,7 @@ import (
|
||||
//go:cgo_import_dynamic libc_kill kill "libc.so"
|
||||
//go:cgo_import_dynamic libc_lchown lchown "libc.so"
|
||||
//go:cgo_import_dynamic libc_link link "libc.so"
|
||||
//go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so"
|
||||
//go:cgo_import_dynamic libc___xnet_listen __xnet_listen "libsocket.so"
|
||||
//go:cgo_import_dynamic libc_lstat lstat "libc.so"
|
||||
//go:cgo_import_dynamic libc_madvise madvise "libc.so"
|
||||
//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
|
||||
@ -221,7 +221,7 @@ import (
|
||||
//go:linkname procKill libc_kill
|
||||
//go:linkname procLchown libc_lchown
|
||||
//go:linkname procLink libc_link
|
||||
//go:linkname proc__xnet_llisten libc___xnet_llisten
|
||||
//go:linkname proc__xnet_listen libc___xnet_listen
|
||||
//go:linkname procLstat libc_lstat
|
||||
//go:linkname procMadvise libc_madvise
|
||||
//go:linkname procMkdir libc_mkdir
|
||||
@ -371,7 +371,7 @@ var (
|
||||
procKill,
|
||||
procLchown,
|
||||
procLink,
|
||||
proc__xnet_llisten,
|
||||
proc__xnet_listen,
|
||||
procLstat,
|
||||
procMadvise,
|
||||
procMkdir,
|
||||
@ -1178,7 +1178,7 @@ func Link(path string, link string) (err error) {
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Listen(s int, backlog int) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_listen)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
@ -462,4 +462,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
@ -385,4 +385,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
@ -426,4 +426,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
@ -329,4 +329,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
generated
vendored
@ -325,4 +325,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
@ -446,4 +446,5 @@ const (
|
||||
SYS_GETXATTRAT = 4464
|
||||
SYS_LISTXATTRAT = 4465
|
||||
SYS_REMOVEXATTRAT = 4466
|
||||
SYS_OPEN_TREE_ATTR = 4467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
@ -376,4 +376,5 @@ const (
|
||||
SYS_GETXATTRAT = 5464
|
||||
SYS_LISTXATTRAT = 5465
|
||||
SYS_REMOVEXATTRAT = 5466
|
||||
SYS_OPEN_TREE_ATTR = 5467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
@ -376,4 +376,5 @@ const (
|
||||
SYS_GETXATTRAT = 5464
|
||||
SYS_LISTXATTRAT = 5465
|
||||
SYS_REMOVEXATTRAT = 5466
|
||||
SYS_OPEN_TREE_ATTR = 5467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
@ -446,4 +446,5 @@ const (
|
||||
SYS_GETXATTRAT = 4464
|
||||
SYS_LISTXATTRAT = 4465
|
||||
SYS_REMOVEXATTRAT = 4466
|
||||
SYS_OPEN_TREE_ATTR = 4467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
generated
vendored
@ -453,4 +453,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
@ -425,4 +425,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
@ -425,4 +425,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
generated
vendored
@ -330,4 +330,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
@ -391,4 +391,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
1
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
1
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
@ -404,4 +404,5 @@ const (
|
||||
SYS_GETXATTRAT = 464
|
||||
SYS_LISTXATTRAT = 465
|
||||
SYS_REMOVEXATTRAT = 466
|
||||
SYS_OPEN_TREE_ATTR = 467
|
||||
)
|
||||
|
||||
180
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
180
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
@ -114,8 +114,10 @@ type Statx_t struct {
|
||||
Atomic_write_unit_min uint32
|
||||
Atomic_write_unit_max uint32
|
||||
Atomic_write_segments_max uint32
|
||||
Dio_read_offset_align uint32
|
||||
Atomic_write_unit_max_opt uint32
|
||||
_ [1]uint32
|
||||
_ [9]uint64
|
||||
_ [8]uint64
|
||||
}
|
||||
|
||||
type Fsid struct {
|
||||
@ -199,7 +201,8 @@ type FscryptAddKeyArg struct {
|
||||
Key_spec FscryptKeySpecifier
|
||||
Raw_size uint32
|
||||
Key_id uint32
|
||||
_ [8]uint32
|
||||
Flags uint32
|
||||
_ [7]uint32
|
||||
}
|
||||
|
||||
type FscryptRemoveKeyArg struct {
|
||||
@ -629,6 +632,8 @@ const (
|
||||
IFA_FLAGS = 0x8
|
||||
IFA_RT_PRIORITY = 0x9
|
||||
IFA_TARGET_NETNSID = 0xa
|
||||
IFAL_LABEL = 0x2
|
||||
IFAL_ADDRESS = 0x1
|
||||
RT_SCOPE_UNIVERSE = 0x0
|
||||
RT_SCOPE_SITE = 0xc8
|
||||
RT_SCOPE_LINK = 0xfd
|
||||
@ -686,6 +691,7 @@ const (
|
||||
SizeofRtAttr = 0x4
|
||||
SizeofIfInfomsg = 0x10
|
||||
SizeofIfAddrmsg = 0x8
|
||||
SizeofIfAddrlblmsg = 0xc
|
||||
SizeofIfaCacheinfo = 0x10
|
||||
SizeofRtMsg = 0xc
|
||||
SizeofRtNexthop = 0x8
|
||||
@ -737,6 +743,15 @@ type IfAddrmsg struct {
|
||||
Index uint32
|
||||
}
|
||||
|
||||
type IfAddrlblmsg struct {
|
||||
Family uint8
|
||||
_ uint8
|
||||
Prefixlen uint8
|
||||
Flags uint8
|
||||
Index uint32
|
||||
Seq uint32
|
||||
}
|
||||
|
||||
type IfaCacheinfo struct {
|
||||
Prefered uint32
|
||||
Valid uint32
|
||||
@ -2226,8 +2241,11 @@ const (
|
||||
NFT_PAYLOAD_LL_HEADER = 0x0
|
||||
NFT_PAYLOAD_NETWORK_HEADER = 0x1
|
||||
NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
|
||||
NFT_PAYLOAD_INNER_HEADER = 0x3
|
||||
NFT_PAYLOAD_TUN_HEADER = 0x4
|
||||
NFT_PAYLOAD_CSUM_NONE = 0x0
|
||||
NFT_PAYLOAD_CSUM_INET = 0x1
|
||||
NFT_PAYLOAD_CSUM_SCTP = 0x2
|
||||
NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
|
||||
NFTA_PAYLOAD_UNSPEC = 0x0
|
||||
NFTA_PAYLOAD_DREG = 0x1
|
||||
@ -2314,6 +2332,11 @@ const (
|
||||
NFT_CT_AVGPKT = 0x10
|
||||
NFT_CT_ZONE = 0x11
|
||||
NFT_CT_EVENTMASK = 0x12
|
||||
NFT_CT_SRC_IP = 0x13
|
||||
NFT_CT_DST_IP = 0x14
|
||||
NFT_CT_SRC_IP6 = 0x15
|
||||
NFT_CT_DST_IP6 = 0x16
|
||||
NFT_CT_ID = 0x17
|
||||
NFTA_CT_UNSPEC = 0x0
|
||||
NFTA_CT_DREG = 0x1
|
||||
NFTA_CT_KEY = 0x2
|
||||
@ -2594,8 +2617,8 @@ const (
|
||||
SOF_TIMESTAMPING_BIND_PHC = 0x8000
|
||||
SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000
|
||||
|
||||
SOF_TIMESTAMPING_LAST = 0x20000
|
||||
SOF_TIMESTAMPING_MASK = 0x3ffff
|
||||
SOF_TIMESTAMPING_LAST = 0x40000
|
||||
SOF_TIMESTAMPING_MASK = 0x7ffff
|
||||
|
||||
SCM_TSTAMP_SND = 0x0
|
||||
SCM_TSTAMP_SCHED = 0x1
|
||||
@ -3041,6 +3064,23 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
TCA_UNSPEC = 0x0
|
||||
TCA_KIND = 0x1
|
||||
TCA_OPTIONS = 0x2
|
||||
TCA_STATS = 0x3
|
||||
TCA_XSTATS = 0x4
|
||||
TCA_RATE = 0x5
|
||||
TCA_FCNT = 0x6
|
||||
TCA_STATS2 = 0x7
|
||||
TCA_STAB = 0x8
|
||||
TCA_PAD = 0x9
|
||||
TCA_DUMP_INVISIBLE = 0xa
|
||||
TCA_CHAIN = 0xb
|
||||
TCA_HW_OFFLOAD = 0xc
|
||||
TCA_INGRESS_BLOCK = 0xd
|
||||
TCA_EGRESS_BLOCK = 0xe
|
||||
TCA_DUMP_FLAGS = 0xf
|
||||
TCA_EXT_WARN_MSG = 0x10
|
||||
RTNLGRP_NONE = 0x0
|
||||
RTNLGRP_LINK = 0x1
|
||||
RTNLGRP_NOTIFY = 0x2
|
||||
@ -3075,6 +3115,18 @@ const (
|
||||
RTNLGRP_IPV6_MROUTE_R = 0x1f
|
||||
RTNLGRP_NEXTHOP = 0x20
|
||||
RTNLGRP_BRVLAN = 0x21
|
||||
RTNLGRP_MCTP_IFADDR = 0x22
|
||||
RTNLGRP_TUNNEL = 0x23
|
||||
RTNLGRP_STATS = 0x24
|
||||
RTNLGRP_IPV4_MCADDR = 0x25
|
||||
RTNLGRP_IPV6_MCADDR = 0x26
|
||||
RTNLGRP_IPV6_ACADDR = 0x27
|
||||
TCA_ROOT_UNSPEC = 0x0
|
||||
TCA_ROOT_TAB = 0x1
|
||||
TCA_ROOT_FLAGS = 0x2
|
||||
TCA_ROOT_COUNT = 0x3
|
||||
TCA_ROOT_TIME_DELTA = 0x4
|
||||
TCA_ROOT_EXT_WARN_MSG = 0x5
|
||||
)
|
||||
|
||||
type CapUserHeader struct {
|
||||
@ -3802,7 +3854,16 @@ const (
|
||||
ETHTOOL_MSG_PSE_GET = 0x24
|
||||
ETHTOOL_MSG_PSE_SET = 0x25
|
||||
ETHTOOL_MSG_RSS_GET = 0x26
|
||||
ETHTOOL_MSG_USER_MAX = 0x2d
|
||||
ETHTOOL_MSG_PLCA_GET_CFG = 0x27
|
||||
ETHTOOL_MSG_PLCA_SET_CFG = 0x28
|
||||
ETHTOOL_MSG_PLCA_GET_STATUS = 0x29
|
||||
ETHTOOL_MSG_MM_GET = 0x2a
|
||||
ETHTOOL_MSG_MM_SET = 0x2b
|
||||
ETHTOOL_MSG_MODULE_FW_FLASH_ACT = 0x2c
|
||||
ETHTOOL_MSG_PHY_GET = 0x2d
|
||||
ETHTOOL_MSG_TSCONFIG_GET = 0x2e
|
||||
ETHTOOL_MSG_TSCONFIG_SET = 0x2f
|
||||
ETHTOOL_MSG_USER_MAX = 0x2f
|
||||
ETHTOOL_MSG_KERNEL_NONE = 0x0
|
||||
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
|
||||
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
|
||||
@ -3842,7 +3903,17 @@ const (
|
||||
ETHTOOL_MSG_MODULE_NTF = 0x24
|
||||
ETHTOOL_MSG_PSE_GET_REPLY = 0x25
|
||||
ETHTOOL_MSG_RSS_GET_REPLY = 0x26
|
||||
ETHTOOL_MSG_KERNEL_MAX = 0x2e
|
||||
ETHTOOL_MSG_PLCA_GET_CFG_REPLY = 0x27
|
||||
ETHTOOL_MSG_PLCA_GET_STATUS_REPLY = 0x28
|
||||
ETHTOOL_MSG_PLCA_NTF = 0x29
|
||||
ETHTOOL_MSG_MM_GET_REPLY = 0x2a
|
||||
ETHTOOL_MSG_MM_NTF = 0x2b
|
||||
ETHTOOL_MSG_MODULE_FW_FLASH_NTF = 0x2c
|
||||
ETHTOOL_MSG_PHY_GET_REPLY = 0x2d
|
||||
ETHTOOL_MSG_PHY_NTF = 0x2e
|
||||
ETHTOOL_MSG_TSCONFIG_GET_REPLY = 0x2f
|
||||
ETHTOOL_MSG_TSCONFIG_SET_REPLY = 0x30
|
||||
ETHTOOL_MSG_KERNEL_MAX = 0x30
|
||||
ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
|
||||
ETHTOOL_FLAG_OMIT_REPLY = 0x2
|
||||
ETHTOOL_FLAG_STATS = 0x4
|
||||
@ -3949,7 +4020,12 @@ const (
|
||||
ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb
|
||||
ETHTOOL_A_RINGS_CQE_SIZE = 0xc
|
||||
ETHTOOL_A_RINGS_TX_PUSH = 0xd
|
||||
ETHTOOL_A_RINGS_MAX = 0x10
|
||||
ETHTOOL_A_RINGS_RX_PUSH = 0xe
|
||||
ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN = 0xf
|
||||
ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX = 0x10
|
||||
ETHTOOL_A_RINGS_HDS_THRESH = 0x11
|
||||
ETHTOOL_A_RINGS_HDS_THRESH_MAX = 0x12
|
||||
ETHTOOL_A_RINGS_MAX = 0x12
|
||||
ETHTOOL_A_CHANNELS_UNSPEC = 0x0
|
||||
ETHTOOL_A_CHANNELS_HEADER = 0x1
|
||||
ETHTOOL_A_CHANNELS_RX_MAX = 0x2
|
||||
@ -4015,7 +4091,9 @@ const (
|
||||
ETHTOOL_A_TSINFO_TX_TYPES = 0x3
|
||||
ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
|
||||
ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
|
||||
ETHTOOL_A_TSINFO_MAX = 0x6
|
||||
ETHTOOL_A_TSINFO_STATS = 0x6
|
||||
ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER = 0x7
|
||||
ETHTOOL_A_TSINFO_MAX = 0x9
|
||||
ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
|
||||
ETHTOOL_A_CABLE_TEST_HEADER = 0x1
|
||||
ETHTOOL_A_CABLE_TEST_MAX = 0x1
|
||||
@ -4101,6 +4179,19 @@ const (
|
||||
ETHTOOL_A_TUNNEL_INFO_MAX = 0x2
|
||||
)
|
||||
|
||||
const (
|
||||
TCP_V4_FLOW = 0x1
|
||||
UDP_V4_FLOW = 0x2
|
||||
TCP_V6_FLOW = 0x5
|
||||
UDP_V6_FLOW = 0x6
|
||||
ESP_V4_FLOW = 0xa
|
||||
ESP_V6_FLOW = 0xc
|
||||
IP_USER_FLOW = 0xd
|
||||
IPV6_USER_FLOW = 0xe
|
||||
IPV6_FLOW = 0x11
|
||||
ETHER_FLOW = 0x12
|
||||
)
|
||||
|
||||
const SPEED_UNKNOWN = -0x1
|
||||
|
||||
type EthtoolDrvinfo struct {
|
||||
@ -4613,6 +4704,7 @@ const (
|
||||
NL80211_ATTR_AKM_SUITES = 0x4c
|
||||
NL80211_ATTR_AP_ISOLATE = 0x60
|
||||
NL80211_ATTR_AP_SETTINGS_FLAGS = 0x135
|
||||
NL80211_ATTR_ASSOC_SPP_AMSDU = 0x14a
|
||||
NL80211_ATTR_AUTH_DATA = 0x9c
|
||||
NL80211_ATTR_AUTH_TYPE = 0x35
|
||||
NL80211_ATTR_BANDS = 0xef
|
||||
@ -4623,6 +4715,7 @@ const (
|
||||
NL80211_ATTR_BSS_BASIC_RATES = 0x24
|
||||
NL80211_ATTR_BSS = 0x2f
|
||||
NL80211_ATTR_BSS_CTS_PROT = 0x1c
|
||||
NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA = 0x147
|
||||
NL80211_ATTR_BSS_HT_OPMODE = 0x6d
|
||||
NL80211_ATTR_BSSID = 0xf5
|
||||
NL80211_ATTR_BSS_SELECT = 0xe3
|
||||
@ -4682,6 +4775,7 @@ const (
|
||||
NL80211_ATTR_DTIM_PERIOD = 0xd
|
||||
NL80211_ATTR_DURATION = 0x57
|
||||
NL80211_ATTR_EHT_CAPABILITY = 0x136
|
||||
NL80211_ATTR_EMA_RNR_ELEMS = 0x145
|
||||
NL80211_ATTR_EML_CAPABILITY = 0x13d
|
||||
NL80211_ATTR_EXT_CAPA = 0xa9
|
||||
NL80211_ATTR_EXT_CAPA_MASK = 0xaa
|
||||
@ -4717,6 +4811,7 @@ const (
|
||||
NL80211_ATTR_HIDDEN_SSID = 0x7e
|
||||
NL80211_ATTR_HT_CAPABILITY = 0x1f
|
||||
NL80211_ATTR_HT_CAPABILITY_MASK = 0x94
|
||||
NL80211_ATTR_HW_TIMESTAMP_ENABLED = 0x144
|
||||
NL80211_ATTR_IE_ASSOC_RESP = 0x80
|
||||
NL80211_ATTR_IE = 0x2a
|
||||
NL80211_ATTR_IE_PROBE_RESP = 0x7f
|
||||
@ -4747,9 +4842,10 @@ const (
|
||||
NL80211_ATTR_MAC_HINT = 0xc8
|
||||
NL80211_ATTR_MAC_MASK = 0xd7
|
||||
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
|
||||
NL80211_ATTR_MAX = 0x14d
|
||||
NL80211_ATTR_MAX = 0x151
|
||||
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
|
||||
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
|
||||
NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143
|
||||
NL80211_ATTR_MAX_MATCH_SETS = 0x85
|
||||
NL80211_ATTR_MAX_NUM_AKM_SUITES = 0x13c
|
||||
NL80211_ATTR_MAX_NUM_PMKIDS = 0x56
|
||||
@ -4774,9 +4870,12 @@ const (
|
||||
NL80211_ATTR_MGMT_SUBTYPE = 0x29
|
||||
NL80211_ATTR_MLD_ADDR = 0x13a
|
||||
NL80211_ATTR_MLD_CAPA_AND_OPS = 0x13e
|
||||
NL80211_ATTR_MLO_LINK_DISABLED = 0x146
|
||||
NL80211_ATTR_MLO_LINK_ID = 0x139
|
||||
NL80211_ATTR_MLO_LINKS = 0x138
|
||||
NL80211_ATTR_MLO_SUPPORT = 0x13b
|
||||
NL80211_ATTR_MLO_TTLM_DLINK = 0x148
|
||||
NL80211_ATTR_MLO_TTLM_ULINK = 0x149
|
||||
NL80211_ATTR_MNTR_FLAGS = 0x17
|
||||
NL80211_ATTR_MPATH_INFO = 0x1b
|
||||
NL80211_ATTR_MPATH_NEXT_HOP = 0x1a
|
||||
@ -4809,12 +4908,14 @@ const (
|
||||
NL80211_ATTR_PORT_AUTHORIZED = 0x103
|
||||
NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN = 0x5
|
||||
NL80211_ATTR_POWER_RULE_MAX_EIRP = 0x6
|
||||
NL80211_ATTR_POWER_RULE_PSD = 0x8
|
||||
NL80211_ATTR_PREV_BSSID = 0x4f
|
||||
NL80211_ATTR_PRIVACY = 0x46
|
||||
NL80211_ATTR_PROBE_RESP = 0x91
|
||||
NL80211_ATTR_PROBE_RESP_OFFLOAD = 0x90
|
||||
NL80211_ATTR_PROTOCOL_FEATURES = 0xad
|
||||
NL80211_ATTR_PS_STATE = 0x5d
|
||||
NL80211_ATTR_PUNCT_BITMAP = 0x142
|
||||
NL80211_ATTR_QOS_MAP = 0xc7
|
||||
NL80211_ATTR_RADAR_BACKGROUND = 0x134
|
||||
NL80211_ATTR_RADAR_EVENT = 0xa8
|
||||
@ -4943,7 +5044,9 @@ const (
|
||||
NL80211_ATTR_WIPHY_FREQ = 0x26
|
||||
NL80211_ATTR_WIPHY_FREQ_HINT = 0xc9
|
||||
NL80211_ATTR_WIPHY_FREQ_OFFSET = 0x122
|
||||
NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS = 0x14c
|
||||
NL80211_ATTR_WIPHY_NAME = 0x2
|
||||
NL80211_ATTR_WIPHY_RADIOS = 0x14b
|
||||
NL80211_ATTR_WIPHY_RETRY_LONG = 0x3e
|
||||
NL80211_ATTR_WIPHY_RETRY_SHORT = 0x3d
|
||||
NL80211_ATTR_WIPHY_RTS_THRESHOLD = 0x40
|
||||
@ -4978,6 +5081,8 @@ const (
|
||||
NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
|
||||
NL80211_BAND_ATTR_MAX = 0xd
|
||||
NL80211_BAND_ATTR_RATES = 0x2
|
||||
NL80211_BAND_ATTR_S1G_CAPA = 0xd
|
||||
NL80211_BAND_ATTR_S1G_MCS_NSS_SET = 0xc
|
||||
NL80211_BAND_ATTR_VHT_CAPA = 0x8
|
||||
NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
|
||||
NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC = 0x8
|
||||
@ -5001,6 +5106,10 @@ const (
|
||||
NL80211_BSS_BEACON_INTERVAL = 0x4
|
||||
NL80211_BSS_BEACON_TSF = 0xd
|
||||
NL80211_BSS_BSSID = 0x1
|
||||
NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH = 0x2
|
||||
NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY = 0x1
|
||||
NL80211_BSS_CANNOT_USE_REASONS = 0x18
|
||||
NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH = 0x2
|
||||
NL80211_BSS_CAPABILITY = 0x5
|
||||
NL80211_BSS_CHAIN_SIGNAL = 0x13
|
||||
NL80211_BSS_CHAN_WIDTH_10 = 0x1
|
||||
@ -5032,6 +5141,9 @@ const (
|
||||
NL80211_BSS_STATUS = 0x9
|
||||
NL80211_BSS_STATUS_IBSS_JOINED = 0x2
|
||||
NL80211_BSS_TSF = 0x3
|
||||
NL80211_BSS_USE_FOR = 0x17
|
||||
NL80211_BSS_USE_FOR_MLD_LINK = 0x2
|
||||
NL80211_BSS_USE_FOR_NORMAL = 0x1
|
||||
NL80211_CHAN_HT20 = 0x1
|
||||
NL80211_CHAN_HT40MINUS = 0x2
|
||||
NL80211_CHAN_HT40PLUS = 0x3
|
||||
@ -5117,7 +5229,8 @@ const (
|
||||
NL80211_CMD_LEAVE_IBSS = 0x2c
|
||||
NL80211_CMD_LEAVE_MESH = 0x45
|
||||
NL80211_CMD_LEAVE_OCB = 0x6d
|
||||
NL80211_CMD_MAX = 0x9b
|
||||
NL80211_CMD_LINKS_REMOVED = 0x9a
|
||||
NL80211_CMD_MAX = 0x9d
|
||||
NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
|
||||
NL80211_CMD_MODIFY_LINK_STA = 0x97
|
||||
NL80211_CMD_NAN_MATCH = 0x78
|
||||
@ -5161,6 +5274,7 @@ const (
|
||||
NL80211_CMD_SET_COALESCE = 0x65
|
||||
NL80211_CMD_SET_CQM = 0x3f
|
||||
NL80211_CMD_SET_FILS_AAD = 0x92
|
||||
NL80211_CMD_SET_HW_TIMESTAMP = 0x99
|
||||
NL80211_CMD_SET_INTERFACE = 0x6
|
||||
NL80211_CMD_SET_KEY = 0xa
|
||||
NL80211_CMD_SET_MAC_ACL = 0x5d
|
||||
@ -5180,6 +5294,7 @@ const (
|
||||
NL80211_CMD_SET_SAR_SPECS = 0x8c
|
||||
NL80211_CMD_SET_STATION = 0x12
|
||||
NL80211_CMD_SET_TID_CONFIG = 0x89
|
||||
NL80211_CMD_SET_TID_TO_LINK_MAPPING = 0x9b
|
||||
NL80211_CMD_SET_TX_BITRATE_MASK = 0x39
|
||||
NL80211_CMD_SET_WDS_PEER = 0x42
|
||||
NL80211_CMD_SET_WIPHY = 0x2
|
||||
@ -5247,6 +5362,7 @@ const (
|
||||
NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 0x21
|
||||
NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 0x22
|
||||
NL80211_EXT_FEATURE_AQL = 0x28
|
||||
NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA = 0x40
|
||||
NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 0x2e
|
||||
NL80211_EXT_FEATURE_BEACON_PROTECTION = 0x29
|
||||
NL80211_EXT_FEATURE_BEACON_RATE_HE = 0x36
|
||||
@ -5262,6 +5378,7 @@ const (
|
||||
NL80211_EXT_FEATURE_CQM_RSSI_LIST = 0xd
|
||||
NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 0x1b
|
||||
NL80211_EXT_FEATURE_DEL_IBSS_STA = 0x2c
|
||||
NL80211_EXT_FEATURE_DFS_CONCURRENT = 0x43
|
||||
NL80211_EXT_FEATURE_DFS_OFFLOAD = 0x19
|
||||
NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 0x20
|
||||
NL80211_EXT_FEATURE_EXT_KEY_ID = 0x24
|
||||
@ -5281,9 +5398,12 @@ const (
|
||||
NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x14
|
||||
NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 0x13
|
||||
NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 0x31
|
||||
NL80211_EXT_FEATURE_OWE_OFFLOAD_AP = 0x42
|
||||
NL80211_EXT_FEATURE_OWE_OFFLOAD = 0x41
|
||||
NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE = 0x3d
|
||||
NL80211_EXT_FEATURE_PROTECTED_TWT = 0x2b
|
||||
NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE = 0x39
|
||||
NL80211_EXT_FEATURE_PUNCT = 0x3e
|
||||
NL80211_EXT_FEATURE_RADAR_BACKGROUND = 0x3c
|
||||
NL80211_EXT_FEATURE_RRM = 0x1
|
||||
NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 0x33
|
||||
@ -5295,8 +5415,10 @@ const (
|
||||
NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23
|
||||
NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 0xc
|
||||
NL80211_EXT_FEATURE_SECURE_LTF = 0x37
|
||||
NL80211_EXT_FEATURE_SECURE_NAN = 0x3f
|
||||
NL80211_EXT_FEATURE_SECURE_RTT = 0x38
|
||||
NL80211_EXT_FEATURE_SET_SCAN_DWELL = 0x5
|
||||
NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT = 0x44
|
||||
NL80211_EXT_FEATURE_STA_TX_PWR = 0x25
|
||||
NL80211_EXT_FEATURE_TXQS = 0x1c
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 0x35
|
||||
@ -5343,7 +5465,10 @@ const (
|
||||
NL80211_FREQUENCY_ATTR_2MHZ = 0x16
|
||||
NL80211_FREQUENCY_ATTR_4MHZ = 0x17
|
||||
NL80211_FREQUENCY_ATTR_8MHZ = 0x18
|
||||
NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP = 0x21
|
||||
NL80211_FREQUENCY_ATTR_CAN_MONITOR = 0x20
|
||||
NL80211_FREQUENCY_ATTR_DFS_CAC_TIME = 0xd
|
||||
NL80211_FREQUENCY_ATTR_DFS_CONCURRENT = 0x1d
|
||||
NL80211_FREQUENCY_ATTR_DFS_STATE = 0x7
|
||||
NL80211_FREQUENCY_ATTR_DFS_TIME = 0x8
|
||||
NL80211_FREQUENCY_ATTR_DISABLED = 0x2
|
||||
@ -5351,12 +5476,14 @@ const (
|
||||
NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf
|
||||
NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe
|
||||
NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf
|
||||
NL80211_FREQUENCY_ATTR_MAX = 0x21
|
||||
NL80211_FREQUENCY_ATTR_MAX = 0x22
|
||||
NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6
|
||||
NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11
|
||||
NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
|
||||
NL80211_FREQUENCY_ATTR_NO_20MHZ = 0x10
|
||||
NL80211_FREQUENCY_ATTR_NO_320MHZ = 0x1a
|
||||
NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT = 0x1f
|
||||
NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT = 0x1e
|
||||
NL80211_FREQUENCY_ATTR_NO_80MHZ = 0xb
|
||||
NL80211_FREQUENCY_ATTR_NO_EHT = 0x1b
|
||||
NL80211_FREQUENCY_ATTR_NO_HE = 0x13
|
||||
@ -5364,8 +5491,11 @@ const (
|
||||
NL80211_FREQUENCY_ATTR_NO_HT40_PLUS = 0xa
|
||||
NL80211_FREQUENCY_ATTR_NO_IBSS = 0x3
|
||||
NL80211_FREQUENCY_ATTR_NO_IR = 0x3
|
||||
NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT = 0x1f
|
||||
NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT = 0x1e
|
||||
NL80211_FREQUENCY_ATTR_OFFSET = 0x14
|
||||
NL80211_FREQUENCY_ATTR_PASSIVE_SCAN = 0x3
|
||||
NL80211_FREQUENCY_ATTR_PSD = 0x1c
|
||||
NL80211_FREQUENCY_ATTR_RADAR = 0x5
|
||||
NL80211_FREQUENCY_ATTR_WMM = 0x12
|
||||
NL80211_FTM_RESP_ATTR_CIVICLOC = 0x3
|
||||
@ -5430,6 +5560,7 @@ const (
|
||||
NL80211_IFTYPE_STATION = 0x2
|
||||
NL80211_IFTYPE_UNSPECIFIED = 0x0
|
||||
NL80211_IFTYPE_WDS = 0x5
|
||||
NL80211_KCK_EXT_LEN_32 = 0x20
|
||||
NL80211_KCK_EXT_LEN = 0x18
|
||||
NL80211_KCK_LEN = 0x10
|
||||
NL80211_KEK_EXT_LEN = 0x20
|
||||
@ -5458,9 +5589,10 @@ const (
|
||||
NL80211_MAX_SUPP_HT_RATES = 0x4d
|
||||
NL80211_MAX_SUPP_RATES = 0x20
|
||||
NL80211_MAX_SUPP_REG_RULES = 0x80
|
||||
NL80211_MAX_SUPP_SELECTORS = 0x80
|
||||
NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5
|
||||
NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3
|
||||
NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5
|
||||
NL80211_MBSSID_CONFIG_ATTR_MAX = 0x6
|
||||
NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY = 0x2
|
||||
NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES = 0x1
|
||||
NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX = 0x4
|
||||
@ -5703,11 +5835,16 @@ const (
|
||||
NL80211_RADAR_PRE_CAC_EXPIRED = 0x4
|
||||
NL80211_RATE_INFO_10_MHZ_WIDTH = 0xb
|
||||
NL80211_RATE_INFO_160_MHZ_WIDTH = 0xa
|
||||
NL80211_RATE_INFO_16_MHZ_WIDTH = 0x1d
|
||||
NL80211_RATE_INFO_1_MHZ_WIDTH = 0x19
|
||||
NL80211_RATE_INFO_2_MHZ_WIDTH = 0x1a
|
||||
NL80211_RATE_INFO_320_MHZ_WIDTH = 0x12
|
||||
NL80211_RATE_INFO_40_MHZ_WIDTH = 0x3
|
||||
NL80211_RATE_INFO_4_MHZ_WIDTH = 0x1b
|
||||
NL80211_RATE_INFO_5_MHZ_WIDTH = 0xc
|
||||
NL80211_RATE_INFO_80_MHZ_WIDTH = 0x8
|
||||
NL80211_RATE_INFO_80P80_MHZ_WIDTH = 0x9
|
||||
NL80211_RATE_INFO_8_MHZ_WIDTH = 0x1c
|
||||
NL80211_RATE_INFO_BITRATE32 = 0x5
|
||||
NL80211_RATE_INFO_BITRATE = 0x1
|
||||
NL80211_RATE_INFO_EHT_GI_0_8 = 0x0
|
||||
@ -5753,6 +5890,8 @@ const (
|
||||
NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
|
||||
NL80211_RATE_INFO_MAX = 0x1d
|
||||
NL80211_RATE_INFO_MCS = 0x2
|
||||
NL80211_RATE_INFO_S1G_MCS = 0x17
|
||||
NL80211_RATE_INFO_S1G_NSS = 0x18
|
||||
NL80211_RATE_INFO_SHORT_GI = 0x4
|
||||
NL80211_RATE_INFO_VHT_MCS = 0x6
|
||||
NL80211_RATE_INFO_VHT_NSS = 0x7
|
||||
@ -5770,14 +5909,19 @@ const (
|
||||
NL80211_REKEY_DATA_KEK = 0x1
|
||||
NL80211_REKEY_DATA_REPLAY_CTR = 0x3
|
||||
NL80211_REPLAY_CTR_LEN = 0x8
|
||||
NL80211_RRF_ALLOW_6GHZ_VLP_AP = 0x1000000
|
||||
NL80211_RRF_AUTO_BW = 0x800
|
||||
NL80211_RRF_DFS = 0x10
|
||||
NL80211_RRF_DFS_CONCURRENT = 0x200000
|
||||
NL80211_RRF_GO_CONCURRENT = 0x1000
|
||||
NL80211_RRF_IR_CONCURRENT = 0x1000
|
||||
NL80211_RRF_NO_160MHZ = 0x10000
|
||||
NL80211_RRF_NO_320MHZ = 0x40000
|
||||
NL80211_RRF_NO_6GHZ_AFC_CLIENT = 0x800000
|
||||
NL80211_RRF_NO_6GHZ_VLP_CLIENT = 0x400000
|
||||
NL80211_RRF_NO_80MHZ = 0x8000
|
||||
NL80211_RRF_NO_CCK = 0x2
|
||||
NL80211_RRF_NO_EHT = 0x80000
|
||||
NL80211_RRF_NO_HE = 0x20000
|
||||
NL80211_RRF_NO_HT40 = 0x6000
|
||||
NL80211_RRF_NO_HT40MINUS = 0x2000
|
||||
@ -5788,7 +5932,10 @@ const (
|
||||
NL80211_RRF_NO_IR = 0x80
|
||||
NL80211_RRF_NO_OFDM = 0x1
|
||||
NL80211_RRF_NO_OUTDOOR = 0x8
|
||||
NL80211_RRF_NO_UHB_AFC_CLIENT = 0x800000
|
||||
NL80211_RRF_NO_UHB_VLP_CLIENT = 0x400000
|
||||
NL80211_RRF_PASSIVE_SCAN = 0x80
|
||||
NL80211_RRF_PSD = 0x100000
|
||||
NL80211_RRF_PTMP_ONLY = 0x40
|
||||
NL80211_RRF_PTP_ONLY = 0x20
|
||||
NL80211_RXMGMT_FLAG_ANSWERED = 0x1
|
||||
@ -5849,6 +5996,7 @@ const (
|
||||
NL80211_STA_FLAG_MAX_OLD_API = 0x6
|
||||
NL80211_STA_FLAG_MFP = 0x4
|
||||
NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
|
||||
NL80211_STA_FLAG_SPP_AMSDU = 0x8
|
||||
NL80211_STA_FLAG_TDLS_PEER = 0x6
|
||||
NL80211_STA_FLAG_WME = 0x3
|
||||
NL80211_STA_INFO_ACK_SIGNAL_AVG = 0x23
|
||||
@ -6007,6 +6155,13 @@ const (
|
||||
NL80211_VHT_CAPABILITY_LEN = 0xc
|
||||
NL80211_VHT_NSS_MAX = 0x8
|
||||
NL80211_WIPHY_NAME_MAXLEN = 0x40
|
||||
NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE = 0x2
|
||||
NL80211_WIPHY_RADIO_ATTR_INDEX = 0x1
|
||||
NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION = 0x3
|
||||
NL80211_WIPHY_RADIO_ATTR_MAX = 0x4
|
||||
NL80211_WIPHY_RADIO_FREQ_ATTR_END = 0x2
|
||||
NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = 0x2
|
||||
NL80211_WIPHY_RADIO_FREQ_ATTR_START = 0x1
|
||||
NL80211_WMMR_AIFSN = 0x3
|
||||
NL80211_WMMR_CW_MAX = 0x2
|
||||
NL80211_WMMR_CW_MIN = 0x1
|
||||
@ -6038,6 +6193,7 @@ const (
|
||||
NL80211_WOWLAN_TRIG_PKT_PATTERN = 0x4
|
||||
NL80211_WOWLAN_TRIG_RFKILL_RELEASE = 0x9
|
||||
NL80211_WOWLAN_TRIG_TCP_CONNECTION = 0xe
|
||||
NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC = 0x14
|
||||
NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 = 0xa
|
||||
NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN = 0xb
|
||||
NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 = 0xc
|
||||
|
||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
@ -282,7 +282,7 @@ type Taskstats struct {
|
||||
Ac_exitcode uint32
|
||||
Ac_flag uint8
|
||||
Ac_nice uint8
|
||||
_ [4]byte
|
||||
_ [6]byte
|
||||
Cpu_count uint64
|
||||
Cpu_delay_total uint64
|
||||
Blkio_count uint64
|
||||
@ -338,6 +338,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
@ -351,6 +351,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
20
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
20
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
@ -91,7 +91,7 @@ type Stat_t struct {
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
_ uint16
|
||||
_ [4]byte
|
||||
_ [6]byte
|
||||
Size int64
|
||||
Blksize int32
|
||||
_ [4]byte
|
||||
@ -273,7 +273,7 @@ type Taskstats struct {
|
||||
Ac_exitcode uint32
|
||||
Ac_flag uint8
|
||||
Ac_nice uint8
|
||||
_ [4]byte
|
||||
_ [6]byte
|
||||
Cpu_count uint64
|
||||
Cpu_delay_total uint64
|
||||
Blkio_count uint64
|
||||
@ -329,6 +329,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
@ -330,6 +330,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
generated
vendored
@ -331,6 +331,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
@ -278,7 +278,7 @@ type Taskstats struct {
|
||||
Ac_exitcode uint32
|
||||
Ac_flag uint8
|
||||
Ac_nice uint8
|
||||
_ [4]byte
|
||||
_ [6]byte
|
||||
Cpu_count uint64
|
||||
Cpu_delay_total uint64
|
||||
Blkio_count uint64
|
||||
@ -334,6 +334,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
@ -333,6 +333,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
@ -333,6 +333,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
@ -278,7 +278,7 @@ type Taskstats struct {
|
||||
Ac_exitcode uint32
|
||||
Ac_flag uint8
|
||||
Ac_nice uint8
|
||||
_ [4]byte
|
||||
_ [6]byte
|
||||
Cpu_count uint64
|
||||
Cpu_delay_total uint64
|
||||
Blkio_count uint64
|
||||
@ -334,6 +334,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
||||
20
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
generated
vendored
20
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
generated
vendored
@ -90,7 +90,7 @@ type Stat_t struct {
|
||||
Gid uint32
|
||||
Rdev uint64
|
||||
_ uint16
|
||||
_ [4]byte
|
||||
_ [6]byte
|
||||
Size int64
|
||||
Blksize int32
|
||||
_ [4]byte
|
||||
@ -285,7 +285,7 @@ type Taskstats struct {
|
||||
Ac_exitcode uint32
|
||||
Ac_flag uint8
|
||||
Ac_nice uint8
|
||||
_ [4]byte
|
||||
_ [6]byte
|
||||
Cpu_count uint64
|
||||
Cpu_delay_total uint64
|
||||
Blkio_count uint64
|
||||
@ -341,6 +341,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint32
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
@ -340,6 +340,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
@ -340,6 +340,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
@ -358,6 +358,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
@ -353,6 +353,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
16
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
16
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
@ -335,6 +335,22 @@ type Taskstats struct {
|
||||
Wpcopy_delay_total uint64
|
||||
Irq_count uint64
|
||||
Irq_delay_total uint64
|
||||
Cpu_delay_max uint64
|
||||
Cpu_delay_min uint64
|
||||
Blkio_delay_max uint64
|
||||
Blkio_delay_min uint64
|
||||
Swapin_delay_max uint64
|
||||
Swapin_delay_min uint64
|
||||
Freepages_delay_max uint64
|
||||
Freepages_delay_min uint64
|
||||
Thrashing_delay_max uint64
|
||||
Thrashing_delay_min uint64
|
||||
Compact_delay_max uint64
|
||||
Compact_delay_min uint64
|
||||
Wpcopy_delay_max uint64
|
||||
Wpcopy_delay_min uint64
|
||||
Irq_delay_max uint64
|
||||
Irq_delay_min uint64
|
||||
}
|
||||
|
||||
type cpuMask uint64
|
||||
|
||||
13
vendor/golang.org/x/sys/windows/registry/key.go
generated
vendored
13
vendor/golang.org/x/sys/windows/registry/key.go
generated
vendored
@ -164,7 +164,12 @@ loopItems:
|
||||
func CreateKey(k Key, path string, access uint32) (newk Key, openedExisting bool, err error) {
|
||||
var h syscall.Handle
|
||||
var d uint32
|
||||
err = regCreateKeyEx(syscall.Handle(k), syscall.StringToUTF16Ptr(path),
|
||||
var pathPointer *uint16
|
||||
pathPointer, err = syscall.UTF16PtrFromString(path)
|
||||
if err != nil {
|
||||
return 0, false, err
|
||||
}
|
||||
err = regCreateKeyEx(syscall.Handle(k), pathPointer,
|
||||
0, nil, _REG_OPTION_NON_VOLATILE, access, nil, &h, &d)
|
||||
if err != nil {
|
||||
return 0, false, err
|
||||
@ -174,7 +179,11 @@ func CreateKey(k Key, path string, access uint32) (newk Key, openedExisting bool
|
||||
|
||||
// DeleteKey deletes the subkey path of key k and its values.
|
||||
func DeleteKey(k Key, path string) error {
|
||||
return regDeleteKey(syscall.Handle(k), syscall.StringToUTF16Ptr(path))
|
||||
pathPointer, err := syscall.UTF16PtrFromString(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return regDeleteKey(syscall.Handle(k), pathPointer)
|
||||
}
|
||||
|
||||
// A KeyInfo describes the statistics of a key. It is returned by Stat.
|
||||
|
||||
6
vendor/golang.org/x/sys/windows/registry/value.go
generated
vendored
6
vendor/golang.org/x/sys/windows/registry/value.go
generated
vendored
@ -340,7 +340,11 @@ func (k Key) SetBinaryValue(name string, value []byte) error {
|
||||
|
||||
// DeleteValue removes a named value from the key k.
|
||||
func (k Key) DeleteValue(name string) error {
|
||||
return regDeleteValue(syscall.Handle(k), syscall.StringToUTF16Ptr(name))
|
||||
namePointer, err := syscall.UTF16PtrFromString(name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return regDeleteValue(syscall.Handle(k), namePointer)
|
||||
}
|
||||
|
||||
// ReadValueNames returns the value names of key k.
|
||||
|
||||
16
vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
generated
vendored
16
vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
generated
vendored
@ -52,7 +52,7 @@ var (
|
||||
)
|
||||
|
||||
func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall(procRegConnectRegistryW.Addr(), 3, uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result)))
|
||||
r0, _, _ := syscall.SyscallN(procRegConnectRegistryW.Addr(), uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result)))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
@ -60,7 +60,7 @@ func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall
|
||||
}
|
||||
|
||||
func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
|
||||
r0, _, _ := syscall.SyscallN(procRegCreateKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
@ -68,7 +68,7 @@ func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *
|
||||
}
|
||||
|
||||
func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0)
|
||||
r0, _, _ := syscall.SyscallN(procRegDeleteKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
@ -76,7 +76,7 @@ func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
|
||||
}
|
||||
|
||||
func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0)
|
||||
r0, _, _ := syscall.SyscallN(procRegDeleteValueW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
@ -84,7 +84,7 @@ func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
|
||||
}
|
||||
|
||||
func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0)
|
||||
r0, _, _ := syscall.SyscallN(procRegEnumValueW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
@ -92,7 +92,7 @@ func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint3
|
||||
}
|
||||
|
||||
func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall9(procRegLoadMUIStringW.Addr(), 7, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)), 0, 0)
|
||||
r0, _, _ := syscall.SyscallN(procRegLoadMUIStringW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
@ -100,7 +100,7 @@ func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint
|
||||
}
|
||||
|
||||
func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) {
|
||||
r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize))
|
||||
r0, _, _ := syscall.SyscallN(procRegSetValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize))
|
||||
if r0 != 0 {
|
||||
regerrno = syscall.Errno(r0)
|
||||
}
|
||||
@ -108,7 +108,7 @@ func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype
|
||||
}
|
||||
|
||||
func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
|
||||
r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
|
||||
r0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
|
||||
n = uint32(r0)
|
||||
if n == 0 {
|
||||
err = errnoErr(e1)
|
||||
|
||||
49
vendor/golang.org/x/sys/windows/security_windows.go
generated
vendored
49
vendor/golang.org/x/sys/windows/security_windows.go
generated
vendored
@ -1303,7 +1303,10 @@ func (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DE
|
||||
return nil, err
|
||||
}
|
||||
if absoluteSDSize > 0 {
|
||||
absoluteSD = (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&make([]byte, absoluteSDSize)[0]))
|
||||
absoluteSD = new(SECURITY_DESCRIPTOR)
|
||||
if unsafe.Sizeof(*absoluteSD) < uintptr(absoluteSDSize) {
|
||||
panic("sizeof(SECURITY_DESCRIPTOR) too small")
|
||||
}
|
||||
}
|
||||
var (
|
||||
dacl *ACL
|
||||
@ -1312,19 +1315,55 @@ func (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DE
|
||||
group *SID
|
||||
)
|
||||
if daclSize > 0 {
|
||||
dacl = (*ACL)(unsafe.Pointer(&make([]byte, daclSize)[0]))
|
||||
dacl = (*ACL)(unsafe.Pointer(unsafe.SliceData(make([]byte, daclSize))))
|
||||
}
|
||||
if saclSize > 0 {
|
||||
sacl = (*ACL)(unsafe.Pointer(&make([]byte, saclSize)[0]))
|
||||
sacl = (*ACL)(unsafe.Pointer(unsafe.SliceData(make([]byte, saclSize))))
|
||||
}
|
||||
if ownerSize > 0 {
|
||||
owner = (*SID)(unsafe.Pointer(&make([]byte, ownerSize)[0]))
|
||||
owner = (*SID)(unsafe.Pointer(unsafe.SliceData(make([]byte, ownerSize))))
|
||||
}
|
||||
if groupSize > 0 {
|
||||
group = (*SID)(unsafe.Pointer(&make([]byte, groupSize)[0]))
|
||||
group = (*SID)(unsafe.Pointer(unsafe.SliceData(make([]byte, groupSize))))
|
||||
}
|
||||
// We call into Windows via makeAbsoluteSD, which sets up
|
||||
// pointers within absoluteSD that point to other chunks of memory
|
||||
// we pass into makeAbsoluteSD, and that happens outside the view of the GC.
|
||||
// We therefore take some care here to then verify the pointers are as we expect
|
||||
// and set them explicitly in view of the GC. See https://go.dev/issue/73199.
|
||||
// TODO: consider weak pointers once Go 1.24 is appropriate. See suggestion in https://go.dev/cl/663575.
|
||||
err = makeAbsoluteSD(selfRelativeSD, absoluteSD, &absoluteSDSize,
|
||||
dacl, &daclSize, sacl, &saclSize, owner, &ownerSize, group, &groupSize)
|
||||
if err != nil {
|
||||
// Don't return absoluteSD, which might be partially initialized.
|
||||
return nil, err
|
||||
}
|
||||
// Before using any fields, verify absoluteSD is in the format we expect according to Windows.
|
||||
// See https://learn.microsoft.com/en-us/windows/win32/secauthz/absolute-and-self-relative-security-descriptors
|
||||
absControl, _, err := absoluteSD.Control()
|
||||
if err != nil {
|
||||
panic("absoluteSD: " + err.Error())
|
||||
}
|
||||
if absControl&SE_SELF_RELATIVE != 0 {
|
||||
panic("absoluteSD not in absolute format")
|
||||
}
|
||||
if absoluteSD.dacl != dacl {
|
||||
panic("dacl pointer mismatch")
|
||||
}
|
||||
if absoluteSD.sacl != sacl {
|
||||
panic("sacl pointer mismatch")
|
||||
}
|
||||
if absoluteSD.owner != owner {
|
||||
panic("owner pointer mismatch")
|
||||
}
|
||||
if absoluteSD.group != group {
|
||||
panic("group pointer mismatch")
|
||||
}
|
||||
absoluteSD.dacl = dacl
|
||||
absoluteSD.sacl = sacl
|
||||
absoluteSD.owner = owner
|
||||
absoluteSD.group = group
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
6
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
6
vendor/golang.org/x/sys/windows/syscall_windows.go
generated
vendored
@ -870,6 +870,7 @@ const socket_error = uintptr(^uint32(0))
|
||||
//sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom
|
||||
//sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo
|
||||
//sys WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW
|
||||
//sys WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) [failretval!=0] = ws2_32.WSADuplicateSocketW
|
||||
//sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname
|
||||
//sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname
|
||||
//sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs
|
||||
@ -1698,8 +1699,9 @@ func NewNTUnicodeString(s string) (*NTUnicodeString, error) {
|
||||
|
||||
// Slice returns a uint16 slice that aliases the data in the NTUnicodeString.
|
||||
func (s *NTUnicodeString) Slice() []uint16 {
|
||||
slice := unsafe.Slice(s.Buffer, s.MaximumLength)
|
||||
return slice[:s.Length]
|
||||
// Note: this rounds the length down, if it happens
|
||||
// to (incorrectly) be odd. Probably safer than rounding up.
|
||||
return unsafe.Slice(s.Buffer, s.MaximumLength/2)[:s.Length/2]
|
||||
}
|
||||
|
||||
func (s *NTUnicodeString) String() string {
|
||||
|
||||
245
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
245
vendor/golang.org/x/sys/windows/types_windows.go
generated
vendored
@ -1074,6 +1074,7 @@ const (
|
||||
IP_ADD_MEMBERSHIP = 0xc
|
||||
IP_DROP_MEMBERSHIP = 0xd
|
||||
IP_PKTINFO = 0x13
|
||||
IP_MTU_DISCOVER = 0x47
|
||||
|
||||
IPV6_V6ONLY = 0x1b
|
||||
IPV6_UNICAST_HOPS = 0x4
|
||||
@ -1083,6 +1084,7 @@ const (
|
||||
IPV6_JOIN_GROUP = 0xc
|
||||
IPV6_LEAVE_GROUP = 0xd
|
||||
IPV6_PKTINFO = 0x13
|
||||
IPV6_MTU_DISCOVER = 0x47
|
||||
|
||||
MSG_OOB = 0x1
|
||||
MSG_PEEK = 0x2
|
||||
@ -1132,6 +1134,15 @@ const (
|
||||
WSASYS_STATUS_LEN = 128
|
||||
)
|
||||
|
||||
// enum PMTUD_STATE from ws2ipdef.h
|
||||
const (
|
||||
IP_PMTUDISC_NOT_SET = 0
|
||||
IP_PMTUDISC_DO = 1
|
||||
IP_PMTUDISC_DONT = 2
|
||||
IP_PMTUDISC_PROBE = 3
|
||||
IP_PMTUDISC_MAX = 4
|
||||
)
|
||||
|
||||
type WSABuf struct {
|
||||
Len uint32
|
||||
Buf *byte
|
||||
@ -1146,6 +1157,22 @@ type WSAMsg struct {
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
type WSACMSGHDR struct {
|
||||
Len uintptr
|
||||
Level int32
|
||||
Type int32
|
||||
}
|
||||
|
||||
type IN_PKTINFO struct {
|
||||
Addr [4]byte
|
||||
Ifindex uint32
|
||||
}
|
||||
|
||||
type IN6_PKTINFO struct {
|
||||
Addr [16]byte
|
||||
Ifindex uint32
|
||||
}
|
||||
|
||||
// Flags for WSASocket
|
||||
const (
|
||||
WSA_FLAG_OVERLAPPED = 0x01
|
||||
@ -1949,6 +1976,12 @@ const (
|
||||
SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1
|
||||
)
|
||||
|
||||
// FILE_ZERO_DATA_INFORMATION from winioctl.h
|
||||
type FileZeroDataInformation struct {
|
||||
FileOffset int64
|
||||
BeyondFinalZero int64
|
||||
}
|
||||
|
||||
const (
|
||||
ComputerNameNetBIOS = 0
|
||||
ComputerNameDnsHostname = 1
|
||||
@ -2673,6 +2706,8 @@ type CommTimeouts struct {
|
||||
|
||||
// NTUnicodeString is a UTF-16 string for NT native APIs, corresponding to UNICODE_STRING.
|
||||
type NTUnicodeString struct {
|
||||
// Note: Length and MaximumLength are in *bytes*, not uint16s.
|
||||
// They should always be even.
|
||||
Length uint16
|
||||
MaximumLength uint16
|
||||
Buffer *uint16
|
||||
@ -3601,3 +3636,213 @@ const (
|
||||
KLF_NOTELLSHELL = 0x00000080
|
||||
KLF_SETFORPROCESS = 0x00000100
|
||||
)
|
||||
|
||||
// Virtual Key codes
|
||||
// https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
|
||||
const (
|
||||
VK_LBUTTON = 0x01
|
||||
VK_RBUTTON = 0x02
|
||||
VK_CANCEL = 0x03
|
||||
VK_MBUTTON = 0x04
|
||||
VK_XBUTTON1 = 0x05
|
||||
VK_XBUTTON2 = 0x06
|
||||
VK_BACK = 0x08
|
||||
VK_TAB = 0x09
|
||||
VK_CLEAR = 0x0C
|
||||
VK_RETURN = 0x0D
|
||||
VK_SHIFT = 0x10
|
||||
VK_CONTROL = 0x11
|
||||
VK_MENU = 0x12
|
||||
VK_PAUSE = 0x13
|
||||
VK_CAPITAL = 0x14
|
||||
VK_KANA = 0x15
|
||||
VK_HANGEUL = 0x15
|
||||
VK_HANGUL = 0x15
|
||||
VK_IME_ON = 0x16
|
||||
VK_JUNJA = 0x17
|
||||
VK_FINAL = 0x18
|
||||
VK_HANJA = 0x19
|
||||
VK_KANJI = 0x19
|
||||
VK_IME_OFF = 0x1A
|
||||
VK_ESCAPE = 0x1B
|
||||
VK_CONVERT = 0x1C
|
||||
VK_NONCONVERT = 0x1D
|
||||
VK_ACCEPT = 0x1E
|
||||
VK_MODECHANGE = 0x1F
|
||||
VK_SPACE = 0x20
|
||||
VK_PRIOR = 0x21
|
||||
VK_NEXT = 0x22
|
||||
VK_END = 0x23
|
||||
VK_HOME = 0x24
|
||||
VK_LEFT = 0x25
|
||||
VK_UP = 0x26
|
||||
VK_RIGHT = 0x27
|
||||
VK_DOWN = 0x28
|
||||
VK_SELECT = 0x29
|
||||
VK_PRINT = 0x2A
|
||||
VK_EXECUTE = 0x2B
|
||||
VK_SNAPSHOT = 0x2C
|
||||
VK_INSERT = 0x2D
|
||||
VK_DELETE = 0x2E
|
||||
VK_HELP = 0x2F
|
||||
VK_LWIN = 0x5B
|
||||
VK_RWIN = 0x5C
|
||||
VK_APPS = 0x5D
|
||||
VK_SLEEP = 0x5F
|
||||
VK_NUMPAD0 = 0x60
|
||||
VK_NUMPAD1 = 0x61
|
||||
VK_NUMPAD2 = 0x62
|
||||
VK_NUMPAD3 = 0x63
|
||||
VK_NUMPAD4 = 0x64
|
||||
VK_NUMPAD5 = 0x65
|
||||
VK_NUMPAD6 = 0x66
|
||||
VK_NUMPAD7 = 0x67
|
||||
VK_NUMPAD8 = 0x68
|
||||
VK_NUMPAD9 = 0x69
|
||||
VK_MULTIPLY = 0x6A
|
||||
VK_ADD = 0x6B
|
||||
VK_SEPARATOR = 0x6C
|
||||
VK_SUBTRACT = 0x6D
|
||||
VK_DECIMAL = 0x6E
|
||||
VK_DIVIDE = 0x6F
|
||||
VK_F1 = 0x70
|
||||
VK_F2 = 0x71
|
||||
VK_F3 = 0x72
|
||||
VK_F4 = 0x73
|
||||
VK_F5 = 0x74
|
||||
VK_F6 = 0x75
|
||||
VK_F7 = 0x76
|
||||
VK_F8 = 0x77
|
||||
VK_F9 = 0x78
|
||||
VK_F10 = 0x79
|
||||
VK_F11 = 0x7A
|
||||
VK_F12 = 0x7B
|
||||
VK_F13 = 0x7C
|
||||
VK_F14 = 0x7D
|
||||
VK_F15 = 0x7E
|
||||
VK_F16 = 0x7F
|
||||
VK_F17 = 0x80
|
||||
VK_F18 = 0x81
|
||||
VK_F19 = 0x82
|
||||
VK_F20 = 0x83
|
||||
VK_F21 = 0x84
|
||||
VK_F22 = 0x85
|
||||
VK_F23 = 0x86
|
||||
VK_F24 = 0x87
|
||||
VK_NUMLOCK = 0x90
|
||||
VK_SCROLL = 0x91
|
||||
VK_OEM_NEC_EQUAL = 0x92
|
||||
VK_OEM_FJ_JISHO = 0x92
|
||||
VK_OEM_FJ_MASSHOU = 0x93
|
||||
VK_OEM_FJ_TOUROKU = 0x94
|
||||
VK_OEM_FJ_LOYA = 0x95
|
||||
VK_OEM_FJ_ROYA = 0x96
|
||||
VK_LSHIFT = 0xA0
|
||||
VK_RSHIFT = 0xA1
|
||||
VK_LCONTROL = 0xA2
|
||||
VK_RCONTROL = 0xA3
|
||||
VK_LMENU = 0xA4
|
||||
VK_RMENU = 0xA5
|
||||
VK_BROWSER_BACK = 0xA6
|
||||
VK_BROWSER_FORWARD = 0xA7
|
||||
VK_BROWSER_REFRESH = 0xA8
|
||||
VK_BROWSER_STOP = 0xA9
|
||||
VK_BROWSER_SEARCH = 0xAA
|
||||
VK_BROWSER_FAVORITES = 0xAB
|
||||
VK_BROWSER_HOME = 0xAC
|
||||
VK_VOLUME_MUTE = 0xAD
|
||||
VK_VOLUME_DOWN = 0xAE
|
||||
VK_VOLUME_UP = 0xAF
|
||||
VK_MEDIA_NEXT_TRACK = 0xB0
|
||||
VK_MEDIA_PREV_TRACK = 0xB1
|
||||
VK_MEDIA_STOP = 0xB2
|
||||
VK_MEDIA_PLAY_PAUSE = 0xB3
|
||||
VK_LAUNCH_MAIL = 0xB4
|
||||
VK_LAUNCH_MEDIA_SELECT = 0xB5
|
||||
VK_LAUNCH_APP1 = 0xB6
|
||||
VK_LAUNCH_APP2 = 0xB7
|
||||
VK_OEM_1 = 0xBA
|
||||
VK_OEM_PLUS = 0xBB
|
||||
VK_OEM_COMMA = 0xBC
|
||||
VK_OEM_MINUS = 0xBD
|
||||
VK_OEM_PERIOD = 0xBE
|
||||
VK_OEM_2 = 0xBF
|
||||
VK_OEM_3 = 0xC0
|
||||
VK_OEM_4 = 0xDB
|
||||
VK_OEM_5 = 0xDC
|
||||
VK_OEM_6 = 0xDD
|
||||
VK_OEM_7 = 0xDE
|
||||
VK_OEM_8 = 0xDF
|
||||
VK_OEM_AX = 0xE1
|
||||
VK_OEM_102 = 0xE2
|
||||
VK_ICO_HELP = 0xE3
|
||||
VK_ICO_00 = 0xE4
|
||||
VK_PROCESSKEY = 0xE5
|
||||
VK_ICO_CLEAR = 0xE6
|
||||
VK_OEM_RESET = 0xE9
|
||||
VK_OEM_JUMP = 0xEA
|
||||
VK_OEM_PA1 = 0xEB
|
||||
VK_OEM_PA2 = 0xEC
|
||||
VK_OEM_PA3 = 0xED
|
||||
VK_OEM_WSCTRL = 0xEE
|
||||
VK_OEM_CUSEL = 0xEF
|
||||
VK_OEM_ATTN = 0xF0
|
||||
VK_OEM_FINISH = 0xF1
|
||||
VK_OEM_COPY = 0xF2
|
||||
VK_OEM_AUTO = 0xF3
|
||||
VK_OEM_ENLW = 0xF4
|
||||
VK_OEM_BACKTAB = 0xF5
|
||||
VK_ATTN = 0xF6
|
||||
VK_CRSEL = 0xF7
|
||||
VK_EXSEL = 0xF8
|
||||
VK_EREOF = 0xF9
|
||||
VK_PLAY = 0xFA
|
||||
VK_ZOOM = 0xFB
|
||||
VK_NONAME = 0xFC
|
||||
VK_PA1 = 0xFD
|
||||
VK_OEM_CLEAR = 0xFE
|
||||
)
|
||||
|
||||
// Mouse button constants.
|
||||
// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str
|
||||
const (
|
||||
FROM_LEFT_1ST_BUTTON_PRESSED = 0x0001
|
||||
RIGHTMOST_BUTTON_PRESSED = 0x0002
|
||||
FROM_LEFT_2ND_BUTTON_PRESSED = 0x0004
|
||||
FROM_LEFT_3RD_BUTTON_PRESSED = 0x0008
|
||||
FROM_LEFT_4TH_BUTTON_PRESSED = 0x0010
|
||||
)
|
||||
|
||||
// Control key state constaints.
|
||||
// https://docs.microsoft.com/en-us/windows/console/key-event-record-str
|
||||
// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str
|
||||
const (
|
||||
CAPSLOCK_ON = 0x0080
|
||||
ENHANCED_KEY = 0x0100
|
||||
LEFT_ALT_PRESSED = 0x0002
|
||||
LEFT_CTRL_PRESSED = 0x0008
|
||||
NUMLOCK_ON = 0x0020
|
||||
RIGHT_ALT_PRESSED = 0x0001
|
||||
RIGHT_CTRL_PRESSED = 0x0004
|
||||
SCROLLLOCK_ON = 0x0040
|
||||
SHIFT_PRESSED = 0x0010
|
||||
)
|
||||
|
||||
// Mouse event record event flags.
|
||||
// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str
|
||||
const (
|
||||
MOUSE_MOVED = 0x0001
|
||||
DOUBLE_CLICK = 0x0002
|
||||
MOUSE_WHEELED = 0x0004
|
||||
MOUSE_HWHEELED = 0x0008
|
||||
)
|
||||
|
||||
// Input Record Event Types
|
||||
// https://learn.microsoft.com/en-us/windows/console/input-record-str
|
||||
const (
|
||||
FOCUS_EVENT = 0x0010
|
||||
KEY_EVENT = 0x0001
|
||||
MENU_EVENT = 0x0008
|
||||
MOUSE_EVENT = 0x0002
|
||||
WINDOW_BUFFER_SIZE_EVENT = 0x0004
|
||||
)
|
||||
|
||||
973
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
973
vendor/golang.org/x/sys/windows/zsyscall_windows.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/golang.org/x/text/language/parse.go
generated
vendored
2
vendor/golang.org/x/text/language/parse.go
generated
vendored
@ -59,7 +59,7 @@ func (c CanonType) Parse(s string) (t Tag, err error) {
|
||||
if changed {
|
||||
tt.RemakeString()
|
||||
}
|
||||
return makeTag(tt), err
|
||||
return makeTag(tt), nil
|
||||
}
|
||||
|
||||
// Compose creates a Tag from individual parts, which may be of type Tag, Base,
|
||||
|
||||
16
vendor/modules.txt
vendored
16
vendor/modules.txt
vendored
@ -184,6 +184,10 @@ github.com/yuin/goldmark/renderer
|
||||
github.com/yuin/goldmark/renderer/html
|
||||
github.com/yuin/goldmark/text
|
||||
github.com/yuin/goldmark/util
|
||||
# golang.org/x/crypto v0.42.0
|
||||
## explicit; go 1.24.0
|
||||
golang.org/x/crypto/pbkdf2
|
||||
golang.org/x/crypto/scrypt
|
||||
# golang.org/x/image v0.24.0
|
||||
## explicit; go 1.18
|
||||
golang.org/x/image/ccitt
|
||||
@ -194,18 +198,18 @@ golang.org/x/image/math/fixed
|
||||
golang.org/x/image/tiff
|
||||
golang.org/x/image/tiff/lzw
|
||||
golang.org/x/image/vector
|
||||
# golang.org/x/net v0.35.0
|
||||
## explicit; go 1.18
|
||||
# golang.org/x/net v0.43.0
|
||||
## explicit; go 1.23.0
|
||||
golang.org/x/net/html
|
||||
golang.org/x/net/html/atom
|
||||
golang.org/x/net/html/charset
|
||||
# golang.org/x/sys v0.30.0
|
||||
## explicit; go 1.18
|
||||
# golang.org/x/sys v0.36.0
|
||||
## explicit; go 1.24.0
|
||||
golang.org/x/sys/unix
|
||||
golang.org/x/sys/windows
|
||||
golang.org/x/sys/windows/registry
|
||||
# golang.org/x/text v0.22.0
|
||||
## explicit; go 1.18
|
||||
# golang.org/x/text v0.29.0
|
||||
## explicit; go 1.24.0
|
||||
golang.org/x/text/encoding
|
||||
golang.org/x/text/encoding/charmap
|
||||
golang.org/x/text/encoding/htmlindex
|
||||
|
||||
Loading…
Reference in New Issue
Block a user