Merge pull request #51795 from dims/bug-fix-51755

Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Bug Fix - Adding an allowed address pair wipes port security groups

**What this PR does / why we need it**:

Fix for cloud routes enabled instances will have their security groups
removed when the allowed address pair is added to the instance's port.

Upstream bug report is in:
https://github.com/gophercloud/gophercloud/issues/509

Upstream bug fix is in:
https://github.com/gophercloud/gophercloud/pull/510

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes #51755

**Special notes for your reviewer**:

Just an fix in vendored code. minimal changes needed in OpenStack cloud provider

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 9a8cb435b77085fa7d518c4428a02eae316b1003
This commit is contained in:
Kubernetes Publisher 2017-09-05 18:40:31 -07:00
commit 4cb96b9d03
164 changed files with 7433 additions and 20907 deletions

332
Godeps/Godeps.json generated
View File

@ -404,31 +404,31 @@
}, },
{ {
"ImportPath": "github.com/gophercloud/gophercloud", "ImportPath": "github.com/gophercloud/gophercloud",
"Rev": "c0406a133c4a74a838baf0ddff3c2fab21155fba" "Rev": "2bf16b94fdd9b01557c4d076e567fe5cbbe5a961"
}, },
{ {
"ImportPath": "github.com/gophercloud/gophercloud/openstack", "ImportPath": "github.com/gophercloud/gophercloud/openstack",
"Rev": "c0406a133c4a74a838baf0ddff3c2fab21155fba" "Rev": "2bf16b94fdd9b01557c4d076e567fe5cbbe5a961"
}, },
{ {
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
"Rev": "c0406a133c4a74a838baf0ddff3c2fab21155fba" "Rev": "2bf16b94fdd9b01557c4d076e567fe5cbbe5a961"
}, },
{ {
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
"Rev": "c0406a133c4a74a838baf0ddff3c2fab21155fba" "Rev": "2bf16b94fdd9b01557c4d076e567fe5cbbe5a961"
}, },
{ {
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
"Rev": "c0406a133c4a74a838baf0ddff3c2fab21155fba" "Rev": "2bf16b94fdd9b01557c4d076e567fe5cbbe5a961"
}, },
{ {
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils", "ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
"Rev": "c0406a133c4a74a838baf0ddff3c2fab21155fba" "Rev": "2bf16b94fdd9b01557c4d076e567fe5cbbe5a961"
}, },
{ {
"ImportPath": "github.com/gophercloud/gophercloud/pagination", "ImportPath": "github.com/gophercloud/gophercloud/pagination",
"Rev": "c0406a133c4a74a838baf0ddff3c2fab21155fba" "Rev": "2bf16b94fdd9b01557c4d076e567fe5cbbe5a961"
}, },
{ {
"ImportPath": "github.com/gregjones/httpcache", "ImportPath": "github.com/gregjones/httpcache",
@ -572,27 +572,27 @@
}, },
{ {
"ImportPath": "golang.org/x/crypto/bcrypt", "ImportPath": "golang.org/x/crypto/bcrypt",
"Rev": "81e90905daefcd6fd217b62423c0908922eadb30" "Rev": "d172538b2cfce0c13cee31e647d0367aa8cd2486"
}, },
{ {
"ImportPath": "golang.org/x/crypto/blowfish", "ImportPath": "golang.org/x/crypto/blowfish",
"Rev": "81e90905daefcd6fd217b62423c0908922eadb30" "Rev": "d172538b2cfce0c13cee31e647d0367aa8cd2486"
}, },
{ {
"ImportPath": "golang.org/x/crypto/nacl/secretbox", "ImportPath": "golang.org/x/crypto/nacl/secretbox",
"Rev": "81e90905daefcd6fd217b62423c0908922eadb30" "Rev": "d172538b2cfce0c13cee31e647d0367aa8cd2486"
}, },
{ {
"ImportPath": "golang.org/x/crypto/poly1305", "ImportPath": "golang.org/x/crypto/poly1305",
"Rev": "81e90905daefcd6fd217b62423c0908922eadb30" "Rev": "d172538b2cfce0c13cee31e647d0367aa8cd2486"
}, },
{ {
"ImportPath": "golang.org/x/crypto/salsa20/salsa", "ImportPath": "golang.org/x/crypto/salsa20/salsa",
"Rev": "81e90905daefcd6fd217b62423c0908922eadb30" "Rev": "d172538b2cfce0c13cee31e647d0367aa8cd2486"
}, },
{ {
"ImportPath": "golang.org/x/crypto/ssh/terminal", "ImportPath": "golang.org/x/crypto/ssh/terminal",
"Rev": "81e90905daefcd6fd217b62423c0908922eadb30" "Rev": "d172538b2cfce0c13cee31e647d0367aa8cd2486"
}, },
{ {
"ImportPath": "golang.org/x/net/context", "ImportPath": "golang.org/x/net/context",
@ -636,11 +636,7 @@
}, },
{ {
"ImportPath": "golang.org/x/sys/unix", "ImportPath": "golang.org/x/sys/unix",
"Rev": "7ddbeae9ae08c6a06a59597f0c9edbc5ff2444ce" "Rev": "7a4fde3fda8ef580a89dbae8138c26041be14299"
},
{
"ImportPath": "golang.org/x/sys/windows",
"Rev": "7ddbeae9ae08c6a06a59597f0c9edbc5ff2444ce"
}, },
{ {
"ImportPath": "golang.org/x/text/cases", "ImportPath": "golang.org/x/text/cases",
@ -764,99 +760,99 @@
}, },
{ {
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1", "ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta1", "ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/apps/v1beta2", "ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1", "ImportPath": "k8s.io/api/authentication/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/authentication/v1beta1", "ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1", "ImportPath": "k8s.io/api/authorization/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/authorization/v1beta1", "ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v1", "ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/autoscaling/v2alpha1", "ImportPath": "k8s.io/api/autoscaling/v2alpha1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1", "ImportPath": "k8s.io/api/batch/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v1beta1", "ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/batch/v2alpha1", "ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/certificates/v1beta1", "ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/core/v1", "ImportPath": "k8s.io/api/core/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/extensions/v1beta1", "ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/networking/v1", "ImportPath": "k8s.io/api/networking/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/policy/v1beta1", "ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1", "ImportPath": "k8s.io/api/rbac/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1alpha1", "ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/rbac/v1beta1", "ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/scheduling/v1alpha1", "ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/settings/v1alpha1", "ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1", "ImportPath": "k8s.io/api/storage/v1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/api/storage/v1beta1", "ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "5d7eaafc89ac66da6bfbbcc4bc6a14fecd813084" "Rev": "6215021b8ed92d69abfaf135ee5f2fb04bacab11"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
@ -1092,507 +1088,507 @@
}, },
{ {
"ImportPath": "k8s.io/client-go/discovery", "ImportPath": "k8s.io/client-go/discovery",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/discovery/fake", "ImportPath": "k8s.io/client-go/discovery/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers", "ImportPath": "k8s.io/client-go/informers",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/admissionregistration", "ImportPath": "k8s.io/client-go/informers/admissionregistration",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/apps", "ImportPath": "k8s.io/client-go/informers/apps",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/apps/v1beta1", "ImportPath": "k8s.io/client-go/informers/apps/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/apps/v1beta2", "ImportPath": "k8s.io/client-go/informers/apps/v1beta2",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling", "ImportPath": "k8s.io/client-go/informers/autoscaling",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling/v1", "ImportPath": "k8s.io/client-go/informers/autoscaling/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/autoscaling/v2alpha1", "ImportPath": "k8s.io/client-go/informers/autoscaling/v2alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/batch", "ImportPath": "k8s.io/client-go/informers/batch",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/batch/v1", "ImportPath": "k8s.io/client-go/informers/batch/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/batch/v1beta1", "ImportPath": "k8s.io/client-go/informers/batch/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/batch/v2alpha1", "ImportPath": "k8s.io/client-go/informers/batch/v2alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/certificates", "ImportPath": "k8s.io/client-go/informers/certificates",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/certificates/v1beta1", "ImportPath": "k8s.io/client-go/informers/certificates/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/core", "ImportPath": "k8s.io/client-go/informers/core",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/core/v1", "ImportPath": "k8s.io/client-go/informers/core/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/extensions", "ImportPath": "k8s.io/client-go/informers/extensions",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/extensions/v1beta1", "ImportPath": "k8s.io/client-go/informers/extensions/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/internalinterfaces", "ImportPath": "k8s.io/client-go/informers/internalinterfaces",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/networking", "ImportPath": "k8s.io/client-go/informers/networking",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/networking/v1", "ImportPath": "k8s.io/client-go/informers/networking/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/policy", "ImportPath": "k8s.io/client-go/informers/policy",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/policy/v1beta1", "ImportPath": "k8s.io/client-go/informers/policy/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/rbac", "ImportPath": "k8s.io/client-go/informers/rbac",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/rbac/v1", "ImportPath": "k8s.io/client-go/informers/rbac/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/rbac/v1alpha1", "ImportPath": "k8s.io/client-go/informers/rbac/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/rbac/v1beta1", "ImportPath": "k8s.io/client-go/informers/rbac/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/scheduling", "ImportPath": "k8s.io/client-go/informers/scheduling",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/scheduling/v1alpha1", "ImportPath": "k8s.io/client-go/informers/scheduling/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/settings", "ImportPath": "k8s.io/client-go/informers/settings",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/settings/v1alpha1", "ImportPath": "k8s.io/client-go/informers/settings/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/storage", "ImportPath": "k8s.io/client-go/informers/storage",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/storage/v1", "ImportPath": "k8s.io/client-go/informers/storage/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/informers/storage/v1beta1", "ImportPath": "k8s.io/client-go/informers/storage/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes", "ImportPath": "k8s.io/client-go/kubernetes",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/fake", "ImportPath": "k8s.io/client-go/kubernetes/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/scheme", "ImportPath": "k8s.io/client-go/kubernetes/scheme",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2", "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1", "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1", "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1", "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1", "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1", "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake", "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/apps/v1beta1", "ImportPath": "k8s.io/client-go/listers/apps/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/apps/v1beta2", "ImportPath": "k8s.io/client-go/listers/apps/v1beta2",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/autoscaling/v1", "ImportPath": "k8s.io/client-go/listers/autoscaling/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/autoscaling/v2alpha1", "ImportPath": "k8s.io/client-go/listers/autoscaling/v2alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/batch/v1", "ImportPath": "k8s.io/client-go/listers/batch/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/batch/v1beta1", "ImportPath": "k8s.io/client-go/listers/batch/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/batch/v2alpha1", "ImportPath": "k8s.io/client-go/listers/batch/v2alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/certificates/v1beta1", "ImportPath": "k8s.io/client-go/listers/certificates/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/core/v1", "ImportPath": "k8s.io/client-go/listers/core/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/extensions/v1beta1", "ImportPath": "k8s.io/client-go/listers/extensions/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/networking/v1", "ImportPath": "k8s.io/client-go/listers/networking/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/policy/v1beta1", "ImportPath": "k8s.io/client-go/listers/policy/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/rbac/v1", "ImportPath": "k8s.io/client-go/listers/rbac/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/rbac/v1alpha1", "ImportPath": "k8s.io/client-go/listers/rbac/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/rbac/v1beta1", "ImportPath": "k8s.io/client-go/listers/rbac/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/scheduling/v1alpha1", "ImportPath": "k8s.io/client-go/listers/scheduling/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/settings/v1alpha1", "ImportPath": "k8s.io/client-go/listers/settings/v1alpha1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/storage/v1", "ImportPath": "k8s.io/client-go/listers/storage/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/listers/storage/v1beta1", "ImportPath": "k8s.io/client-go/listers/storage/v1beta1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/pkg/version", "ImportPath": "k8s.io/client-go/pkg/version",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/rest", "ImportPath": "k8s.io/client-go/rest",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/rest/watch", "ImportPath": "k8s.io/client-go/rest/watch",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/testing", "ImportPath": "k8s.io/client-go/testing",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/auth", "ImportPath": "k8s.io/client-go/tools/auth",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/cache", "ImportPath": "k8s.io/client-go/tools/cache",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/clientcmd", "ImportPath": "k8s.io/client-go/tools/clientcmd",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/clientcmd/api", "ImportPath": "k8s.io/client-go/tools/clientcmd/api",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/clientcmd/api/latest", "ImportPath": "k8s.io/client-go/tools/clientcmd/api/latest",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/clientcmd/api/v1", "ImportPath": "k8s.io/client-go/tools/clientcmd/api/v1",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/metrics", "ImportPath": "k8s.io/client-go/tools/metrics",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/pager", "ImportPath": "k8s.io/client-go/tools/pager",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/tools/reference", "ImportPath": "k8s.io/client-go/tools/reference",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/transport", "ImportPath": "k8s.io/client-go/transport",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/util/cert", "ImportPath": "k8s.io/client-go/util/cert",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/util/flowcontrol", "ImportPath": "k8s.io/client-go/util/flowcontrol",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/util/homedir", "ImportPath": "k8s.io/client-go/util/homedir",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/client-go/util/integer", "ImportPath": "k8s.io/client-go/util/integer",
"Rev": "aa671fcc5b8ed2a6ef9c8d40b3976804a7c9befc" "Rev": "bf0966b34633cf464d3c544d666e1203fc66e53c"
}, },
{ {
"ImportPath": "k8s.io/kube-openapi/pkg/builder", "ImportPath": "k8s.io/kube-openapi/pkg/builder",

View File

@ -9,12 +9,32 @@ ProviderClient representing an active session on that provider.
Its fields are the union of those recognized by each identity implementation and Its fields are the union of those recognized by each identity implementation and
provider. provider.
An example of manually providing authentication information:
opts := gophercloud.AuthOptions{
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
Username: "{username}",
Password: "{password}",
TenantID: "{tenant_id}",
}
provider, err := openstack.AuthenticatedClient(opts)
An example of using AuthOptionsFromEnv(), where the environment variables can
be read from a file, such as a standard openrc file:
opts, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.AuthenticatedClient(opts)
*/ */
type AuthOptions struct { type AuthOptions struct {
// IdentityEndpoint specifies the HTTP endpoint that is required to work with // IdentityEndpoint specifies the HTTP endpoint that is required to work with
// the Identity API of the appropriate version. While it's ultimately needed by // the Identity API of the appropriate version. While it's ultimately needed by
// all of the identity services, it will often be populated by a provider-level // all of the identity services, it will often be populated by a provider-level
// function. // function.
//
// The IdentityEndpoint is typically referred to as the "auth_url" or
// "OS_AUTH_URL" in the information provided by the cloud operator.
IdentityEndpoint string `json:"-"` IdentityEndpoint string `json:"-"`
// Username is required if using Identity V2 API. Consult with your provider's // Username is required if using Identity V2 API. Consult with your provider's
@ -39,7 +59,7 @@ type AuthOptions struct {
// If DomainID or DomainName are provided, they will also apply to TenantName. // If DomainID or DomainName are provided, they will also apply to TenantName.
// It is not currently possible to authenticate with Username and a Domain // It is not currently possible to authenticate with Username and a Domain
// and scope to a Project in a different Domain by using TenantName. To // and scope to a Project in a different Domain by using TenantName. To
// accomplish that, the ProjectID will need to be provided to the TenantID // accomplish that, the ProjectID will need to be provided as the TenantID
// option. // option.
TenantID string `json:"tenantId,omitempty"` TenantID string `json:"tenantId,omitempty"`
TenantName string `json:"tenantName,omitempty"` TenantName string `json:"tenantName,omitempty"`
@ -50,10 +70,12 @@ type AuthOptions struct {
// false, it will not cache these settings, but re-authentication will not be // false, it will not cache these settings, but re-authentication will not be
// possible. This setting defaults to false. // possible. This setting defaults to false.
// //
// NOTE: The reauth function will try to re-authenticate endlessly if left unchecked. // NOTE: The reauth function will try to re-authenticate endlessly if left
// The way to limit the number of attempts is to provide a custom HTTP client to the provider client // unchecked. The way to limit the number of attempts is to provide a custom
// and provide a transport that implements the RoundTripper interface and stores the number of failed retries. // HTTP client to the provider client and provide a transport that implements
// For an example of this, see here: https://github.com/rackspace/rack/blob/1.0.0/auth/clients.go#L311 // the RoundTripper interface and stores the number of failed retries. For an
// example of this, see here:
// https://github.com/rackspace/rack/blob/1.0.0/auth/clients.go#L311
AllowReauth bool `json:"-"` AllowReauth bool `json:"-"`
// TokenID allows users to authenticate (possibly as another user) with an // TokenID allows users to authenticate (possibly as another user) with an
@ -316,7 +338,12 @@ func (opts *AuthOptions) ToTokenV3ScopeMap() (map[string]interface{}, error) {
}, },
}, nil }, nil
} else if scope.DomainName != "" { } else if scope.DomainName != "" {
return nil, ErrScopeDomainName{} // DomainName
return map[string]interface{}{
"domain": map[string]interface{}{
"name": &scope.DomainName,
},
}, nil
} }
return nil, nil return nil, nil

View File

@ -3,11 +3,17 @@ Package gophercloud provides a multi-vendor interface to OpenStack-compatible
clouds. The library has a three-level hierarchy: providers, services, and clouds. The library has a three-level hierarchy: providers, services, and
resources. resources.
Provider structs represent the service providers that offer and manage a Authenticating with Providers
collection of services. The IdentityEndpoint is typically refered to as
"auth_url" in information provided by the cloud operator. Additionally, Provider structs represent the cloud providers that offer and manage a
the cloud may refer to TenantID or TenantName as project_id and project_name. collection of services. You will generally want to create one Provider
These are defined like so: client per OpenStack cloud.
Use your OpenStack credentials to create a Provider client. The
IdentityEndpoint is typically refered to as "auth_url" or "OS_AUTH_URL" in
information provided by the cloud operator. Additionally, the cloud may refer to
TenantID or TenantName as project_id and project_name. Credentials are
specified like so:
opts := gophercloud.AuthOptions{ opts := gophercloud.AuthOptions{
IdentityEndpoint: "https://openstack.example.com:5000/v2.0", IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
@ -18,6 +24,16 @@ These are defined like so:
provider, err := openstack.AuthenticatedClient(opts) provider, err := openstack.AuthenticatedClient(opts)
You may also use the openstack.AuthOptionsFromEnv() helper function. This
function reads in standard environment variables frequently found in an
OpenStack `openrc` file. Again note that Gophercloud currently uses "tenant"
instead of "project".
opts, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.AuthenticatedClient(opts)
Service Clients
Service structs are specific to a provider and handle all of the logic and Service structs are specific to a provider and handle all of the logic and
operations for a particular OpenStack service. Examples of services include: operations for a particular OpenStack service. Examples of services include:
Compute, Object Storage, Block Storage. In order to define one, you need to Compute, Object Storage, Block Storage. In order to define one, you need to
@ -27,6 +43,8 @@ pass in the parent provider, like so:
client := openstack.NewComputeV2(provider, opts) client := openstack.NewComputeV2(provider, opts)
Resources
Resource structs are the domain models that services make use of in order Resource structs are the domain models that services make use of in order
to work with and represent the state of API resources: to work with and represent the state of API resources:
@ -62,6 +80,12 @@ of results:
return true, nil return true, nil
}) })
If you want to obtain the entire collection of pages without doing any
intermediary processing on each page, you can use the AllPages method:
allPages, err := servers.List(client, nil).AllPages()
allServers, err := servers.ExtractServers(allPages)
This top-level package contains utility functions and data types that are used This top-level package contains utility functions and data types that are used
throughout the provider and service packages. Of particular note for end users throughout the provider and service packages. Of particular note for end users
are the AuthOptions and EndpointOpts structs. are the AuthOptions and EndpointOpts structs.

View File

@ -27,7 +27,7 @@ const (
// unambiguously identify one, and only one, endpoint within the catalog. // unambiguously identify one, and only one, endpoint within the catalog.
// //
// Usually, these are passed to service client factory functions in a provider // Usually, these are passed to service client factory functions in a provider
// package, like "rackspace.NewComputeV2()". // package, like "openstack.NewComputeV2()".
type EndpointOpts struct { type EndpointOpts struct {
// Type [required] is the service type for the client (e.g., "compute", // Type [required] is the service type for the client (e.g., "compute",
// "object-store"). Generally, this will be supplied by the service client // "object-store"). Generally, this will be supplied by the service client

View File

@ -393,13 +393,6 @@ func (e ErrScopeProjectIDAlone) Error() string {
return "ProjectID must be supplied alone in a Scope" return "ProjectID must be supplied alone in a Scope"
} }
// ErrScopeDomainName indicates that a DomainName was provided alone in a Scope.
type ErrScopeDomainName struct{ BaseError }
func (e ErrScopeDomainName) Error() string {
return "DomainName must be supplied with a ProjectName or ProjectID in a Scope"
}
// ErrScopeEmpty indicates that no credentials were provided in a Scope. // ErrScopeEmpty indicates that no credentials were provided in a Scope.
type ErrScopeEmpty struct{ BaseError } type ErrScopeEmpty struct{ BaseError }

View File

@ -8,10 +8,22 @@ import (
var nilOptions = gophercloud.AuthOptions{} var nilOptions = gophercloud.AuthOptions{}
// AuthOptionsFromEnv fills out an identity.AuthOptions structure with the settings found on the various OpenStack /*
// OS_* environment variables. The following variables provide sources of truth: OS_AUTH_URL, OS_USERNAME, AuthOptionsFromEnv fills out an identity.AuthOptions structure with the
// OS_PASSWORD, OS_TENANT_ID, and OS_TENANT_NAME. Of these, OS_USERNAME, OS_PASSWORD, and OS_AUTH_URL must settings found on the various OpenStack OS_* environment variables.
// have settings, or an error will result. OS_TENANT_ID and OS_TENANT_NAME are optional.
The following variables provide sources of truth: OS_AUTH_URL, OS_USERNAME,
OS_PASSWORD, OS_TENANT_ID, and OS_TENANT_NAME.
Of these, OS_USERNAME, OS_PASSWORD, and OS_AUTH_URL must have settings,
or an error will result. OS_TENANT_ID and OS_TENANT_NAME are optional.
To use this function, first set the OS_* environment variables (for example,
by sourcing an `openrc` file), then:
opts, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.AuthenticatedClient(opts)
*/
func AuthOptionsFromEnv() (gophercloud.AuthOptions, error) { func AuthOptionsFromEnv() (gophercloud.AuthOptions, error) {
authURL := os.Getenv("OS_AUTH_URL") authURL := os.Getenv("OS_AUTH_URL")
username := os.Getenv("OS_USERNAME") username := os.Getenv("OS_USERNAME")

View File

@ -16,10 +16,20 @@ const (
v30 = "v3.0" v30 = "v3.0"
) )
// NewClient prepares an unauthenticated ProviderClient instance. /*
// Most users will probably prefer using the AuthenticatedClient function instead. NewClient prepares an unauthenticated ProviderClient instance.
// This is useful if you wish to explicitly control the version of the identity service that's used for authentication explicitly, Most users will probably prefer using the AuthenticatedClient function
// for example. instead.
This is useful if you wish to explicitly control the version of the identity
service that's used for authentication explicitly, for example.
A basic example of using this would be:
ao, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.NewClient(ao.IdentityEndpoint)
client, err := openstack.NewIdentityV3(provider, gophercloud.EndpointOpts{})
*/
func NewClient(endpoint string) (*gophercloud.ProviderClient, error) { func NewClient(endpoint string) (*gophercloud.ProviderClient, error) {
u, err := url.Parse(endpoint) u, err := url.Parse(endpoint)
if err != nil { if err != nil {
@ -45,10 +55,26 @@ func NewClient(endpoint string) (*gophercloud.ProviderClient, error) {
}, nil }, nil
} }
// AuthenticatedClient logs in to an OpenStack cloud found at the identity endpoint specified by options, acquires a token, and /*
// returns a Client instance that's ready to operate. AuthenticatedClient logs in to an OpenStack cloud found at the identity endpoint
// It first queries the root identity endpoint to determine which versions of the identity service are supported, then chooses specified by the options, acquires a token, and returns a Provider Client
// the most recent identity service available to proceed. instance that's ready to operate.
If the full path to a versioned identity endpoint was specified (example:
http://example.com:5000/v3), that path will be used as the endpoint to query.
If a versionless endpoint was specified (example: http://example.com:5000/),
the endpoint will be queried to determine which versions of the identity service
are available, then chooses the most recent or most supported version.
Example:
ao, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.AuthenticatedClient(ao)
client, err := openstack.NewNetworkV2(client, gophercloud.EndpointOpts{
Region: os.Getenv("OS_REGION_NAME"),
})
*/
func AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error) { func AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error) {
client, err := NewClient(options.IdentityEndpoint) client, err := NewClient(options.IdentityEndpoint)
if err != nil { if err != nil {
@ -62,7 +88,8 @@ func AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.Provider
return client, nil return client, nil
} }
// Authenticate or re-authenticate against the most recent identity service supported at the provided endpoint. // Authenticate or re-authenticate against the most recent identity service
// supported at the provided endpoint.
func Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error { func Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error {
versions := []*utils.Version{ versions := []*utils.Version{
{ID: v20, Priority: 20, Suffix: "/v2.0/"}, {ID: v20, Priority: 20, Suffix: "/v2.0/"},
@ -179,7 +206,8 @@ func v3auth(client *gophercloud.ProviderClient, endpoint string, opts tokens3.Au
return nil return nil
} }
// NewIdentityV2 creates a ServiceClient that may be used to interact with the v2 identity service. // NewIdentityV2 creates a ServiceClient that may be used to interact with the
// v2 identity service.
func NewIdentityV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewIdentityV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
endpoint := client.IdentityBase + "v2.0/" endpoint := client.IdentityBase + "v2.0/"
clientType := "identity" clientType := "identity"
@ -199,7 +227,8 @@ func NewIdentityV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOp
}, nil }, nil
} }
// NewIdentityV3 creates a ServiceClient that may be used to access the v3 identity service. // NewIdentityV3 creates a ServiceClient that may be used to access the v3
// identity service.
func NewIdentityV3(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewIdentityV3(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
endpoint := client.IdentityBase + "v3/" endpoint := client.IdentityBase + "v3/"
clientType := "identity" clientType := "identity"
@ -232,34 +261,40 @@ func initClientOpts(client *gophercloud.ProviderClient, eo gophercloud.EndpointO
return sc, nil return sc, nil
} }
// NewObjectStorageV1 creates a ServiceClient that may be used with the v1 object storage package. // NewObjectStorageV1 creates a ServiceClient that may be used with the v1
// object storage package.
func NewObjectStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewObjectStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "object-store") return initClientOpts(client, eo, "object-store")
} }
// NewComputeV2 creates a ServiceClient that may be used with the v2 compute package. // NewComputeV2 creates a ServiceClient that may be used with the v2 compute
// package.
func NewComputeV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewComputeV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "compute") return initClientOpts(client, eo, "compute")
} }
// NewNetworkV2 creates a ServiceClient that may be used with the v2 network package. // NewNetworkV2 creates a ServiceClient that may be used with the v2 network
// package.
func NewNetworkV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewNetworkV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
sc, err := initClientOpts(client, eo, "network") sc, err := initClientOpts(client, eo, "network")
sc.ResourceBase = sc.Endpoint + "v2.0/" sc.ResourceBase = sc.Endpoint + "v2.0/"
return sc, err return sc, err
} }
// NewBlockStorageV1 creates a ServiceClient that may be used to access the v1 block storage service. // NewBlockStorageV1 creates a ServiceClient that may be used to access the v1
// block storage service.
func NewBlockStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewBlockStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "volume") return initClientOpts(client, eo, "volume")
} }
// NewBlockStorageV2 creates a ServiceClient that may be used to access the v2 block storage service. // NewBlockStorageV2 creates a ServiceClient that may be used to access the v2
// block storage service.
func NewBlockStorageV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewBlockStorageV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "volumev2") return initClientOpts(client, eo, "volumev2")
} }
// NewSharedFileSystemV2 creates a ServiceClient that may be used to access the v2 shared file system service. // NewSharedFileSystemV2 creates a ServiceClient that may be used to access the
// v2 shared file system service.
func NewSharedFileSystemV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewSharedFileSystemV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "sharev2") return initClientOpts(client, eo, "sharev2")
} }
@ -270,7 +305,8 @@ func NewCDNV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (
return initClientOpts(client, eo, "cdn") return initClientOpts(client, eo, "cdn")
} }
// NewOrchestrationV1 creates a ServiceClient that may be used to access the v1 orchestration service. // NewOrchestrationV1 creates a ServiceClient that may be used to access the v1
// orchestration service.
func NewOrchestrationV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewOrchestrationV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
return initClientOpts(client, eo, "orchestration") return initClientOpts(client, eo, "orchestration")
} }
@ -280,14 +316,16 @@ func NewDBV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*
return initClientOpts(client, eo, "database") return initClientOpts(client, eo, "database")
} }
// NewDNSV2 creates a ServiceClient that may be used to access the v2 DNS service. // NewDNSV2 creates a ServiceClient that may be used to access the v2 DNS
// service.
func NewDNSV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewDNSV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
sc, err := initClientOpts(client, eo, "dns") sc, err := initClientOpts(client, eo, "dns")
sc.ResourceBase = sc.Endpoint + "v2/" sc.ResourceBase = sc.Endpoint + "v2/"
return sc, err return sc, err
} }
// NewImageServiceV2 creates a ServiceClient that may be used to access the v2 image service. // NewImageServiceV2 creates a ServiceClient that may be used to access the v2
// image service.
func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
sc, err := initClientOpts(client, eo, "image") sc, err := initClientOpts(client, eo, "image")
sc.ResourceBase = sc.Endpoint + "v2/" sc.ResourceBase = sc.Endpoint + "v2/"

View File

@ -0,0 +1,14 @@
/*
Package openstack contains resources for the individual OpenStack projects
supported in Gophercloud. It also includes functions to authenticate to an
OpenStack cloud and for provisioning various service-level clients.
Example of Creating a Service Client
ao, err := openstack.AuthOptionsFromEnv()
provider, err := openstack.AuthenticatedClient(ao)
client, err := openstack.NewNetworkV2(client, gophercloud.EndpointOpts{
Region: os.Getenv("OS_REGION_NAME"),
})
*/
package openstack

View File

@ -6,12 +6,16 @@ import (
tokens3 "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens" tokens3 "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens"
) )
// V2EndpointURL discovers the endpoint URL for a specific service from a ServiceCatalog acquired /*
// during the v2 identity service. The specified EndpointOpts are used to identify a unique, V2EndpointURL discovers the endpoint URL for a specific service from a
// unambiguous endpoint to return. It's an error both when multiple endpoints match the provided ServiceCatalog acquired during the v2 identity service.
// criteria and when none do. The minimum that can be specified is a Type, but you will also often
// need to specify a Name and/or a Region depending on what's available on your OpenStack The specified EndpointOpts are used to identify a unique, unambiguous endpoint
// deployment. to return. It's an error both when multiple endpoints match the provided
criteria and when none do. The minimum that can be specified is a Type, but you
will also often need to specify a Name and/or a Region depending on what's
available on your OpenStack deployment.
*/
func V2EndpointURL(catalog *tokens2.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error) { func V2EndpointURL(catalog *tokens2.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error) {
// Extract Endpoints from the catalog entries that match the requested Type, Name if provided, and Region if provided. // Extract Endpoints from the catalog entries that match the requested Type, Name if provided, and Region if provided.
var endpoints = make([]tokens2.Endpoint, 0, 1) var endpoints = make([]tokens2.Endpoint, 0, 1)
@ -54,12 +58,16 @@ func V2EndpointURL(catalog *tokens2.ServiceCatalog, opts gophercloud.EndpointOpt
return "", err return "", err
} }
// V3EndpointURL discovers the endpoint URL for a specific service from a Catalog acquired /*
// during the v3 identity service. The specified EndpointOpts are used to identify a unique, V3EndpointURL discovers the endpoint URL for a specific service from a Catalog
// unambiguous endpoint to return. It's an error both when multiple endpoints match the provided acquired during the v3 identity service.
// criteria and when none do. The minimum that can be specified is a Type, but you will also often
// need to specify a Name and/or a Region depending on what's available on your OpenStack The specified EndpointOpts are used to identify a unique, unambiguous endpoint
// deployment. to return. It's an error both when multiple endpoints match the provided
criteria and when none do. The minimum that can be specified is a Type, but you
will also often need to specify a Name and/or a Region depending on what's
available on your OpenStack deployment.
*/
func V3EndpointURL(catalog *tokens3.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error) { func V3EndpointURL(catalog *tokens3.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error) {
// Extract Endpoints from the catalog entries that match the requested Type, Interface, // Extract Endpoints from the catalog entries that match the requested Type, Interface,
// Name if provided, and Region if provided. // Name if provided, and Region if provided.

View File

@ -1,7 +1,65 @@
// Package tenants provides information and interaction with the /*
// tenants API resource for the OpenStack Identity service. Package tenants provides information and interaction with the
// tenants API resource for the OpenStack Identity service.
// See http://developer.openstack.org/api-ref-identity-v2.html#identity-auth-v2
// and http://developer.openstack.org/api-ref-identity-v2.html#admin-tenants See http://developer.openstack.org/api-ref-identity-v2.html#identity-auth-v2
// for more information. and http://developer.openstack.org/api-ref-identity-v2.html#admin-tenants
for more information.
Example to List Tenants
listOpts := tenants.ListOpts{
Limit: 2,
}
allPages, err := tenants.List(identityClient, listOpts).AllPages()
if err != nil {
panic(err)
}
allTenants, err := tenants.ExtractTenants(allPages)
if err != nil {
panic(err)
}
for _, tenant := range allTenants {
fmt.Printf("%+v\n", tenant)
}
Example to Create a Tenant
createOpts := tenants.CreateOpts{
Name: "tenant_name",
Description: "this is a tenant",
Enabled: gophercloud.Enabled,
}
tenant, err := tenants.Create(identityClient, createOpts).Extract()
if err != nil {
panic(err)
}
Example to Update a Tenant
tenantID := "e6db6ed6277c461a853458589063b295"
updateOpts := tenants.UpdateOpts{
Description: "this is a new description",
Enabled: gophercloud.Disabled,
}
tenant, err := tenants.Update(identityClient, tenantID, updateOpts).Extract()
if err != nil {
panic(err)
}
Example to Delete a Tenant
tenantID := "e6db6ed6277c461a853458589063b295"
err := tenants.Delete(identitYClient, tenantID).ExtractErr()
if err != nil {
panic(err)
}
*/
package tenants package tenants

View File

@ -9,6 +9,7 @@ import (
type ListOpts struct { type ListOpts struct {
// Marker is the ID of the last Tenant on the previous page. // Marker is the ID of the last Tenant on the previous page.
Marker string `q:"marker"` Marker string `q:"marker"`
// Limit specifies the page size. // Limit specifies the page size.
Limit int `q:"limit"` Limit int `q:"limit"`
} }
@ -32,18 +33,22 @@ func List(client *gophercloud.ServiceClient, opts *ListOpts) pagination.Pager {
type CreateOpts struct { type CreateOpts struct {
// Name is the name of the tenant. // Name is the name of the tenant.
Name string `json:"name" required:"true"` Name string `json:"name" required:"true"`
// Description is the description of the tenant. // Description is the description of the tenant.
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
// Enabled sets the tenant status to enabled or disabled. // Enabled sets the tenant status to enabled or disabled.
Enabled *bool `json:"enabled,omitempty"` Enabled *bool `json:"enabled,omitempty"`
} }
// CreateOptsBuilder describes struct types that can be accepted by the Create call. // CreateOptsBuilder enables extensions to add additional parameters to the
// Create request.
type CreateOptsBuilder interface { type CreateOptsBuilder interface {
ToTenantCreateMap() (map[string]interface{}, error) ToTenantCreateMap() (map[string]interface{}, error)
} }
// ToTenantCreateMap assembles a request body based on the contents of a CreateOpts. // ToTenantCreateMap assembles a request body based on the contents of
// a CreateOpts.
func (opts CreateOpts) ToTenantCreateMap() (map[string]interface{}, error) { func (opts CreateOpts) ToTenantCreateMap() (map[string]interface{}, error) {
return gophercloud.BuildRequestBody(opts, "tenant") return gophercloud.BuildRequestBody(opts, "tenant")
} }
@ -67,17 +72,21 @@ func Get(client *gophercloud.ServiceClient, id string) (r GetResult) {
return return
} }
// UpdateOptsBuilder allows extensions to add additional attributes to the Update request. // UpdateOptsBuilder allows extensions to add additional parameters to the
// Update request.
type UpdateOptsBuilder interface { type UpdateOptsBuilder interface {
ToTenantUpdateMap() (map[string]interface{}, error) ToTenantUpdateMap() (map[string]interface{}, error)
} }
// UpdateOpts specifies the base attributes that may be updated on an existing server. // UpdateOpts specifies the base attributes that may be updated on an existing
// tenant.
type UpdateOpts struct { type UpdateOpts struct {
// Name is the name of the tenant. // Name is the name of the tenant.
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
// Description is the description of the tenant. // Description is the description of the tenant.
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
// Enabled sets the tenant status to enabled or disabled. // Enabled sets the tenant status to enabled or disabled.
Enabled *bool `json:"enabled,omitempty"` Enabled *bool `json:"enabled,omitempty"`
} }
@ -100,7 +109,7 @@ func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder
return return
} }
// Delete is the operation responsible for permanently deleting an API tenant. // Delete is the operation responsible for permanently deleting a tenant.
func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult) { func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult) {
_, r.Err = client.Delete(deleteURL(client, id), nil) _, r.Err = client.Delete(deleteURL(client, id), nil)
return return

View File

@ -43,7 +43,8 @@ func (r TenantPage) NextPageURL() (string, error) {
return gophercloud.ExtractNextURL(s.Links) return gophercloud.ExtractNextURL(s.Links)
} }
// ExtractTenants returns a slice of Tenants contained in a single page of results. // ExtractTenants returns a slice of Tenants contained in a single page of
// results.
func ExtractTenants(r pagination.Page) ([]Tenant, error) { func ExtractTenants(r pagination.Page) ([]Tenant, error) {
var s struct { var s struct {
Tenants []Tenant `json:"tenants"` Tenants []Tenant `json:"tenants"`
@ -56,7 +57,7 @@ type tenantResult struct {
gophercloud.Result gophercloud.Result
} }
// Extract interprets any tenantResults as a tenant. // Extract interprets any tenantResults as a Tenant.
func (r tenantResult) Extract() (*Tenant, error) { func (r tenantResult) Extract() (*Tenant, error) {
var s struct { var s struct {
Tenant *Tenant `json:"tenant"` Tenant *Tenant `json:"tenant"`
@ -65,22 +66,26 @@ func (r tenantResult) Extract() (*Tenant, error) {
return s.Tenant, err return s.Tenant, err
} }
// GetResult temporarily contains the response from the Get call. // GetResult is the response from a Get request. Call its Extract method to
// interpret it as a Tenant.
type GetResult struct { type GetResult struct {
tenantResult tenantResult
} }
// CreateResult temporarily contains the reponse from the Create call. // CreateResult is the response from a Create request. Call its Extract method
// to interpret it as a Tenant.
type CreateResult struct { type CreateResult struct {
tenantResult tenantResult
} }
// DeleteResult temporarily contains the response from the Delete call. // DeleteResult is the response from a Get request. Call its ExtractErr method
// to determine if the call succeeded or failed.
type DeleteResult struct { type DeleteResult struct {
gophercloud.ErrResult gophercloud.ErrResult
} }
// UpdateResult temporarily contains the response from the Update call. // UpdateResult is the response from a Update request. Call its Extract method
// to interpret it as a Tenant.
type UpdateResult struct { type UpdateResult struct {
tenantResult tenantResult
} }

View File

@ -1,5 +1,46 @@
// Package tokens provides information and interaction with the token API /*
// resource for the OpenStack Identity service. Package tokens provides information and interaction with the token API
// For more information, see: resource for the OpenStack Identity service.
// http://developer.openstack.org/api-ref-identity-v2.html#identity-auth-v2
For more information, see:
http://developer.openstack.org/api-ref-identity-v2.html#identity-auth-v2
Example to Create an Unscoped Token from a Password
authOpts := gophercloud.AuthOptions{
Username: "user",
Password: "pass"
}
token, err := tokens.Create(identityClient, authOpts).ExtractToken()
if err != nil {
panic(err)
}
Example to Create a Token from a Tenant ID and Password
authOpts := gophercloud.AuthOptions{
Username: "user",
Password: "password",
TenantID: "fc394f2ab2df4114bde39905f800dc57"
}
token, err := tokens.Create(identityClient, authOpts).ExtractToken()
if err != nil {
panic(err)
}
Example to Create a Token from a Tenant Name and Password
authOpts := gophercloud.AuthOptions{
Username: "user",
Password: "password",
TenantName: "tenantname"
}
token, err := tokens.Create(identityClient, authOpts).ExtractToken()
if err != nil {
panic(err)
}
*/
package tokens package tokens

View File

@ -2,17 +2,21 @@ package tokens
import "github.com/gophercloud/gophercloud" import "github.com/gophercloud/gophercloud"
// PasswordCredentialsV2 represents the required options to authenticate
// with a username and password.
type PasswordCredentialsV2 struct { type PasswordCredentialsV2 struct {
Username string `json:"username" required:"true"` Username string `json:"username" required:"true"`
Password string `json:"password" required:"true"` Password string `json:"password" required:"true"`
} }
// TokenCredentialsV2 represents the required options to authenticate
// with a token.
type TokenCredentialsV2 struct { type TokenCredentialsV2 struct {
ID string `json:"id,omitempty" required:"true"` ID string `json:"id,omitempty" required:"true"`
} }
// AuthOptionsV2 wraps a gophercloud AuthOptions in order to adhere to the AuthOptionsBuilder // AuthOptionsV2 wraps a gophercloud AuthOptions in order to adhere to the
// interface. // AuthOptionsBuilder interface.
type AuthOptionsV2 struct { type AuthOptionsV2 struct {
PasswordCredentials *PasswordCredentialsV2 `json:"passwordCredentials,omitempty" xor:"TokenCredentials"` PasswordCredentials *PasswordCredentialsV2 `json:"passwordCredentials,omitempty" xor:"TokenCredentials"`
@ -23,15 +27,16 @@ type AuthOptionsV2 struct {
TenantID string `json:"tenantId,omitempty"` TenantID string `json:"tenantId,omitempty"`
TenantName string `json:"tenantName,omitempty"` TenantName string `json:"tenantName,omitempty"`
// TokenCredentials allows users to authenticate (possibly as another user) with an // TokenCredentials allows users to authenticate (possibly as another user)
// authentication token ID. // with an authentication token ID.
TokenCredentials *TokenCredentialsV2 `json:"token,omitempty" xor:"PasswordCredentials"` TokenCredentials *TokenCredentialsV2 `json:"token,omitempty" xor:"PasswordCredentials"`
} }
// AuthOptionsBuilder describes any argument that may be passed to the Create call. // AuthOptionsBuilder allows extensions to add additional parameters to the
// token create request.
type AuthOptionsBuilder interface { type AuthOptionsBuilder interface {
// ToTokenCreateMap assembles the Create request body, returning an error if parameters are // ToTokenCreateMap assembles the Create request body, returning an error
// missing or inconsistent. // if parameters are missing or inconsistent.
ToTokenV2CreateMap() (map[string]interface{}, error) ToTokenV2CreateMap() (map[string]interface{}, error)
} }
@ -47,8 +52,7 @@ type AuthOptions struct {
TokenID string TokenID string
} }
// ToTokenV2CreateMap allows AuthOptions to satisfy the AuthOptionsBuilder // ToTokenV2CreateMap builds a token request body from the given AuthOptions.
// interface in the v2 tokens package
func (opts AuthOptions) ToTokenV2CreateMap() (map[string]interface{}, error) { func (opts AuthOptions) ToTokenV2CreateMap() (map[string]interface{}, error) {
v2Opts := AuthOptionsV2{ v2Opts := AuthOptionsV2{
TenantID: opts.TenantID, TenantID: opts.TenantID,
@ -74,9 +78,9 @@ func (opts AuthOptions) ToTokenV2CreateMap() (map[string]interface{}, error) {
} }
// Create authenticates to the identity service and attempts to acquire a Token. // Create authenticates to the identity service and attempts to acquire a Token.
// If successful, the CreateResult // Generally, rather than interact with this call directly, end users should
// Generally, rather than interact with this call directly, end users should call openstack.AuthenticatedClient(), // call openstack.AuthenticatedClient(), which abstracts all of the gory details
// which abstracts all of the gory details about navigating service catalogs and such. // about navigating service catalogs and such.
func Create(client *gophercloud.ServiceClient, auth AuthOptionsBuilder) (r CreateResult) { func Create(client *gophercloud.ServiceClient, auth AuthOptionsBuilder) (r CreateResult) {
b, err := auth.ToTokenV2CreateMap() b, err := auth.ToTokenV2CreateMap()
if err != nil { if err != nil {

View File

@ -7,20 +7,24 @@ import (
"github.com/gophercloud/gophercloud/openstack/identity/v2/tenants" "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants"
) )
// Token provides only the most basic information related to an authentication token. // Token provides only the most basic information related to an authentication
// token.
type Token struct { type Token struct {
// ID provides the primary means of identifying a user to the OpenStack API. // ID provides the primary means of identifying a user to the OpenStack API.
// OpenStack defines this field as an opaque value, so do not depend on its content. // OpenStack defines this field as an opaque value, so do not depend on its
// It is safe, however, to compare for equality. // content. It is safe, however, to compare for equality.
ID string ID string
// ExpiresAt provides a timestamp in ISO 8601 format, indicating when the authentication token becomes invalid. // ExpiresAt provides a timestamp in ISO 8601 format, indicating when the
// After this point in time, future API requests made using this authentication token will respond with errors. // authentication token becomes invalid. After this point in time, future
// Either the caller will need to reauthenticate manually, or more preferably, the caller should exploit automatic re-authentication. // API requests made using this authentication token will respond with
// errors. Either the caller will need to reauthenticate manually, or more
// preferably, the caller should exploit automatic re-authentication.
// See the AuthOptions structure for more details. // See the AuthOptions structure for more details.
ExpiresAt time.Time ExpiresAt time.Time
// Tenant provides information about the tenant to which this token grants access. // Tenant provides information about the tenant to which this token grants
// access.
Tenant tenants.Tenant Tenant tenants.Tenant
} }
@ -38,13 +42,17 @@ type User struct {
} }
// Endpoint represents a single API endpoint offered by a service. // Endpoint represents a single API endpoint offered by a service.
// It provides the public and internal URLs, if supported, along with a region specifier, again if provided. // It provides the public and internal URLs, if supported, along with a region
// specifier, again if provided.
//
// The significance of the Region field will depend upon your provider. // The significance of the Region field will depend upon your provider.
// //
// In addition, the interface offered by the service will have version information associated with it // In addition, the interface offered by the service will have version
// through the VersionId, VersionInfo, and VersionList fields, if provided or supported. // information associated with it through the VersionId, VersionInfo, and
// VersionList fields, if provided or supported.
// //
// In all cases, fields which aren't supported by the provider and service combined will assume a zero-value (""). // In all cases, fields which aren't supported by the provider and service
// combined will assume a zero-value ("").
type Endpoint struct { type Endpoint struct {
TenantID string `json:"tenantId"` TenantID string `json:"tenantId"`
PublicURL string `json:"publicURL"` PublicURL string `json:"publicURL"`
@ -56,38 +64,44 @@ type Endpoint struct {
VersionList string `json:"versionList"` VersionList string `json:"versionList"`
} }
// CatalogEntry provides a type-safe interface to an Identity API V2 service catalog listing. // CatalogEntry provides a type-safe interface to an Identity API V2 service
// Each class of service, such as cloud DNS or block storage services, will have a single // catalog listing.
// CatalogEntry representing it.
// //
// Note: when looking for the desired service, try, whenever possible, to key off the type field. // Each class of service, such as cloud DNS or block storage services, will have
// Otherwise, you'll tie the representation of the service to a specific provider. // a single CatalogEntry representing it.
//
// Note: when looking for the desired service, try, whenever possible, to key
// off the type field. Otherwise, you'll tie the representation of the service
// to a specific provider.
type CatalogEntry struct { type CatalogEntry struct {
// Name will contain the provider-specified name for the service. // Name will contain the provider-specified name for the service.
Name string `json:"name"` Name string `json:"name"`
// Type will contain a type string if OpenStack defines a type for the service. // Type will contain a type string if OpenStack defines a type for the
// Otherwise, for provider-specific services, the provider may assign their own type strings. // service. Otherwise, for provider-specific services, the provider may assign
// their own type strings.
Type string `json:"type"` Type string `json:"type"`
// Endpoints will let the caller iterate over all the different endpoints that may exist for // Endpoints will let the caller iterate over all the different endpoints that
// the service. // may exist for the service.
Endpoints []Endpoint `json:"endpoints"` Endpoints []Endpoint `json:"endpoints"`
} }
// ServiceCatalog provides a view into the service catalog from a previous, successful authentication. // ServiceCatalog provides a view into the service catalog from a previous,
// successful authentication.
type ServiceCatalog struct { type ServiceCatalog struct {
Entries []CatalogEntry Entries []CatalogEntry
} }
// CreateResult defers the interpretation of a created token. // CreateResult is the response from a Create request. Use ExtractToken() to
// Use ExtractToken() to interpret it as a Token, or ExtractServiceCatalog() to interpret it as a service catalog. // interpret it as a Token, or ExtractServiceCatalog() to interpret it as a
// service catalog.
type CreateResult struct { type CreateResult struct {
gophercloud.Result gophercloud.Result
} }
// GetResult is the deferred response from a Get call, which is the same with a Created token. // GetResult is the deferred response from a Get call, which is the same with a
// Use ExtractUser() to interpret it as a User. // Created token. Use ExtractUser() to interpret it as a User.
type GetResult struct { type GetResult struct {
CreateResult CreateResult
} }
@ -121,7 +135,8 @@ func (r CreateResult) ExtractToken() (*Token, error) {
}, nil }, nil
} }
// ExtractServiceCatalog returns the ServiceCatalog that was generated along with the user's Token. // ExtractServiceCatalog returns the ServiceCatalog that was generated along
// with the user's Token.
func (r CreateResult) ExtractServiceCatalog() (*ServiceCatalog, error) { func (r CreateResult) ExtractServiceCatalog() (*ServiceCatalog, error) {
var s struct { var s struct {
Access struct { Access struct {

View File

@ -1,6 +1,108 @@
// Package tokens provides information and interaction with the token API /*
// resource for the OpenStack Identity service. Package tokens provides information and interaction with the token API
// resource for the OpenStack Identity service.
// For more information, see:
// http://developer.openstack.org/api-ref-identity-v3.html#tokens-v3 For more information, see:
http://developer.openstack.org/api-ref-identity-v3.html#tokens-v3
Example to Create a Token From a Username and Password
authOptions := tokens.AuthOptions{
UserID: "username",
Password: "password",
}
token, err := tokens.Create(identityClient, authOptions).ExtractToken()
if err != nil {
panic(err)
}
Example to Create a Token From a Username, Password, and Domain
authOptions := tokens.AuthOptions{
UserID: "username",
Password: "password",
DomainID: "default",
}
token, err := tokens.Create(identityClient, authOptions).ExtractToken()
if err != nil {
panic(err)
}
authOptions = tokens.AuthOptions{
UserID: "username",
Password: "password",
DomainName: "default",
}
token, err = tokens.Create(identityClient, authOptions).ExtractToken()
if err != nil {
panic(err)
}
Example to Create a Token From a Token
authOptions := tokens.AuthOptions{
TokenID: "token_id",
}
token, err := tokens.Create(identityClient, authOptions).ExtractToken()
if err != nil {
panic(err)
}
Example to Create a Token from a Username and Password with Project ID Scope
scope := tokens.Scope{
ProjectID: "0fe36e73809d46aeae6705c39077b1b3",
}
authOptions := tokens.AuthOptions{
Scope: &scope,
UserID: "username",
Password: "password",
}
token, err = tokens.Create(identityClient, authOptions).ExtractToken()
if err != nil {
panic(err)
}
Example to Create a Token from a Username and Password with Domain ID Scope
scope := tokens.Scope{
DomainID: "default",
}
authOptions := tokens.AuthOptions{
Scope: &scope,
UserID: "username",
Password: "password",
}
token, err = tokens.Create(identityClient, authOptions).ExtractToken()
if err != nil {
panic(err)
}
Example to Create a Token from a Username and Password with Project Name Scope
scope := tokens.Scope{
ProjectName: "project_name",
DomainID: "default",
}
authOptions := tokens.AuthOptions{
Scope: &scope,
UserID: "username",
Password: "password",
}
token, err = tokens.Create(identityClient, authOptions).ExtractToken()
if err != nil {
panic(err)
}
*/
package tokens package tokens

View File

@ -10,20 +10,22 @@ type Scope struct {
DomainName string DomainName string
} }
// AuthOptionsBuilder describes any argument that may be passed to the Create call. // AuthOptionsBuilder provides the ability for extensions to add additional
// parameters to AuthOptions. Extensions must satisfy all required methods.
type AuthOptionsBuilder interface { type AuthOptionsBuilder interface {
// ToTokenV3CreateMap assembles the Create request body, returning an error if parameters are // ToTokenV3CreateMap assembles the Create request body, returning an error
// missing or inconsistent. // if parameters are missing or inconsistent.
ToTokenV3CreateMap(map[string]interface{}) (map[string]interface{}, error) ToTokenV3CreateMap(map[string]interface{}) (map[string]interface{}, error)
ToTokenV3ScopeMap() (map[string]interface{}, error) ToTokenV3ScopeMap() (map[string]interface{}, error)
CanReauth() bool CanReauth() bool
} }
// AuthOptions represents options for authenticating a user.
type AuthOptions struct { type AuthOptions struct {
// IdentityEndpoint specifies the HTTP endpoint that is required to work with // IdentityEndpoint specifies the HTTP endpoint that is required to work with
// the Identity API of the appropriate version. While it's ultimately needed by // the Identity API of the appropriate version. While it's ultimately needed
// all of the identity services, it will often be populated by a provider-level // by all of the identity services, it will often be populated by a
// function. // provider-level function.
IdentityEndpoint string `json:"-"` IdentityEndpoint string `json:"-"`
// Username is required if using Identity V2 API. Consult with your provider's // Username is required if using Identity V2 API. Consult with your provider's
@ -39,11 +41,11 @@ type AuthOptions struct {
DomainID string `json:"-"` DomainID string `json:"-"`
DomainName string `json:"name,omitempty"` DomainName string `json:"name,omitempty"`
// AllowReauth should be set to true if you grant permission for Gophercloud to // AllowReauth should be set to true if you grant permission for Gophercloud
// cache your credentials in memory, and to allow Gophercloud to attempt to // to cache your credentials in memory, and to allow Gophercloud to attempt
// re-authenticate automatically if/when your token expires. If you set it to // to re-authenticate automatically if/when your token expires. If you set
// false, it will not cache these settings, but re-authentication will not be // it to false, it will not cache these settings, but re-authentication will
// possible. This setting defaults to false. // not be possible. This setting defaults to false.
AllowReauth bool `json:"-"` AllowReauth bool `json:"-"`
// TokenID allows users to authenticate (possibly as another user) with an // TokenID allows users to authenticate (possibly as another user) with an
@ -53,6 +55,7 @@ type AuthOptions struct {
Scope Scope `json:"-"` Scope Scope `json:"-"`
} }
// ToTokenV3CreateMap builds a request body from AuthOptions.
func (opts *AuthOptions) ToTokenV3CreateMap(scope map[string]interface{}) (map[string]interface{}, error) { func (opts *AuthOptions) ToTokenV3CreateMap(scope map[string]interface{}) (map[string]interface{}, error) {
gophercloudAuthOpts := gophercloud.AuthOptions{ gophercloudAuthOpts := gophercloud.AuthOptions{
Username: opts.Username, Username: opts.Username,
@ -67,6 +70,7 @@ func (opts *AuthOptions) ToTokenV3CreateMap(scope map[string]interface{}) (map[s
return gophercloudAuthOpts.ToTokenV3CreateMap(scope) return gophercloudAuthOpts.ToTokenV3CreateMap(scope)
} }
// ToTokenV3CreateMap builds a scope request body from AuthOptions.
func (opts *AuthOptions) ToTokenV3ScopeMap() (map[string]interface{}, error) { func (opts *AuthOptions) ToTokenV3ScopeMap() (map[string]interface{}, error) {
if opts.Scope.ProjectName != "" { if opts.Scope.ProjectName != "" {
// ProjectName provided: either DomainID or DomainName must also be supplied. // ProjectName provided: either DomainID or DomainName must also be supplied.
@ -125,7 +129,12 @@ func (opts *AuthOptions) ToTokenV3ScopeMap() (map[string]interface{}, error) {
}, },
}, nil }, nil
} else if opts.Scope.DomainName != "" { } else if opts.Scope.DomainName != "" {
return nil, gophercloud.ErrScopeDomainName{} // DomainName
return map[string]interface{}{
"domain": map[string]interface{}{
"name": &opts.Scope.DomainName,
},
}, nil
} }
return nil, nil return nil, nil
@ -141,7 +150,8 @@ func subjectTokenHeaders(c *gophercloud.ServiceClient, subjectToken string) map[
} }
} }
// Create authenticates and either generates a new token, or changes the Scope of an existing token. // Create authenticates and either generates a new token, or changes the Scope
// of an existing token.
func Create(c *gophercloud.ServiceClient, opts AuthOptionsBuilder) (r CreateResult) { func Create(c *gophercloud.ServiceClient, opts AuthOptionsBuilder) (r CreateResult) {
scope, err := opts.ToTokenV3ScopeMap() scope, err := opts.ToTokenV3ScopeMap()
if err != nil { if err != nil {

View File

@ -17,37 +17,45 @@ type Endpoint struct {
URL string `json:"url"` URL string `json:"url"`
} }
// CatalogEntry provides a type-safe interface to an Identity API V3 service catalog listing. // CatalogEntry provides a type-safe interface to an Identity API V3 service
// Each class of service, such as cloud DNS or block storage services, could have multiple // catalog listing. Each class of service, such as cloud DNS or block storage
// CatalogEntry representing it (one by interface type, e.g public, admin or internal). // services, could have multiple CatalogEntry representing it (one by interface
// type, e.g public, admin or internal).
// //
// Note: when looking for the desired service, try, whenever possible, to key off the type field. // Note: when looking for the desired service, try, whenever possible, to key
// Otherwise, you'll tie the representation of the service to a specific provider. // off the type field. Otherwise, you'll tie the representation of the service
// to a specific provider.
type CatalogEntry struct { type CatalogEntry struct {
// Service ID // Service ID
ID string `json:"id"` ID string `json:"id"`
// Name will contain the provider-specified name for the service. // Name will contain the provider-specified name for the service.
Name string `json:"name"` Name string `json:"name"`
// Type will contain a type string if OpenStack defines a type for the service.
// Otherwise, for provider-specific services, the provider may assign their own type strings. // Type will contain a type string if OpenStack defines a type for the
// service. Otherwise, for provider-specific services, the provider may
// assign their own type strings.
Type string `json:"type"` Type string `json:"type"`
// Endpoints will let the caller iterate over all the different endpoints that may exist for
// the service. // Endpoints will let the caller iterate over all the different endpoints that
// may exist for the service.
Endpoints []Endpoint `json:"endpoints"` Endpoints []Endpoint `json:"endpoints"`
} }
// ServiceCatalog provides a view into the service catalog from a previous, successful authentication. // ServiceCatalog provides a view into the service catalog from a previous,
// successful authentication.
type ServiceCatalog struct { type ServiceCatalog struct {
Entries []CatalogEntry `json:"catalog"` Entries []CatalogEntry `json:"catalog"`
} }
// Domain provides information about the domain to which this token grants access. // Domain provides information about the domain to which this token grants
// access.
type Domain struct { type Domain struct {
ID string `json:"id"` ID string `json:"id"`
Name string `json:"name"` Name string `json:"name"`
} }
// User represents a user resource that exists on the API. // User represents a user resource that exists in the Identity Service.
type User struct { type User struct {
Domain Domain `json:"domain"` Domain Domain `json:"domain"`
ID string `json:"id"` ID string `json:"id"`
@ -67,7 +75,8 @@ type Project struct {
Name string `json:"name"` Name string `json:"name"`
} }
// commonResult is the deferred result of a Create or a Get call. // commonResult is the response from a request. A commonResult has various
// methods which can be used to extract different details about the result.
type commonResult struct { type commonResult struct {
gophercloud.Result gophercloud.Result
} }
@ -92,7 +101,8 @@ func (r commonResult) ExtractToken() (*Token, error) {
return &s, err return &s, err
} }
// ExtractServiceCatalog returns the ServiceCatalog that was generated along with the user's Token. // ExtractServiceCatalog returns the ServiceCatalog that was generated along
// with the user's Token.
func (r commonResult) ExtractServiceCatalog() (*ServiceCatalog, error) { func (r commonResult) ExtractServiceCatalog() (*ServiceCatalog, error) {
var s ServiceCatalog var s ServiceCatalog
err := r.ExtractInto(&s) err := r.ExtractInto(&s)
@ -126,27 +136,31 @@ func (r commonResult) ExtractProject() (*Project, error) {
return s.Project, err return s.Project, err
} }
// CreateResult defers the interpretation of a created token. // CreateResult is the response from a Create request. Use ExtractToken()
// Use ExtractToken() to interpret it as a Token, or ExtractServiceCatalog() to interpret it as a service catalog. // to interpret it as a Token, or ExtractServiceCatalog() to interpret it
// as a service catalog.
type CreateResult struct { type CreateResult struct {
commonResult commonResult
} }
// GetResult is the deferred response from a Get call. // GetResult is the response from a Get request. Use ExtractToken()
// to interpret it as a Token, or ExtractServiceCatalog() to interpret it
// as a service catalog.
type GetResult struct { type GetResult struct {
commonResult commonResult
} }
// RevokeResult is the deferred response from a Revoke call. // RevokeResult is response from a Revoke request.
type RevokeResult struct { type RevokeResult struct {
commonResult commonResult
} }
// Token is a string that grants a user access to a controlled set of services in an OpenStack provider. // Token is a string that grants a user access to a controlled set of services
// Each Token is valid for a set length of time. // in an OpenStack provider. Each Token is valid for a set length of time.
type Token struct { type Token struct {
// ID is the issued token. // ID is the issued token.
ID string `json:"id"` ID string `json:"id"`
// ExpiresAt is the timestamp at which this token will no longer be accepted. // ExpiresAt is the timestamp at which this token will no longer be accepted.
ExpiresAt time.Time `json:"expires_at"` ExpiresAt time.Time `json:"expires_at"`
} }

View File

@ -10,10 +10,28 @@ import (
"time" "time"
) )
// BuildRequestBody builds a map[string]interface from the given `struct`. If /*
// parent is not the empty string, the final map[string]interface returned will BuildRequestBody builds a map[string]interface from the given `struct`. If
// encapsulate the built one parent is not an empty string, the final map[string]interface returned will
// encapsulate the built one. For example:
disk := 1
createOpts := flavors.CreateOpts{
ID: "1",
Name: "m1.tiny",
Disk: &disk,
RAM: 512,
VCPUs: 1,
RxTxFactor: 1.0,
}
body, err := gophercloud.BuildRequestBody(createOpts, "flavor")
The above example can be run as-is, however it is recommended to look at how
BuildRequestBody is used within Gophercloud to more fully understand how it
fits within the request process as a whole rather than use it directly as shown
above.
*/
func BuildRequestBody(opts interface{}, parent string) (map[string]interface{}, error) { func BuildRequestBody(opts interface{}, parent string) (map[string]interface{}, error) {
optsValue := reflect.ValueOf(opts) optsValue := reflect.ValueOf(opts)
if optsValue.Kind() == reflect.Ptr { if optsValue.Kind() == reflect.Ptr {

View File

@ -224,9 +224,8 @@ type HeaderResult struct {
Result Result
} }
// ExtractHeader will return the http.Header and error from the HeaderResult. // ExtractInto allows users to provide an object into which `Extract` will
// // extract the http.Header headers of the result.
// header, err := objects.Create(client, "my_container", objects.CreateOpts{}).ExtractHeader()
func (r HeaderResult) ExtractInto(to interface{}) error { func (r HeaderResult) ExtractInto(to interface{}) error {
if r.Err != nil { if r.Err != nil {
return r.Err return r.Err

2
vendor/golang.org/x/crypto/AUTHORS generated vendored
View File

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

View File

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

View File

@ -12,10 +12,9 @@ import (
"crypto/subtle" "crypto/subtle"
"errors" "errors"
"fmt" "fmt"
"golang.org/x/crypto/blowfish"
"io" "io"
"strconv" "strconv"
"golang.org/x/crypto/blowfish"
) )
const ( const (
@ -206,6 +205,7 @@ func bcrypt(password []byte, cost int, salt []byte) ([]byte, error) {
} }
func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) { func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cipher, error) {
csalt, err := base64Decode(salt) csalt, err := base64Decode(salt)
if err != nil { if err != nil {
return nil, err return nil, err
@ -213,8 +213,7 @@ func expensiveBlowfishSetup(key []byte, cost uint32, salt []byte) (*blowfish.Cip
// Bug compatibility with C bcrypt implementations. They use the trailing // Bug compatibility with C bcrypt implementations. They use the trailing
// NULL in the key string during expansion. // NULL in the key string during expansion.
// We copy the key to prevent changing the underlying array. ckey := append(key, 0)
ckey := append(key[:len(key):len(key)], 0)
c, err := blowfish.NewSaltedCipher(ckey, csalt) c, err := blowfish.NewSaltedCipher(ckey, csalt)
if err != nil { if err != nil {

View File

@ -6,7 +6,7 @@
package blowfish package blowfish
// The code is a port of Bruce Schneier's C implementation. // The code is a port of Bruce Schneier's C implementation.
// See https://www.schneier.com/blowfish.html. // See http://www.schneier.com/blowfish.html.
import "strconv" import "strconv"

View File

@ -4,7 +4,7 @@
// The startup permutation array and substitution boxes. // The startup permutation array and substitution boxes.
// They are the hexadecimal digits of PI; see: // They are the hexadecimal digits of PI; see:
// https://www.schneier.com/code/constants.txt. // http://www.schneier.com/code/constants.txt.
package blowfish package blowfish

View File

@ -3,8 +3,7 @@
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
/* /*
Package poly1305 implements Poly1305 one-time message authentication code as Package poly1305 implements Poly1305 one-time message authentication code as specified in http://cr.yp.to/mac/poly1305-20050329.pdf.
specified in https://cr.yp.to/mac/poly1305-20050329.pdf.
Poly1305 is a fast, one-time authentication function. It is infeasible for an Poly1305 is a fast, one-time authentication function. It is infeasible for an
attacker to generate an authenticator for a message without the key. However, a attacker to generate an authenticator for a message without the key. However, a

View File

@ -54,9 +54,9 @@
ADCQ t3, h1; \ ADCQ t3, h1; \
ADCQ $0, h2 ADCQ $0, h2
DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF DATA poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF
DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC DATA poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
GLOBL ·poly1305Mask<>(SB), RODATA, $16 GLOBL poly1305Mask<>(SB), RODATA, $16
// func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]key) // func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]key)
TEXT ·poly1305(SB), $0-32 TEXT ·poly1305(SB), $0-32
@ -65,20 +65,28 @@ TEXT ·poly1305(SB), $0-32
MOVQ mlen+16(FP), R15 MOVQ mlen+16(FP), R15
MOVQ key+24(FP), AX MOVQ key+24(FP), AX
MOVQ 0(AX), R11 MOVQ SP, BP
MOVQ 8(AX), R12 ANDQ $0xFFFFFFFFFFFFFFF0, SP
ANDQ ·poly1305Mask<>(SB), R11 // r0 SUBQ $32, SP
ANDQ ·poly1305Mask<>+8(SB), R12 // r1
MOVOU 0(AX), X0
MOVOU 16(AX), X1
MOVOU poly1305Mask<>(SB), X2
PAND X2, X0
MOVO X0, 0(SP)
MOVO X1, 16(SP)
XORQ R8, R8 // h0 XORQ R8, R8 // h0
XORQ R9, R9 // h1 XORQ R9, R9 // h1
XORQ R10, R10 // h2 XORQ R10, R10 // h2
MOVQ 0(SP), R11 // r0
MOVQ 8(SP), R12 // r1
CMPQ R15, $16 CMPQ R15, $16
JB bytes_between_0_and_15 JB bytes_between_0_and_15
loop: loop:
POLY1305_ADD(SI, R8, R9, R10) POLY1305_ADD(SI, R8, R9, R10)
multiply: multiply:
POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14) POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14)
SUBQ $16, R15 SUBQ $16, R15
@ -116,10 +124,10 @@ done:
SBBQ $3, R10 SBBQ $3, R10
CMOVQCS R8, AX CMOVQCS R8, AX
CMOVQCS R9, BX CMOVQCS R9, BX
MOVQ key+24(FP), R8 ADDQ 16(SP), AX
ADDQ 16(R8), AX ADCQ 24(SP), BX
ADCQ 24(R8), BX
MOVQ BP, SP
MOVQ AX, 0(DI) MOVQ AX, 0(DI)
MOVQ BX, 8(DI) MOVQ BX, 8(DI)
RET RET

379
vendor/golang.org/x/crypto/poly1305/poly1305_arm.s generated vendored Normal file
View File

@ -0,0 +1,379 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This code was translated into a form compatible with 5a from the public
// domain source by Andrew Moon: github.com/floodyberry/poly1305-opt/blob/master/app/extensions/poly1305.
// +build arm,!gccgo,!appengine
DATA poly1305_init_constants_armv6<>+0x00(SB)/4, $0x3ffffff
DATA poly1305_init_constants_armv6<>+0x04(SB)/4, $0x3ffff03
DATA poly1305_init_constants_armv6<>+0x08(SB)/4, $0x3ffc0ff
DATA poly1305_init_constants_armv6<>+0x0c(SB)/4, $0x3f03fff
DATA poly1305_init_constants_armv6<>+0x10(SB)/4, $0x00fffff
GLOBL poly1305_init_constants_armv6<>(SB), 8, $20
// Warning: the linker may use R11 to synthesize certain instructions. Please
// take care and verify that no synthetic instructions use it.
TEXT poly1305_init_ext_armv6<>(SB),4,$-4
MOVM.DB.W [R4-R11], (R13)
MOVM.IA.W (R1), [R2-R5]
MOVW $poly1305_init_constants_armv6<>(SB), R7
MOVW R2, R8
MOVW R2>>26, R9
MOVW R3>>20, g
MOVW R4>>14, R11
MOVW R5>>8, R12
ORR R3<<6, R9, R9
ORR R4<<12, g, g
ORR R5<<18, R11, R11
MOVM.IA (R7), [R2-R6]
AND R8, R2, R2
AND R9, R3, R3
AND g, R4, R4
AND R11, R5, R5
AND R12, R6, R6
MOVM.IA.W [R2-R6], (R0)
EOR R2, R2, R2
EOR R3, R3, R3
EOR R4, R4, R4
EOR R5, R5, R5
EOR R6, R6, R6
MOVM.IA.W [R2-R6], (R0)
MOVM.IA.W (R1), [R2-R5]
MOVM.IA [R2-R6], (R0)
MOVM.IA.W (R13), [R4-R11]
RET
#define MOVW_UNALIGNED(Rsrc, Rdst, Rtmp, offset) \
MOVBU (offset+0)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+0)(Rdst); \
MOVBU (offset+1)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+1)(Rdst); \
MOVBU (offset+2)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+2)(Rdst); \
MOVBU (offset+3)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+3)(Rdst)
TEXT poly1305_blocks_armv6<>(SB),4,$-4
MOVM.DB.W [R4, R5, R6, R7, R8, R9, g, R11, R14], (R13)
SUB $128, R13
MOVW R0, 36(R13)
MOVW R1, 40(R13)
MOVW R2, 44(R13)
MOVW R1, R14
MOVW R2, R12
MOVW 56(R0), R8
WORD $0xe1180008 // TST R8, R8 not working see issue 5921
EOR R6, R6, R6
MOVW.EQ $(1<<24), R6
MOVW R6, 32(R13)
ADD $64, R13, g
MOVM.IA (R0), [R0-R9]
MOVM.IA [R0-R4], (g)
CMP $16, R12
BLO poly1305_blocks_armv6_done
poly1305_blocks_armv6_mainloop:
WORD $0xe31e0003 // TST R14, #3 not working see issue 5921
BEQ poly1305_blocks_armv6_mainloop_aligned
ADD $48, R13, g
MOVW_UNALIGNED(R14, g, R0, 0)
MOVW_UNALIGNED(R14, g, R0, 4)
MOVW_UNALIGNED(R14, g, R0, 8)
MOVW_UNALIGNED(R14, g, R0, 12)
MOVM.IA (g), [R0-R3]
ADD $16, R14
B poly1305_blocks_armv6_mainloop_loaded
poly1305_blocks_armv6_mainloop_aligned:
MOVM.IA.W (R14), [R0-R3]
poly1305_blocks_armv6_mainloop_loaded:
MOVW R0>>26, g
MOVW R1>>20, R11
MOVW R2>>14, R12
MOVW R14, 40(R13)
MOVW R3>>8, R4
ORR R1<<6, g, g
ORR R2<<12, R11, R11
ORR R3<<18, R12, R12
BIC $0xfc000000, R0, R0
BIC $0xfc000000, g, g
MOVW 32(R13), R3
BIC $0xfc000000, R11, R11
BIC $0xfc000000, R12, R12
ADD R0, R5, R5
ADD g, R6, R6
ORR R3, R4, R4
ADD R11, R7, R7
ADD $64, R13, R14
ADD R12, R8, R8
ADD R4, R9, R9
MOVM.IA (R14), [R0-R4]
MULLU R4, R5, (R11, g)
MULLU R3, R5, (R14, R12)
MULALU R3, R6, (R11, g)
MULALU R2, R6, (R14, R12)
MULALU R2, R7, (R11, g)
MULALU R1, R7, (R14, R12)
ADD R4<<2, R4, R4
ADD R3<<2, R3, R3
MULALU R1, R8, (R11, g)
MULALU R0, R8, (R14, R12)
MULALU R0, R9, (R11, g)
MULALU R4, R9, (R14, R12)
MOVW g, 24(R13)
MOVW R11, 28(R13)
MOVW R12, 16(R13)
MOVW R14, 20(R13)
MULLU R2, R5, (R11, g)
MULLU R1, R5, (R14, R12)
MULALU R1, R6, (R11, g)
MULALU R0, R6, (R14, R12)
MULALU R0, R7, (R11, g)
MULALU R4, R7, (R14, R12)
ADD R2<<2, R2, R2
ADD R1<<2, R1, R1
MULALU R4, R8, (R11, g)
MULALU R3, R8, (R14, R12)
MULALU R3, R9, (R11, g)
MULALU R2, R9, (R14, R12)
MOVW g, 8(R13)
MOVW R11, 12(R13)
MOVW R12, 0(R13)
MOVW R14, w+4(SP)
MULLU R0, R5, (R11, g)
MULALU R4, R6, (R11, g)
MULALU R3, R7, (R11, g)
MULALU R2, R8, (R11, g)
MULALU R1, R9, (R11, g)
MOVM.IA (R13), [R0-R7]
MOVW g>>26, R12
MOVW R4>>26, R14
ORR R11<<6, R12, R12
ORR R5<<6, R14, R14
BIC $0xfc000000, g, g
BIC $0xfc000000, R4, R4
ADD.S R12, R0, R0
ADC $0, R1, R1
ADD.S R14, R6, R6
ADC $0, R7, R7
MOVW R0>>26, R12
MOVW R6>>26, R14
ORR R1<<6, R12, R12
ORR R7<<6, R14, R14
BIC $0xfc000000, R0, R0
BIC $0xfc000000, R6, R6
ADD R14<<2, R14, R14
ADD.S R12, R2, R2
ADC $0, R3, R3
ADD R14, g, g
MOVW R2>>26, R12
MOVW g>>26, R14
ORR R3<<6, R12, R12
BIC $0xfc000000, g, R5
BIC $0xfc000000, R2, R7
ADD R12, R4, R4
ADD R14, R0, R0
MOVW R4>>26, R12
BIC $0xfc000000, R4, R8
ADD R12, R6, R9
MOVW w+44(SP), R12
MOVW w+40(SP), R14
MOVW R0, R6
CMP $32, R12
SUB $16, R12, R12
MOVW R12, 44(R13)
BHS poly1305_blocks_armv6_mainloop
poly1305_blocks_armv6_done:
MOVW 36(R13), R12
MOVW R5, 20(R12)
MOVW R6, 24(R12)
MOVW R7, 28(R12)
MOVW R8, 32(R12)
MOVW R9, 36(R12)
ADD $128, R13, R13
MOVM.IA.W (R13), [R4, R5, R6, R7, R8, R9, g, R11, R14]
RET
#define MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) \
MOVBU.P 1(Rsrc), Rtmp; \
MOVBU.P Rtmp, 1(Rdst); \
MOVBU.P 1(Rsrc), Rtmp; \
MOVBU.P Rtmp, 1(Rdst)
#define MOVWP_UNALIGNED(Rsrc, Rdst, Rtmp) \
MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp); \
MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp)
TEXT poly1305_finish_ext_armv6<>(SB),4,$-4
MOVM.DB.W [R4, R5, R6, R7, R8, R9, g, R11, R14], (R13)
SUB $16, R13, R13
MOVW R0, R5
MOVW R1, R6
MOVW R2, R7
MOVW R3, R8
AND.S R2, R2, R2
BEQ poly1305_finish_ext_armv6_noremaining
EOR R0, R0
MOVW R13, R9
MOVW R0, 0(R13)
MOVW R0, 4(R13)
MOVW R0, 8(R13)
MOVW R0, 12(R13)
WORD $0xe3110003 // TST R1, #3 not working see issue 5921
BEQ poly1305_finish_ext_armv6_aligned
WORD $0xe3120008 // TST R2, #8 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip8
MOVWP_UNALIGNED(R1, R9, g)
MOVWP_UNALIGNED(R1, R9, g)
poly1305_finish_ext_armv6_skip8:
WORD $0xe3120004 // TST $4, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip4
MOVWP_UNALIGNED(R1, R9, g)
poly1305_finish_ext_armv6_skip4:
WORD $0xe3120002 // TST $2, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip2
MOVHUP_UNALIGNED(R1, R9, g)
B poly1305_finish_ext_armv6_skip2
poly1305_finish_ext_armv6_aligned:
WORD $0xe3120008 // TST R2, #8 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip8_aligned
MOVM.IA.W (R1), [g-R11]
MOVM.IA.W [g-R11], (R9)
poly1305_finish_ext_armv6_skip8_aligned:
WORD $0xe3120004 // TST $4, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip4_aligned
MOVW.P 4(R1), g
MOVW.P g, 4(R9)
poly1305_finish_ext_armv6_skip4_aligned:
WORD $0xe3120002 // TST $2, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip2
MOVHU.P 2(R1), g
MOVH.P g, 2(R9)
poly1305_finish_ext_armv6_skip2:
WORD $0xe3120001 // TST $1, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip1
MOVBU.P 1(R1), g
MOVBU.P g, 1(R9)
poly1305_finish_ext_armv6_skip1:
MOVW $1, R11
MOVBU R11, 0(R9)
MOVW R11, 56(R5)
MOVW R5, R0
MOVW R13, R1
MOVW $16, R2
BL poly1305_blocks_armv6<>(SB)
poly1305_finish_ext_armv6_noremaining:
MOVW 20(R5), R0
MOVW 24(R5), R1
MOVW 28(R5), R2
MOVW 32(R5), R3
MOVW 36(R5), R4
MOVW R4>>26, R12
BIC $0xfc000000, R4, R4
ADD R12<<2, R12, R12
ADD R12, R0, R0
MOVW R0>>26, R12
BIC $0xfc000000, R0, R0
ADD R12, R1, R1
MOVW R1>>26, R12
BIC $0xfc000000, R1, R1
ADD R12, R2, R2
MOVW R2>>26, R12
BIC $0xfc000000, R2, R2
ADD R12, R3, R3
MOVW R3>>26, R12
BIC $0xfc000000, R3, R3
ADD R12, R4, R4
ADD $5, R0, R6
MOVW R6>>26, R12
BIC $0xfc000000, R6, R6
ADD R12, R1, R7
MOVW R7>>26, R12
BIC $0xfc000000, R7, R7
ADD R12, R2, g
MOVW g>>26, R12
BIC $0xfc000000, g, g
ADD R12, R3, R11
MOVW $-(1<<26), R12
ADD R11>>26, R12, R12
BIC $0xfc000000, R11, R11
ADD R12, R4, R14
MOVW R14>>31, R12
SUB $1, R12
AND R12, R6, R6
AND R12, R7, R7
AND R12, g, g
AND R12, R11, R11
AND R12, R14, R14
MVN R12, R12
AND R12, R0, R0
AND R12, R1, R1
AND R12, R2, R2
AND R12, R3, R3
AND R12, R4, R4
ORR R6, R0, R0
ORR R7, R1, R1
ORR g, R2, R2
ORR R11, R3, R3
ORR R14, R4, R4
ORR R1<<26, R0, R0
MOVW R1>>6, R1
ORR R2<<20, R1, R1
MOVW R2>>12, R2
ORR R3<<14, R2, R2
MOVW R3>>18, R3
ORR R4<<8, R3, R3
MOVW 40(R5), R6
MOVW 44(R5), R7
MOVW 48(R5), g
MOVW 52(R5), R11
ADD.S R6, R0, R0
ADC.S R7, R1, R1
ADC.S g, R2, R2
ADC.S R11, R3, R3
MOVM.IA [R0-R3], (R8)
MOVW R5, R12
EOR R0, R0, R0
EOR R1, R1, R1
EOR R2, R2, R2
EOR R3, R3, R3
EOR R4, R4, R4
EOR R5, R5, R5
EOR R6, R6, R6
EOR R7, R7, R7
MOVM.IA.W [R0-R7], (R12)
MOVM.IA [R0-R7], (R12)
ADD $16, R13, R13
MOVM.IA.W (R13), [R4, R5, R6, R7, R8, R9, g, R11, R14]
RET
// func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]key)
TEXT ·poly1305_auth_armv6(SB),0,$280-16
MOVW out+0(FP), R4
MOVW m+4(FP), R5
MOVW mlen+8(FP), R6
MOVW key+12(FP), R7
MOVW R13, R8
BIC $63, R13
SUB $64, R13, R13
MOVW R13, R0
MOVW R7, R1
BL poly1305_init_ext_armv6<>(SB)
BIC.S $15, R6, R2
BEQ poly1305_auth_armv6_noblocks
MOVW R13, R0
MOVW R5, R1
ADD R2, R5, R5
SUB R2, R6, R6
BL poly1305_blocks_armv6<>(SB)
poly1305_auth_armv6_noblocks:
MOVW R13, R0
MOVW R5, R1
MOVW R6, R2
MOVW R4, R3
BL poly1305_finish_ext_armv6<>(SB)
MOVW R8, R13
RET

View File

@ -6,8 +6,10 @@
package poly1305 package poly1305
// This function is implemented in sum_amd64.s // This function is implemented in poly1305_amd64.s
//go:noescape //go:noescape
func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte) func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
// Sum generates an authenticator for m using a one-time key and puts the // Sum generates an authenticator for m using a one-time key and puts the

View File

@ -2,12 +2,14 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build arm,!gccgo,!appengine,!nacl // +build arm,!gccgo,!appengine
package poly1305 package poly1305
// This function is implemented in sum_arm.s // This function is implemented in poly1305_arm.s
//go:noescape //go:noescape
func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte)
// Sum generates an authenticator for m using a one-time key and puts the // Sum generates an authenticator for m using a one-time key and puts the

View File

@ -1,427 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build arm,!gccgo,!appengine,!nacl
#include "textflag.h"
// This code was translated into a form compatible with 5a from the public
// domain source by Andrew Moon: github.com/floodyberry/poly1305-opt/blob/master/app/extensions/poly1305.
DATA ·poly1305_init_constants_armv6<>+0x00(SB)/4, $0x3ffffff
DATA ·poly1305_init_constants_armv6<>+0x04(SB)/4, $0x3ffff03
DATA ·poly1305_init_constants_armv6<>+0x08(SB)/4, $0x3ffc0ff
DATA ·poly1305_init_constants_armv6<>+0x0c(SB)/4, $0x3f03fff
DATA ·poly1305_init_constants_armv6<>+0x10(SB)/4, $0x00fffff
GLOBL ·poly1305_init_constants_armv6<>(SB), 8, $20
// Warning: the linker may use R11 to synthesize certain instructions. Please
// take care and verify that no synthetic instructions use it.
TEXT poly1305_init_ext_armv6<>(SB), NOSPLIT, $0
// Needs 16 bytes of stack and 64 bytes of space pointed to by R0. (It
// might look like it's only 60 bytes of space but the final four bytes
// will be written by another function.) We need to skip over four
// bytes of stack because that's saving the value of 'g'.
ADD $4, R13, R8
MOVM.IB [R4-R7], (R8)
MOVM.IA.W (R1), [R2-R5]
MOVW $·poly1305_init_constants_armv6<>(SB), R7
MOVW R2, R8
MOVW R2>>26, R9
MOVW R3>>20, g
MOVW R4>>14, R11
MOVW R5>>8, R12
ORR R3<<6, R9, R9
ORR R4<<12, g, g
ORR R5<<18, R11, R11
MOVM.IA (R7), [R2-R6]
AND R8, R2, R2
AND R9, R3, R3
AND g, R4, R4
AND R11, R5, R5
AND R12, R6, R6
MOVM.IA.W [R2-R6], (R0)
EOR R2, R2, R2
EOR R3, R3, R3
EOR R4, R4, R4
EOR R5, R5, R5
EOR R6, R6, R6
MOVM.IA.W [R2-R6], (R0)
MOVM.IA.W (R1), [R2-R5]
MOVM.IA [R2-R6], (R0)
ADD $20, R13, R0
MOVM.DA (R0), [R4-R7]
RET
#define MOVW_UNALIGNED(Rsrc, Rdst, Rtmp, offset) \
MOVBU (offset+0)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+0)(Rdst); \
MOVBU (offset+1)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+1)(Rdst); \
MOVBU (offset+2)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+2)(Rdst); \
MOVBU (offset+3)(Rsrc), Rtmp; \
MOVBU Rtmp, (offset+3)(Rdst)
TEXT poly1305_blocks_armv6<>(SB), NOSPLIT, $0
// Needs 24 bytes of stack for saved registers and then 88 bytes of
// scratch space after that. We assume that 24 bytes at (R13) have
// already been used: four bytes for the link register saved in the
// prelude of poly1305_auth_armv6, four bytes for saving the value of g
// in that function and 16 bytes of scratch space used around
// poly1305_finish_ext_armv6_skip1.
ADD $24, R13, R12
MOVM.IB [R4-R8, R14], (R12)
MOVW R0, 88(R13)
MOVW R1, 92(R13)
MOVW R2, 96(R13)
MOVW R1, R14
MOVW R2, R12
MOVW 56(R0), R8
WORD $0xe1180008 // TST R8, R8 not working see issue 5921
EOR R6, R6, R6
MOVW.EQ $(1<<24), R6
MOVW R6, 84(R13)
ADD $116, R13, g
MOVM.IA (R0), [R0-R9]
MOVM.IA [R0-R4], (g)
CMP $16, R12
BLO poly1305_blocks_armv6_done
poly1305_blocks_armv6_mainloop:
WORD $0xe31e0003 // TST R14, #3 not working see issue 5921
BEQ poly1305_blocks_armv6_mainloop_aligned
ADD $100, R13, g
MOVW_UNALIGNED(R14, g, R0, 0)
MOVW_UNALIGNED(R14, g, R0, 4)
MOVW_UNALIGNED(R14, g, R0, 8)
MOVW_UNALIGNED(R14, g, R0, 12)
MOVM.IA (g), [R0-R3]
ADD $16, R14
B poly1305_blocks_armv6_mainloop_loaded
poly1305_blocks_armv6_mainloop_aligned:
MOVM.IA.W (R14), [R0-R3]
poly1305_blocks_armv6_mainloop_loaded:
MOVW R0>>26, g
MOVW R1>>20, R11
MOVW R2>>14, R12
MOVW R14, 92(R13)
MOVW R3>>8, R4
ORR R1<<6, g, g
ORR R2<<12, R11, R11
ORR R3<<18, R12, R12
BIC $0xfc000000, R0, R0
BIC $0xfc000000, g, g
MOVW 84(R13), R3
BIC $0xfc000000, R11, R11
BIC $0xfc000000, R12, R12
ADD R0, R5, R5
ADD g, R6, R6
ORR R3, R4, R4
ADD R11, R7, R7
ADD $116, R13, R14
ADD R12, R8, R8
ADD R4, R9, R9
MOVM.IA (R14), [R0-R4]
MULLU R4, R5, (R11, g)
MULLU R3, R5, (R14, R12)
MULALU R3, R6, (R11, g)
MULALU R2, R6, (R14, R12)
MULALU R2, R7, (R11, g)
MULALU R1, R7, (R14, R12)
ADD R4<<2, R4, R4
ADD R3<<2, R3, R3
MULALU R1, R8, (R11, g)
MULALU R0, R8, (R14, R12)
MULALU R0, R9, (R11, g)
MULALU R4, R9, (R14, R12)
MOVW g, 76(R13)
MOVW R11, 80(R13)
MOVW R12, 68(R13)
MOVW R14, 72(R13)
MULLU R2, R5, (R11, g)
MULLU R1, R5, (R14, R12)
MULALU R1, R6, (R11, g)
MULALU R0, R6, (R14, R12)
MULALU R0, R7, (R11, g)
MULALU R4, R7, (R14, R12)
ADD R2<<2, R2, R2
ADD R1<<2, R1, R1
MULALU R4, R8, (R11, g)
MULALU R3, R8, (R14, R12)
MULALU R3, R9, (R11, g)
MULALU R2, R9, (R14, R12)
MOVW g, 60(R13)
MOVW R11, 64(R13)
MOVW R12, 52(R13)
MOVW R14, 56(R13)
MULLU R0, R5, (R11, g)
MULALU R4, R6, (R11, g)
MULALU R3, R7, (R11, g)
MULALU R2, R8, (R11, g)
MULALU R1, R9, (R11, g)
ADD $52, R13, R0
MOVM.IA (R0), [R0-R7]
MOVW g>>26, R12
MOVW R4>>26, R14
ORR R11<<6, R12, R12
ORR R5<<6, R14, R14
BIC $0xfc000000, g, g
BIC $0xfc000000, R4, R4
ADD.S R12, R0, R0
ADC $0, R1, R1
ADD.S R14, R6, R6
ADC $0, R7, R7
MOVW R0>>26, R12
MOVW R6>>26, R14
ORR R1<<6, R12, R12
ORR R7<<6, R14, R14
BIC $0xfc000000, R0, R0
BIC $0xfc000000, R6, R6
ADD R14<<2, R14, R14
ADD.S R12, R2, R2
ADC $0, R3, R3
ADD R14, g, g
MOVW R2>>26, R12
MOVW g>>26, R14
ORR R3<<6, R12, R12
BIC $0xfc000000, g, R5
BIC $0xfc000000, R2, R7
ADD R12, R4, R4
ADD R14, R0, R0
MOVW R4>>26, R12
BIC $0xfc000000, R4, R8
ADD R12, R6, R9
MOVW 96(R13), R12
MOVW 92(R13), R14
MOVW R0, R6
CMP $32, R12
SUB $16, R12, R12
MOVW R12, 96(R13)
BHS poly1305_blocks_armv6_mainloop
poly1305_blocks_armv6_done:
MOVW 88(R13), R12
MOVW R5, 20(R12)
MOVW R6, 24(R12)
MOVW R7, 28(R12)
MOVW R8, 32(R12)
MOVW R9, 36(R12)
ADD $48, R13, R0
MOVM.DA (R0), [R4-R8, R14]
RET
#define MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) \
MOVBU.P 1(Rsrc), Rtmp; \
MOVBU.P Rtmp, 1(Rdst); \
MOVBU.P 1(Rsrc), Rtmp; \
MOVBU.P Rtmp, 1(Rdst)
#define MOVWP_UNALIGNED(Rsrc, Rdst, Rtmp) \
MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp); \
MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp)
// func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]key)
TEXT ·poly1305_auth_armv6(SB), $196-16
// The value 196, just above, is the sum of 64 (the size of the context
// structure) and 132 (the amount of stack needed).
//
// At this point, the stack pointer (R13) has been moved down. It
// points to the saved link register and there's 196 bytes of free
// space above it.
//
// The stack for this function looks like:
//
// +---------------------
// |
// | 64 bytes of context structure
// |
// +---------------------
// |
// | 112 bytes for poly1305_blocks_armv6
// |
// +---------------------
// | 16 bytes of final block, constructed at
// | poly1305_finish_ext_armv6_skip8
// +---------------------
// | four bytes of saved 'g'
// +---------------------
// | lr, saved by prelude <- R13 points here
// +---------------------
MOVW g, 4(R13)
MOVW out+0(FP), R4
MOVW m+4(FP), R5
MOVW mlen+8(FP), R6
MOVW key+12(FP), R7
ADD $136, R13, R0 // 136 = 4 + 4 + 16 + 112
MOVW R7, R1
// poly1305_init_ext_armv6 will write to the stack from R13+4, but
// that's ok because none of the other values have been written yet.
BL poly1305_init_ext_armv6<>(SB)
BIC.S $15, R6, R2
BEQ poly1305_auth_armv6_noblocks
ADD $136, R13, R0
MOVW R5, R1
ADD R2, R5, R5
SUB R2, R6, R6
BL poly1305_blocks_armv6<>(SB)
poly1305_auth_armv6_noblocks:
ADD $136, R13, R0
MOVW R5, R1
MOVW R6, R2
MOVW R4, R3
MOVW R0, R5
MOVW R1, R6
MOVW R2, R7
MOVW R3, R8
AND.S R2, R2, R2
BEQ poly1305_finish_ext_armv6_noremaining
EOR R0, R0
ADD $8, R13, R9 // 8 = offset to 16 byte scratch space
MOVW R0, (R9)
MOVW R0, 4(R9)
MOVW R0, 8(R9)
MOVW R0, 12(R9)
WORD $0xe3110003 // TST R1, #3 not working see issue 5921
BEQ poly1305_finish_ext_armv6_aligned
WORD $0xe3120008 // TST R2, #8 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip8
MOVWP_UNALIGNED(R1, R9, g)
MOVWP_UNALIGNED(R1, R9, g)
poly1305_finish_ext_armv6_skip8:
WORD $0xe3120004 // TST $4, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip4
MOVWP_UNALIGNED(R1, R9, g)
poly1305_finish_ext_armv6_skip4:
WORD $0xe3120002 // TST $2, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip2
MOVHUP_UNALIGNED(R1, R9, g)
B poly1305_finish_ext_armv6_skip2
poly1305_finish_ext_armv6_aligned:
WORD $0xe3120008 // TST R2, #8 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip8_aligned
MOVM.IA.W (R1), [g-R11]
MOVM.IA.W [g-R11], (R9)
poly1305_finish_ext_armv6_skip8_aligned:
WORD $0xe3120004 // TST $4, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip4_aligned
MOVW.P 4(R1), g
MOVW.P g, 4(R9)
poly1305_finish_ext_armv6_skip4_aligned:
WORD $0xe3120002 // TST $2, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip2
MOVHU.P 2(R1), g
MOVH.P g, 2(R9)
poly1305_finish_ext_armv6_skip2:
WORD $0xe3120001 // TST $1, R2 not working see issue 5921
BEQ poly1305_finish_ext_armv6_skip1
MOVBU.P 1(R1), g
MOVBU.P g, 1(R9)
poly1305_finish_ext_armv6_skip1:
MOVW $1, R11
MOVBU R11, 0(R9)
MOVW R11, 56(R5)
MOVW R5, R0
ADD $8, R13, R1
MOVW $16, R2
BL poly1305_blocks_armv6<>(SB)
poly1305_finish_ext_armv6_noremaining:
MOVW 20(R5), R0
MOVW 24(R5), R1
MOVW 28(R5), R2
MOVW 32(R5), R3
MOVW 36(R5), R4
MOVW R4>>26, R12
BIC $0xfc000000, R4, R4
ADD R12<<2, R12, R12
ADD R12, R0, R0
MOVW R0>>26, R12
BIC $0xfc000000, R0, R0
ADD R12, R1, R1
MOVW R1>>26, R12
BIC $0xfc000000, R1, R1
ADD R12, R2, R2
MOVW R2>>26, R12
BIC $0xfc000000, R2, R2
ADD R12, R3, R3
MOVW R3>>26, R12
BIC $0xfc000000, R3, R3
ADD R12, R4, R4
ADD $5, R0, R6
MOVW R6>>26, R12
BIC $0xfc000000, R6, R6
ADD R12, R1, R7
MOVW R7>>26, R12
BIC $0xfc000000, R7, R7
ADD R12, R2, g
MOVW g>>26, R12
BIC $0xfc000000, g, g
ADD R12, R3, R11
MOVW $-(1<<26), R12
ADD R11>>26, R12, R12
BIC $0xfc000000, R11, R11
ADD R12, R4, R9
MOVW R9>>31, R12
SUB $1, R12
AND R12, R6, R6
AND R12, R7, R7
AND R12, g, g
AND R12, R11, R11
AND R12, R9, R9
MVN R12, R12
AND R12, R0, R0
AND R12, R1, R1
AND R12, R2, R2
AND R12, R3, R3
AND R12, R4, R4
ORR R6, R0, R0
ORR R7, R1, R1
ORR g, R2, R2
ORR R11, R3, R3
ORR R9, R4, R4
ORR R1<<26, R0, R0
MOVW R1>>6, R1
ORR R2<<20, R1, R1
MOVW R2>>12, R2
ORR R3<<14, R2, R2
MOVW R3>>18, R3
ORR R4<<8, R3, R3
MOVW 40(R5), R6
MOVW 44(R5), R7
MOVW 48(R5), g
MOVW 52(R5), R11
ADD.S R6, R0, R0
ADC.S R7, R1, R1
ADC.S g, R2, R2
ADC.S R11, R3, R3
MOVM.IA [R0-R3], (R8)
MOVW R5, R12
EOR R0, R0, R0
EOR R1, R1, R1
EOR R2, R2, R2
EOR R3, R3, R3
EOR R4, R4, R4
EOR R5, R5, R5
EOR R6, R6, R6
EOR R7, R7, R7
MOVM.IA.W [R0-R7], (R12)
MOVM.IA [R0-R7], (R12)
MOVW 4(R13), g
RET

File diff suppressed because it is too large Load Diff

View File

@ -5,23 +5,29 @@
// +build amd64,!appengine,!gccgo // +build amd64,!appengine,!gccgo
// This code was translated into a form compatible with 6a from the public // This code was translated into a form compatible with 6a from the public
// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html
// func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) // func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
// This needs up to 64 bytes at 360(SP); hence the non-obvious frame size. TEXT ·salsa2020XORKeyStream(SB),0,$512-40
TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVQ out+0(FP),DI MOVQ out+0(FP),DI
MOVQ in+8(FP),SI MOVQ in+8(FP),SI
MOVQ n+16(FP),DX MOVQ n+16(FP),DX
MOVQ nonce+24(FP),CX MOVQ nonce+24(FP),CX
MOVQ key+32(FP),R8 MOVQ key+32(FP),R8
MOVQ SP,R12 MOVQ SP,R11
MOVQ SP,R9 MOVQ $31,R9
ADDQ $31, R9 NOTQ R9
ANDQ $~31, R9 ANDQ R9,SP
MOVQ R9, SP ADDQ $32,SP
MOVQ R11,352(SP)
MOVQ R12,360(SP)
MOVQ R13,368(SP)
MOVQ R14,376(SP)
MOVQ R15,384(SP)
MOVQ BX,392(SP)
MOVQ BP,400(SP)
MOVQ DX,R9 MOVQ DX,R9
MOVQ CX,DX MOVQ CX,DX
MOVQ R8,R10 MOVQ R8,R10
@ -127,7 +133,7 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
SHRQ $32,CX SHRQ $32,CX
MOVL DX,16(SP) MOVL DX,16(SP)
MOVL CX, 36 (SP) MOVL CX, 36 (SP)
MOVQ R9,352(SP) MOVQ R9,408(SP)
MOVQ $20,DX MOVQ $20,DX
MOVOA 64(SP),X0 MOVOA 64(SP),X0
MOVOA 80(SP),X1 MOVOA 80(SP),X1
@ -644,7 +650,7 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL CX,244(DI) MOVL CX,244(DI)
MOVL R8,248(DI) MOVL R8,248(DI)
MOVL R9,252(DI) MOVL R9,252(DI)
MOVQ 352(SP),R9 MOVQ 408(SP),R9
SUBQ $256,R9 SUBQ $256,R9
ADDQ $256,SI ADDQ $256,SI
ADDQ $256,DI ADDQ $256,DI
@ -656,13 +662,13 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
CMPQ R9,$64 CMPQ R9,$64
JAE NOCOPY JAE NOCOPY
MOVQ DI,DX MOVQ DI,DX
LEAQ 360(SP),DI LEAQ 416(SP),DI
MOVQ R9,CX MOVQ R9,CX
REP; MOVSB REP; MOVSB
LEAQ 360(SP),DI LEAQ 416(SP),DI
LEAQ 360(SP),SI LEAQ 416(SP),SI
NOCOPY: NOCOPY:
MOVQ R9,352(SP) MOVQ R9,408(SP)
MOVOA 48(SP),X0 MOVOA 48(SP),X0
MOVOA 0(SP),X1 MOVOA 0(SP),X1
MOVOA 16(SP),X2 MOVOA 16(SP),X2
@ -861,7 +867,7 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL R8,44(DI) MOVL R8,44(DI)
MOVL R9,28(DI) MOVL R9,28(DI)
MOVL AX,12(DI) MOVL AX,12(DI)
MOVQ 352(SP),R9 MOVQ 408(SP),R9
MOVL 16(SP),CX MOVL 16(SP),CX
MOVL 36 (SP),R8 MOVL 36 (SP),R8
ADDQ $1,CX ADDQ $1,CX
@ -880,7 +886,14 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
REP; MOVSB REP; MOVSB
BYTESATLEAST64: BYTESATLEAST64:
DONE: DONE:
MOVQ R12,SP MOVQ 352(SP),R11
MOVQ 360(SP),R12
MOVQ 368(SP),R13
MOVQ 376(SP),R14
MOVQ 384(SP),R15
MOVQ 392(SP),BX
MOVQ 400(SP),BP
MOVQ R11,SP
RET RET
BYTESATLEAST65: BYTESATLEAST65:
SUBQ $64,R9 SUBQ $64,R9

View File

@ -19,6 +19,5 @@ func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
if len(in) == 0 { if len(in) == 0 {
return return
} }
_ = out[len(in)-1]
salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0])
} }

View File

@ -132,11 +132,8 @@ const (
keyPasteEnd keyPasteEnd
) )
var ( var pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'}
crlf = []byte{'\r', '\n'} var pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'}
pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'}
pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'}
)
// bytesToKey tries to parse a key sequence from b. If successful, it returns // bytesToKey tries to parse a key sequence from b. If successful, it returns
// the key and the remainder of the input. Otherwise it returns utf8.RuneError. // the key and the remainder of the input. Otherwise it returns utf8.RuneError.
@ -336,7 +333,7 @@ func (t *Terminal) advanceCursor(places int) {
// So, if we are stopping at the end of a line, we // So, if we are stopping at the end of a line, we
// need to write a newline so that our cursor can be // need to write a newline so that our cursor can be
// advanced to the next line. // advanced to the next line.
t.outBuf = append(t.outBuf, '\r', '\n') t.outBuf = append(t.outBuf, '\n')
} }
} }
@ -596,35 +593,6 @@ func (t *Terminal) writeLine(line []rune) {
} }
} }
// writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n.
func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) {
for len(buf) > 0 {
i := bytes.IndexByte(buf, '\n')
todo := len(buf)
if i >= 0 {
todo = i
}
var nn int
nn, err = w.Write(buf[:todo])
n += nn
if err != nil {
return n, err
}
buf = buf[todo:]
if i >= 0 {
if _, err = w.Write(crlf); err != nil {
return n, err
}
n += 1
buf = buf[1:]
}
}
return n, nil
}
func (t *Terminal) Write(buf []byte) (n int, err error) { func (t *Terminal) Write(buf []byte) (n int, err error) {
t.lock.Lock() t.lock.Lock()
defer t.lock.Unlock() defer t.lock.Unlock()
@ -632,7 +600,7 @@ func (t *Terminal) Write(buf []byte) (n int, err error) {
if t.cursorX == 0 && t.cursorY == 0 { if t.cursorX == 0 && t.cursorY == 0 {
// This is the easy case: there's nothing on the screen that we // This is the easy case: there's nothing on the screen that we
// have to move out of the way. // have to move out of the way.
return writeWithCRLF(t.c, buf) return t.c.Write(buf)
} }
// We have a prompt and possibly user input on the screen. We // We have a prompt and possibly user input on the screen. We
@ -652,7 +620,7 @@ func (t *Terminal) Write(buf []byte) (n int, err error) {
} }
t.outBuf = t.outBuf[:0] t.outBuf = t.outBuf[:0]
if n, err = writeWithCRLF(t.c, buf); err != nil { if n, err = t.c.Write(buf); err != nil {
return return
} }
@ -772,6 +740,8 @@ func (t *Terminal) readLine() (line string, err error) {
t.remainder = t.inBuf[:n+len(t.remainder)] t.remainder = t.inBuf[:n+len(t.remainder)]
} }
panic("unreachable") // for Go 1.0.
} }
// SetPrompt sets the prompt to be used when reading subsequent lines. // SetPrompt sets the prompt to be used when reading subsequent lines.
@ -920,32 +890,3 @@ func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) {
} }
return s.entries[index], true return s.entries[index], true
} }
// readPasswordLine reads from reader until it finds \n or io.EOF.
// The slice returned does not include the \n.
// readPasswordLine also ignores any \r it finds.
func readPasswordLine(reader io.Reader) ([]byte, error) {
var buf [1]byte
var ret []byte
for {
n, err := reader.Read(buf[:])
if n > 0 {
switch buf[0] {
case '\n':
return ret, nil
case '\r':
// remove \r from passwords on Windows
default:
ret = append(ret, buf[0])
}
continue
}
if err != nil {
if err == io.EOF && len(ret) > 0 {
return ret, nil
}
return ret, err
}
}
}

View File

@ -17,10 +17,9 @@
package terminal package terminal
import ( import (
"io"
"syscall" "syscall"
"unsafe" "unsafe"
"golang.org/x/sys/unix"
) )
// State contains the state of a terminal. // State contains the state of a terminal.
@ -52,8 +51,6 @@ func MakeRaw(fd int) (*State, error) {
newState.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN newState.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN
newState.Cflag &^= syscall.CSIZE | syscall.PARENB newState.Cflag &^= syscall.CSIZE | syscall.PARENB
newState.Cflag |= syscall.CS8 newState.Cflag |= syscall.CS8
newState.Cc[unix.VMIN] = 1
newState.Cc[unix.VTIME] = 0
if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 { if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 {
return nil, err return nil, err
} }
@ -75,10 +72,8 @@ func GetState(fd int) (*State, error) {
// Restore restores the terminal connected to the given file descriptor to a // Restore restores the terminal connected to the given file descriptor to a
// previous state. // previous state.
func Restore(fd int, state *State) error { func Restore(fd int, state *State) error {
if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&state.termios)), 0, 0, 0); err != 0 { _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&state.termios)), 0, 0, 0)
return err return err
}
return nil
} }
// GetSize returns the dimensions of the given terminal. // GetSize returns the dimensions of the given terminal.
@ -91,13 +86,6 @@ func GetSize(fd int) (width, height int, err error) {
return int(dimensions[1]), int(dimensions[0]), nil return int(dimensions[1]), int(dimensions[0]), nil
} }
// passwordReader is an io.Reader that reads from a specific file descriptor.
type passwordReader int
func (r passwordReader) Read(buf []byte) (int, error) {
return syscall.Read(int(r), buf)
}
// ReadPassword reads a line of input from a terminal without local echo. This // ReadPassword reads a line of input from a terminal without local echo. This
// is commonly used for inputting passwords and other sensitive data. The slice // is commonly used for inputting passwords and other sensitive data. The slice
// returned does not include the \n. // returned does not include the \n.
@ -119,5 +107,27 @@ func ReadPassword(fd int) ([]byte, error) {
syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0) syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0)
}() }()
return readPasswordLine(passwordReader(fd)) var buf [16]byte
var ret []byte
for {
n, err := syscall.Read(fd, buf[:])
if err != nil {
return nil, err
}
if n == 0 {
if len(ret) == 0 {
return nil, io.EOF
}
break
}
if buf[n-1] == '\n' {
n--
}
ret = append(ret, buf[:n]...)
if n < len(buf) {
break
}
}
return ret, nil
} }

View File

@ -6,7 +6,7 @@
package terminal package terminal
import "golang.org/x/sys/unix" import "syscall"
const ioctlReadTermios = unix.TIOCGETA const ioctlReadTermios = syscall.TIOCGETA
const ioctlWriteTermios = unix.TIOCSETA const ioctlWriteTermios = syscall.TIOCSETA

View File

@ -4,7 +4,8 @@
package terminal package terminal
import "golang.org/x/sys/unix" // These constants are declared here, rather than importing
// them from the syscall package as some syscall packages, even
const ioctlReadTermios = unix.TCGETS // on linux, for example gccgo, do not declare them.
const ioctlWriteTermios = unix.TCSETS const ioctlReadTermios = 0x5401 // syscall.TCGETS
const ioctlWriteTermios = 0x5402 // syscall.TCSETS

View File

@ -14,12 +14,14 @@ import (
// State contains the state of a terminal. // State contains the state of a terminal.
type State struct { type State struct {
state *unix.Termios termios syscall.Termios
} }
// IsTerminal returns true if the given file descriptor is a terminal. // IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal(fd int) bool { func IsTerminal(fd int) bool {
_, err := unix.IoctlGetTermio(fd, unix.TCGETA) // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
var termio unix.Termio
err := unix.IoctlSetTermio(fd, unix.TCGETA, &termio)
return err == nil return err == nil
} }
@ -69,60 +71,3 @@ func ReadPassword(fd int) ([]byte, error) {
return ret, nil return ret, nil
} }
// MakeRaw puts the terminal connected to the given file descriptor into raw
// mode and returns the previous state of the terminal so that it can be
// restored.
// see http://cr.illumos.org/~webrev/andy_js/1060/
func MakeRaw(fd int) (*State, error) {
oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS)
if err != nil {
return nil, err
}
oldTermios := *oldTermiosPtr
newTermios := oldTermios
newTermios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON
newTermios.Oflag &^= syscall.OPOST
newTermios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN
newTermios.Cflag &^= syscall.CSIZE | syscall.PARENB
newTermios.Cflag |= syscall.CS8
newTermios.Cc[unix.VMIN] = 1
newTermios.Cc[unix.VTIME] = 0
if err := unix.IoctlSetTermios(fd, unix.TCSETS, &newTermios); err != nil {
return nil, err
}
return &State{
state: oldTermiosPtr,
}, nil
}
// Restore restores the terminal connected to the given file descriptor to a
// previous state.
func Restore(fd int, oldState *State) error {
return unix.IoctlSetTermios(fd, unix.TCSETS, oldState.state)
}
// GetState returns the current state of a terminal which may be useful to
// restore the terminal after a signal.
func GetState(fd int) (*State, error) {
oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS)
if err != nil {
return nil, err
}
return &State{
state: oldTermiosPtr,
}, nil
}
// GetSize returns the dimensions of the given terminal.
func GetSize(fd int) (width, height int, err error) {
ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
if err != nil {
return 0, 0, err
}
return int(ws.Col), int(ws.Row), nil
}

View File

@ -17,7 +17,54 @@
package terminal package terminal
import ( import (
"golang.org/x/sys/windows" "io"
"syscall"
"unsafe"
)
const (
enableLineInput = 2
enableEchoInput = 4
enableProcessedInput = 1
enableWindowInput = 8
enableMouseInput = 16
enableInsertMode = 32
enableQuickEditMode = 64
enableExtendedFlags = 128
enableAutoPosition = 256
enableProcessedOutput = 1
enableWrapAtEolOutput = 2
)
var kernel32 = syscall.NewLazyDLL("kernel32.dll")
var (
procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
procSetConsoleMode = kernel32.NewProc("SetConsoleMode")
procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
)
type (
short int16
word uint16
coord struct {
x short
y short
}
smallRect struct {
left short
top short
right short
bottom short
}
consoleScreenBufferInfo struct {
size coord
cursorPosition coord
attributes word
window smallRect
maximumWindowSize coord
}
) )
type State struct { type State struct {
@ -27,8 +74,8 @@ type State struct {
// IsTerminal returns true if the given file descriptor is a terminal. // IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal(fd int) bool { func IsTerminal(fd int) bool {
var st uint32 var st uint32
err := windows.GetConsoleMode(windows.Handle(fd), &st) r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
return err == nil return r != 0 && e == 0
} }
// MakeRaw put the terminal connected to the given file descriptor into raw // MakeRaw put the terminal connected to the given file descriptor into raw
@ -36,12 +83,14 @@ func IsTerminal(fd int) bool {
// restored. // restored.
func MakeRaw(fd int) (*State, error) { func MakeRaw(fd int) (*State, error) {
var st uint32 var st uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
return nil, err if e != 0 {
return nil, error(e)
} }
raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) raw := st &^ (enableEchoInput | enableProcessedInput | enableLineInput | enableProcessedOutput)
if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { _, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(raw), 0)
return nil, err if e != 0 {
return nil, error(e)
} }
return &State{st}, nil return &State{st}, nil
} }
@ -50,8 +99,9 @@ func MakeRaw(fd int) (*State, error) {
// restore the terminal after a signal. // restore the terminal after a signal.
func GetState(fd int) (*State, error) { func GetState(fd int) (*State, error) {
var st uint32 var st uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
return nil, err if e != 0 {
return nil, error(e)
} }
return &State{st}, nil return &State{st}, nil
} }
@ -59,23 +109,18 @@ func GetState(fd int) (*State, error) {
// Restore restores the terminal connected to the given file descriptor to a // Restore restores the terminal connected to the given file descriptor to a
// previous state. // previous state.
func Restore(fd int, state *State) error { func Restore(fd int, state *State) error {
return windows.SetConsoleMode(windows.Handle(fd), state.mode) _, _, err := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(state.mode), 0)
return err
} }
// GetSize returns the dimensions of the given terminal. // GetSize returns the dimensions of the given terminal.
func GetSize(fd int) (width, height int, err error) { func GetSize(fd int) (width, height int, err error) {
var info windows.ConsoleScreenBufferInfo var info consoleScreenBufferInfo
if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { _, _, e := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&info)), 0)
return 0, 0, err if e != 0 {
return 0, 0, error(e)
} }
return int(info.Size.X), int(info.Size.Y), nil return int(info.size.x), int(info.size.y), nil
}
// passwordReader is an io.Reader that reads from a specific Windows HANDLE.
type passwordReader int
func (r passwordReader) Read(buf []byte) (int, error) {
return windows.Read(windows.Handle(r), buf)
} }
// ReadPassword reads a line of input from a terminal without local echo. This // ReadPassword reads a line of input from a terminal without local echo. This
@ -83,20 +128,47 @@ func (r passwordReader) Read(buf []byte) (int, error) {
// returned does not include the \n. // returned does not include the \n.
func ReadPassword(fd int) ([]byte, error) { func ReadPassword(fd int) ([]byte, error) {
var st uint32 var st uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { _, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
return nil, err if e != 0 {
return nil, error(e)
} }
old := st old := st
st &^= (windows.ENABLE_ECHO_INPUT) st &^= (enableEchoInput)
st |= (windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) st |= (enableProcessedInput | enableLineInput | enableProcessedOutput)
if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil { _, _, e = syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(st), 0)
return nil, err if e != 0 {
return nil, error(e)
} }
defer func() { defer func() {
windows.SetConsoleMode(windows.Handle(fd), old) syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(fd), uintptr(old), 0)
}() }()
return readPasswordLine(passwordReader(fd)) var buf [16]byte
var ret []byte
for {
n, err := syscall.Read(syscall.Handle(fd), buf[:])
if err != nil {
return nil, err
}
if n == 0 {
if len(ret) == 0 {
return nil, io.EOF
}
break
}
if buf[n-1] == '\n' {
n--
}
if n > 0 && buf[n-1] == '\r' {
n--
}
ret = append(ret, buf[:n]...)
if n < len(buf) {
break
}
}
return ret, nil
} }

View File

@ -1,29 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !gccgo
#include "textflag.h"
//
// System call support for ARM, OpenBSD
//
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
TEXT ·Syscall(SB),NOSPLIT,$0-28
B syscall·Syscall(SB)
TEXT ·Syscall6(SB),NOSPLIT,$0-40
B syscall·Syscall6(SB)
TEXT ·Syscall9(SB),NOSPLIT,$0-52
B syscall·Syscall9(SB)
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
B syscall·RawSyscall(SB)
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
B syscall·RawSyscall6(SB)

View File

@ -1,24 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Functions to access/create device major and minor numbers matching the
// encoding used in Darwin's sys/types.h header.
package unix
// Major returns the major component of a Darwin device number.
func Major(dev uint64) uint32 {
return uint32((dev >> 24) & 0xff)
}
// Minor returns the minor component of a Darwin device number.
func Minor(dev uint64) uint32 {
return uint32(dev & 0xffffff)
}
// Mkdev returns a Darwin device number generated from the given major and minor
// components.
func Mkdev(major, minor uint32) uint64 {
return uint64((major << 24) | minor)
}

View File

@ -1,42 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Functions to access/create device major and minor numbers matching the
// encoding used by the Linux kernel and glibc.
//
// The information below is extracted and adapted from bits/sysmacros.h in the
// glibc sources:
//
// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
// number and m is a hex digit of the minor number. This is backward compatible
// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
// backward compatible with the Linux kernel, which for some architectures uses
// 32-bit dev_t, encoded as mmmM MMmm.
package unix
// Major returns the major component of a Linux device number.
func Major(dev uint64) uint32 {
major := uint32((dev & 0x00000000000fff00) >> 8)
major |= uint32((dev & 0xfffff00000000000) >> 32)
return major
}
// Minor returns the minor component of a Linux device number.
func Minor(dev uint64) uint32 {
minor := uint32((dev & 0x00000000000000ff) >> 0)
minor |= uint32((dev & 0x00000ffffff00000) >> 12)
return minor
}
// Mkdev returns a Linux device number generated from the given major and minor
// components.
func Mkdev(major, minor uint32) uint64 {
dev := uint64((major & 0x00000fff) << 8)
dev |= uint64((major & 0xfffff000) << 32)
dev |= uint64((minor & 0x000000ff) << 0)
dev |= uint64((minor & 0xffffff00) << 12)
return dev
}

View File

@ -1,29 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Functions to access/create device major and minor numbers matching the
// encoding used in NetBSD's sys/types.h header.
package unix
// Major returns the major component of a NetBSD device number.
func Major(dev uint64) uint32 {
return uint32((dev & 0x000fff00) >> 8)
}
// Minor returns the minor component of a NetBSD device number.
func Minor(dev uint64) uint32 {
minor := uint32((dev & 0x000000ff) >> 0)
minor |= uint32((dev & 0xfff00000) >> 12)
return minor
}
// Mkdev returns a NetBSD device number generated from the given major and minor
// components.
func Mkdev(major, minor uint32) uint64 {
dev := uint64((major << 8) & 0x000fff00)
dev |= uint64((minor << 12) & 0xfff00000)
dev |= uint64((minor << 0) & 0x000000ff)
return dev
}

View File

@ -1,227 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
// them here for backwards compatibility.
package unix
const (
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
IFT_AAL2 = 0xbb
IFT_AAL5 = 0x31
IFT_ADSL = 0x5e
IFT_AFLANE8023 = 0x3b
IFT_AFLANE8025 = 0x3c
IFT_ARAP = 0x58
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
IFT_ASYNC = 0x54
IFT_ATM = 0x25
IFT_ATMDXI = 0x69
IFT_ATMFUNI = 0x6a
IFT_ATMIMA = 0x6b
IFT_ATMLOGICAL = 0x50
IFT_ATMRADIO = 0xbd
IFT_ATMSUBINTERFACE = 0x86
IFT_ATMVCIENDPT = 0xc2
IFT_ATMVIRTUAL = 0x95
IFT_BGPPOLICYACCOUNTING = 0xa2
IFT_BSC = 0x53
IFT_CCTEMUL = 0x3d
IFT_CEPT = 0x13
IFT_CES = 0x85
IFT_CHANNEL = 0x46
IFT_CNR = 0x55
IFT_COFFEE = 0x84
IFT_COMPOSITELINK = 0x9b
IFT_DCN = 0x8d
IFT_DIGITALPOWERLINE = 0x8a
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
IFT_DLSW = 0x4a
IFT_DOCSCABLEDOWNSTREAM = 0x80
IFT_DOCSCABLEMACLAYER = 0x7f
IFT_DOCSCABLEUPSTREAM = 0x81
IFT_DS0 = 0x51
IFT_DS0BUNDLE = 0x52
IFT_DS1FDL = 0xaa
IFT_DS3 = 0x1e
IFT_DTM = 0x8c
IFT_DVBASILN = 0xac
IFT_DVBASIOUT = 0xad
IFT_DVBRCCDOWNSTREAM = 0x93
IFT_DVBRCCMACLAYER = 0x92
IFT_DVBRCCUPSTREAM = 0x94
IFT_ENC = 0xf4
IFT_EON = 0x19
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
IFT_FAITH = 0xf2
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
IFT_FDDI = 0xf
IFT_FIBRECHANNEL = 0x38
IFT_FRAMERELAYINTERCONNECT = 0x3a
IFT_FRAMERELAYMPI = 0x5c
IFT_FRDLCIENDPT = 0xc1
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
IFT_FRF16MFRBUNDLE = 0xa3
IFT_FRFORWARD = 0x9e
IFT_G703AT2MB = 0x43
IFT_G703AT64K = 0x42
IFT_GIF = 0xf0
IFT_GIGABITETHERNET = 0x75
IFT_GR303IDT = 0xb2
IFT_GR303RDT = 0xb1
IFT_H323GATEKEEPER = 0xa4
IFT_H323PROXY = 0xa5
IFT_HDH1822 = 0x3
IFT_HDLC = 0x76
IFT_HDSL2 = 0xa8
IFT_HIPERLAN2 = 0xb7
IFT_HIPPI = 0x2f
IFT_HIPPIINTERFACE = 0x39
IFT_HOSTPAD = 0x5a
IFT_HSSI = 0x2e
IFT_HY = 0xe
IFT_IBM370PARCHAN = 0x48
IFT_IDSL = 0x9a
IFT_IEEE80211 = 0x47
IFT_IEEE80212 = 0x37
IFT_IEEE8023ADLAG = 0xa1
IFT_IFGSN = 0x91
IFT_IMT = 0xbe
IFT_INTERLEAVE = 0x7c
IFT_IP = 0x7e
IFT_IPFORWARD = 0x8e
IFT_IPOVERATM = 0x72
IFT_IPOVERCDLC = 0x6d
IFT_IPOVERCLAW = 0x6e
IFT_IPSWITCH = 0x4e
IFT_IPXIP = 0xf9
IFT_ISDN = 0x3f
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
IFT_ISDNS = 0x4b
IFT_ISDNU = 0x4c
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
IFT_ISO88025CRFPINT = 0x62
IFT_ISO88025DTR = 0x56
IFT_ISO88025FIBER = 0x73
IFT_ISO88026 = 0xa
IFT_ISUP = 0xb3
IFT_L3IPXVLAN = 0x89
IFT_LAPB = 0x10
IFT_LAPD = 0x4d
IFT_LAPF = 0x77
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
IFT_MPC = 0x71
IFT_MPLS = 0xa6
IFT_MPLSTUNNEL = 0x96
IFT_MSDSL = 0x8f
IFT_MVL = 0xbf
IFT_MYRINET = 0x63
IFT_NFAS = 0xaf
IFT_NSIP = 0x1b
IFT_OPTICALCHANNEL = 0xc3
IFT_OPTICALTRANSPORT = 0xc4
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
IFT_PFLOG = 0xf6
IFT_PFSYNC = 0xf7
IFT_PLC = 0xae
IFT_POS = 0xab
IFT_PPPMULTILINKBUNDLE = 0x6c
IFT_PROPBWAP2MP = 0xb8
IFT_PROPCNLS = 0x59
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
IFT_PROPMUX = 0x36
IFT_PROPWIRELESSP2P = 0x9d
IFT_PTPSERIAL = 0x16
IFT_PVC = 0xf1
IFT_QLLC = 0x44
IFT_RADIOMAC = 0xbc
IFT_RADSL = 0x5f
IFT_REACHDSL = 0xc0
IFT_RFC1483 = 0x9f
IFT_RS232 = 0x21
IFT_RSRB = 0x4f
IFT_SDLC = 0x11
IFT_SDSL = 0x60
IFT_SHDSL = 0xa9
IFT_SIP = 0x1f
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SONET = 0x27
IFT_SONETOVERHEADCHANNEL = 0xb9
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
IFT_SRP = 0x97
IFT_SS7SIGLINK = 0x9c
IFT_STACKTOSTACK = 0x6f
IFT_STARLAN = 0xb
IFT_STF = 0xd7
IFT_T1 = 0x12
IFT_TDLC = 0x74
IFT_TERMPAD = 0x5b
IFT_TR008 = 0xb0
IFT_TRANSPHDLC = 0x7b
IFT_TUNNEL = 0x83
IFT_ULTRA = 0x1d
IFT_USB = 0xa0
IFT_V11 = 0x40
IFT_V35 = 0x2d
IFT_V36 = 0x41
IFT_V37 = 0x78
IFT_VDSL = 0x61
IFT_VIRTUALIPADDRESS = 0x70
IFT_VOICEEM = 0x64
IFT_VOICEENCAP = 0x67
IFT_VOICEFXO = 0x65
IFT_VOICEFXS = 0x66
IFT_VOICEOVERATM = 0x98
IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68
IFT_X213 = 0x5d
IFT_X25 = 0x5
IFT_X25DDN = 0x4
IFT_X25HUNTGROUP = 0x7a
IFT_X25MLP = 0x79
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
IP_FAITH = 0x16
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
SIOCADDRT = 0x8030720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8030720b
SIOCDLIFADDR = 0x8118691d
SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCSLIFPHYADDR = 0x8118694a
)

View File

@ -1,227 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
// them here for backwards compatibility.
package unix
const (
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
IFT_AAL2 = 0xbb
IFT_AAL5 = 0x31
IFT_ADSL = 0x5e
IFT_AFLANE8023 = 0x3b
IFT_AFLANE8025 = 0x3c
IFT_ARAP = 0x58
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
IFT_ASYNC = 0x54
IFT_ATM = 0x25
IFT_ATMDXI = 0x69
IFT_ATMFUNI = 0x6a
IFT_ATMIMA = 0x6b
IFT_ATMLOGICAL = 0x50
IFT_ATMRADIO = 0xbd
IFT_ATMSUBINTERFACE = 0x86
IFT_ATMVCIENDPT = 0xc2
IFT_ATMVIRTUAL = 0x95
IFT_BGPPOLICYACCOUNTING = 0xa2
IFT_BSC = 0x53
IFT_CCTEMUL = 0x3d
IFT_CEPT = 0x13
IFT_CES = 0x85
IFT_CHANNEL = 0x46
IFT_CNR = 0x55
IFT_COFFEE = 0x84
IFT_COMPOSITELINK = 0x9b
IFT_DCN = 0x8d
IFT_DIGITALPOWERLINE = 0x8a
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
IFT_DLSW = 0x4a
IFT_DOCSCABLEDOWNSTREAM = 0x80
IFT_DOCSCABLEMACLAYER = 0x7f
IFT_DOCSCABLEUPSTREAM = 0x81
IFT_DS0 = 0x51
IFT_DS0BUNDLE = 0x52
IFT_DS1FDL = 0xaa
IFT_DS3 = 0x1e
IFT_DTM = 0x8c
IFT_DVBASILN = 0xac
IFT_DVBASIOUT = 0xad
IFT_DVBRCCDOWNSTREAM = 0x93
IFT_DVBRCCMACLAYER = 0x92
IFT_DVBRCCUPSTREAM = 0x94
IFT_ENC = 0xf4
IFT_EON = 0x19
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
IFT_FAITH = 0xf2
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
IFT_FDDI = 0xf
IFT_FIBRECHANNEL = 0x38
IFT_FRAMERELAYINTERCONNECT = 0x3a
IFT_FRAMERELAYMPI = 0x5c
IFT_FRDLCIENDPT = 0xc1
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
IFT_FRF16MFRBUNDLE = 0xa3
IFT_FRFORWARD = 0x9e
IFT_G703AT2MB = 0x43
IFT_G703AT64K = 0x42
IFT_GIF = 0xf0
IFT_GIGABITETHERNET = 0x75
IFT_GR303IDT = 0xb2
IFT_GR303RDT = 0xb1
IFT_H323GATEKEEPER = 0xa4
IFT_H323PROXY = 0xa5
IFT_HDH1822 = 0x3
IFT_HDLC = 0x76
IFT_HDSL2 = 0xa8
IFT_HIPERLAN2 = 0xb7
IFT_HIPPI = 0x2f
IFT_HIPPIINTERFACE = 0x39
IFT_HOSTPAD = 0x5a
IFT_HSSI = 0x2e
IFT_HY = 0xe
IFT_IBM370PARCHAN = 0x48
IFT_IDSL = 0x9a
IFT_IEEE80211 = 0x47
IFT_IEEE80212 = 0x37
IFT_IEEE8023ADLAG = 0xa1
IFT_IFGSN = 0x91
IFT_IMT = 0xbe
IFT_INTERLEAVE = 0x7c
IFT_IP = 0x7e
IFT_IPFORWARD = 0x8e
IFT_IPOVERATM = 0x72
IFT_IPOVERCDLC = 0x6d
IFT_IPOVERCLAW = 0x6e
IFT_IPSWITCH = 0x4e
IFT_IPXIP = 0xf9
IFT_ISDN = 0x3f
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
IFT_ISDNS = 0x4b
IFT_ISDNU = 0x4c
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
IFT_ISO88025CRFPINT = 0x62
IFT_ISO88025DTR = 0x56
IFT_ISO88025FIBER = 0x73
IFT_ISO88026 = 0xa
IFT_ISUP = 0xb3
IFT_L3IPXVLAN = 0x89
IFT_LAPB = 0x10
IFT_LAPD = 0x4d
IFT_LAPF = 0x77
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
IFT_MPC = 0x71
IFT_MPLS = 0xa6
IFT_MPLSTUNNEL = 0x96
IFT_MSDSL = 0x8f
IFT_MVL = 0xbf
IFT_MYRINET = 0x63
IFT_NFAS = 0xaf
IFT_NSIP = 0x1b
IFT_OPTICALCHANNEL = 0xc3
IFT_OPTICALTRANSPORT = 0xc4
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
IFT_PFLOG = 0xf6
IFT_PFSYNC = 0xf7
IFT_PLC = 0xae
IFT_POS = 0xab
IFT_PPPMULTILINKBUNDLE = 0x6c
IFT_PROPBWAP2MP = 0xb8
IFT_PROPCNLS = 0x59
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
IFT_PROPMUX = 0x36
IFT_PROPWIRELESSP2P = 0x9d
IFT_PTPSERIAL = 0x16
IFT_PVC = 0xf1
IFT_QLLC = 0x44
IFT_RADIOMAC = 0xbc
IFT_RADSL = 0x5f
IFT_REACHDSL = 0xc0
IFT_RFC1483 = 0x9f
IFT_RS232 = 0x21
IFT_RSRB = 0x4f
IFT_SDLC = 0x11
IFT_SDSL = 0x60
IFT_SHDSL = 0xa9
IFT_SIP = 0x1f
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SONET = 0x27
IFT_SONETOVERHEADCHANNEL = 0xb9
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
IFT_SRP = 0x97
IFT_SS7SIGLINK = 0x9c
IFT_STACKTOSTACK = 0x6f
IFT_STARLAN = 0xb
IFT_STF = 0xd7
IFT_T1 = 0x12
IFT_TDLC = 0x74
IFT_TERMPAD = 0x5b
IFT_TR008 = 0xb0
IFT_TRANSPHDLC = 0x7b
IFT_TUNNEL = 0x83
IFT_ULTRA = 0x1d
IFT_USB = 0xa0
IFT_V11 = 0x40
IFT_V35 = 0x2d
IFT_V36 = 0x41
IFT_V37 = 0x78
IFT_VDSL = 0x61
IFT_VIRTUALIPADDRESS = 0x70
IFT_VOICEEM = 0x64
IFT_VOICEENCAP = 0x67
IFT_VOICEFXO = 0x65
IFT_VOICEFXS = 0x66
IFT_VOICEOVERATM = 0x98
IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68
IFT_X213 = 0x5d
IFT_X25 = 0x5
IFT_X25DDN = 0x4
IFT_X25HUNTGROUP = 0x7a
IFT_X25MLP = 0x79
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
IP_FAITH = 0x16
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
SIOCADDRT = 0x8040720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8040720b
SIOCDLIFADDR = 0x8118691d
SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCSLIFPHYADDR = 0x8118694a
)

View File

@ -1,226 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package unix
const (
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
IFT_AAL2 = 0xbb
IFT_AAL5 = 0x31
IFT_ADSL = 0x5e
IFT_AFLANE8023 = 0x3b
IFT_AFLANE8025 = 0x3c
IFT_ARAP = 0x58
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
IFT_ASYNC = 0x54
IFT_ATM = 0x25
IFT_ATMDXI = 0x69
IFT_ATMFUNI = 0x6a
IFT_ATMIMA = 0x6b
IFT_ATMLOGICAL = 0x50
IFT_ATMRADIO = 0xbd
IFT_ATMSUBINTERFACE = 0x86
IFT_ATMVCIENDPT = 0xc2
IFT_ATMVIRTUAL = 0x95
IFT_BGPPOLICYACCOUNTING = 0xa2
IFT_BSC = 0x53
IFT_CCTEMUL = 0x3d
IFT_CEPT = 0x13
IFT_CES = 0x85
IFT_CHANNEL = 0x46
IFT_CNR = 0x55
IFT_COFFEE = 0x84
IFT_COMPOSITELINK = 0x9b
IFT_DCN = 0x8d
IFT_DIGITALPOWERLINE = 0x8a
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
IFT_DLSW = 0x4a
IFT_DOCSCABLEDOWNSTREAM = 0x80
IFT_DOCSCABLEMACLAYER = 0x7f
IFT_DOCSCABLEUPSTREAM = 0x81
IFT_DS0 = 0x51
IFT_DS0BUNDLE = 0x52
IFT_DS1FDL = 0xaa
IFT_DS3 = 0x1e
IFT_DTM = 0x8c
IFT_DVBASILN = 0xac
IFT_DVBASIOUT = 0xad
IFT_DVBRCCDOWNSTREAM = 0x93
IFT_DVBRCCMACLAYER = 0x92
IFT_DVBRCCUPSTREAM = 0x94
IFT_ENC = 0xf4
IFT_EON = 0x19
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
IFT_FDDI = 0xf
IFT_FIBRECHANNEL = 0x38
IFT_FRAMERELAYINTERCONNECT = 0x3a
IFT_FRAMERELAYMPI = 0x5c
IFT_FRDLCIENDPT = 0xc1
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
IFT_FRF16MFRBUNDLE = 0xa3
IFT_FRFORWARD = 0x9e
IFT_G703AT2MB = 0x43
IFT_G703AT64K = 0x42
IFT_GIF = 0xf0
IFT_GIGABITETHERNET = 0x75
IFT_GR303IDT = 0xb2
IFT_GR303RDT = 0xb1
IFT_H323GATEKEEPER = 0xa4
IFT_H323PROXY = 0xa5
IFT_HDH1822 = 0x3
IFT_HDLC = 0x76
IFT_HDSL2 = 0xa8
IFT_HIPERLAN2 = 0xb7
IFT_HIPPI = 0x2f
IFT_HIPPIINTERFACE = 0x39
IFT_HOSTPAD = 0x5a
IFT_HSSI = 0x2e
IFT_HY = 0xe
IFT_IBM370PARCHAN = 0x48
IFT_IDSL = 0x9a
IFT_IEEE80211 = 0x47
IFT_IEEE80212 = 0x37
IFT_IEEE8023ADLAG = 0xa1
IFT_IFGSN = 0x91
IFT_IMT = 0xbe
IFT_INTERLEAVE = 0x7c
IFT_IP = 0x7e
IFT_IPFORWARD = 0x8e
IFT_IPOVERATM = 0x72
IFT_IPOVERCDLC = 0x6d
IFT_IPOVERCLAW = 0x6e
IFT_IPSWITCH = 0x4e
IFT_ISDN = 0x3f
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
IFT_ISDNS = 0x4b
IFT_ISDNU = 0x4c
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
IFT_ISO88025CRFPINT = 0x62
IFT_ISO88025DTR = 0x56
IFT_ISO88025FIBER = 0x73
IFT_ISO88026 = 0xa
IFT_ISUP = 0xb3
IFT_L3IPXVLAN = 0x89
IFT_LAPB = 0x10
IFT_LAPD = 0x4d
IFT_LAPF = 0x77
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
IFT_MPC = 0x71
IFT_MPLS = 0xa6
IFT_MPLSTUNNEL = 0x96
IFT_MSDSL = 0x8f
IFT_MVL = 0xbf
IFT_MYRINET = 0x63
IFT_NFAS = 0xaf
IFT_NSIP = 0x1b
IFT_OPTICALCHANNEL = 0xc3
IFT_OPTICALTRANSPORT = 0xc4
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
IFT_PFLOG = 0xf6
IFT_PFSYNC = 0xf7
IFT_PLC = 0xae
IFT_POS = 0xab
IFT_PPPMULTILINKBUNDLE = 0x6c
IFT_PROPBWAP2MP = 0xb8
IFT_PROPCNLS = 0x59
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
IFT_PROPMUX = 0x36
IFT_PROPWIRELESSP2P = 0x9d
IFT_PTPSERIAL = 0x16
IFT_PVC = 0xf1
IFT_QLLC = 0x44
IFT_RADIOMAC = 0xbc
IFT_RADSL = 0x5f
IFT_REACHDSL = 0xc0
IFT_RFC1483 = 0x9f
IFT_RS232 = 0x21
IFT_RSRB = 0x4f
IFT_SDLC = 0x11
IFT_SDSL = 0x60
IFT_SHDSL = 0xa9
IFT_SIP = 0x1f
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SONET = 0x27
IFT_SONETOVERHEADCHANNEL = 0xb9
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
IFT_SRP = 0x97
IFT_SS7SIGLINK = 0x9c
IFT_STACKTOSTACK = 0x6f
IFT_STARLAN = 0xb
IFT_STF = 0xd7
IFT_T1 = 0x12
IFT_TDLC = 0x74
IFT_TERMPAD = 0x5b
IFT_TR008 = 0xb0
IFT_TRANSPHDLC = 0x7b
IFT_TUNNEL = 0x83
IFT_ULTRA = 0x1d
IFT_USB = 0xa0
IFT_V11 = 0x40
IFT_V35 = 0x2d
IFT_V36 = 0x41
IFT_V37 = 0x78
IFT_VDSL = 0x61
IFT_VIRTUALIPADDRESS = 0x70
IFT_VOICEEM = 0x64
IFT_VOICEENCAP = 0x67
IFT_VOICEFXO = 0x65
IFT_VOICEFXS = 0x66
IFT_VOICEOVERATM = 0x98
IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68
IFT_X213 = 0x5d
IFT_X25 = 0x5
IFT_X25DDN = 0x4
IFT_X25HUNTGROUP = 0x7a
IFT_X25MLP = 0x79
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
// missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
IFF_SMART = 0x20
IFT_FAITH = 0xf2
IFT_IPXIP = 0xf9
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
IP_FAITH = 0x16
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
SIOCADDRT = 0x8030720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8030720b
SIOCDLIFADDR = 0x8118691d
SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCSLIFPHYADDR = 0x8118694a
)

View File

@ -1,3 +1,5 @@
// +build linux darwin freebsd openbsd netbsd dragonfly
// Copyright 2014 The Go Authors. All rights reserved. // Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.

View File

@ -72,7 +72,7 @@ darwin_amd64)
;; ;;
darwin_arm) darwin_arm)
mkerrors="$mkerrors" mkerrors="$mkerrors"
mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;; ;;
darwin_arm64) darwin_arm64)
@ -108,7 +108,7 @@ freebsd_arm)
mksyscall="./mksyscall.pl -l32 -arm" mksyscall="./mksyscall.pl -l32 -arm"
mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
# Let the type of C char be signed for making the bare syscall # Let the type of C char be signed for making the bare syscall
# API consistent across platforms. # API consistent across over platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;; ;;
linux_sparc64) linux_sparc64)
@ -130,14 +130,6 @@ netbsd_amd64)
mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;; ;;
netbsd_arm)
mkerrors="$mkerrors"
mksyscall="./mksyscall.pl -l32 -netbsd -arm"
mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
# Let the type of C char be signed for making the bare syscall
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
openbsd_386) openbsd_386)
mkerrors="$mkerrors -m32" mkerrors="$mkerrors -m32"
mksyscall="./mksyscall.pl -l32 -openbsd" mksyscall="./mksyscall.pl -l32 -openbsd"
@ -154,16 +146,6 @@ openbsd_amd64)
mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
mktypes="GOARCH=$GOARCH go tool cgo -godefs" mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;; ;;
openbsd_arm)
mkerrors="$mkerrors"
mksyscall="./mksyscall.pl -l32 -openbsd -arm"
mksysctl="./mksysctl_openbsd.pl"
zsysctl="zsysctl_openbsd.go"
mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
# Let the type of C char be signed for making the bare syscall
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
solaris_amd64) solaris_amd64)
mksyscall="./mksyscall_solaris.pl" mksyscall="./mksyscall_solaris.pl"
mkerrors="$mkerrors -m64" mkerrors="$mkerrors -m64"

View File

@ -45,7 +45,6 @@ includes_Darwin='
#include <sys/sockio.h> #include <sys/sockio.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/mount.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <net/bpf.h> #include <net/bpf.h>
#include <net/if.h> #include <net/if.h>
@ -181,8 +180,6 @@ struct ltchars {
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/can.h> #include <linux/can.h>
#include <linux/vm_sockets.h> #include <linux/vm_sockets.h>
#include <linux/taskstats.h>
#include <linux/genetlink.h>
#include <net/route.h> #include <net/route.h>
#include <asm/termbits.h> #include <asm/termbits.h>
@ -415,8 +412,6 @@ ccflags="$@"
$2 ~ /^SECCOMP_MODE_/ || $2 ~ /^SECCOMP_MODE_/ ||
$2 ~ /^SPLICE_/ || $2 ~ /^SPLICE_/ ||
$2 ~ /^(VM|VMADDR)_/ || $2 ~ /^(VM|VMADDR)_/ ||
$2 ~ /^(TASKSTATS|TS)_/ ||
$2 ~ /^GENL_/ ||
$2 ~ /^XATTR_(CREATE|REPLACE)/ || $2 ~ /^XATTR_(CREATE|REPLACE)/ ||
$2 !~ "WMESGLEN" && $2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ || $2 ~ /^W[A-Z0-9]+$/ ||

View File

@ -47,7 +47,7 @@ while(<>){
$name = "$7_$11" if $11 ne ''; $name = "$7_$11" if $11 ne '';
$name =~ y/a-z/A-Z/; $name =~ y/a-z/A-Z/;
if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') { if($compat eq '' || $compat eq '30' || $compat eq '50') {
print " $name = $num; // $proto\n"; print " $name = $num; // $proto\n";
} }
} }

View File

@ -561,19 +561,13 @@ func Utimes(path string, tv []Timeval) error {
func UtimesNano(path string, ts []Timespec) error { func UtimesNano(path string, ts []Timespec) error {
if ts == nil { if ts == nil {
err := utimensat(AT_FDCWD, path, nil, 0)
if err != ENOSYS {
return err
}
return utimes(path, nil) return utimes(path, nil)
} }
// TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it
// isn't supported by darwin so this uses utimes instead
if len(ts) != 2 { if len(ts) != 2 {
return EINVAL return EINVAL
} }
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
if err != ENOSYS {
return err
}
// Not as efficient as it could be because Timespec and // Not as efficient as it could be because Timespec and
// Timeval have different types in the different OSes // Timeval have different types in the different OSes
tv := [2]Timeval{ tv := [2]Timeval{
@ -583,16 +577,6 @@ func UtimesNano(path string, ts []Timespec) error {
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
} }
func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
if ts == nil {
return utimensat(dirfd, path, nil, flags)
}
if len(ts) != 2 {
return EINVAL
}
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
}
//sys futimes(fd int, timeval *[2]Timeval) (err error) //sys futimes(fd int, timeval *[2]Timeval) (err error)
func Futimes(fd int, tv []Timeval) error { func Futimes(fd int, tv []Timeval) error {
@ -610,6 +594,9 @@ func Futimes(fd int, tv []Timeval) error {
// TODO: wrap // TODO: wrap
// Acct(name nil-string) (err error) // Acct(name nil-string) (err error)
// Gethostuuid(uuid *byte, timeout *Timespec) (err error) // Gethostuuid(uuid *byte, timeout *Timespec) (err error)
// Madvise(addr *byte, len int, behav int) (err error)
// Mprotect(addr *byte, len int, prot int) (err error)
// Msync(addr *byte, len int, flags int) (err error)
// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error) // Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
var mapper = &mmapper{ var mapper = &mmapper{
@ -625,11 +612,3 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
func Munmap(b []byte) (err error) { func Munmap(b []byte) (err error) {
return mapper.Munmap(b) return mapper.Munmap(b)
} }
//sys Madvise(b []byte, behav int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Msync(b []byte, flags int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)

View File

@ -187,11 +187,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return return
} }
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
// Darwin doesn't support SYS_UTIMENSAT
return ENOSYS
}
/* /*
* Wrapped * Wrapped
*/ */
@ -200,45 +195,6 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) } func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
//sys ioctl(fd int, req uint, arg uintptr) (err error)
// ioctl itself should not be exposed directly, but additional get/set
// functions for specific types are permissible.
// IoctlSetInt performs an ioctl operation which sets an integer value
// on fd, using the specified request number.
func IoctlSetInt(fd int, req uint, value int) error {
return ioctl(fd, req, uintptr(value))
}
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
func IoctlSetTermios(fd int, req uint, value *Termios) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
// IoctlGetInt performs an ioctl operation which gets an integer value
// from fd, using the specified request number.
func IoctlGetInt(fd int, req uint) (int, error) {
var value int
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return value, err
}
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
var value Winsize
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
var value Termios
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
/* /*
* Exposed directly * Exposed directly
*/ */
@ -254,13 +210,10 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys Dup2(from int, to int) (err error) //sys Dup2(from int, to int) (err error)
//sys Exchangedata(path1 string, path2 string, options int) (err error) //sys Exchangedata(path1 string, path2 string, options int) (err error)
//sys Exit(code int) //sys Exit(code int)
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchdir(fd int) (err error) //sys Fchdir(fd int) (err error)
//sys Fchflags(fd int, flags int) (err error) //sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error) //sys Fchmod(fd int, mode uint32) (err error)
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Flock(fd int, how int) (err error) //sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error) //sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@ -285,23 +238,23 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys Kqueue() (fd int, err error) //sys Kqueue() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error) //sys Link(path string, link string) (err error)
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
//sys Listen(s int, backlog int) (err error) //sys Listen(s int, backlog int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Mkdir(path string, mode uint32) (err error) //sys Mkdir(path string, mode uint32) (err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error) //sys Rename(from string, to string) (err error)
//sys Renameat(fromfd int, from string, tofd int, to string) (err error)
//sys Revoke(path string) (err error) //sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error) //sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
@ -322,13 +275,11 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64 //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
//sys Symlink(path string, link string) (err error) //sys Symlink(path string, link string) (err error)
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
//sys Sync() (err error) //sys Sync() (err error)
//sys Truncate(path string, length int64) (err error) //sys Truncate(path string, length int64) (err error)
//sys Umask(newmask int) (oldmask int) //sys Umask(newmask int) (oldmask int)
//sys Undelete(path string) (err error) //sys Undelete(path string) (err error)
//sys Unlink(path string) (err error) //sys Unlink(path string) (err error)
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error) //sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error) //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 mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
@ -368,6 +319,9 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
// Add_profil // Add_profil
// Kdebug_trace // Kdebug_trace
// Sigreturn // Sigreturn
// Mmap
// Mlock
// Munlock
// Atsocket // Atsocket
// Kqueue_from_portset_np // Kqueue_from_portset_np
// Kqueue_portset // Kqueue_portset
@ -460,6 +414,8 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
// Lio_listio // Lio_listio
// __pthread_cond_wait // __pthread_cond_wait
// Iopolicysys // Iopolicysys
// Mlockall
// Munlockall
// __pthread_kill // __pthread_kill
// __pthread_sigmask // __pthread_sigmask
// __sigwait // __sigwait
@ -513,6 +469,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
// Sendmsg_nocancel // Sendmsg_nocancel
// Recvfrom_nocancel // Recvfrom_nocancel
// Accept_nocancel // Accept_nocancel
// Msync_nocancel
// Fcntl_nocancel // Fcntl_nocancel
// Select_nocancel // Select_nocancel
// Fsync_nocancel // Fsync_nocancel

View File

@ -11,6 +11,8 @@ import (
"unsafe" "unsafe"
) )
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
func Getpagesize() int { return 4096 } func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }

View File

@ -174,6 +174,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
//sys Mkdir(path string, mode uint32) (err error) //sys Mkdir(path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
@ -213,7 +218,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) //sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
/* /*
* Unimplemented * Unimplemented
@ -248,6 +252,9 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// Add_profil // Add_profil
// Kdebug_trace // Kdebug_trace
// Sigreturn // Sigreturn
// Mmap
// Mlock
// Munlock
// Atsocket // Atsocket
// Kqueue_from_portset_np // Kqueue_from_portset_np
// Kqueue_portset // Kqueue_portset
@ -340,6 +347,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// Lio_listio // Lio_listio
// __pthread_cond_wait // __pthread_cond_wait
// Iopolicysys // Iopolicysys
// Mlockall
// Munlockall
// __pthread_kill // __pthread_kill
// __pthread_sigmask // __pthread_sigmask
// __sigwait // __sigwait
@ -392,6 +401,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// Sendmsg_nocancel // Sendmsg_nocancel
// Recvfrom_nocancel // Recvfrom_nocancel
// Accept_nocancel // Accept_nocancel
// Msync_nocancel
// Fcntl_nocancel // Fcntl_nocancel
// Select_nocancel // Select_nocancel
// Fsync_nocancel // Fsync_nocancel

View File

@ -352,45 +352,6 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
return s, e return s, e
} }
//sys ioctl(fd int, req uint, arg uintptr) (err error)
// ioctl itself should not be exposed directly, but additional get/set
// functions for specific types are permissible.
// IoctlSetInt performs an ioctl operation which sets an integer value
// on fd, using the specified request number.
func IoctlSetInt(fd int, req uint, value int) error {
return ioctl(fd, req, uintptr(value))
}
func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
func IoctlSetTermios(fd int, req uint, value *Termios) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
// IoctlGetInt performs an ioctl operation which gets an integer value
// from fd, using the specified request number.
func IoctlGetInt(fd int, req uint) (int, error) {
var value int
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return value, err
}
func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
var value Winsize
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
var value Termios
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
/* /*
* Exposed directly * Exposed directly
*/ */
@ -421,13 +382,10 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) //sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) //sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchdir(fd int) (err error) //sys Fchdir(fd int) (err error)
//sys Fchflags(fd int, flags int) (err error) //sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error) //sys Fchmod(fd int, mode uint32) (err error)
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Flock(fd int, how int) (err error) //sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error) //sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error) //sys Fstat(fd int, stat *Stat_t) (err error)
@ -454,13 +412,16 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys Kqueue() (fd int, err error) //sys Kqueue() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error) //sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error) //sys Link(path string, link string) (err error)
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
//sys Listen(s int, backlog int) (err error) //sys Listen(s int, backlog int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) //sys Lstat(path string, stat *Stat_t) (err error)
//sys Mkdir(path string, mode uint32) (err error) //sys Mkdir(path string, mode uint32) (err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) //sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
@ -469,9 +430,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error) //sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error) //sys Rename(from string, to string) (err error)
//sys Renameat(fromfd int, from string, tofd int, to string) (err error)
//sys Revoke(path string) (err error) //sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error) //sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
@ -493,13 +452,11 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys Stat(path string, stat *Stat_t) (err error) //sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error) //sys Statfs(path string, stat *Statfs_t) (err error)
//sys Symlink(path string, link string) (err error) //sys Symlink(path string, link string) (err error)
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
//sys Sync() (err error) //sys Sync() (err error)
//sys Truncate(path string, length int64) (err error) //sys Truncate(path string, length int64) (err error)
//sys Umask(newmask int) (oldmask int) //sys Umask(newmask int) (oldmask int)
//sys Undelete(path string) (err error) //sys Undelete(path string) (err error)
//sys Unlink(path string) (err error) //sys Unlink(path string) (err error)
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error) //sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error) //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 mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
@ -507,7 +464,6 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) //sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
/* /*
* Unimplemented * Unimplemented
@ -541,6 +497,9 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
// Add_profil // Add_profil
// Kdebug_trace // Kdebug_trace
// Sigreturn // Sigreturn
// Mmap
// Mlock
// Munlock
// Atsocket // Atsocket
// Kqueue_from_portset_np // Kqueue_from_portset_np
// Kqueue_portset // Kqueue_portset
@ -633,6 +592,8 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
// Lio_listio // Lio_listio
// __pthread_cond_wait // __pthread_cond_wait
// Iopolicysys // Iopolicysys
// Mlockall
// Munlockall
// __pthread_kill // __pthread_kill
// __pthread_sigmask // __pthread_sigmask
// __sigwait // __sigwait
@ -685,6 +646,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) {
// Sendmsg_nocancel // Sendmsg_nocancel
// Recvfrom_nocancel // Recvfrom_nocancel
// Accept_nocancel // Accept_nocancel
// Msync_nocancel
// Fcntl_nocancel // Fcntl_nocancel
// Select_nocancel // Select_nocancel
// Fsync_nocancel // Fsync_nocancel

View File

@ -931,13 +931,8 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
} }
var dummy byte var dummy byte
if len(oob) > 0 { if len(oob) > 0 {
var sockType int
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
if err != nil {
return
}
// receive at least one normal byte // receive at least one normal byte
if sockType != SOCK_DGRAM && len(p) == 0 { if len(p) == 0 {
iov.Base = &dummy iov.Base = &dummy
iov.SetLen(1) iov.SetLen(1)
} }
@ -983,13 +978,8 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
} }
var dummy byte var dummy byte
if len(oob) > 0 { if len(oob) > 0 {
var sockType int
sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
if err != nil {
return 0, err
}
// send at least one normal byte // send at least one normal byte
if sockType != SOCK_DGRAM && len(p) == 0 { if len(p) == 0 {
iov.Base = &dummy iov.Base = &dummy
iov.SetLen(1) iov.SetLen(1)
} }
@ -1289,7 +1279,6 @@ func Setgid(uid int) (err error) {
//sys Setpriority(which int, who int, prio int) (err error) //sys Setpriority(which int, who int, prio int) (err error)
//sys Setxattr(path string, attr string, data []byte, flags int) (err error) //sys Setxattr(path string, attr string, data []byte, flags int) (err error)
//sys Sync() //sys Sync()
//sys Syncfs(fd int) (err error)
//sysnb Sysinfo(info *Sysinfo_t) (err error) //sysnb Sysinfo(info *Sysinfo_t) (err error)
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error) //sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error) //sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
@ -1324,9 +1313,8 @@ func Munmap(b []byte) (err error) {
//sys Madvise(b []byte, advice int) (err error) //sys Madvise(b []byte, advice int) (err error)
//sys Mprotect(b []byte, prot int) (err error) //sys Mprotect(b []byte, prot int) (err error)
//sys Mlock(b []byte) (err error) //sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Msync(b []byte, flags int) (err error)
//sys Munlock(b []byte) (err error) //sys Munlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Munlockall() (err error) //sys Munlockall() (err error)
// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd, // Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
@ -1394,6 +1382,7 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
// ModifyLdt // ModifyLdt
// Mount // Mount
// MovePages // MovePages
// Mprotect
// MqGetsetattr // MqGetsetattr
// MqNotify // MqNotify
// MqOpen // MqOpen
@ -1405,6 +1394,7 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
// Msgget // Msgget
// Msgrcv // Msgrcv
// Msgsnd // Msgsnd
// Msync
// Newfstatat // Newfstatat
// Nfsservctl // Nfsservctl
// Personality // Personality

View File

@ -170,6 +170,11 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Mkdir(path string, mode uint32) (err error) //sys Mkdir(path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
@ -205,7 +210,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys munmap(addr uintptr, length uintptr) (err error) //sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
/* /*
* Unimplemented * Unimplemented

View File

@ -149,6 +149,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
//sys Mkdir(path string, mode uint32) (err error) //sys Mkdir(path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error) //sys Pathconf(path string, name int) (val int, err error)
@ -188,7 +193,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
//sys munmap(addr uintptr, length uintptr) (err error) //sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
/* /*
* Unimplemented * Unimplemented
@ -278,5 +282,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// thrsleep // thrsleep
// thrwakeup // thrwakeup
// unlinkat // unlinkat
// utimensat
// vfork // vfork
// writev // writev

View File

@ -1,44 +0,0 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build arm,openbsd
package unix
import "syscall"
func Getpagesize() int { return syscall.Getpagesize() }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {
ts.Sec = int64(nsec / 1e9)
ts.Nsec = int32(nsec % 1e9)
return
}
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
tv.Sec = int64(nsec / 1e9)
return
}
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint32(fd)
k.Filter = int16(mode)
k.Flags = uint16(flags)
}
func (iov *Iovec) SetLen(length int) {
iov.Len = uint32(length)
}
func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}

View File

@ -581,7 +581,6 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) {
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Fdatasync(fd int) (err error) //sys Fdatasync(fd int) (err error)
//sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error) //sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error) //sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) //sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error)

View File

@ -242,13 +242,9 @@ type BpfHdr C.struct_bpf_hdr
type Termios C.struct_termios type Termios C.struct_termios
type Winsize C.struct_winsize
// fchmodat-like syscalls. // fchmodat-like syscalls.
const ( const (
AT_FDCWD = C.AT_FDCWD AT_FDCWD = C.AT_FDCWD
AT_REMOVEDIR = C.AT_REMOVEDIR
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
) )

View File

@ -240,10 +240,3 @@ type BpfHdr C.struct_bpf_hdr
// Terminal handling // Terminal handling
type Termios C.struct_termios type Termios C.struct_termios
// fchmodat-like syscalls.
const (
AT_FDCWD = C.AT_FDCWD
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
)

View File

@ -356,17 +356,6 @@ type BpfZbufHeader C.struct_bpf_zbuf_header
type Termios C.struct_termios type Termios C.struct_termios
type Winsize C.struct_winsize
// fchmodat-like syscalls.
const (
AT_FDCWD = C.AT_FDCWD
AT_REMOVEDIR = C.AT_REMOVEDIR
AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
)
// Capabilities // Capabilities
type CapRights C.struct_cap_rights type CapRights C.struct_cap_rights

View File

@ -227,13 +227,6 @@ type BpfTimeval C.struct_bpf_timeval
type Termios C.struct_termios type Termios C.struct_termios
// fchmodat-like syscalls.
const (
AT_FDCWD = C.AT_FDCWD
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
)
// Sysctl // Sysctl
type Sysctlnode C.struct_sysctlnode type Sysctlnode C.struct_sysctlnode

View File

@ -242,10 +242,3 @@ type BpfTimeval C.struct_bpf_timeval
// Terminal handling // Terminal handling
type Termios C.struct_termios type Termios C.struct_termios
// fchmodat-like syscalls.
const (
AT_FDCWD = C.AT_FDCWD
AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
)

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m32 // mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build 386,darwin // +build 386,darwin
@ -48,7 +48,6 @@ const (
AF_UNIX = 0x1 AF_UNIX = 0x1
AF_UNSPEC = 0x0 AF_UNSPEC = 0x0
AF_UTUN = 0x26 AF_UTUN = 0x26
ALTWERASE = 0x200
B0 = 0x0 B0 = 0x0
B110 = 0x6e B110 = 0x6e
B115200 = 0x1c200 B115200 = 0x1c200
@ -139,26 +138,9 @@ const (
BPF_W = 0x0 BPF_W = 0x0
BPF_X = 0x8 BPF_X = 0x8
BRKINT = 0x2 BRKINT = 0x2
BS0 = 0x0
BS1 = 0x8000
BSDLY = 0x8000
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x6
CLOCK_MONOTONIC_RAW = 0x4
CLOCK_MONOTONIC_RAW_APPROX = 0x5
CLOCK_PROCESS_CPUTIME_ID = 0xc
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
CR3 = 0x3000
CRDLY = 0x3000
CREAD = 0x800 CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0 CS5 = 0x0
CS6 = 0x100 CS6 = 0x100
CS7 = 0x200 CS7 = 0x200
@ -350,14 +332,13 @@ const (
ECHONL = 0x10 ECHONL = 0x10
ECHOPRT = 0x20 ECHOPRT = 0x20
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_EXCEPT = -0xf
EVFILT_FS = -0x9 EVFILT_FS = -0x9
EVFILT_MACHPORT = -0x8 EVFILT_MACHPORT = -0x8
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xf EVFILT_SYSCOUNT = 0xe
EVFILT_THREADMARKER = 0xf EVFILT_THREADMARKER = 0xe
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_USER = -0xa EVFILT_USER = -0xa
EVFILT_VM = -0xc EVFILT_VM = -0xc
@ -368,7 +349,6 @@ const (
EV_DELETE = 0x2 EV_DELETE = 0x2
EV_DISABLE = 0x8 EV_DISABLE = 0x8
EV_DISPATCH = 0x80 EV_DISPATCH = 0x80
EV_DISPATCH2 = 0x180
EV_ENABLE = 0x4 EV_ENABLE = 0x4
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
@ -379,25 +359,16 @@ const (
EV_POLL = 0x1000 EV_POLL = 0x1000
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf000
EV_UDATA_SPECIFIC = 0x100
EV_VANISHED = 0x200
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000 FLUSHO = 0x800000
F_ADDFILESIGS = 0x3d F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61
F_ADDSIGS = 0x3b F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4 F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2 F_ALLOCATECONTIG = 0x2
F_BARRIERFSYNC = 0x55
F_CHECK_LV = 0x62
F_CHKCLEAN = 0x29 F_CHKCLEAN = 0x29
F_DUPFD = 0x0 F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x43 F_DUPFD_CLOEXEC = 0x43
@ -799,13 +770,11 @@ const (
MADV_FREE_REUSABLE = 0x7 MADV_FREE_REUSABLE = 0x7
MADV_FREE_REUSE = 0x8 MADV_FREE_REUSE = 0x8
MADV_NORMAL = 0x0 MADV_NORMAL = 0x0
MADV_PAGEOUT = 0xa
MADV_RANDOM = 0x1 MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2 MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3 MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6 MADV_ZERO_WIRED_PAGES = 0x6
MAP_ANON = 0x1000 MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2 MAP_COPY = 0x2
MAP_FILE = 0x0 MAP_FILE = 0x0
MAP_FIXED = 0x10 MAP_FIXED = 0x10
@ -817,43 +786,9 @@ const (
MAP_PRIVATE = 0x2 MAP_PRIVATE = 0x2
MAP_RENAME = 0x20 MAP_RENAME = 0x20
MAP_RESERVED0080 = 0x80 MAP_RESERVED0080 = 0x80
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1 MAP_SHARED = 0x1
MCL_CURRENT = 0x1 MCL_CURRENT = 0x1
MCL_FUTURE = 0x2 MCL_FUTURE = 0x2
MNT_ASYNC = 0x40
MNT_AUTOMOUNTED = 0x400000
MNT_CMDFLAGS = 0xf0000
MNT_CPROTECT = 0x80
MNT_DEFWRITE = 0x2000000
MNT_DONTBROWSE = 0x100000
MNT_DOVOLFS = 0x8000
MNT_DWAIT = 0x4
MNT_EXPORTED = 0x100
MNT_FORCE = 0x80000
MNT_IGNORE_OWNERSHIP = 0x200000
MNT_JOURNALED = 0x800000
MNT_LOCAL = 0x1000
MNT_MULTILABEL = 0x4000000
MNT_NOATIME = 0x10000000
MNT_NOBLOCK = 0x20000
MNT_NODEV = 0x10
MNT_NOEXEC = 0x4
MNT_NOSUID = 0x8
MNT_NOUSERXATTR = 0x1000000
MNT_NOWAIT = 0x2
MNT_QUARANTINE = 0x400
MNT_QUOTA = 0x2000
MNT_RDONLY = 0x1
MNT_RELOAD = 0x40000
MNT_ROOTFS = 0x4000
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
MNT_UNKNOWNPERMISSIONS = 0x200000
MNT_UPDATE = 0x10000
MNT_VISFLAGMASK = 0x17f0f5ff
MNT_WAIT = 0x1
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4 MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80 MSG_DONTWAIT = 0x80
@ -884,13 +819,7 @@ const (
NET_RT_MAXID = 0xa NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4 NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5 NET_RT_TRASH = 0x5
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ABSOLUTE = 0x8 NOTE_ABSOLUTE = 0x8
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_BACKGROUND = 0x40 NOTE_BACKGROUND = 0x40
@ -914,14 +843,11 @@ const (
NOTE_FFNOP = 0x0 NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000 NOTE_FFOR = 0x80000000
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_FUNLOCK = 0x100
NOTE_LEEWAY = 0x10 NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80 NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4 NOTE_NSECONDS = 0x4
NOTE_OOB = 0x2
NOTE_PCTRLMASK = -0x100000 NOTE_PCTRLMASK = -0x100000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_REAP = 0x10000000 NOTE_REAP = 0x10000000
@ -946,7 +872,6 @@ const (
ONOCR = 0x20 ONOCR = 0x20
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_ALERT = 0x20000000 O_ALERT = 0x20000000
O_APPEND = 0x8 O_APPEND = 0x8
@ -955,7 +880,6 @@ const (
O_CREAT = 0x200 O_CREAT = 0x200
O_DIRECTORY = 0x100000 O_DIRECTORY = 0x100000
O_DP_GETRAWENCRYPTED = 0x1 O_DP_GETRAWENCRYPTED = 0x1
O_DP_GETRAWUNENCRYPTED = 0x2
O_DSYNC = 0x400000 O_DSYNC = 0x400000
O_EVTONLY = 0x8000 O_EVTONLY = 0x8000
O_EXCL = 0x800 O_EXCL = 0x800
@ -1008,10 +932,7 @@ const (
RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_CPU_USAGE_MONITOR = 0x2
RLIMIT_DATA = 0x2 RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1 RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8 RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
@ -1181,8 +1102,6 @@ const (
SO_LABEL = 0x1010 SO_LABEL = 0x1010
SO_LINGER = 0x80 SO_LINGER = 0x80
SO_LINGER_SEC = 0x1080 SO_LINGER_SEC = 0x1080
SO_NETSVC_MARKING_LEVEL = 0x1119
SO_NET_SERVICE_TYPE = 0x1116
SO_NKE = 0x1021 SO_NKE = 0x1021
SO_NOADDRERR = 0x1023 SO_NOADDRERR = 0x1023
SO_NOSIGPIPE = 0x1022 SO_NOSIGPIPE = 0x1022
@ -1238,22 +1157,11 @@ const (
S_IXGRP = 0x8 S_IXGRP = 0x8
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x400
TAB2 = 0x800
TAB3 = 0x4
TABDLY = 0xc04
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CONNECTIONTIMEOUT = 0x20 TCP_CONNECTIONTIMEOUT = 0x20
TCP_CONNECTION_INFO = 0x106
TCP_ENABLE_ECN = 0x104 TCP_ENABLE_ECN = 0x104
TCP_FASTOPEN = 0x105
TCP_KEEPALIVE = 0x10 TCP_KEEPALIVE = 0x10
TCP_KEEPCNT = 0x102 TCP_KEEPCNT = 0x102
TCP_KEEPINTVL = 0x101 TCP_KEEPINTVL = 0x101
@ -1353,11 +1261,6 @@ const (
VKILL = 0x5 VKILL = 0x5
VLNEXT = 0xe VLNEXT = 0xe
VMIN = 0x10 VMIN = 0x10
VM_LOADAVG = 0x2
VM_MACHFACTOR = 0x4
VM_MAXID = 0x6
VM_METER = 0x1
VM_SWAPUSAGE = 0x5
VQUIT = 0x9 VQUIT = 0x9
VREPRINT = 0x6 VREPRINT = 0x6
VSTART = 0xc VSTART = 0xc

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m64 // mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build amd64,darwin // +build amd64,darwin
@ -48,7 +48,6 @@ const (
AF_UNIX = 0x1 AF_UNIX = 0x1
AF_UNSPEC = 0x0 AF_UNSPEC = 0x0
AF_UTUN = 0x26 AF_UTUN = 0x26
ALTWERASE = 0x200
B0 = 0x0 B0 = 0x0
B110 = 0x6e B110 = 0x6e
B115200 = 0x1c200 B115200 = 0x1c200
@ -139,26 +138,9 @@ const (
BPF_W = 0x0 BPF_W = 0x0
BPF_X = 0x8 BPF_X = 0x8
BRKINT = 0x2 BRKINT = 0x2
BS0 = 0x0
BS1 = 0x8000
BSDLY = 0x8000
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x6
CLOCK_MONOTONIC_RAW = 0x4
CLOCK_MONOTONIC_RAW_APPROX = 0x5
CLOCK_PROCESS_CPUTIME_ID = 0xc
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
CR3 = 0x3000
CRDLY = 0x3000
CREAD = 0x800 CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0 CS5 = 0x0
CS6 = 0x100 CS6 = 0x100
CS7 = 0x200 CS7 = 0x200
@ -350,14 +332,13 @@ const (
ECHONL = 0x10 ECHONL = 0x10
ECHOPRT = 0x20 ECHOPRT = 0x20
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_EXCEPT = -0xf
EVFILT_FS = -0x9 EVFILT_FS = -0x9
EVFILT_MACHPORT = -0x8 EVFILT_MACHPORT = -0x8
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xf EVFILT_SYSCOUNT = 0xe
EVFILT_THREADMARKER = 0xf EVFILT_THREADMARKER = 0xe
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_USER = -0xa EVFILT_USER = -0xa
EVFILT_VM = -0xc EVFILT_VM = -0xc
@ -368,7 +349,6 @@ const (
EV_DELETE = 0x2 EV_DELETE = 0x2
EV_DISABLE = 0x8 EV_DISABLE = 0x8
EV_DISPATCH = 0x80 EV_DISPATCH = 0x80
EV_DISPATCH2 = 0x180
EV_ENABLE = 0x4 EV_ENABLE = 0x4
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
@ -379,25 +359,16 @@ const (
EV_POLL = 0x1000 EV_POLL = 0x1000
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf000
EV_UDATA_SPECIFIC = 0x100
EV_VANISHED = 0x200
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000 FLUSHO = 0x800000
F_ADDFILESIGS = 0x3d F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61
F_ADDSIGS = 0x3b F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4 F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2 F_ALLOCATECONTIG = 0x2
F_BARRIERFSYNC = 0x55
F_CHECK_LV = 0x62
F_CHKCLEAN = 0x29 F_CHKCLEAN = 0x29
F_DUPFD = 0x0 F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x43 F_DUPFD_CLOEXEC = 0x43
@ -799,13 +770,11 @@ const (
MADV_FREE_REUSABLE = 0x7 MADV_FREE_REUSABLE = 0x7
MADV_FREE_REUSE = 0x8 MADV_FREE_REUSE = 0x8
MADV_NORMAL = 0x0 MADV_NORMAL = 0x0
MADV_PAGEOUT = 0xa
MADV_RANDOM = 0x1 MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2 MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3 MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6 MADV_ZERO_WIRED_PAGES = 0x6
MAP_ANON = 0x1000 MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2 MAP_COPY = 0x2
MAP_FILE = 0x0 MAP_FILE = 0x0
MAP_FIXED = 0x10 MAP_FIXED = 0x10
@ -817,43 +786,9 @@ const (
MAP_PRIVATE = 0x2 MAP_PRIVATE = 0x2
MAP_RENAME = 0x20 MAP_RENAME = 0x20
MAP_RESERVED0080 = 0x80 MAP_RESERVED0080 = 0x80
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1 MAP_SHARED = 0x1
MCL_CURRENT = 0x1 MCL_CURRENT = 0x1
MCL_FUTURE = 0x2 MCL_FUTURE = 0x2
MNT_ASYNC = 0x40
MNT_AUTOMOUNTED = 0x400000
MNT_CMDFLAGS = 0xf0000
MNT_CPROTECT = 0x80
MNT_DEFWRITE = 0x2000000
MNT_DONTBROWSE = 0x100000
MNT_DOVOLFS = 0x8000
MNT_DWAIT = 0x4
MNT_EXPORTED = 0x100
MNT_FORCE = 0x80000
MNT_IGNORE_OWNERSHIP = 0x200000
MNT_JOURNALED = 0x800000
MNT_LOCAL = 0x1000
MNT_MULTILABEL = 0x4000000
MNT_NOATIME = 0x10000000
MNT_NOBLOCK = 0x20000
MNT_NODEV = 0x10
MNT_NOEXEC = 0x4
MNT_NOSUID = 0x8
MNT_NOUSERXATTR = 0x1000000
MNT_NOWAIT = 0x2
MNT_QUARANTINE = 0x400
MNT_QUOTA = 0x2000
MNT_RDONLY = 0x1
MNT_RELOAD = 0x40000
MNT_ROOTFS = 0x4000
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
MNT_UNKNOWNPERMISSIONS = 0x200000
MNT_UPDATE = 0x10000
MNT_VISFLAGMASK = 0x17f0f5ff
MNT_WAIT = 0x1
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4 MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80 MSG_DONTWAIT = 0x80
@ -884,13 +819,7 @@ const (
NET_RT_MAXID = 0xa NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4 NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5 NET_RT_TRASH = 0x5
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ABSOLUTE = 0x8 NOTE_ABSOLUTE = 0x8
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_BACKGROUND = 0x40 NOTE_BACKGROUND = 0x40
@ -914,14 +843,11 @@ const (
NOTE_FFNOP = 0x0 NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000 NOTE_FFOR = 0x80000000
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_FUNLOCK = 0x100
NOTE_LEEWAY = 0x10 NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80 NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4 NOTE_NSECONDS = 0x4
NOTE_OOB = 0x2
NOTE_PCTRLMASK = -0x100000 NOTE_PCTRLMASK = -0x100000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_REAP = 0x10000000 NOTE_REAP = 0x10000000
@ -946,7 +872,6 @@ const (
ONOCR = 0x20 ONOCR = 0x20
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_ALERT = 0x20000000 O_ALERT = 0x20000000
O_APPEND = 0x8 O_APPEND = 0x8
@ -955,7 +880,6 @@ const (
O_CREAT = 0x200 O_CREAT = 0x200
O_DIRECTORY = 0x100000 O_DIRECTORY = 0x100000
O_DP_GETRAWENCRYPTED = 0x1 O_DP_GETRAWENCRYPTED = 0x1
O_DP_GETRAWUNENCRYPTED = 0x2
O_DSYNC = 0x400000 O_DSYNC = 0x400000
O_EVTONLY = 0x8000 O_EVTONLY = 0x8000
O_EXCL = 0x800 O_EXCL = 0x800
@ -1008,10 +932,7 @@ const (
RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_CPU_USAGE_MONITOR = 0x2
RLIMIT_DATA = 0x2 RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1 RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8 RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
@ -1181,8 +1102,6 @@ const (
SO_LABEL = 0x1010 SO_LABEL = 0x1010
SO_LINGER = 0x80 SO_LINGER = 0x80
SO_LINGER_SEC = 0x1080 SO_LINGER_SEC = 0x1080
SO_NETSVC_MARKING_LEVEL = 0x1119
SO_NET_SERVICE_TYPE = 0x1116
SO_NKE = 0x1021 SO_NKE = 0x1021
SO_NOADDRERR = 0x1023 SO_NOADDRERR = 0x1023
SO_NOSIGPIPE = 0x1022 SO_NOSIGPIPE = 0x1022
@ -1238,22 +1157,11 @@ const (
S_IXGRP = 0x8 S_IXGRP = 0x8
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x400
TAB2 = 0x800
TAB3 = 0x4
TABDLY = 0xc04
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CONNECTIONTIMEOUT = 0x20 TCP_CONNECTIONTIMEOUT = 0x20
TCP_CONNECTION_INFO = 0x106
TCP_ENABLE_ECN = 0x104 TCP_ENABLE_ECN = 0x104
TCP_FASTOPEN = 0x105
TCP_KEEPALIVE = 0x10 TCP_KEEPALIVE = 0x10
TCP_KEEPCNT = 0x102 TCP_KEEPCNT = 0x102
TCP_KEEPINTVL = 0x101 TCP_KEEPINTVL = 0x101
@ -1353,11 +1261,6 @@ const (
VKILL = 0x5 VKILL = 0x5
VLNEXT = 0xe VLNEXT = 0xe
VMIN = 0x10 VMIN = 0x10
VM_LOADAVG = 0x2
VM_MACHFACTOR = 0x4
VM_MAXID = 0x6
VM_METER = 0x1
VM_SWAPUSAGE = 0x5
VQUIT = 0x9 VQUIT = 0x9
VREPRINT = 0x6 VREPRINT = 0x6
VSTART = 0xc VSTART = 0xc

View File

@ -1,11 +1,11 @@
// mkerrors.sh // mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build arm,darwin
// Created by cgo -godefs - DO NOT EDIT // Created by cgo -godefs - DO NOT EDIT
// cgo -godefs -- _const.go // cgo -godefs -- _const.go
// +build arm,darwin
package unix package unix
import "syscall" import "syscall"
@ -48,7 +48,6 @@ const (
AF_UNIX = 0x1 AF_UNIX = 0x1
AF_UNSPEC = 0x0 AF_UNSPEC = 0x0
AF_UTUN = 0x26 AF_UTUN = 0x26
ALTWERASE = 0x200
B0 = 0x0 B0 = 0x0
B110 = 0x6e B110 = 0x6e
B115200 = 0x1c200 B115200 = 0x1c200
@ -87,7 +86,6 @@ const (
BIOCSBLEN = 0xc0044266 BIOCSBLEN = 0xc0044266
BIOCSDLT = 0x80044278 BIOCSDLT = 0x80044278
BIOCSETF = 0x80104267 BIOCSETF = 0x80104267
BIOCSETFNR = 0x8010427e
BIOCSETIF = 0x8020426c BIOCSETIF = 0x8020426c
BIOCSHDRCMPLT = 0x80044275 BIOCSHDRCMPLT = 0x80044275
BIOCSRSIG = 0x80044273 BIOCSRSIG = 0x80044273
@ -139,26 +137,9 @@ const (
BPF_W = 0x0 BPF_W = 0x0
BPF_X = 0x8 BPF_X = 0x8
BRKINT = 0x2 BRKINT = 0x2
BS0 = 0x0
BS1 = 0x8000
BSDLY = 0x8000
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x6
CLOCK_MONOTONIC_RAW = 0x4
CLOCK_MONOTONIC_RAW_APPROX = 0x5
CLOCK_PROCESS_CPUTIME_ID = 0xc
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
CR3 = 0x3000
CRDLY = 0x3000
CREAD = 0x800 CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0 CS5 = 0x0
CS6 = 0x100 CS6 = 0x100
CS7 = 0x200 CS7 = 0x200
@ -171,168 +152,33 @@ const (
CSUSP = 0x1a CSUSP = 0x1a
CTL_MAXNAME = 0xc CTL_MAXNAME = 0xc
CTL_NET = 0x4 CTL_NET = 0x4
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
DLT_AOS = 0xde
DLT_APPLE_IP_OVER_IEEE1394 = 0x8a DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
DLT_ARCNET = 0x7 DLT_ARCNET = 0x7
DLT_ARCNET_LINUX = 0x81
DLT_ATM_CLIP = 0x13 DLT_ATM_CLIP = 0x13
DLT_ATM_RFC1483 = 0xb DLT_ATM_RFC1483 = 0xb
DLT_AURORA = 0x7e
DLT_AX25 = 0x3 DLT_AX25 = 0x3
DLT_AX25_KISS = 0xca
DLT_BACNET_MS_TP = 0xa5
DLT_BLUETOOTH_HCI_H4 = 0xbb
DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
DLT_CAN20B = 0xbe
DLT_CAN_SOCKETCAN = 0xe3
DLT_CHAOS = 0x5 DLT_CHAOS = 0x5
DLT_CHDLC = 0x68 DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
DLT_C_HDLC = 0x68 DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
DLT_DOCSIS = 0x8f
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1 DLT_EN10MB = 0x1
DLT_EN3MB = 0x2 DLT_EN3MB = 0x2
DLT_ENC = 0x6d
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa DLT_FDDI = 0xa
DLT_FLEXRAY = 0xd2
DLT_FRELAY = 0x6b
DLT_FRELAY_WITH_DIR = 0xce
DLT_GCOM_SERIAL = 0xad
DLT_GCOM_T1E1 = 0xac
DLT_GPF_F = 0xab
DLT_GPF_T = 0xaa
DLT_GPRS_LLC = 0xa9
DLT_GSMTAP_ABIS = 0xda
DLT_GSMTAP_UM = 0xd9
DLT_HHDLC = 0x79
DLT_IBM_SN = 0x92
DLT_IBM_SP = 0x91
DLT_IEEE802 = 0x6 DLT_IEEE802 = 0x6
DLT_IEEE802_11 = 0x69 DLT_IEEE802_11 = 0x69
DLT_IEEE802_11_RADIO = 0x7f DLT_IEEE802_11_RADIO = 0x7f
DLT_IEEE802_11_RADIO_AVS = 0xa3 DLT_IEEE802_11_RADIO_AVS = 0xa3
DLT_IEEE802_15_4 = 0xc3
DLT_IEEE802_15_4_LINUX = 0xbf
DLT_IEEE802_15_4_NOFCS = 0xe6
DLT_IEEE802_15_4_NONASK_PHY = 0xd7
DLT_IEEE802_16_MAC_CPS = 0xbc
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
DLT_IPFILTER = 0x74
DLT_IPMB = 0xc7
DLT_IPMB_LINUX = 0xd1
DLT_IPNET = 0xe2
DLT_IPOIB = 0xf2
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
DLT_JUNIPER_CHDLC = 0xb5
DLT_JUNIPER_ES = 0x84
DLT_JUNIPER_ETHER = 0xb2
DLT_JUNIPER_FIBRECHANNEL = 0xea
DLT_JUNIPER_FRELAY = 0xb4
DLT_JUNIPER_GGSN = 0x85
DLT_JUNIPER_ISM = 0xc2
DLT_JUNIPER_MFR = 0x86
DLT_JUNIPER_MLFR = 0x83
DLT_JUNIPER_MLPPP = 0x82
DLT_JUNIPER_MONITOR = 0xa4
DLT_JUNIPER_PIC_PEER = 0xae
DLT_JUNIPER_PPP = 0xb3
DLT_JUNIPER_PPPOE = 0xa7
DLT_JUNIPER_PPPOE_ATM = 0xa8
DLT_JUNIPER_SERVICES = 0x88
DLT_JUNIPER_SRX_E2E = 0xe9
DLT_JUNIPER_ST = 0xc8
DLT_JUNIPER_VP = 0xb7
DLT_JUNIPER_VS = 0xe8
DLT_LAPB_WITH_DIR = 0xcf
DLT_LAPD = 0xcb
DLT_LIN = 0xd4
DLT_LINUX_EVDEV = 0xd8
DLT_LINUX_IRDA = 0x90
DLT_LINUX_LAPD = 0xb1
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
DLT_LINUX_SLL = 0x71 DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c DLT_LOOP = 0x6c
DLT_LTALK = 0x72
DLT_MATCHING_MAX = 0xf5
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
DLT_MPEG_2_TS = 0xf3
DLT_MPLS = 0xdb
DLT_MTP2 = 0x8c
DLT_MTP2_WITH_PHDR = 0x8b
DLT_MTP3 = 0x8d
DLT_MUX27010 = 0xec
DLT_NETANALYZER = 0xf0
DLT_NETANALYZER_TRANSPARENT = 0xf1
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
DLT_NULL = 0x0 DLT_NULL = 0x0
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75 DLT_PFLOG = 0x75
DLT_PFSYNC = 0x12 DLT_PFSYNC = 0x12
DLT_PPI = 0xc0
DLT_PPP = 0x9 DLT_PPP = 0x9
DLT_PPP_BSDOS = 0x10 DLT_PPP_BSDOS = 0x10
DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32 DLT_PPP_SERIAL = 0x32
DLT_PPP_WITH_DIR = 0xcc
DLT_PPP_WITH_DIRECTION = 0xa6
DLT_PRISM_HEADER = 0x77
DLT_PRONET = 0x4 DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc DLT_RAW = 0xc
DLT_RIO = 0x7c
DLT_SCCP = 0x8e
DLT_SITA = 0xc4
DLT_SLIP = 0x8 DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xf DLT_SLIP_BSDOS = 0xf
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
DLT_USER1 = 0x94
DLT_USER10 = 0x9d
DLT_USER11 = 0x9e
DLT_USER12 = 0x9f
DLT_USER13 = 0xa0
DLT_USER14 = 0xa1
DLT_USER15 = 0xa2
DLT_USER2 = 0x95
DLT_USER3 = 0x96
DLT_USER4 = 0x97
DLT_USER5 = 0x98
DLT_USER6 = 0x99
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
DLT_WIHART = 0xdf
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
DT_BLK = 0x6 DT_BLK = 0x6
DT_CHR = 0x2 DT_CHR = 0x2
DT_DIR = 0x4 DT_DIR = 0x4
@ -350,14 +196,13 @@ const (
ECHONL = 0x10 ECHONL = 0x10
ECHOPRT = 0x20 ECHOPRT = 0x20
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_EXCEPT = -0xf
EVFILT_FS = -0x9 EVFILT_FS = -0x9
EVFILT_MACHPORT = -0x8 EVFILT_MACHPORT = -0x8
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xf EVFILT_SYSCOUNT = 0xe
EVFILT_THREADMARKER = 0xf EVFILT_THREADMARKER = 0xe
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_USER = -0xa EVFILT_USER = -0xa
EVFILT_VM = -0xc EVFILT_VM = -0xc
@ -368,7 +213,6 @@ const (
EV_DELETE = 0x2 EV_DELETE = 0x2
EV_DISABLE = 0x8 EV_DISABLE = 0x8
EV_DISPATCH = 0x80 EV_DISPATCH = 0x80
EV_DISPATCH2 = 0x180
EV_ENABLE = 0x4 EV_ENABLE = 0x4
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
@ -379,25 +223,16 @@ const (
EV_POLL = 0x1000 EV_POLL = 0x1000
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf000
EV_UDATA_SPECIFIC = 0x100
EV_VANISHED = 0x200
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000 FLUSHO = 0x800000
F_ADDFILESIGS = 0x3d F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61
F_ADDSIGS = 0x3b F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4 F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2 F_ALLOCATECONTIG = 0x2
F_BARRIERFSYNC = 0x55
F_CHECK_LV = 0x62
F_CHKCLEAN = 0x29 F_CHKCLEAN = 0x29
F_DUPFD = 0x0 F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x43 F_DUPFD_CLOEXEC = 0x43
@ -512,7 +347,6 @@ const (
IFT_PDP = 0xff IFT_PDP = 0xff
IFT_PFLOG = 0xf5 IFT_PFLOG = 0xf5
IFT_PFSYNC = 0xf6 IFT_PFSYNC = 0xf6
IFT_PKTAP = 0xfe
IFT_PPP = 0x17 IFT_PPP = 0x17
IFT_PROPMUX = 0x36 IFT_PROPMUX = 0x36
IFT_PROPVIRTUAL = 0x35 IFT_PROPVIRTUAL = 0x35
@ -681,7 +515,7 @@ const (
IPV6_FAITH = 0x1d IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FRAGTTL = 0x3c IPV6_FRAGTTL = 0x78
IPV6_FW_ADD = 0x1e IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f IPV6_FW_DEL = 0x1f
IPV6_FW_FLUSH = 0x20 IPV6_FW_FLUSH = 0x20
@ -799,13 +633,11 @@ const (
MADV_FREE_REUSABLE = 0x7 MADV_FREE_REUSABLE = 0x7
MADV_FREE_REUSE = 0x8 MADV_FREE_REUSE = 0x8
MADV_NORMAL = 0x0 MADV_NORMAL = 0x0
MADV_PAGEOUT = 0xa
MADV_RANDOM = 0x1 MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2 MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3 MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6 MADV_ZERO_WIRED_PAGES = 0x6
MAP_ANON = 0x1000 MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2 MAP_COPY = 0x2
MAP_FILE = 0x0 MAP_FILE = 0x0
MAP_FIXED = 0x10 MAP_FIXED = 0x10
@ -817,43 +649,9 @@ const (
MAP_PRIVATE = 0x2 MAP_PRIVATE = 0x2
MAP_RENAME = 0x20 MAP_RENAME = 0x20
MAP_RESERVED0080 = 0x80 MAP_RESERVED0080 = 0x80
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1 MAP_SHARED = 0x1
MCL_CURRENT = 0x1 MCL_CURRENT = 0x1
MCL_FUTURE = 0x2 MCL_FUTURE = 0x2
MNT_ASYNC = 0x40
MNT_AUTOMOUNTED = 0x400000
MNT_CMDFLAGS = 0xf0000
MNT_CPROTECT = 0x80
MNT_DEFWRITE = 0x2000000
MNT_DONTBROWSE = 0x100000
MNT_DOVOLFS = 0x8000
MNT_DWAIT = 0x4
MNT_EXPORTED = 0x100
MNT_FORCE = 0x80000
MNT_IGNORE_OWNERSHIP = 0x200000
MNT_JOURNALED = 0x800000
MNT_LOCAL = 0x1000
MNT_MULTILABEL = 0x4000000
MNT_NOATIME = 0x10000000
MNT_NOBLOCK = 0x20000
MNT_NODEV = 0x10
MNT_NOEXEC = 0x4
MNT_NOSUID = 0x8
MNT_NOUSERXATTR = 0x1000000
MNT_NOWAIT = 0x2
MNT_QUARANTINE = 0x400
MNT_QUOTA = 0x2000
MNT_RDONLY = 0x1
MNT_RELOAD = 0x40000
MNT_ROOTFS = 0x4000
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
MNT_UNKNOWNPERMISSIONS = 0x200000
MNT_UPDATE = 0x10000
MNT_VISFLAGMASK = 0x17f0f5ff
MNT_WAIT = 0x1
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4 MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80 MSG_DONTWAIT = 0x80
@ -884,13 +682,7 @@ const (
NET_RT_MAXID = 0xa NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4 NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5 NET_RT_TRASH = 0x5
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ABSOLUTE = 0x8 NOTE_ABSOLUTE = 0x8
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_BACKGROUND = 0x40 NOTE_BACKGROUND = 0x40
@ -914,14 +706,11 @@ const (
NOTE_FFNOP = 0x0 NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000 NOTE_FFOR = 0x80000000
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_FUNLOCK = 0x100
NOTE_LEEWAY = 0x10 NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80 NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4 NOTE_NSECONDS = 0x4
NOTE_OOB = 0x2
NOTE_PCTRLMASK = -0x100000 NOTE_PCTRLMASK = -0x100000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_REAP = 0x10000000 NOTE_REAP = 0x10000000
@ -946,7 +735,6 @@ const (
ONOCR = 0x20 ONOCR = 0x20
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_ALERT = 0x20000000 O_ALERT = 0x20000000
O_APPEND = 0x8 O_APPEND = 0x8
@ -955,7 +743,6 @@ const (
O_CREAT = 0x200 O_CREAT = 0x200
O_DIRECTORY = 0x100000 O_DIRECTORY = 0x100000
O_DP_GETRAWENCRYPTED = 0x1 O_DP_GETRAWENCRYPTED = 0x1
O_DP_GETRAWUNENCRYPTED = 0x2
O_DSYNC = 0x400000 O_DSYNC = 0x400000
O_EVTONLY = 0x8000 O_EVTONLY = 0x8000
O_EXCL = 0x800 O_EXCL = 0x800
@ -1008,10 +795,7 @@ const (
RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_CPU_USAGE_MONITOR = 0x2
RLIMIT_DATA = 0x2 RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1 RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8 RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
@ -1046,7 +830,6 @@ const (
RTF_LOCAL = 0x200000 RTF_LOCAL = 0x200000
RTF_MODIFIED = 0x20 RTF_MODIFIED = 0x20
RTF_MULTICAST = 0x800000 RTF_MULTICAST = 0x800000
RTF_NOIFREF = 0x2000
RTF_PINNED = 0x100000 RTF_PINNED = 0x100000
RTF_PRCLONING = 0x10000 RTF_PRCLONING = 0x10000
RTF_PROTO1 = 0x8000 RTF_PROTO1 = 0x8000
@ -1181,8 +964,6 @@ const (
SO_LABEL = 0x1010 SO_LABEL = 0x1010
SO_LINGER = 0x80 SO_LINGER = 0x80
SO_LINGER_SEC = 0x1080 SO_LINGER_SEC = 0x1080
SO_NETSVC_MARKING_LEVEL = 0x1119
SO_NET_SERVICE_TYPE = 0x1116
SO_NKE = 0x1021 SO_NKE = 0x1021
SO_NOADDRERR = 0x1023 SO_NOADDRERR = 0x1023
SO_NOSIGPIPE = 0x1022 SO_NOSIGPIPE = 0x1022
@ -1238,22 +1019,11 @@ const (
S_IXGRP = 0x8 S_IXGRP = 0x8
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x400
TAB2 = 0x800
TAB3 = 0x4
TABDLY = 0xc04
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CONNECTIONTIMEOUT = 0x20 TCP_CONNECTIONTIMEOUT = 0x20
TCP_CONNECTION_INFO = 0x106
TCP_ENABLE_ECN = 0x104 TCP_ENABLE_ECN = 0x104
TCP_FASTOPEN = 0x105
TCP_KEEPALIVE = 0x10 TCP_KEEPALIVE = 0x10
TCP_KEEPCNT = 0x102 TCP_KEEPCNT = 0x102
TCP_KEEPINTVL = 0x101 TCP_KEEPINTVL = 0x101
@ -1353,11 +1123,6 @@ const (
VKILL = 0x5 VKILL = 0x5
VLNEXT = 0xe VLNEXT = 0xe
VMIN = 0x10 VMIN = 0x10
VM_LOADAVG = 0x2
VM_MACHFACTOR = 0x4
VM_MAXID = 0x6
VM_METER = 0x1
VM_SWAPUSAGE = 0x5
VQUIT = 0x9 VQUIT = 0x9
VREPRINT = 0x6 VREPRINT = 0x6
VSTART = 0xc VSTART = 0xc
@ -1526,148 +1291,3 @@ const (
SIGXCPU = syscall.Signal(0x18) SIGXCPU = syscall.Signal(0x18)
SIGXFSZ = syscall.Signal(0x19) SIGXFSZ = syscall.Signal(0x19)
) )
// Error table
var errors = [...]string{
1: "operation not permitted",
2: "no such file or directory",
3: "no such process",
4: "interrupted system call",
5: "input/output error",
6: "device not configured",
7: "argument list too long",
8: "exec format error",
9: "bad file descriptor",
10: "no child processes",
11: "resource deadlock avoided",
12: "cannot allocate memory",
13: "permission denied",
14: "bad address",
15: "block device required",
16: "resource busy",
17: "file exists",
18: "cross-device link",
19: "operation not supported by device",
20: "not a directory",
21: "is a directory",
22: "invalid argument",
23: "too many open files in system",
24: "too many open files",
25: "inappropriate ioctl for device",
26: "text file busy",
27: "file too large",
28: "no space left on device",
29: "illegal seek",
30: "read-only file system",
31: "too many links",
32: "broken pipe",
33: "numerical argument out of domain",
34: "result too large",
35: "resource temporarily unavailable",
36: "operation now in progress",
37: "operation already in progress",
38: "socket operation on non-socket",
39: "destination address required",
40: "message too long",
41: "protocol wrong type for socket",
42: "protocol not available",
43: "protocol not supported",
44: "socket type not supported",
45: "operation not supported",
46: "protocol family not supported",
47: "address family not supported by protocol family",
48: "address already in use",
49: "can't assign requested address",
50: "network is down",
51: "network is unreachable",
52: "network dropped connection on reset",
53: "software caused connection abort",
54: "connection reset by peer",
55: "no buffer space available",
56: "socket is already connected",
57: "socket is not connected",
58: "can't send after socket shutdown",
59: "too many references: can't splice",
60: "operation timed out",
61: "connection refused",
62: "too many levels of symbolic links",
63: "file name too long",
64: "host is down",
65: "no route to host",
66: "directory not empty",
67: "too many processes",
68: "too many users",
69: "disc quota exceeded",
70: "stale NFS file handle",
71: "too many levels of remote in path",
72: "RPC struct is bad",
73: "RPC version wrong",
74: "RPC prog. not avail",
75: "program version wrong",
76: "bad procedure for program",
77: "no locks available",
78: "function not implemented",
79: "inappropriate file type or format",
80: "authentication error",
81: "need authenticator",
82: "device power is off",
83: "device error",
84: "value too large to be stored in data type",
85: "bad executable (or shared library)",
86: "bad CPU type in executable",
87: "shared library version mismatch",
88: "malformed Mach-o file",
89: "operation canceled",
90: "identifier removed",
91: "no message of desired type",
92: "illegal byte sequence",
93: "attribute not found",
94: "bad message",
95: "EMULTIHOP (Reserved)",
96: "no message available on STREAM",
97: "ENOLINK (Reserved)",
98: "no STREAM resources",
99: "not a STREAM",
100: "protocol error",
101: "STREAM ioctl timeout",
102: "operation not supported on socket",
103: "policy not found",
104: "state not recoverable",
105: "previous owner died",
106: "interface output queue is full",
}
// Signal table
var signals = [...]string{
1: "hangup",
2: "interrupt",
3: "quit",
4: "illegal instruction",
5: "trace/BPT trap",
6: "abort trap",
7: "EMT trap",
8: "floating point exception",
9: "killed",
10: "bus error",
11: "segmentation fault",
12: "bad system call",
13: "broken pipe",
14: "alarm clock",
15: "terminated",
16: "urgent I/O condition",
17: "suspended (signal)",
18: "suspended",
19: "continued",
20: "child exited",
21: "stopped (tty input)",
22: "stopped (tty output)",
23: "I/O possible",
24: "cputime limit exceeded",
25: "filesize limit exceeded",
26: "virtual timer expired",
27: "profiling timer expired",
28: "window size changes",
29: "information request",
30: "user defined signal 1",
31: "user defined signal 2",
}

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m64 // mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build arm64,darwin // +build arm64,darwin
@ -48,7 +48,6 @@ const (
AF_UNIX = 0x1 AF_UNIX = 0x1
AF_UNSPEC = 0x0 AF_UNSPEC = 0x0
AF_UTUN = 0x26 AF_UTUN = 0x26
ALTWERASE = 0x200
B0 = 0x0 B0 = 0x0
B110 = 0x6e B110 = 0x6e
B115200 = 0x1c200 B115200 = 0x1c200
@ -139,26 +138,9 @@ const (
BPF_W = 0x0 BPF_W = 0x0
BPF_X = 0x8 BPF_X = 0x8
BRKINT = 0x2 BRKINT = 0x2
BS0 = 0x0
BS1 = 0x8000
BSDLY = 0x8000
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x6
CLOCK_MONOTONIC_RAW = 0x4
CLOCK_MONOTONIC_RAW_APPROX = 0x5
CLOCK_PROCESS_CPUTIME_ID = 0xc
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
CR3 = 0x3000
CRDLY = 0x3000
CREAD = 0x800 CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0 CS5 = 0x0
CS6 = 0x100 CS6 = 0x100
CS7 = 0x200 CS7 = 0x200
@ -350,14 +332,13 @@ const (
ECHONL = 0x10 ECHONL = 0x10
ECHOPRT = 0x20 ECHOPRT = 0x20
EVFILT_AIO = -0x3 EVFILT_AIO = -0x3
EVFILT_EXCEPT = -0xf
EVFILT_FS = -0x9 EVFILT_FS = -0x9
EVFILT_MACHPORT = -0x8 EVFILT_MACHPORT = -0x8
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xf EVFILT_SYSCOUNT = 0xe
EVFILT_THREADMARKER = 0xf EVFILT_THREADMARKER = 0xe
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_USER = -0xa EVFILT_USER = -0xa
EVFILT_VM = -0xc EVFILT_VM = -0xc
@ -368,7 +349,6 @@ const (
EV_DELETE = 0x2 EV_DELETE = 0x2
EV_DISABLE = 0x8 EV_DISABLE = 0x8
EV_DISPATCH = 0x80 EV_DISPATCH = 0x80
EV_DISPATCH2 = 0x180
EV_ENABLE = 0x4 EV_ENABLE = 0x4
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
@ -379,25 +359,16 @@ const (
EV_POLL = 0x1000 EV_POLL = 0x1000
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf000
EV_UDATA_SPECIFIC = 0x100
EV_VANISHED = 0x200
EXTA = 0x4b00 EXTA = 0x4b00
EXTB = 0x9600 EXTB = 0x9600
EXTPROC = 0x800 EXTPROC = 0x800
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
FF0 = 0x0
FF1 = 0x4000
FFDLY = 0x4000
FLUSHO = 0x800000 FLUSHO = 0x800000
F_ADDFILESIGS = 0x3d F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
F_ADDFILESIGS_RETURN = 0x61
F_ADDSIGS = 0x3b F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4 F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2 F_ALLOCATECONTIG = 0x2
F_BARRIERFSYNC = 0x55
F_CHECK_LV = 0x62
F_CHKCLEAN = 0x29 F_CHKCLEAN = 0x29
F_DUPFD = 0x0 F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x43 F_DUPFD_CLOEXEC = 0x43
@ -799,13 +770,11 @@ const (
MADV_FREE_REUSABLE = 0x7 MADV_FREE_REUSABLE = 0x7
MADV_FREE_REUSE = 0x8 MADV_FREE_REUSE = 0x8
MADV_NORMAL = 0x0 MADV_NORMAL = 0x0
MADV_PAGEOUT = 0xa
MADV_RANDOM = 0x1 MADV_RANDOM = 0x1
MADV_SEQUENTIAL = 0x2 MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3 MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6 MADV_ZERO_WIRED_PAGES = 0x6
MAP_ANON = 0x1000 MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2 MAP_COPY = 0x2
MAP_FILE = 0x0 MAP_FILE = 0x0
MAP_FIXED = 0x10 MAP_FIXED = 0x10
@ -817,43 +786,9 @@ const (
MAP_PRIVATE = 0x2 MAP_PRIVATE = 0x2
MAP_RENAME = 0x20 MAP_RENAME = 0x20
MAP_RESERVED0080 = 0x80 MAP_RESERVED0080 = 0x80
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1 MAP_SHARED = 0x1
MCL_CURRENT = 0x1 MCL_CURRENT = 0x1
MCL_FUTURE = 0x2 MCL_FUTURE = 0x2
MNT_ASYNC = 0x40
MNT_AUTOMOUNTED = 0x400000
MNT_CMDFLAGS = 0xf0000
MNT_CPROTECT = 0x80
MNT_DEFWRITE = 0x2000000
MNT_DONTBROWSE = 0x100000
MNT_DOVOLFS = 0x8000
MNT_DWAIT = 0x4
MNT_EXPORTED = 0x100
MNT_FORCE = 0x80000
MNT_IGNORE_OWNERSHIP = 0x200000
MNT_JOURNALED = 0x800000
MNT_LOCAL = 0x1000
MNT_MULTILABEL = 0x4000000
MNT_NOATIME = 0x10000000
MNT_NOBLOCK = 0x20000
MNT_NODEV = 0x10
MNT_NOEXEC = 0x4
MNT_NOSUID = 0x8
MNT_NOUSERXATTR = 0x1000000
MNT_NOWAIT = 0x2
MNT_QUARANTINE = 0x400
MNT_QUOTA = 0x2000
MNT_RDONLY = 0x1
MNT_RELOAD = 0x40000
MNT_ROOTFS = 0x4000
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
MNT_UNKNOWNPERMISSIONS = 0x200000
MNT_UPDATE = 0x10000
MNT_VISFLAGMASK = 0x17f0f5ff
MNT_WAIT = 0x1
MSG_CTRUNC = 0x20 MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4 MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80 MSG_DONTWAIT = 0x80
@ -884,13 +819,7 @@ const (
NET_RT_MAXID = 0xa NET_RT_MAXID = 0xa
NET_RT_STAT = 0x4 NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5 NET_RT_TRASH = 0x5
NL0 = 0x0
NL1 = 0x100
NL2 = 0x200
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ABSOLUTE = 0x8 NOTE_ABSOLUTE = 0x8
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_BACKGROUND = 0x40 NOTE_BACKGROUND = 0x40
@ -914,14 +843,11 @@ const (
NOTE_FFNOP = 0x0 NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000 NOTE_FFOR = 0x80000000
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_FUNLOCK = 0x100
NOTE_LEEWAY = 0x10 NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80 NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4 NOTE_NSECONDS = 0x4
NOTE_OOB = 0x2
NOTE_PCTRLMASK = -0x100000 NOTE_PCTRLMASK = -0x100000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_REAP = 0x10000000 NOTE_REAP = 0x10000000
@ -946,7 +872,6 @@ const (
ONOCR = 0x20 ONOCR = 0x20
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_ALERT = 0x20000000 O_ALERT = 0x20000000
O_APPEND = 0x8 O_APPEND = 0x8
@ -955,7 +880,6 @@ const (
O_CREAT = 0x200 O_CREAT = 0x200
O_DIRECTORY = 0x100000 O_DIRECTORY = 0x100000
O_DP_GETRAWENCRYPTED = 0x1 O_DP_GETRAWENCRYPTED = 0x1
O_DP_GETRAWUNENCRYPTED = 0x2
O_DSYNC = 0x400000 O_DSYNC = 0x400000
O_EVTONLY = 0x8000 O_EVTONLY = 0x8000
O_EXCL = 0x800 O_EXCL = 0x800
@ -1008,10 +932,7 @@ const (
RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_CPU_USAGE_MONITOR = 0x2
RLIMIT_DATA = 0x2 RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1 RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8 RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
@ -1181,8 +1102,6 @@ const (
SO_LABEL = 0x1010 SO_LABEL = 0x1010
SO_LINGER = 0x80 SO_LINGER = 0x80
SO_LINGER_SEC = 0x1080 SO_LINGER_SEC = 0x1080
SO_NETSVC_MARKING_LEVEL = 0x1119
SO_NET_SERVICE_TYPE = 0x1116
SO_NKE = 0x1021 SO_NKE = 0x1021
SO_NOADDRERR = 0x1023 SO_NOADDRERR = 0x1023
SO_NOSIGPIPE = 0x1022 SO_NOSIGPIPE = 0x1022
@ -1238,22 +1157,11 @@ const (
S_IXGRP = 0x8 S_IXGRP = 0x8
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TAB0 = 0x0
TAB1 = 0x400
TAB2 = 0x800
TAB3 = 0x4
TABDLY = 0xc04
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CONNECTIONTIMEOUT = 0x20 TCP_CONNECTIONTIMEOUT = 0x20
TCP_CONNECTION_INFO = 0x106
TCP_ENABLE_ECN = 0x104 TCP_ENABLE_ECN = 0x104
TCP_FASTOPEN = 0x105
TCP_KEEPALIVE = 0x10 TCP_KEEPALIVE = 0x10
TCP_KEEPCNT = 0x102 TCP_KEEPCNT = 0x102
TCP_KEEPINTVL = 0x101 TCP_KEEPINTVL = 0x101
@ -1353,11 +1261,6 @@ const (
VKILL = 0x5 VKILL = 0x5
VLNEXT = 0xe VLNEXT = 0xe
VMIN = 0x10 VMIN = 0x10
VM_LOADAVG = 0x2
VM_MACHFACTOR = 0x4
VM_MAXID = 0x6
VM_METER = 0x1
VM_SWAPUSAGE = 0x5
VQUIT = 0x9 VQUIT = 0x9
VREPRINT = 0x6 VREPRINT = 0x6
VSTART = 0xc VSTART = 0xc

View File

@ -1,5 +1,5 @@
// mkerrors.sh -m32 // mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build 386,freebsd // +build 386,freebsd
@ -98,7 +98,6 @@ const (
AF_VENDOR45 = 0x81 AF_VENDOR45 = 0x81
AF_VENDOR46 = 0x83 AF_VENDOR46 = 0x83
AF_VENDOR47 = 0x85 AF_VENDOR47 = 0x85
ALTWERASE = 0x200
B0 = 0x0 B0 = 0x0
B110 = 0x6e B110 = 0x6e
B115200 = 0x1c200 B115200 = 0x1c200
@ -190,7 +189,6 @@ const (
BPF_MINBUFSIZE = 0x20 BPF_MINBUFSIZE = 0x20
BPF_MINOR_VERSION = 0x1 BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7 BPF_MISC = 0x7
BPF_MOD = 0x90
BPF_MSH = 0xa0 BPF_MSH = 0xa0
BPF_MUL = 0x20 BPF_MUL = 0x20
BPF_NEG = 0x80 BPF_NEG = 0x80
@ -224,105 +222,7 @@ const (
BPF_T_NORMAL = 0x0 BPF_T_NORMAL = 0x0
BPF_W = 0x0 BPF_W = 0x0
BPF_X = 0x8 BPF_X = 0x8
BPF_XOR = 0xa0
BRKINT = 0x2 BRKINT = 0x2
CAP_ACCEPT = 0x200000020000000
CAP_ACL_CHECK = 0x400000000010000
CAP_ACL_DELETE = 0x400000000020000
CAP_ACL_GET = 0x400000000040000
CAP_ACL_SET = 0x400000000080000
CAP_ALL0 = 0x20007ffffffffff
CAP_ALL1 = 0x4000000001fffff
CAP_BIND = 0x200000040000000
CAP_BINDAT = 0x200008000000400
CAP_CHFLAGSAT = 0x200000000001400
CAP_CONNECT = 0x200000080000000
CAP_CONNECTAT = 0x200010000000400
CAP_CREATE = 0x200000000000040
CAP_EVENT = 0x400000000000020
CAP_EXTATTR_DELETE = 0x400000000001000
CAP_EXTATTR_GET = 0x400000000002000
CAP_EXTATTR_LIST = 0x400000000004000
CAP_EXTATTR_SET = 0x400000000008000
CAP_FCHDIR = 0x200000000000800
CAP_FCHFLAGS = 0x200000000001000
CAP_FCHMOD = 0x200000000002000
CAP_FCHMODAT = 0x200000000002400
CAP_FCHOWN = 0x200000000004000
CAP_FCHOWNAT = 0x200000000004400
CAP_FCNTL = 0x200000000008000
CAP_FCNTL_ALL = 0x78
CAP_FCNTL_GETFL = 0x8
CAP_FCNTL_GETOWN = 0x20
CAP_FCNTL_SETFL = 0x10
CAP_FCNTL_SETOWN = 0x40
CAP_FEXECVE = 0x200000000000080
CAP_FLOCK = 0x200000000010000
CAP_FPATHCONF = 0x200000000020000
CAP_FSCK = 0x200000000040000
CAP_FSTAT = 0x200000000080000
CAP_FSTATAT = 0x200000000080400
CAP_FSTATFS = 0x200000000100000
CAP_FSYNC = 0x200000000000100
CAP_FTRUNCATE = 0x200000000000200
CAP_FUTIMES = 0x200000000200000
CAP_FUTIMESAT = 0x200000000200400
CAP_GETPEERNAME = 0x200000100000000
CAP_GETSOCKNAME = 0x200000200000000
CAP_GETSOCKOPT = 0x200000400000000
CAP_IOCTL = 0x400000000000080
CAP_IOCTLS_ALL = 0x7fffffff
CAP_KQUEUE = 0x400000000100040
CAP_KQUEUE_CHANGE = 0x400000000100000
CAP_KQUEUE_EVENT = 0x400000000000040
CAP_LINKAT_SOURCE = 0x200020000000400
CAP_LINKAT_TARGET = 0x200000000400400
CAP_LISTEN = 0x200000800000000
CAP_LOOKUP = 0x200000000000400
CAP_MAC_GET = 0x400000000000001
CAP_MAC_SET = 0x400000000000002
CAP_MKDIRAT = 0x200000000800400
CAP_MKFIFOAT = 0x200000001000400
CAP_MKNODAT = 0x200000002000400
CAP_MMAP = 0x200000000000010
CAP_MMAP_R = 0x20000000000001d
CAP_MMAP_RW = 0x20000000000001f
CAP_MMAP_RWX = 0x20000000000003f
CAP_MMAP_RX = 0x20000000000003d
CAP_MMAP_W = 0x20000000000001e
CAP_MMAP_WX = 0x20000000000003e
CAP_MMAP_X = 0x20000000000003c
CAP_PDGETPID = 0x400000000000200
CAP_PDKILL = 0x400000000000800
CAP_PDWAIT = 0x400000000000400
CAP_PEELOFF = 0x200001000000000
CAP_POLL_EVENT = 0x400000000000020
CAP_PREAD = 0x20000000000000d
CAP_PWRITE = 0x20000000000000e
CAP_READ = 0x200000000000001
CAP_RECV = 0x200000000000001
CAP_RENAMEAT_SOURCE = 0x200000004000400
CAP_RENAMEAT_TARGET = 0x200040000000400
CAP_RIGHTS_VERSION = 0x0
CAP_RIGHTS_VERSION_00 = 0x0
CAP_SEEK = 0x20000000000000c
CAP_SEEK_TELL = 0x200000000000004
CAP_SEM_GETVALUE = 0x400000000000004
CAP_SEM_POST = 0x400000000000008
CAP_SEM_WAIT = 0x400000000000010
CAP_SEND = 0x200000000000002
CAP_SETSOCKOPT = 0x200002000000000
CAP_SHUTDOWN = 0x200004000000000
CAP_SOCK_CLIENT = 0x200007780000003
CAP_SOCK_SERVER = 0x200007f60000003
CAP_SYMLINKAT = 0x200000008000400
CAP_TTYHOOK = 0x400000000000100
CAP_UNLINKAT = 0x200000010000400
CAP_UNUSED0_44 = 0x200080000000000
CAP_UNUSED0_57 = 0x300000000000000
CAP_UNUSED1_22 = 0x400000000200000
CAP_UNUSED1_57 = 0x500000000000000
CAP_WRITE = 0x200000000000002
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x4 CLOCK_MONOTONIC = 0x4
@ -340,7 +240,6 @@ const (
CLOCK_UPTIME_PRECISE = 0x7 CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1 CLOCK_VIRTUAL = 0x1
CREAD = 0x800 CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0 CS5 = 0x0
CS6 = 0x100 CS6 = 0x100
CS7 = 0x200 CS7 = 0x200
@ -366,12 +265,8 @@ const (
DLT_AX25 = 0x3 DLT_AX25 = 0x3
DLT_AX25_KISS = 0xca DLT_AX25_KISS = 0xca
DLT_BACNET_MS_TP = 0xa5 DLT_BACNET_MS_TP = 0xa5
DLT_BLUETOOTH_BREDR_BB = 0xff
DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4 = 0xbb
DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
DLT_BLUETOOTH_LE_LL = 0xfb
DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100
DLT_BLUETOOTH_LINUX_MONITOR = 0xfe
DLT_CAN20B = 0xbe DLT_CAN20B = 0xbe
DLT_CAN_SOCKETCAN = 0xe3 DLT_CAN_SOCKETCAN = 0xe3
DLT_CHAOS = 0x5 DLT_CHAOS = 0x5
@ -387,7 +282,6 @@ const (
DLT_EN10MB = 0x1 DLT_EN10MB = 0x1
DLT_EN3MB = 0x2 DLT_EN3MB = 0x2
DLT_ENC = 0x6d DLT_ENC = 0x6d
DLT_EPON = 0x103
DLT_ERF = 0xc5 DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0 DLT_ERF_POS = 0xb0
@ -417,11 +311,9 @@ const (
DLT_IEEE802_15_4_NONASK_PHY = 0xd7 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
DLT_IEEE802_16_MAC_CPS = 0xbc DLT_IEEE802_16_MAC_CPS = 0xbc
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
DLT_INFINIBAND = 0xf7
DLT_IPFILTER = 0x74 DLT_IPFILTER = 0x74
DLT_IPMB = 0xc7 DLT_IPMB = 0xc7
DLT_IPMB_LINUX = 0xd1 DLT_IPMB_LINUX = 0xd1
DLT_IPMI_HPM_2 = 0x104
DLT_IPNET = 0xe2 DLT_IPNET = 0xe2
DLT_IPOIB = 0xf2 DLT_IPOIB = 0xf2
DLT_IPV4 = 0xe4 DLT_IPV4 = 0xe4
@ -460,7 +352,7 @@ const (
DLT_LINUX_SLL = 0x71 DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c DLT_LOOP = 0x6c
DLT_LTALK = 0x72 DLT_LTALK = 0x72
DLT_MATCHING_MAX = 0x104 DLT_MATCHING_MAX = 0xf6
DLT_MATCHING_MIN = 0x68 DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6 DLT_MFR = 0xb6
DLT_MOST = 0xd3 DLT_MOST = 0xd3
@ -472,7 +364,6 @@ const (
DLT_MUX27010 = 0xec DLT_MUX27010 = 0xec
DLT_NETANALYZER = 0xf0 DLT_NETANALYZER = 0xf0
DLT_NETANALYZER_TRANSPARENT = 0xf1 DLT_NETANALYZER_TRANSPARENT = 0xf1
DLT_NETLINK = 0xfd
DLT_NFC_LLCP = 0xf5 DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef DLT_NFLOG = 0xef
DLT_NG40 = 0xf4 DLT_NG40 = 0xf4
@ -480,7 +371,6 @@ const (
DLT_PCI_EXP = 0x7d DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75 DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79 DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0 DLT_PPI = 0xc0
DLT_PPP = 0x9 DLT_PPP = 0x9
DLT_PPP_BSDOS = 0x10 DLT_PPP_BSDOS = 0x10
@ -490,14 +380,11 @@ const (
DLT_PPP_WITH_DIR = 0xcc DLT_PPP_WITH_DIR = 0xcc
DLT_PPP_WITH_DIRECTION = 0xa6 DLT_PPP_WITH_DIRECTION = 0xa6
DLT_PRISM_HEADER = 0x77 DLT_PRISM_HEADER = 0x77
DLT_PROFIBUS_DL = 0x101
DLT_PRONET = 0x4 DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6 DLT_RAIF1 = 0xc6
DLT_RAW = 0xc DLT_RAW = 0xc
DLT_RIO = 0x7c DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
DLT_SITA = 0xc4 DLT_SITA = 0xc4
DLT_SLIP = 0x8 DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xf DLT_SLIP_BSDOS = 0xf
@ -506,7 +393,6 @@ const (
DLT_SYMANTEC_FIREWALL = 0x63 DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80 DLT_TZSP = 0x80
DLT_USB = 0xba DLT_USB = 0xba
DLT_USBPCAP = 0xf9
DLT_USB_LINUX = 0xbd DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93 DLT_USER0 = 0x93
@ -526,7 +412,6 @@ const (
DLT_USER8 = 0x9b DLT_USER8 = 0x9b
DLT_USER9 = 0x9c DLT_USER9 = 0x9c
DLT_WIHART = 0xdf DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5 DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6 DLT_X2E_XORAYA = 0xd6
DT_BLK = 0x6 DT_BLK = 0x6
@ -549,11 +434,9 @@ const (
EVFILT_FS = -0x9 EVFILT_FS = -0x9
EVFILT_LIO = -0xa EVFILT_LIO = -0xa
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_PROCDESC = -0x8
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xc EVFILT_SYSCOUNT = 0xb
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_USER = -0xb EVFILT_USER = -0xb
EVFILT_VNODE = -0x4 EVFILT_VNODE = -0x4
@ -568,8 +451,6 @@ const (
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_FLAG2 = 0x4000
EV_FORCEONESHOT = 0x100
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf000
@ -617,7 +498,7 @@ const (
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000 IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x218f52 IFF_CANTCHANGE = 0x218f72
IFF_CANTCONFIG = 0x10000 IFF_CANTCONFIG = 0x10000
IFF_DEBUG = 0x4 IFF_DEBUG = 0x4
IFF_DRV_OACTIVE = 0x400 IFF_DRV_OACTIVE = 0x400
@ -637,17 +518,217 @@ const (
IFF_RENAMING = 0x400000 IFF_RENAMING = 0x400000
IFF_RUNNING = 0x40 IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800 IFF_SIMPLEX = 0x800
IFF_SMART = 0x20
IFF_STATICARP = 0x80000 IFF_STATICARP = 0x80000
IFF_UP = 0x1 IFF_UP = 0x1
IFNAMSIZ = 0x10 IFNAMSIZ = 0x10
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
IFT_AAL2 = 0xbb
IFT_AAL5 = 0x31
IFT_ADSL = 0x5e
IFT_AFLANE8023 = 0x3b
IFT_AFLANE8025 = 0x3c
IFT_ARAP = 0x58
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
IFT_ASYNC = 0x54
IFT_ATM = 0x25
IFT_ATMDXI = 0x69
IFT_ATMFUNI = 0x6a
IFT_ATMIMA = 0x6b
IFT_ATMLOGICAL = 0x50
IFT_ATMRADIO = 0xbd
IFT_ATMSUBINTERFACE = 0x86
IFT_ATMVCIENDPT = 0xc2
IFT_ATMVIRTUAL = 0x95
IFT_BGPPOLICYACCOUNTING = 0xa2
IFT_BRIDGE = 0xd1 IFT_BRIDGE = 0xd1
IFT_BSC = 0x53
IFT_CARP = 0xf8 IFT_CARP = 0xf8
IFT_CCTEMUL = 0x3d
IFT_CEPT = 0x13
IFT_CES = 0x85
IFT_CHANNEL = 0x46
IFT_CNR = 0x55
IFT_COFFEE = 0x84
IFT_COMPOSITELINK = 0x9b
IFT_DCN = 0x8d
IFT_DIGITALPOWERLINE = 0x8a
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
IFT_DLSW = 0x4a
IFT_DOCSCABLEDOWNSTREAM = 0x80
IFT_DOCSCABLEMACLAYER = 0x7f
IFT_DOCSCABLEUPSTREAM = 0x81
IFT_DS0 = 0x51
IFT_DS0BUNDLE = 0x52
IFT_DS1FDL = 0xaa
IFT_DS3 = 0x1e
IFT_DTM = 0x8c
IFT_DVBASILN = 0xac
IFT_DVBASIOUT = 0xad
IFT_DVBRCCDOWNSTREAM = 0x93
IFT_DVBRCCMACLAYER = 0x92
IFT_DVBRCCUPSTREAM = 0x94
IFT_ENC = 0xf4
IFT_EON = 0x19
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
IFT_FAITH = 0xf2
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
IFT_FDDI = 0xf
IFT_FIBRECHANNEL = 0x38
IFT_FRAMERELAYINTERCONNECT = 0x3a
IFT_FRAMERELAYMPI = 0x5c
IFT_FRDLCIENDPT = 0xc1
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
IFT_FRF16MFRBUNDLE = 0xa3
IFT_FRFORWARD = 0x9e
IFT_G703AT2MB = 0x43
IFT_G703AT64K = 0x42
IFT_GIF = 0xf0
IFT_GIGABITETHERNET = 0x75
IFT_GR303IDT = 0xb2
IFT_GR303RDT = 0xb1
IFT_H323GATEKEEPER = 0xa4
IFT_H323PROXY = 0xa5
IFT_HDH1822 = 0x3
IFT_HDLC = 0x76
IFT_HDSL2 = 0xa8
IFT_HIPERLAN2 = 0xb7
IFT_HIPPI = 0x2f
IFT_HIPPIINTERFACE = 0x39
IFT_HOSTPAD = 0x5a
IFT_HSSI = 0x2e
IFT_HY = 0xe
IFT_IBM370PARCHAN = 0x48
IFT_IDSL = 0x9a
IFT_IEEE1394 = 0x90 IFT_IEEE1394 = 0x90
IFT_IEEE80211 = 0x47
IFT_IEEE80212 = 0x37
IFT_IEEE8023ADLAG = 0xa1
IFT_IFGSN = 0x91
IFT_IMT = 0xbe
IFT_INFINIBAND = 0xc7 IFT_INFINIBAND = 0xc7
IFT_INTERLEAVE = 0x7c
IFT_IP = 0x7e
IFT_IPFORWARD = 0x8e
IFT_IPOVERATM = 0x72
IFT_IPOVERCDLC = 0x6d
IFT_IPOVERCLAW = 0x6e
IFT_IPSWITCH = 0x4e
IFT_IPXIP = 0xf9
IFT_ISDN = 0x3f
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
IFT_ISDNS = 0x4b
IFT_ISDNU = 0x4c
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
IFT_ISO88025CRFPINT = 0x62
IFT_ISO88025DTR = 0x56
IFT_ISO88025FIBER = 0x73
IFT_ISO88026 = 0xa
IFT_ISUP = 0xb3
IFT_L2VLAN = 0x87 IFT_L2VLAN = 0x87
IFT_L3IPVLAN = 0x88 IFT_L3IPVLAN = 0x88
IFT_L3IPXVLAN = 0x89
IFT_LAPB = 0x10
IFT_LAPD = 0x4d
IFT_LAPF = 0x77
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
IFT_MPC = 0x71
IFT_MPLS = 0xa6
IFT_MPLSTUNNEL = 0x96
IFT_MSDSL = 0x8f
IFT_MVL = 0xbf
IFT_MYRINET = 0x63
IFT_NFAS = 0xaf
IFT_NSIP = 0x1b
IFT_OPTICALCHANNEL = 0xc3
IFT_OPTICALTRANSPORT = 0xc4
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
IFT_PFLOG = 0xf6
IFT_PFSYNC = 0xf7
IFT_PLC = 0xae
IFT_POS = 0xab
IFT_PPP = 0x17 IFT_PPP = 0x17
IFT_PPPMULTILINKBUNDLE = 0x6c
IFT_PROPBWAP2MP = 0xb8
IFT_PROPCNLS = 0x59
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
IFT_PROPMUX = 0x36
IFT_PROPVIRTUAL = 0x35 IFT_PROPVIRTUAL = 0x35
IFT_PROPWIRELESSP2P = 0x9d
IFT_PTPSERIAL = 0x16
IFT_PVC = 0xf1
IFT_QLLC = 0x44
IFT_RADIOMAC = 0xbc
IFT_RADSL = 0x5f
IFT_REACHDSL = 0xc0
IFT_RFC1483 = 0x9f
IFT_RS232 = 0x21
IFT_RSRB = 0x4f
IFT_SDLC = 0x11
IFT_SDSL = 0x60
IFT_SHDSL = 0xa9
IFT_SIP = 0x1f
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SONET = 0x27
IFT_SONETOVERHEADCHANNEL = 0xb9
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
IFT_SRP = 0x97
IFT_SS7SIGLINK = 0x9c
IFT_STACKTOSTACK = 0x6f
IFT_STARLAN = 0xb
IFT_STF = 0xd7
IFT_T1 = 0x12
IFT_TDLC = 0x74
IFT_TERMPAD = 0x5b
IFT_TR008 = 0xb0
IFT_TRANSPHDLC = 0x7b
IFT_TUNNEL = 0x83
IFT_ULTRA = 0x1d
IFT_USB = 0xa0
IFT_V11 = 0x40
IFT_V35 = 0x2d
IFT_V36 = 0x41
IFT_V37 = 0x78
IFT_VDSL = 0x61
IFT_VIRTUALIPADDRESS = 0x70
IFT_VOICEEM = 0x64
IFT_VOICEENCAP = 0x67
IFT_VOICEFXO = 0x65
IFT_VOICEFXS = 0x66
IFT_VOICEOVERATM = 0x98
IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68
IFT_X213 = 0x5d
IFT_X25 = 0x5
IFT_X25DDN = 0x4
IFT_X25HUNTGROUP = 0x7a
IFT_X25MLP = 0x79
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
IGNBRK = 0x1 IGNBRK = 0x1
IGNCR = 0x80 IGNCR = 0x80
IGNPAR = 0x4 IGNPAR = 0x4
@ -730,6 +811,7 @@ const (
IPPROTO_LEAF1 = 0x19 IPPROTO_LEAF1 = 0x19
IPPROTO_LEAF2 = 0x1a IPPROTO_LEAF2 = 0x1a
IPPROTO_MAX = 0x100 IPPROTO_MAX = 0x100
IPPROTO_MAXID = 0x34
IPPROTO_MEAS = 0x13 IPPROTO_MEAS = 0x13
IPPROTO_MH = 0x87 IPPROTO_MH = 0x87
IPPROTO_MHRP = 0x30 IPPROTO_MHRP = 0x30
@ -794,7 +876,6 @@ const (
IPPROTO_XTP = 0x24 IPPROTO_XTP = 0x24
IPV6_AUTOFLOWLABEL = 0x3b IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDANY = 0x40 IPV6_BINDANY = 0x40
IPV6_BINDMULTI = 0x41
IPV6_BINDV6ONLY = 0x1b IPV6_BINDV6ONLY = 0x1b
IPV6_CHECKSUM = 0x1a IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
@ -802,10 +883,9 @@ const (
IPV6_DEFHLIM = 0x40 IPV6_DEFHLIM = 0x40
IPV6_DONTFRAG = 0x3e IPV6_DONTFRAG = 0x3e
IPV6_DSTOPTS = 0x32 IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43 IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78 IPV6_FRAGTTL = 0x78
IPV6_FW_ADD = 0x1e IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f IPV6_FW_DEL = 0x1f
@ -839,16 +919,12 @@ const (
IPV6_PORTRANGE_LOW = 0x2 IPV6_PORTRANGE_LOW = 0x2
IPV6_PREFER_TEMPADDR = 0x3f IPV6_PREFER_TEMPADDR = 0x3f
IPV6_RECVDSTOPTS = 0x28 IPV6_RECVDSTOPTS = 0x28
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27 IPV6_RECVHOPOPTS = 0x27
IPV6_RECVPATHMTU = 0x2b IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24 IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
IPV6_RECVRTHDR = 0x26 IPV6_RECVRTHDR = 0x26
IPV6_RECVTCLASS = 0x39 IPV6_RECVTCLASS = 0x39
IPV6_RSSBUCKETID = 0x45
IPV6_RSS_LISTEN_BUCKET = 0x42
IPV6_RTHDR = 0x33 IPV6_RTHDR = 0x33
IPV6_RTHDRDSTOPTS = 0x23 IPV6_RTHDRDSTOPTS = 0x23
IPV6_RTHDR_LOOSE = 0x0 IPV6_RTHDR_LOOSE = 0x0
@ -864,7 +940,6 @@ const (
IP_ADD_MEMBERSHIP = 0xc IP_ADD_MEMBERSHIP = 0xc
IP_ADD_SOURCE_MEMBERSHIP = 0x46 IP_ADD_SOURCE_MEMBERSHIP = 0x46
IP_BINDANY = 0x18 IP_BINDANY = 0x18
IP_BINDMULTI = 0x19
IP_BLOCK_SOURCE = 0x48 IP_BLOCK_SOURCE = 0x48
IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1
@ -877,8 +952,7 @@ const (
IP_DUMMYNET_DEL = 0x3d IP_DUMMYNET_DEL = 0x3d
IP_DUMMYNET_FLUSH = 0x3e IP_DUMMYNET_FLUSH = 0x3e
IP_DUMMYNET_GET = 0x40 IP_DUMMYNET_GET = 0x40
IP_FLOWID = 0x5a IP_FAITH = 0x16
IP_FLOWTYPE = 0x5b
IP_FW3 = 0x30 IP_FW3 = 0x30
IP_FW_ADD = 0x32 IP_FW_ADD = 0x32
IP_FW_DEL = 0x33 IP_FW_DEL = 0x33
@ -920,17 +994,13 @@ const (
IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_HIGH = 0x1
IP_PORTRANGE_LOW = 0x2 IP_PORTRANGE_LOW = 0x2
IP_RECVDSTADDR = 0x7 IP_RECVDSTADDR = 0x7
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14 IP_RECVIF = 0x14
IP_RECVOPTS = 0x5 IP_RECVOPTS = 0x5
IP_RECVRETOPTS = 0x6 IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44 IP_RECVTOS = 0x44
IP_RECVTTL = 0x41 IP_RECVTTL = 0x41
IP_RETOPTS = 0x8 IP_RETOPTS = 0x8
IP_RF = 0x8000 IP_RF = 0x8000
IP_RSSBUCKETID = 0x5c
IP_RSS_LISTEN_BUCKET = 0x1a
IP_RSVP_OFF = 0x10 IP_RSVP_OFF = 0x10
IP_RSVP_ON = 0xf IP_RSVP_ON = 0xf
IP_RSVP_VIF_OFF = 0x12 IP_RSVP_VIF_OFF = 0x12
@ -970,11 +1040,11 @@ const (
MAP_FIXED = 0x10 MAP_FIXED = 0x10
MAP_HASSEMAPHORE = 0x200 MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000 MAP_NOCORE = 0x20000
MAP_NORESERVE = 0x40
MAP_NOSYNC = 0x800 MAP_NOSYNC = 0x800
MAP_PREFAULT_READ = 0x40000 MAP_PREFAULT_READ = 0x40000
MAP_PRIVATE = 0x2 MAP_PRIVATE = 0x2
MAP_RESERVED0020 = 0x20 MAP_RENAME = 0x20
MAP_RESERVED0040 = 0x40
MAP_RESERVED0080 = 0x80 MAP_RESERVED0080 = 0x80
MAP_RESERVED0100 = 0x100 MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1 MAP_SHARED = 0x1
@ -995,7 +1065,6 @@ const (
MSG_PEEK = 0x2 MSG_PEEK = 0x2
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x80000
MS_ASYNC = 0x1 MS_ASYNC = 0x1
MS_INVALIDATE = 0x2 MS_INVALIDATE = 0x2
MS_SYNC = 0x0 MS_SYNC = 0x0
@ -1005,12 +1074,10 @@ const (
NET_RT_IFLIST = 0x3 NET_RT_IFLIST = 0x3
NET_RT_IFLISTL = 0x5 NET_RT_IFLISTL = 0x5
NET_RT_IFMALIST = 0x4 NET_RT_IFMALIST = 0x4
NET_RT_MAXID = 0x6
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4 NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
NOTE_CLOSE_WRITE = 0x200
NOTE_DELETE = 0x1 NOTE_DELETE = 0x1
NOTE_EXEC = 0x20000000 NOTE_EXEC = 0x20000000
NOTE_EXIT = 0x80000000 NOTE_EXIT = 0x80000000
@ -1021,23 +1088,16 @@ const (
NOTE_FFLAGSMASK = 0xffffff NOTE_FFLAGSMASK = 0xffffff
NOTE_FFNOP = 0x0 NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000 NOTE_FFOR = 0x80000000
NOTE_FILE_POLL = 0x2
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_MSECONDS = 0x2
NOTE_NSECONDS = 0x8
NOTE_OPEN = 0x80
NOTE_PCTRLMASK = 0xf0000000 NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_READ = 0x400
NOTE_RENAME = 0x20 NOTE_RENAME = 0x20
NOTE_REVOKE = 0x40 NOTE_REVOKE = 0x40
NOTE_SECONDS = 0x1
NOTE_TRACK = 0x1 NOTE_TRACK = 0x1
NOTE_TRACKERR = 0x2 NOTE_TRACKERR = 0x2
NOTE_TRIGGER = 0x1000000 NOTE_TRIGGER = 0x1000000
NOTE_USECONDS = 0x4
NOTE_WRITE = 0x2 NOTE_WRITE = 0x2
OCRNL = 0x10 OCRNL = 0x10
ONLCR = 0x2 ONLCR = 0x2
@ -1045,7 +1105,6 @@ const (
ONOCR = 0x20 ONOCR = 0x20
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_APPEND = 0x8 O_APPEND = 0x8
O_ASYNC = 0x40 O_ASYNC = 0x40
@ -1067,7 +1126,6 @@ const (
O_SYNC = 0x80 O_SYNC = 0x80
O_TRUNC = 0x400 O_TRUNC = 0x400
O_TTY_INIT = 0x80000 O_TTY_INIT = 0x80000
O_VERIFY = 0x200000
O_WRONLY = 0x1 O_WRONLY = 0x1
PARENB = 0x1000 PARENB = 0x1000
PARMRK = 0x8 PARMRK = 0x8
@ -1085,10 +1143,7 @@ const (
RLIMIT_CPU = 0x0 RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2 RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1 RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8 RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
@ -1112,7 +1167,6 @@ const (
RTF_BROADCAST = 0x400000 RTF_BROADCAST = 0x400000
RTF_DONE = 0x40 RTF_DONE = 0x40
RTF_DYNAMIC = 0x10 RTF_DYNAMIC = 0x10
RTF_FIXEDMTU = 0x80000
RTF_FMASK = 0x1004d808 RTF_FMASK = 0x1004d808
RTF_GATEWAY = 0x2 RTF_GATEWAY = 0x2
RTF_GWFLAG_COMPAT = 0x80000000 RTF_GWFLAG_COMPAT = 0x80000000
@ -1123,6 +1177,7 @@ const (
RTF_MODIFIED = 0x20 RTF_MODIFIED = 0x20
RTF_MULTICAST = 0x800000 RTF_MULTICAST = 0x800000
RTF_PINNED = 0x100000 RTF_PINNED = 0x100000
RTF_PRCLONING = 0x10000
RTF_PROTO1 = 0x8000 RTF_PROTO1 = 0x8000
RTF_PROTO2 = 0x4000 RTF_PROTO2 = 0x4000
RTF_PROTO3 = 0x40000 RTF_PROTO3 = 0x40000
@ -1146,6 +1201,8 @@ const (
RTM_MISS = 0x7 RTM_MISS = 0x7
RTM_NEWADDR = 0xc RTM_NEWADDR = 0xc
RTM_NEWMADDR = 0xf RTM_NEWMADDR = 0xf
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_RTTUNIT = 0xf4240
@ -1160,19 +1217,9 @@ const (
RTV_SSTHRESH = 0x20 RTV_SSTHRESH = 0x20
RTV_WEIGHT = 0x100 RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1 RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
RT_CACHING_CONTEXT = 0x1 RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0 RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
RT_HAS_HEADER_BIT = 0x4
RT_L2_ME = 0x4
RT_L2_ME_BIT = 0x2
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
RT_NORTREF = 0x2 RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1 RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0 RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1 RUSAGE_THREAD = 0x1
@ -1184,18 +1231,21 @@ const (
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931 SIOCADDMULTI = 0x80206931
SIOCADDRT = 0x8030720a
SIOCAIFADDR = 0x8040691a SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80246987 SIOCAIFGROUP = 0x80246987
SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307 SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDELRT = 0x8030720b
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80246989 SIOCDIFGROUP = 0x80246989
SIOCDIFPHYADDR = 0x80206949 SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc01c697b SIOCGDRVSPEC = 0xc01c697b
SIOCGETSGCNT = 0xc0147210 SIOCGETSGCNT = 0xc0147210
SIOCGETVIFCNT = 0xc014720f SIOCGETVIFCNT = 0xc014720f
SIOCGHIWAT = 0x40047301 SIOCGHIWAT = 0x40047301
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921 SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923 SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f SIOCGIFCAP = 0xc020691f
@ -1217,12 +1267,12 @@ const (
SIOCGIFPHYS = 0xc0206935 SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947 SIOCGIFPSRCADDR = 0xc0206947
SIOCGIFSTATUS = 0xc331693b SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc028698b SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCGLOWAT = 0x40047303 SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309 SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_0 = 0xc0206950
SIOCGPRIVATE_1 = 0xc0206951 SIOCGPRIVATE_1 = 0xc0206951
SIOCGTUNFIB = 0xc020695e
SIOCIFCREATE = 0xc020697a SIOCIFCREATE = 0xc020697a
SIOCIFCREATE2 = 0xc020697c SIOCIFCREATE2 = 0xc020697c
SIOCIFDESTROY = 0x80206979 SIOCIFDESTROY = 0x80206979
@ -1248,9 +1298,9 @@ const (
SIOCSIFPHYS = 0x80206936 SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a SIOCSIFVNET = 0xc020695a
SIOCSLIFPHYADDR = 0x8118694a
SIOCSLOWAT = 0x80047302 SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308 SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
SOCK_CLOEXEC = 0x10000000 SOCK_CLOEXEC = 0x10000000
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_MAXADDRLEN = 0xff SOCK_MAXADDRLEN = 0xff
@ -1295,22 +1345,11 @@ const (
SO_USELOOPBACK = 0x40 SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015 SO_USER_COOKIE = 0x1015
SO_VENDOR = 0x80000000 SO_VENDOR = 0x80000000
TAB0 = 0x0
TAB3 = 0x4
TABDLY = 0x4
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CA_NAME_MAX = 0x10 TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40 TCP_CONGESTION = 0x40
TCP_FASTOPEN = 0x401
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20 TCP_INFO = 0x20
TCP_KEEPCNT = 0x400 TCP_KEEPCNT = 0x400
TCP_KEEPIDLE = 0x100 TCP_KEEPIDLE = 0x100
@ -1329,8 +1368,6 @@ const (
TCP_NODELAY = 0x1 TCP_NODELAY = 0x1
TCP_NOOPT = 0x8 TCP_NOOPT = 0x8
TCP_NOPUSH = 0x4 TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
TCP_VENDOR = 0x80000000 TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2 TCSAFLUSH = 0x2
TIOCCBRK = 0x2000747a TIOCCBRK = 0x2000747a

View File

@ -1,5 +1,5 @@
// mkerrors.sh // mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build arm,freebsd // +build arm,freebsd
@ -98,7 +98,6 @@ const (
AF_VENDOR45 = 0x81 AF_VENDOR45 = 0x81
AF_VENDOR46 = 0x83 AF_VENDOR46 = 0x83
AF_VENDOR47 = 0x85 AF_VENDOR47 = 0x85
ALTWERASE = 0x200
B0 = 0x0 B0 = 0x0
B110 = 0x6e B110 = 0x6e
B115200 = 0x1c200 B115200 = 0x1c200
@ -135,7 +134,7 @@ const (
BIOCGETZMAX = 0x4004427f BIOCGETZMAX = 0x4004427f
BIOCGHDRCMPLT = 0x40044274 BIOCGHDRCMPLT = 0x40044274
BIOCGRSIG = 0x40044272 BIOCGRSIG = 0x40044272
BIOCGRTIMEOUT = 0x4010426e BIOCGRTIMEOUT = 0x4008426e
BIOCGSEESENT = 0x40044276 BIOCGSEESENT = 0x40044276
BIOCGSTATS = 0x4008426f BIOCGSTATS = 0x4008426f
BIOCGTSTAMP = 0x40044283 BIOCGTSTAMP = 0x40044283
@ -154,7 +153,7 @@ const (
BIOCSETZBUF = 0x800c4281 BIOCSETZBUF = 0x800c4281
BIOCSHDRCMPLT = 0x80044275 BIOCSHDRCMPLT = 0x80044275
BIOCSRSIG = 0x80044273 BIOCSRSIG = 0x80044273
BIOCSRTIMEOUT = 0x8010426d BIOCSRTIMEOUT = 0x8008426d
BIOCSSEESENT = 0x80044277 BIOCSSEESENT = 0x80044277
BIOCSTSTAMP = 0x80044284 BIOCSTSTAMP = 0x80044284
BIOCVERSION = 0x40044271 BIOCVERSION = 0x40044271
@ -190,7 +189,6 @@ const (
BPF_MINBUFSIZE = 0x20 BPF_MINBUFSIZE = 0x20
BPF_MINOR_VERSION = 0x1 BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7 BPF_MISC = 0x7
BPF_MOD = 0x90
BPF_MSH = 0xa0 BPF_MSH = 0xa0
BPF_MUL = 0x20 BPF_MUL = 0x20
BPF_NEG = 0x80 BPF_NEG = 0x80
@ -224,123 +222,10 @@ const (
BPF_T_NORMAL = 0x0 BPF_T_NORMAL = 0x0
BPF_W = 0x0 BPF_W = 0x0
BPF_X = 0x8 BPF_X = 0x8
BPF_XOR = 0xa0
BRKINT = 0x2 BRKINT = 0x2
CAP_ACCEPT = 0x200000020000000
CAP_ACL_CHECK = 0x400000000010000
CAP_ACL_DELETE = 0x400000000020000
CAP_ACL_GET = 0x400000000040000
CAP_ACL_SET = 0x400000000080000
CAP_ALL0 = 0x20007ffffffffff
CAP_ALL1 = 0x4000000001fffff
CAP_BIND = 0x200000040000000
CAP_BINDAT = 0x200008000000400
CAP_CHFLAGSAT = 0x200000000001400
CAP_CONNECT = 0x200000080000000
CAP_CONNECTAT = 0x200010000000400
CAP_CREATE = 0x200000000000040
CAP_EVENT = 0x400000000000020
CAP_EXTATTR_DELETE = 0x400000000001000
CAP_EXTATTR_GET = 0x400000000002000
CAP_EXTATTR_LIST = 0x400000000004000
CAP_EXTATTR_SET = 0x400000000008000
CAP_FCHDIR = 0x200000000000800
CAP_FCHFLAGS = 0x200000000001000
CAP_FCHMOD = 0x200000000002000
CAP_FCHMODAT = 0x200000000002400
CAP_FCHOWN = 0x200000000004000
CAP_FCHOWNAT = 0x200000000004400
CAP_FCNTL = 0x200000000008000
CAP_FCNTL_ALL = 0x78
CAP_FCNTL_GETFL = 0x8
CAP_FCNTL_GETOWN = 0x20
CAP_FCNTL_SETFL = 0x10
CAP_FCNTL_SETOWN = 0x40
CAP_FEXECVE = 0x200000000000080
CAP_FLOCK = 0x200000000010000
CAP_FPATHCONF = 0x200000000020000
CAP_FSCK = 0x200000000040000
CAP_FSTAT = 0x200000000080000
CAP_FSTATAT = 0x200000000080400
CAP_FSTATFS = 0x200000000100000
CAP_FSYNC = 0x200000000000100
CAP_FTRUNCATE = 0x200000000000200
CAP_FUTIMES = 0x200000000200000
CAP_FUTIMESAT = 0x200000000200400
CAP_GETPEERNAME = 0x200000100000000
CAP_GETSOCKNAME = 0x200000200000000
CAP_GETSOCKOPT = 0x200000400000000
CAP_IOCTL = 0x400000000000080
CAP_IOCTLS_ALL = 0x7fffffff
CAP_KQUEUE = 0x400000000100040
CAP_KQUEUE_CHANGE = 0x400000000100000
CAP_KQUEUE_EVENT = 0x400000000000040
CAP_LINKAT_SOURCE = 0x200020000000400
CAP_LINKAT_TARGET = 0x200000000400400
CAP_LISTEN = 0x200000800000000
CAP_LOOKUP = 0x200000000000400
CAP_MAC_GET = 0x400000000000001
CAP_MAC_SET = 0x400000000000002
CAP_MKDIRAT = 0x200000000800400
CAP_MKFIFOAT = 0x200000001000400
CAP_MKNODAT = 0x200000002000400
CAP_MMAP = 0x200000000000010
CAP_MMAP_R = 0x20000000000001d
CAP_MMAP_RW = 0x20000000000001f
CAP_MMAP_RWX = 0x20000000000003f
CAP_MMAP_RX = 0x20000000000003d
CAP_MMAP_W = 0x20000000000001e
CAP_MMAP_WX = 0x20000000000003e
CAP_MMAP_X = 0x20000000000003c
CAP_PDGETPID = 0x400000000000200
CAP_PDKILL = 0x400000000000800
CAP_PDWAIT = 0x400000000000400
CAP_PEELOFF = 0x200001000000000
CAP_POLL_EVENT = 0x400000000000020
CAP_PREAD = 0x20000000000000d
CAP_PWRITE = 0x20000000000000e
CAP_READ = 0x200000000000001
CAP_RECV = 0x200000000000001
CAP_RENAMEAT_SOURCE = 0x200000004000400
CAP_RENAMEAT_TARGET = 0x200040000000400
CAP_RIGHTS_VERSION = 0x0
CAP_RIGHTS_VERSION_00 = 0x0
CAP_SEEK = 0x20000000000000c
CAP_SEEK_TELL = 0x200000000000004
CAP_SEM_GETVALUE = 0x400000000000004
CAP_SEM_POST = 0x400000000000008
CAP_SEM_WAIT = 0x400000000000010
CAP_SEND = 0x200000000000002
CAP_SETSOCKOPT = 0x200002000000000
CAP_SHUTDOWN = 0x200004000000000
CAP_SOCK_CLIENT = 0x200007780000003
CAP_SOCK_SERVER = 0x200007f60000003
CAP_SYMLINKAT = 0x200000008000400
CAP_TTYHOOK = 0x400000000000100
CAP_UNLINKAT = 0x200000010000400
CAP_UNUSED0_44 = 0x200080000000000
CAP_UNUSED0_57 = 0x300000000000000
CAP_UNUSED1_22 = 0x400000000200000
CAP_UNUSED1_57 = 0x500000000000000
CAP_WRITE = 0x200000000000002
CFLUSH = 0xf CFLUSH = 0xf
CLOCAL = 0x8000 CLOCAL = 0x8000
CLOCK_MONOTONIC = 0x4
CLOCK_MONOTONIC_FAST = 0xc
CLOCK_MONOTONIC_PRECISE = 0xb
CLOCK_PROCESS_CPUTIME_ID = 0xf
CLOCK_PROF = 0x2
CLOCK_REALTIME = 0x0
CLOCK_REALTIME_FAST = 0xa
CLOCK_REALTIME_PRECISE = 0x9
CLOCK_SECOND = 0xd
CLOCK_THREAD_CPUTIME_ID = 0xe
CLOCK_UPTIME = 0x5
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
CREAD = 0x800 CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0 CS5 = 0x0
CS6 = 0x100 CS6 = 0x100
CS7 = 0x200 CS7 = 0x200
@ -366,18 +251,13 @@ const (
DLT_AX25 = 0x3 DLT_AX25 = 0x3
DLT_AX25_KISS = 0xca DLT_AX25_KISS = 0xca
DLT_BACNET_MS_TP = 0xa5 DLT_BACNET_MS_TP = 0xa5
DLT_BLUETOOTH_BREDR_BB = 0xff
DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4 = 0xbb
DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
DLT_BLUETOOTH_LE_LL = 0xfb
DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100
DLT_BLUETOOTH_LINUX_MONITOR = 0xfe
DLT_CAN20B = 0xbe DLT_CAN20B = 0xbe
DLT_CAN_SOCKETCAN = 0xe3 DLT_CAN_SOCKETCAN = 0xe3
DLT_CHAOS = 0x5 DLT_CHAOS = 0x5
DLT_CHDLC = 0x68 DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76 DLT_CISCO_IOS = 0x76
DLT_CLASS_NETBSD_RAWAF = 0x2240000
DLT_C_HDLC = 0x68 DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7 DLT_DBUS = 0xe7
@ -388,7 +268,6 @@ const (
DLT_EN10MB = 0x1 DLT_EN10MB = 0x1
DLT_EN3MB = 0x2 DLT_EN3MB = 0x2
DLT_ENC = 0x6d DLT_ENC = 0x6d
DLT_EPON = 0x103
DLT_ERF = 0xc5 DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0 DLT_ERF_POS = 0xb0
@ -405,6 +284,7 @@ const (
DLT_GPRS_LLC = 0xa9 DLT_GPRS_LLC = 0xa9
DLT_GSMTAP_ABIS = 0xda DLT_GSMTAP_ABIS = 0xda
DLT_GSMTAP_UM = 0xd9 DLT_GSMTAP_UM = 0xd9
DLT_HHDLC = 0x79
DLT_IBM_SN = 0x92 DLT_IBM_SN = 0x92
DLT_IBM_SP = 0x91 DLT_IBM_SP = 0x91
DLT_IEEE802 = 0x6 DLT_IEEE802 = 0x6
@ -417,17 +297,14 @@ const (
DLT_IEEE802_15_4_NONASK_PHY = 0xd7 DLT_IEEE802_15_4_NONASK_PHY = 0xd7
DLT_IEEE802_16_MAC_CPS = 0xbc DLT_IEEE802_16_MAC_CPS = 0xbc
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
DLT_INFINIBAND = 0xf7
DLT_IPFILTER = 0x74 DLT_IPFILTER = 0x74
DLT_IPMB = 0xc7 DLT_IPMB = 0xc7
DLT_IPMB_LINUX = 0xd1 DLT_IPMB_LINUX = 0xd1
DLT_IPMI_HPM_2 = 0x104
DLT_IPNET = 0xe2 DLT_IPNET = 0xe2
DLT_IPOIB = 0xf2 DLT_IPOIB = 0xf2
DLT_IPV4 = 0xe4 DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5 DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a DLT_IP_OVER_FC = 0x7a
DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89 DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87 DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee DLT_JUNIPER_ATM_CEMIC = 0xee
@ -461,7 +338,7 @@ const (
DLT_LINUX_SLL = 0x71 DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c DLT_LOOP = 0x6c
DLT_LTALK = 0x72 DLT_LTALK = 0x72
DLT_MATCHING_MAX = 0x109 DLT_MATCHING_MAX = 0xf6
DLT_MATCHING_MIN = 0x68 DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6 DLT_MFR = 0xb6
DLT_MOST = 0xd3 DLT_MOST = 0xd3
@ -473,7 +350,6 @@ const (
DLT_MUX27010 = 0xec DLT_MUX27010 = 0xec
DLT_NETANALYZER = 0xf0 DLT_NETANALYZER = 0xf0
DLT_NETANALYZER_TRANSPARENT = 0xf1 DLT_NETANALYZER_TRANSPARENT = 0xf1
DLT_NETLINK = 0xfd
DLT_NFC_LLCP = 0xf5 DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef DLT_NFLOG = 0xef
DLT_NG40 = 0xf4 DLT_NG40 = 0xf4
@ -481,36 +357,28 @@ const (
DLT_PCI_EXP = 0x7d DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75 DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79 DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0 DLT_PPI = 0xc0
DLT_PPP = 0x9 DLT_PPP = 0x9
DLT_PPP_BSDOS = 0xe DLT_PPP_BSDOS = 0x10
DLT_PPP_ETHER = 0x33 DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6 DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32 DLT_PPP_SERIAL = 0x32
DLT_PPP_WITH_DIR = 0xcc DLT_PPP_WITH_DIR = 0xcc
DLT_PPP_WITH_DIRECTION = 0xa6 DLT_PPP_WITH_DIRECTION = 0xa6
DLT_PRISM_HEADER = 0x77 DLT_PRISM_HEADER = 0x77
DLT_PROFIBUS_DL = 0x101
DLT_PRONET = 0x4 DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6 DLT_RAIF1 = 0xc6
DLT_RAW = 0xc DLT_RAW = 0xc
DLT_RDS = 0x109
DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
DLT_SITA = 0xc4 DLT_SITA = 0xc4
DLT_SLIP = 0x8 DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xd DLT_SLIP_BSDOS = 0xf
DLT_STANAG_5066_D_PDU = 0xed DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63 DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80 DLT_TZSP = 0x80
DLT_USB = 0xba DLT_USB = 0xba
DLT_USBPCAP = 0xf9
DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93 DLT_USER0 = 0x93
@ -529,13 +397,9 @@ const (
DLT_USER7 = 0x9a DLT_USER7 = 0x9a
DLT_USER8 = 0x9b DLT_USER8 = 0x9b
DLT_USER9 = 0x9c DLT_USER9 = 0x9c
DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5 DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6 DLT_X2E_XORAYA = 0xd6
DLT_ZWAVE_R1_R2 = 0x105
DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6 DT_BLK = 0x6
DT_CHR = 0x2 DT_CHR = 0x2
DT_DIR = 0x4 DT_DIR = 0x4
@ -556,11 +420,9 @@ const (
EVFILT_FS = -0x9 EVFILT_FS = -0x9
EVFILT_LIO = -0xa EVFILT_LIO = -0xa
EVFILT_PROC = -0x5 EVFILT_PROC = -0x5
EVFILT_PROCDESC = -0x8
EVFILT_READ = -0x1 EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6 EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xc EVFILT_SYSCOUNT = 0xb
EVFILT_TIMER = -0x7 EVFILT_TIMER = -0x7
EVFILT_USER = -0xb EVFILT_USER = -0xb
EVFILT_VNODE = -0x4 EVFILT_VNODE = -0x4
@ -575,8 +437,6 @@ const (
EV_EOF = 0x8000 EV_EOF = 0x8000
EV_ERROR = 0x4000 EV_ERROR = 0x4000
EV_FLAG1 = 0x2000 EV_FLAG1 = 0x2000
EV_FLAG2 = 0x4000
EV_FORCEONESHOT = 0x100
EV_ONESHOT = 0x10 EV_ONESHOT = 0x10
EV_RECEIPT = 0x40 EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000 EV_SYSFLAGS = 0xf000
@ -624,7 +484,7 @@ const (
IFF_ALLMULTI = 0x200 IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000 IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2 IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x218f52 IFF_CANTCHANGE = 0x218f72
IFF_CANTCONFIG = 0x10000 IFF_CANTCONFIG = 0x10000
IFF_DEBUG = 0x4 IFF_DEBUG = 0x4
IFF_DRV_OACTIVE = 0x400 IFF_DRV_OACTIVE = 0x400
@ -644,17 +504,217 @@ const (
IFF_RENAMING = 0x400000 IFF_RENAMING = 0x400000
IFF_RUNNING = 0x40 IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800 IFF_SIMPLEX = 0x800
IFF_SMART = 0x20
IFF_STATICARP = 0x80000 IFF_STATICARP = 0x80000
IFF_UP = 0x1 IFF_UP = 0x1
IFNAMSIZ = 0x10 IFNAMSIZ = 0x10
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
IFT_AAL2 = 0xbb
IFT_AAL5 = 0x31
IFT_ADSL = 0x5e
IFT_AFLANE8023 = 0x3b
IFT_AFLANE8025 = 0x3c
IFT_ARAP = 0x58
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
IFT_ASYNC = 0x54
IFT_ATM = 0x25
IFT_ATMDXI = 0x69
IFT_ATMFUNI = 0x6a
IFT_ATMIMA = 0x6b
IFT_ATMLOGICAL = 0x50
IFT_ATMRADIO = 0xbd
IFT_ATMSUBINTERFACE = 0x86
IFT_ATMVCIENDPT = 0xc2
IFT_ATMVIRTUAL = 0x95
IFT_BGPPOLICYACCOUNTING = 0xa2
IFT_BRIDGE = 0xd1 IFT_BRIDGE = 0xd1
IFT_BSC = 0x53
IFT_CARP = 0xf8 IFT_CARP = 0xf8
IFT_CCTEMUL = 0x3d
IFT_CEPT = 0x13
IFT_CES = 0x85
IFT_CHANNEL = 0x46
IFT_CNR = 0x55
IFT_COFFEE = 0x84
IFT_COMPOSITELINK = 0x9b
IFT_DCN = 0x8d
IFT_DIGITALPOWERLINE = 0x8a
IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
IFT_DLSW = 0x4a
IFT_DOCSCABLEDOWNSTREAM = 0x80
IFT_DOCSCABLEMACLAYER = 0x7f
IFT_DOCSCABLEUPSTREAM = 0x81
IFT_DS0 = 0x51
IFT_DS0BUNDLE = 0x52
IFT_DS1FDL = 0xaa
IFT_DS3 = 0x1e
IFT_DTM = 0x8c
IFT_DVBASILN = 0xac
IFT_DVBASIOUT = 0xad
IFT_DVBRCCDOWNSTREAM = 0x93
IFT_DVBRCCMACLAYER = 0x92
IFT_DVBRCCUPSTREAM = 0x94
IFT_ENC = 0xf4
IFT_EON = 0x19
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
IFT_FAITH = 0xf2
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
IFT_FDDI = 0xf
IFT_FIBRECHANNEL = 0x38
IFT_FRAMERELAYINTERCONNECT = 0x3a
IFT_FRAMERELAYMPI = 0x5c
IFT_FRDLCIENDPT = 0xc1
IFT_FRELAY = 0x20
IFT_FRELAYDCE = 0x2c
IFT_FRF16MFRBUNDLE = 0xa3
IFT_FRFORWARD = 0x9e
IFT_G703AT2MB = 0x43
IFT_G703AT64K = 0x42
IFT_GIF = 0xf0
IFT_GIGABITETHERNET = 0x75
IFT_GR303IDT = 0xb2
IFT_GR303RDT = 0xb1
IFT_H323GATEKEEPER = 0xa4
IFT_H323PROXY = 0xa5
IFT_HDH1822 = 0x3
IFT_HDLC = 0x76
IFT_HDSL2 = 0xa8
IFT_HIPERLAN2 = 0xb7
IFT_HIPPI = 0x2f
IFT_HIPPIINTERFACE = 0x39
IFT_HOSTPAD = 0x5a
IFT_HSSI = 0x2e
IFT_HY = 0xe
IFT_IBM370PARCHAN = 0x48
IFT_IDSL = 0x9a
IFT_IEEE1394 = 0x90 IFT_IEEE1394 = 0x90
IFT_IEEE80211 = 0x47
IFT_IEEE80212 = 0x37
IFT_IEEE8023ADLAG = 0xa1
IFT_IFGSN = 0x91
IFT_IMT = 0xbe
IFT_INFINIBAND = 0xc7 IFT_INFINIBAND = 0xc7
IFT_INTERLEAVE = 0x7c
IFT_IP = 0x7e
IFT_IPFORWARD = 0x8e
IFT_IPOVERATM = 0x72
IFT_IPOVERCDLC = 0x6d
IFT_IPOVERCLAW = 0x6e
IFT_IPSWITCH = 0x4e
IFT_IPXIP = 0xf9
IFT_ISDN = 0x3f
IFT_ISDNBASIC = 0x14
IFT_ISDNPRIMARY = 0x15
IFT_ISDNS = 0x4b
IFT_ISDNU = 0x4c
IFT_ISO88022LLC = 0x29
IFT_ISO88023 = 0x7
IFT_ISO88024 = 0x8
IFT_ISO88025 = 0x9
IFT_ISO88025CRFPINT = 0x62
IFT_ISO88025DTR = 0x56
IFT_ISO88025FIBER = 0x73
IFT_ISO88026 = 0xa
IFT_ISUP = 0xb3
IFT_L2VLAN = 0x87 IFT_L2VLAN = 0x87
IFT_L3IPVLAN = 0x88 IFT_L3IPVLAN = 0x88
IFT_L3IPXVLAN = 0x89
IFT_LAPB = 0x10
IFT_LAPD = 0x4d
IFT_LAPF = 0x77
IFT_LOCALTALK = 0x2a
IFT_LOOP = 0x18
IFT_MEDIAMAILOVERIP = 0x8b
IFT_MFSIGLINK = 0xa7
IFT_MIOX25 = 0x26
IFT_MODEM = 0x30
IFT_MPC = 0x71
IFT_MPLS = 0xa6
IFT_MPLSTUNNEL = 0x96
IFT_MSDSL = 0x8f
IFT_MVL = 0xbf
IFT_MYRINET = 0x63
IFT_NFAS = 0xaf
IFT_NSIP = 0x1b
IFT_OPTICALCHANNEL = 0xc3
IFT_OPTICALTRANSPORT = 0xc4
IFT_OTHER = 0x1
IFT_P10 = 0xc
IFT_P80 = 0xd
IFT_PARA = 0x22
IFT_PFLOG = 0xf6
IFT_PFSYNC = 0xf7
IFT_PLC = 0xae
IFT_POS = 0xab
IFT_PPP = 0x17 IFT_PPP = 0x17
IFT_PPPMULTILINKBUNDLE = 0x6c
IFT_PROPBWAP2MP = 0xb8
IFT_PROPCNLS = 0x59
IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
IFT_PROPMUX = 0x36
IFT_PROPVIRTUAL = 0x35 IFT_PROPVIRTUAL = 0x35
IFT_PROPWIRELESSP2P = 0x9d
IFT_PTPSERIAL = 0x16
IFT_PVC = 0xf1
IFT_QLLC = 0x44
IFT_RADIOMAC = 0xbc
IFT_RADSL = 0x5f
IFT_REACHDSL = 0xc0
IFT_RFC1483 = 0x9f
IFT_RS232 = 0x21
IFT_RSRB = 0x4f
IFT_SDLC = 0x11
IFT_SDSL = 0x60
IFT_SHDSL = 0xa9
IFT_SIP = 0x1f
IFT_SLIP = 0x1c
IFT_SMDSDXI = 0x2b
IFT_SMDSICIP = 0x34
IFT_SONET = 0x27
IFT_SONETOVERHEADCHANNEL = 0xb9
IFT_SONETPATH = 0x32
IFT_SONETVT = 0x33
IFT_SRP = 0x97
IFT_SS7SIGLINK = 0x9c
IFT_STACKTOSTACK = 0x6f
IFT_STARLAN = 0xb
IFT_STF = 0xd7
IFT_T1 = 0x12
IFT_TDLC = 0x74
IFT_TERMPAD = 0x5b
IFT_TR008 = 0xb0
IFT_TRANSPHDLC = 0x7b
IFT_TUNNEL = 0x83
IFT_ULTRA = 0x1d
IFT_USB = 0xa0
IFT_V11 = 0x40
IFT_V35 = 0x2d
IFT_V36 = 0x41
IFT_V37 = 0x78
IFT_VDSL = 0x61
IFT_VIRTUALIPADDRESS = 0x70
IFT_VOICEEM = 0x64
IFT_VOICEENCAP = 0x67
IFT_VOICEFXO = 0x65
IFT_VOICEFXS = 0x66
IFT_VOICEOVERATM = 0x98
IFT_VOICEOVERFRAMERELAY = 0x99
IFT_VOICEOVERIP = 0x68
IFT_X213 = 0x5d
IFT_X25 = 0x5
IFT_X25DDN = 0x4
IFT_X25HUNTGROUP = 0x7a
IFT_X25MLP = 0x79
IFT_X25PLE = 0x28
IFT_XETHER = 0x1a
IGNBRK = 0x1 IGNBRK = 0x1
IGNCR = 0x80 IGNCR = 0x80
IGNPAR = 0x4 IGNPAR = 0x4
@ -737,6 +797,7 @@ const (
IPPROTO_LEAF1 = 0x19 IPPROTO_LEAF1 = 0x19
IPPROTO_LEAF2 = 0x1a IPPROTO_LEAF2 = 0x1a
IPPROTO_MAX = 0x100 IPPROTO_MAX = 0x100
IPPROTO_MAXID = 0x34
IPPROTO_MEAS = 0x13 IPPROTO_MEAS = 0x13
IPPROTO_MH = 0x87 IPPROTO_MH = 0x87
IPPROTO_MHRP = 0x30 IPPROTO_MHRP = 0x30
@ -801,7 +862,6 @@ const (
IPPROTO_XTP = 0x24 IPPROTO_XTP = 0x24
IPV6_AUTOFLOWLABEL = 0x3b IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDANY = 0x40 IPV6_BINDANY = 0x40
IPV6_BINDMULTI = 0x41
IPV6_BINDV6ONLY = 0x1b IPV6_BINDV6ONLY = 0x1b
IPV6_CHECKSUM = 0x1a IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1 IPV6_DEFAULT_MULTICAST_HOPS = 0x1
@ -809,10 +869,9 @@ const (
IPV6_DEFHLIM = 0x40 IPV6_DEFHLIM = 0x40
IPV6_DONTFRAG = 0x3e IPV6_DONTFRAG = 0x3e
IPV6_DSTOPTS = 0x32 IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43 IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78 IPV6_FRAGTTL = 0x78
IPV6_FW_ADD = 0x1e IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f IPV6_FW_DEL = 0x1f
@ -846,16 +905,12 @@ const (
IPV6_PORTRANGE_LOW = 0x2 IPV6_PORTRANGE_LOW = 0x2
IPV6_PREFER_TEMPADDR = 0x3f IPV6_PREFER_TEMPADDR = 0x3f
IPV6_RECVDSTOPTS = 0x28 IPV6_RECVDSTOPTS = 0x28
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27 IPV6_RECVHOPOPTS = 0x27
IPV6_RECVPATHMTU = 0x2b IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24 IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
IPV6_RECVRTHDR = 0x26 IPV6_RECVRTHDR = 0x26
IPV6_RECVTCLASS = 0x39 IPV6_RECVTCLASS = 0x39
IPV6_RSSBUCKETID = 0x45
IPV6_RSS_LISTEN_BUCKET = 0x42
IPV6_RTHDR = 0x33 IPV6_RTHDR = 0x33
IPV6_RTHDRDSTOPTS = 0x23 IPV6_RTHDRDSTOPTS = 0x23
IPV6_RTHDR_LOOSE = 0x0 IPV6_RTHDR_LOOSE = 0x0
@ -871,7 +926,6 @@ const (
IP_ADD_MEMBERSHIP = 0xc IP_ADD_MEMBERSHIP = 0xc
IP_ADD_SOURCE_MEMBERSHIP = 0x46 IP_ADD_SOURCE_MEMBERSHIP = 0x46
IP_BINDANY = 0x18 IP_BINDANY = 0x18
IP_BINDMULTI = 0x19
IP_BLOCK_SOURCE = 0x48 IP_BLOCK_SOURCE = 0x48
IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1
@ -884,8 +938,7 @@ const (
IP_DUMMYNET_DEL = 0x3d IP_DUMMYNET_DEL = 0x3d
IP_DUMMYNET_FLUSH = 0x3e IP_DUMMYNET_FLUSH = 0x3e
IP_DUMMYNET_GET = 0x40 IP_DUMMYNET_GET = 0x40
IP_FLOWID = 0x5a IP_FAITH = 0x16
IP_FLOWTYPE = 0x5b
IP_FW3 = 0x30 IP_FW3 = 0x30
IP_FW_ADD = 0x32 IP_FW_ADD = 0x32
IP_FW_DEL = 0x33 IP_FW_DEL = 0x33
@ -927,17 +980,13 @@ const (
IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_HIGH = 0x1
IP_PORTRANGE_LOW = 0x2 IP_PORTRANGE_LOW = 0x2
IP_RECVDSTADDR = 0x7 IP_RECVDSTADDR = 0x7
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14 IP_RECVIF = 0x14
IP_RECVOPTS = 0x5 IP_RECVOPTS = 0x5
IP_RECVRETOPTS = 0x6 IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44 IP_RECVTOS = 0x44
IP_RECVTTL = 0x41 IP_RECVTTL = 0x41
IP_RETOPTS = 0x8 IP_RETOPTS = 0x8
IP_RF = 0x8000 IP_RF = 0x8000
IP_RSSBUCKETID = 0x5c
IP_RSS_LISTEN_BUCKET = 0x1a
IP_RSVP_OFF = 0x10 IP_RSVP_OFF = 0x10
IP_RSVP_ON = 0xf IP_RSVP_ON = 0xf
IP_RSVP_VIF_OFF = 0x12 IP_RSVP_VIF_OFF = 0x12
@ -975,14 +1024,13 @@ const (
MAP_EXCL = 0x4000 MAP_EXCL = 0x4000
MAP_FILE = 0x0 MAP_FILE = 0x0
MAP_FIXED = 0x10 MAP_FIXED = 0x10
MAP_GUARD = 0x2000
MAP_HASSEMAPHORE = 0x200 MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000 MAP_NOCORE = 0x20000
MAP_NORESERVE = 0x40
MAP_NOSYNC = 0x800 MAP_NOSYNC = 0x800
MAP_PREFAULT_READ = 0x40000 MAP_PREFAULT_READ = 0x40000
MAP_PRIVATE = 0x2 MAP_PRIVATE = 0x2
MAP_RESERVED0020 = 0x20 MAP_RENAME = 0x20
MAP_RESERVED0040 = 0x40
MAP_RESERVED0080 = 0x80 MAP_RESERVED0080 = 0x80
MAP_RESERVED0100 = 0x100 MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1 MAP_SHARED = 0x1
@ -1003,7 +1051,6 @@ const (
MSG_PEEK = 0x2 MSG_PEEK = 0x2
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MSG_WAITFORONE = 0x80000
MS_ASYNC = 0x1 MS_ASYNC = 0x1
MS_INVALIDATE = 0x2 MS_INVALIDATE = 0x2
MS_SYNC = 0x0 MS_SYNC = 0x0
@ -1013,12 +1060,10 @@ const (
NET_RT_IFLIST = 0x3 NET_RT_IFLIST = 0x3
NET_RT_IFLISTL = 0x5 NET_RT_IFLISTL = 0x5
NET_RT_IFMALIST = 0x4 NET_RT_IFMALIST = 0x4
NET_RT_MAXID = 0x6
NOFLSH = 0x80000000 NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
NOTE_ATTRIB = 0x8 NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4 NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
NOTE_CLOSE_WRITE = 0x200
NOTE_DELETE = 0x1 NOTE_DELETE = 0x1
NOTE_EXEC = 0x20000000 NOTE_EXEC = 0x20000000
NOTE_EXIT = 0x80000000 NOTE_EXIT = 0x80000000
@ -1029,23 +1074,16 @@ const (
NOTE_FFLAGSMASK = 0xffffff NOTE_FFLAGSMASK = 0xffffff
NOTE_FFNOP = 0x0 NOTE_FFNOP = 0x0
NOTE_FFOR = 0x80000000 NOTE_FFOR = 0x80000000
NOTE_FILE_POLL = 0x2
NOTE_FORK = 0x40000000 NOTE_FORK = 0x40000000
NOTE_LINK = 0x10 NOTE_LINK = 0x10
NOTE_LOWAT = 0x1 NOTE_LOWAT = 0x1
NOTE_MSECONDS = 0x2
NOTE_NSECONDS = 0x8
NOTE_OPEN = 0x80
NOTE_PCTRLMASK = 0xf0000000 NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0xfffff NOTE_PDATAMASK = 0xfffff
NOTE_READ = 0x400
NOTE_RENAME = 0x20 NOTE_RENAME = 0x20
NOTE_REVOKE = 0x40 NOTE_REVOKE = 0x40
NOTE_SECONDS = 0x1
NOTE_TRACK = 0x1 NOTE_TRACK = 0x1
NOTE_TRACKERR = 0x2 NOTE_TRACKERR = 0x2
NOTE_TRIGGER = 0x1000000 NOTE_TRIGGER = 0x1000000
NOTE_USECONDS = 0x4
NOTE_WRITE = 0x2 NOTE_WRITE = 0x2
OCRNL = 0x10 OCRNL = 0x10
ONLCR = 0x2 ONLCR = 0x2
@ -1053,7 +1091,6 @@ const (
ONOCR = 0x20 ONOCR = 0x20
ONOEOT = 0x8 ONOEOT = 0x8
OPOST = 0x1 OPOST = 0x1
OXTABS = 0x4
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_APPEND = 0x8 O_APPEND = 0x8
O_ASYNC = 0x40 O_ASYNC = 0x40
@ -1075,7 +1112,6 @@ const (
O_SYNC = 0x80 O_SYNC = 0x80
O_TRUNC = 0x400 O_TRUNC = 0x400
O_TTY_INIT = 0x80000 O_TTY_INIT = 0x80000
O_VERIFY = 0x200000
O_WRONLY = 0x1 O_WRONLY = 0x1
PARENB = 0x1000 PARENB = 0x1000
PARMRK = 0x8 PARMRK = 0x8
@ -1093,10 +1129,7 @@ const (
RLIMIT_CPU = 0x0 RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2 RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1 RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8 RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3 RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6 RTAX_AUTHOR = 0x6
@ -1120,7 +1153,6 @@ const (
RTF_BROADCAST = 0x400000 RTF_BROADCAST = 0x400000
RTF_DONE = 0x40 RTF_DONE = 0x40
RTF_DYNAMIC = 0x10 RTF_DYNAMIC = 0x10
RTF_FIXEDMTU = 0x80000
RTF_FMASK = 0x1004d808 RTF_FMASK = 0x1004d808
RTF_GATEWAY = 0x2 RTF_GATEWAY = 0x2
RTF_GWFLAG_COMPAT = 0x80000000 RTF_GWFLAG_COMPAT = 0x80000000
@ -1131,6 +1163,7 @@ const (
RTF_MODIFIED = 0x20 RTF_MODIFIED = 0x20
RTF_MULTICAST = 0x800000 RTF_MULTICAST = 0x800000
RTF_PINNED = 0x100000 RTF_PINNED = 0x100000
RTF_PRCLONING = 0x10000
RTF_PROTO1 = 0x8000 RTF_PROTO1 = 0x8000
RTF_PROTO2 = 0x4000 RTF_PROTO2 = 0x4000
RTF_PROTO3 = 0x40000 RTF_PROTO3 = 0x40000
@ -1154,6 +1187,8 @@ const (
RTM_MISS = 0x7 RTM_MISS = 0x7
RTM_NEWADDR = 0xc RTM_NEWADDR = 0xc
RTM_NEWMADDR = 0xf RTM_NEWMADDR = 0xf
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
RTM_REDIRECT = 0x6 RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240 RTM_RTTUNIT = 0xf4240
@ -1168,19 +1203,9 @@ const (
RTV_SSTHRESH = 0x20 RTV_SSTHRESH = 0x20
RTV_WEIGHT = 0x100 RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1 RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
RT_CACHING_CONTEXT = 0x1 RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0 RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
RT_HAS_HEADER_BIT = 0x4
RT_L2_ME = 0x4
RT_L2_ME_BIT = 0x2
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
RT_NORTREF = 0x2 RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1 RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0 RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1 RUSAGE_THREAD = 0x1
@ -1192,19 +1217,21 @@ const (
SHUT_RDWR = 0x2 SHUT_RDWR = 0x2
SHUT_WR = 0x1 SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931 SIOCADDMULTI = 0x80206931
SIOCADDRT = 0x8030720a
SIOCAIFADDR = 0x8040691a SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80246987 SIOCAIFGROUP = 0x80246987
SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307 SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932 SIOCDELMULTI = 0x80206932
SIOCDELRT = 0x8030720b
SIOCDIFADDR = 0x80206919 SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80246989 SIOCDIFGROUP = 0x80246989
SIOCDIFPHYADDR = 0x80206949 SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc01c697b SIOCGDRVSPEC = 0xc01c697b
SIOCGETSGCNT = 0xc0147210 SIOCGETSGCNT = 0xc0147210
SIOCGETVIFCNT = 0xc014720f SIOCGETVIFCNT = 0xc014720f
SIOCGHIWAT = 0x40047301 SIOCGHIWAT = 0x40047301
SIOCGHWADDR = 0xc020693e
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921 SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923 SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f SIOCGIFCAP = 0xc020691f
@ -1226,12 +1253,12 @@ const (
SIOCGIFPHYS = 0xc0206935 SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947 SIOCGIFPSRCADDR = 0xc0206947
SIOCGIFSTATUS = 0xc331693b SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc028698b SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCGLOWAT = 0x40047303 SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309 SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_0 = 0xc0206950
SIOCGPRIVATE_1 = 0xc0206951 SIOCGPRIVATE_1 = 0xc0206951
SIOCGTUNFIB = 0xc020695e
SIOCIFCREATE = 0xc020697a SIOCIFCREATE = 0xc020697a
SIOCIFCREATE2 = 0xc020697c SIOCIFCREATE2 = 0xc020697c
SIOCIFDESTROY = 0x80206979 SIOCIFDESTROY = 0x80206979
@ -1257,9 +1284,9 @@ const (
SIOCSIFPHYS = 0x80206936 SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a SIOCSIFVNET = 0xc020695a
SIOCSLIFPHYADDR = 0x8118694a
SIOCSLOWAT = 0x80047302 SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308 SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
SOCK_CLOEXEC = 0x10000000 SOCK_CLOEXEC = 0x10000000
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_MAXADDRLEN = 0xff SOCK_MAXADDRLEN = 0xff
@ -1304,22 +1331,11 @@ const (
SO_USELOOPBACK = 0x40 SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015 SO_USER_COOKIE = 0x1015
SO_VENDOR = 0x80000000 SO_VENDOR = 0x80000000
TAB0 = 0x0
TAB3 = 0x4
TABDLY = 0x4
TCIFLUSH = 0x1 TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3 TCIOFLUSH = 0x3
TCION = 0x4
TCOFLUSH = 0x2 TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
TCP_CA_NAME_MAX = 0x10 TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40 TCP_CONGESTION = 0x40
TCP_FASTOPEN = 0x401
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20 TCP_INFO = 0x20
TCP_KEEPCNT = 0x400 TCP_KEEPCNT = 0x400
TCP_KEEPIDLE = 0x100 TCP_KEEPIDLE = 0x100
@ -1338,8 +1354,6 @@ const (
TCP_NODELAY = 0x1 TCP_NODELAY = 0x1
TCP_NOOPT = 0x8 TCP_NOOPT = 0x8
TCP_NOPUSH = 0x4 TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
TCP_VENDOR = 0x80000000 TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2 TCSAFLUSH = 0x2
TIOCCBRK = 0x2000747a TIOCCBRK = 0x2000747a
@ -1402,7 +1416,7 @@ const (
TIOCSTI = 0x80017472 TIOCSTI = 0x80017472
TIOCSTOP = 0x2000746f TIOCSTOP = 0x2000746f
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCTIMESTAMP = 0x40107459 TIOCTIMESTAMP = 0x40087459
TIOCUCNTL = 0x80047466 TIOCUCNTL = 0x80047466
TOSTOP = 0x400000 TOSTOP = 0x400000
VDISCARD = 0xf VDISCARD = 0xf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1639,12 +1626,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b TCFLSH = 0x540b
TCGETA = 0x5405 TCGETA = 0x5405
TCGETS = 0x5401 TCGETS = 0x5401
@ -1784,7 +1765,6 @@ const (
TIOCSWINSZ = 0x5414 TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x100 TOSTOP = 0x100
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x400854d5 TUNATTACHFILTER = 0x400854d5
TUNDETACHFILTER = 0x400854d6 TUNDETACHFILTER = 0x400854d6
TUNGETFEATURES = 0x800454cf TUNGETFEATURES = 0x800454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1640,12 +1627,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b TCFLSH = 0x540b
TCGETA = 0x5405 TCGETA = 0x5405
TCGETS = 0x5401 TCGETS = 0x5401
@ -1785,7 +1766,6 @@ const (
TIOCSWINSZ = 0x5414 TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x100 TOSTOP = 0x100
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x401054d5 TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6 TUNDETACHFILTER = 0x401054d6
TUNGETFEATURES = 0x800454cf TUNGETFEATURES = 0x800454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1644,12 +1631,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b TCFLSH = 0x540b
TCGETA = 0x5405 TCGETA = 0x5405
TCGETS = 0x5401 TCGETS = 0x5401
@ -1789,7 +1770,6 @@ const (
TIOCSWINSZ = 0x5414 TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x100 TOSTOP = 0x100
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x400854d5 TUNATTACHFILTER = 0x400854d5
TUNDETACHFILTER = 0x400854d6 TUNDETACHFILTER = 0x400854d6
TUNGETFEATURES = 0x800454cf TUNGETFEATURES = 0x800454cf

View File

@ -508,19 +508,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1629,12 +1616,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b TCFLSH = 0x540b
TCGETA = 0x5405 TCGETA = 0x5405
TCGETS = 0x5401 TCGETS = 0x5401
@ -1774,7 +1755,6 @@ const (
TIOCSWINSZ = 0x5414 TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x100 TOSTOP = 0x100
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x401054d5 TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6 TUNDETACHFILTER = 0x401054d6
TUNGETFEATURES = 0x800454cf TUNGETFEATURES = 0x800454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407 TCFLSH = 0x5407
TCGETA = 0x5401 TCGETA = 0x5401
TCGETS = 0x540d TCGETS = 0x540d
@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x8000 TOSTOP = 0x8000
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x800854d5 TUNATTACHFILTER = 0x800854d5
TUNDETACHFILTER = 0x800854d6 TUNDETACHFILTER = 0x800854d6
TUNGETFEATURES = 0x400454cf TUNGETFEATURES = 0x400454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407 TCFLSH = 0x5407
TCGETA = 0x5401 TCGETA = 0x5401
TCGETS = 0x540d TCGETS = 0x540d
@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x8000 TOSTOP = 0x8000
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5 TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6 TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf TUNGETFEATURES = 0x400454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407 TCFLSH = 0x5407
TCGETA = 0x5401 TCGETA = 0x5401
TCGETS = 0x540d TCGETS = 0x540d
@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x8000 TOSTOP = 0x8000
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5 TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6 TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf TUNGETFEATURES = 0x400454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407 TCFLSH = 0x5407
TCGETA = 0x5401 TCGETA = 0x5401
TCGETS = 0x540d TCGETS = 0x540d
@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x8000 TOSTOP = 0x8000
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x800854d5 TUNATTACHFILTER = 0x800854d5
TUNDETACHFILTER = 0x800854d6 TUNDETACHFILTER = 0x800854d6
TUNGETFEATURES = 0x400454cf TUNGETFEATURES = 0x400454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x4000 HUPCL = 0x4000
@ -1697,12 +1684,6 @@ const (
TAB2 = 0x800 TAB2 = 0x800
TAB3 = 0xc00 TAB3 = 0xc00
TABDLY = 0xc00 TABDLY = 0xc00
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x2000741f TCFLSH = 0x2000741f
TCGETA = 0x40147417 TCGETA = 0x40147417
TCGETS = 0x402c7413 TCGETS = 0x402c7413
@ -1846,7 +1827,6 @@ const (
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x400000 TOSTOP = 0x400000
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5 TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6 TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf TUNGETFEATURES = 0x400454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x4000 HUPCL = 0x4000
@ -1697,12 +1684,6 @@ const (
TAB2 = 0x800 TAB2 = 0x800
TAB3 = 0xc00 TAB3 = 0xc00
TABDLY = 0xc00 TABDLY = 0xc00
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x2000741f TCFLSH = 0x2000741f
TCGETA = 0x40147417 TCGETA = 0x40147417
TCGETS = 0x402c7413 TCGETS = 0x402c7413
@ -1846,7 +1827,6 @@ const (
TIOCSWINSZ = 0x80087467 TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x400000 TOSTOP = 0x400000
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5 TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6 TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf TUNGETFEATURES = 0x400454cf

View File

@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0 F_ULOCK = 0x0
F_UNLCK = 0x2 F_UNLCK = 0x2
F_WRLCK = 0x1 F_WRLCK = 0x1
GENL_ADMIN_PERM = 0x1
GENL_CMD_CAP_DO = 0x2
GENL_CMD_CAP_DUMP = 0x4
GENL_CMD_CAP_HASPOL = 0x8
GENL_HDRLEN = 0x4
GENL_ID_CTRL = 0x10
GENL_ID_PMCRAID = 0x12
GENL_ID_VFS_DQUOT = 0x11
GENL_MAX_ID = 0x3ff
GENL_MIN_ID = 0x10
GENL_NAMSIZ = 0x10
GENL_START_ALLOC = 0x13
GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1 GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2 GRND_RANDOM = 0x2
HUPCL = 0x400 HUPCL = 0x400
@ -1701,12 +1688,6 @@ const (
TAB2 = 0x1000 TAB2 = 0x1000
TAB3 = 0x1800 TAB3 = 0x1800
TABDLY = 0x1800 TABDLY = 0x1800
TASKSTATS_CMD_ATTR_MAX = 0x4
TASKSTATS_CMD_MAX = 0x2
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b TCFLSH = 0x540b
TCGETA = 0x5405 TCGETA = 0x5405
TCGETS = 0x5401 TCGETS = 0x5401
@ -1846,7 +1827,6 @@ const (
TIOCSWINSZ = 0x5414 TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437 TIOCVHANGUP = 0x5437
TOSTOP = 0x100 TOSTOP = 0x100
TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x401054d5 TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6 TUNDETACHFILTER = 0x401054d6
TUNGETFEATURES = 0x800454cf TUNGETFEATURES = 0x800454cf

View File

@ -1006,9 +1006,6 @@ const (
MSG_TRUNC = 0x10 MSG_TRUNC = 0x10
MSG_USERFLAGS = 0xffffff MSG_USERFLAGS = 0xffffff
MSG_WAITALL = 0x40 MSG_WAITALL = 0x40
MS_ASYNC = 0x1
MS_INVALIDATE = 0x2
MS_SYNC = 0x4
NAME_MAX = 0x1ff NAME_MAX = 0x1ff
NET_RT_DUMP = 0x1 NET_RT_DUMP = 0x1
NET_RT_FLAGS = 0x2 NET_RT_FLAGS = 0x2

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// mksyscall.pl -l32 -tags darwin,386 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go // mksyscall.pl -l32 -tags darwin,386 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build darwin,386 // +build darwin,386
@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -398,16 +298,6 @@ func kill(pid int, signum int, posix int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -566,21 +456,6 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) { func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -611,21 +486,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -636,21 +496,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) { func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 { if e1 != 0 {
@ -900,26 +745,6 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) { func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 { if e1 != 0 {
@ -960,21 +785,6 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) { func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1005,14 +815,14 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) { func Mlock(b []byte) (err error) {
var _p0 *byte var _p0 unsafe.Pointer
_p0, err = BytePtrFromString(path) if len(b) > 0 {
if err != nil { _p0 = unsafe.Pointer(&b[0])
return } else {
_p0 = unsafe.Pointer(&_zero)
} }
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }
@ -1021,13 +831,65 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
if err != nil { if err != nil {
return return
} }
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0) fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
@ -1126,28 +988,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) { func Rename(from string, to string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(from) _p0, err = BytePtrFromString(from)
@ -1168,26 +1008,6 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) { func Revoke(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1425,26 +1245,6 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) { func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1508,21 +1308,6 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) { func Unmount(path string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -1,5 +1,5 @@
// mksyscall.pl -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go // mksyscall.pl -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build darwin,amd64 // +build darwin,amd64
@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -398,16 +298,6 @@ func kill(pid int, signum int, posix int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -566,21 +456,6 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) { func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -611,21 +486,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -636,21 +496,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) { func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 { if e1 != 0 {
@ -900,26 +745,6 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) { func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 { if e1 != 0 {
@ -960,21 +785,6 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) { func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1005,14 +815,14 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) { func Mlock(b []byte) (err error) {
var _p0 *byte var _p0 unsafe.Pointer
_p0, err = BytePtrFromString(path) if len(b) > 0 {
if err != nil { _p0 = unsafe.Pointer(&b[0])
return } else {
_p0 = unsafe.Pointer(&_zero)
} }
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }
@ -1021,13 +831,65 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
if err != nil { if err != nil {
return return
} }
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0) fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
@ -1126,28 +988,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) { func Rename(from string, to string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(from) _p0, err = BytePtrFromString(from)
@ -1168,26 +1008,6 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) { func Revoke(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1425,26 +1245,6 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) { func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1508,21 +1308,6 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) { func Unmount(path string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1598,6 +1383,21 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
sec = int64(r0) sec = int64(r0)

View File

@ -1,5 +1,5 @@
// mksyscall.pl -tags darwin,arm syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go // mksyscall.pl -l32 -tags darwin,arm syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build darwin,arm // +build darwin,arm
@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else { } else {
_p0 = unsafe.Pointer(&_zero) _p0 = unsafe.Pointer(&_zero)
} }
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }
@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -398,16 +298,6 @@ func kill(pid int, signum int, posix int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -566,21 +456,6 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) { func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -611,21 +486,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -636,21 +496,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) { func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 { if e1 != 0 {
@ -900,26 +745,6 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) { func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 { if e1 != 0 {
@ -960,21 +785,6 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) { func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1005,14 +815,14 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) { func Mlock(b []byte) (err error) {
var _p0 *byte var _p0 unsafe.Pointer
_p0, err = BytePtrFromString(path) if len(b) > 0 {
if err != nil { _p0 = unsafe.Pointer(&b[0])
return } else {
_p0 = unsafe.Pointer(&_zero)
} }
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }
@ -1021,13 +831,65 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
if err != nil { if err != nil {
return return
} }
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0) fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
@ -1126,28 +988,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) { func Rename(from string, to string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(from) _p0, err = BytePtrFromString(from)
@ -1168,26 +1008,6 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) { func Revoke(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1425,26 +1245,6 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) { func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1508,21 +1308,6 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) { func Unmount(path string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -1,5 +1,5 @@
// mksyscall.pl -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go // mksyscall.pl -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build darwin,arm64 // +build darwin,arm64
@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -398,16 +298,6 @@ func kill(pid int, signum int, posix int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -566,21 +456,6 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) { func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -611,21 +486,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -636,21 +496,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) { func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 { if e1 != 0 {
@ -900,26 +745,6 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) { func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 { if e1 != 0 {
@ -960,21 +785,6 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) { func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1005,14 +815,14 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) { func Mlock(b []byte) (err error) {
var _p0 *byte var _p0 unsafe.Pointer
_p0, err = BytePtrFromString(path) if len(b) > 0 {
if err != nil { _p0 = unsafe.Pointer(&b[0])
return } else {
_p0 = unsafe.Pointer(&_zero)
} }
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
} }
@ -1021,13 +831,65 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
if err != nil { if err != nil {
return return
} }
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0) fd = int(r0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
@ -1126,28 +988,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) { func Rename(from string, to string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(from) _p0, err = BytePtrFromString(from)
@ -1168,26 +1008,6 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) { func Revoke(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1425,26 +1245,6 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) { func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1508,21 +1308,6 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) { func Unmount(path string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)

View File

@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
r = int(r0) r = int(r0)
@ -929,6 +829,74 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) { func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 { if e1 != 0 {
@ -1423,18 +1391,3 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -1,5 +1,5 @@
// mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go // mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build freebsd,386 // +build freebsd,386
@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
r = int(r0) r = int(r0)
@ -378,16 +278,6 @@ func pipe() (r int, w int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -413,36 +303,6 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func CapEnter() (err error) {
_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func capRightsLimit(fd int, rightsp *CapRights) (err error) {
_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) { func Chdir(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -780,21 +640,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) { func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -825,21 +670,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -850,21 +680,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) { func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 { if e1 != 0 {
@ -1134,26 +949,6 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) { func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 { if e1 != 0 {
@ -1194,21 +989,6 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) { func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1239,6 +1019,74 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) { func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 { if e1 != 0 {
@ -1265,22 +1113,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) { func Pathconf(path string, name int) (val int, err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1370,28 +1202,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) { func Rename(from string, to string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(from) _p0, err = BytePtrFromString(from)
@ -1412,26 +1222,6 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) { func Revoke(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1679,26 +1469,6 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) { func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1762,21 +1532,6 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) { func Unmount(path string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1860,18 +1615,3 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
r = int(r0) r = int(r0)
@ -378,16 +278,6 @@ func pipe() (r int, w int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -780,21 +670,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) { func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -825,21 +700,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -850,21 +710,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) { func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 { if e1 != 0 {
@ -1134,26 +979,6 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) { func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 { if e1 != 0 {
@ -1194,21 +1019,6 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) { func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1239,6 +1049,74 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) { func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 { if e1 != 0 {
@ -1370,28 +1248,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) { func Rename(from string, to string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(from) _p0, err = BytePtrFromString(from)
@ -1412,26 +1268,6 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) { func Revoke(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1679,26 +1515,6 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) { func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1762,21 +1578,6 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) { func Unmount(path string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1860,18 +1661,3 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -1,5 +1,5 @@
// mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go // mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build freebsd,arm // +build freebsd,arm
@ -266,106 +266,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) { func pipe() (r int, w int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
r = int(r0) r = int(r0)
@ -378,16 +278,6 @@ func pipe() (r int, w int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) { func Access(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -413,36 +303,6 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func CapEnter() (err error) {
_, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
_, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func capRightsLimit(fd int, rightsp *CapRights) (err error) {
_, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) { func Chdir(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -780,21 +640,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) { func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -825,21 +670,6 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) { func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 { if e1 != 0 {
@ -850,21 +680,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) { func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 { if e1 != 0 {
@ -1134,26 +949,6 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) { func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 { if e1 != 0 {
@ -1194,21 +989,6 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) { func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1239,6 +1019,74 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) { func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 { if e1 != 0 {
@ -1265,22 +1113,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) { func Pathconf(path string, name int) (val int, err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1370,28 +1202,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) { func Rename(from string, to string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(from) _p0, err = BytePtrFromString(from)
@ -1412,26 +1222,6 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) { func Revoke(path string) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1679,26 +1469,6 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) { func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1762,21 +1532,6 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) { func Unmount(path string, flags int) (err error) {
var _p0 *byte var _p0 *byte
_p0, err = BytePtrFromString(path) _p0, err = BytePtrFromString(path)
@ -1860,18 +1615,3 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
} }
return return
} }
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}

View File

@ -1234,16 +1234,6 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) { func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1472,22 +1462,6 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) { func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 { if e1 != 0 {

View File

@ -1234,16 +1234,6 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) { func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1472,22 +1462,6 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) { func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 { if e1 != 0 {

View File

@ -1234,16 +1234,6 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) { func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1472,22 +1462,6 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) { func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 { if e1 != 0 {

View File

@ -1234,16 +1234,6 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) { func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1472,22 +1462,6 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) { func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 { if e1 != 0 {

View File

@ -1234,16 +1234,6 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) { func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1472,22 +1462,6 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) { func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 { if e1 != 0 {

View File

@ -1234,16 +1234,6 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) { func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1472,22 +1462,6 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) { func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 { if e1 != 0 {

View File

@ -1234,16 +1234,6 @@ func Sync() {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) { func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 { if e1 != 0 {
@ -1472,22 +1462,6 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) { func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 { if e1 != 0 {

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