mirror of https://github.com/docker/cli.git
Merge pull request #516 from andrewhsu/v
vndr docker/docker to ea220e7 to bring in fix for arm
This commit is contained in:
commit
b60413264d
|
@ -4,7 +4,7 @@ github.com/coreos/etcd 824277cb3a577a0e8c829ca9ec557b973fe06d20
|
|||
github.com/cpuguy83/go-md2man a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa
|
||||
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76
|
||||
github.com/docker/distribution edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c
|
||||
github.com/docker/docker 184cea5ff710abde25547749e5608b24a255ba09
|
||||
github.com/docker/docker ea220e70a13963da544645376cd9331021eec6b4
|
||||
github.com/docker/docker-credential-helpers v0.5.1
|
||||
|
||||
# the docker/go package contains a customized version of canonical/json
|
||||
|
@ -13,7 +13,6 @@ github.com/docker/go d30aec9fd63c35133f8f79c3412ad91a3b08be06
|
|||
github.com/docker/go-connections 3ede32e2033de7505e6500d6c868c2b9ed9f169d
|
||||
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
|
||||
github.com/docker/go-units 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1
|
||||
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
|
||||
github.com/docker/notary v0.4.2-sirupsen https://github.com/simonferquel/notary.git
|
||||
github.com/docker/swarmkit 0554c9bc9a485025e89b8e5c2c1f0d75961906a2
|
||||
github.com/flynn-archive/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff
|
||||
|
@ -48,7 +47,7 @@ github.com/xeipuuv/gojsonschema 93e72a773fade158921402d6a24c819b48aba29d
|
|||
golang.org/x/crypto 3fbbcd23f1cb824e69491a5930cfeff09b12f4d2
|
||||
golang.org/x/net 7dcfb8076726a3fdd9353b6b8a1f1b6be6811bd6
|
||||
golang.org/x/sync 450f422ab23cf9881c94e2db30cac0eb1b7cf80c
|
||||
golang.org/x/sys 739734461d1c916b6c72a63d7efda2b27edb369f
|
||||
golang.org/x/sys 07c182904dbd53199946ba614a412c61d3c548f5
|
||||
golang.org/x/text f72d8390a633d5dfb0cc84043294db9f6c935756
|
||||
golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb
|
||||
google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/docker/docker/pkg/ioutils"
|
||||
"github.com/docker/docker/pkg/system"
|
||||
"github.com/docker/libtrust"
|
||||
)
|
||||
|
||||
// Common constants for daemon and client.
|
||||
const (
|
||||
// DefaultVersion of Current REST API
|
||||
|
@ -21,45 +9,3 @@ const (
|
|||
// command to specify that no base image is to be used.
|
||||
NoBaseImageSpecifier string = "scratch"
|
||||
)
|
||||
|
||||
// LoadOrCreateTrustKey attempts to load the libtrust key at the given path,
|
||||
// otherwise generates a new one
|
||||
func LoadOrCreateTrustKey(trustKeyPath string) (libtrust.PrivateKey, error) {
|
||||
err := system.MkdirAll(filepath.Dir(trustKeyPath), 0700, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
trustKey, err := libtrust.LoadKeyFile(trustKeyPath)
|
||||
if err == libtrust.ErrKeyFileDoesNotExist {
|
||||
trustKey, err = libtrust.GenerateECP256PrivateKey()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error generating key: %s", err)
|
||||
}
|
||||
encodedKey, err := serializePrivateKey(trustKey, filepath.Ext(trustKeyPath))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error serializing key: %s", err)
|
||||
}
|
||||
if err := ioutils.AtomicWriteFile(trustKeyPath, encodedKey, os.FileMode(0600)); err != nil {
|
||||
return nil, fmt.Errorf("Error saving key file: %s", err)
|
||||
}
|
||||
} else if err != nil {
|
||||
return nil, fmt.Errorf("Error loading key file %s: %s", trustKeyPath, err)
|
||||
}
|
||||
return trustKey, nil
|
||||
}
|
||||
|
||||
func serializePrivateKey(key libtrust.PrivateKey, ext string) (encoded []byte, err error) {
|
||||
if ext == ".json" || ext == ".jwk" {
|
||||
encoded, err = json.Marshal(key)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to encode private key JWK: %s", err)
|
||||
}
|
||||
} else {
|
||||
pemBlock, err := key.PEMBlock()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to encode private key PEM: %s", err)
|
||||
}
|
||||
encoded = pem.EncodeToMemory(pemBlock)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package api
|
||||
|
||||
import "regexp"
|
||||
|
||||
// RestrictedNameChars collects the characters allowed to represent a name, normally used to validate container and volume names.
|
||||
const RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
|
||||
|
||||
// RestrictedNamePattern is a regular expression to validate names against the collection of restricted characters.
|
||||
var RestrictedNamePattern = regexp.MustCompile(`^` + RestrictedNameChars + `+$`)
|
|
@ -12,7 +12,6 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/pkg/tlsconfig"
|
||||
"github.com/docker/go-connections/sockets"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context"
|
||||
|
@ -115,7 +114,7 @@ func tlsDialWithDialer(dialer *net.Dialer, network, addr string, config *tls.Con
|
|||
// from the hostname we're connecting to.
|
||||
if config.ServerName == "" {
|
||||
// Make a copy to avoid polluting argument or default.
|
||||
config = tlsconfig.Clone(config)
|
||||
config = tlsConfigClone(config)
|
||||
config.ServerName = hostname
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,12 @@ package client
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
"github.com/opencontainers/go-digest"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
@ -85,7 +86,7 @@ func (cli *Client) ServiceCreate(ctx context.Context, service swarm.ServiceSpec,
|
|||
return response, err
|
||||
}
|
||||
|
||||
func imageDigestAndPlatforms(ctx context.Context, cli *Client, image, encodedAuth string) (string, []swarm.Platform, error) {
|
||||
func imageDigestAndPlatforms(ctx context.Context, cli DistributionAPIClient, image, encodedAuth string) (string, []swarm.Platform, error) {
|
||||
distributionInspect, err := cli.DistributionInspect(ctx, image, encodedAuth)
|
||||
imageWithDigest := image
|
||||
var platforms []swarm.Platform
|
||||
|
@ -98,6 +99,16 @@ func imageDigestAndPlatforms(ctx context.Context, cli *Client, image, encodedAut
|
|||
if len(distributionInspect.Platforms) > 0 {
|
||||
platforms = make([]swarm.Platform, 0, len(distributionInspect.Platforms))
|
||||
for _, p := range distributionInspect.Platforms {
|
||||
// clear architecture field for arm. This is a temporary patch to address
|
||||
// https://github.com/docker/swarmkit/issues/2294. The issue is that while
|
||||
// image manifests report "arm" as the architecture, the node reports
|
||||
// something like "armv7l" (includes the variant), which causes arm images
|
||||
// to stop working with swarm mode. This patch removes the architecture
|
||||
// constraint for arm images to ensure tasks get scheduled.
|
||||
arch := strings.ToLower(p.Architecture)
|
||||
if arch == "arm" {
|
||||
arch = ""
|
||||
}
|
||||
platforms = append(platforms, swarm.Platform{
|
||||
Architecture: p.Architecture,
|
||||
OS: p.OS,
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
// +build go1.8
|
||||
|
||||
package client
|
||||
|
||||
import "crypto/tls"
|
||||
|
||||
// tlsConfigClone returns a clone of tls.Config. This function is provided for
|
||||
// compatibility for go1.7 that doesn't include this method in stdlib.
|
||||
func tlsConfigClone(c *tls.Config) *tls.Config {
|
||||
return c.Clone()
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
// +build go1.7,!go1.8
|
||||
|
||||
package tlsconfig
|
||||
package client
|
||||
|
||||
import "crypto/tls"
|
||||
|
||||
// Clone returns a clone of tls.Config. This function is provided for
|
||||
// tlsConfigClone returns a clone of tls.Config. This function is provided for
|
||||
// compatibility for go1.7 that doesn't include this method in stdlib.
|
||||
func Clone(c *tls.Config) *tls.Config {
|
||||
func tlsConfigClone(c *tls.Config) *tls.Config {
|
||||
return &tls.Config{
|
||||
Rand: c.Rand,
|
||||
Time: c.Time,
|
|
@ -50,8 +50,8 @@ func setHeaderForSpecialDevice(hdr *tar.Header, name string, stat interface{}) (
|
|||
// Currently go does not fill in the major/minors
|
||||
if s.Mode&unix.S_IFBLK != 0 ||
|
||||
s.Mode&unix.S_IFCHR != 0 {
|
||||
hdr.Devmajor = int64(major(uint64(s.Rdev)))
|
||||
hdr.Devminor = int64(minor(uint64(s.Rdev)))
|
||||
hdr.Devmajor = int64(major(uint64(s.Rdev))) // nolint: unconvert
|
||||
hdr.Devminor = int64(minor(uint64(s.Rdev))) // nolint: unconvert
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ func getInodeFromStat(stat interface{}) (inode uint64, err error) {
|
|||
s, ok := stat.(*syscall.Stat_t)
|
||||
|
||||
if ok {
|
||||
inode = uint64(s.Ino)
|
||||
inode = s.Ino
|
||||
}
|
||||
|
||||
return
|
||||
|
|
|
@ -294,7 +294,7 @@ func OverlayChanges(layers []string, rw string) ([]Change, error) {
|
|||
func overlayDeletedFile(root, path string, fi os.FileInfo) (string, error) {
|
||||
if fi.Mode()&os.ModeCharDevice != 0 {
|
||||
s := fi.Sys().(*syscall.Stat_t)
|
||||
if major(uint64(s.Rdev)) == 0 && minor(uint64(s.Rdev)) == 0 {
|
||||
if major(s.Rdev) == 0 && minor(s.Rdev) == 0 {
|
||||
return path, nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ func (info *FileInfo) isDir() bool {
|
|||
}
|
||||
|
||||
func getIno(fi os.FileInfo) uint64 {
|
||||
return uint64(fi.Sys().(*syscall.Stat_t).Ino)
|
||||
return fi.Sys().(*syscall.Stat_t).Ino
|
||||
}
|
||||
|
||||
func hasHardlinks(fi os.FileInfo) bool {
|
||||
|
|
|
@ -5,10 +5,10 @@ import "syscall"
|
|||
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
||||
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
||||
return &StatT{size: s.Size,
|
||||
mode: uint32(s.Mode),
|
||||
mode: s.Mode,
|
||||
uid: s.Uid,
|
||||
gid: s.Gid,
|
||||
rdev: uint64(s.Rdev),
|
||||
rdev: s.Rdev,
|
||||
mtim: s.Mtim}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ next:
|
|||
return nil, fmt.Errorf("Unknown character: '%s'", key)
|
||||
}
|
||||
} else {
|
||||
codes = append(codes, byte(key[0]))
|
||||
codes = append(codes, key[0])
|
||||
}
|
||||
}
|
||||
return codes, nil
|
||||
|
|
|
@ -3,28 +3,18 @@
|
|||
package term
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// GetWinsize returns the window size based on the specified file descriptor.
|
||||
func GetWinsize(fd uintptr) (*Winsize, error) {
|
||||
ws := &Winsize{}
|
||||
_, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(unix.TIOCGWINSZ), uintptr(unsafe.Pointer(ws)))
|
||||
// Skipp errno = 0
|
||||
if err == 0 {
|
||||
return ws, nil
|
||||
}
|
||||
uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ)
|
||||
ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel}
|
||||
return ws, err
|
||||
}
|
||||
|
||||
// SetWinsize tries to set the specified window size for the specified file descriptor.
|
||||
func SetWinsize(fd uintptr, ws *Winsize) error {
|
||||
_, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(unix.TIOCSWINSZ), uintptr(unsafe.Pointer(ws)))
|
||||
// Skipp errno = 0
|
||||
if err == 0 {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
uws := &unix.Winsize{Row: ws.Height, Col: ws.Width, Xpixel: ws.x, Ypixel: ws.y}
|
||||
return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, uws)
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
// +build go1.8
|
||||
|
||||
package tlsconfig
|
||||
|
||||
import "crypto/tls"
|
||||
|
||||
// Clone returns a clone of tls.Config. This function is provided for
|
||||
// compatibility for go1.7 that doesn't include this method in stdlib.
|
||||
func Clone(c *tls.Config) *tls.Config {
|
||||
return c.Clone()
|
||||
}
|
|
@ -247,6 +247,7 @@ func (err PingResponseError) Error() string {
|
|||
// challenge manager for the supported authentication types and
|
||||
// whether v2 was confirmed by the response. If a response is received but
|
||||
// cannot be interpreted a PingResponseError will be returned.
|
||||
// nolint: interfacer
|
||||
func PingV2Registry(endpoint *url.URL, transport http.RoundTripper) (challenge.Manager, bool, error) {
|
||||
var (
|
||||
foundV2 = false
|
||||
|
|
|
@ -28,7 +28,7 @@ github.com/imdario/mergo 0.2.1
|
|||
golang.org/x/sync de49d9dcd27d4f764488181bea099dfe6179bcf0
|
||||
|
||||
#get libnetwork packages
|
||||
github.com/docker/libnetwork 5b28c0ec98236c489e39ae6a9e1aeb802e071681
|
||||
github.com/docker/libnetwork d5c822319097cc01cc9bd5ffedd74c7ce7c894f2
|
||||
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
|
||||
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
|
||||
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
|
||||
|
|
|
@ -1,191 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Copyright 2014 Docker, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,18 +0,0 @@
|
|||
# libtrust
|
||||
|
||||
Libtrust is library for managing authentication and authorization using public key cryptography.
|
||||
|
||||
Authentication is handled using the identity attached to the public key.
|
||||
Libtrust provides multiple methods to prove possession of the private key associated with an identity.
|
||||
- TLS x509 certificates
|
||||
- Signature verification
|
||||
- Key Challenge
|
||||
|
||||
Authorization and access control is managed through a distributed trust graph.
|
||||
Trust servers are used as the authorities of the trust graph and allow caching portions of the graph for faster access.
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Code and documentation copyright 2014 Docker, inc. Code released under the Apache 2.0 license.
|
||||
Docs released under Creative commons.
|
||||
|
|
@ -1,175 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"math/big"
|
||||
"net"
|
||||
"time"
|
||||
)
|
||||
|
||||
type certTemplateInfo struct {
|
||||
commonName string
|
||||
domains []string
|
||||
ipAddresses []net.IP
|
||||
isCA bool
|
||||
clientAuth bool
|
||||
serverAuth bool
|
||||
}
|
||||
|
||||
func generateCertTemplate(info *certTemplateInfo) *x509.Certificate {
|
||||
// Generate a certificate template which is valid from the past week to
|
||||
// 10 years from now. The usage of the certificate depends on the
|
||||
// specified fields in the given certTempInfo object.
|
||||
var (
|
||||
keyUsage x509.KeyUsage
|
||||
extKeyUsage []x509.ExtKeyUsage
|
||||
)
|
||||
|
||||
if info.isCA {
|
||||
keyUsage = x509.KeyUsageCertSign
|
||||
}
|
||||
|
||||
if info.clientAuth {
|
||||
extKeyUsage = append(extKeyUsage, x509.ExtKeyUsageClientAuth)
|
||||
}
|
||||
|
||||
if info.serverAuth {
|
||||
extKeyUsage = append(extKeyUsage, x509.ExtKeyUsageServerAuth)
|
||||
}
|
||||
|
||||
return &x509.Certificate{
|
||||
SerialNumber: big.NewInt(0),
|
||||
Subject: pkix.Name{
|
||||
CommonName: info.commonName,
|
||||
},
|
||||
NotBefore: time.Now().Add(-time.Hour * 24 * 7),
|
||||
NotAfter: time.Now().Add(time.Hour * 24 * 365 * 10),
|
||||
DNSNames: info.domains,
|
||||
IPAddresses: info.ipAddresses,
|
||||
IsCA: info.isCA,
|
||||
KeyUsage: keyUsage,
|
||||
ExtKeyUsage: extKeyUsage,
|
||||
BasicConstraintsValid: info.isCA,
|
||||
}
|
||||
}
|
||||
|
||||
func generateCert(pub PublicKey, priv PrivateKey, subInfo, issInfo *certTemplateInfo) (cert *x509.Certificate, err error) {
|
||||
pubCertTemplate := generateCertTemplate(subInfo)
|
||||
privCertTemplate := generateCertTemplate(issInfo)
|
||||
|
||||
certDER, err := x509.CreateCertificate(
|
||||
rand.Reader, pubCertTemplate, privCertTemplate,
|
||||
pub.CryptoPublicKey(), priv.CryptoPrivateKey(),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create certificate: %s", err)
|
||||
}
|
||||
|
||||
cert, err = x509.ParseCertificate(certDER)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse certificate: %s", err)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GenerateSelfSignedServerCert creates a self-signed certificate for the
|
||||
// given key which is to be used for TLS servers with the given domains and
|
||||
// IP addresses.
|
||||
func GenerateSelfSignedServerCert(key PrivateKey, domains []string, ipAddresses []net.IP) (*x509.Certificate, error) {
|
||||
info := &certTemplateInfo{
|
||||
commonName: key.KeyID(),
|
||||
domains: domains,
|
||||
ipAddresses: ipAddresses,
|
||||
serverAuth: true,
|
||||
}
|
||||
|
||||
return generateCert(key.PublicKey(), key, info, info)
|
||||
}
|
||||
|
||||
// GenerateSelfSignedClientCert creates a self-signed certificate for the
|
||||
// given key which is to be used for TLS clients.
|
||||
func GenerateSelfSignedClientCert(key PrivateKey) (*x509.Certificate, error) {
|
||||
info := &certTemplateInfo{
|
||||
commonName: key.KeyID(),
|
||||
clientAuth: true,
|
||||
}
|
||||
|
||||
return generateCert(key.PublicKey(), key, info, info)
|
||||
}
|
||||
|
||||
// GenerateCACert creates a certificate which can be used as a trusted
|
||||
// certificate authority.
|
||||
func GenerateCACert(signer PrivateKey, trustedKey PublicKey) (*x509.Certificate, error) {
|
||||
subjectInfo := &certTemplateInfo{
|
||||
commonName: trustedKey.KeyID(),
|
||||
isCA: true,
|
||||
}
|
||||
issuerInfo := &certTemplateInfo{
|
||||
commonName: signer.KeyID(),
|
||||
}
|
||||
|
||||
return generateCert(trustedKey, signer, subjectInfo, issuerInfo)
|
||||
}
|
||||
|
||||
// GenerateCACertPool creates a certificate authority pool to be used for a
|
||||
// TLS configuration. Any self-signed certificates issued by the specified
|
||||
// trusted keys will be verified during a TLS handshake
|
||||
func GenerateCACertPool(signer PrivateKey, trustedKeys []PublicKey) (*x509.CertPool, error) {
|
||||
certPool := x509.NewCertPool()
|
||||
|
||||
for _, trustedKey := range trustedKeys {
|
||||
cert, err := GenerateCACert(signer, trustedKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to generate CA certificate: %s", err)
|
||||
}
|
||||
|
||||
certPool.AddCert(cert)
|
||||
}
|
||||
|
||||
return certPool, nil
|
||||
}
|
||||
|
||||
// LoadCertificateBundle loads certificates from the given file. The file should be pem encoded
|
||||
// containing one or more certificates. The expected pem type is "CERTIFICATE".
|
||||
func LoadCertificateBundle(filename string) ([]*x509.Certificate, error) {
|
||||
b, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
certificates := []*x509.Certificate{}
|
||||
var block *pem.Block
|
||||
block, b = pem.Decode(b)
|
||||
for ; block != nil; block, b = pem.Decode(b) {
|
||||
if block.Type == "CERTIFICATE" {
|
||||
cert, err := x509.ParseCertificate(block.Bytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
certificates = append(certificates, cert)
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid pem block type: %s", block.Type)
|
||||
}
|
||||
}
|
||||
|
||||
return certificates, nil
|
||||
}
|
||||
|
||||
// LoadCertificatePool loads a CA pool from the given file. The file should be pem encoded
|
||||
// containing one or more certificates. The expected pem type is "CERTIFICATE".
|
||||
func LoadCertificatePool(filename string) (*x509.CertPool, error) {
|
||||
certs, err := LoadCertificateBundle(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pool := x509.NewCertPool()
|
||||
for _, cert := range certs {
|
||||
pool.AddCert(cert)
|
||||
}
|
||||
return pool, nil
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
Package libtrust provides an interface for managing authentication and
|
||||
authorization using public key cryptography. Authentication is handled
|
||||
using the identity attached to the public key and verified through TLS
|
||||
x509 certificates, a key challenge, or signature. Authorization and
|
||||
access control is managed through a trust graph distributed between
|
||||
both remote trust servers and locally cached and managed data.
|
||||
*/
|
||||
package libtrust
|
|
@ -1,428 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"crypto/ecdsa"
|
||||
"crypto/elliptic"
|
||||
"crypto/rand"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
/*
|
||||
* EC DSA PUBLIC KEY
|
||||
*/
|
||||
|
||||
// ecPublicKey implements a libtrust.PublicKey using elliptic curve digital
|
||||
// signature algorithms.
|
||||
type ecPublicKey struct {
|
||||
*ecdsa.PublicKey
|
||||
curveName string
|
||||
signatureAlgorithm *signatureAlgorithm
|
||||
extended map[string]interface{}
|
||||
}
|
||||
|
||||
func fromECPublicKey(cryptoPublicKey *ecdsa.PublicKey) (*ecPublicKey, error) {
|
||||
curve := cryptoPublicKey.Curve
|
||||
|
||||
switch {
|
||||
case curve == elliptic.P256():
|
||||
return &ecPublicKey{cryptoPublicKey, "P-256", es256, map[string]interface{}{}}, nil
|
||||
case curve == elliptic.P384():
|
||||
return &ecPublicKey{cryptoPublicKey, "P-384", es384, map[string]interface{}{}}, nil
|
||||
case curve == elliptic.P521():
|
||||
return &ecPublicKey{cryptoPublicKey, "P-521", es512, map[string]interface{}{}}, nil
|
||||
default:
|
||||
return nil, errors.New("unsupported elliptic curve")
|
||||
}
|
||||
}
|
||||
|
||||
// KeyType returns the key type for elliptic curve keys, i.e., "EC".
|
||||
func (k *ecPublicKey) KeyType() string {
|
||||
return "EC"
|
||||
}
|
||||
|
||||
// CurveName returns the elliptic curve identifier.
|
||||
// Possible values are "P-256", "P-384", and "P-521".
|
||||
func (k *ecPublicKey) CurveName() string {
|
||||
return k.curveName
|
||||
}
|
||||
|
||||
// KeyID returns a distinct identifier which is unique to this Public Key.
|
||||
func (k *ecPublicKey) KeyID() string {
|
||||
return keyIDFromCryptoKey(k)
|
||||
}
|
||||
|
||||
func (k *ecPublicKey) String() string {
|
||||
return fmt.Sprintf("EC Public Key <%s>", k.KeyID())
|
||||
}
|
||||
|
||||
// Verify verifyies the signature of the data in the io.Reader using this
|
||||
// PublicKey. The alg parameter should identify the digital signature
|
||||
// algorithm which was used to produce the signature and should be supported
|
||||
// by this public key. Returns a nil error if the signature is valid.
|
||||
func (k *ecPublicKey) Verify(data io.Reader, alg string, signature []byte) error {
|
||||
// For EC keys there is only one supported signature algorithm depending
|
||||
// on the curve parameters.
|
||||
if k.signatureAlgorithm.HeaderParam() != alg {
|
||||
return fmt.Errorf("unable to verify signature: EC Public Key with curve %q does not support signature algorithm %q", k.curveName, alg)
|
||||
}
|
||||
|
||||
// signature is the concatenation of (r, s), base64Url encoded.
|
||||
sigLength := len(signature)
|
||||
expectedOctetLength := 2 * ((k.Params().BitSize + 7) >> 3)
|
||||
if sigLength != expectedOctetLength {
|
||||
return fmt.Errorf("signature length is %d octets long, should be %d", sigLength, expectedOctetLength)
|
||||
}
|
||||
|
||||
rBytes, sBytes := signature[:sigLength/2], signature[sigLength/2:]
|
||||
r := new(big.Int).SetBytes(rBytes)
|
||||
s := new(big.Int).SetBytes(sBytes)
|
||||
|
||||
hasher := k.signatureAlgorithm.HashID().New()
|
||||
_, err := io.Copy(hasher, data)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error reading data to sign: %s", err)
|
||||
}
|
||||
hash := hasher.Sum(nil)
|
||||
|
||||
if !ecdsa.Verify(k.PublicKey, hash, r, s) {
|
||||
return errors.New("invalid signature")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CryptoPublicKey returns the internal object which can be used as a
|
||||
// crypto.PublicKey for use with other standard library operations. The type
|
||||
// is either *rsa.PublicKey or *ecdsa.PublicKey
|
||||
func (k *ecPublicKey) CryptoPublicKey() crypto.PublicKey {
|
||||
return k.PublicKey
|
||||
}
|
||||
|
||||
func (k *ecPublicKey) toMap() map[string]interface{} {
|
||||
jwk := make(map[string]interface{})
|
||||
for k, v := range k.extended {
|
||||
jwk[k] = v
|
||||
}
|
||||
jwk["kty"] = k.KeyType()
|
||||
jwk["kid"] = k.KeyID()
|
||||
jwk["crv"] = k.CurveName()
|
||||
|
||||
xBytes := k.X.Bytes()
|
||||
yBytes := k.Y.Bytes()
|
||||
octetLength := (k.Params().BitSize + 7) >> 3
|
||||
// MUST include leading zeros in the output so that x, y are each
|
||||
// *octetLength* bytes long.
|
||||
xBuf := make([]byte, octetLength-len(xBytes), octetLength)
|
||||
yBuf := make([]byte, octetLength-len(yBytes), octetLength)
|
||||
xBuf = append(xBuf, xBytes...)
|
||||
yBuf = append(yBuf, yBytes...)
|
||||
|
||||
jwk["x"] = joseBase64UrlEncode(xBuf)
|
||||
jwk["y"] = joseBase64UrlEncode(yBuf)
|
||||
|
||||
return jwk
|
||||
}
|
||||
|
||||
// MarshalJSON serializes this Public Key using the JWK JSON serialization format for
|
||||
// elliptic curve keys.
|
||||
func (k *ecPublicKey) MarshalJSON() (data []byte, err error) {
|
||||
return json.Marshal(k.toMap())
|
||||
}
|
||||
|
||||
// PEMBlock serializes this Public Key to DER-encoded PKIX format.
|
||||
func (k *ecPublicKey) PEMBlock() (*pem.Block, error) {
|
||||
derBytes, err := x509.MarshalPKIXPublicKey(k.PublicKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to serialize EC PublicKey to DER-encoded PKIX format: %s", err)
|
||||
}
|
||||
k.extended["kid"] = k.KeyID() // For display purposes.
|
||||
return createPemBlock("PUBLIC KEY", derBytes, k.extended)
|
||||
}
|
||||
|
||||
func (k *ecPublicKey) AddExtendedField(field string, value interface{}) {
|
||||
k.extended[field] = value
|
||||
}
|
||||
|
||||
func (k *ecPublicKey) GetExtendedField(field string) interface{} {
|
||||
v, ok := k.extended[field]
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
func ecPublicKeyFromMap(jwk map[string]interface{}) (*ecPublicKey, error) {
|
||||
// JWK key type (kty) has already been determined to be "EC".
|
||||
// Need to extract 'crv', 'x', 'y', and 'kid' and check for
|
||||
// consistency.
|
||||
|
||||
// Get the curve identifier value.
|
||||
crv, err := stringFromMap(jwk, "crv")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Public Key curve identifier: %s", err)
|
||||
}
|
||||
|
||||
var (
|
||||
curve elliptic.Curve
|
||||
sigAlg *signatureAlgorithm
|
||||
)
|
||||
|
||||
switch {
|
||||
case crv == "P-256":
|
||||
curve = elliptic.P256()
|
||||
sigAlg = es256
|
||||
case crv == "P-384":
|
||||
curve = elliptic.P384()
|
||||
sigAlg = es384
|
||||
case crv == "P-521":
|
||||
curve = elliptic.P521()
|
||||
sigAlg = es512
|
||||
default:
|
||||
return nil, fmt.Errorf("JWK EC Public Key curve identifier not supported: %q\n", crv)
|
||||
}
|
||||
|
||||
// Get the X and Y coordinates for the public key point.
|
||||
xB64Url, err := stringFromMap(jwk, "x")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Public Key x-coordinate: %s", err)
|
||||
}
|
||||
x, err := parseECCoordinate(xB64Url, curve)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Public Key x-coordinate: %s", err)
|
||||
}
|
||||
|
||||
yB64Url, err := stringFromMap(jwk, "y")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Public Key y-coordinate: %s", err)
|
||||
}
|
||||
y, err := parseECCoordinate(yB64Url, curve)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Public Key y-coordinate: %s", err)
|
||||
}
|
||||
|
||||
key := &ecPublicKey{
|
||||
PublicKey: &ecdsa.PublicKey{Curve: curve, X: x, Y: y},
|
||||
curveName: crv, signatureAlgorithm: sigAlg,
|
||||
}
|
||||
|
||||
// Key ID is optional too, but if it exists, it should match the key.
|
||||
_, ok := jwk["kid"]
|
||||
if ok {
|
||||
kid, err := stringFromMap(jwk, "kid")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Public Key ID: %s", err)
|
||||
}
|
||||
if kid != key.KeyID() {
|
||||
return nil, fmt.Errorf("JWK EC Public Key ID does not match: %s", kid)
|
||||
}
|
||||
}
|
||||
|
||||
key.extended = jwk
|
||||
|
||||
return key, nil
|
||||
}
|
||||
|
||||
/*
|
||||
* EC DSA PRIVATE KEY
|
||||
*/
|
||||
|
||||
// ecPrivateKey implements a JWK Private Key using elliptic curve digital signature
|
||||
// algorithms.
|
||||
type ecPrivateKey struct {
|
||||
ecPublicKey
|
||||
*ecdsa.PrivateKey
|
||||
}
|
||||
|
||||
func fromECPrivateKey(cryptoPrivateKey *ecdsa.PrivateKey) (*ecPrivateKey, error) {
|
||||
publicKey, err := fromECPublicKey(&cryptoPrivateKey.PublicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &ecPrivateKey{*publicKey, cryptoPrivateKey}, nil
|
||||
}
|
||||
|
||||
// PublicKey returns the Public Key data associated with this Private Key.
|
||||
func (k *ecPrivateKey) PublicKey() PublicKey {
|
||||
return &k.ecPublicKey
|
||||
}
|
||||
|
||||
func (k *ecPrivateKey) String() string {
|
||||
return fmt.Sprintf("EC Private Key <%s>", k.KeyID())
|
||||
}
|
||||
|
||||
// Sign signs the data read from the io.Reader using a signature algorithm supported
|
||||
// by the elliptic curve private key. If the specified hashing algorithm is
|
||||
// supported by this key, that hash function is used to generate the signature
|
||||
// otherwise the the default hashing algorithm for this key is used. Returns
|
||||
// the signature and the name of the JWK signature algorithm used, e.g.,
|
||||
// "ES256", "ES384", "ES512".
|
||||
func (k *ecPrivateKey) Sign(data io.Reader, hashID crypto.Hash) (signature []byte, alg string, err error) {
|
||||
// Generate a signature of the data using the internal alg.
|
||||
// The given hashId is only a suggestion, and since EC keys only support
|
||||
// on signature/hash algorithm given the curve name, we disregard it for
|
||||
// the elliptic curve JWK signature implementation.
|
||||
hasher := k.signatureAlgorithm.HashID().New()
|
||||
_, err = io.Copy(hasher, data)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("error reading data to sign: %s", err)
|
||||
}
|
||||
hash := hasher.Sum(nil)
|
||||
|
||||
r, s, err := ecdsa.Sign(rand.Reader, k.PrivateKey, hash)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("error producing signature: %s", err)
|
||||
}
|
||||
rBytes, sBytes := r.Bytes(), s.Bytes()
|
||||
octetLength := (k.ecPublicKey.Params().BitSize + 7) >> 3
|
||||
// MUST include leading zeros in the output
|
||||
rBuf := make([]byte, octetLength-len(rBytes), octetLength)
|
||||
sBuf := make([]byte, octetLength-len(sBytes), octetLength)
|
||||
|
||||
rBuf = append(rBuf, rBytes...)
|
||||
sBuf = append(sBuf, sBytes...)
|
||||
|
||||
signature = append(rBuf, sBuf...)
|
||||
alg = k.signatureAlgorithm.HeaderParam()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// CryptoPrivateKey returns the internal object which can be used as a
|
||||
// crypto.PublicKey for use with other standard library operations. The type
|
||||
// is either *rsa.PublicKey or *ecdsa.PublicKey
|
||||
func (k *ecPrivateKey) CryptoPrivateKey() crypto.PrivateKey {
|
||||
return k.PrivateKey
|
||||
}
|
||||
|
||||
func (k *ecPrivateKey) toMap() map[string]interface{} {
|
||||
jwk := k.ecPublicKey.toMap()
|
||||
|
||||
dBytes := k.D.Bytes()
|
||||
// The length of this octet string MUST be ceiling(log-base-2(n)/8)
|
||||
// octets (where n is the order of the curve). This is because the private
|
||||
// key d must be in the interval [1, n-1] so the bitlength of d should be
|
||||
// no larger than the bitlength of n-1. The easiest way to find the octet
|
||||
// length is to take bitlength(n-1), add 7 to force a carry, and shift this
|
||||
// bit sequence right by 3, which is essentially dividing by 8 and adding
|
||||
// 1 if there is any remainder. Thus, the private key value d should be
|
||||
// output to (bitlength(n-1)+7)>>3 octets.
|
||||
n := k.ecPublicKey.Params().N
|
||||
octetLength := (new(big.Int).Sub(n, big.NewInt(1)).BitLen() + 7) >> 3
|
||||
// Create a buffer with the necessary zero-padding.
|
||||
dBuf := make([]byte, octetLength-len(dBytes), octetLength)
|
||||
dBuf = append(dBuf, dBytes...)
|
||||
|
||||
jwk["d"] = joseBase64UrlEncode(dBuf)
|
||||
|
||||
return jwk
|
||||
}
|
||||
|
||||
// MarshalJSON serializes this Private Key using the JWK JSON serialization format for
|
||||
// elliptic curve keys.
|
||||
func (k *ecPrivateKey) MarshalJSON() (data []byte, err error) {
|
||||
return json.Marshal(k.toMap())
|
||||
}
|
||||
|
||||
// PEMBlock serializes this Private Key to DER-encoded PKIX format.
|
||||
func (k *ecPrivateKey) PEMBlock() (*pem.Block, error) {
|
||||
derBytes, err := x509.MarshalECPrivateKey(k.PrivateKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to serialize EC PrivateKey to DER-encoded PKIX format: %s", err)
|
||||
}
|
||||
k.extended["keyID"] = k.KeyID() // For display purposes.
|
||||
return createPemBlock("EC PRIVATE KEY", derBytes, k.extended)
|
||||
}
|
||||
|
||||
func ecPrivateKeyFromMap(jwk map[string]interface{}) (*ecPrivateKey, error) {
|
||||
dB64Url, err := stringFromMap(jwk, "d")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Private Key: %s", err)
|
||||
}
|
||||
|
||||
// JWK key type (kty) has already been determined to be "EC".
|
||||
// Need to extract the public key information, then extract the private
|
||||
// key value 'd'.
|
||||
publicKey, err := ecPublicKeyFromMap(jwk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
d, err := parseECPrivateParam(dB64Url, publicKey.Curve)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK EC Private Key d-param: %s", err)
|
||||
}
|
||||
|
||||
key := &ecPrivateKey{
|
||||
ecPublicKey: *publicKey,
|
||||
PrivateKey: &ecdsa.PrivateKey{
|
||||
PublicKey: *publicKey.PublicKey,
|
||||
D: d,
|
||||
},
|
||||
}
|
||||
|
||||
return key, nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Key Generation Functions.
|
||||
*/
|
||||
|
||||
func generateECPrivateKey(curve elliptic.Curve) (k *ecPrivateKey, err error) {
|
||||
k = new(ecPrivateKey)
|
||||
k.PrivateKey, err = ecdsa.GenerateKey(curve, rand.Reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
k.ecPublicKey.PublicKey = &k.PrivateKey.PublicKey
|
||||
k.extended = make(map[string]interface{})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GenerateECP256PrivateKey generates a key pair using elliptic curve P-256.
|
||||
func GenerateECP256PrivateKey() (PrivateKey, error) {
|
||||
k, err := generateECPrivateKey(elliptic.P256())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating EC P-256 key: %s", err)
|
||||
}
|
||||
|
||||
k.curveName = "P-256"
|
||||
k.signatureAlgorithm = es256
|
||||
|
||||
return k, nil
|
||||
}
|
||||
|
||||
// GenerateECP384PrivateKey generates a key pair using elliptic curve P-384.
|
||||
func GenerateECP384PrivateKey() (PrivateKey, error) {
|
||||
k, err := generateECPrivateKey(elliptic.P384())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating EC P-384 key: %s", err)
|
||||
}
|
||||
|
||||
k.curveName = "P-384"
|
||||
k.signatureAlgorithm = es384
|
||||
|
||||
return k, nil
|
||||
}
|
||||
|
||||
// GenerateECP521PrivateKey generates aß key pair using elliptic curve P-521.
|
||||
func GenerateECP521PrivateKey() (PrivateKey, error) {
|
||||
k, err := generateECPrivateKey(elliptic.P521())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating EC P-521 key: %s", err)
|
||||
}
|
||||
|
||||
k.curveName = "P-521"
|
||||
k.signatureAlgorithm = es512
|
||||
|
||||
return k, nil
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// FilterByHosts filters the list of PublicKeys to only those which contain a
|
||||
// 'hosts' pattern which matches the given host. If *includeEmpty* is true,
|
||||
// then keys which do not specify any hosts are also returned.
|
||||
func FilterByHosts(keys []PublicKey, host string, includeEmpty bool) ([]PublicKey, error) {
|
||||
filtered := make([]PublicKey, 0, len(keys))
|
||||
|
||||
for _, pubKey := range keys {
|
||||
var hosts []string
|
||||
switch v := pubKey.GetExtendedField("hosts").(type) {
|
||||
case []string:
|
||||
hosts = v
|
||||
case []interface{}:
|
||||
for _, value := range v {
|
||||
h, ok := value.(string)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
hosts = append(hosts, h)
|
||||
}
|
||||
}
|
||||
|
||||
if len(hosts) == 0 {
|
||||
if includeEmpty {
|
||||
filtered = append(filtered, pubKey)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// Check if any hosts match pattern
|
||||
for _, hostPattern := range hosts {
|
||||
match, err := filepath.Match(hostPattern, host)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if match {
|
||||
filtered = append(filtered, pubKey)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return filtered, nil
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
_ "crypto/sha256" // Registrer SHA224 and SHA256
|
||||
_ "crypto/sha512" // Registrer SHA384 and SHA512
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type signatureAlgorithm struct {
|
||||
algHeaderParam string
|
||||
hashID crypto.Hash
|
||||
}
|
||||
|
||||
func (h *signatureAlgorithm) HeaderParam() string {
|
||||
return h.algHeaderParam
|
||||
}
|
||||
|
||||
func (h *signatureAlgorithm) HashID() crypto.Hash {
|
||||
return h.hashID
|
||||
}
|
||||
|
||||
var (
|
||||
rs256 = &signatureAlgorithm{"RS256", crypto.SHA256}
|
||||
rs384 = &signatureAlgorithm{"RS384", crypto.SHA384}
|
||||
rs512 = &signatureAlgorithm{"RS512", crypto.SHA512}
|
||||
es256 = &signatureAlgorithm{"ES256", crypto.SHA256}
|
||||
es384 = &signatureAlgorithm{"ES384", crypto.SHA384}
|
||||
es512 = &signatureAlgorithm{"ES512", crypto.SHA512}
|
||||
)
|
||||
|
||||
func rsaSignatureAlgorithmByName(alg string) (*signatureAlgorithm, error) {
|
||||
switch {
|
||||
case alg == "RS256":
|
||||
return rs256, nil
|
||||
case alg == "RS384":
|
||||
return rs384, nil
|
||||
case alg == "RS512":
|
||||
return rs512, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("RSA Digital Signature Algorithm %q not supported", alg)
|
||||
}
|
||||
}
|
||||
|
||||
func rsaPKCS1v15SignatureAlgorithmForHashID(hashID crypto.Hash) *signatureAlgorithm {
|
||||
switch {
|
||||
case hashID == crypto.SHA512:
|
||||
return rs512
|
||||
case hashID == crypto.SHA384:
|
||||
return rs384
|
||||
case hashID == crypto.SHA256:
|
||||
fallthrough
|
||||
default:
|
||||
return rs256
|
||||
}
|
||||
}
|
|
@ -1,657 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/x509"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sort"
|
||||
"time"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrInvalidSignContent is used when the content to be signed is invalid.
|
||||
ErrInvalidSignContent = errors.New("invalid sign content")
|
||||
|
||||
// ErrInvalidJSONContent is used when invalid json is encountered.
|
||||
ErrInvalidJSONContent = errors.New("invalid json content")
|
||||
|
||||
// ErrMissingSignatureKey is used when the specified signature key
|
||||
// does not exist in the JSON content.
|
||||
ErrMissingSignatureKey = errors.New("missing signature key")
|
||||
)
|
||||
|
||||
type jsHeader struct {
|
||||
JWK PublicKey `json:"jwk,omitempty"`
|
||||
Algorithm string `json:"alg"`
|
||||
Chain []string `json:"x5c,omitempty"`
|
||||
}
|
||||
|
||||
type jsSignature struct {
|
||||
Header jsHeader `json:"header"`
|
||||
Signature string `json:"signature"`
|
||||
Protected string `json:"protected,omitempty"`
|
||||
}
|
||||
|
||||
type jsSignaturesSorted []jsSignature
|
||||
|
||||
func (jsbkid jsSignaturesSorted) Swap(i, j int) { jsbkid[i], jsbkid[j] = jsbkid[j], jsbkid[i] }
|
||||
func (jsbkid jsSignaturesSorted) Len() int { return len(jsbkid) }
|
||||
|
||||
func (jsbkid jsSignaturesSorted) Less(i, j int) bool {
|
||||
ki, kj := jsbkid[i].Header.JWK.KeyID(), jsbkid[j].Header.JWK.KeyID()
|
||||
si, sj := jsbkid[i].Signature, jsbkid[j].Signature
|
||||
|
||||
if ki == kj {
|
||||
return si < sj
|
||||
}
|
||||
|
||||
return ki < kj
|
||||
}
|
||||
|
||||
type signKey struct {
|
||||
PrivateKey
|
||||
Chain []*x509.Certificate
|
||||
}
|
||||
|
||||
// JSONSignature represents a signature of a json object.
|
||||
type JSONSignature struct {
|
||||
payload string
|
||||
signatures []jsSignature
|
||||
indent string
|
||||
formatLength int
|
||||
formatTail []byte
|
||||
}
|
||||
|
||||
func newJSONSignature() *JSONSignature {
|
||||
return &JSONSignature{
|
||||
signatures: make([]jsSignature, 0, 1),
|
||||
}
|
||||
}
|
||||
|
||||
// Payload returns the encoded payload of the signature. This
|
||||
// payload should not be signed directly
|
||||
func (js *JSONSignature) Payload() ([]byte, error) {
|
||||
return joseBase64UrlDecode(js.payload)
|
||||
}
|
||||
|
||||
func (js *JSONSignature) protectedHeader() (string, error) {
|
||||
protected := map[string]interface{}{
|
||||
"formatLength": js.formatLength,
|
||||
"formatTail": joseBase64UrlEncode(js.formatTail),
|
||||
"time": time.Now().UTC().Format(time.RFC3339),
|
||||
}
|
||||
protectedBytes, err := json.Marshal(protected)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return joseBase64UrlEncode(protectedBytes), nil
|
||||
}
|
||||
|
||||
func (js *JSONSignature) signBytes(protectedHeader string) ([]byte, error) {
|
||||
buf := make([]byte, len(js.payload)+len(protectedHeader)+1)
|
||||
copy(buf, protectedHeader)
|
||||
buf[len(protectedHeader)] = '.'
|
||||
copy(buf[len(protectedHeader)+1:], js.payload)
|
||||
return buf, nil
|
||||
}
|
||||
|
||||
// Sign adds a signature using the given private key.
|
||||
func (js *JSONSignature) Sign(key PrivateKey) error {
|
||||
protected, err := js.protectedHeader()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
signBytes, err := js.signBytes(protected)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sigBytes, algorithm, err := key.Sign(bytes.NewReader(signBytes), crypto.SHA256)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
js.signatures = append(js.signatures, jsSignature{
|
||||
Header: jsHeader{
|
||||
JWK: key.PublicKey(),
|
||||
Algorithm: algorithm,
|
||||
},
|
||||
Signature: joseBase64UrlEncode(sigBytes),
|
||||
Protected: protected,
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SignWithChain adds a signature using the given private key
|
||||
// and setting the x509 chain. The public key of the first element
|
||||
// in the chain must be the public key corresponding with the sign key.
|
||||
func (js *JSONSignature) SignWithChain(key PrivateKey, chain []*x509.Certificate) error {
|
||||
// Ensure key.Chain[0] is public key for key
|
||||
//key.Chain.PublicKey
|
||||
//key.PublicKey().CryptoPublicKey()
|
||||
|
||||
// Verify chain
|
||||
protected, err := js.protectedHeader()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
signBytes, err := js.signBytes(protected)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sigBytes, algorithm, err := key.Sign(bytes.NewReader(signBytes), crypto.SHA256)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
header := jsHeader{
|
||||
Chain: make([]string, len(chain)),
|
||||
Algorithm: algorithm,
|
||||
}
|
||||
|
||||
for i, cert := range chain {
|
||||
header.Chain[i] = base64.StdEncoding.EncodeToString(cert.Raw)
|
||||
}
|
||||
|
||||
js.signatures = append(js.signatures, jsSignature{
|
||||
Header: header,
|
||||
Signature: joseBase64UrlEncode(sigBytes),
|
||||
Protected: protected,
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Verify verifies all the signatures and returns the list of
|
||||
// public keys used to sign. Any x509 chains are not checked.
|
||||
func (js *JSONSignature) Verify() ([]PublicKey, error) {
|
||||
keys := make([]PublicKey, len(js.signatures))
|
||||
for i, signature := range js.signatures {
|
||||
signBytes, err := js.signBytes(signature.Protected)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var publicKey PublicKey
|
||||
if len(signature.Header.Chain) > 0 {
|
||||
certBytes, err := base64.StdEncoding.DecodeString(signature.Header.Chain[0])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cert, err := x509.ParseCertificate(certBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
publicKey, err = FromCryptoPublicKey(cert.PublicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else if signature.Header.JWK != nil {
|
||||
publicKey = signature.Header.JWK
|
||||
} else {
|
||||
return nil, errors.New("missing public key")
|
||||
}
|
||||
|
||||
sigBytes, err := joseBase64UrlDecode(signature.Signature)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = publicKey.Verify(bytes.NewReader(signBytes), signature.Header.Algorithm, sigBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
keys[i] = publicKey
|
||||
}
|
||||
return keys, nil
|
||||
}
|
||||
|
||||
// VerifyChains verifies all the signatures and the chains associated
|
||||
// with each signature and returns the list of verified chains.
|
||||
// Signatures without an x509 chain are not checked.
|
||||
func (js *JSONSignature) VerifyChains(ca *x509.CertPool) ([][]*x509.Certificate, error) {
|
||||
chains := make([][]*x509.Certificate, 0, len(js.signatures))
|
||||
for _, signature := range js.signatures {
|
||||
signBytes, err := js.signBytes(signature.Protected)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var publicKey PublicKey
|
||||
if len(signature.Header.Chain) > 0 {
|
||||
certBytes, err := base64.StdEncoding.DecodeString(signature.Header.Chain[0])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cert, err := x509.ParseCertificate(certBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
publicKey, err = FromCryptoPublicKey(cert.PublicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
intermediates := x509.NewCertPool()
|
||||
if len(signature.Header.Chain) > 1 {
|
||||
intermediateChain := signature.Header.Chain[1:]
|
||||
for i := range intermediateChain {
|
||||
certBytes, err := base64.StdEncoding.DecodeString(intermediateChain[i])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
intermediate, err := x509.ParseCertificate(certBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
intermediates.AddCert(intermediate)
|
||||
}
|
||||
}
|
||||
|
||||
verifyOptions := x509.VerifyOptions{
|
||||
Intermediates: intermediates,
|
||||
Roots: ca,
|
||||
}
|
||||
|
||||
verifiedChains, err := cert.Verify(verifyOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
chains = append(chains, verifiedChains...)
|
||||
|
||||
sigBytes, err := joseBase64UrlDecode(signature.Signature)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = publicKey.Verify(bytes.NewReader(signBytes), signature.Header.Algorithm, sigBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return chains, nil
|
||||
}
|
||||
|
||||
// JWS returns JSON serialized JWS according to
|
||||
// http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-7.2
|
||||
func (js *JSONSignature) JWS() ([]byte, error) {
|
||||
if len(js.signatures) == 0 {
|
||||
return nil, errors.New("missing signature")
|
||||
}
|
||||
|
||||
sort.Sort(jsSignaturesSorted(js.signatures))
|
||||
|
||||
jsonMap := map[string]interface{}{
|
||||
"payload": js.payload,
|
||||
"signatures": js.signatures,
|
||||
}
|
||||
|
||||
return json.MarshalIndent(jsonMap, "", " ")
|
||||
}
|
||||
|
||||
func notSpace(r rune) bool {
|
||||
return !unicode.IsSpace(r)
|
||||
}
|
||||
|
||||
func detectJSONIndent(jsonContent []byte) (indent string) {
|
||||
if len(jsonContent) > 2 && jsonContent[0] == '{' && jsonContent[1] == '\n' {
|
||||
quoteIndex := bytes.IndexRune(jsonContent[1:], '"')
|
||||
if quoteIndex > 0 {
|
||||
indent = string(jsonContent[2 : quoteIndex+1])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type jsParsedHeader struct {
|
||||
JWK json.RawMessage `json:"jwk"`
|
||||
Algorithm string `json:"alg"`
|
||||
Chain []string `json:"x5c"`
|
||||
}
|
||||
|
||||
type jsParsedSignature struct {
|
||||
Header jsParsedHeader `json:"header"`
|
||||
Signature string `json:"signature"`
|
||||
Protected string `json:"protected"`
|
||||
}
|
||||
|
||||
// ParseJWS parses a JWS serialized JSON object into a Json Signature.
|
||||
func ParseJWS(content []byte) (*JSONSignature, error) {
|
||||
type jsParsed struct {
|
||||
Payload string `json:"payload"`
|
||||
Signatures []jsParsedSignature `json:"signatures"`
|
||||
}
|
||||
parsed := &jsParsed{}
|
||||
err := json.Unmarshal(content, parsed)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(parsed.Signatures) == 0 {
|
||||
return nil, errors.New("missing signatures")
|
||||
}
|
||||
payload, err := joseBase64UrlDecode(parsed.Payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
js, err := NewJSONSignature(payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
js.signatures = make([]jsSignature, len(parsed.Signatures))
|
||||
for i, signature := range parsed.Signatures {
|
||||
header := jsHeader{
|
||||
Algorithm: signature.Header.Algorithm,
|
||||
}
|
||||
if signature.Header.Chain != nil {
|
||||
header.Chain = signature.Header.Chain
|
||||
}
|
||||
if signature.Header.JWK != nil {
|
||||
publicKey, err := UnmarshalPublicKeyJWK([]byte(signature.Header.JWK))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
header.JWK = publicKey
|
||||
}
|
||||
js.signatures[i] = jsSignature{
|
||||
Header: header,
|
||||
Signature: signature.Signature,
|
||||
Protected: signature.Protected,
|
||||
}
|
||||
}
|
||||
|
||||
return js, nil
|
||||
}
|
||||
|
||||
// NewJSONSignature returns a new unsigned JWS from a json byte array.
|
||||
// JSONSignature will need to be signed before serializing or storing.
|
||||
// Optionally, one or more signatures can be provided as byte buffers,
|
||||
// containing serialized JWS signatures, to assemble a fully signed JWS
|
||||
// package. It is the callers responsibility to ensure uniqueness of the
|
||||
// provided signatures.
|
||||
func NewJSONSignature(content []byte, signatures ...[]byte) (*JSONSignature, error) {
|
||||
var dataMap map[string]interface{}
|
||||
err := json.Unmarshal(content, &dataMap)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
js := newJSONSignature()
|
||||
js.indent = detectJSONIndent(content)
|
||||
|
||||
js.payload = joseBase64UrlEncode(content)
|
||||
|
||||
// Find trailing } and whitespace, put in protected header
|
||||
closeIndex := bytes.LastIndexFunc(content, notSpace)
|
||||
if content[closeIndex] != '}' {
|
||||
return nil, ErrInvalidJSONContent
|
||||
}
|
||||
lastRuneIndex := bytes.LastIndexFunc(content[:closeIndex], notSpace)
|
||||
if content[lastRuneIndex] == ',' {
|
||||
return nil, ErrInvalidJSONContent
|
||||
}
|
||||
js.formatLength = lastRuneIndex + 1
|
||||
js.formatTail = content[js.formatLength:]
|
||||
|
||||
if len(signatures) > 0 {
|
||||
for _, signature := range signatures {
|
||||
var parsedJSig jsParsedSignature
|
||||
|
||||
if err := json.Unmarshal(signature, &parsedJSig); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO(stevvooe): A lot of the code below is repeated in
|
||||
// ParseJWS. It will require more refactoring to fix that.
|
||||
jsig := jsSignature{
|
||||
Header: jsHeader{
|
||||
Algorithm: parsedJSig.Header.Algorithm,
|
||||
},
|
||||
Signature: parsedJSig.Signature,
|
||||
Protected: parsedJSig.Protected,
|
||||
}
|
||||
|
||||
if parsedJSig.Header.Chain != nil {
|
||||
jsig.Header.Chain = parsedJSig.Header.Chain
|
||||
}
|
||||
|
||||
if parsedJSig.Header.JWK != nil {
|
||||
publicKey, err := UnmarshalPublicKeyJWK([]byte(parsedJSig.Header.JWK))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
jsig.Header.JWK = publicKey
|
||||
}
|
||||
|
||||
js.signatures = append(js.signatures, jsig)
|
||||
}
|
||||
}
|
||||
|
||||
return js, nil
|
||||
}
|
||||
|
||||
// NewJSONSignatureFromMap returns a new unsigned JSONSignature from a map or
|
||||
// struct. JWS will need to be signed before serializing or storing.
|
||||
func NewJSONSignatureFromMap(content interface{}) (*JSONSignature, error) {
|
||||
switch content.(type) {
|
||||
case map[string]interface{}:
|
||||
case struct{}:
|
||||
default:
|
||||
return nil, errors.New("invalid data type")
|
||||
}
|
||||
|
||||
js := newJSONSignature()
|
||||
js.indent = " "
|
||||
|
||||
payload, err := json.MarshalIndent(content, "", js.indent)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
js.payload = joseBase64UrlEncode(payload)
|
||||
|
||||
// Remove '\n}' from formatted section, put in protected header
|
||||
js.formatLength = len(payload) - 2
|
||||
js.formatTail = payload[js.formatLength:]
|
||||
|
||||
return js, nil
|
||||
}
|
||||
|
||||
func readIntFromMap(key string, m map[string]interface{}) (int, bool) {
|
||||
value, ok := m[key]
|
||||
if !ok {
|
||||
return 0, false
|
||||
}
|
||||
switch v := value.(type) {
|
||||
case int:
|
||||
return v, true
|
||||
case float64:
|
||||
return int(v), true
|
||||
default:
|
||||
return 0, false
|
||||
}
|
||||
}
|
||||
|
||||
func readStringFromMap(key string, m map[string]interface{}) (v string, ok bool) {
|
||||
value, ok := m[key]
|
||||
if !ok {
|
||||
return "", false
|
||||
}
|
||||
v, ok = value.(string)
|
||||
return
|
||||
}
|
||||
|
||||
// ParsePrettySignature parses a formatted signature into a
|
||||
// JSON signature. If the signatures are missing the format information
|
||||
// an error is thrown. The formatted signature must be created by
|
||||
// the same method as format signature.
|
||||
func ParsePrettySignature(content []byte, signatureKey string) (*JSONSignature, error) {
|
||||
var contentMap map[string]json.RawMessage
|
||||
err := json.Unmarshal(content, &contentMap)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error unmarshalling content: %s", err)
|
||||
}
|
||||
sigMessage, ok := contentMap[signatureKey]
|
||||
if !ok {
|
||||
return nil, ErrMissingSignatureKey
|
||||
}
|
||||
|
||||
var signatureBlocks []jsParsedSignature
|
||||
err = json.Unmarshal([]byte(sigMessage), &signatureBlocks)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error unmarshalling signatures: %s", err)
|
||||
}
|
||||
|
||||
js := newJSONSignature()
|
||||
js.signatures = make([]jsSignature, len(signatureBlocks))
|
||||
|
||||
for i, signatureBlock := range signatureBlocks {
|
||||
protectedBytes, err := joseBase64UrlDecode(signatureBlock.Protected)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("base64 decode error: %s", err)
|
||||
}
|
||||
var protectedHeader map[string]interface{}
|
||||
err = json.Unmarshal(protectedBytes, &protectedHeader)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error unmarshalling protected header: %s", err)
|
||||
}
|
||||
|
||||
formatLength, ok := readIntFromMap("formatLength", protectedHeader)
|
||||
if !ok {
|
||||
return nil, errors.New("missing formatted length")
|
||||
}
|
||||
encodedTail, ok := readStringFromMap("formatTail", protectedHeader)
|
||||
if !ok {
|
||||
return nil, errors.New("missing formatted tail")
|
||||
}
|
||||
formatTail, err := joseBase64UrlDecode(encodedTail)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("base64 decode error on tail: %s", err)
|
||||
}
|
||||
if js.formatLength == 0 {
|
||||
js.formatLength = formatLength
|
||||
} else if js.formatLength != formatLength {
|
||||
return nil, errors.New("conflicting format length")
|
||||
}
|
||||
if len(js.formatTail) == 0 {
|
||||
js.formatTail = formatTail
|
||||
} else if bytes.Compare(js.formatTail, formatTail) != 0 {
|
||||
return nil, errors.New("conflicting format tail")
|
||||
}
|
||||
|
||||
header := jsHeader{
|
||||
Algorithm: signatureBlock.Header.Algorithm,
|
||||
Chain: signatureBlock.Header.Chain,
|
||||
}
|
||||
if signatureBlock.Header.JWK != nil {
|
||||
publicKey, err := UnmarshalPublicKeyJWK([]byte(signatureBlock.Header.JWK))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error unmarshalling public key: %s", err)
|
||||
}
|
||||
header.JWK = publicKey
|
||||
}
|
||||
js.signatures[i] = jsSignature{
|
||||
Header: header,
|
||||
Signature: signatureBlock.Signature,
|
||||
Protected: signatureBlock.Protected,
|
||||
}
|
||||
}
|
||||
if js.formatLength > len(content) {
|
||||
return nil, errors.New("invalid format length")
|
||||
}
|
||||
formatted := make([]byte, js.formatLength+len(js.formatTail))
|
||||
copy(formatted, content[:js.formatLength])
|
||||
copy(formatted[js.formatLength:], js.formatTail)
|
||||
js.indent = detectJSONIndent(formatted)
|
||||
js.payload = joseBase64UrlEncode(formatted)
|
||||
|
||||
return js, nil
|
||||
}
|
||||
|
||||
// PrettySignature formats a json signature into an easy to read
|
||||
// single json serialized object.
|
||||
func (js *JSONSignature) PrettySignature(signatureKey string) ([]byte, error) {
|
||||
if len(js.signatures) == 0 {
|
||||
return nil, errors.New("no signatures")
|
||||
}
|
||||
payload, err := joseBase64UrlDecode(js.payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload = payload[:js.formatLength]
|
||||
|
||||
sort.Sort(jsSignaturesSorted(js.signatures))
|
||||
|
||||
var marshalled []byte
|
||||
var marshallErr error
|
||||
if js.indent != "" {
|
||||
marshalled, marshallErr = json.MarshalIndent(js.signatures, js.indent, js.indent)
|
||||
} else {
|
||||
marshalled, marshallErr = json.Marshal(js.signatures)
|
||||
}
|
||||
if marshallErr != nil {
|
||||
return nil, marshallErr
|
||||
}
|
||||
|
||||
buf := bytes.NewBuffer(make([]byte, 0, len(payload)+len(marshalled)+34))
|
||||
buf.Write(payload)
|
||||
buf.WriteByte(',')
|
||||
if js.indent != "" {
|
||||
buf.WriteByte('\n')
|
||||
buf.WriteString(js.indent)
|
||||
buf.WriteByte('"')
|
||||
buf.WriteString(signatureKey)
|
||||
buf.WriteString("\": ")
|
||||
buf.Write(marshalled)
|
||||
buf.WriteByte('\n')
|
||||
} else {
|
||||
buf.WriteByte('"')
|
||||
buf.WriteString(signatureKey)
|
||||
buf.WriteString("\":")
|
||||
buf.Write(marshalled)
|
||||
}
|
||||
buf.WriteByte('}')
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
// Signatures provides the signatures on this JWS as opaque blobs, sorted by
|
||||
// keyID. These blobs can be stored and reassembled with payloads. Internally,
|
||||
// they are simply marshaled json web signatures but implementations should
|
||||
// not rely on this.
|
||||
func (js *JSONSignature) Signatures() ([][]byte, error) {
|
||||
sort.Sort(jsSignaturesSorted(js.signatures))
|
||||
|
||||
var sb [][]byte
|
||||
for _, jsig := range js.signatures {
|
||||
p, err := json.Marshal(jsig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sb = append(sb, p)
|
||||
}
|
||||
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
// Merge combines the signatures from one or more other signatures into the
|
||||
// method receiver. If the payloads differ for any argument, an error will be
|
||||
// returned and the receiver will not be modified.
|
||||
func (js *JSONSignature) Merge(others ...*JSONSignature) error {
|
||||
merged := js.signatures
|
||||
for _, other := range others {
|
||||
if js.payload != other.payload {
|
||||
return fmt.Errorf("payloads differ from merge target")
|
||||
}
|
||||
merged = append(merged, other.signatures...)
|
||||
}
|
||||
|
||||
js.signatures = merged
|
||||
return nil
|
||||
}
|
|
@ -1,253 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"crypto/ecdsa"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
// PublicKey is a generic interface for a Public Key.
|
||||
type PublicKey interface {
|
||||
// KeyType returns the key type for this key. For elliptic curve keys,
|
||||
// this value should be "EC". For RSA keys, this value should be "RSA".
|
||||
KeyType() string
|
||||
// KeyID returns a distinct identifier which is unique to this Public Key.
|
||||
// The format generated by this library is a base32 encoding of a 240 bit
|
||||
// hash of the public key data divided into 12 groups like so:
|
||||
// ABCD:EFGH:IJKL:MNOP:QRST:UVWX:YZ23:4567:ABCD:EFGH:IJKL:MNOP
|
||||
KeyID() string
|
||||
// Verify verifyies the signature of the data in the io.Reader using this
|
||||
// Public Key. The alg parameter should identify the digital signature
|
||||
// algorithm which was used to produce the signature and should be
|
||||
// supported by this public key. Returns a nil error if the signature
|
||||
// is valid.
|
||||
Verify(data io.Reader, alg string, signature []byte) error
|
||||
// CryptoPublicKey returns the internal object which can be used as a
|
||||
// crypto.PublicKey for use with other standard library operations. The type
|
||||
// is either *rsa.PublicKey or *ecdsa.PublicKey
|
||||
CryptoPublicKey() crypto.PublicKey
|
||||
// These public keys can be serialized to the standard JSON encoding for
|
||||
// JSON Web Keys. See section 6 of the IETF draft RFC for JOSE JSON Web
|
||||
// Algorithms.
|
||||
MarshalJSON() ([]byte, error)
|
||||
// These keys can also be serialized to the standard PEM encoding.
|
||||
PEMBlock() (*pem.Block, error)
|
||||
// The string representation of a key is its key type and ID.
|
||||
String() string
|
||||
AddExtendedField(string, interface{})
|
||||
GetExtendedField(string) interface{}
|
||||
}
|
||||
|
||||
// PrivateKey is a generic interface for a Private Key.
|
||||
type PrivateKey interface {
|
||||
// A PrivateKey contains all fields and methods of a PublicKey of the
|
||||
// same type. The MarshalJSON method also outputs the private key as a
|
||||
// JSON Web Key, and the PEMBlock method outputs the private key as a
|
||||
// PEM block.
|
||||
PublicKey
|
||||
// PublicKey returns the PublicKey associated with this PrivateKey.
|
||||
PublicKey() PublicKey
|
||||
// Sign signs the data read from the io.Reader using a signature algorithm
|
||||
// supported by the private key. If the specified hashing algorithm is
|
||||
// supported by this key, that hash function is used to generate the
|
||||
// signature otherwise the the default hashing algorithm for this key is
|
||||
// used. Returns the signature and identifier of the algorithm used.
|
||||
Sign(data io.Reader, hashID crypto.Hash) (signature []byte, alg string, err error)
|
||||
// CryptoPrivateKey returns the internal object which can be used as a
|
||||
// crypto.PublicKey for use with other standard library operations. The
|
||||
// type is either *rsa.PublicKey or *ecdsa.PublicKey
|
||||
CryptoPrivateKey() crypto.PrivateKey
|
||||
}
|
||||
|
||||
// FromCryptoPublicKey returns a libtrust PublicKey representation of the given
|
||||
// *ecdsa.PublicKey or *rsa.PublicKey. Returns a non-nil error when the given
|
||||
// key is of an unsupported type.
|
||||
func FromCryptoPublicKey(cryptoPublicKey crypto.PublicKey) (PublicKey, error) {
|
||||
switch cryptoPublicKey := cryptoPublicKey.(type) {
|
||||
case *ecdsa.PublicKey:
|
||||
return fromECPublicKey(cryptoPublicKey)
|
||||
case *rsa.PublicKey:
|
||||
return fromRSAPublicKey(cryptoPublicKey), nil
|
||||
default:
|
||||
return nil, fmt.Errorf("public key type %T is not supported", cryptoPublicKey)
|
||||
}
|
||||
}
|
||||
|
||||
// FromCryptoPrivateKey returns a libtrust PrivateKey representation of the given
|
||||
// *ecdsa.PrivateKey or *rsa.PrivateKey. Returns a non-nil error when the given
|
||||
// key is of an unsupported type.
|
||||
func FromCryptoPrivateKey(cryptoPrivateKey crypto.PrivateKey) (PrivateKey, error) {
|
||||
switch cryptoPrivateKey := cryptoPrivateKey.(type) {
|
||||
case *ecdsa.PrivateKey:
|
||||
return fromECPrivateKey(cryptoPrivateKey)
|
||||
case *rsa.PrivateKey:
|
||||
return fromRSAPrivateKey(cryptoPrivateKey), nil
|
||||
default:
|
||||
return nil, fmt.Errorf("private key type %T is not supported", cryptoPrivateKey)
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalPublicKeyPEM parses the PEM encoded data and returns a libtrust
|
||||
// PublicKey or an error if there is a problem with the encoding.
|
||||
func UnmarshalPublicKeyPEM(data []byte) (PublicKey, error) {
|
||||
pemBlock, _ := pem.Decode(data)
|
||||
if pemBlock == nil {
|
||||
return nil, errors.New("unable to find PEM encoded data")
|
||||
} else if pemBlock.Type != "PUBLIC KEY" {
|
||||
return nil, fmt.Errorf("unable to get PublicKey from PEM type: %s", pemBlock.Type)
|
||||
}
|
||||
|
||||
return pubKeyFromPEMBlock(pemBlock)
|
||||
}
|
||||
|
||||
// UnmarshalPublicKeyPEMBundle parses the PEM encoded data as a bundle of
|
||||
// PEM blocks appended one after the other and returns a slice of PublicKey
|
||||
// objects that it finds.
|
||||
func UnmarshalPublicKeyPEMBundle(data []byte) ([]PublicKey, error) {
|
||||
pubKeys := []PublicKey{}
|
||||
|
||||
for {
|
||||
var pemBlock *pem.Block
|
||||
pemBlock, data = pem.Decode(data)
|
||||
if pemBlock == nil {
|
||||
break
|
||||
} else if pemBlock.Type != "PUBLIC KEY" {
|
||||
return nil, fmt.Errorf("unable to get PublicKey from PEM type: %s", pemBlock.Type)
|
||||
}
|
||||
|
||||
pubKey, err := pubKeyFromPEMBlock(pemBlock)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pubKeys = append(pubKeys, pubKey)
|
||||
}
|
||||
|
||||
return pubKeys, nil
|
||||
}
|
||||
|
||||
// UnmarshalPrivateKeyPEM parses the PEM encoded data and returns a libtrust
|
||||
// PrivateKey or an error if there is a problem with the encoding.
|
||||
func UnmarshalPrivateKeyPEM(data []byte) (PrivateKey, error) {
|
||||
pemBlock, _ := pem.Decode(data)
|
||||
if pemBlock == nil {
|
||||
return nil, errors.New("unable to find PEM encoded data")
|
||||
}
|
||||
|
||||
var key PrivateKey
|
||||
|
||||
switch {
|
||||
case pemBlock.Type == "RSA PRIVATE KEY":
|
||||
rsaPrivateKey, err := x509.ParsePKCS1PrivateKey(pemBlock.Bytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode RSA Private Key PEM data: %s", err)
|
||||
}
|
||||
key = fromRSAPrivateKey(rsaPrivateKey)
|
||||
case pemBlock.Type == "EC PRIVATE KEY":
|
||||
ecPrivateKey, err := x509.ParseECPrivateKey(pemBlock.Bytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode EC Private Key PEM data: %s", err)
|
||||
}
|
||||
key, err = fromECPrivateKey(ecPrivateKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unable to get PrivateKey from PEM type: %s", pemBlock.Type)
|
||||
}
|
||||
|
||||
addPEMHeadersToKey(pemBlock, key.PublicKey())
|
||||
|
||||
return key, nil
|
||||
}
|
||||
|
||||
// UnmarshalPublicKeyJWK unmarshals the given JSON Web Key into a generic
|
||||
// Public Key to be used with libtrust.
|
||||
func UnmarshalPublicKeyJWK(data []byte) (PublicKey, error) {
|
||||
jwk := make(map[string]interface{})
|
||||
|
||||
err := json.Unmarshal(data, &jwk)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(
|
||||
"decoding JWK Public Key JSON data: %s\n", err,
|
||||
)
|
||||
}
|
||||
|
||||
// Get the Key Type value.
|
||||
kty, err := stringFromMap(jwk, "kty")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK Public Key type: %s", err)
|
||||
}
|
||||
|
||||
switch {
|
||||
case kty == "EC":
|
||||
// Call out to unmarshal EC public key.
|
||||
return ecPublicKeyFromMap(jwk)
|
||||
case kty == "RSA":
|
||||
// Call out to unmarshal RSA public key.
|
||||
return rsaPublicKeyFromMap(jwk)
|
||||
default:
|
||||
return nil, fmt.Errorf(
|
||||
"JWK Public Key type not supported: %q\n", kty,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalPublicKeyJWKSet parses the JSON encoded data as a JSON Web Key Set
|
||||
// and returns a slice of Public Key objects.
|
||||
func UnmarshalPublicKeyJWKSet(data []byte) ([]PublicKey, error) {
|
||||
rawKeys, err := loadJSONKeySetRaw(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pubKeys := make([]PublicKey, 0, len(rawKeys))
|
||||
|
||||
for _, rawKey := range rawKeys {
|
||||
pubKey, err := UnmarshalPublicKeyJWK(rawKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pubKeys = append(pubKeys, pubKey)
|
||||
}
|
||||
|
||||
return pubKeys, nil
|
||||
}
|
||||
|
||||
// UnmarshalPrivateKeyJWK unmarshals the given JSON Web Key into a generic
|
||||
// Private Key to be used with libtrust.
|
||||
func UnmarshalPrivateKeyJWK(data []byte) (PrivateKey, error) {
|
||||
jwk := make(map[string]interface{})
|
||||
|
||||
err := json.Unmarshal(data, &jwk)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(
|
||||
"decoding JWK Private Key JSON data: %s\n", err,
|
||||
)
|
||||
}
|
||||
|
||||
// Get the Key Type value.
|
||||
kty, err := stringFromMap(jwk, "kty")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK Private Key type: %s", err)
|
||||
}
|
||||
|
||||
switch {
|
||||
case kty == "EC":
|
||||
// Call out to unmarshal EC private key.
|
||||
return ecPrivateKeyFromMap(jwk)
|
||||
case kty == "RSA":
|
||||
// Call out to unmarshal RSA private key.
|
||||
return rsaPrivateKeyFromMap(jwk)
|
||||
default:
|
||||
return nil, fmt.Errorf(
|
||||
"JWK Private Key type not supported: %q\n", kty,
|
||||
)
|
||||
}
|
||||
}
|
|
@ -1,255 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrKeyFileDoesNotExist indicates that the private key file does not exist.
|
||||
ErrKeyFileDoesNotExist = errors.New("key file does not exist")
|
||||
)
|
||||
|
||||
func readKeyFileBytes(filename string) ([]byte, error) {
|
||||
data, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
err = ErrKeyFileDoesNotExist
|
||||
} else {
|
||||
err = fmt.Errorf("unable to read key file %s: %s", filename, err)
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return data, nil
|
||||
}
|
||||
|
||||
/*
|
||||
Loading and Saving of Public and Private Keys in either PEM or JWK format.
|
||||
*/
|
||||
|
||||
// LoadKeyFile opens the given filename and attempts to read a Private Key
|
||||
// encoded in either PEM or JWK format (if .json or .jwk file extension).
|
||||
func LoadKeyFile(filename string) (PrivateKey, error) {
|
||||
contents, err := readKeyFileBytes(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var key PrivateKey
|
||||
|
||||
if strings.HasSuffix(filename, ".json") || strings.HasSuffix(filename, ".jwk") {
|
||||
key, err = UnmarshalPrivateKeyJWK(contents)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode private key JWK: %s", err)
|
||||
}
|
||||
} else {
|
||||
key, err = UnmarshalPrivateKeyPEM(contents)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode private key PEM: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
return key, nil
|
||||
}
|
||||
|
||||
// LoadPublicKeyFile opens the given filename and attempts to read a Public Key
|
||||
// encoded in either PEM or JWK format (if .json or .jwk file extension).
|
||||
func LoadPublicKeyFile(filename string) (PublicKey, error) {
|
||||
contents, err := readKeyFileBytes(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var key PublicKey
|
||||
|
||||
if strings.HasSuffix(filename, ".json") || strings.HasSuffix(filename, ".jwk") {
|
||||
key, err = UnmarshalPublicKeyJWK(contents)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode public key JWK: %s", err)
|
||||
}
|
||||
} else {
|
||||
key, err = UnmarshalPublicKeyPEM(contents)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode public key PEM: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
return key, nil
|
||||
}
|
||||
|
||||
// SaveKey saves the given key to a file using the provided filename.
|
||||
// This process will overwrite any existing file at the provided location.
|
||||
func SaveKey(filename string, key PrivateKey) error {
|
||||
var encodedKey []byte
|
||||
var err error
|
||||
|
||||
if strings.HasSuffix(filename, ".json") || strings.HasSuffix(filename, ".jwk") {
|
||||
// Encode in JSON Web Key format.
|
||||
encodedKey, err = json.MarshalIndent(key, "", " ")
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to encode private key JWK: %s", err)
|
||||
}
|
||||
} else {
|
||||
// Encode in PEM format.
|
||||
pemBlock, err := key.PEMBlock()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to encode private key PEM: %s", err)
|
||||
}
|
||||
encodedKey = pem.EncodeToMemory(pemBlock)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(filename, encodedKey, os.FileMode(0600))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to write private key file %s: %s", filename, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SavePublicKey saves the given public key to the file.
|
||||
func SavePublicKey(filename string, key PublicKey) error {
|
||||
var encodedKey []byte
|
||||
var err error
|
||||
|
||||
if strings.HasSuffix(filename, ".json") || strings.HasSuffix(filename, ".jwk") {
|
||||
// Encode in JSON Web Key format.
|
||||
encodedKey, err = json.MarshalIndent(key, "", " ")
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to encode public key JWK: %s", err)
|
||||
}
|
||||
} else {
|
||||
// Encode in PEM format.
|
||||
pemBlock, err := key.PEMBlock()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to encode public key PEM: %s", err)
|
||||
}
|
||||
encodedKey = pem.EncodeToMemory(pemBlock)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(filename, encodedKey, os.FileMode(0644))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to write public key file %s: %s", filename, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Public Key Set files
|
||||
|
||||
type jwkSet struct {
|
||||
Keys []json.RawMessage `json:"keys"`
|
||||
}
|
||||
|
||||
// LoadKeySetFile loads a key set
|
||||
func LoadKeySetFile(filename string) ([]PublicKey, error) {
|
||||
if strings.HasSuffix(filename, ".json") || strings.HasSuffix(filename, ".jwk") {
|
||||
return loadJSONKeySetFile(filename)
|
||||
}
|
||||
|
||||
// Must be a PEM format file
|
||||
return loadPEMKeySetFile(filename)
|
||||
}
|
||||
|
||||
func loadJSONKeySetRaw(data []byte) ([]json.RawMessage, error) {
|
||||
if len(data) == 0 {
|
||||
// This is okay, just return an empty slice.
|
||||
return []json.RawMessage{}, nil
|
||||
}
|
||||
|
||||
keySet := jwkSet{}
|
||||
|
||||
err := json.Unmarshal(data, &keySet)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode JSON Web Key Set: %s", err)
|
||||
}
|
||||
|
||||
return keySet.Keys, nil
|
||||
}
|
||||
|
||||
func loadJSONKeySetFile(filename string) ([]PublicKey, error) {
|
||||
contents, err := readKeyFileBytes(filename)
|
||||
if err != nil && err != ErrKeyFileDoesNotExist {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return UnmarshalPublicKeyJWKSet(contents)
|
||||
}
|
||||
|
||||
func loadPEMKeySetFile(filename string) ([]PublicKey, error) {
|
||||
data, err := readKeyFileBytes(filename)
|
||||
if err != nil && err != ErrKeyFileDoesNotExist {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return UnmarshalPublicKeyPEMBundle(data)
|
||||
}
|
||||
|
||||
// AddKeySetFile adds a key to a key set
|
||||
func AddKeySetFile(filename string, key PublicKey) error {
|
||||
if strings.HasSuffix(filename, ".json") || strings.HasSuffix(filename, ".jwk") {
|
||||
return addKeySetJSONFile(filename, key)
|
||||
}
|
||||
|
||||
// Must be a PEM format file
|
||||
return addKeySetPEMFile(filename, key)
|
||||
}
|
||||
|
||||
func addKeySetJSONFile(filename string, key PublicKey) error {
|
||||
encodedKey, err := json.Marshal(key)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to encode trusted client key: %s", err)
|
||||
}
|
||||
|
||||
contents, err := readKeyFileBytes(filename)
|
||||
if err != nil && err != ErrKeyFileDoesNotExist {
|
||||
return err
|
||||
}
|
||||
|
||||
rawEntries, err := loadJSONKeySetRaw(contents)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rawEntries = append(rawEntries, json.RawMessage(encodedKey))
|
||||
entriesWrapper := jwkSet{Keys: rawEntries}
|
||||
|
||||
encodedEntries, err := json.MarshalIndent(entriesWrapper, "", " ")
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to encode trusted client keys: %s", err)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(filename, encodedEntries, os.FileMode(0644))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to write trusted client keys file %s: %s", filename, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func addKeySetPEMFile(filename string, key PublicKey) error {
|
||||
// Encode to PEM, open file for appending, write PEM.
|
||||
file, err := os.OpenFile(filename, os.O_CREATE|os.O_APPEND|os.O_RDWR, os.FileMode(0644))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to open trusted client keys file %s: %s", filename, err)
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
pemBlock, err := key.PEMBlock()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to encoded trusted key: %s", err)
|
||||
}
|
||||
|
||||
_, err = file.Write(pem.EncodeToMemory(pemBlock))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to write trusted keys file: %s", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,175 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"path"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// ClientKeyManager manages client keys on the filesystem
|
||||
type ClientKeyManager struct {
|
||||
key PrivateKey
|
||||
clientFile string
|
||||
clientDir string
|
||||
|
||||
clientLock sync.RWMutex
|
||||
clients []PublicKey
|
||||
|
||||
configLock sync.Mutex
|
||||
configs []*tls.Config
|
||||
}
|
||||
|
||||
// NewClientKeyManager loads a new manager from a set of key files
|
||||
// and managed by the given private key.
|
||||
func NewClientKeyManager(trustKey PrivateKey, clientFile, clientDir string) (*ClientKeyManager, error) {
|
||||
m := &ClientKeyManager{
|
||||
key: trustKey,
|
||||
clientFile: clientFile,
|
||||
clientDir: clientDir,
|
||||
}
|
||||
if err := m.loadKeys(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// TODO Start watching file and directory
|
||||
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *ClientKeyManager) loadKeys() (err error) {
|
||||
// Load authorized keys file
|
||||
var clients []PublicKey
|
||||
if c.clientFile != "" {
|
||||
clients, err = LoadKeySetFile(c.clientFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to load authorized keys: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Add clients from authorized keys directory
|
||||
files, err := ioutil.ReadDir(c.clientDir)
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
return fmt.Errorf("unable to open authorized keys directory: %s", err)
|
||||
}
|
||||
for _, f := range files {
|
||||
if !f.IsDir() {
|
||||
publicKey, err := LoadPublicKeyFile(path.Join(c.clientDir, f.Name()))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to load authorized key file: %s", err)
|
||||
}
|
||||
clients = append(clients, publicKey)
|
||||
}
|
||||
}
|
||||
|
||||
c.clientLock.Lock()
|
||||
c.clients = clients
|
||||
c.clientLock.Unlock()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterTLSConfig registers a tls configuration to manager
|
||||
// such that any changes to the keys may be reflected in
|
||||
// the tls client CA pool
|
||||
func (c *ClientKeyManager) RegisterTLSConfig(tlsConfig *tls.Config) error {
|
||||
c.clientLock.RLock()
|
||||
certPool, err := GenerateCACertPool(c.key, c.clients)
|
||||
if err != nil {
|
||||
return fmt.Errorf("CA pool generation error: %s", err)
|
||||
}
|
||||
c.clientLock.RUnlock()
|
||||
|
||||
tlsConfig.ClientCAs = certPool
|
||||
|
||||
c.configLock.Lock()
|
||||
c.configs = append(c.configs, tlsConfig)
|
||||
c.configLock.Unlock()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewIdentityAuthTLSConfig creates a tls.Config for the server to use for
|
||||
// libtrust identity authentication for the domain specified
|
||||
func NewIdentityAuthTLSConfig(trustKey PrivateKey, clients *ClientKeyManager, addr string, domain string) (*tls.Config, error) {
|
||||
tlsConfig := newTLSConfig()
|
||||
|
||||
tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert
|
||||
if err := clients.RegisterTLSConfig(tlsConfig); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Generate cert
|
||||
ips, domains, err := parseAddr(addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// add domain that it expects clients to use
|
||||
domains = append(domains, domain)
|
||||
x509Cert, err := GenerateSelfSignedServerCert(trustKey, domains, ips)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("certificate generation error: %s", err)
|
||||
}
|
||||
tlsConfig.Certificates = []tls.Certificate{{
|
||||
Certificate: [][]byte{x509Cert.Raw},
|
||||
PrivateKey: trustKey.CryptoPrivateKey(),
|
||||
Leaf: x509Cert,
|
||||
}}
|
||||
|
||||
return tlsConfig, nil
|
||||
}
|
||||
|
||||
// NewCertAuthTLSConfig creates a tls.Config for the server to use for
|
||||
// certificate authentication
|
||||
func NewCertAuthTLSConfig(caPath, certPath, keyPath string) (*tls.Config, error) {
|
||||
tlsConfig := newTLSConfig()
|
||||
|
||||
cert, err := tls.LoadX509KeyPair(certPath, keyPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Couldn't load X509 key pair (%s, %s): %s. Key encrypted?", certPath, keyPath, err)
|
||||
}
|
||||
tlsConfig.Certificates = []tls.Certificate{cert}
|
||||
|
||||
// Verify client certificates against a CA?
|
||||
if caPath != "" {
|
||||
certPool := x509.NewCertPool()
|
||||
file, err := ioutil.ReadFile(caPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Couldn't read CA certificate: %s", err)
|
||||
}
|
||||
certPool.AppendCertsFromPEM(file)
|
||||
|
||||
tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert
|
||||
tlsConfig.ClientCAs = certPool
|
||||
}
|
||||
|
||||
return tlsConfig, nil
|
||||
}
|
||||
|
||||
func newTLSConfig() *tls.Config {
|
||||
return &tls.Config{
|
||||
NextProtos: []string{"http/1.1"},
|
||||
// Avoid fallback on insecure SSL protocols
|
||||
MinVersion: tls.VersionTLS10,
|
||||
}
|
||||
}
|
||||
|
||||
// parseAddr parses an address into an array of IPs and domains
|
||||
func parseAddr(addr string) ([]net.IP, []string, error) {
|
||||
host, _, err := net.SplitHostPort(addr)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
var domains []string
|
||||
var ips []net.IP
|
||||
ip := net.ParseIP(host)
|
||||
if ip != nil {
|
||||
ips = []net.IP{ip}
|
||||
} else {
|
||||
domains = []string{host}
|
||||
}
|
||||
return ips, domains, nil
|
||||
}
|
|
@ -1,427 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
/*
|
||||
* RSA DSA PUBLIC KEY
|
||||
*/
|
||||
|
||||
// rsaPublicKey implements a JWK Public Key using RSA digital signature algorithms.
|
||||
type rsaPublicKey struct {
|
||||
*rsa.PublicKey
|
||||
extended map[string]interface{}
|
||||
}
|
||||
|
||||
func fromRSAPublicKey(cryptoPublicKey *rsa.PublicKey) *rsaPublicKey {
|
||||
return &rsaPublicKey{cryptoPublicKey, map[string]interface{}{}}
|
||||
}
|
||||
|
||||
// KeyType returns the JWK key type for RSA keys, i.e., "RSA".
|
||||
func (k *rsaPublicKey) KeyType() string {
|
||||
return "RSA"
|
||||
}
|
||||
|
||||
// KeyID returns a distinct identifier which is unique to this Public Key.
|
||||
func (k *rsaPublicKey) KeyID() string {
|
||||
return keyIDFromCryptoKey(k)
|
||||
}
|
||||
|
||||
func (k *rsaPublicKey) String() string {
|
||||
return fmt.Sprintf("RSA Public Key <%s>", k.KeyID())
|
||||
}
|
||||
|
||||
// Verify verifyies the signature of the data in the io.Reader using this Public Key.
|
||||
// The alg parameter should be the name of the JWA digital signature algorithm
|
||||
// which was used to produce the signature and should be supported by this
|
||||
// public key. Returns a nil error if the signature is valid.
|
||||
func (k *rsaPublicKey) Verify(data io.Reader, alg string, signature []byte) error {
|
||||
// Verify the signature of the given date, return non-nil error if valid.
|
||||
sigAlg, err := rsaSignatureAlgorithmByName(alg)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to verify Signature: %s", err)
|
||||
}
|
||||
|
||||
hasher := sigAlg.HashID().New()
|
||||
_, err = io.Copy(hasher, data)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error reading data to sign: %s", err)
|
||||
}
|
||||
hash := hasher.Sum(nil)
|
||||
|
||||
err = rsa.VerifyPKCS1v15(k.PublicKey, sigAlg.HashID(), hash, signature)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid %s signature: %s", sigAlg.HeaderParam(), err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CryptoPublicKey returns the internal object which can be used as a
|
||||
// crypto.PublicKey for use with other standard library operations. The type
|
||||
// is either *rsa.PublicKey or *ecdsa.PublicKey
|
||||
func (k *rsaPublicKey) CryptoPublicKey() crypto.PublicKey {
|
||||
return k.PublicKey
|
||||
}
|
||||
|
||||
func (k *rsaPublicKey) toMap() map[string]interface{} {
|
||||
jwk := make(map[string]interface{})
|
||||
for k, v := range k.extended {
|
||||
jwk[k] = v
|
||||
}
|
||||
jwk["kty"] = k.KeyType()
|
||||
jwk["kid"] = k.KeyID()
|
||||
jwk["n"] = joseBase64UrlEncode(k.N.Bytes())
|
||||
jwk["e"] = joseBase64UrlEncode(serializeRSAPublicExponentParam(k.E))
|
||||
|
||||
return jwk
|
||||
}
|
||||
|
||||
// MarshalJSON serializes this Public Key using the JWK JSON serialization format for
|
||||
// RSA keys.
|
||||
func (k *rsaPublicKey) MarshalJSON() (data []byte, err error) {
|
||||
return json.Marshal(k.toMap())
|
||||
}
|
||||
|
||||
// PEMBlock serializes this Public Key to DER-encoded PKIX format.
|
||||
func (k *rsaPublicKey) PEMBlock() (*pem.Block, error) {
|
||||
derBytes, err := x509.MarshalPKIXPublicKey(k.PublicKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to serialize RSA PublicKey to DER-encoded PKIX format: %s", err)
|
||||
}
|
||||
k.extended["kid"] = k.KeyID() // For display purposes.
|
||||
return createPemBlock("PUBLIC KEY", derBytes, k.extended)
|
||||
}
|
||||
|
||||
func (k *rsaPublicKey) AddExtendedField(field string, value interface{}) {
|
||||
k.extended[field] = value
|
||||
}
|
||||
|
||||
func (k *rsaPublicKey) GetExtendedField(field string) interface{} {
|
||||
v, ok := k.extended[field]
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
func rsaPublicKeyFromMap(jwk map[string]interface{}) (*rsaPublicKey, error) {
|
||||
// JWK key type (kty) has already been determined to be "RSA".
|
||||
// Need to extract 'n', 'e', and 'kid' and check for
|
||||
// consistency.
|
||||
|
||||
// Get the modulus parameter N.
|
||||
nB64Url, err := stringFromMap(jwk, "n")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Public Key modulus: %s", err)
|
||||
}
|
||||
|
||||
n, err := parseRSAModulusParam(nB64Url)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Public Key modulus: %s", err)
|
||||
}
|
||||
|
||||
// Get the public exponent E.
|
||||
eB64Url, err := stringFromMap(jwk, "e")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Public Key exponent: %s", err)
|
||||
}
|
||||
|
||||
e, err := parseRSAPublicExponentParam(eB64Url)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Public Key exponent: %s", err)
|
||||
}
|
||||
|
||||
key := &rsaPublicKey{
|
||||
PublicKey: &rsa.PublicKey{N: n, E: e},
|
||||
}
|
||||
|
||||
// Key ID is optional, but if it exists, it should match the key.
|
||||
_, ok := jwk["kid"]
|
||||
if ok {
|
||||
kid, err := stringFromMap(jwk, "kid")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Public Key ID: %s", err)
|
||||
}
|
||||
if kid != key.KeyID() {
|
||||
return nil, fmt.Errorf("JWK RSA Public Key ID does not match: %s", kid)
|
||||
}
|
||||
}
|
||||
|
||||
if _, ok := jwk["d"]; ok {
|
||||
return nil, fmt.Errorf("JWK RSA Public Key cannot contain private exponent")
|
||||
}
|
||||
|
||||
key.extended = jwk
|
||||
|
||||
return key, nil
|
||||
}
|
||||
|
||||
/*
|
||||
* RSA DSA PRIVATE KEY
|
||||
*/
|
||||
|
||||
// rsaPrivateKey implements a JWK Private Key using RSA digital signature algorithms.
|
||||
type rsaPrivateKey struct {
|
||||
rsaPublicKey
|
||||
*rsa.PrivateKey
|
||||
}
|
||||
|
||||
func fromRSAPrivateKey(cryptoPrivateKey *rsa.PrivateKey) *rsaPrivateKey {
|
||||
return &rsaPrivateKey{
|
||||
*fromRSAPublicKey(&cryptoPrivateKey.PublicKey),
|
||||
cryptoPrivateKey,
|
||||
}
|
||||
}
|
||||
|
||||
// PublicKey returns the Public Key data associated with this Private Key.
|
||||
func (k *rsaPrivateKey) PublicKey() PublicKey {
|
||||
return &k.rsaPublicKey
|
||||
}
|
||||
|
||||
func (k *rsaPrivateKey) String() string {
|
||||
return fmt.Sprintf("RSA Private Key <%s>", k.KeyID())
|
||||
}
|
||||
|
||||
// Sign signs the data read from the io.Reader using a signature algorithm supported
|
||||
// by the RSA private key. If the specified hashing algorithm is supported by
|
||||
// this key, that hash function is used to generate the signature otherwise the
|
||||
// the default hashing algorithm for this key is used. Returns the signature
|
||||
// and the name of the JWK signature algorithm used, e.g., "RS256", "RS384",
|
||||
// "RS512".
|
||||
func (k *rsaPrivateKey) Sign(data io.Reader, hashID crypto.Hash) (signature []byte, alg string, err error) {
|
||||
// Generate a signature of the data using the internal alg.
|
||||
sigAlg := rsaPKCS1v15SignatureAlgorithmForHashID(hashID)
|
||||
hasher := sigAlg.HashID().New()
|
||||
|
||||
_, err = io.Copy(hasher, data)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("error reading data to sign: %s", err)
|
||||
}
|
||||
hash := hasher.Sum(nil)
|
||||
|
||||
signature, err = rsa.SignPKCS1v15(rand.Reader, k.PrivateKey, sigAlg.HashID(), hash)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("error producing signature: %s", err)
|
||||
}
|
||||
|
||||
alg = sigAlg.HeaderParam()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// CryptoPrivateKey returns the internal object which can be used as a
|
||||
// crypto.PublicKey for use with other standard library operations. The type
|
||||
// is either *rsa.PublicKey or *ecdsa.PublicKey
|
||||
func (k *rsaPrivateKey) CryptoPrivateKey() crypto.PrivateKey {
|
||||
return k.PrivateKey
|
||||
}
|
||||
|
||||
func (k *rsaPrivateKey) toMap() map[string]interface{} {
|
||||
k.Precompute() // Make sure the precomputed values are stored.
|
||||
jwk := k.rsaPublicKey.toMap()
|
||||
|
||||
jwk["d"] = joseBase64UrlEncode(k.D.Bytes())
|
||||
jwk["p"] = joseBase64UrlEncode(k.Primes[0].Bytes())
|
||||
jwk["q"] = joseBase64UrlEncode(k.Primes[1].Bytes())
|
||||
jwk["dp"] = joseBase64UrlEncode(k.Precomputed.Dp.Bytes())
|
||||
jwk["dq"] = joseBase64UrlEncode(k.Precomputed.Dq.Bytes())
|
||||
jwk["qi"] = joseBase64UrlEncode(k.Precomputed.Qinv.Bytes())
|
||||
|
||||
otherPrimes := k.Primes[2:]
|
||||
|
||||
if len(otherPrimes) > 0 {
|
||||
otherPrimesInfo := make([]interface{}, len(otherPrimes))
|
||||
for i, r := range otherPrimes {
|
||||
otherPrimeInfo := make(map[string]string, 3)
|
||||
otherPrimeInfo["r"] = joseBase64UrlEncode(r.Bytes())
|
||||
crtVal := k.Precomputed.CRTValues[i]
|
||||
otherPrimeInfo["d"] = joseBase64UrlEncode(crtVal.Exp.Bytes())
|
||||
otherPrimeInfo["t"] = joseBase64UrlEncode(crtVal.Coeff.Bytes())
|
||||
otherPrimesInfo[i] = otherPrimeInfo
|
||||
}
|
||||
jwk["oth"] = otherPrimesInfo
|
||||
}
|
||||
|
||||
return jwk
|
||||
}
|
||||
|
||||
// MarshalJSON serializes this Private Key using the JWK JSON serialization format for
|
||||
// RSA keys.
|
||||
func (k *rsaPrivateKey) MarshalJSON() (data []byte, err error) {
|
||||
return json.Marshal(k.toMap())
|
||||
}
|
||||
|
||||
// PEMBlock serializes this Private Key to DER-encoded PKIX format.
|
||||
func (k *rsaPrivateKey) PEMBlock() (*pem.Block, error) {
|
||||
derBytes := x509.MarshalPKCS1PrivateKey(k.PrivateKey)
|
||||
k.extended["keyID"] = k.KeyID() // For display purposes.
|
||||
return createPemBlock("RSA PRIVATE KEY", derBytes, k.extended)
|
||||
}
|
||||
|
||||
func rsaPrivateKeyFromMap(jwk map[string]interface{}) (*rsaPrivateKey, error) {
|
||||
// The JWA spec for RSA Private Keys (draft rfc section 5.3.2) states that
|
||||
// only the private key exponent 'd' is REQUIRED, the others are just for
|
||||
// signature/decryption optimizations and SHOULD be included when the JWK
|
||||
// is produced. We MAY choose to accept a JWK which only includes 'd', but
|
||||
// we're going to go ahead and not choose to accept it without the extra
|
||||
// fields. Only the 'oth' field will be optional (for multi-prime keys).
|
||||
privateExponent, err := parseRSAPrivateKeyParamFromMap(jwk, "d")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key exponent: %s", err)
|
||||
}
|
||||
firstPrimeFactor, err := parseRSAPrivateKeyParamFromMap(jwk, "p")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key prime factor: %s", err)
|
||||
}
|
||||
secondPrimeFactor, err := parseRSAPrivateKeyParamFromMap(jwk, "q")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key prime factor: %s", err)
|
||||
}
|
||||
firstFactorCRT, err := parseRSAPrivateKeyParamFromMap(jwk, "dp")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key CRT exponent: %s", err)
|
||||
}
|
||||
secondFactorCRT, err := parseRSAPrivateKeyParamFromMap(jwk, "dq")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key CRT exponent: %s", err)
|
||||
}
|
||||
crtCoeff, err := parseRSAPrivateKeyParamFromMap(jwk, "qi")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key CRT coefficient: %s", err)
|
||||
}
|
||||
|
||||
var oth interface{}
|
||||
if _, ok := jwk["oth"]; ok {
|
||||
oth = jwk["oth"]
|
||||
delete(jwk, "oth")
|
||||
}
|
||||
|
||||
// JWK key type (kty) has already been determined to be "RSA".
|
||||
// Need to extract the public key information, then extract the private
|
||||
// key values.
|
||||
publicKey, err := rsaPublicKeyFromMap(jwk)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
privateKey := &rsa.PrivateKey{
|
||||
PublicKey: *publicKey.PublicKey,
|
||||
D: privateExponent,
|
||||
Primes: []*big.Int{firstPrimeFactor, secondPrimeFactor},
|
||||
Precomputed: rsa.PrecomputedValues{
|
||||
Dp: firstFactorCRT,
|
||||
Dq: secondFactorCRT,
|
||||
Qinv: crtCoeff,
|
||||
},
|
||||
}
|
||||
|
||||
if oth != nil {
|
||||
// Should be an array of more JSON objects.
|
||||
otherPrimesInfo, ok := oth.([]interface{})
|
||||
if !ok {
|
||||
return nil, errors.New("JWK RSA Private Key: Invalid other primes info: must be an array")
|
||||
}
|
||||
numOtherPrimeFactors := len(otherPrimesInfo)
|
||||
if numOtherPrimeFactors == 0 {
|
||||
return nil, errors.New("JWK RSA Privake Key: Invalid other primes info: must be absent or non-empty")
|
||||
}
|
||||
otherPrimeFactors := make([]*big.Int, numOtherPrimeFactors)
|
||||
productOfPrimes := new(big.Int).Mul(firstPrimeFactor, secondPrimeFactor)
|
||||
crtValues := make([]rsa.CRTValue, numOtherPrimeFactors)
|
||||
|
||||
for i, val := range otherPrimesInfo {
|
||||
otherPrimeinfo, ok := val.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.New("JWK RSA Private Key: Invalid other prime info: must be a JSON object")
|
||||
}
|
||||
|
||||
otherPrimeFactor, err := parseRSAPrivateKeyParamFromMap(otherPrimeinfo, "r")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key prime factor: %s", err)
|
||||
}
|
||||
otherFactorCRT, err := parseRSAPrivateKeyParamFromMap(otherPrimeinfo, "d")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key CRT exponent: %s", err)
|
||||
}
|
||||
otherCrtCoeff, err := parseRSAPrivateKeyParamFromMap(otherPrimeinfo, "t")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("JWK RSA Private Key CRT coefficient: %s", err)
|
||||
}
|
||||
|
||||
crtValue := crtValues[i]
|
||||
crtValue.Exp = otherFactorCRT
|
||||
crtValue.Coeff = otherCrtCoeff
|
||||
crtValue.R = productOfPrimes
|
||||
otherPrimeFactors[i] = otherPrimeFactor
|
||||
productOfPrimes = new(big.Int).Mul(productOfPrimes, otherPrimeFactor)
|
||||
}
|
||||
|
||||
privateKey.Primes = append(privateKey.Primes, otherPrimeFactors...)
|
||||
privateKey.Precomputed.CRTValues = crtValues
|
||||
}
|
||||
|
||||
key := &rsaPrivateKey{
|
||||
rsaPublicKey: *publicKey,
|
||||
PrivateKey: privateKey,
|
||||
}
|
||||
|
||||
return key, nil
|
||||
}
|
||||
|
||||
/*
|
||||
* Key Generation Functions.
|
||||
*/
|
||||
|
||||
func generateRSAPrivateKey(bits int) (k *rsaPrivateKey, err error) {
|
||||
k = new(rsaPrivateKey)
|
||||
k.PrivateKey, err = rsa.GenerateKey(rand.Reader, bits)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
k.rsaPublicKey.PublicKey = &k.PrivateKey.PublicKey
|
||||
k.extended = make(map[string]interface{})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GenerateRSA2048PrivateKey generates a key pair using 2048-bit RSA.
|
||||
func GenerateRSA2048PrivateKey() (PrivateKey, error) {
|
||||
k, err := generateRSAPrivateKey(2048)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating RSA 2048-bit key: %s", err)
|
||||
}
|
||||
|
||||
return k, nil
|
||||
}
|
||||
|
||||
// GenerateRSA3072PrivateKey generates a key pair using 3072-bit RSA.
|
||||
func GenerateRSA3072PrivateKey() (PrivateKey, error) {
|
||||
k, err := generateRSAPrivateKey(3072)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating RSA 3072-bit key: %s", err)
|
||||
}
|
||||
|
||||
return k, nil
|
||||
}
|
||||
|
||||
// GenerateRSA4096PrivateKey generates a key pair using 4096-bit RSA.
|
||||
func GenerateRSA4096PrivateKey() (PrivateKey, error) {
|
||||
k, err := generateRSAPrivateKey(4096)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating RSA 4096-bit key: %s", err)
|
||||
}
|
||||
|
||||
return k, nil
|
||||
}
|
|
@ -1,363 +0,0 @@
|
|||
package libtrust
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/elliptic"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/base32"
|
||||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// LoadOrCreateTrustKey will load a PrivateKey from the specified path
|
||||
func LoadOrCreateTrustKey(trustKeyPath string) (PrivateKey, error) {
|
||||
if err := os.MkdirAll(filepath.Dir(trustKeyPath), 0700); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
trustKey, err := LoadKeyFile(trustKeyPath)
|
||||
if err == ErrKeyFileDoesNotExist {
|
||||
trustKey, err = GenerateECP256PrivateKey()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating key: %s", err)
|
||||
}
|
||||
|
||||
if err := SaveKey(trustKeyPath, trustKey); err != nil {
|
||||
return nil, fmt.Errorf("error saving key file: %s", err)
|
||||
}
|
||||
|
||||
dir, file := filepath.Split(trustKeyPath)
|
||||
if err := SavePublicKey(filepath.Join(dir, "public-"+file), trustKey.PublicKey()); err != nil {
|
||||
return nil, fmt.Errorf("error saving public key file: %s", err)
|
||||
}
|
||||
} else if err != nil {
|
||||
return nil, fmt.Errorf("error loading key file: %s", err)
|
||||
}
|
||||
return trustKey, nil
|
||||
}
|
||||
|
||||
// NewIdentityAuthTLSClientConfig returns a tls.Config configured to use identity
|
||||
// based authentication from the specified dockerUrl, the rootConfigPath and
|
||||
// the server name to which it is connecting.
|
||||
// If trustUnknownHosts is true it will automatically add the host to the
|
||||
// known-hosts.json in rootConfigPath.
|
||||
func NewIdentityAuthTLSClientConfig(dockerUrl string, trustUnknownHosts bool, rootConfigPath string, serverName string) (*tls.Config, error) {
|
||||
tlsConfig := newTLSConfig()
|
||||
|
||||
trustKeyPath := filepath.Join(rootConfigPath, "key.json")
|
||||
knownHostsPath := filepath.Join(rootConfigPath, "known-hosts.json")
|
||||
|
||||
u, err := url.Parse(dockerUrl)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to parse machine url")
|
||||
}
|
||||
|
||||
if u.Scheme == "unix" {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
addr := u.Host
|
||||
proto := "tcp"
|
||||
|
||||
trustKey, err := LoadOrCreateTrustKey(trustKeyPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to load trust key: %s", err)
|
||||
}
|
||||
|
||||
knownHosts, err := LoadKeySetFile(knownHostsPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not load trusted hosts file: %s", err)
|
||||
}
|
||||
|
||||
allowedHosts, err := FilterByHosts(knownHosts, addr, false)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error filtering hosts: %s", err)
|
||||
}
|
||||
|
||||
certPool, err := GenerateCACertPool(trustKey, allowedHosts)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Could not create CA pool: %s", err)
|
||||
}
|
||||
|
||||
tlsConfig.ServerName = serverName
|
||||
tlsConfig.RootCAs = certPool
|
||||
|
||||
x509Cert, err := GenerateSelfSignedClientCert(trustKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("certificate generation error: %s", err)
|
||||
}
|
||||
|
||||
tlsConfig.Certificates = []tls.Certificate{{
|
||||
Certificate: [][]byte{x509Cert.Raw},
|
||||
PrivateKey: trustKey.CryptoPrivateKey(),
|
||||
Leaf: x509Cert,
|
||||
}}
|
||||
|
||||
tlsConfig.InsecureSkipVerify = true
|
||||
|
||||
testConn, err := tls.Dial(proto, addr, tlsConfig)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("tls Handshake error: %s", err)
|
||||
}
|
||||
|
||||
opts := x509.VerifyOptions{
|
||||
Roots: tlsConfig.RootCAs,
|
||||
CurrentTime: time.Now(),
|
||||
DNSName: tlsConfig.ServerName,
|
||||
Intermediates: x509.NewCertPool(),
|
||||
}
|
||||
|
||||
certs := testConn.ConnectionState().PeerCertificates
|
||||
for i, cert := range certs {
|
||||
if i == 0 {
|
||||
continue
|
||||
}
|
||||
opts.Intermediates.AddCert(cert)
|
||||
}
|
||||
|
||||
if _, err := certs[0].Verify(opts); err != nil {
|
||||
if _, ok := err.(x509.UnknownAuthorityError); ok {
|
||||
if trustUnknownHosts {
|
||||
pubKey, err := FromCryptoPublicKey(certs[0].PublicKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error extracting public key from cert: %s", err)
|
||||
}
|
||||
|
||||
pubKey.AddExtendedField("hosts", []string{addr})
|
||||
|
||||
if err := AddKeySetFile(knownHostsPath, pubKey); err != nil {
|
||||
return nil, fmt.Errorf("error adding machine to known hosts: %s", err)
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("unable to connect. unknown host: %s", addr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
testConn.Close()
|
||||
tlsConfig.InsecureSkipVerify = false
|
||||
|
||||
return tlsConfig, nil
|
||||
}
|
||||
|
||||
// joseBase64UrlEncode encodes the given data using the standard base64 url
|
||||
// encoding format but with all trailing '=' characters ommitted in accordance
|
||||
// with the jose specification.
|
||||
// http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2
|
||||
func joseBase64UrlEncode(b []byte) string {
|
||||
return strings.TrimRight(base64.URLEncoding.EncodeToString(b), "=")
|
||||
}
|
||||
|
||||
// joseBase64UrlDecode decodes the given string using the standard base64 url
|
||||
// decoder but first adds the appropriate number of trailing '=' characters in
|
||||
// accordance with the jose specification.
|
||||
// http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2
|
||||
func joseBase64UrlDecode(s string) ([]byte, error) {
|
||||
s = strings.Replace(s, "\n", "", -1)
|
||||
s = strings.Replace(s, " ", "", -1)
|
||||
switch len(s) % 4 {
|
||||
case 0:
|
||||
case 2:
|
||||
s += "=="
|
||||
case 3:
|
||||
s += "="
|
||||
default:
|
||||
return nil, errors.New("illegal base64url string")
|
||||
}
|
||||
return base64.URLEncoding.DecodeString(s)
|
||||
}
|
||||
|
||||
func keyIDEncode(b []byte) string {
|
||||
s := strings.TrimRight(base32.StdEncoding.EncodeToString(b), "=")
|
||||
var buf bytes.Buffer
|
||||
var i int
|
||||
for i = 0; i < len(s)/4-1; i++ {
|
||||
start := i * 4
|
||||
end := start + 4
|
||||
buf.WriteString(s[start:end] + ":")
|
||||
}
|
||||
buf.WriteString(s[i*4:])
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
func keyIDFromCryptoKey(pubKey PublicKey) string {
|
||||
// Generate and return a 'libtrust' fingerprint of the public key.
|
||||
// For an RSA key this should be:
|
||||
// SHA256(DER encoded ASN1)
|
||||
// Then truncated to 240 bits and encoded into 12 base32 groups like so:
|
||||
// ABCD:EFGH:IJKL:MNOP:QRST:UVWX:YZ23:4567:ABCD:EFGH:IJKL:MNOP
|
||||
derBytes, err := x509.MarshalPKIXPublicKey(pubKey.CryptoPublicKey())
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
hasher := crypto.SHA256.New()
|
||||
hasher.Write(derBytes)
|
||||
return keyIDEncode(hasher.Sum(nil)[:30])
|
||||
}
|
||||
|
||||
func stringFromMap(m map[string]interface{}, key string) (string, error) {
|
||||
val, ok := m[key]
|
||||
if !ok {
|
||||
return "", fmt.Errorf("%q value not specified", key)
|
||||
}
|
||||
|
||||
str, ok := val.(string)
|
||||
if !ok {
|
||||
return "", fmt.Errorf("%q value must be a string", key)
|
||||
}
|
||||
delete(m, key)
|
||||
|
||||
return str, nil
|
||||
}
|
||||
|
||||
func parseECCoordinate(cB64Url string, curve elliptic.Curve) (*big.Int, error) {
|
||||
curveByteLen := (curve.Params().BitSize + 7) >> 3
|
||||
|
||||
cBytes, err := joseBase64UrlDecode(cB64Url)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid base64 URL encoding: %s", err)
|
||||
}
|
||||
cByteLength := len(cBytes)
|
||||
if cByteLength != curveByteLen {
|
||||
return nil, fmt.Errorf("invalid number of octets: got %d, should be %d", cByteLength, curveByteLen)
|
||||
}
|
||||
return new(big.Int).SetBytes(cBytes), nil
|
||||
}
|
||||
|
||||
func parseECPrivateParam(dB64Url string, curve elliptic.Curve) (*big.Int, error) {
|
||||
dBytes, err := joseBase64UrlDecode(dB64Url)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid base64 URL encoding: %s", err)
|
||||
}
|
||||
|
||||
// The length of this octet string MUST be ceiling(log-base-2(n)/8)
|
||||
// octets (where n is the order of the curve). This is because the private
|
||||
// key d must be in the interval [1, n-1] so the bitlength of d should be
|
||||
// no larger than the bitlength of n-1. The easiest way to find the octet
|
||||
// length is to take bitlength(n-1), add 7 to force a carry, and shift this
|
||||
// bit sequence right by 3, which is essentially dividing by 8 and adding
|
||||
// 1 if there is any remainder. Thus, the private key value d should be
|
||||
// output to (bitlength(n-1)+7)>>3 octets.
|
||||
n := curve.Params().N
|
||||
octetLength := (new(big.Int).Sub(n, big.NewInt(1)).BitLen() + 7) >> 3
|
||||
dByteLength := len(dBytes)
|
||||
|
||||
if dByteLength != octetLength {
|
||||
return nil, fmt.Errorf("invalid number of octets: got %d, should be %d", dByteLength, octetLength)
|
||||
}
|
||||
|
||||
return new(big.Int).SetBytes(dBytes), nil
|
||||
}
|
||||
|
||||
func parseRSAModulusParam(nB64Url string) (*big.Int, error) {
|
||||
nBytes, err := joseBase64UrlDecode(nB64Url)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid base64 URL encoding: %s", err)
|
||||
}
|
||||
|
||||
return new(big.Int).SetBytes(nBytes), nil
|
||||
}
|
||||
|
||||
func serializeRSAPublicExponentParam(e int) []byte {
|
||||
// We MUST use the minimum number of octets to represent E.
|
||||
// E is supposed to be 65537 for performance and security reasons
|
||||
// and is what golang's rsa package generates, but it might be
|
||||
// different if imported from some other generator.
|
||||
buf := make([]byte, 4)
|
||||
binary.BigEndian.PutUint32(buf, uint32(e))
|
||||
var i int
|
||||
for i = 0; i < 8; i++ {
|
||||
if buf[i] != 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return buf[i:]
|
||||
}
|
||||
|
||||
func parseRSAPublicExponentParam(eB64Url string) (int, error) {
|
||||
eBytes, err := joseBase64UrlDecode(eB64Url)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("invalid base64 URL encoding: %s", err)
|
||||
}
|
||||
// Only the minimum number of bytes were used to represent E, but
|
||||
// binary.BigEndian.Uint32 expects at least 4 bytes, so we need
|
||||
// to add zero padding if necassary.
|
||||
byteLen := len(eBytes)
|
||||
buf := make([]byte, 4-byteLen, 4)
|
||||
eBytes = append(buf, eBytes...)
|
||||
|
||||
return int(binary.BigEndian.Uint32(eBytes)), nil
|
||||
}
|
||||
|
||||
func parseRSAPrivateKeyParamFromMap(m map[string]interface{}, key string) (*big.Int, error) {
|
||||
b64Url, err := stringFromMap(m, key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paramBytes, err := joseBase64UrlDecode(b64Url)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invaled base64 URL encoding: %s", err)
|
||||
}
|
||||
|
||||
return new(big.Int).SetBytes(paramBytes), nil
|
||||
}
|
||||
|
||||
func createPemBlock(name string, derBytes []byte, headers map[string]interface{}) (*pem.Block, error) {
|
||||
pemBlock := &pem.Block{Type: name, Bytes: derBytes, Headers: map[string]string{}}
|
||||
for k, v := range headers {
|
||||
switch val := v.(type) {
|
||||
case string:
|
||||
pemBlock.Headers[k] = val
|
||||
case []string:
|
||||
if k == "hosts" {
|
||||
pemBlock.Headers[k] = strings.Join(val, ",")
|
||||
} else {
|
||||
// Return error, non-encodable type
|
||||
}
|
||||
default:
|
||||
// Return error, non-encodable type
|
||||
}
|
||||
}
|
||||
|
||||
return pemBlock, nil
|
||||
}
|
||||
|
||||
func pubKeyFromPEMBlock(pemBlock *pem.Block) (PublicKey, error) {
|
||||
cryptoPublicKey, err := x509.ParsePKIXPublicKey(pemBlock.Bytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to decode Public Key PEM data: %s", err)
|
||||
}
|
||||
|
||||
pubKey, err := FromCryptoPublicKey(cryptoPublicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
addPEMHeadersToKey(pemBlock, pubKey)
|
||||
|
||||
return pubKey, nil
|
||||
}
|
||||
|
||||
func addPEMHeadersToKey(pemBlock *pem.Block, pubKey PublicKey) {
|
||||
for key, value := range pemBlock.Headers {
|
||||
var safeVal interface{}
|
||||
if key == "hosts" {
|
||||
safeVal = strings.Split(value, ",")
|
||||
} else {
|
||||
safeVal = value
|
||||
}
|
||||
pubKey.AddExtendedField(key, safeVal)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
// 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)
|
|
@ -0,0 +1,195 @@
|
|||
// 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 freebsd
|
||||
|
||||
package unix
|
||||
|
||||
import (
|
||||
errorspkg "errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Go implementation of C mostly found in /usr/src/sys/kern/subr_capability.c
|
||||
|
||||
const (
|
||||
// This is the version of CapRights this package understands. See C implementation for parallels.
|
||||
capRightsGoVersion = CAP_RIGHTS_VERSION_00
|
||||
capArSizeMin = CAP_RIGHTS_VERSION_00 + 2
|
||||
capArSizeMax = capRightsGoVersion + 2
|
||||
)
|
||||
|
||||
var (
|
||||
bit2idx = []int{
|
||||
-1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1,
|
||||
4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
}
|
||||
)
|
||||
|
||||
func capidxbit(right uint64) int {
|
||||
return int((right >> 57) & 0x1f)
|
||||
}
|
||||
|
||||
func rightToIndex(right uint64) (int, error) {
|
||||
idx := capidxbit(right)
|
||||
if idx < 0 || idx >= len(bit2idx) {
|
||||
return -2, fmt.Errorf("index for right 0x%x out of range", right)
|
||||
}
|
||||
return bit2idx[idx], nil
|
||||
}
|
||||
|
||||
func caprver(right uint64) int {
|
||||
return int(right >> 62)
|
||||
}
|
||||
|
||||
func capver(rights *CapRights) int {
|
||||
return caprver(rights.Rights[0])
|
||||
}
|
||||
|
||||
func caparsize(rights *CapRights) int {
|
||||
return capver(rights) + 2
|
||||
}
|
||||
|
||||
// CapRightsSet sets the permissions in setrights in rights.
|
||||
func CapRightsSet(rights *CapRights, setrights []uint64) error {
|
||||
// This is essentially a copy of cap_rights_vset()
|
||||
if capver(rights) != CAP_RIGHTS_VERSION_00 {
|
||||
return fmt.Errorf("bad rights version %d", capver(rights))
|
||||
}
|
||||
|
||||
n := caparsize(rights)
|
||||
if n < capArSizeMin || n > capArSizeMax {
|
||||
return errorspkg.New("bad rights size")
|
||||
}
|
||||
|
||||
for _, right := range setrights {
|
||||
if caprver(right) != CAP_RIGHTS_VERSION_00 {
|
||||
return errorspkg.New("bad right version")
|
||||
}
|
||||
i, err := rightToIndex(right)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if i >= n {
|
||||
return errorspkg.New("index overflow")
|
||||
}
|
||||
if capidxbit(rights.Rights[i]) != capidxbit(right) {
|
||||
return errorspkg.New("index mismatch")
|
||||
}
|
||||
rights.Rights[i] |= right
|
||||
if capidxbit(rights.Rights[i]) != capidxbit(right) {
|
||||
return errorspkg.New("index mismatch (after assign)")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CapRightsClear clears the permissions in clearrights from rights.
|
||||
func CapRightsClear(rights *CapRights, clearrights []uint64) error {
|
||||
// This is essentially a copy of cap_rights_vclear()
|
||||
if capver(rights) != CAP_RIGHTS_VERSION_00 {
|
||||
return fmt.Errorf("bad rights version %d", capver(rights))
|
||||
}
|
||||
|
||||
n := caparsize(rights)
|
||||
if n < capArSizeMin || n > capArSizeMax {
|
||||
return errorspkg.New("bad rights size")
|
||||
}
|
||||
|
||||
for _, right := range clearrights {
|
||||
if caprver(right) != CAP_RIGHTS_VERSION_00 {
|
||||
return errorspkg.New("bad right version")
|
||||
}
|
||||
i, err := rightToIndex(right)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if i >= n {
|
||||
return errorspkg.New("index overflow")
|
||||
}
|
||||
if capidxbit(rights.Rights[i]) != capidxbit(right) {
|
||||
return errorspkg.New("index mismatch")
|
||||
}
|
||||
rights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF)
|
||||
if capidxbit(rights.Rights[i]) != capidxbit(right) {
|
||||
return errorspkg.New("index mismatch (after assign)")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CapRightsIsSet checks whether all the permissions in setrights are present in rights.
|
||||
func CapRightsIsSet(rights *CapRights, setrights []uint64) (bool, error) {
|
||||
// This is essentially a copy of cap_rights_is_vset()
|
||||
if capver(rights) != CAP_RIGHTS_VERSION_00 {
|
||||
return false, fmt.Errorf("bad rights version %d", capver(rights))
|
||||
}
|
||||
|
||||
n := caparsize(rights)
|
||||
if n < capArSizeMin || n > capArSizeMax {
|
||||
return false, errorspkg.New("bad rights size")
|
||||
}
|
||||
|
||||
for _, right := range setrights {
|
||||
if caprver(right) != CAP_RIGHTS_VERSION_00 {
|
||||
return false, errorspkg.New("bad right version")
|
||||
}
|
||||
i, err := rightToIndex(right)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if i >= n {
|
||||
return false, errorspkg.New("index overflow")
|
||||
}
|
||||
if capidxbit(rights.Rights[i]) != capidxbit(right) {
|
||||
return false, errorspkg.New("index mismatch")
|
||||
}
|
||||
if (rights.Rights[i] & right) != right {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func capright(idx uint64, bit uint64) uint64 {
|
||||
return ((1 << (57 + idx)) | bit)
|
||||
}
|
||||
|
||||
// CapRightsInit returns a pointer to an initialised CapRights structure filled with rights.
|
||||
// See man cap_rights_init(3) and rights(4).
|
||||
func CapRightsInit(rights []uint64) (*CapRights, error) {
|
||||
var r CapRights
|
||||
r.Rights[0] = (capRightsGoVersion << 62) | capright(0, 0)
|
||||
r.Rights[1] = capright(1, 0)
|
||||
|
||||
err := CapRightsSet(&r, rights)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &r, nil
|
||||
}
|
||||
|
||||
// CapRightsLimit reduces the operations permitted on fd to at most those contained in rights.
|
||||
// The capability rights on fd can never be increased by CapRightsLimit.
|
||||
// See man cap_rights_limit(2) and rights(4).
|
||||
func CapRightsLimit(fd uintptr, rights *CapRights) error {
|
||||
return capRightsLimit(int(fd), rights)
|
||||
}
|
||||
|
||||
// CapRightsGet returns a CapRights structure containing the operations permitted on fd.
|
||||
// See man cap_rights_get(3) and rights(4).
|
||||
func CapRightsGet(fd uintptr) (*CapRights, error) {
|
||||
r, err := CapRightsInit(nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = capRightsGet(capRightsGoVersion, int(fd), r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return r, nil
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// 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
|
||||
}
|
|
@ -0,0 +1,227 @@
|
|||
// 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
|
||||
)
|
|
@ -0,0 +1,227 @@
|
|||
// 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
|
||||
)
|
|
@ -0,0 +1,226 @@
|
|||
// 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
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
// 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
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// FIXME: unexported function from os
|
||||
// syscallMode returns the syscall-specific mode bits from Go's portable mode bits.
|
||||
func syscallMode(i os.FileMode) (o uint32) {
|
||||
o |= uint32(i.Perm())
|
||||
if i&os.ModeSetuid != 0 {
|
||||
o |= syscall.S_ISUID
|
||||
}
|
||||
if i&os.ModeSetgid != 0 {
|
||||
o |= syscall.S_ISGID
|
||||
}
|
||||
if i&os.ModeSticky != 0 {
|
||||
o |= syscall.S_ISVTX
|
||||
}
|
||||
// No mapping for Go's ModeTemporary (plan9 only).
|
||||
return
|
||||
}
|
|
@ -1,5 +1,3 @@
|
|||
// +build linux darwin freebsd openbsd netbsd dragonfly
|
||||
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
|
|
@ -561,13 +561,19 @@ func Utimes(path string, tv []Timeval) error {
|
|||
|
||||
func UtimesNano(path string, ts []Timespec) error {
|
||||
if ts == nil {
|
||||
err := utimensat(AT_FDCWD, path, nil, 0)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
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 {
|
||||
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
|
||||
// Timeval have different types in the different OSes
|
||||
tv := [2]Timeval{
|
||||
|
@ -577,6 +583,16 @@ func UtimesNano(path string, ts []Timespec) error {
|
|||
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)
|
||||
|
||||
func Futimes(fd int, tv []Timeval) error {
|
||||
|
@ -594,9 +610,6 @@ func Futimes(fd int, tv []Timeval) error {
|
|||
// TODO: wrap
|
||||
// Acct(name nil-string) (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)
|
||||
|
||||
var mapper = &mmapper{
|
||||
|
@ -612,3 +625,11 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
|
|||
func Munmap(b []byte) (err error) {
|
||||
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)
|
||||
|
|
|
@ -187,6 +187,11 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
|
||||
// Darwin doesn't support SYS_UTIMENSAT
|
||||
return ENOSYS
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrapped
|
||||
*/
|
||||
|
@ -195,6 +200,45 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
|
||||
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
|
||||
*/
|
||||
|
@ -210,10 +254,13 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
|
|||
//sys Dup2(from int, to int) (err error)
|
||||
//sys Exchangedata(path1 string, path2 string, options int) (err error)
|
||||
//sys Exit(code int)
|
||||
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
|
||||
//sys Fchdir(fd int) (err error)
|
||||
//sys Fchflags(fd int, flags int) (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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||
//sys Flock(fd int, how int) (err error)
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
|
@ -238,23 +285,23 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
|
|||
//sys Kqueue() (fd int, err error)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Link(path string, link string) (err error)
|
||||
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
|
||||
//sys Listen(s int, backlog int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||
//sys Mkdir(path string, mode uint32) (err error)
|
||||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||
//sys Mkfifo(path string, mode uint32) (err error)
|
||||
//sys Mknod(path string, mode uint32, dev int) (err error)
|
||||
//sys 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 Openat(dirfd int, path string, mode int, perm uint32) (fd 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 Pwrite(fd int, p []byte, offset int64) (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 Readlinkat(dirfd int, path string, buf []byte) (n int, 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 Rmdir(path string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
|
||||
|
@ -275,11 +322,13 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
|
|||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
||||
//sys Symlink(path string, link string) (err error)
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Sync() (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Umask(newmask int) (oldmask int)
|
||||
//sys Undelete(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 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)
|
||||
|
@ -319,9 +368,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
|
|||
// Add_profil
|
||||
// Kdebug_trace
|
||||
// Sigreturn
|
||||
// Mmap
|
||||
// Mlock
|
||||
// Munlock
|
||||
// Atsocket
|
||||
// Kqueue_from_portset_np
|
||||
// Kqueue_portset
|
||||
|
@ -414,8 +460,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
|
|||
// Lio_listio
|
||||
// __pthread_cond_wait
|
||||
// Iopolicysys
|
||||
// Mlockall
|
||||
// Munlockall
|
||||
// __pthread_kill
|
||||
// __pthread_sigmask
|
||||
// __sigwait
|
||||
|
@ -469,7 +513,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
|
|||
// Sendmsg_nocancel
|
||||
// Recvfrom_nocancel
|
||||
// Accept_nocancel
|
||||
// Msync_nocancel
|
||||
// Fcntl_nocancel
|
||||
// Select_nocancel
|
||||
// Fsync_nocancel
|
||||
|
|
|
@ -11,8 +11,6 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
|
||||
|
||||
func Getpagesize() int { return 4096 }
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
|
|
@ -174,11 +174,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
//sys Mkdir(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 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 Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
//sys Pathconf(path string, name int) (val int, err error)
|
||||
|
@ -218,6 +213,7 @@ 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 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 utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
|
@ -252,9 +248,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// Add_profil
|
||||
// Kdebug_trace
|
||||
// Sigreturn
|
||||
// Mmap
|
||||
// Mlock
|
||||
// Munlock
|
||||
// Atsocket
|
||||
// Kqueue_from_portset_np
|
||||
// Kqueue_portset
|
||||
|
@ -347,8 +340,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// Lio_listio
|
||||
// __pthread_cond_wait
|
||||
// Iopolicysys
|
||||
// Mlockall
|
||||
// Munlockall
|
||||
// __pthread_kill
|
||||
// __pthread_sigmask
|
||||
// __sigwait
|
||||
|
@ -401,7 +392,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// Sendmsg_nocancel
|
||||
// Recvfrom_nocancel
|
||||
// Accept_nocancel
|
||||
// Msync_nocancel
|
||||
// Fcntl_nocancel
|
||||
// Select_nocancel
|
||||
// Fsync_nocancel
|
||||
|
|
|
@ -352,11 +352,53 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
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
|
||||
*/
|
||||
//sys Access(path string, mode uint32) (err error)
|
||||
//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
|
||||
//sys CapEnter() (err error)
|
||||
//sys capRightsGet(version int, fd int, rightsp *CapRights) (err error) = SYS___CAP_RIGHTS_GET
|
||||
//sys capRightsLimit(fd int, rightsp *CapRights) (err error)
|
||||
//sys Chdir(path string) (err error)
|
||||
//sys Chflags(path string, flags int) (err error)
|
||||
//sys Chmod(path string, mode uint32) (err error)
|
||||
|
@ -379,10 +421,13 @@ func Llistxattr(link string, dest []byte) (sz int, 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 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 Fchflags(fd int, flags int) (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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||
//sys Flock(fd int, how int) (err error)
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
@ -409,24 +454,24 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
//sys Kqueue() (fd int, err error)
|
||||
//sys Lchown(path string, uid int, gid int) (err error)
|
||||
//sys Link(path string, link string) (err error)
|
||||
//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
|
||||
//sys Listen(s int, backlog int) (err error)
|
||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||
//sys Mkdir(path string, mode uint32) (err error)
|
||||
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
|
||||
//sys Mkfifo(path string, mode uint32) (err error)
|
||||
//sys Mknod(path string, mode uint32, dev int) (err error)
|
||||
//sys 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 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 Pathconf(path string, name int) (val 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 read(fd int, p []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 Renameat(fromfd int, from string, tofd int, to string) (err error)
|
||||
//sys Revoke(path string) (err error)
|
||||
//sys Rmdir(path string) (err error)
|
||||
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
|
||||
|
@ -448,11 +493,13 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
//sys Stat(path string, stat *Stat_t) (err error)
|
||||
//sys Statfs(path string, stat *Statfs_t) (err error)
|
||||
//sys Symlink(path string, link string) (err error)
|
||||
//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Sync() (err error)
|
||||
//sys Truncate(path string, length int64) (err error)
|
||||
//sys Umask(newmask int) (oldmask int)
|
||||
//sys Undelete(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 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)
|
||||
|
@ -460,6 +507,7 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
//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 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
|
||||
|
@ -493,9 +541,6 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
// Add_profil
|
||||
// Kdebug_trace
|
||||
// Sigreturn
|
||||
// Mmap
|
||||
// Mlock
|
||||
// Munlock
|
||||
// Atsocket
|
||||
// Kqueue_from_portset_np
|
||||
// Kqueue_portset
|
||||
|
@ -588,8 +633,6 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
// Lio_listio
|
||||
// __pthread_cond_wait
|
||||
// Iopolicysys
|
||||
// Mlockall
|
||||
// Munlockall
|
||||
// __pthread_kill
|
||||
// __pthread_sigmask
|
||||
// __sigwait
|
||||
|
@ -642,7 +685,6 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
|
|||
// Sendmsg_nocancel
|
||||
// Recvfrom_nocancel
|
||||
// Accept_nocancel
|
||||
// Msync_nocancel
|
||||
// Fcntl_nocancel
|
||||
// Select_nocancel
|
||||
// Fsync_nocancel
|
||||
|
|
|
@ -57,11 +57,15 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
|||
|
||||
// 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) (err error) {
|
||||
func IoctlSetInt(fd int, req uint, value int) error {
|
||||
return ioctl(fd, req, uintptr(value))
|
||||
}
|
||||
|
||||
func IoctlSetTermios(fd int, req uint, value *Termios) (err error) {
|
||||
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)))
|
||||
}
|
||||
|
||||
|
@ -73,6 +77,12 @@ func IoctlGetInt(fd int, req uint) (int, error) {
|
|||
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)))
|
||||
|
@ -342,10 +352,14 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
|
|||
return
|
||||
}
|
||||
|
||||
func Mkfifo(path string, mode uint32) (err error) {
|
||||
func Mkfifo(path string, mode uint32) error {
|
||||
return Mknod(path, mode|S_IFIFO, 0)
|
||||
}
|
||||
|
||||
func Mkfifoat(dirfd int, path string, mode uint32) error {
|
||||
return Mknodat(dirfd, path, mode|S_IFIFO, 0)
|
||||
}
|
||||
|
||||
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||
if sa.Port < 0 || sa.Port > 0xFFFF {
|
||||
return nil, 0, EINVAL
|
||||
|
@ -1265,6 +1279,7 @@ func Setgid(uid 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 Sync()
|
||||
//sys Syncfs(fd int) (err error)
|
||||
//sysnb Sysinfo(info *Sysinfo_t) (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)
|
||||
|
@ -1299,8 +1314,9 @@ func Munmap(b []byte) (err error) {
|
|||
//sys Madvise(b []byte, advice int) (err error)
|
||||
//sys Mprotect(b []byte, prot int) (err error)
|
||||
//sys Mlock(b []byte) (err error)
|
||||
//sys Munlock(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 Munlockall() (err error)
|
||||
|
||||
// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
|
||||
|
@ -1368,7 +1384,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
|||
// ModifyLdt
|
||||
// Mount
|
||||
// MovePages
|
||||
// Mprotect
|
||||
// MqGetsetattr
|
||||
// MqNotify
|
||||
// MqOpen
|
||||
|
@ -1380,7 +1395,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
|||
// Msgget
|
||||
// Msgrcv
|
||||
// Msgsnd
|
||||
// Msync
|
||||
// Newfstatat
|
||||
// Nfsservctl
|
||||
// Personality
|
||||
|
|
|
@ -170,11 +170,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
//sys Mkdir(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 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 Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
//sys Pathconf(path string, name int) (val int, err error)
|
||||
|
@ -210,6 +205,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||
//sys munmap(addr uintptr, length uintptr) (err error)
|
||||
//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 utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
|
|
|
@ -149,11 +149,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
//sys Mkdir(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 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 Open(path string, mode int, perm uint32) (fd int, err error)
|
||||
//sys Pathconf(path string, name int) (val int, err error)
|
||||
|
@ -193,6 +188,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, 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 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
|
||||
|
@ -282,6 +278,5 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
|||
// thrsleep
|
||||
// thrwakeup
|
||||
// unlinkat
|
||||
// utimensat
|
||||
// vfork
|
||||
// writev
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
// 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)
|
||||
}
|
|
@ -581,6 +581,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, 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 Fdatasync(fd int) (err error)
|
||||
//sys Flock(fd int, how int) (err error)
|
||||
//sys Fpathconf(fd int, name int) (val int, err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
//sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -m32
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build 386,darwin
|
||||
|
||||
|
@ -48,6 +48,7 @@ const (
|
|||
AF_UNIX = 0x1
|
||||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -138,9 +139,26 @@ const (
|
|||
BPF_W = 0x0
|
||||
BPF_X = 0x8
|
||||
BRKINT = 0x2
|
||||
BS0 = 0x0
|
||||
BS1 = 0x8000
|
||||
BSDLY = 0x8000
|
||||
CFLUSH = 0xf
|
||||
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
|
||||
CRTSCTS = 0x30000
|
||||
CS5 = 0x0
|
||||
CS6 = 0x100
|
||||
CS7 = 0x200
|
||||
|
@ -332,13 +350,14 @@ const (
|
|||
ECHONL = 0x10
|
||||
ECHOPRT = 0x20
|
||||
EVFILT_AIO = -0x3
|
||||
EVFILT_EXCEPT = -0xf
|
||||
EVFILT_FS = -0x9
|
||||
EVFILT_MACHPORT = -0x8
|
||||
EVFILT_PROC = -0x5
|
||||
EVFILT_READ = -0x1
|
||||
EVFILT_SIGNAL = -0x6
|
||||
EVFILT_SYSCOUNT = 0xe
|
||||
EVFILT_THREADMARKER = 0xe
|
||||
EVFILT_SYSCOUNT = 0xf
|
||||
EVFILT_THREADMARKER = 0xf
|
||||
EVFILT_TIMER = -0x7
|
||||
EVFILT_USER = -0xa
|
||||
EVFILT_VM = -0xc
|
||||
|
@ -349,6 +368,7 @@ const (
|
|||
EV_DELETE = 0x2
|
||||
EV_DISABLE = 0x8
|
||||
EV_DISPATCH = 0x80
|
||||
EV_DISPATCH2 = 0x180
|
||||
EV_ENABLE = 0x4
|
||||
EV_EOF = 0x8000
|
||||
EV_ERROR = 0x4000
|
||||
|
@ -359,16 +379,25 @@ const (
|
|||
EV_POLL = 0x1000
|
||||
EV_RECEIPT = 0x40
|
||||
EV_SYSFLAGS = 0xf000
|
||||
EV_UDATA_SPECIFIC = 0x100
|
||||
EV_VANISHED = 0x200
|
||||
EXTA = 0x4b00
|
||||
EXTB = 0x9600
|
||||
EXTPROC = 0x800
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
F_ADDSIGS = 0x3b
|
||||
F_ALLOCATEALL = 0x4
|
||||
F_ALLOCATECONTIG = 0x2
|
||||
F_BARRIERFSYNC = 0x55
|
||||
F_CHECK_LV = 0x62
|
||||
F_CHKCLEAN = 0x29
|
||||
F_DUPFD = 0x0
|
||||
F_DUPFD_CLOEXEC = 0x43
|
||||
|
@ -770,11 +799,13 @@ const (
|
|||
MADV_FREE_REUSABLE = 0x7
|
||||
MADV_FREE_REUSE = 0x8
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0xa
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
MADV_WILLNEED = 0x3
|
||||
MADV_ZERO_WIRED_PAGES = 0x6
|
||||
MAP_ANON = 0x1000
|
||||
MAP_ANONYMOUS = 0x1000
|
||||
MAP_COPY = 0x2
|
||||
MAP_FILE = 0x0
|
||||
MAP_FIXED = 0x10
|
||||
|
@ -786,9 +817,43 @@ const (
|
|||
MAP_PRIVATE = 0x2
|
||||
MAP_RENAME = 0x20
|
||||
MAP_RESERVED0080 = 0x80
|
||||
MAP_RESILIENT_CODESIGN = 0x2000
|
||||
MAP_RESILIENT_MEDIA = 0x4000
|
||||
MAP_SHARED = 0x1
|
||||
MCL_CURRENT = 0x1
|
||||
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_DONTROUTE = 0x4
|
||||
MSG_DONTWAIT = 0x80
|
||||
|
@ -819,7 +884,13 @@ const (
|
|||
NET_RT_MAXID = 0xa
|
||||
NET_RT_STAT = 0x4
|
||||
NET_RT_TRASH = 0x5
|
||||
NL0 = 0x0
|
||||
NL1 = 0x100
|
||||
NL2 = 0x200
|
||||
NL3 = 0x300
|
||||
NLDLY = 0x300
|
||||
NOFLSH = 0x80000000
|
||||
NOKERNINFO = 0x2000000
|
||||
NOTE_ABSOLUTE = 0x8
|
||||
NOTE_ATTRIB = 0x8
|
||||
NOTE_BACKGROUND = 0x40
|
||||
|
@ -843,11 +914,14 @@ const (
|
|||
NOTE_FFNOP = 0x0
|
||||
NOTE_FFOR = 0x80000000
|
||||
NOTE_FORK = 0x40000000
|
||||
NOTE_FUNLOCK = 0x100
|
||||
NOTE_LEEWAY = 0x10
|
||||
NOTE_LINK = 0x10
|
||||
NOTE_LOWAT = 0x1
|
||||
NOTE_MACH_CONTINUOUS_TIME = 0x80
|
||||
NOTE_NONE = 0x80
|
||||
NOTE_NSECONDS = 0x4
|
||||
NOTE_OOB = 0x2
|
||||
NOTE_PCTRLMASK = -0x100000
|
||||
NOTE_PDATAMASK = 0xfffff
|
||||
NOTE_REAP = 0x10000000
|
||||
|
@ -872,6 +946,7 @@ const (
|
|||
ONOCR = 0x20
|
||||
ONOEOT = 0x8
|
||||
OPOST = 0x1
|
||||
OXTABS = 0x4
|
||||
O_ACCMODE = 0x3
|
||||
O_ALERT = 0x20000000
|
||||
O_APPEND = 0x8
|
||||
|
@ -880,6 +955,7 @@ const (
|
|||
O_CREAT = 0x200
|
||||
O_DIRECTORY = 0x100000
|
||||
O_DP_GETRAWENCRYPTED = 0x1
|
||||
O_DP_GETRAWUNENCRYPTED = 0x2
|
||||
O_DSYNC = 0x400000
|
||||
O_EVTONLY = 0x8000
|
||||
O_EXCL = 0x800
|
||||
|
@ -932,7 +1008,10 @@ const (
|
|||
RLIMIT_CPU_USAGE_MONITOR = 0x2
|
||||
RLIMIT_DATA = 0x2
|
||||
RLIMIT_FSIZE = 0x1
|
||||
RLIMIT_MEMLOCK = 0x6
|
||||
RLIMIT_NOFILE = 0x8
|
||||
RLIMIT_NPROC = 0x7
|
||||
RLIMIT_RSS = 0x5
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0x7fffffffffffffff
|
||||
RTAX_AUTHOR = 0x6
|
||||
|
@ -1102,6 +1181,8 @@ const (
|
|||
SO_LABEL = 0x1010
|
||||
SO_LINGER = 0x80
|
||||
SO_LINGER_SEC = 0x1080
|
||||
SO_NETSVC_MARKING_LEVEL = 0x1119
|
||||
SO_NET_SERVICE_TYPE = 0x1116
|
||||
SO_NKE = 0x1021
|
||||
SO_NOADDRERR = 0x1023
|
||||
SO_NOSIGPIPE = 0x1022
|
||||
|
@ -1157,11 +1238,22 @@ const (
|
|||
S_IXGRP = 0x8
|
||||
S_IXOTH = 0x1
|
||||
S_IXUSR = 0x40
|
||||
TAB0 = 0x0
|
||||
TAB1 = 0x400
|
||||
TAB2 = 0x800
|
||||
TAB3 = 0x4
|
||||
TABDLY = 0xc04
|
||||
TCIFLUSH = 0x1
|
||||
TCIOFF = 0x3
|
||||
TCIOFLUSH = 0x3
|
||||
TCION = 0x4
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCP_CONNECTIONTIMEOUT = 0x20
|
||||
TCP_CONNECTION_INFO = 0x106
|
||||
TCP_ENABLE_ECN = 0x104
|
||||
TCP_FASTOPEN = 0x105
|
||||
TCP_KEEPALIVE = 0x10
|
||||
TCP_KEEPCNT = 0x102
|
||||
TCP_KEEPINTVL = 0x101
|
||||
|
@ -1261,6 +1353,11 @@ const (
|
|||
VKILL = 0x5
|
||||
VLNEXT = 0xe
|
||||
VMIN = 0x10
|
||||
VM_LOADAVG = 0x2
|
||||
VM_MACHFACTOR = 0x4
|
||||
VM_MAXID = 0x6
|
||||
VM_METER = 0x1
|
||||
VM_SWAPUSAGE = 0x5
|
||||
VQUIT = 0x9
|
||||
VREPRINT = 0x6
|
||||
VSTART = 0xc
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -m64
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build amd64,darwin
|
||||
|
||||
|
@ -48,6 +48,7 @@ const (
|
|||
AF_UNIX = 0x1
|
||||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -138,9 +139,26 @@ const (
|
|||
BPF_W = 0x0
|
||||
BPF_X = 0x8
|
||||
BRKINT = 0x2
|
||||
BS0 = 0x0
|
||||
BS1 = 0x8000
|
||||
BSDLY = 0x8000
|
||||
CFLUSH = 0xf
|
||||
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
|
||||
CRTSCTS = 0x30000
|
||||
CS5 = 0x0
|
||||
CS6 = 0x100
|
||||
CS7 = 0x200
|
||||
|
@ -332,13 +350,14 @@ const (
|
|||
ECHONL = 0x10
|
||||
ECHOPRT = 0x20
|
||||
EVFILT_AIO = -0x3
|
||||
EVFILT_EXCEPT = -0xf
|
||||
EVFILT_FS = -0x9
|
||||
EVFILT_MACHPORT = -0x8
|
||||
EVFILT_PROC = -0x5
|
||||
EVFILT_READ = -0x1
|
||||
EVFILT_SIGNAL = -0x6
|
||||
EVFILT_SYSCOUNT = 0xe
|
||||
EVFILT_THREADMARKER = 0xe
|
||||
EVFILT_SYSCOUNT = 0xf
|
||||
EVFILT_THREADMARKER = 0xf
|
||||
EVFILT_TIMER = -0x7
|
||||
EVFILT_USER = -0xa
|
||||
EVFILT_VM = -0xc
|
||||
|
@ -349,6 +368,7 @@ const (
|
|||
EV_DELETE = 0x2
|
||||
EV_DISABLE = 0x8
|
||||
EV_DISPATCH = 0x80
|
||||
EV_DISPATCH2 = 0x180
|
||||
EV_ENABLE = 0x4
|
||||
EV_EOF = 0x8000
|
||||
EV_ERROR = 0x4000
|
||||
|
@ -359,16 +379,25 @@ const (
|
|||
EV_POLL = 0x1000
|
||||
EV_RECEIPT = 0x40
|
||||
EV_SYSFLAGS = 0xf000
|
||||
EV_UDATA_SPECIFIC = 0x100
|
||||
EV_VANISHED = 0x200
|
||||
EXTA = 0x4b00
|
||||
EXTB = 0x9600
|
||||
EXTPROC = 0x800
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
F_ADDSIGS = 0x3b
|
||||
F_ALLOCATEALL = 0x4
|
||||
F_ALLOCATECONTIG = 0x2
|
||||
F_BARRIERFSYNC = 0x55
|
||||
F_CHECK_LV = 0x62
|
||||
F_CHKCLEAN = 0x29
|
||||
F_DUPFD = 0x0
|
||||
F_DUPFD_CLOEXEC = 0x43
|
||||
|
@ -770,11 +799,13 @@ const (
|
|||
MADV_FREE_REUSABLE = 0x7
|
||||
MADV_FREE_REUSE = 0x8
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0xa
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
MADV_WILLNEED = 0x3
|
||||
MADV_ZERO_WIRED_PAGES = 0x6
|
||||
MAP_ANON = 0x1000
|
||||
MAP_ANONYMOUS = 0x1000
|
||||
MAP_COPY = 0x2
|
||||
MAP_FILE = 0x0
|
||||
MAP_FIXED = 0x10
|
||||
|
@ -786,9 +817,43 @@ const (
|
|||
MAP_PRIVATE = 0x2
|
||||
MAP_RENAME = 0x20
|
||||
MAP_RESERVED0080 = 0x80
|
||||
MAP_RESILIENT_CODESIGN = 0x2000
|
||||
MAP_RESILIENT_MEDIA = 0x4000
|
||||
MAP_SHARED = 0x1
|
||||
MCL_CURRENT = 0x1
|
||||
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_DONTROUTE = 0x4
|
||||
MSG_DONTWAIT = 0x80
|
||||
|
@ -819,7 +884,13 @@ const (
|
|||
NET_RT_MAXID = 0xa
|
||||
NET_RT_STAT = 0x4
|
||||
NET_RT_TRASH = 0x5
|
||||
NL0 = 0x0
|
||||
NL1 = 0x100
|
||||
NL2 = 0x200
|
||||
NL3 = 0x300
|
||||
NLDLY = 0x300
|
||||
NOFLSH = 0x80000000
|
||||
NOKERNINFO = 0x2000000
|
||||
NOTE_ABSOLUTE = 0x8
|
||||
NOTE_ATTRIB = 0x8
|
||||
NOTE_BACKGROUND = 0x40
|
||||
|
@ -843,11 +914,14 @@ const (
|
|||
NOTE_FFNOP = 0x0
|
||||
NOTE_FFOR = 0x80000000
|
||||
NOTE_FORK = 0x40000000
|
||||
NOTE_FUNLOCK = 0x100
|
||||
NOTE_LEEWAY = 0x10
|
||||
NOTE_LINK = 0x10
|
||||
NOTE_LOWAT = 0x1
|
||||
NOTE_MACH_CONTINUOUS_TIME = 0x80
|
||||
NOTE_NONE = 0x80
|
||||
NOTE_NSECONDS = 0x4
|
||||
NOTE_OOB = 0x2
|
||||
NOTE_PCTRLMASK = -0x100000
|
||||
NOTE_PDATAMASK = 0xfffff
|
||||
NOTE_REAP = 0x10000000
|
||||
|
@ -872,6 +946,7 @@ const (
|
|||
ONOCR = 0x20
|
||||
ONOEOT = 0x8
|
||||
OPOST = 0x1
|
||||
OXTABS = 0x4
|
||||
O_ACCMODE = 0x3
|
||||
O_ALERT = 0x20000000
|
||||
O_APPEND = 0x8
|
||||
|
@ -880,6 +955,7 @@ const (
|
|||
O_CREAT = 0x200
|
||||
O_DIRECTORY = 0x100000
|
||||
O_DP_GETRAWENCRYPTED = 0x1
|
||||
O_DP_GETRAWUNENCRYPTED = 0x2
|
||||
O_DSYNC = 0x400000
|
||||
O_EVTONLY = 0x8000
|
||||
O_EXCL = 0x800
|
||||
|
@ -932,7 +1008,10 @@ const (
|
|||
RLIMIT_CPU_USAGE_MONITOR = 0x2
|
||||
RLIMIT_DATA = 0x2
|
||||
RLIMIT_FSIZE = 0x1
|
||||
RLIMIT_MEMLOCK = 0x6
|
||||
RLIMIT_NOFILE = 0x8
|
||||
RLIMIT_NPROC = 0x7
|
||||
RLIMIT_RSS = 0x5
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0x7fffffffffffffff
|
||||
RTAX_AUTHOR = 0x6
|
||||
|
@ -1102,6 +1181,8 @@ const (
|
|||
SO_LABEL = 0x1010
|
||||
SO_LINGER = 0x80
|
||||
SO_LINGER_SEC = 0x1080
|
||||
SO_NETSVC_MARKING_LEVEL = 0x1119
|
||||
SO_NET_SERVICE_TYPE = 0x1116
|
||||
SO_NKE = 0x1021
|
||||
SO_NOADDRERR = 0x1023
|
||||
SO_NOSIGPIPE = 0x1022
|
||||
|
@ -1157,11 +1238,22 @@ const (
|
|||
S_IXGRP = 0x8
|
||||
S_IXOTH = 0x1
|
||||
S_IXUSR = 0x40
|
||||
TAB0 = 0x0
|
||||
TAB1 = 0x400
|
||||
TAB2 = 0x800
|
||||
TAB3 = 0x4
|
||||
TABDLY = 0xc04
|
||||
TCIFLUSH = 0x1
|
||||
TCIOFF = 0x3
|
||||
TCIOFLUSH = 0x3
|
||||
TCION = 0x4
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCP_CONNECTIONTIMEOUT = 0x20
|
||||
TCP_CONNECTION_INFO = 0x106
|
||||
TCP_ENABLE_ECN = 0x104
|
||||
TCP_FASTOPEN = 0x105
|
||||
TCP_KEEPALIVE = 0x10
|
||||
TCP_KEEPCNT = 0x102
|
||||
TCP_KEEPINTVL = 0x101
|
||||
|
@ -1261,6 +1353,11 @@ const (
|
|||
VKILL = 0x5
|
||||
VLNEXT = 0xe
|
||||
VMIN = 0x10
|
||||
VM_LOADAVG = 0x2
|
||||
VM_MACHFACTOR = 0x4
|
||||
VM_MAXID = 0x6
|
||||
VM_METER = 0x1
|
||||
VM_SWAPUSAGE = 0x5
|
||||
VQUIT = 0x9
|
||||
VREPRINT = 0x6
|
||||
VSTART = 0xc
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm,darwin
|
||||
|
||||
// Created by cgo -godefs - DO NOT EDIT
|
||||
// cgo -godefs -- _const.go
|
||||
|
||||
// +build arm,darwin
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
@ -48,6 +48,7 @@ const (
|
|||
AF_UNIX = 0x1
|
||||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -86,6 +87,7 @@ const (
|
|||
BIOCSBLEN = 0xc0044266
|
||||
BIOCSDLT = 0x80044278
|
||||
BIOCSETF = 0x80104267
|
||||
BIOCSETFNR = 0x8010427e
|
||||
BIOCSETIF = 0x8020426c
|
||||
BIOCSHDRCMPLT = 0x80044275
|
||||
BIOCSRSIG = 0x80044273
|
||||
|
@ -137,9 +139,26 @@ const (
|
|||
BPF_W = 0x0
|
||||
BPF_X = 0x8
|
||||
BRKINT = 0x2
|
||||
BS0 = 0x0
|
||||
BS1 = 0x8000
|
||||
BSDLY = 0x8000
|
||||
CFLUSH = 0xf
|
||||
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
|
||||
CRTSCTS = 0x30000
|
||||
CS5 = 0x0
|
||||
CS6 = 0x100
|
||||
CS7 = 0x200
|
||||
|
@ -152,33 +171,168 @@ const (
|
|||
CSUSP = 0x1a
|
||||
CTL_MAXNAME = 0xc
|
||||
CTL_NET = 0x4
|
||||
DLT_A429 = 0xb8
|
||||
DLT_A653_ICM = 0xb9
|
||||
DLT_AIRONET_HEADER = 0x78
|
||||
DLT_AOS = 0xde
|
||||
DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
|
||||
DLT_ARCNET = 0x7
|
||||
DLT_ARCNET_LINUX = 0x81
|
||||
DLT_ATM_CLIP = 0x13
|
||||
DLT_ATM_RFC1483 = 0xb
|
||||
DLT_AURORA = 0x7e
|
||||
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_CHDLC = 0x68
|
||||
DLT_CISCO_IOS = 0x76
|
||||
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_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_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_11 = 0x69
|
||||
DLT_IEEE802_11_RADIO = 0x7f
|
||||
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_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_PCI_EXP = 0x7d
|
||||
DLT_PFLOG = 0x75
|
||||
DLT_PFSYNC = 0x12
|
||||
DLT_PPI = 0xc0
|
||||
DLT_PPP = 0x9
|
||||
DLT_PPP_BSDOS = 0x10
|
||||
DLT_PPP_ETHER = 0x33
|
||||
DLT_PPP_PPPD = 0xa6
|
||||
DLT_PPP_SERIAL = 0x32
|
||||
DLT_PPP_WITH_DIR = 0xcc
|
||||
DLT_PPP_WITH_DIRECTION = 0xa6
|
||||
DLT_PRISM_HEADER = 0x77
|
||||
DLT_PRONET = 0x4
|
||||
DLT_RAIF1 = 0xc6
|
||||
DLT_RAW = 0xc
|
||||
DLT_RIO = 0x7c
|
||||
DLT_SCCP = 0x8e
|
||||
DLT_SITA = 0xc4
|
||||
DLT_SLIP = 0x8
|
||||
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_CHR = 0x2
|
||||
DT_DIR = 0x4
|
||||
|
@ -196,13 +350,14 @@ const (
|
|||
ECHONL = 0x10
|
||||
ECHOPRT = 0x20
|
||||
EVFILT_AIO = -0x3
|
||||
EVFILT_EXCEPT = -0xf
|
||||
EVFILT_FS = -0x9
|
||||
EVFILT_MACHPORT = -0x8
|
||||
EVFILT_PROC = -0x5
|
||||
EVFILT_READ = -0x1
|
||||
EVFILT_SIGNAL = -0x6
|
||||
EVFILT_SYSCOUNT = 0xe
|
||||
EVFILT_THREADMARKER = 0xe
|
||||
EVFILT_SYSCOUNT = 0xf
|
||||
EVFILT_THREADMARKER = 0xf
|
||||
EVFILT_TIMER = -0x7
|
||||
EVFILT_USER = -0xa
|
||||
EVFILT_VM = -0xc
|
||||
|
@ -213,6 +368,7 @@ const (
|
|||
EV_DELETE = 0x2
|
||||
EV_DISABLE = 0x8
|
||||
EV_DISPATCH = 0x80
|
||||
EV_DISPATCH2 = 0x180
|
||||
EV_ENABLE = 0x4
|
||||
EV_EOF = 0x8000
|
||||
EV_ERROR = 0x4000
|
||||
|
@ -223,16 +379,25 @@ const (
|
|||
EV_POLL = 0x1000
|
||||
EV_RECEIPT = 0x40
|
||||
EV_SYSFLAGS = 0xf000
|
||||
EV_UDATA_SPECIFIC = 0x100
|
||||
EV_VANISHED = 0x200
|
||||
EXTA = 0x4b00
|
||||
EXTB = 0x9600
|
||||
EXTPROC = 0x800
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
F_ADDSIGS = 0x3b
|
||||
F_ALLOCATEALL = 0x4
|
||||
F_ALLOCATECONTIG = 0x2
|
||||
F_BARRIERFSYNC = 0x55
|
||||
F_CHECK_LV = 0x62
|
||||
F_CHKCLEAN = 0x29
|
||||
F_DUPFD = 0x0
|
||||
F_DUPFD_CLOEXEC = 0x43
|
||||
|
@ -347,6 +512,7 @@ const (
|
|||
IFT_PDP = 0xff
|
||||
IFT_PFLOG = 0xf5
|
||||
IFT_PFSYNC = 0xf6
|
||||
IFT_PKTAP = 0xfe
|
||||
IFT_PPP = 0x17
|
||||
IFT_PROPMUX = 0x36
|
||||
IFT_PROPVIRTUAL = 0x35
|
||||
|
@ -515,7 +681,7 @@ const (
|
|||
IPV6_FAITH = 0x1d
|
||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||
IPV6_FRAGTTL = 0x78
|
||||
IPV6_FRAGTTL = 0x3c
|
||||
IPV6_FW_ADD = 0x1e
|
||||
IPV6_FW_DEL = 0x1f
|
||||
IPV6_FW_FLUSH = 0x20
|
||||
|
@ -633,11 +799,13 @@ const (
|
|||
MADV_FREE_REUSABLE = 0x7
|
||||
MADV_FREE_REUSE = 0x8
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0xa
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
MADV_WILLNEED = 0x3
|
||||
MADV_ZERO_WIRED_PAGES = 0x6
|
||||
MAP_ANON = 0x1000
|
||||
MAP_ANONYMOUS = 0x1000
|
||||
MAP_COPY = 0x2
|
||||
MAP_FILE = 0x0
|
||||
MAP_FIXED = 0x10
|
||||
|
@ -649,9 +817,43 @@ const (
|
|||
MAP_PRIVATE = 0x2
|
||||
MAP_RENAME = 0x20
|
||||
MAP_RESERVED0080 = 0x80
|
||||
MAP_RESILIENT_CODESIGN = 0x2000
|
||||
MAP_RESILIENT_MEDIA = 0x4000
|
||||
MAP_SHARED = 0x1
|
||||
MCL_CURRENT = 0x1
|
||||
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_DONTROUTE = 0x4
|
||||
MSG_DONTWAIT = 0x80
|
||||
|
@ -682,7 +884,13 @@ const (
|
|||
NET_RT_MAXID = 0xa
|
||||
NET_RT_STAT = 0x4
|
||||
NET_RT_TRASH = 0x5
|
||||
NL0 = 0x0
|
||||
NL1 = 0x100
|
||||
NL2 = 0x200
|
||||
NL3 = 0x300
|
||||
NLDLY = 0x300
|
||||
NOFLSH = 0x80000000
|
||||
NOKERNINFO = 0x2000000
|
||||
NOTE_ABSOLUTE = 0x8
|
||||
NOTE_ATTRIB = 0x8
|
||||
NOTE_BACKGROUND = 0x40
|
||||
|
@ -706,11 +914,14 @@ const (
|
|||
NOTE_FFNOP = 0x0
|
||||
NOTE_FFOR = 0x80000000
|
||||
NOTE_FORK = 0x40000000
|
||||
NOTE_FUNLOCK = 0x100
|
||||
NOTE_LEEWAY = 0x10
|
||||
NOTE_LINK = 0x10
|
||||
NOTE_LOWAT = 0x1
|
||||
NOTE_MACH_CONTINUOUS_TIME = 0x80
|
||||
NOTE_NONE = 0x80
|
||||
NOTE_NSECONDS = 0x4
|
||||
NOTE_OOB = 0x2
|
||||
NOTE_PCTRLMASK = -0x100000
|
||||
NOTE_PDATAMASK = 0xfffff
|
||||
NOTE_REAP = 0x10000000
|
||||
|
@ -735,6 +946,7 @@ const (
|
|||
ONOCR = 0x20
|
||||
ONOEOT = 0x8
|
||||
OPOST = 0x1
|
||||
OXTABS = 0x4
|
||||
O_ACCMODE = 0x3
|
||||
O_ALERT = 0x20000000
|
||||
O_APPEND = 0x8
|
||||
|
@ -743,6 +955,7 @@ const (
|
|||
O_CREAT = 0x200
|
||||
O_DIRECTORY = 0x100000
|
||||
O_DP_GETRAWENCRYPTED = 0x1
|
||||
O_DP_GETRAWUNENCRYPTED = 0x2
|
||||
O_DSYNC = 0x400000
|
||||
O_EVTONLY = 0x8000
|
||||
O_EXCL = 0x800
|
||||
|
@ -795,7 +1008,10 @@ const (
|
|||
RLIMIT_CPU_USAGE_MONITOR = 0x2
|
||||
RLIMIT_DATA = 0x2
|
||||
RLIMIT_FSIZE = 0x1
|
||||
RLIMIT_MEMLOCK = 0x6
|
||||
RLIMIT_NOFILE = 0x8
|
||||
RLIMIT_NPROC = 0x7
|
||||
RLIMIT_RSS = 0x5
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0x7fffffffffffffff
|
||||
RTAX_AUTHOR = 0x6
|
||||
|
@ -830,6 +1046,7 @@ const (
|
|||
RTF_LOCAL = 0x200000
|
||||
RTF_MODIFIED = 0x20
|
||||
RTF_MULTICAST = 0x800000
|
||||
RTF_NOIFREF = 0x2000
|
||||
RTF_PINNED = 0x100000
|
||||
RTF_PRCLONING = 0x10000
|
||||
RTF_PROTO1 = 0x8000
|
||||
|
@ -964,6 +1181,8 @@ const (
|
|||
SO_LABEL = 0x1010
|
||||
SO_LINGER = 0x80
|
||||
SO_LINGER_SEC = 0x1080
|
||||
SO_NETSVC_MARKING_LEVEL = 0x1119
|
||||
SO_NET_SERVICE_TYPE = 0x1116
|
||||
SO_NKE = 0x1021
|
||||
SO_NOADDRERR = 0x1023
|
||||
SO_NOSIGPIPE = 0x1022
|
||||
|
@ -1019,11 +1238,22 @@ const (
|
|||
S_IXGRP = 0x8
|
||||
S_IXOTH = 0x1
|
||||
S_IXUSR = 0x40
|
||||
TAB0 = 0x0
|
||||
TAB1 = 0x400
|
||||
TAB2 = 0x800
|
||||
TAB3 = 0x4
|
||||
TABDLY = 0xc04
|
||||
TCIFLUSH = 0x1
|
||||
TCIOFF = 0x3
|
||||
TCIOFLUSH = 0x3
|
||||
TCION = 0x4
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCP_CONNECTIONTIMEOUT = 0x20
|
||||
TCP_CONNECTION_INFO = 0x106
|
||||
TCP_ENABLE_ECN = 0x104
|
||||
TCP_FASTOPEN = 0x105
|
||||
TCP_KEEPALIVE = 0x10
|
||||
TCP_KEEPCNT = 0x102
|
||||
TCP_KEEPINTVL = 0x101
|
||||
|
@ -1123,6 +1353,11 @@ const (
|
|||
VKILL = 0x5
|
||||
VLNEXT = 0xe
|
||||
VMIN = 0x10
|
||||
VM_LOADAVG = 0x2
|
||||
VM_MACHFACTOR = 0x4
|
||||
VM_MAXID = 0x6
|
||||
VM_METER = 0x1
|
||||
VM_SWAPUSAGE = 0x5
|
||||
VQUIT = 0x9
|
||||
VREPRINT = 0x6
|
||||
VSTART = 0xc
|
||||
|
@ -1291,3 +1526,148 @@ const (
|
|||
SIGXCPU = syscall.Signal(0x18)
|
||||
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",
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mkerrors.sh -m64
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm64,darwin
|
||||
|
||||
|
@ -48,6 +48,7 @@ const (
|
|||
AF_UNIX = 0x1
|
||||
AF_UNSPEC = 0x0
|
||||
AF_UTUN = 0x26
|
||||
ALTWERASE = 0x200
|
||||
B0 = 0x0
|
||||
B110 = 0x6e
|
||||
B115200 = 0x1c200
|
||||
|
@ -138,9 +139,26 @@ const (
|
|||
BPF_W = 0x0
|
||||
BPF_X = 0x8
|
||||
BRKINT = 0x2
|
||||
BS0 = 0x0
|
||||
BS1 = 0x8000
|
||||
BSDLY = 0x8000
|
||||
CFLUSH = 0xf
|
||||
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
|
||||
CRTSCTS = 0x30000
|
||||
CS5 = 0x0
|
||||
CS6 = 0x100
|
||||
CS7 = 0x200
|
||||
|
@ -332,13 +350,14 @@ const (
|
|||
ECHONL = 0x10
|
||||
ECHOPRT = 0x20
|
||||
EVFILT_AIO = -0x3
|
||||
EVFILT_EXCEPT = -0xf
|
||||
EVFILT_FS = -0x9
|
||||
EVFILT_MACHPORT = -0x8
|
||||
EVFILT_PROC = -0x5
|
||||
EVFILT_READ = -0x1
|
||||
EVFILT_SIGNAL = -0x6
|
||||
EVFILT_SYSCOUNT = 0xe
|
||||
EVFILT_THREADMARKER = 0xe
|
||||
EVFILT_SYSCOUNT = 0xf
|
||||
EVFILT_THREADMARKER = 0xf
|
||||
EVFILT_TIMER = -0x7
|
||||
EVFILT_USER = -0xa
|
||||
EVFILT_VM = -0xc
|
||||
|
@ -349,6 +368,7 @@ const (
|
|||
EV_DELETE = 0x2
|
||||
EV_DISABLE = 0x8
|
||||
EV_DISPATCH = 0x80
|
||||
EV_DISPATCH2 = 0x180
|
||||
EV_ENABLE = 0x4
|
||||
EV_EOF = 0x8000
|
||||
EV_ERROR = 0x4000
|
||||
|
@ -359,16 +379,25 @@ const (
|
|||
EV_POLL = 0x1000
|
||||
EV_RECEIPT = 0x40
|
||||
EV_SYSFLAGS = 0xf000
|
||||
EV_UDATA_SPECIFIC = 0x100
|
||||
EV_VANISHED = 0x200
|
||||
EXTA = 0x4b00
|
||||
EXTB = 0x9600
|
||||
EXTPROC = 0x800
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FF1 = 0x4000
|
||||
FFDLY = 0x4000
|
||||
FLUSHO = 0x800000
|
||||
F_ADDFILESIGS = 0x3d
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
|
||||
F_ADDFILESIGS_RETURN = 0x61
|
||||
F_ADDSIGS = 0x3b
|
||||
F_ALLOCATEALL = 0x4
|
||||
F_ALLOCATECONTIG = 0x2
|
||||
F_BARRIERFSYNC = 0x55
|
||||
F_CHECK_LV = 0x62
|
||||
F_CHKCLEAN = 0x29
|
||||
F_DUPFD = 0x0
|
||||
F_DUPFD_CLOEXEC = 0x43
|
||||
|
@ -770,11 +799,13 @@ const (
|
|||
MADV_FREE_REUSABLE = 0x7
|
||||
MADV_FREE_REUSE = 0x8
|
||||
MADV_NORMAL = 0x0
|
||||
MADV_PAGEOUT = 0xa
|
||||
MADV_RANDOM = 0x1
|
||||
MADV_SEQUENTIAL = 0x2
|
||||
MADV_WILLNEED = 0x3
|
||||
MADV_ZERO_WIRED_PAGES = 0x6
|
||||
MAP_ANON = 0x1000
|
||||
MAP_ANONYMOUS = 0x1000
|
||||
MAP_COPY = 0x2
|
||||
MAP_FILE = 0x0
|
||||
MAP_FIXED = 0x10
|
||||
|
@ -786,9 +817,43 @@ const (
|
|||
MAP_PRIVATE = 0x2
|
||||
MAP_RENAME = 0x20
|
||||
MAP_RESERVED0080 = 0x80
|
||||
MAP_RESILIENT_CODESIGN = 0x2000
|
||||
MAP_RESILIENT_MEDIA = 0x4000
|
||||
MAP_SHARED = 0x1
|
||||
MCL_CURRENT = 0x1
|
||||
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_DONTROUTE = 0x4
|
||||
MSG_DONTWAIT = 0x80
|
||||
|
@ -819,7 +884,13 @@ const (
|
|||
NET_RT_MAXID = 0xa
|
||||
NET_RT_STAT = 0x4
|
||||
NET_RT_TRASH = 0x5
|
||||
NL0 = 0x0
|
||||
NL1 = 0x100
|
||||
NL2 = 0x200
|
||||
NL3 = 0x300
|
||||
NLDLY = 0x300
|
||||
NOFLSH = 0x80000000
|
||||
NOKERNINFO = 0x2000000
|
||||
NOTE_ABSOLUTE = 0x8
|
||||
NOTE_ATTRIB = 0x8
|
||||
NOTE_BACKGROUND = 0x40
|
||||
|
@ -843,11 +914,14 @@ const (
|
|||
NOTE_FFNOP = 0x0
|
||||
NOTE_FFOR = 0x80000000
|
||||
NOTE_FORK = 0x40000000
|
||||
NOTE_FUNLOCK = 0x100
|
||||
NOTE_LEEWAY = 0x10
|
||||
NOTE_LINK = 0x10
|
||||
NOTE_LOWAT = 0x1
|
||||
NOTE_MACH_CONTINUOUS_TIME = 0x80
|
||||
NOTE_NONE = 0x80
|
||||
NOTE_NSECONDS = 0x4
|
||||
NOTE_OOB = 0x2
|
||||
NOTE_PCTRLMASK = -0x100000
|
||||
NOTE_PDATAMASK = 0xfffff
|
||||
NOTE_REAP = 0x10000000
|
||||
|
@ -872,6 +946,7 @@ const (
|
|||
ONOCR = 0x20
|
||||
ONOEOT = 0x8
|
||||
OPOST = 0x1
|
||||
OXTABS = 0x4
|
||||
O_ACCMODE = 0x3
|
||||
O_ALERT = 0x20000000
|
||||
O_APPEND = 0x8
|
||||
|
@ -880,6 +955,7 @@ const (
|
|||
O_CREAT = 0x200
|
||||
O_DIRECTORY = 0x100000
|
||||
O_DP_GETRAWENCRYPTED = 0x1
|
||||
O_DP_GETRAWUNENCRYPTED = 0x2
|
||||
O_DSYNC = 0x400000
|
||||
O_EVTONLY = 0x8000
|
||||
O_EXCL = 0x800
|
||||
|
@ -932,7 +1008,10 @@ const (
|
|||
RLIMIT_CPU_USAGE_MONITOR = 0x2
|
||||
RLIMIT_DATA = 0x2
|
||||
RLIMIT_FSIZE = 0x1
|
||||
RLIMIT_MEMLOCK = 0x6
|
||||
RLIMIT_NOFILE = 0x8
|
||||
RLIMIT_NPROC = 0x7
|
||||
RLIMIT_RSS = 0x5
|
||||
RLIMIT_STACK = 0x3
|
||||
RLIM_INFINITY = 0x7fffffffffffffff
|
||||
RTAX_AUTHOR = 0x6
|
||||
|
@ -1102,6 +1181,8 @@ const (
|
|||
SO_LABEL = 0x1010
|
||||
SO_LINGER = 0x80
|
||||
SO_LINGER_SEC = 0x1080
|
||||
SO_NETSVC_MARKING_LEVEL = 0x1119
|
||||
SO_NET_SERVICE_TYPE = 0x1116
|
||||
SO_NKE = 0x1021
|
||||
SO_NOADDRERR = 0x1023
|
||||
SO_NOSIGPIPE = 0x1022
|
||||
|
@ -1157,11 +1238,22 @@ const (
|
|||
S_IXGRP = 0x8
|
||||
S_IXOTH = 0x1
|
||||
S_IXUSR = 0x40
|
||||
TAB0 = 0x0
|
||||
TAB1 = 0x400
|
||||
TAB2 = 0x800
|
||||
TAB3 = 0x4
|
||||
TABDLY = 0xc04
|
||||
TCIFLUSH = 0x1
|
||||
TCIOFF = 0x3
|
||||
TCIOFLUSH = 0x3
|
||||
TCION = 0x4
|
||||
TCOFLUSH = 0x2
|
||||
TCOOFF = 0x1
|
||||
TCOON = 0x2
|
||||
TCP_CONNECTIONTIMEOUT = 0x20
|
||||
TCP_CONNECTION_INFO = 0x106
|
||||
TCP_ENABLE_ECN = 0x104
|
||||
TCP_FASTOPEN = 0x105
|
||||
TCP_KEEPALIVE = 0x10
|
||||
TCP_KEEPCNT = 0x102
|
||||
TCP_KEEPINTVL = 0x101
|
||||
|
@ -1261,6 +1353,11 @@ const (
|
|||
VKILL = 0x5
|
||||
VLNEXT = 0xe
|
||||
VMIN = 0x10
|
||||
VM_LOADAVG = 0x2
|
||||
VM_MACHFACTOR = 0x4
|
||||
VM_MAXID = 0x6
|
||||
VM_METER = 0x1
|
||||
VM_SWAPUSAGE = 0x5
|
||||
VQUIT = 0x9
|
||||
VREPRINT = 0x6
|
||||
VSTART = 0xc
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1413,6 +1413,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1420,7 +1430,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1440,13 +1452,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1465,11 +1485,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x800
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1414,6 +1414,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1421,7 +1431,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1441,13 +1453,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1466,11 +1486,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x800
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1418,6 +1418,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1425,7 +1435,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1445,13 +1457,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1470,11 +1490,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x800
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1403,6 +1403,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1410,7 +1420,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1430,13 +1442,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1455,11 +1475,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x800
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1415,6 +1415,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x40047307
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1422,7 +1432,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1442,13 +1454,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1467,11 +1487,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x80
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1415,6 +1415,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x40047307
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1422,7 +1432,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1442,13 +1454,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1467,11 +1487,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x80
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1415,6 +1415,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x40047307
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1422,7 +1432,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1442,13 +1454,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1467,11 +1487,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x80
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1415,6 +1415,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x40047307
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1422,7 +1432,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1442,13 +1454,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x40047309
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x467f
|
||||
SIOCOUTQ = 0x7472
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1467,11 +1487,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x80047308
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x1
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x80
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1471,6 +1471,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1478,7 +1488,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1498,13 +1510,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x4004667f
|
||||
SIOCOUTQ = 0x40047473
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1523,11 +1543,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x800
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1471,6 +1471,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1478,7 +1488,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1498,13 +1510,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x4004667f
|
||||
SIOCOUTQ = 0x40047473
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1523,11 +1543,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x800
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1475,6 +1475,16 @@ const (
|
|||
SIOCADDMULTI = 0x8931
|
||||
SIOCADDRT = 0x890b
|
||||
SIOCATMARK = 0x8905
|
||||
SIOCBONDCHANGEACTIVE = 0x8995
|
||||
SIOCBONDENSLAVE = 0x8990
|
||||
SIOCBONDINFOQUERY = 0x8994
|
||||
SIOCBONDRELEASE = 0x8991
|
||||
SIOCBONDSETHWADDR = 0x8992
|
||||
SIOCBONDSLAVEINFOQUERY = 0x8993
|
||||
SIOCBRADDBR = 0x89a0
|
||||
SIOCBRADDIF = 0x89a2
|
||||
SIOCBRDELBR = 0x89a1
|
||||
SIOCBRDELIF = 0x89a3
|
||||
SIOCDARP = 0x8953
|
||||
SIOCDELDLCI = 0x8981
|
||||
SIOCDELMULTI = 0x8932
|
||||
|
@ -1482,7 +1492,9 @@ const (
|
|||
SIOCDEVPRIVATE = 0x89f0
|
||||
SIOCDIFADDR = 0x8936
|
||||
SIOCDRARP = 0x8960
|
||||
SIOCETHTOOL = 0x8946
|
||||
SIOCGARP = 0x8954
|
||||
SIOCGHWTSTAMP = 0x89b1
|
||||
SIOCGIFADDR = 0x8915
|
||||
SIOCGIFBR = 0x8940
|
||||
SIOCGIFBRDADDR = 0x8919
|
||||
|
@ -1502,13 +1514,21 @@ const (
|
|||
SIOCGIFPFLAGS = 0x8935
|
||||
SIOCGIFSLAVE = 0x8929
|
||||
SIOCGIFTXQLEN = 0x8942
|
||||
SIOCGIFVLAN = 0x8982
|
||||
SIOCGMIIPHY = 0x8947
|
||||
SIOCGMIIREG = 0x8948
|
||||
SIOCGPGRP = 0x8904
|
||||
SIOCGRARP = 0x8961
|
||||
SIOCGSKNS = 0x894c
|
||||
SIOCGSTAMP = 0x8906
|
||||
SIOCGSTAMPNS = 0x8907
|
||||
SIOCINQ = 0x541b
|
||||
SIOCOUTQ = 0x5411
|
||||
SIOCOUTQNSD = 0x894b
|
||||
SIOCPROTOPRIVATE = 0x89e0
|
||||
SIOCRTMSG = 0x890d
|
||||
SIOCSARP = 0x8955
|
||||
SIOCSHWTSTAMP = 0x89b0
|
||||
SIOCSIFADDR = 0x8916
|
||||
SIOCSIFBR = 0x8941
|
||||
SIOCSIFBRDADDR = 0x891a
|
||||
|
@ -1527,11 +1547,15 @@ const (
|
|||
SIOCSIFPFLAGS = 0x8934
|
||||
SIOCSIFSLAVE = 0x8930
|
||||
SIOCSIFTXQLEN = 0x8943
|
||||
SIOCSIFVLAN = 0x8983
|
||||
SIOCSMIIREG = 0x8949
|
||||
SIOCSPGRP = 0x8902
|
||||
SIOCSRARP = 0x8962
|
||||
SIOCWANDEV = 0x894a
|
||||
SOCK_CLOEXEC = 0x80000
|
||||
SOCK_DCCP = 0x6
|
||||
SOCK_DGRAM = 0x2
|
||||
SOCK_IOC_TYPE = 0x89
|
||||
SOCK_NONBLOCK = 0x800
|
||||
SOCK_PACKET = 0xa
|
||||
SOCK_RAW = 0x3
|
||||
|
|
|
@ -1006,6 +1006,9 @@ const (
|
|||
MSG_TRUNC = 0x10
|
||||
MSG_USERFLAGS = 0xffffff
|
||||
MSG_WAITALL = 0x40
|
||||
MS_ASYNC = 0x1
|
||||
MS_INVALIDATE = 0x2
|
||||
MS_SYNC = 0x4
|
||||
NAME_MAX = 0x1ff
|
||||
NET_RT_DUMP = 0x1
|
||||
NET_RT_FLAGS = 0x2
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -l32 -tags darwin,386 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build darwin,386
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -456,6 +566,21 @@ func Exit(code int) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -486,6 +611,21 @@ func Fchmod(fd int, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -496,6 +636,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -745,6 +900,26 @@ func Link(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -785,6 +960,21 @@ func Mkdir(path string, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -815,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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 Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -899,6 +1021,22 @@ 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
|
||||
|
||||
func Openat(dirfd 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(dirfd), 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -988,6 +1126,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
|
@ -1008,6 +1168,26 @@ func Rename(from string, to string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1245,6 +1425,26 @@ func Symlink(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1308,6 +1508,21 @@ func Unlink(path string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build darwin,amd64
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -456,6 +566,21 @@ func Exit(code int) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -486,6 +611,21 @@ func Fchmod(fd int, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -496,6 +636,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -745,6 +900,26 @@ func Link(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -785,6 +960,21 @@ func Mkdir(path string, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -815,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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 Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -899,6 +1021,22 @@ 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
|
||||
|
||||
func Openat(dirfd 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(dirfd), 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -988,6 +1126,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
|
@ -1008,6 +1168,26 @@ func Rename(from string, to string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1245,6 +1425,26 @@ func Symlink(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1308,6 +1508,21 @@ func Unlink(path string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1383,21 +1598,6 @@ 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
|
||||
|
||||
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) {
|
||||
r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
|
||||
sec = int64(r0)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -l32 -tags darwin,arm syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// mksyscall.pl -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.
|
||||
|
||||
// +build darwin,arm
|
||||
|
||||
|
@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
|
|||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -456,6 +566,21 @@ func Exit(code int) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -486,6 +611,21 @@ func Fchmod(fd int, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -496,6 +636,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -745,6 +900,26 @@ func Link(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -785,6 +960,21 @@ func Mkdir(path string, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -815,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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 Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -899,6 +1021,22 @@ 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
|
||||
|
||||
func Openat(dirfd 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(dirfd), 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -988,6 +1126,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
|
@ -1008,6 +1168,26 @@ func Rename(from string, to string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1245,6 +1425,26 @@ func Symlink(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1308,6 +1508,21 @@ func Unlink(path string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build darwin,arm64
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -298,6 +398,16 @@ func kill(pid int, signum int, posix int) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -456,6 +566,21 @@ func Exit(code int) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -486,6 +611,21 @@ func Fchmod(fd int, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -496,6 +636,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -745,6 +900,26 @@ func Link(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -785,6 +960,21 @@ func Mkdir(path string, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -815,74 +1005,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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 Open(path string, mode int, perm uint32) (fd int, err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -899,6 +1021,22 @@ 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
|
||||
|
||||
func Openat(dirfd 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(dirfd), 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -988,6 +1126,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
|
@ -1008,6 +1168,26 @@ func Rename(from string, to string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1245,6 +1425,26 @@ func Symlink(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1308,6 +1508,21 @@ func Unlink(path string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
|
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
r = int(r0)
|
||||
|
@ -829,74 +929,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1391,3 +1423,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build freebsd,386
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
r = int(r0)
|
||||
|
@ -278,6 +378,16 @@ func pipe() (r int, w int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -303,6 +413,36 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -640,6 +780,21 @@ 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
|
||||
|
||||
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) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -670,6 +825,21 @@ func Fchmod(fd int, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -680,6 +850,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -949,6 +1134,26 @@ func Link(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -989,6 +1194,21 @@ func Mkdir(path string, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1019,74 +1239,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1113,6 +1265,22 @@ 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
|
||||
|
||||
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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1202,6 +1370,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
|
@ -1222,6 +1412,26 @@ func Rename(from string, to string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1469,6 +1679,26 @@ func Symlink(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1532,6 +1762,21 @@ func Unlink(path string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1615,3 +1860,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build freebsd,amd64
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
r = int(r0)
|
||||
|
@ -278,6 +378,16 @@ func pipe() (r int, w int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -303,6 +413,36 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -640,6 +780,21 @@ 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
|
||||
|
||||
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) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -670,6 +825,21 @@ func Fchmod(fd int, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -680,6 +850,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -949,6 +1134,26 @@ func Link(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -989,6 +1194,21 @@ func Mkdir(path string, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1019,74 +1239,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1113,6 +1265,22 @@ 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
|
||||
|
||||
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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1202,6 +1370,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
|
@ -1222,6 +1412,26 @@ func Rename(from string, to string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1469,6 +1679,26 @@ func Symlink(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1532,6 +1762,21 @@ func Unlink(path string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1615,3 +1860,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build freebsd,arm
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
r = int(r0)
|
||||
|
@ -278,6 +378,16 @@ func pipe() (r int, w int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -303,6 +413,36 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -640,6 +780,21 @@ 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
|
||||
|
||||
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) {
|
||||
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -670,6 +825,21 @@ func Fchmod(fd int, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
@ -680,6 +850,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -949,6 +1134,26 @@ func Link(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -989,6 +1194,21 @@ func Mkdir(path string, mode uint32) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1019,74 +1239,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1113,6 +1265,22 @@ 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
|
||||
|
||||
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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1202,6 +1370,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(from)
|
||||
|
@ -1222,6 +1412,26 @@ func Rename(from string, to string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1469,6 +1679,26 @@ func Symlink(path string, link string) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1532,6 +1762,21 @@ func Unlink(path string) (err error) {
|
|||
|
||||
// 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) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
@ -1615,3 +1860,18 @@ func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1234,6 +1234,16 @@ func Sync() {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1462,6 +1472,22 @@ func Mlockall(flags int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build netbsd,386
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
|
@ -777,74 +877,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1297,3 +1329,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build netbsd,amd64
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
|
@ -777,74 +877,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1297,3 +1329,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -l32 -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// mksyscall.pl -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build netbsd,arm
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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() (fd1 int, fd2 int, err error) {
|
||||
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||
fd1 = int(r0)
|
||||
|
@ -777,74 +877,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1297,3 +1329,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build openbsd,386
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -785,74 +885,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1355,3 +1387,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksyscall.pl -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
|
||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build openbsd,amd64
|
||||
|
||||
|
@ -266,6 +266,106 @@ 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
|
||||
|
||||
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(p *[2]_C_int) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
@ -785,74 +885,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
|
|||
|
||||
// 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) {
|
||||
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
||||
if e1 != 0 {
|
||||
|
@ -1355,3 +1387,18 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
|
|||
}
|
||||
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
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -43,6 +43,7 @@ import (
|
|||
//go:cgo_import_dynamic libc_fchown fchown "libc.so"
|
||||
//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
|
||||
//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so"
|
||||
//go:cgo_import_dynamic libc_flock flock "libc.so"
|
||||
//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
|
||||
//go:cgo_import_dynamic libc_fstat fstat "libc.so"
|
||||
//go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so"
|
||||
|
@ -163,6 +164,7 @@ import (
|
|||
//go:linkname procFchown libc_fchown
|
||||
//go:linkname procFchownat libc_fchownat
|
||||
//go:linkname procFdatasync libc_fdatasync
|
||||
//go:linkname procFlock libc_flock
|
||||
//go:linkname procFpathconf libc_fpathconf
|
||||
//go:linkname procFstat libc_fstat
|
||||
//go:linkname procFstatvfs libc_fstatvfs
|
||||
|
@ -284,6 +286,7 @@ var (
|
|||
procFchown,
|
||||
procFchownat,
|
||||
procFdatasync,
|
||||
procFlock,
|
||||
procFpathconf,
|
||||
procFstat,
|
||||
procFstatvfs,
|
||||
|
@ -702,6 +705,14 @@ func Fdatasync(fd int) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func Flock(fd int, how int) (err error) {
|
||||
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = e1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func Fpathconf(fd int, name int) (val int, err error) {
|
||||
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
|
||||
val = int(r0)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksysnum_darwin.pl /usr/include/sys/syscall.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm,darwin
|
||||
|
||||
|
@ -121,12 +121,14 @@ const (
|
|||
SYS_CSOPS = 169
|
||||
SYS_CSOPS_AUDITTOKEN = 170
|
||||
SYS_WAITID = 173
|
||||
SYS_KDEBUG_TYPEFILTER = 177
|
||||
SYS_KDEBUG_TRACE_STRING = 178
|
||||
SYS_KDEBUG_TRACE64 = 179
|
||||
SYS_KDEBUG_TRACE = 180
|
||||
SYS_SETGID = 181
|
||||
SYS_SETEGID = 182
|
||||
SYS_SETEUID = 183
|
||||
SYS_SIGRETURN = 184
|
||||
SYS_CHUD = 185
|
||||
SYS_FDATASYNC = 187
|
||||
SYS_STAT = 188
|
||||
SYS_FSTAT = 189
|
||||
|
@ -140,17 +142,10 @@ const (
|
|||
SYS_LSEEK = 199
|
||||
SYS_TRUNCATE = 200
|
||||
SYS_FTRUNCATE = 201
|
||||
SYS___SYSCTL = 202
|
||||
SYS_SYSCTL = 202
|
||||
SYS_MLOCK = 203
|
||||
SYS_MUNLOCK = 204
|
||||
SYS_UNDELETE = 205
|
||||
SYS_ATSOCKET = 206
|
||||
SYS_ATGETMSG = 207
|
||||
SYS_ATPUTMSG = 208
|
||||
SYS_ATPSNDREQ = 209
|
||||
SYS_ATPSNDRSP = 210
|
||||
SYS_ATPGETREQ = 211
|
||||
SYS_ATPGETRSP = 212
|
||||
SYS_OPEN_DPROTECTED_NP = 216
|
||||
SYS_GETATTRLIST = 220
|
||||
SYS_SETATTRLIST = 221
|
||||
|
@ -202,9 +197,7 @@ const (
|
|||
SYS_SEM_WAIT = 271
|
||||
SYS_SEM_TRYWAIT = 272
|
||||
SYS_SEM_POST = 273
|
||||
SYS_SEM_GETVALUE = 274
|
||||
SYS_SEM_INIT = 275
|
||||
SYS_SEM_DESTROY = 276
|
||||
SYS_SYSCTLBYNAME = 274
|
||||
SYS_OPEN_EXTENDED = 277
|
||||
SYS_UMASK_EXTENDED = 278
|
||||
SYS_STAT_EXTENDED = 279
|
||||
|
@ -286,7 +279,6 @@ const (
|
|||
SYS_KQUEUE = 362
|
||||
SYS_KEVENT = 363
|
||||
SYS_LCHOWN = 364
|
||||
SYS_STACK_SNAPSHOT = 365
|
||||
SYS_BSDTHREAD_REGISTER = 366
|
||||
SYS_WORKQ_OPEN = 367
|
||||
SYS_WORKQ_KERNRETURN = 368
|
||||
|
@ -295,6 +287,7 @@ const (
|
|||
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
|
||||
SYS_THREAD_SELFID = 372
|
||||
SYS_LEDGER = 373
|
||||
SYS_KEVENT_QOS = 374
|
||||
SYS___MAC_EXECVE = 380
|
||||
SYS___MAC_SYSCALL = 381
|
||||
SYS___MAC_GET_FILE = 382
|
||||
|
@ -306,11 +299,8 @@ const (
|
|||
SYS___MAC_GET_FD = 388
|
||||
SYS___MAC_SET_FD = 389
|
||||
SYS___MAC_GET_PID = 390
|
||||
SYS___MAC_GET_LCID = 391
|
||||
SYS___MAC_GET_LCTX = 392
|
||||
SYS___MAC_SET_LCTX = 393
|
||||
SYS_SETLCID = 394
|
||||
SYS_GETLCID = 395
|
||||
SYS_PSELECT = 394
|
||||
SYS_PSELECT_NOCANCEL = 395
|
||||
SYS_READ_NOCANCEL = 396
|
||||
SYS_WRITE_NOCANCEL = 397
|
||||
SYS_OPEN_NOCANCEL = 398
|
||||
|
@ -354,5 +344,83 @@ const (
|
|||
SYS_PID_SHUTDOWN_SOCKETS = 436
|
||||
SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
|
||||
SYS_KAS_INFO = 439
|
||||
SYS_MAXSYSCALL = 440
|
||||
SYS_MEMORYSTATUS_CONTROL = 440
|
||||
SYS_GUARDED_OPEN_NP = 441
|
||||
SYS_GUARDED_CLOSE_NP = 442
|
||||
SYS_GUARDED_KQUEUE_NP = 443
|
||||
SYS_CHANGE_FDGUARD_NP = 444
|
||||
SYS_USRCTL = 445
|
||||
SYS_PROC_RLIMIT_CONTROL = 446
|
||||
SYS_CONNECTX = 447
|
||||
SYS_DISCONNECTX = 448
|
||||
SYS_PEELOFF = 449
|
||||
SYS_SOCKET_DELEGATE = 450
|
||||
SYS_TELEMETRY = 451
|
||||
SYS_PROC_UUID_POLICY = 452
|
||||
SYS_MEMORYSTATUS_GET_LEVEL = 453
|
||||
SYS_SYSTEM_OVERRIDE = 454
|
||||
SYS_VFS_PURGE = 455
|
||||
SYS_SFI_CTL = 456
|
||||
SYS_SFI_PIDCTL = 457
|
||||
SYS_COALITION = 458
|
||||
SYS_COALITION_INFO = 459
|
||||
SYS_NECP_MATCH_POLICY = 460
|
||||
SYS_GETATTRLISTBULK = 461
|
||||
SYS_CLONEFILEAT = 462
|
||||
SYS_OPENAT = 463
|
||||
SYS_OPENAT_NOCANCEL = 464
|
||||
SYS_RENAMEAT = 465
|
||||
SYS_FACCESSAT = 466
|
||||
SYS_FCHMODAT = 467
|
||||
SYS_FCHOWNAT = 468
|
||||
SYS_FSTATAT = 469
|
||||
SYS_FSTATAT64 = 470
|
||||
SYS_LINKAT = 471
|
||||
SYS_UNLINKAT = 472
|
||||
SYS_READLINKAT = 473
|
||||
SYS_SYMLINKAT = 474
|
||||
SYS_MKDIRAT = 475
|
||||
SYS_GETATTRLISTAT = 476
|
||||
SYS_PROC_TRACE_LOG = 477
|
||||
SYS_BSDTHREAD_CTL = 478
|
||||
SYS_OPENBYID_NP = 479
|
||||
SYS_RECVMSG_X = 480
|
||||
SYS_SENDMSG_X = 481
|
||||
SYS_THREAD_SELFUSAGE = 482
|
||||
SYS_CSRCTL = 483
|
||||
SYS_GUARDED_OPEN_DPROTECTED_NP = 484
|
||||
SYS_GUARDED_WRITE_NP = 485
|
||||
SYS_GUARDED_PWRITE_NP = 486
|
||||
SYS_GUARDED_WRITEV_NP = 487
|
||||
SYS_RENAMEATX_NP = 488
|
||||
SYS_MREMAP_ENCRYPTED = 489
|
||||
SYS_NETAGENT_TRIGGER = 490
|
||||
SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
|
||||
SYS_MICROSTACKSHOT = 492
|
||||
SYS_GRAB_PGO_DATA = 493
|
||||
SYS_PERSONA = 494
|
||||
SYS_WORK_INTERVAL_CTL = 499
|
||||
SYS_GETENTROPY = 500
|
||||
SYS_NECP_OPEN = 501
|
||||
SYS_NECP_CLIENT_ACTION = 502
|
||||
SYS___NEXUS_OPEN = 503
|
||||
SYS___NEXUS_REGISTER = 504
|
||||
SYS___NEXUS_DEREGISTER = 505
|
||||
SYS___NEXUS_CREATE = 506
|
||||
SYS___NEXUS_DESTROY = 507
|
||||
SYS___NEXUS_GET_OPT = 508
|
||||
SYS___NEXUS_SET_OPT = 509
|
||||
SYS___CHANNEL_OPEN = 510
|
||||
SYS___CHANNEL_GET_INFO = 511
|
||||
SYS___CHANNEL_SYNC = 512
|
||||
SYS___CHANNEL_GET_OPT = 513
|
||||
SYS___CHANNEL_SET_OPT = 514
|
||||
SYS_ULOCK_WAIT = 515
|
||||
SYS_ULOCK_WAKE = 516
|
||||
SYS_FCLONEFILEAT = 517
|
||||
SYS_FS_SNAPSHOT = 518
|
||||
SYS_TERMINATE_WITH_PAYLOAD = 520
|
||||
SYS_ABORT_WITH_PAYLOAD = 521
|
||||
SYS_MAXSYSCALL = 522
|
||||
SYS_INVALID = 63
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/include/sys/syscall.h
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm64,darwin
|
||||
|
||||
|
@ -121,13 +121,14 @@ const (
|
|||
SYS_CSOPS = 169
|
||||
SYS_CSOPS_AUDITTOKEN = 170
|
||||
SYS_WAITID = 173
|
||||
SYS_KDEBUG_TYPEFILTER = 177
|
||||
SYS_KDEBUG_TRACE_STRING = 178
|
||||
SYS_KDEBUG_TRACE64 = 179
|
||||
SYS_KDEBUG_TRACE = 180
|
||||
SYS_SETGID = 181
|
||||
SYS_SETEGID = 182
|
||||
SYS_SETEUID = 183
|
||||
SYS_SIGRETURN = 184
|
||||
SYS_CHUD = 185
|
||||
SYS_FDATASYNC = 187
|
||||
SYS_STAT = 188
|
||||
SYS_FSTAT = 189
|
||||
|
@ -278,7 +279,6 @@ const (
|
|||
SYS_KQUEUE = 362
|
||||
SYS_KEVENT = 363
|
||||
SYS_LCHOWN = 364
|
||||
SYS_STACK_SNAPSHOT = 365
|
||||
SYS_BSDTHREAD_REGISTER = 366
|
||||
SYS_WORKQ_OPEN = 367
|
||||
SYS_WORKQ_KERNRETURN = 368
|
||||
|
@ -287,6 +287,7 @@ const (
|
|||
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
|
||||
SYS_THREAD_SELFID = 372
|
||||
SYS_LEDGER = 373
|
||||
SYS_KEVENT_QOS = 374
|
||||
SYS___MAC_EXECVE = 380
|
||||
SYS___MAC_SYSCALL = 381
|
||||
SYS___MAC_GET_FILE = 382
|
||||
|
@ -298,11 +299,8 @@ const (
|
|||
SYS___MAC_GET_FD = 388
|
||||
SYS___MAC_SET_FD = 389
|
||||
SYS___MAC_GET_PID = 390
|
||||
SYS___MAC_GET_LCID = 391
|
||||
SYS___MAC_GET_LCTX = 392
|
||||
SYS___MAC_SET_LCTX = 393
|
||||
SYS_SETLCID = 394
|
||||
SYS_GETLCID = 395
|
||||
SYS_PSELECT = 394
|
||||
SYS_PSELECT_NOCANCEL = 395
|
||||
SYS_READ_NOCANCEL = 396
|
||||
SYS_WRITE_NOCANCEL = 397
|
||||
SYS_OPEN_NOCANCEL = 398
|
||||
|
@ -351,6 +349,7 @@ const (
|
|||
SYS_GUARDED_CLOSE_NP = 442
|
||||
SYS_GUARDED_KQUEUE_NP = 443
|
||||
SYS_CHANGE_FDGUARD_NP = 444
|
||||
SYS_USRCTL = 445
|
||||
SYS_PROC_RLIMIT_CONTROL = 446
|
||||
SYS_CONNECTX = 447
|
||||
SYS_DISCONNECTX = 448
|
||||
|
@ -367,6 +366,7 @@ const (
|
|||
SYS_COALITION_INFO = 459
|
||||
SYS_NECP_MATCH_POLICY = 460
|
||||
SYS_GETATTRLISTBULK = 461
|
||||
SYS_CLONEFILEAT = 462
|
||||
SYS_OPENAT = 463
|
||||
SYS_OPENAT_NOCANCEL = 464
|
||||
SYS_RENAMEAT = 465
|
||||
|
@ -392,7 +392,35 @@ const (
|
|||
SYS_GUARDED_WRITE_NP = 485
|
||||
SYS_GUARDED_PWRITE_NP = 486
|
||||
SYS_GUARDED_WRITEV_NP = 487
|
||||
SYS_RENAME_EXT = 488
|
||||
SYS_RENAMEATX_NP = 488
|
||||
SYS_MREMAP_ENCRYPTED = 489
|
||||
SYS_MAXSYSCALL = 490
|
||||
SYS_NETAGENT_TRIGGER = 490
|
||||
SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
|
||||
SYS_MICROSTACKSHOT = 492
|
||||
SYS_GRAB_PGO_DATA = 493
|
||||
SYS_PERSONA = 494
|
||||
SYS_WORK_INTERVAL_CTL = 499
|
||||
SYS_GETENTROPY = 500
|
||||
SYS_NECP_OPEN = 501
|
||||
SYS_NECP_CLIENT_ACTION = 502
|
||||
SYS___NEXUS_OPEN = 503
|
||||
SYS___NEXUS_REGISTER = 504
|
||||
SYS___NEXUS_DEREGISTER = 505
|
||||
SYS___NEXUS_CREATE = 506
|
||||
SYS___NEXUS_DESTROY = 507
|
||||
SYS___NEXUS_GET_OPT = 508
|
||||
SYS___NEXUS_SET_OPT = 509
|
||||
SYS___CHANNEL_OPEN = 510
|
||||
SYS___CHANNEL_GET_INFO = 511
|
||||
SYS___CHANNEL_SYNC = 512
|
||||
SYS___CHANNEL_GET_OPT = 513
|
||||
SYS___CHANNEL_SET_OPT = 514
|
||||
SYS_ULOCK_WAIT = 515
|
||||
SYS_ULOCK_WAKE = 516
|
||||
SYS_FCLONEFILEAT = 517
|
||||
SYS_FS_SNAPSHOT = 518
|
||||
SYS_TERMINATE_WITH_PAYLOAD = 520
|
||||
SYS_ABORT_WITH_PAYLOAD = 521
|
||||
SYS_MAXSYSCALL = 522
|
||||
SYS_INVALID = 63
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksysnum_freebsd.pl
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build 386,freebsd
|
||||
|
||||
|
@ -7,345 +7,347 @@ package unix
|
|||
|
||||
const (
|
||||
// SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, \
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
|
||||
SYS_ACCESS = 33 // { int access(char *path, int amode); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, \
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, \
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, \
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, \
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, \
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_LGETFH = 160 // { int lgetfh(char *fname, \
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, \
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
|
||||
SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
|
||||
SYS_SETFIB = 175 // { int setfib(int fibnum); }
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
|
||||
SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
|
||||
SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
|
||||
SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
|
||||
SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
|
||||
SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, \
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, \
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
|
||||
SYS___SETUGID = 374 // { int __setugid(int flag); }
|
||||
SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
|
||||
SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
|
||||
SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
|
||||
SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
|
||||
SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
|
||||
SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
|
||||
SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
|
||||
SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
|
||||
SYS_KENV = 390 // { int kenv(int what, const char *name, \
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
|
||||
SYS_STATFS = 396 // { int statfs(char *path, \
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, \
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( \
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( \
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
|
||||
SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
|
||||
SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
|
||||
SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
|
||||
SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
|
||||
SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
|
||||
SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
|
||||
SYS_THR_SELF = 432 // { int thr_self(long *id); }
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
|
||||
SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( \
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, \
|
||||
SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
|
||||
SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
|
||||
SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
|
||||
SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
|
||||
SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
|
||||
SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
|
||||
SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
|
||||
SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
|
||||
SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
|
||||
SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
|
||||
SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
|
||||
SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
|
||||
SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
|
||||
SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
|
||||
SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
|
||||
SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
|
||||
SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
|
||||
SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
|
||||
SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
|
||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||
SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
|
||||
SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
|
||||
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||
SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
|
||||
SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
|
||||
SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
|
||||
SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
|
||||
SYS_ACCEPT4 = 541 // { int accept4(int s, \
|
||||
SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
|
||||
SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, \
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
|
||||
SYS_ACCESS = 33 // { int access(char *path, int amode); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, \
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, \
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, \
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, \
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, \
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_LGETFH = 160 // { int lgetfh(char *fname, \
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, \
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
|
||||
SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
|
||||
SYS_SETFIB = 175 // { int setfib(int fibnum); }
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
|
||||
SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
|
||||
SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
|
||||
SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
|
||||
SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
|
||||
SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, \
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, \
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
|
||||
SYS___SETUGID = 374 // { int __setugid(int flag); }
|
||||
SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
|
||||
SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
|
||||
SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
|
||||
SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
|
||||
SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
|
||||
SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
|
||||
SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
|
||||
SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
|
||||
SYS_KENV = 390 // { int kenv(int what, const char *name, \
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
|
||||
SYS_STATFS = 396 // { int statfs(char *path, \
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, \
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( \
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( \
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
|
||||
SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
|
||||
SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
|
||||
SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
|
||||
SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
|
||||
SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
|
||||
SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
|
||||
SYS_THR_SELF = 432 // { int thr_self(long *id); }
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
|
||||
SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( \
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, \
|
||||
SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
|
||||
SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
|
||||
SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
|
||||
SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
|
||||
SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
|
||||
SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
|
||||
SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
|
||||
SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
|
||||
SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
|
||||
SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
|
||||
SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
|
||||
SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
|
||||
SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
|
||||
SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
|
||||
SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
|
||||
SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
|
||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||
SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \
|
||||
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||
SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
|
||||
SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \
|
||||
SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \
|
||||
SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \
|
||||
SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \
|
||||
SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \
|
||||
SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
|
||||
SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
|
||||
SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
|
||||
SYS_ACCEPT4 = 541 // { int accept4(int s, \
|
||||
SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
|
||||
SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_FUTIMENS = 546 // { int futimens(int fd, \
|
||||
SYS_UTIMENSAT = 547 // { int utimensat(int fd, \
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksysnum_freebsd.pl
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build amd64,freebsd
|
||||
|
||||
|
@ -7,345 +7,347 @@ package unix
|
|||
|
||||
const (
|
||||
// SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, \
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
|
||||
SYS_ACCESS = 33 // { int access(char *path, int amode); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, \
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, \
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, \
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, \
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, \
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_LGETFH = 160 // { int lgetfh(char *fname, \
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, \
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
|
||||
SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
|
||||
SYS_SETFIB = 175 // { int setfib(int fibnum); }
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
|
||||
SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
|
||||
SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
|
||||
SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
|
||||
SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
|
||||
SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, \
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, \
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
|
||||
SYS___SETUGID = 374 // { int __setugid(int flag); }
|
||||
SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
|
||||
SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
|
||||
SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
|
||||
SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
|
||||
SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
|
||||
SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
|
||||
SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
|
||||
SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
|
||||
SYS_KENV = 390 // { int kenv(int what, const char *name, \
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
|
||||
SYS_STATFS = 396 // { int statfs(char *path, \
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, \
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( \
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( \
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
|
||||
SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
|
||||
SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
|
||||
SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
|
||||
SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
|
||||
SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
|
||||
SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
|
||||
SYS_THR_SELF = 432 // { int thr_self(long *id); }
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
|
||||
SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( \
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, \
|
||||
SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
|
||||
SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
|
||||
SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
|
||||
SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
|
||||
SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
|
||||
SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
|
||||
SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
|
||||
SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
|
||||
SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
|
||||
SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
|
||||
SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
|
||||
SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
|
||||
SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
|
||||
SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
|
||||
SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
|
||||
SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
|
||||
SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
|
||||
SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
|
||||
SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
|
||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||
SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
|
||||
SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
|
||||
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||
SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
|
||||
SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
|
||||
SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
|
||||
SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
|
||||
SYS_ACCEPT4 = 541 // { int accept4(int s, \
|
||||
SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
|
||||
SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, \
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
|
||||
SYS_ACCESS = 33 // { int access(char *path, int amode); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, \
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, \
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, \
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, \
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, \
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_LGETFH = 160 // { int lgetfh(char *fname, \
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, \
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
|
||||
SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
|
||||
SYS_SETFIB = 175 // { int setfib(int fibnum); }
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
|
||||
SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
|
||||
SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
|
||||
SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
|
||||
SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
|
||||
SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, \
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, \
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
|
||||
SYS___SETUGID = 374 // { int __setugid(int flag); }
|
||||
SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
|
||||
SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
|
||||
SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
|
||||
SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
|
||||
SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
|
||||
SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
|
||||
SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
|
||||
SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
|
||||
SYS_KENV = 390 // { int kenv(int what, const char *name, \
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
|
||||
SYS_STATFS = 396 // { int statfs(char *path, \
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, \
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( \
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( \
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
|
||||
SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
|
||||
SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
|
||||
SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
|
||||
SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
|
||||
SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
|
||||
SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
|
||||
SYS_THR_SELF = 432 // { int thr_self(long *id); }
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
|
||||
SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( \
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, \
|
||||
SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
|
||||
SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
|
||||
SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
|
||||
SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
|
||||
SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
|
||||
SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
|
||||
SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
|
||||
SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
|
||||
SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
|
||||
SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
|
||||
SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
|
||||
SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
|
||||
SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
|
||||
SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
|
||||
SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
|
||||
SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
|
||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||
SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \
|
||||
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||
SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
|
||||
SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \
|
||||
SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \
|
||||
SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \
|
||||
SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \
|
||||
SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \
|
||||
SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
|
||||
SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
|
||||
SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
|
||||
SYS_ACCEPT4 = 541 // { int accept4(int s, \
|
||||
SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
|
||||
SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_FUTIMENS = 546 // { int futimens(int fd, \
|
||||
SYS_UTIMENSAT = 547 // { int utimensat(int fd, \
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// mksysnum_freebsd.pl
|
||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
// +build arm,freebsd
|
||||
|
||||
|
@ -7,345 +7,347 @@ package unix
|
|||
|
||||
const (
|
||||
// SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, \
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
|
||||
SYS_ACCESS = 33 // { int access(char *path, int amode); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, \
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, \
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, \
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, \
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, \
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_LGETFH = 160 // { int lgetfh(char *fname, \
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, \
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
|
||||
SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
|
||||
SYS_SETFIB = 175 // { int setfib(int fibnum); }
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
|
||||
SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
|
||||
SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
|
||||
SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
|
||||
SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
|
||||
SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, \
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, \
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
|
||||
SYS___SETUGID = 374 // { int __setugid(int flag); }
|
||||
SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
|
||||
SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
|
||||
SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
|
||||
SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
|
||||
SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
|
||||
SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
|
||||
SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
|
||||
SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
|
||||
SYS_KENV = 390 // { int kenv(int what, const char *name, \
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
|
||||
SYS_STATFS = 396 // { int statfs(char *path, \
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, \
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( \
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( \
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
|
||||
SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
|
||||
SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
|
||||
SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
|
||||
SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
|
||||
SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
|
||||
SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
|
||||
SYS_THR_SELF = 432 // { int thr_self(long *id); }
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
|
||||
SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( \
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, \
|
||||
SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
|
||||
SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
|
||||
SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); }
|
||||
SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \
|
||||
SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \
|
||||
SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
|
||||
SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
|
||||
SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
|
||||
SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
|
||||
SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
|
||||
SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
|
||||
SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
|
||||
SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
|
||||
SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
|
||||
SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
|
||||
SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
|
||||
SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
|
||||
SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
|
||||
SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
|
||||
SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
|
||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||
SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }
|
||||
SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \
|
||||
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||
SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
|
||||
SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
|
||||
SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
|
||||
SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
|
||||
SYS_ACCEPT4 = 541 // { int accept4(int s, \
|
||||
SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
|
||||
SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_EXIT = 1 // { void sys_exit(int rval); } exit \
|
||||
SYS_FORK = 2 // { int fork(void); }
|
||||
SYS_READ = 3 // { ssize_t read(int fd, void *buf, \
|
||||
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \
|
||||
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
|
||||
SYS_CLOSE = 6 // { int close(int fd); }
|
||||
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \
|
||||
SYS_LINK = 9 // { int link(char *path, char *link); }
|
||||
SYS_UNLINK = 10 // { int unlink(char *path); }
|
||||
SYS_CHDIR = 12 // { int chdir(char *path); }
|
||||
SYS_FCHDIR = 13 // { int fchdir(int fd); }
|
||||
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
|
||||
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
|
||||
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
|
||||
SYS_OBREAK = 17 // { int obreak(char *nsize); } break \
|
||||
SYS_GETPID = 20 // { pid_t getpid(void); }
|
||||
SYS_MOUNT = 21 // { int mount(char *type, char *path, \
|
||||
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
|
||||
SYS_SETUID = 23 // { int setuid(uid_t uid); }
|
||||
SYS_GETUID = 24 // { uid_t getuid(void); }
|
||||
SYS_GETEUID = 25 // { uid_t geteuid(void); }
|
||||
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \
|
||||
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \
|
||||
SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \
|
||||
SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \
|
||||
SYS_ACCEPT = 30 // { int accept(int s, \
|
||||
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \
|
||||
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \
|
||||
SYS_ACCESS = 33 // { int access(char *path, int amode); }
|
||||
SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
|
||||
SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
|
||||
SYS_SYNC = 36 // { int sync(void); }
|
||||
SYS_KILL = 37 // { int kill(int pid, int signum); }
|
||||
SYS_GETPPID = 39 // { pid_t getppid(void); }
|
||||
SYS_DUP = 41 // { int dup(u_int fd); }
|
||||
SYS_PIPE = 42 // { int pipe(void); }
|
||||
SYS_GETEGID = 43 // { gid_t getegid(void); }
|
||||
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \
|
||||
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \
|
||||
SYS_GETGID = 47 // { gid_t getgid(void); }
|
||||
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \
|
||||
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
|
||||
SYS_ACCT = 51 // { int acct(char *path); }
|
||||
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \
|
||||
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \
|
||||
SYS_REBOOT = 55 // { int reboot(int opt); }
|
||||
SYS_REVOKE = 56 // { int revoke(char *path); }
|
||||
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
|
||||
SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \
|
||||
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \
|
||||
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \
|
||||
SYS_CHROOT = 61 // { int chroot(char *path); }
|
||||
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \
|
||||
SYS_VFORK = 66 // { int vfork(void); }
|
||||
SYS_SBRK = 69 // { int sbrk(int incr); }
|
||||
SYS_SSTK = 70 // { int sstk(int incr); }
|
||||
SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \
|
||||
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
|
||||
SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \
|
||||
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \
|
||||
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \
|
||||
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \
|
||||
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \
|
||||
SYS_GETPGRP = 81 // { int getpgrp(void); }
|
||||
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
|
||||
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \
|
||||
SYS_SWAPON = 85 // { int swapon(char *name); }
|
||||
SYS_GETITIMER = 86 // { int getitimer(u_int which, \
|
||||
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
|
||||
SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); }
|
||||
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
|
||||
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \
|
||||
SYS_FSYNC = 95 // { int fsync(int fd); }
|
||||
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \
|
||||
SYS_SOCKET = 97 // { int socket(int domain, int type, \
|
||||
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \
|
||||
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
|
||||
SYS_BIND = 104 // { int bind(int s, caddr_t name, \
|
||||
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \
|
||||
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
|
||||
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \
|
||||
SYS_GETRUSAGE = 117 // { int getrusage(int who, \
|
||||
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \
|
||||
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \
|
||||
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \
|
||||
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \
|
||||
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
|
||||
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
|
||||
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
|
||||
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
|
||||
SYS_RENAME = 128 // { int rename(char *from, char *to); }
|
||||
SYS_FLOCK = 131 // { int flock(int fd, int how); }
|
||||
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
|
||||
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \
|
||||
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
|
||||
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \
|
||||
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
|
||||
SYS_RMDIR = 137 // { int rmdir(char *path); }
|
||||
SYS_UTIMES = 138 // { int utimes(char *path, \
|
||||
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \
|
||||
SYS_SETSID = 147 // { int setsid(void); }
|
||||
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \
|
||||
SYS_LGETFH = 160 // { int lgetfh(char *fname, \
|
||||
SYS_GETFH = 161 // { int getfh(char *fname, \
|
||||
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
|
||||
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \
|
||||
SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \
|
||||
SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \
|
||||
SYS_SETFIB = 175 // { int setfib(int fibnum); }
|
||||
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
|
||||
SYS_SETGID = 181 // { int setgid(gid_t gid); }
|
||||
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
|
||||
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
|
||||
SYS_STAT = 188 // { int stat(char *path, struct stat *ub); }
|
||||
SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); }
|
||||
SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); }
|
||||
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
|
||||
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
|
||||
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \
|
||||
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \
|
||||
SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \
|
||||
SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \
|
||||
SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \
|
||||
SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \
|
||||
SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \
|
||||
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \
|
||||
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
|
||||
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
|
||||
SYS_UNDELETE = 205 // { int undelete(char *path); }
|
||||
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
|
||||
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
|
||||
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \
|
||||
SYS_CLOCK_SETTIME = 233 // { int clock_settime( \
|
||||
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \
|
||||
SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \
|
||||
SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); }
|
||||
SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \
|
||||
SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \
|
||||
SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); }
|
||||
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \
|
||||
SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); }
|
||||
SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \
|
||||
SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \
|
||||
SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\
|
||||
SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); }
|
||||
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \
|
||||
SYS_RFORK = 251 // { int rfork(int flags); }
|
||||
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \
|
||||
SYS_ISSETUGID = 253 // { int issetugid(void); }
|
||||
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
|
||||
SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \
|
||||
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
|
||||
SYS_LUTIMES = 276 // { int lutimes(char *path, \
|
||||
SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); }
|
||||
SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); }
|
||||
SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); }
|
||||
SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \
|
||||
SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \
|
||||
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \
|
||||
SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \
|
||||
SYS_MODNEXT = 300 // { int modnext(int modid); }
|
||||
SYS_MODSTAT = 301 // { int modstat(int modid, \
|
||||
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
|
||||
SYS_MODFIND = 303 // { int modfind(const char *name); }
|
||||
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
|
||||
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
|
||||
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
|
||||
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
|
||||
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \
|
||||
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
|
||||
SYS_GETSID = 310 // { int getsid(pid_t pid); }
|
||||
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \
|
||||
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \
|
||||
SYS_YIELD = 321 // { int yield(void); }
|
||||
SYS_MLOCKALL = 324 // { int mlockall(int how); }
|
||||
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
|
||||
SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); }
|
||||
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \
|
||||
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \
|
||||
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \
|
||||
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
|
||||
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
|
||||
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
|
||||
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
|
||||
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \
|
||||
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
|
||||
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \
|
||||
SYS_JAIL = 338 // { int jail(struct jail *jail); }
|
||||
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \
|
||||
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
|
||||
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
|
||||
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \
|
||||
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \
|
||||
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \
|
||||
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \
|
||||
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \
|
||||
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \
|
||||
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \
|
||||
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \
|
||||
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \
|
||||
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \
|
||||
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \
|
||||
SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \
|
||||
SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \
|
||||
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \
|
||||
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \
|
||||
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \
|
||||
SYS_KQUEUE = 362 // { int kqueue(void); }
|
||||
SYS_KEVENT = 363 // { int kevent(int fd, \
|
||||
SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \
|
||||
SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \
|
||||
SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \
|
||||
SYS___SETUGID = 374 // { int __setugid(int flag); }
|
||||
SYS_EACCESS = 376 // { int eaccess(char *path, int amode); }
|
||||
SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \
|
||||
SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); }
|
||||
SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); }
|
||||
SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \
|
||||
SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \
|
||||
SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \
|
||||
SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \
|
||||
SYS_KENV = 390 // { int kenv(int what, const char *name, \
|
||||
SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \
|
||||
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \
|
||||
SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \
|
||||
SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \
|
||||
SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \
|
||||
SYS_STATFS = 396 // { int statfs(char *path, \
|
||||
SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); }
|
||||
SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \
|
||||
SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \
|
||||
SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \
|
||||
SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \
|
||||
SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \
|
||||
SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \
|
||||
SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \
|
||||
SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \
|
||||
SYS_SIGACTION = 416 // { int sigaction(int sig, \
|
||||
SYS_SIGRETURN = 417 // { int sigreturn( \
|
||||
SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); }
|
||||
SYS_SETCONTEXT = 422 // { int setcontext( \
|
||||
SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \
|
||||
SYS_SWAPOFF = 424 // { int swapoff(const char *name); }
|
||||
SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \
|
||||
SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \
|
||||
SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \
|
||||
SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \
|
||||
SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \
|
||||
SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \
|
||||
SYS_THR_EXIT = 431 // { void thr_exit(long *state); }
|
||||
SYS_THR_SELF = 432 // { int thr_self(long *id); }
|
||||
SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); }
|
||||
SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); }
|
||||
SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); }
|
||||
SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); }
|
||||
SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \
|
||||
SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \
|
||||
SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \
|
||||
SYS_THR_SUSPEND = 442 // { int thr_suspend( \
|
||||
SYS_THR_WAKE = 443 // { int thr_wake(long id); }
|
||||
SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); }
|
||||
SYS_AUDIT = 445 // { int audit(const void *record, \
|
||||
SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \
|
||||
SYS_GETAUID = 447 // { int getauid(uid_t *auid); }
|
||||
SYS_SETAUID = 448 // { int setauid(uid_t *auid); }
|
||||
SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); }
|
||||
SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); }
|
||||
SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \
|
||||
SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \
|
||||
SYS_AUDITCTL = 453 // { int auditctl(char *path); }
|
||||
SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \
|
||||
SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \
|
||||
SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); }
|
||||
SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); }
|
||||
SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); }
|
||||
SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \
|
||||
SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \
|
||||
SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \
|
||||
SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \
|
||||
SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \
|
||||
SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); }
|
||||
SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); }
|
||||
SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); }
|
||||
SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \
|
||||
SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); }
|
||||
SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); }
|
||||
SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \
|
||||
SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \
|
||||
SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \
|
||||
SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \
|
||||
SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \
|
||||
SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \
|
||||
SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \
|
||||
SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \
|
||||
SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \
|
||||
SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \
|
||||
SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \
|
||||
SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); }
|
||||
SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \
|
||||
SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \
|
||||
SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \
|
||||
SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \
|
||||
SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \
|
||||
SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); }
|
||||
SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); }
|
||||
SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \
|
||||
SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \
|
||||
SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); }
|
||||
SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); }
|
||||
SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); }
|
||||
SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, \
|
||||
SYS_CAP_ENTER = 516 // { int cap_enter(void); }
|
||||
SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }
|
||||
SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); }
|
||||
SYS_PDKILL = 519 // { int pdkill(int fd, int signum); }
|
||||
SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); }
|
||||
SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \
|
||||
SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \
|
||||
SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); }
|
||||
SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \
|
||||
SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \
|
||||
SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \
|
||||
SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \
|
||||
SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \
|
||||
SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \
|
||||
SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \
|
||||
SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \
|
||||
SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, \
|
||||
SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, \
|
||||
SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, \
|
||||
SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, \
|
||||
SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, \
|
||||
SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \
|
||||
SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \
|
||||
SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \
|
||||
SYS_ACCEPT4 = 541 // { int accept4(int s, \
|
||||
SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); }
|
||||
SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \
|
||||
SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \
|
||||
SYS_FUTIMENS = 546 // { int futimens(int fd, \
|
||||
SYS_UTIMENSAT = 547 // { int utimensat(int fd, \
|
||||
)
|
||||
|
|
|
@ -134,6 +134,7 @@ const (
|
|||
SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
|
||||
SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); }
|
||||
SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
|
|
|
@ -134,6 +134,7 @@ const (
|
|||
SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); }
|
||||
SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); }
|
||||
SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); }
|
||||
SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); }
|
||||
SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); }
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue