Compare commits
No commits in common. "b303f88a39d28d32f6f08f076c2763c94a193451" and "e6e6b90201796676ee736daa2a5a0d4b3375ab31" have entirely different histories.
b303f88a39
...
e6e6b90201
171
arp.go
171
arp.go
|
@ -1,171 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"encoding/binary"
|
|
||||||
"fmt"
|
|
||||||
"log"
|
|
||||||
"net"
|
|
||||||
"syscall"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
// This subpackage while adapted, is orignally from code from Google's Seesaw
|
|
||||||
// Github link here: https://github.com/google/seesaw
|
|
||||||
// see original copyright notice below:
|
|
||||||
|
|
||||||
// Copyright 2013 Google Inc. All Rights Reserved.
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
// Author: jsing@google.com (Joel Sing)
|
|
||||||
|
|
||||||
// Gratuitous encapsulates a request to send a gratuitous ARP message.
|
|
||||||
type Gratuitous struct {
|
|
||||||
IfaceName string
|
|
||||||
IP net.IP
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
opARPRequest = 1
|
|
||||||
opARPReply = 2
|
|
||||||
hwLen = 6
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
ethernetBroadcast = net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
|
||||||
)
|
|
||||||
|
|
||||||
func htons(p uint16) uint16 {
|
|
||||||
var b [2]byte
|
|
||||||
binary.BigEndian.PutUint16(b[:], p)
|
|
||||||
return *(*uint16)(unsafe.Pointer(&b))
|
|
||||||
}
|
|
||||||
|
|
||||||
// arpHeader specifies the header for an ARP message.
|
|
||||||
type arpHeader struct {
|
|
||||||
hardwareType uint16
|
|
||||||
protocolType uint16
|
|
||||||
hardwareAddressLength uint8
|
|
||||||
protocolAddressLength uint8
|
|
||||||
opcode uint16
|
|
||||||
}
|
|
||||||
|
|
||||||
// arpMessage represents an ARP message.
|
|
||||||
type arpMessage struct {
|
|
||||||
arpHeader
|
|
||||||
senderHardwareAddress []byte
|
|
||||||
senderProtocolAddress []byte
|
|
||||||
targetHardwareAddress []byte
|
|
||||||
targetProtocolAddress []byte
|
|
||||||
}
|
|
||||||
|
|
||||||
// bytes returns the wire representation of the ARP message.
|
|
||||||
func (m *arpMessage) bytes() ([]byte, error) {
|
|
||||||
buf := new(bytes.Buffer)
|
|
||||||
|
|
||||||
if err := binary.Write(buf, binary.BigEndian, m.arpHeader); err != nil {
|
|
||||||
return nil, fmt.Errorf("binary write failed: %v", err)
|
|
||||||
}
|
|
||||||
buf.Write(m.senderHardwareAddress)
|
|
||||||
buf.Write(m.senderProtocolAddress)
|
|
||||||
buf.Write(m.targetHardwareAddress)
|
|
||||||
buf.Write(m.targetProtocolAddress)
|
|
||||||
|
|
||||||
return buf.Bytes(), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// gratuitousARPReply returns an ARP message that contains a gratuitous ARP
|
|
||||||
// reply from the specified sender.
|
|
||||||
func gratuitousARPReply(ip net.IP, mac net.HardwareAddr) (*arpMessage, error) {
|
|
||||||
if ip.To4() == nil {
|
|
||||||
return nil, fmt.Errorf("%q is not an IPv4 address", ip)
|
|
||||||
}
|
|
||||||
if len(mac) != hwLen {
|
|
||||||
return nil, fmt.Errorf("%q is not an Ethernet MAC address", mac)
|
|
||||||
}
|
|
||||||
|
|
||||||
m := &arpMessage{
|
|
||||||
arpHeader{
|
|
||||||
1, // Ethernet
|
|
||||||
0x0800, // IPv4
|
|
||||||
hwLen, // 48-bit MAC Address
|
|
||||||
net.IPv4len, // 32-bit IPv4 Address
|
|
||||||
opARPReply, // ARP Reply
|
|
||||||
},
|
|
||||||
mac,
|
|
||||||
ip.To4(),
|
|
||||||
ethernetBroadcast,
|
|
||||||
net.IPv4bcast,
|
|
||||||
}
|
|
||||||
|
|
||||||
return m, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// sendARP sends the given ARP message via the specified interface.
|
|
||||||
func sendARP(iface *net.Interface, m *arpMessage) error {
|
|
||||||
fd, err := syscall.Socket(syscall.AF_PACKET, syscall.SOCK_DGRAM, int(htons(syscall.ETH_P_ARP)))
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("failed to get raw socket: %v", err)
|
|
||||||
}
|
|
||||||
defer syscall.Close(fd)
|
|
||||||
|
|
||||||
if err := syscall.BindToDevice(fd, iface.Name); err != nil {
|
|
||||||
return fmt.Errorf("failed to bind to device: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
ll := syscall.SockaddrLinklayer{
|
|
||||||
Protocol: htons(syscall.ETH_P_ARP),
|
|
||||||
Ifindex: iface.Index,
|
|
||||||
Pkttype: 0, // syscall.PACKET_HOST
|
|
||||||
Hatype: m.hardwareType,
|
|
||||||
Halen: m.hardwareAddressLength,
|
|
||||||
}
|
|
||||||
target := ethernetBroadcast
|
|
||||||
if m.opcode == opARPReply {
|
|
||||||
target = m.targetHardwareAddress
|
|
||||||
}
|
|
||||||
// for i := 0; i < len(target); i++ {
|
|
||||||
// ll.Addr[i] = target[i]
|
|
||||||
// }
|
|
||||||
|
|
||||||
log.Println("Copied ARP: ", copy(ll.Addr[:], target))
|
|
||||||
|
|
||||||
b, err := m.bytes()
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("failed to convert ARP message: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := syscall.Bind(fd, &ll); err != nil {
|
|
||||||
return fmt.Errorf("failed to bind: %v", err)
|
|
||||||
}
|
|
||||||
if err := syscall.Sendto(fd, b, 0, &ll); err != nil {
|
|
||||||
return fmt.Errorf("failed to send: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendGratuitous sends a gratuitous ARP message via the specified interface.
|
|
||||||
func SendGratuitous(arp *Gratuitous) error { //, out *int) error {
|
|
||||||
iface, err := net.InterfaceByName(arp.IfaceName)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("failed to get interface %q: %v", arp.IfaceName, err)
|
|
||||||
}
|
|
||||||
log.Printf("Sending gratuitous ARP for %s (%s) via %s\n", arp.IP, iface.HardwareAddr, iface.Name)
|
|
||||||
m, err := gratuitousARPReply(arp.IP, iface.HardwareAddr)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return sendARP(iface, m)
|
|
||||||
}
|
|
14
conf.go
14
conf.go
|
@ -7,6 +7,19 @@ import (
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type AbstractConfig struct {
|
||||||
|
MulticastConfig struct {
|
||||||
|
MIPAddr string `json:"MIpAddr"`
|
||||||
|
MPort string `json:"MPort"`
|
||||||
|
MaxDatagramSize int `json:"MaxDatagramSize"`
|
||||||
|
} `json:"MulticastConfig"`
|
||||||
|
InterfaceConfig struct {
|
||||||
|
ExistingInterface string `json:"ExistingInterface"`
|
||||||
|
BridgeIPCIDR string `json:"BridgeIpCIDR"`
|
||||||
|
} `json:"InterfaceConfig"`
|
||||||
|
Debug bool `json:"debug"`
|
||||||
|
}
|
||||||
|
|
||||||
var a AbstractConfig
|
var a AbstractConfig
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -32,6 +45,7 @@ func init() {
|
||||||
|
|
||||||
ZoreideBridge.BridgeIpCIDR = a.InterfaceConfig.BridgeIPCIDR
|
ZoreideBridge.BridgeIpCIDR = a.InterfaceConfig.BridgeIPCIDR
|
||||||
ZoreideBridge.ExistingInterface = a.InterfaceConfig.ExistingInterface
|
ZoreideBridge.ExistingInterface = a.InterfaceConfig.ExistingInterface
|
||||||
|
ZoreideBridge.IsActive = false
|
||||||
|
|
||||||
if !a.Debug {
|
if !a.Debug {
|
||||||
log.SetOutput(io.Discard)
|
log.SetOutput(io.Discard)
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -12,5 +12,5 @@ require (
|
||||||
github.com/google/uuid v1.2.0 // indirect
|
github.com/google/uuid v1.2.0 // indirect
|
||||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 // indirect
|
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 // indirect
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
||||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
|
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005 // indirect
|
||||||
)
|
)
|
||||||
|
|
3
go.sum
3
go.sum
|
@ -11,9 +11,8 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005 h1:pDMpM2zh2MT0kHy037cKlSby2nEhD50SYqwQk76Nm40=
|
||||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c=
|
|
||||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
|
42
interface.go
42
interface.go
|
@ -9,41 +9,22 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-ping/ping"
|
"github.com/go-ping/ping"
|
||||||
|
|
||||||
"github.com/milosgajdos/tenus"
|
"github.com/milosgajdos/tenus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type AbstractBridge struct {
|
||||||
|
ExistingInterface string
|
||||||
|
BridgeIpCIDR string
|
||||||
|
IsActive bool
|
||||||
|
hIerarchyNumber int64
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
||||||
ZoreideBridge.initializeHierarchy()
|
ZoreideBridge.initializeHierarchy()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *AbstractBridge) RefreshArp() {
|
|
||||||
|
|
||||||
// we want the program to recover in case of issues
|
|
||||||
defer func() {
|
|
||||||
if r := recover(); r != nil {
|
|
||||||
|
|
||||||
fmt.Println("An error happened in <RefreshARP()>, but Zoreide recovered. ")
|
|
||||||
fmt.Println("Error was: ", r)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
b.GArp = new(Gratuitous)
|
|
||||||
|
|
||||||
var err error
|
|
||||||
b.GArp.IP, _, err = net.ParseCIDR(b.BridgeIpCIDR)
|
|
||||||
if err != nil {
|
|
||||||
log.Println("Error parsing CIDR: ", err.Error())
|
|
||||||
}
|
|
||||||
b.GArp.IfaceName = b.ExistingInterface
|
|
||||||
log.Println("ARP Interface name: ", b.GArp.IfaceName)
|
|
||||||
|
|
||||||
SendGratuitous(b.GArp)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *AbstractBridge) initializeHierarchy() {
|
func (b *AbstractBridge) initializeHierarchy() {
|
||||||
|
|
||||||
var letterRunes = []rune("123456789")
|
var letterRunes = []rune("123456789")
|
||||||
|
@ -94,8 +75,6 @@ func (b *AbstractBridge) configureIpAndBridgeUp() {
|
||||||
log.Printf("%s configured with %s\n", b.ExistingInterface, brIp.String())
|
log.Printf("%s configured with %s\n", b.ExistingInterface, brIp.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh ARP , should not be necessary, but we know, Cisco FA
|
|
||||||
b.RefreshArp()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *AbstractBridge) removeIPandBridgeInt() {
|
func (b *AbstractBridge) removeIPandBridgeInt() {
|
||||||
|
@ -136,14 +115,13 @@ func isActive(bridgeip string) bool {
|
||||||
}
|
}
|
||||||
// just in case it doesn't stops alone
|
// just in case it doesn't stops alone
|
||||||
defer pinger.Stop()
|
defer pinger.Stop()
|
||||||
pinger.Count = 5
|
pinger.Count = 3
|
||||||
pinger.Interval = time.Duration(10 * time.Millisecond)
|
pinger.Interval = time.Duration(100 * time.Millisecond)
|
||||||
pinger.Timeout = time.Duration(1 * time.Second)
|
pinger.Timeout = time.Duration(1 * time.Second)
|
||||||
pinger.Run() // blocks until finished
|
pinger.Run() // blocks until finished
|
||||||
stats := pinger.Statistics()
|
stats := pinger.Statistics()
|
||||||
log.Println("Ping results for: ", bridgeip)
|
log.Println("Ping results for: ", bridgeip)
|
||||||
log.Printf("%d packet sent, %d packet recv\n", pinger.Count, stats.PacketsRecv)
|
log.Printf("%d packet sent, %d packet recv", pinger.Count, stats.PacketsRecv)
|
||||||
log.Println("IsACTIVE: ", stats.PacketsRecv == pinger.Count)
|
|
||||||
|
|
||||||
return stats.PacketsRecv == pinger.Count
|
return stats.PacketsRecv == pinger.Count
|
||||||
|
|
||||||
|
|
11
multicast.go
11
multicast.go
|
@ -5,6 +5,17 @@ import (
|
||||||
"net"
|
"net"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type AbstractMulticast struct {
|
||||||
|
MIpAddr string
|
||||||
|
MPort string
|
||||||
|
MaxDatagramSize int
|
||||||
|
MWaddr *net.UDPAddr
|
||||||
|
MRaddr *net.UDPAddr
|
||||||
|
Wconn *net.UDPConn
|
||||||
|
Rconn *net.UDPConn
|
||||||
|
HierarchyArray []int64
|
||||||
|
}
|
||||||
|
|
||||||
func (mip *AbstractMulticast) CreateUdpAddr() {
|
func (mip *AbstractMulticast) CreateUdpAddr() {
|
||||||
|
|
||||||
// This Will create the local UDP Address
|
// This Will create the local UDP Address
|
||||||
|
|
34
types.go
34
types.go
|
@ -1,34 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import "net"
|
|
||||||
|
|
||||||
type AbstractBridge struct {
|
|
||||||
ExistingInterface string
|
|
||||||
BridgeIpCIDR string
|
|
||||||
hIerarchyNumber int64
|
|
||||||
GArp *Gratuitous
|
|
||||||
}
|
|
||||||
|
|
||||||
type AbstractMulticast struct {
|
|
||||||
MIpAddr string
|
|
||||||
MPort string
|
|
||||||
MaxDatagramSize int
|
|
||||||
MWaddr *net.UDPAddr
|
|
||||||
MRaddr *net.UDPAddr
|
|
||||||
Wconn *net.UDPConn
|
|
||||||
Rconn *net.UDPConn
|
|
||||||
HierarchyArray []int64
|
|
||||||
}
|
|
||||||
|
|
||||||
type AbstractConfig struct {
|
|
||||||
MulticastConfig struct {
|
|
||||||
MIPAddr string `json:"MIpAddr"`
|
|
||||||
MPort string `json:"MPort"`
|
|
||||||
MaxDatagramSize int `json:"MaxDatagramSize"`
|
|
||||||
} `json:"MulticastConfig"`
|
|
||||||
InterfaceConfig struct {
|
|
||||||
ExistingInterface string `json:"ExistingInterface"`
|
|
||||||
BridgeIPCIDR string `json:"BridgeIpCIDR"`
|
|
||||||
} `json:"InterfaceConfig"`
|
|
||||||
Debug bool `json:"debug"`
|
|
||||||
}
|
|
|
@ -76,7 +76,7 @@ arguments can be passed to the kernel. The third is for low-level use by the
|
||||||
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
|
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
|
||||||
let it know that a system call is running.
|
let it know that a system call is running.
|
||||||
|
|
||||||
When porting Go to a new architecture/OS, this file must be implemented for
|
When porting Go to an new architecture/OS, this file must be implemented for
|
||||||
each GOOS/GOARCH pair.
|
each GOOS/GOARCH pair.
|
||||||
|
|
||||||
### mksysnum
|
### mksysnum
|
||||||
|
@ -107,7 +107,7 @@ prototype can be exported (capitalized) or not.
|
||||||
Adding a new syscall often just requires adding a new `//sys` function prototype
|
Adding a new syscall often just requires adding a new `//sys` function prototype
|
||||||
with the desired arguments and a capitalized name so it is exported. However, if
|
with the desired arguments and a capitalized name so it is exported. However, if
|
||||||
you want the interface to the syscall to be different, often one will make an
|
you want the interface to the syscall to be different, often one will make an
|
||||||
unexported `//sys` prototype, and then write a custom wrapper in
|
unexported `//sys` prototype, an then write a custom wrapper in
|
||||||
`syscall_${GOOS}.go`.
|
`syscall_${GOOS}.go`.
|
||||||
|
|
||||||
### types files
|
### types files
|
||||||
|
@ -137,7 +137,7 @@ some `#if/#elif` macros in your include statements.
|
||||||
|
|
||||||
This script is used to generate the system's various constants. This doesn't
|
This script is used to generate the system's various constants. This doesn't
|
||||||
just include the error numbers and error strings, but also the signal numbers
|
just include the error numbers and error strings, but also the signal numbers
|
||||||
and a wide variety of miscellaneous constants. The constants come from the list
|
an a wide variety of miscellaneous constants. The constants come from the list
|
||||||
of include files in the `includes_${uname}` variable. A regex then picks out
|
of include files in the `includes_${uname}` variable. A regex then picks out
|
||||||
the desired `#define` statements, and generates the corresponding Go constants.
|
the desired `#define` statements, and generates the corresponding Go constants.
|
||||||
The error numbers and strings are generated from `#include <errno.h>`, and the
|
The error numbers and strings are generated from `#include <errno.h>`, and the
|
||||||
|
@ -149,7 +149,7 @@ To add a constant, add the header that includes it to the appropriate variable.
|
||||||
Then, edit the regex (if necessary) to match the desired constant. Avoid making
|
Then, edit the regex (if necessary) to match the desired constant. Avoid making
|
||||||
the regex too broad to avoid matching unintended constants.
|
the regex too broad to avoid matching unintended constants.
|
||||||
|
|
||||||
### internal/mkmerge
|
### mkmerge.go
|
||||||
|
|
||||||
This program is used to extract duplicate const, func, and type declarations
|
This program is used to extract duplicate const, func, and type declarations
|
||||||
from the generated architecture-specific files listed below, and merge these
|
from the generated architecture-specific files listed below, and merge these
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (freebsd || netbsd || openbsd) && gc
|
|
||||||
// +build freebsd netbsd openbsd
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
// System call support for 386 BSD
|
//
|
||||||
|
// System call support for 386, Darwin
|
||||||
|
//
|
||||||
|
|
||||||
// Just jump to package syscall's implementation for all these functions.
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
// The runtime may know about them.
|
// The runtime may know about them.
|
|
@ -1,14 +1,14 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (darwin || freebsd || netbsd || openbsd) && gc
|
|
||||||
// +build darwin freebsd netbsd openbsd
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
// System call support for ARM64 BSD
|
//
|
||||||
|
// System call support for AMD64, Darwin
|
||||||
|
//
|
||||||
|
|
||||||
// Just jump to package syscall's implementation for all these functions.
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
// The runtime may know about them.
|
// The runtime may know about them.
|
|
@ -1,14 +1,15 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
// Copyright 2015 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (freebsd || netbsd || openbsd) && gc
|
|
||||||
// +build freebsd netbsd openbsd
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
// +build arm,darwin
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
// System call support for ARM BSD
|
//
|
||||||
|
// System call support for ARM, Darwin
|
||||||
|
//
|
||||||
|
|
||||||
// Just jump to package syscall's implementation for all these functions.
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
// The runtime may know about them.
|
// The runtime may know about them.
|
|
@ -0,0 +1,30 @@
|
||||||
|
// Copyright 2015 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build gc
|
||||||
|
// +build arm64,darwin
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for AMD64, Darwin
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
B syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
B syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
B syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
B syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
B syscall·RawSyscall6(SB)
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2009 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for AMD64, DragonFly
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2009 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for 386, FreeBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2009 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for AMD64, FreeBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2012 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// +build gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for ARM, FreeBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// 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,29 @@
|
||||||
|
// Copyright 2018 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for ARM64, FreeBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux && arm64 && gc
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build arm64
|
// +build arm64
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux && (mips64 || mips64le) && gc
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build mips64 mips64le
|
// +build mips64 mips64le
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux && (mips || mipsle) && gc
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build mips mipsle
|
// +build mips mipsle
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux && (ppc64 || ppc64le) && gc
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build ppc64 ppc64le
|
// +build ppc64 ppc64le
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build riscv64 && gc
|
// +build riscv64,gc
|
||||||
// +build riscv64
|
|
||||||
// +build gc
|
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux && s390x && gc
|
|
||||||
// +build linux
|
|
||||||
// +build s390x
|
// +build s390x
|
||||||
|
// +build linux
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2009 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for 386, NetBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -1,14 +1,14 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
|
|
||||||
// +build darwin dragonfly freebsd netbsd openbsd
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
// System call support for AMD64 BSD
|
//
|
||||||
|
// System call support for AMD64, NetBSD
|
||||||
|
//
|
||||||
|
|
||||||
// Just jump to package syscall's implementation for all these functions.
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
// The runtime may know about them.
|
// The runtime may know about them.
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2013 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for ARM, NetBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// 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,29 @@
|
||||||
|
// Copyright 2019 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for ARM64, NetBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
B syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
B syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
B syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
B syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
B syscall·RawSyscall6(SB)
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2009 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for 386, OpenBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-28
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-40
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-52
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-28
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -0,0 +1,29 @@
|
||||||
|
// Copyright 2009 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for AMD64, OpenBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -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 gc
|
||||||
|
|
||||||
|
#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,29 @@
|
||||||
|
// Copyright 2019 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 gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// System call support for arm64, OpenBSD
|
||||||
|
//
|
||||||
|
|
||||||
|
// Just jump to package syscall's implementation for all these functions.
|
||||||
|
// The runtime may know about them.
|
||||||
|
|
||||||
|
TEXT ·Syscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·Syscall(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·Syscall6(SB)
|
||||||
|
|
||||||
|
TEXT ·Syscall9(SB),NOSPLIT,$0-104
|
||||||
|
JMP syscall·Syscall9(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall(SB),NOSPLIT,$0-56
|
||||||
|
JMP syscall·RawSyscall(SB)
|
||||||
|
|
||||||
|
TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
|
||||||
|
JMP syscall·RawSyscall6(SB)
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc
|
|
||||||
// +build gc
|
// +build gc
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
|
//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle)
|
||||||
// +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc
|
// +build linux,386 linux,arm linux,mips linux,mipsle
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
|
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
|
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
|
|
@ -1,149 +0,0 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build linux
|
|
||||||
// +build linux
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Helpers for dealing with ifreq since it contains a union and thus requires a
|
|
||||||
// lot of unsafe.Pointer casts to use properly.
|
|
||||||
|
|
||||||
// An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq
|
|
||||||
// contains an interface name and a union of arbitrary data which can be
|
|
||||||
// accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq
|
|
||||||
// function.
|
|
||||||
//
|
|
||||||
// Use the Name method to access the stored interface name. The union data
|
|
||||||
// fields can be get and set using the following methods:
|
|
||||||
// - Uint16/SetUint16: flags
|
|
||||||
// - Uint32/SetUint32: ifindex, metric, mtu
|
|
||||||
type Ifreq struct{ raw ifreq }
|
|
||||||
|
|
||||||
// NewIfreq creates an Ifreq with the input network interface name after
|
|
||||||
// validating the name does not exceed IFNAMSIZ-1 (trailing NULL required)
|
|
||||||
// bytes.
|
|
||||||
func NewIfreq(name string) (*Ifreq, error) {
|
|
||||||
// Leave room for terminating NULL byte.
|
|
||||||
if len(name) >= IFNAMSIZ {
|
|
||||||
return nil, EINVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
var ifr ifreq
|
|
||||||
copy(ifr.Ifrn[:], name)
|
|
||||||
|
|
||||||
return &Ifreq{raw: ifr}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(mdlayher): get/set methods for hardware address sockaddr, char array, etc.
|
|
||||||
|
|
||||||
// Name returns the interface name associated with the Ifreq.
|
|
||||||
func (ifr *Ifreq) Name() string {
|
|
||||||
// BytePtrToString requires a NULL terminator or the program may crash. If
|
|
||||||
// one is not present, just return the empty string.
|
|
||||||
if !bytes.Contains(ifr.raw.Ifrn[:], []byte{0x00}) {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
return BytePtrToString(&ifr.raw.Ifrn[0])
|
|
||||||
}
|
|
||||||
|
|
||||||
// According to netdevice(7), only AF_INET addresses are returned for numerous
|
|
||||||
// sockaddr ioctls. For convenience, we expose these as Inet4Addr since the Port
|
|
||||||
// field and other data is always empty.
|
|
||||||
|
|
||||||
// Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C
|
|
||||||
// in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not
|
|
||||||
// AF_INET, an error is returned.
|
|
||||||
func (ifr *Ifreq) Inet4Addr() ([]byte, error) {
|
|
||||||
raw := *(*RawSockaddrInet4)(unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]))
|
|
||||||
if raw.Family != AF_INET {
|
|
||||||
// Cannot safely interpret raw.Addr bytes as an IPv4 address.
|
|
||||||
return nil, EINVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
return raw.Addr[:], nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an
|
|
||||||
// embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length
|
|
||||||
// or an error will be returned.
|
|
||||||
func (ifr *Ifreq) SetInet4Addr(v []byte) error {
|
|
||||||
if len(v) != 4 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
var addr [4]byte
|
|
||||||
copy(addr[:], v)
|
|
||||||
|
|
||||||
ifr.clear()
|
|
||||||
*(*RawSockaddrInet4)(
|
|
||||||
unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]),
|
|
||||||
) = RawSockaddrInet4{
|
|
||||||
// Always set IP family as ioctls would require it anyway.
|
|
||||||
Family: AF_INET,
|
|
||||||
Addr: addr,
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Uint16 returns the Ifreq union data as a C short/Go uint16 value.
|
|
||||||
func (ifr *Ifreq) Uint16() uint16 {
|
|
||||||
return *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0]))
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetUint16 sets a C short/Go uint16 value as the Ifreq's union data.
|
|
||||||
func (ifr *Ifreq) SetUint16(v uint16) {
|
|
||||||
ifr.clear()
|
|
||||||
*(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// Uint32 returns the Ifreq union data as a C int/Go uint32 value.
|
|
||||||
func (ifr *Ifreq) Uint32() uint32 {
|
|
||||||
return *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0]))
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetUint32 sets a C int/Go uint32 value as the Ifreq's union data.
|
|
||||||
func (ifr *Ifreq) SetUint32(v uint32) {
|
|
||||||
ifr.clear()
|
|
||||||
*(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// clear zeroes the ifreq's union field to prevent trailing garbage data from
|
|
||||||
// being sent to the kernel if an ifreq is reused.
|
|
||||||
func (ifr *Ifreq) clear() {
|
|
||||||
for i := range ifr.raw.Ifru {
|
|
||||||
ifr.raw.Ifru[i] = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(mdlayher): export as IfreqData? For now we can provide helpers such as
|
|
||||||
// IoctlGetEthtoolDrvinfo which use these APIs under the hood.
|
|
||||||
|
|
||||||
// An ifreqData is an Ifreq which carries pointer data. To produce an ifreqData,
|
|
||||||
// use the Ifreq.withData method.
|
|
||||||
type ifreqData struct {
|
|
||||||
name [IFNAMSIZ]byte
|
|
||||||
// A type separate from ifreq is required in order to comply with the
|
|
||||||
// unsafe.Pointer rules since the "pointer-ness" of data would not be
|
|
||||||
// preserved if it were cast into the byte array of a raw ifreq.
|
|
||||||
data unsafe.Pointer
|
|
||||||
// Pad to the same size as ifreq.
|
|
||||||
_ [len(ifreq{}.Ifru) - SizeofPtr]byte
|
|
||||||
}
|
|
||||||
|
|
||||||
// withData produces an ifreqData with the pointer p set for ioctls which require
|
|
||||||
// arbitrary pointer data.
|
|
||||||
func (ifr Ifreq) withData(p unsafe.Pointer) ifreqData {
|
|
||||||
return ifreqData{
|
|
||||||
name: ifr.raw.Ifrn,
|
|
||||||
data: p,
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,196 +0,0 @@
|
||||||
// Copyright 2021 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 (
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
// IoctlRetInt performs an ioctl operation specified by req on a device
|
|
||||||
// associated with opened file descriptor fd, and returns a non-negative
|
|
||||||
// integer that is returned by the ioctl syscall.
|
|
||||||
func IoctlRetInt(fd int, req uint) (int, error) {
|
|
||||||
ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
|
|
||||||
if err != 0 {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
return int(ret), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlGetUint32(fd int, req uint) (uint32, error) {
|
|
||||||
var value uint32
|
|
||||||
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
|
|
||||||
return value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
|
|
||||||
var value RTCTime
|
|
||||||
err := ioctlPtr(fd, RTC_RD_TIME, unsafe.Pointer(&value))
|
|
||||||
return &value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetRTCTime(fd int, value *RTCTime) error {
|
|
||||||
return ioctlPtr(fd, RTC_SET_TIME, unsafe.Pointer(value))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
|
|
||||||
var value RTCWkAlrm
|
|
||||||
err := ioctlPtr(fd, RTC_WKALM_RD, unsafe.Pointer(&value))
|
|
||||||
return &value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
|
|
||||||
return ioctlPtr(fd, RTC_WKALM_SET, unsafe.Pointer(value))
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
|
|
||||||
// device specified by ifname.
|
|
||||||
func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
|
|
||||||
ifr, err := NewIfreq(ifname)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
value := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO}
|
|
||||||
ifrd := ifr.withData(unsafe.Pointer(&value))
|
|
||||||
|
|
||||||
err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)
|
|
||||||
return &value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlGetWatchdogInfo fetches information about a watchdog device from the
|
|
||||||
// Linux watchdog API. For more information, see:
|
|
||||||
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
|
||||||
func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
|
|
||||||
var value WatchdogInfo
|
|
||||||
err := ioctlPtr(fd, WDIOC_GETSUPPORT, unsafe.Pointer(&value))
|
|
||||||
return &value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For
|
|
||||||
// more information, see:
|
|
||||||
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
|
||||||
func IoctlWatchdogKeepalive(fd int) error {
|
|
||||||
// arg is ignored and not a pointer, so ioctl is fine instead of ioctlPtr.
|
|
||||||
return ioctl(fd, WDIOC_KEEPALIVE, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the
|
|
||||||
// range of data conveyed in value to the file associated with the file
|
|
||||||
// descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
|
|
||||||
func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
|
|
||||||
return ioctlPtr(destFd, FICLONERANGE, unsafe.Pointer(value))
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
|
|
||||||
// associated with the file description srcFd to the file associated with the
|
|
||||||
// file descriptor destFd. See the ioctl_ficlone(2) man page for details.
|
|
||||||
func IoctlFileClone(destFd, srcFd int) error {
|
|
||||||
return ioctl(destFd, FICLONE, uintptr(srcFd))
|
|
||||||
}
|
|
||||||
|
|
||||||
type FileDedupeRange struct {
|
|
||||||
Src_offset uint64
|
|
||||||
Src_length uint64
|
|
||||||
Reserved1 uint16
|
|
||||||
Reserved2 uint32
|
|
||||||
Info []FileDedupeRangeInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
type FileDedupeRangeInfo struct {
|
|
||||||
Dest_fd int64
|
|
||||||
Dest_offset uint64
|
|
||||||
Bytes_deduped uint64
|
|
||||||
Status int32
|
|
||||||
Reserved uint32
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the
|
|
||||||
// range of data conveyed in value from the file associated with the file
|
|
||||||
// descriptor srcFd to the value.Info destinations. See the
|
|
||||||
// ioctl_fideduperange(2) man page for details.
|
|
||||||
func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
|
|
||||||
buf := make([]byte, SizeofRawFileDedupeRange+
|
|
||||||
len(value.Info)*SizeofRawFileDedupeRangeInfo)
|
|
||||||
rawrange := (*RawFileDedupeRange)(unsafe.Pointer(&buf[0]))
|
|
||||||
rawrange.Src_offset = value.Src_offset
|
|
||||||
rawrange.Src_length = value.Src_length
|
|
||||||
rawrange.Dest_count = uint16(len(value.Info))
|
|
||||||
rawrange.Reserved1 = value.Reserved1
|
|
||||||
rawrange.Reserved2 = value.Reserved2
|
|
||||||
|
|
||||||
for i := range value.Info {
|
|
||||||
rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
|
|
||||||
uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
|
|
||||||
uintptr(i*SizeofRawFileDedupeRangeInfo)))
|
|
||||||
rawinfo.Dest_fd = value.Info[i].Dest_fd
|
|
||||||
rawinfo.Dest_offset = value.Info[i].Dest_offset
|
|
||||||
rawinfo.Bytes_deduped = value.Info[i].Bytes_deduped
|
|
||||||
rawinfo.Status = value.Info[i].Status
|
|
||||||
rawinfo.Reserved = value.Info[i].Reserved
|
|
||||||
}
|
|
||||||
|
|
||||||
err := ioctlPtr(srcFd, FIDEDUPERANGE, unsafe.Pointer(&buf[0]))
|
|
||||||
|
|
||||||
// Output
|
|
||||||
for i := range value.Info {
|
|
||||||
rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
|
|
||||||
uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
|
|
||||||
uintptr(i*SizeofRawFileDedupeRangeInfo)))
|
|
||||||
value.Info[i].Dest_fd = rawinfo.Dest_fd
|
|
||||||
value.Info[i].Dest_offset = rawinfo.Dest_offset
|
|
||||||
value.Info[i].Bytes_deduped = rawinfo.Bytes_deduped
|
|
||||||
value.Info[i].Status = rawinfo.Status
|
|
||||||
value.Info[i].Reserved = rawinfo.Reserved
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
|
|
||||||
return ioctlPtr(fd, HIDIOCGRDESC, unsafe.Pointer(value))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
|
|
||||||
var value HIDRawDevInfo
|
|
||||||
err := ioctlPtr(fd, HIDIOCGRAWINFO, unsafe.Pointer(&value))
|
|
||||||
return &value, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlHIDGetRawName(fd int) (string, error) {
|
|
||||||
var value [_HIDIOCGRAWNAME_LEN]byte
|
|
||||||
err := ioctlPtr(fd, _HIDIOCGRAWNAME, unsafe.Pointer(&value[0]))
|
|
||||||
return ByteSliceToString(value[:]), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlHIDGetRawPhys(fd int) (string, error) {
|
|
||||||
var value [_HIDIOCGRAWPHYS_LEN]byte
|
|
||||||
err := ioctlPtr(fd, _HIDIOCGRAWPHYS, unsafe.Pointer(&value[0]))
|
|
||||||
return ByteSliceToString(value[:]), err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlHIDGetRawUniq(fd int) (string, error) {
|
|
||||||
var value [_HIDIOCGRAWUNIQ_LEN]byte
|
|
||||||
err := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0]))
|
|
||||||
return ByteSliceToString(value[:]), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// IoctlIfreq performs an ioctl using an Ifreq structure for input and/or
|
|
||||||
// output. See the netdevice(7) man page for details.
|
|
||||||
func IoctlIfreq(fd int, req uint, value *Ifreq) error {
|
|
||||||
// It is possible we will add more fields to *Ifreq itself later to prevent
|
|
||||||
// misuse, so pass the raw *ifreq directly.
|
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(&value.raw))
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(mdlayher): export if and when IfreqData is exported.
|
|
||||||
|
|
||||||
// ioctlIfreqData performs an ioctl using an ifreqData structure for input
|
|
||||||
// and/or output. See the netdevice(7) man page for details.
|
|
||||||
func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
|
|
||||||
// The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are
|
|
||||||
// identical so pass *IfreqData directly.
|
|
||||||
return ioctlPtr(fd, req, unsafe.Pointer(value))
|
|
||||||
}
|
|
|
@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
|
||||||
# Use the Docker-based build system
|
# Use the Docker-based build system
|
||||||
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
|
||||||
$cmd docker build --tag generate:$GOOS $GOOS
|
$cmd docker build --tag generate:$GOOS $GOOS
|
||||||
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
|
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -70,11 +70,23 @@ aix_ppc64)
|
||||||
mksyscall="go run mksyscall_aix_ppc64.go -aix"
|
mksyscall="go run mksyscall_aix_ppc64.go -aix"
|
||||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||||
;;
|
;;
|
||||||
|
darwin_386)
|
||||||
|
mkerrors="$mkerrors -m32"
|
||||||
|
mksyscall="go run mksyscall.go -l32"
|
||||||
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||||
|
mkasm="go run mkasm_darwin.go"
|
||||||
|
;;
|
||||||
darwin_amd64)
|
darwin_amd64)
|
||||||
mkerrors="$mkerrors -m64"
|
mkerrors="$mkerrors -m64"
|
||||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||||
mkasm="go run mkasm_darwin.go"
|
mkasm="go run mkasm_darwin.go"
|
||||||
;;
|
;;
|
||||||
|
darwin_arm)
|
||||||
|
mkerrors="$mkerrors"
|
||||||
|
mksyscall="go run mksyscall.go -l32"
|
||||||
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||||
|
mkasm="go run mkasm_darwin.go"
|
||||||
|
;;
|
||||||
darwin_arm64)
|
darwin_arm64)
|
||||||
mkerrors="$mkerrors -m64"
|
mkerrors="$mkerrors -m64"
|
||||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||||
|
@ -187,7 +199,7 @@ illumos_amd64)
|
||||||
mksyscall="go run mksyscall_solaris.go"
|
mksyscall="go run mksyscall_solaris.go"
|
||||||
mkerrors=
|
mkerrors=
|
||||||
mksysnum=
|
mksysnum=
|
||||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
mktypes=
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
|
echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
|
||||||
|
|
|
@ -54,9 +54,8 @@ includes_AIX='
|
||||||
|
|
||||||
includes_Darwin='
|
includes_Darwin='
|
||||||
#define _DARWIN_C_SOURCE
|
#define _DARWIN_C_SOURCE
|
||||||
#define KERNEL 1
|
#define KERNEL
|
||||||
#define _DARWIN_USE_64_BIT_INODE
|
#define _DARWIN_USE_64_BIT_INODE
|
||||||
#define __APPLE_USE_RFC_3542
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/attr.h>
|
#include <sys/attr.h>
|
||||||
#include <sys/clonefile.h>
|
#include <sys/clonefile.h>
|
||||||
|
@ -75,7 +74,6 @@ includes_Darwin='
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
#include <sys/vsock.h>
|
|
||||||
#include <net/bpf.h>
|
#include <net/bpf.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <net/if_types.h>
|
#include <net/if_types.h>
|
||||||
|
@ -83,9 +81,6 @@ includes_Darwin='
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
|
|
||||||
#define TIOCREMOTE 0x80047469
|
|
||||||
'
|
'
|
||||||
|
|
||||||
includes_DragonFly='
|
includes_DragonFly='
|
||||||
|
@ -221,6 +216,7 @@ struct ltchars {
|
||||||
#include <linux/genetlink.h>
|
#include <linux/genetlink.h>
|
||||||
#include <linux/hdreg.h>
|
#include <linux/hdreg.h>
|
||||||
#include <linux/hidraw.h>
|
#include <linux/hidraw.h>
|
||||||
|
#include <linux/icmpv6.h>
|
||||||
#include <linux/if.h>
|
#include <linux/if.h>
|
||||||
#include <linux/if_addr.h>
|
#include <linux/if_addr.h>
|
||||||
#include <linux/if_alg.h>
|
#include <linux/if_alg.h>
|
||||||
|
@ -233,17 +229,14 @@ struct ltchars {
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/kexec.h>
|
#include <linux/kexec.h>
|
||||||
#include <linux/keyctl.h>
|
#include <linux/keyctl.h>
|
||||||
#include <linux/landlock.h>
|
|
||||||
#include <linux/loop.h>
|
#include <linux/loop.h>
|
||||||
#include <linux/lwtunnel.h>
|
#include <linux/lwtunnel.h>
|
||||||
#include <linux/magic.h>
|
#include <linux/magic.h>
|
||||||
#include <linux/memfd.h>
|
#include <linux/memfd.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/mount.h>
|
|
||||||
#include <linux/netfilter/nfnetlink.h>
|
#include <linux/netfilter/nfnetlink.h>
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
#include <linux/net_namespace.h>
|
#include <linux/net_namespace.h>
|
||||||
#include <linux/nfc.h>
|
|
||||||
#include <linux/nsfs.h>
|
#include <linux/nsfs.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
#include <linux/pps.h>
|
#include <linux/pps.h>
|
||||||
|
@ -261,10 +254,8 @@ struct ltchars {
|
||||||
#include <linux/vm_sockets.h>
|
#include <linux/vm_sockets.h>
|
||||||
#include <linux/wait.h>
|
#include <linux/wait.h>
|
||||||
#include <linux/watchdog.h>
|
#include <linux/watchdog.h>
|
||||||
#include <linux/wireguard.h>
|
|
||||||
|
|
||||||
#include <mtd/ubi-user.h>
|
#include <mtd/ubi-user.h>
|
||||||
#include <mtd/mtd-user.h>
|
|
||||||
#include <net/route.h>
|
#include <net/route.h>
|
||||||
|
|
||||||
#if defined(__sparc__)
|
#if defined(__sparc__)
|
||||||
|
@ -412,11 +403,10 @@ includes_SunOS='
|
||||||
#include <net/if_arp.h>
|
#include <net/if_arp.h>
|
||||||
#include <net/if_types.h>
|
#include <net/if_types.h>
|
||||||
#include <net/route.h>
|
#include <net/route.h>
|
||||||
#include <netinet/icmp6.h>
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <termios.h>
|
||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
#include <netinet/ip_mroute.h>
|
#include <netinet/ip_mroute.h>
|
||||||
#include <termios.h>
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
||||||
|
@ -472,6 +462,7 @@ ccflags="$@"
|
||||||
$2 !~ /^EQUIV_/ &&
|
$2 !~ /^EQUIV_/ &&
|
||||||
$2 !~ /^EXPR_/ &&
|
$2 !~ /^EXPR_/ &&
|
||||||
$2 !~ /^EVIOC/ &&
|
$2 !~ /^EVIOC/ &&
|
||||||
|
$2 !~ /^EV_/ &&
|
||||||
$2 ~ /^E[A-Z0-9_]+$/ ||
|
$2 ~ /^E[A-Z0-9_]+$/ ||
|
||||||
$2 ~ /^B[0-9_]+$/ ||
|
$2 ~ /^B[0-9_]+$/ ||
|
||||||
$2 ~ /^(OLD|NEW)DEV$/ ||
|
$2 ~ /^(OLD|NEW)DEV$/ ||
|
||||||
|
@ -503,17 +494,13 @@ ccflags="$@"
|
||||||
$2 ~ /^O?XTABS$/ ||
|
$2 ~ /^O?XTABS$/ ||
|
||||||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||||
$2 ~ /^IN_/ ||
|
$2 ~ /^IN_/ ||
|
||||||
$2 ~ /^LANDLOCK_/ ||
|
|
||||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
|
||||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
|
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
|
||||||
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
|
||||||
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
|
||||||
$2 ~ /^RAW_PAYLOAD_/ ||
|
|
||||||
$2 ~ /^TP_STATUS_/ ||
|
$2 ~ /^TP_STATUS_/ ||
|
||||||
$2 ~ /^FALLOC_/ ||
|
$2 ~ /^FALLOC_/ ||
|
||||||
$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
|
$2 == "ICMPV6_FILTER" ||
|
||||||
$2 == "SOMAXCONN" ||
|
$2 == "SOMAXCONN" ||
|
||||||
$2 == "NAME_MAX" ||
|
$2 == "NAME_MAX" ||
|
||||||
$2 == "IFNAMSIZ" ||
|
$2 == "IFNAMSIZ" ||
|
||||||
|
@ -522,7 +509,7 @@ ccflags="$@"
|
||||||
$2 ~ /^HW_MACHINE$/ ||
|
$2 ~ /^HW_MACHINE$/ ||
|
||||||
$2 ~ /^SYSCTL_VERS/ ||
|
$2 ~ /^SYSCTL_VERS/ ||
|
||||||
$2 !~ "MNT_BITS" &&
|
$2 !~ "MNT_BITS" &&
|
||||||
$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
|
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
|
||||||
$2 ~ /^NS_GET_/ ||
|
$2 ~ /^NS_GET_/ ||
|
||||||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
|
||||||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
|
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
|
||||||
|
@ -568,7 +555,6 @@ ccflags="$@"
|
||||||
$2 ~ /^KEYCTL_/ ||
|
$2 ~ /^KEYCTL_/ ||
|
||||||
$2 ~ /^PERF_/ ||
|
$2 ~ /^PERF_/ ||
|
||||||
$2 ~ /^SECCOMP_MODE_/ ||
|
$2 ~ /^SECCOMP_MODE_/ ||
|
||||||
$2 ~ /^SEEK_/ ||
|
|
||||||
$2 ~ /^SPLICE_/ ||
|
$2 ~ /^SPLICE_/ ||
|
||||||
$2 ~ /^SYNC_FILE_RANGE_/ ||
|
$2 ~ /^SYNC_FILE_RANGE_/ ||
|
||||||
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
|
$2 !~ /^AUDIT_RECORD_MAGIC/ &&
|
||||||
|
@ -597,7 +583,6 @@ ccflags="$@"
|
||||||
$2 ~ /^DEVLINK_/ ||
|
$2 ~ /^DEVLINK_/ ||
|
||||||
$2 ~ /^ETHTOOL_/ ||
|
$2 ~ /^ETHTOOL_/ ||
|
||||||
$2 ~ /^LWTUNNEL_IP/ ||
|
$2 ~ /^LWTUNNEL_IP/ ||
|
||||||
$2 ~ /^ITIMER_/ ||
|
|
||||||
$2 !~ "WMESGLEN" &&
|
$2 !~ "WMESGLEN" &&
|
||||||
$2 ~ /^W[A-Z0-9]+$/ ||
|
$2 ~ /^W[A-Z0-9]+$/ ||
|
||||||
$2 ~/^PPPIOC/ ||
|
$2 ~/^PPPIOC/ ||
|
||||||
|
@ -605,10 +590,6 @@ ccflags="$@"
|
||||||
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
|
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
|
||||||
$2 ~ /^_?HIDIOC/ ||
|
$2 ~ /^_?HIDIOC/ ||
|
||||||
$2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
|
$2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
|
||||||
$2 ~ /^MTD/ ||
|
|
||||||
$2 ~ /^OTP/ ||
|
|
||||||
$2 ~ /^MEM/ ||
|
|
||||||
$2 ~ /^WG/ ||
|
|
||||||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
|
||||||
$2 ~ /^__WCOREFLAG$/ {next}
|
$2 ~ /^__WCOREFLAG$/ {next}
|
||||||
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
|
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
|
||||||
|
|
|
@ -34,52 +34,3 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
|
||||||
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
|
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
|
||||||
return &ucred, nil
|
return &ucred, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
|
|
||||||
func PktInfo4(info *Inet4Pktinfo) []byte {
|
|
||||||
b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
|
|
||||||
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
|
||||||
h.Level = SOL_IP
|
|
||||||
h.Type = IP_PKTINFO
|
|
||||||
h.SetLen(CmsgLen(SizeofInet4Pktinfo))
|
|
||||||
*(*Inet4Pktinfo)(h.data(0)) = *info
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
|
|
||||||
func PktInfo6(info *Inet6Pktinfo) []byte {
|
|
||||||
b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
|
|
||||||
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
|
|
||||||
h.Level = SOL_IPV6
|
|
||||||
h.Type = IPV6_PKTINFO
|
|
||||||
h.SetLen(CmsgLen(SizeofInet6Pktinfo))
|
|
||||||
*(*Inet6Pktinfo)(h.data(0)) = *info
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ParseOrigDstAddr decodes a socket control message containing the original
|
|
||||||
// destination address. To receive such a message the IP_RECVORIGDSTADDR or
|
|
||||||
// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
|
|
||||||
func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
|
|
||||||
switch {
|
|
||||||
case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
|
|
||||||
pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
|
|
||||||
sa := new(SockaddrInet4)
|
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
|
||||||
sa.Addr = pp.Addr
|
|
||||||
return sa, nil
|
|
||||||
|
|
||||||
case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
|
|
||||||
pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
|
|
||||||
sa := new(SockaddrInet6)
|
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
|
||||||
sa.ZoneId = pp.Scope_id
|
|
||||||
sa.Addr = pp.Addr
|
|
||||||
return sa, nil
|
|
||||||
|
|
||||||
default:
|
|
||||||
return nil, EINVAL
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -70,7 +70,9 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +85,9 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +261,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
|
@ -266,7 +272,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
|
@ -377,11 +385,6 @@ func (w WaitStatus) TrapCause() int { return -1 }
|
||||||
|
|
||||||
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
|
||||||
|
|
||||||
//sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
|
|
||||||
func Fsync(fd int) error {
|
|
||||||
return fsyncRange(fd, O_SYNC, 0, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Direct access
|
* Direct access
|
||||||
*/
|
*/
|
||||||
|
@ -398,6 +401,7 @@ func Fsync(fd int) error {
|
||||||
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
|
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
|
||||||
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
|
||||||
//sys Fdatasync(fd int) (err error)
|
//sys Fdatasync(fd int) (err error)
|
||||||
|
//sys Fsync(fd int) (err error)
|
||||||
// readdir_r
|
// readdir_r
|
||||||
//sysnb Getpgid(pid int) (pgid int, err error)
|
//sysnb Getpgid(pid int) (pgid int, err error)
|
||||||
|
|
||||||
|
@ -519,10 +523,8 @@ func Pipe(p []int) (err error) {
|
||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err = pipe(&pp)
|
err = pipe(&pp)
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,9 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +179,9 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +210,9 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
sa.raw.Nlen = sa.Nlen
|
sa.raw.Nlen = sa.Nlen
|
||||||
sa.raw.Alen = sa.Alen
|
sa.raw.Alen = sa.Alen
|
||||||
sa.raw.Slen = sa.Slen
|
sa.raw.Slen = sa.Slen
|
||||||
sa.raw.Data = sa.Data
|
for i := 0; i < len(sa.raw.Data); i++ {
|
||||||
|
sa.raw.Data[i] = sa.Data[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +228,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa.Nlen = pp.Nlen
|
sa.Nlen = pp.Nlen
|
||||||
sa.Alen = pp.Alen
|
sa.Alen = pp.Alen
|
||||||
sa.Slen = pp.Slen
|
sa.Slen = pp.Slen
|
||||||
sa.Data = pp.Data
|
for i := 0; i < len(sa.Data); i++ {
|
||||||
|
sa.Data[i] = pp.Data[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_UNIX:
|
case AF_UNIX:
|
||||||
|
@ -254,7 +262,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
|
@ -263,7 +273,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return anyToSockaddrGOOS(fd, rsa)
|
return anyToSockaddrGOOS(fd, rsa)
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
|
||||||
|
|
||||||
func fdopendir(fd int) (dir uintptr, err error) {
|
func fdopendir(fd int) (dir uintptr, err error) {
|
||||||
r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
|
r0, _, e1 := syscall_syscallPtr(funcPC(libc_fdopendir_trampoline), uintptr(fd), 0, 0)
|
||||||
dir = uintptr(r0)
|
dir = uintptr(r0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
err = errnoErr(e1)
|
err = errnoErr(e1)
|
||||||
|
@ -25,7 +25,7 @@ func fdopendir(fd int) (dir uintptr, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var libc_fdopendir_trampoline_addr uintptr
|
func libc_fdopendir_trampoline()
|
||||||
|
|
||||||
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
|
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
@ -48,30 +47,6 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
|
|
||||||
// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
|
|
||||||
// bidirectional communication between a hypervisor and its guest virtual
|
|
||||||
// machines.
|
|
||||||
type SockaddrVM struct {
|
|
||||||
// CID and Port specify a context ID and port address for a VM socket.
|
|
||||||
// Guests have a unique CID, and hosts may have a well-known CID of:
|
|
||||||
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
|
|
||||||
// - VMADDR_CID_LOCAL: refers to local communication (loopback).
|
|
||||||
// - VMADDR_CID_HOST: refers to other processes on the host.
|
|
||||||
CID uint32
|
|
||||||
Port uint32
|
|
||||||
raw RawSockaddrVM
|
|
||||||
}
|
|
||||||
|
|
||||||
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|
||||||
sa.raw.Len = SizeofSockaddrVM
|
|
||||||
sa.raw.Family = AF_VSOCK
|
|
||||||
sa.raw.Port = sa.Port
|
|
||||||
sa.raw.Cid = sa.CID
|
|
||||||
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
switch rsa.Addr.Family {
|
switch rsa.Addr.Family {
|
||||||
case AF_SYSTEM:
|
case AF_SYSTEM:
|
||||||
|
@ -82,13 +57,6 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa.Unit = pp.Sc_unit
|
sa.Unit = pp.Sc_unit
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
case AF_VSOCK:
|
|
||||||
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
|
|
||||||
sa := &SockaddrVM{
|
|
||||||
CID: pp.Cid,
|
|
||||||
Port: pp.Port,
|
|
||||||
}
|
|
||||||
return sa, nil
|
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
}
|
}
|
||||||
|
@ -159,10 +127,8 @@ func Pipe(p []int) (err error) {
|
||||||
}
|
}
|
||||||
var x [2]int32
|
var x [2]int32
|
||||||
err = pipe(&x)
|
err = pipe(&x)
|
||||||
if err == nil {
|
|
||||||
p[0] = int(x[0])
|
p[0] = int(x[0])
|
||||||
p[1] = int(x[1])
|
p[1] = int(x[1])
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,17 +378,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
|
|
||||||
var value IPMreqn
|
|
||||||
vallen := _Socklen(SizeofIPMreqn)
|
|
||||||
errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
|
|
||||||
return &value, errno
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
|
|
||||||
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.
|
// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.
|
||||||
// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.
|
// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.
|
||||||
func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
|
func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
|
||||||
|
@ -432,62 +387,8 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
|
||||||
return x, err
|
return x, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
|
|
||||||
mib, err := sysctlmib(name, args...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
var kinfo KinfoProc
|
|
||||||
n := uintptr(SizeofKinfoProc)
|
|
||||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if n != SizeofKinfoProc {
|
|
||||||
return nil, EIO
|
|
||||||
}
|
|
||||||
return &kinfo, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
|
||||||
mib, err := sysctlmib(name, args...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find size.
|
|
||||||
n := uintptr(0)
|
|
||||||
if err := sysctl(mib, nil, &n, nil, 0); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if n == 0 {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
if n%SizeofKinfoProc != 0 {
|
|
||||||
return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read into buffer of that size.
|
|
||||||
buf := make([]KinfoProc, n/SizeofKinfoProc)
|
|
||||||
if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if n%SizeofKinfoProc != 0 {
|
|
||||||
return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
|
|
||||||
}
|
|
||||||
|
|
||||||
// The actual call may return less than the original reported required
|
|
||||||
// size so ensure we deal with that.
|
|
||||||
return buf[:n/SizeofKinfoProc], nil
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||||
|
|
||||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
|
||||||
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
|
||||||
//sys shmdt(addr uintptr) (err error)
|
|
||||||
//sys shmget(key int, size int, flag int) (id int, err error)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exposed directly
|
* Exposed directly
|
||||||
*/
|
*/
|
||||||
|
@ -645,6 +546,10 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
||||||
// Msgget
|
// Msgget
|
||||||
// Msgsnd
|
// Msgsnd
|
||||||
// Msgrcv
|
// Msgrcv
|
||||||
|
// Shmat
|
||||||
|
// Shmctl
|
||||||
|
// Shmdt
|
||||||
|
// Shmget
|
||||||
// Shm_open
|
// Shm_open
|
||||||
// Shm_unlink
|
// Shm_unlink
|
||||||
// Sem_open
|
// Sem_open
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build 386 && darwin
|
||||||
|
// +build 386,darwin
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
|
func setTimespec(sec, nsec int64) Timespec {
|
||||||
|
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setTimeval(sec, usec int64) Timeval {
|
||||||
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 (msghdr *Msghdr) SetIovlen(length int) {
|
||||||
|
msghdr.Iovlen = int32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
|
cmsg.Len = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||||
|
|
||||||
|
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||||
|
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||||
|
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
|
||||||
|
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
|
||||||
|
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||||
|
//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
|
||||||
|
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
||||||
|
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
|
|
@ -0,0 +1,51 @@
|
||||||
|
// Copyright 2015 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
|
func ptrace1(request int, pid int, addr uintptr, data uintptr) error {
|
||||||
|
return ENOTSUP
|
||||||
|
}
|
||||||
|
|
||||||
|
func setTimespec(sec, nsec int64) Timespec {
|
||||||
|
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setTimeval(sec, usec int64) Timeval {
|
||||||
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 (msghdr *Msghdr) SetIovlen(length int) {
|
||||||
|
msghdr.Iovlen = int32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
|
cmsg.Len = uint32(length)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
|
||||||
|
|
||||||
|
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||||
|
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
|
||||||
|
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
|
||||||
|
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
|
||||||
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
|
//sys Stat(path string, stat *Stat_t) (err error)
|
||||||
|
//sys Statfs(path string, stat *Statfs_t) (err error)
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import _ "unsafe"
|
import "unsafe"
|
||||||
|
|
||||||
// Implemented in the runtime package (runtime/sys_darwin.go)
|
// Implemented in the runtime package (runtime/sys_darwin.go)
|
||||||
func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
||||||
|
@ -25,3 +25,10 @@ func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
|
||||||
//go:linkname syscall_rawSyscall syscall.rawSyscall
|
//go:linkname syscall_rawSyscall syscall.rawSyscall
|
||||||
//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
|
//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
|
||||||
//go:linkname syscall_syscallPtr syscall.syscallPtr
|
//go:linkname syscall_syscallPtr syscall.syscallPtr
|
||||||
|
|
||||||
|
// Find the entry point for f. See comments in runtime/proc.go for the
|
||||||
|
// function of the same name.
|
||||||
|
//go:nosplit
|
||||||
|
func funcPC(f func()) uintptr {
|
||||||
|
return **(**uintptr)(unsafe.Pointer(&f))
|
||||||
|
}
|
||||||
|
|
|
@ -101,10 +101,7 @@ func Pipe(p []int) (err error) {
|
||||||
if len(p) != 2 {
|
if len(p) != 2 {
|
||||||
return EINVAL
|
return EINVAL
|
||||||
}
|
}
|
||||||
r, w, err := pipe()
|
p[0], p[1], err = pipe()
|
||||||
if err == nil {
|
|
||||||
p[0], p[1] = r, w
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,10 +114,7 @@ func Pipe2(p []int, flags int) (err error) {
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
// pipe2 on dragonfly takes an fds array as an argument, but still
|
// pipe2 on dragonfly takes an fds array as an argument, but still
|
||||||
// returns the file descriptors.
|
// returns the file descriptors.
|
||||||
r, w, err := pipe2(&pp, flags)
|
p[0], p[1], err = pipe2(&pp, flags)
|
||||||
if err == nil {
|
|
||||||
p[0], p[1] = r, w
|
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,10 +110,8 @@ func Pipe2(p []int, flags int) error {
|
||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
@ -9,11 +9,7 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import "unsafe"
|
||||||
"fmt"
|
|
||||||
"runtime"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
func bytes2iovec(bs [][]byte) []Iovec {
|
func bytes2iovec(bs [][]byte) []Iovec {
|
||||||
iovecs := make([]Iovec, len(bs))
|
iovecs := make([]Iovec, len(bs))
|
||||||
|
@ -80,107 +76,3 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
|
|
||||||
|
|
||||||
func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
|
|
||||||
var clp, datap *strbuf
|
|
||||||
if len(cl) > 0 {
|
|
||||||
clp = &strbuf{
|
|
||||||
Len: int32(len(cl)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(data) > 0 {
|
|
||||||
datap = &strbuf{
|
|
||||||
Len: int32(len(data)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return putmsg(fd, clp, datap, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
|
|
||||||
|
|
||||||
func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
|
|
||||||
var clp, datap *strbuf
|
|
||||||
if len(cl) > 0 {
|
|
||||||
clp = &strbuf{
|
|
||||||
Maxlen: int32(len(cl)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&cl[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(data) > 0 {
|
|
||||||
datap = &strbuf{
|
|
||||||
Maxlen: int32(len(data)),
|
|
||||||
Buf: (*int8)(unsafe.Pointer(&data[0])),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if err = getmsg(fd, clp, datap, &flags); err != nil {
|
|
||||||
return nil, nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(cl) > 0 {
|
|
||||||
retCl = cl[:clp.Len]
|
|
||||||
}
|
|
||||||
if len(data) > 0 {
|
|
||||||
retData = data[:datap.Len]
|
|
||||||
}
|
|
||||||
return retCl, retData, flags, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
|
|
||||||
return ioctlRet(fd, req, uintptr(arg))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetString(fd int, req uint, val string) error {
|
|
||||||
bs := make([]byte, len(val)+1)
|
|
||||||
copy(bs[:len(bs)-1], val)
|
|
||||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
|
|
||||||
runtime.KeepAlive(&bs[0])
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lifreq Helpers
|
|
||||||
|
|
||||||
func (l *Lifreq) SetName(name string) error {
|
|
||||||
if len(name) >= len(l.Name) {
|
|
||||||
return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
|
|
||||||
}
|
|
||||||
for i := range name {
|
|
||||||
l.Name[i] = int8(name[i])
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) SetLifruInt(d int) {
|
|
||||||
*(*int)(unsafe.Pointer(&l.Lifru[0])) = d
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) GetLifruInt() int {
|
|
||||||
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) SetLifruUint(d uint) {
|
|
||||||
*(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Lifreq) GetLifruUint() uint {
|
|
||||||
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
|
|
||||||
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Strioctl Helpers
|
|
||||||
|
|
||||||
func (s *Strioctl) SetInt(i int) {
|
|
||||||
s.Len = int32(unsafe.Sizeof(i))
|
|
||||||
s.Dp = (*int8)(unsafe.Pointer(&i))
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
|
|
||||||
return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
|
|
||||||
}
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"runtime"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -38,13 +38,6 @@ func Creat(path string, mode uint32) (fd int, err error) {
|
||||||
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
|
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func EpollCreate(size int) (fd int, err error) {
|
|
||||||
if size <= 0 {
|
|
||||||
return -1, EINVAL
|
|
||||||
}
|
|
||||||
return EpollCreate1(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
|
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
|
||||||
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
|
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
|
||||||
|
|
||||||
|
@ -73,22 +66,171 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||||
return fchmodat(dirfd, path, mode)
|
return fchmodat(dirfd, path, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func InotifyInit() (fd int, err error) {
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
return InotifyInit1(0)
|
|
||||||
|
// ioctl itself should not be exposed directly, but additional get/set
|
||||||
|
// functions for specific types are permissible.
|
||||||
|
|
||||||
|
// IoctlRetInt performs an ioctl operation specified by req on a device
|
||||||
|
// associated with opened file descriptor fd, and returns a non-negative
|
||||||
|
// integer that is returned by the ioctl syscall.
|
||||||
|
func IoctlRetInt(fd int, req uint) (int, error) {
|
||||||
|
ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
|
||||||
|
if err != 0 {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
return int(ret), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
|
func IoctlSetRTCTime(fd int, value *RTCTime) error {
|
||||||
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
|
err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
|
||||||
|
runtime.KeepAlive(value)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// ioctl itself should not be exposed directly, but additional get/set functions
|
func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
|
||||||
// for specific types are permissible. These are defined in ioctl.go and
|
err := ioctl(fd, RTC_WKALM_SET, uintptr(unsafe.Pointer(value)))
|
||||||
// ioctl_linux.go.
|
runtime.KeepAlive(value)
|
||||||
//
|
return err
|
||||||
// The third argument to ioctl is often a pointer but sometimes an integer.
|
}
|
||||||
// Callers should use ioctlPtr when the third argument is a pointer and ioctl
|
|
||||||
// when the third argument is an integer.
|
func IoctlGetUint32(fd int, req uint) (uint32, error) {
|
||||||
//
|
var value uint32
|
||||||
// TODO: some existing code incorrectly uses ioctl when it should use ioctlPtr.
|
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
||||||
|
return value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlGetRTCTime(fd int) (*RTCTime, error) {
|
||||||
|
var value RTCTime
|
||||||
|
err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlGetWatchdogInfo fetches information about a watchdog device from the
|
||||||
|
// Linux watchdog API. For more information, see:
|
||||||
|
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
||||||
|
func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) {
|
||||||
|
var value WatchdogInfo
|
||||||
|
err := ioctl(fd, WDIOC_GETSUPPORT, uintptr(unsafe.Pointer(&value)))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
|
||||||
|
var value RTCWkAlrm
|
||||||
|
err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value)))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the
|
||||||
|
// range of data conveyed in value to the file associated with the file
|
||||||
|
// descriptor destFd. See the ioctl_ficlonerange(2) man page for details.
|
||||||
|
func IoctlFileCloneRange(destFd int, value *FileCloneRange) error {
|
||||||
|
err := ioctl(destFd, FICLONERANGE, uintptr(unsafe.Pointer(value)))
|
||||||
|
runtime.KeepAlive(value)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlFileClone performs an FICLONE ioctl operation to clone the entire file
|
||||||
|
// associated with the file description srcFd to the file associated with the
|
||||||
|
// file descriptor destFd. See the ioctl_ficlone(2) man page for details.
|
||||||
|
func IoctlFileClone(destFd, srcFd int) error {
|
||||||
|
return ioctl(destFd, FICLONE, uintptr(srcFd))
|
||||||
|
}
|
||||||
|
|
||||||
|
type FileDedupeRange struct {
|
||||||
|
Src_offset uint64
|
||||||
|
Src_length uint64
|
||||||
|
Reserved1 uint16
|
||||||
|
Reserved2 uint32
|
||||||
|
Info []FileDedupeRangeInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
type FileDedupeRangeInfo struct {
|
||||||
|
Dest_fd int64
|
||||||
|
Dest_offset uint64
|
||||||
|
Bytes_deduped uint64
|
||||||
|
Status int32
|
||||||
|
Reserved uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the
|
||||||
|
// range of data conveyed in value from the file associated with the file
|
||||||
|
// descriptor srcFd to the value.Info destinations. See the
|
||||||
|
// ioctl_fideduperange(2) man page for details.
|
||||||
|
func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
|
||||||
|
buf := make([]byte, SizeofRawFileDedupeRange+
|
||||||
|
len(value.Info)*SizeofRawFileDedupeRangeInfo)
|
||||||
|
rawrange := (*RawFileDedupeRange)(unsafe.Pointer(&buf[0]))
|
||||||
|
rawrange.Src_offset = value.Src_offset
|
||||||
|
rawrange.Src_length = value.Src_length
|
||||||
|
rawrange.Dest_count = uint16(len(value.Info))
|
||||||
|
rawrange.Reserved1 = value.Reserved1
|
||||||
|
rawrange.Reserved2 = value.Reserved2
|
||||||
|
|
||||||
|
for i := range value.Info {
|
||||||
|
rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
|
||||||
|
uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
|
||||||
|
uintptr(i*SizeofRawFileDedupeRangeInfo)))
|
||||||
|
rawinfo.Dest_fd = value.Info[i].Dest_fd
|
||||||
|
rawinfo.Dest_offset = value.Info[i].Dest_offset
|
||||||
|
rawinfo.Bytes_deduped = value.Info[i].Bytes_deduped
|
||||||
|
rawinfo.Status = value.Info[i].Status
|
||||||
|
rawinfo.Reserved = value.Info[i].Reserved
|
||||||
|
}
|
||||||
|
|
||||||
|
err := ioctl(srcFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(&buf[0])))
|
||||||
|
|
||||||
|
// Output
|
||||||
|
for i := range value.Info {
|
||||||
|
rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
|
||||||
|
uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
|
||||||
|
uintptr(i*SizeofRawFileDedupeRangeInfo)))
|
||||||
|
value.Info[i].Dest_fd = rawinfo.Dest_fd
|
||||||
|
value.Info[i].Dest_offset = rawinfo.Dest_offset
|
||||||
|
value.Info[i].Bytes_deduped = rawinfo.Bytes_deduped
|
||||||
|
value.Info[i].Status = rawinfo.Status
|
||||||
|
value.Info[i].Reserved = rawinfo.Reserved
|
||||||
|
}
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For
|
||||||
|
// more information, see:
|
||||||
|
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
||||||
|
func IoctlWatchdogKeepalive(fd int) error {
|
||||||
|
return ioctl(fd, WDIOC_KEEPALIVE, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
|
||||||
|
err := ioctl(fd, HIDIOCGRDESC, uintptr(unsafe.Pointer(value)))
|
||||||
|
runtime.KeepAlive(value)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
|
||||||
|
var value HIDRawDevInfo
|
||||||
|
err := ioctl(fd, HIDIOCGRAWINFO, uintptr(unsafe.Pointer(&value)))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlHIDGetRawName(fd int) (string, error) {
|
||||||
|
var value [_HIDIOCGRAWNAME_LEN]byte
|
||||||
|
err := ioctl(fd, _HIDIOCGRAWNAME, uintptr(unsafe.Pointer(&value[0])))
|
||||||
|
return ByteSliceToString(value[:]), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlHIDGetRawPhys(fd int) (string, error) {
|
||||||
|
var value [_HIDIOCGRAWPHYS_LEN]byte
|
||||||
|
err := ioctl(fd, _HIDIOCGRAWPHYS, uintptr(unsafe.Pointer(&value[0])))
|
||||||
|
return ByteSliceToString(value[:]), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func IoctlHIDGetRawUniq(fd int) (string, error) {
|
||||||
|
var value [_HIDIOCGRAWUNIQ_LEN]byte
|
||||||
|
err := ioctl(fd, _HIDIOCGRAWUNIQ, uintptr(unsafe.Pointer(&value[0])))
|
||||||
|
return ByteSliceToString(value[:]), err
|
||||||
|
}
|
||||||
|
|
||||||
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
|
||||||
|
|
||||||
|
@ -120,25 +262,6 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
|
||||||
return openat2(dirfd, path, how, SizeofOpenHow)
|
return openat2(dirfd, path, how, SizeofOpenHow)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pipe(p []int) error {
|
|
||||||
return Pipe2(p, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) error {
|
|
||||||
if len(p) != 2 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
var pp [2]_C_int
|
|
||||||
err := pipe2(&pp, flags)
|
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
|
||||||
p[1] = int(pp[1])
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
|
||||||
|
|
||||||
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
||||||
|
@ -148,15 +271,6 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
|
||||||
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
return ppoll(&fds[0], len(fds), timeout, sigmask)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
|
||||||
var ts *Timespec
|
|
||||||
if timeout >= 0 {
|
|
||||||
ts = new(Timespec)
|
|
||||||
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
|
||||||
}
|
|
||||||
return Ppoll(fds, ts, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
|
||||||
|
|
||||||
func Readlink(path string, buf []byte) (n int, err error) {
|
func Readlink(path string, buf []byte) (n int, err error) {
|
||||||
|
@ -207,7 +321,27 @@ func Utimes(path string, tv []Timeval) error {
|
||||||
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
|
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
|
||||||
|
|
||||||
func UtimesNano(path string, ts []Timespec) error {
|
func UtimesNano(path string, ts []Timespec) error {
|
||||||
return UtimesNanoAt(AT_FDCWD, path, ts, 0)
|
if ts == nil {
|
||||||
|
err := utimensat(AT_FDCWD, path, nil, 0)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return utimes(path, nil)
|
||||||
|
}
|
||||||
|
if len(ts) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
|
if err != ENOSYS {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// If the utimensat syscall isn't available (utimensat was added to Linux
|
||||||
|
// in 2.6.22, Released, 8 July 2007) then fall back to utimes
|
||||||
|
var tv [2]Timeval
|
||||||
|
for i := 0; i < 2; i++ {
|
||||||
|
tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
|
||||||
|
}
|
||||||
|
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
|
||||||
}
|
}
|
||||||
|
|
||||||
func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
|
func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
|
||||||
|
@ -375,7 +509,9 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,7 +524,9 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,7 +575,9 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
sa.raw.Hatype = sa.Hatype
|
sa.raw.Hatype = sa.Hatype
|
||||||
sa.raw.Pkttype = sa.Pkttype
|
sa.raw.Pkttype = sa.Pkttype
|
||||||
sa.raw.Halen = sa.Halen
|
sa.raw.Halen = sa.Halen
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,11 +857,9 @@ type SockaddrVM struct {
|
||||||
// CID and Port specify a context ID and port address for a VM socket.
|
// CID and Port specify a context ID and port address for a VM socket.
|
||||||
// Guests have a unique CID, and hosts may have a well-known CID of:
|
// Guests have a unique CID, and hosts may have a well-known CID of:
|
||||||
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
|
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
|
||||||
// - VMADDR_CID_LOCAL: refers to local communication (loopback).
|
|
||||||
// - VMADDR_CID_HOST: refers to other processes on the host.
|
// - VMADDR_CID_HOST: refers to other processes on the host.
|
||||||
CID uint32
|
CID uint32
|
||||||
Port uint32
|
Port uint32
|
||||||
Flags uint8
|
|
||||||
raw RawSockaddrVM
|
raw RawSockaddrVM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,7 +867,6 @@ func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
sa.raw.Family = AF_VSOCK
|
sa.raw.Family = AF_VSOCK
|
||||||
sa.raw.Port = sa.Port
|
sa.raw.Port = sa.Port
|
||||||
sa.raw.Cid = sa.CID
|
sa.raw.Cid = sa.CID
|
||||||
sa.raw.Flags = sa.Flags
|
|
||||||
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
|
||||||
}
|
}
|
||||||
|
@ -852,10 +989,12 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
if sa.Addr == nil {
|
if sa.Addr == nil {
|
||||||
return nil, 0, EINVAL
|
return nil, 0, EINVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
sa.raw.Family = AF_TIPC
|
sa.raw.Family = AF_TIPC
|
||||||
sa.raw.Scope = int8(sa.Scope)
|
sa.raw.Scope = int8(sa.Scope)
|
||||||
sa.raw.Addrtype = sa.Addr.tipcAddrtype()
|
sa.raw.Addrtype = sa.Addr.tipcAddrtype()
|
||||||
sa.raw.Addr = sa.Addr.tipcAddr()
|
sa.raw.Addr = sa.Addr.tipcAddr()
|
||||||
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -869,7 +1008,9 @@ type SockaddrL2TPIP struct {
|
||||||
func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
sa.raw.Family = AF_INET
|
sa.raw.Family = AF_INET
|
||||||
sa.raw.Conn_id = sa.ConnId
|
sa.raw.Conn_id = sa.ConnId
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,7 +1026,9 @@ func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
sa.raw.Family = AF_INET6
|
sa.raw.Family = AF_INET6
|
||||||
sa.raw.Conn_id = sa.ConnId
|
sa.raw.Conn_id = sa.ConnId
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -918,46 +1061,6 @@ func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type SockaddrNFC struct {
|
|
||||||
DeviceIdx uint32
|
|
||||||
TargetIdx uint32
|
|
||||||
NFCProtocol uint32
|
|
||||||
raw RawSockaddrNFC
|
|
||||||
}
|
|
||||||
|
|
||||||
func (sa *SockaddrNFC) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|
||||||
sa.raw.Sa_family = AF_NFC
|
|
||||||
sa.raw.Dev_idx = sa.DeviceIdx
|
|
||||||
sa.raw.Target_idx = sa.TargetIdx
|
|
||||||
sa.raw.Nfc_protocol = sa.NFCProtocol
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrNFC, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type SockaddrNFCLLCP struct {
|
|
||||||
DeviceIdx uint32
|
|
||||||
TargetIdx uint32
|
|
||||||
NFCProtocol uint32
|
|
||||||
DestinationSAP uint8
|
|
||||||
SourceSAP uint8
|
|
||||||
ServiceName string
|
|
||||||
raw RawSockaddrNFCLLCP
|
|
||||||
}
|
|
||||||
|
|
||||||
func (sa *SockaddrNFCLLCP) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|
||||||
sa.raw.Sa_family = AF_NFC
|
|
||||||
sa.raw.Dev_idx = sa.DeviceIdx
|
|
||||||
sa.raw.Target_idx = sa.TargetIdx
|
|
||||||
sa.raw.Nfc_protocol = sa.NFCProtocol
|
|
||||||
sa.raw.Dsap = sa.DestinationSAP
|
|
||||||
sa.raw.Ssap = sa.SourceSAP
|
|
||||||
if len(sa.ServiceName) > len(sa.raw.Service_name) {
|
|
||||||
return nil, 0, EINVAL
|
|
||||||
}
|
|
||||||
copy(sa.raw.Service_name[:], sa.ServiceName)
|
|
||||||
sa.raw.SetServiceNameLen(len(sa.ServiceName))
|
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrNFCLLCP, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var socketProtocol = func(fd int) (int, error) {
|
var socketProtocol = func(fd int) (int, error) {
|
||||||
return GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
|
return GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
|
||||||
}
|
}
|
||||||
|
@ -981,7 +1084,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa.Hatype = pp.Hatype
|
sa.Hatype = pp.Hatype
|
||||||
sa.Pkttype = pp.Pkttype
|
sa.Pkttype = pp.Pkttype
|
||||||
sa.Halen = pp.Halen
|
sa.Halen = pp.Halen
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_UNIX:
|
case AF_UNIX:
|
||||||
|
@ -1020,14 +1125,18 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
|
pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
|
||||||
sa := new(SockaddrL2TPIP)
|
sa := new(SockaddrL2TPIP)
|
||||||
sa.ConnId = pp.Conn_id
|
sa.ConnId = pp.Conn_id
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
default:
|
default:
|
||||||
pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
|
pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
|
||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1043,7 +1152,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa := new(SockaddrL2TPIP6)
|
sa := new(SockaddrL2TPIP6)
|
||||||
sa.ConnId = pp.Conn_id
|
sa.ConnId = pp.Conn_id
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
default:
|
default:
|
||||||
pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
|
pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
|
||||||
|
@ -1051,7 +1162,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1060,7 +1173,6 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa := &SockaddrVM{
|
sa := &SockaddrVM{
|
||||||
CID: pp.Cid,
|
CID: pp.Cid,
|
||||||
Port: pp.Port,
|
Port: pp.Port,
|
||||||
Flags: pp.Flags,
|
|
||||||
}
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
case AF_BLUETOOTH:
|
case AF_BLUETOOTH:
|
||||||
|
@ -1188,37 +1300,6 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
}
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
case AF_NFC:
|
|
||||||
proto, err := socketProtocol(fd)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
switch proto {
|
|
||||||
case NFC_SOCKPROTO_RAW:
|
|
||||||
pp := (*RawSockaddrNFC)(unsafe.Pointer(rsa))
|
|
||||||
sa := &SockaddrNFC{
|
|
||||||
DeviceIdx: pp.Dev_idx,
|
|
||||||
TargetIdx: pp.Target_idx,
|
|
||||||
NFCProtocol: pp.Nfc_protocol,
|
|
||||||
}
|
|
||||||
return sa, nil
|
|
||||||
case NFC_SOCKPROTO_LLCP:
|
|
||||||
pp := (*RawSockaddrNFCLLCP)(unsafe.Pointer(rsa))
|
|
||||||
if uint64(pp.Service_name_len) > uint64(len(pp.Service_name)) {
|
|
||||||
return nil, EINVAL
|
|
||||||
}
|
|
||||||
sa := &SockaddrNFCLLCP{
|
|
||||||
DeviceIdx: pp.Dev_idx,
|
|
||||||
TargetIdx: pp.Target_idx,
|
|
||||||
NFCProtocol: pp.Nfc_protocol,
|
|
||||||
DestinationSAP: pp.Dsap,
|
|
||||||
SourceSAP: pp.Ssap,
|
|
||||||
ServiceName: string(pp.Service_name[:pp.Service_name_len]),
|
|
||||||
}
|
|
||||||
return sa, nil
|
|
||||||
default:
|
|
||||||
return nil, EINVAL
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
}
|
}
|
||||||
|
@ -1226,7 +1307,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
||||||
var rsa RawSockaddrAny
|
var rsa RawSockaddrAny
|
||||||
var len _Socklen = SizeofSockaddrAny
|
var len _Socklen = SizeofSockaddrAny
|
||||||
nfd, err = accept4(fd, &rsa, &len, 0)
|
nfd, err = accept(fd, &rsa, &len)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1348,13 +1429,6 @@ func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error {
|
||||||
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
|
return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp))
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) {
|
|
||||||
if len(o) == 0 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o)))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
|
// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
|
||||||
|
|
||||||
// KeyctlInt calls keyctl commands in which each argument is an int.
|
// KeyctlInt calls keyctl commands in which each argument is an int.
|
||||||
|
@ -1778,16 +1852,6 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
|
||||||
return mount(source, target, fstype, flags, datap)
|
return mount(source, target, fstype, flags, datap)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR
|
|
||||||
|
|
||||||
// MountSetattr is a wrapper for mount_setattr(2).
|
|
||||||
// https://man7.org/linux/man-pages/man2/mount_setattr.2.html
|
|
||||||
//
|
|
||||||
// Requires kernel >= 5.12.
|
|
||||||
func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {
|
|
||||||
return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))
|
|
||||||
}
|
|
||||||
|
|
||||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||||
if raceenabled {
|
if raceenabled {
|
||||||
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||||
|
@ -1819,7 +1883,11 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
//sys Dup(oldfd int) (fd int, err error)
|
//sys Dup(oldfd int) (fd int, err error)
|
||||||
|
|
||||||
func Dup2(oldfd, newfd int) error {
|
func Dup2(oldfd, newfd int) error {
|
||||||
|
// Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
|
||||||
|
if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
|
||||||
return Dup3(oldfd, newfd, 0)
|
return Dup3(oldfd, newfd, 0)
|
||||||
|
}
|
||||||
|
return dup2(oldfd, newfd)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
||||||
|
@ -1872,7 +1940,7 @@ func Getpgrp() (pid int) {
|
||||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||||
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
|
||||||
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
|
||||||
//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
|
||||||
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
|
||||||
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
|
||||||
//sys read(fd int, p []byte) (n int, err error)
|
//sys read(fd int, p []byte) (n int, err error)
|
||||||
|
@ -2307,64 +2375,11 @@ type RemoteIovec struct {
|
||||||
//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
|
//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
|
||||||
//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
|
//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
|
||||||
|
|
||||||
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
|
|
||||||
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
|
|
||||||
|
|
||||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
|
||||||
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
|
|
||||||
//sys shmdt(addr uintptr) (err error)
|
|
||||||
//sys shmget(key int, size int, flag int) (id int, err error)
|
|
||||||
|
|
||||||
//sys getitimer(which int, currValue *Itimerval) (err error)
|
|
||||||
//sys setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
|
|
||||||
|
|
||||||
// MakeItimerval creates an Itimerval from interval and value durations.
|
|
||||||
func MakeItimerval(interval, value time.Duration) Itimerval {
|
|
||||||
return Itimerval{
|
|
||||||
Interval: NsecToTimeval(interval.Nanoseconds()),
|
|
||||||
Value: NsecToTimeval(value.Nanoseconds()),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// A value which may be passed to the which parameter for Getitimer and
|
|
||||||
// Setitimer.
|
|
||||||
type ItimerWhich int
|
|
||||||
|
|
||||||
// Possible which values for Getitimer and Setitimer.
|
|
||||||
const (
|
|
||||||
ItimerReal ItimerWhich = ITIMER_REAL
|
|
||||||
ItimerVirtual ItimerWhich = ITIMER_VIRTUAL
|
|
||||||
ItimerProf ItimerWhich = ITIMER_PROF
|
|
||||||
)
|
|
||||||
|
|
||||||
// Getitimer wraps getitimer(2) to return the current value of the timer
|
|
||||||
// specified by which.
|
|
||||||
func Getitimer(which ItimerWhich) (Itimerval, error) {
|
|
||||||
var it Itimerval
|
|
||||||
if err := getitimer(int(which), &it); err != nil {
|
|
||||||
return Itimerval{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return it, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which.
|
|
||||||
// It returns the previous value of the timer.
|
|
||||||
//
|
|
||||||
// If the Itimerval argument is the zero value, the timer will be disarmed.
|
|
||||||
func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
|
||||||
var prev Itimerval
|
|
||||||
if err := setitimer(int(which), &it, &prev); err != nil {
|
|
||||||
return Itimerval{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return prev, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unimplemented
|
* Unimplemented
|
||||||
*/
|
*/
|
||||||
// AfsSyscall
|
// AfsSyscall
|
||||||
|
// Alarm
|
||||||
// ArchPrctl
|
// ArchPrctl
|
||||||
// Brk
|
// Brk
|
||||||
// ClockNanosleep
|
// ClockNanosleep
|
||||||
|
@ -2380,6 +2395,7 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
||||||
// GetMempolicy
|
// GetMempolicy
|
||||||
// GetRobustList
|
// GetRobustList
|
||||||
// GetThreadArea
|
// GetThreadArea
|
||||||
|
// Getitimer
|
||||||
// Getpmsg
|
// Getpmsg
|
||||||
// IoCancel
|
// IoCancel
|
||||||
// IoDestroy
|
// IoDestroy
|
||||||
|
@ -2440,6 +2456,10 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
|
||||||
// SetRobustList
|
// SetRobustList
|
||||||
// SetThreadArea
|
// SetThreadArea
|
||||||
// SetTidAddress
|
// SetTidAddress
|
||||||
|
// Shmat
|
||||||
|
// Shmctl
|
||||||
|
// Shmdt
|
||||||
|
// Shmget
|
||||||
// Sigaltstack
|
// Sigaltstack
|
||||||
// Swapoff
|
// Swapoff
|
||||||
// Swapon
|
// Swapon
|
||||||
|
|
|
@ -19,8 +19,36 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb pipe(p *[2]_C_int) (err error)
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe(&pp)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (386 default is 32-bit file system and 16-bit uid).
|
// (386 default is 32-bit file system and 16-bit uid).
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||||
|
@ -31,6 +59,7 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||||
//sysnb Getgid() (gid int) = SYS_GETGID32
|
//sysnb Getgid() (gid int) = SYS_GETGID32
|
||||||
//sysnb Getuid() (uid int) = SYS_GETUID32
|
//sysnb Getuid() (uid int) = SYS_GETUID32
|
||||||
|
//sysnb InotifyInit() (fd int, err error)
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
||||||
|
@ -76,7 +105,7 @@ const rlimInf32 = ^uint32(0)
|
||||||
const rlimInf64 = ^uint64(0)
|
const rlimInf64 = ^uint64(0)
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = Prlimit(0, resource, nil, rlim)
|
err = prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -104,7 +133,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = Prlimit(0, resource, rlim, nil)
|
err = prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -349,6 +378,11 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint32(length)
|
cmsg.Len = uint32(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
rsa.Service_name_len = uint32(length)
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2022 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
|
|
||||||
// +build linux
|
|
||||||
// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
|
|
||||||
// values.
|
|
||||||
|
|
||||||
//sys Alarm(seconds uint) (remaining uint, err error)
|
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
@ -19,6 +21,17 @@ package unix
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
|
//sysnb inotifyInit() (fd int, err error)
|
||||||
|
|
||||||
|
func InotifyInit() (fd int, err error) {
|
||||||
|
// First try inotify_init1, because Android's seccomp policy blocks the latter.
|
||||||
|
fd, err = InotifyInit1(0)
|
||||||
|
if err == ENOSYS {
|
||||||
|
fd, err = inotifyInit()
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
|
@ -113,6 +126,32 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: sec, Usec: usec}
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb pipe(p *[2]_C_int) (err error)
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe(&pp)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Rip }
|
func (r *PtraceRegs) PC() uint64 { return r.Rip }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
|
||||||
|
@ -133,8 +172,13 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
rsa.Service_name_len = uint64(length)
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||||
|
|
|
@ -19,6 +19,36 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb pipe(p *[2]_C_int) (err error)
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
// Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
|
||||||
|
err = pipe2(&pp, 0)
|
||||||
|
if err == ENOSYS {
|
||||||
|
err = pipe(&pp)
|
||||||
|
}
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
newoffset, errno := seek(fd, offset, whence)
|
newoffset, errno := seek(fd, offset, whence)
|
||||||
if errno != 0 {
|
if errno != 0 {
|
||||||
|
@ -46,6 +76,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
|
|
||||||
// 64-bit file system and 32-bit uid calls
|
// 64-bit file system and 32-bit uid calls
|
||||||
// (16-bit uid calls are not always supported in newer kernels)
|
// (16-bit uid calls are not always supported in newer kernels)
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||||
|
@ -54,6 +86,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||||
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
//sysnb Geteuid() (euid int) = SYS_GETEUID32
|
||||||
//sysnb Getgid() (gid int) = SYS_GETGID32
|
//sysnb Getgid() (gid int) = SYS_GETGID32
|
||||||
//sysnb Getuid() (uid int) = SYS_GETUID32
|
//sysnb Getuid() (uid int) = SYS_GETUID32
|
||||||
|
//sysnb InotifyInit() (fd int, err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
||||||
|
@ -151,7 +184,7 @@ const rlimInf32 = ^uint32(0)
|
||||||
const rlimInf64 = ^uint64(0)
|
const rlimInf64 = ^uint64(0)
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = Prlimit(0, resource, nil, rlim)
|
err = prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -179,7 +212,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = Prlimit(0, resource, rlim, nil)
|
err = prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -223,8 +256,13 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint32(length)
|
cmsg.Len = uint32(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
rsa.Service_name_len = uint32(length)
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
|
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
|
||||||
|
|
|
@ -9,6 +9,13 @@ package unix
|
||||||
|
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
|
||||||
|
func EpollCreate(size int) (fd int, err error) {
|
||||||
|
if size <= 0 {
|
||||||
|
return -1, EINVAL
|
||||||
|
}
|
||||||
|
return EpollCreate1(0)
|
||||||
|
}
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
@ -138,9 +145,33 @@ func utimes(path string, tv *[2]Timeval) (err error) {
|
||||||
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, 0)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Getrlimit prefers the prlimit64 system call. See issue 38604.
|
// Getrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
func Getrlimit(resource int, rlim *Rlimit) error {
|
func Getrlimit(resource int, rlim *Rlimit) error {
|
||||||
err := Prlimit(0, resource, nil, rlim)
|
err := prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -149,7 +180,7 @@ func Getrlimit(resource int, rlim *Rlimit) error {
|
||||||
|
|
||||||
// Setrlimit prefers the prlimit64 system call. See issue 38604.
|
// Setrlimit prefers the prlimit64 system call. See issue 38604.
|
||||||
func Setrlimit(resource int, rlim *Rlimit) error {
|
func Setrlimit(resource int, rlim *Rlimit) error {
|
||||||
err := Prlimit(0, resource, rlim, nil)
|
err := prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -176,15 +207,31 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
func InotifyInit() (fd int, err error) {
|
||||||
rsa.Service_name_len = uint64(length)
|
return InotifyInit1(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||||
|
// it in an unreachable path. dup2 isn't available on arm64.
|
||||||
|
func dup2(oldfd int, newfd int) error
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
_, err := ppoll(nil, 0, nil, nil)
|
_, err := ppoll(nil, 0, nil, nil)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
var ts *Timespec
|
||||||
|
if timeout >= 0 {
|
||||||
|
ts = new(Timespec)
|
||||||
|
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
||||||
|
}
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return ppoll(nil, 0, ts, nil)
|
||||||
|
}
|
||||||
|
return ppoll(&fds[0], len(fds), ts, nil)
|
||||||
|
}
|
||||||
|
|
||||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||||
|
|
||||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
@ -92,6 +94,30 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: sec, Usec: usec}
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, 0)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
return ENOSYS
|
return ENOSYS
|
||||||
}
|
}
|
||||||
|
@ -191,6 +217,15 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
func InotifyInit() (fd int, err error) {
|
||||||
rsa.Service_name_len = uint64(length)
|
return InotifyInit1(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ import (
|
||||||
|
|
||||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||||
|
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
@ -58,6 +60,7 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
||||||
|
|
||||||
|
//sysnb InotifyInit() (fd int, err error)
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
|
|
||||||
|
@ -110,6 +113,29 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe() (p1 int, p2 int, err error)
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
p[0], p[1], err = pipe()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
||||||
|
|
||||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||||
|
@ -131,7 +157,7 @@ type rlimit32 struct {
|
||||||
//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
|
//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = Prlimit(0, resource, nil, rlim)
|
err = prlimit(0, resource, nil, rlim)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -159,7 +185,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||||
err = Prlimit(0, resource, rlim, nil)
|
err = prlimit(0, resource, rlim, nil)
|
||||||
if err != ENOSYS {
|
if err != ENOSYS {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -203,6 +229,11 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint32(length)
|
cmsg.Len = uint32(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
rsa.Service_name_len = uint32(length)
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,237 +0,0 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build linux && ppc
|
|
||||||
// +build linux,ppc
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import (
|
|
||||||
"syscall"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
|
||||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
|
||||||
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
|
|
||||||
//sysnb Getegid() (egid int)
|
|
||||||
//sysnb Geteuid() (euid int)
|
|
||||||
//sysnb Getgid() (gid int)
|
|
||||||
//sysnb Getuid() (uid int)
|
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
|
||||||
//sys Iopl(level int) (err error)
|
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
|
||||||
//sys Listen(s int, n int) (err error)
|
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
|
|
||||||
//sys Pause() (err error)
|
|
||||||
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
|
|
||||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
|
||||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
|
||||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
|
||||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
|
||||||
//sys setfsgid(gid int) (prev int, err error)
|
|
||||||
//sys setfsuid(uid int) (prev int, err error)
|
|
||||||
//sysnb Setregid(rgid int, egid int) (err error)
|
|
||||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
|
||||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
|
||||||
//sysnb Setreuid(ruid int, euid int) (err error)
|
|
||||||
//sys Shutdown(fd int, how int) (err error)
|
|
||||||
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
|
|
||||||
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
|
|
||||||
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
|
|
||||||
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
|
|
||||||
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
|
|
||||||
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
|
|
||||||
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
|
||||||
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
|
|
||||||
//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
|
|
||||||
//sysnb setgroups(n int, list *_Gid_t) (err error)
|
|
||||||
//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
|
|
||||||
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
|
|
||||||
//sysnb socket(domain int, typ int, proto int) (fd int, err error)
|
|
||||||
//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
|
|
||||||
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
|
||||||
//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
|
|
||||||
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
|
|
||||||
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
|
|
||||||
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
|
||||||
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
|
|
||||||
|
|
||||||
//sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
|
|
||||||
//sysnb Gettimeofday(tv *Timeval) (err error)
|
|
||||||
//sysnb Time(t *Time_t) (tt Time_t, err error)
|
|
||||||
//sys Utime(path string, buf *Utimbuf) (err error)
|
|
||||||
//sys utimes(path string, times *[2]Timeval) (err error)
|
|
||||||
|
|
||||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
|
||||||
_, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length))
|
|
||||||
if e1 != 0 {
|
|
||||||
err = errnoErr(e1)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
|
|
||||||
var newoffset int64
|
|
||||||
offsetLow := uint32(offset & 0xffffffff)
|
|
||||||
offsetHigh := uint32((offset >> 32) & 0xffffffff)
|
|
||||||
_, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
|
|
||||||
return newoffset, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
|
||||||
newoffset, errno := seek(fd, offset, whence)
|
|
||||||
if errno != 0 {
|
|
||||||
return 0, errno
|
|
||||||
}
|
|
||||||
return newoffset, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func Fstatfs(fd int, buf *Statfs_t) (err error) {
|
|
||||||
_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
|
|
||||||
if e != 0 {
|
|
||||||
err = e
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func Statfs(path string, buf *Statfs_t) (err error) {
|
|
||||||
pathp, err := BytePtrFromString(path)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
|
|
||||||
if e != 0 {
|
|
||||||
err = e
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
|
|
||||||
|
|
||||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
|
||||||
page := uintptr(offset / 4096)
|
|
||||||
if offset != int64(page)*4096 {
|
|
||||||
return 0, EINVAL
|
|
||||||
}
|
|
||||||
return mmap2(addr, length, prot, flags, fd, page)
|
|
||||||
}
|
|
||||||
|
|
||||||
func setTimespec(sec, nsec int64) Timespec {
|
|
||||||
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
|
|
||||||
}
|
|
||||||
|
|
||||||
func setTimeval(sec, usec int64) Timeval {
|
|
||||||
return Timeval{Sec: int32(sec), Usec: int32(usec)}
|
|
||||||
}
|
|
||||||
|
|
||||||
type rlimit32 struct {
|
|
||||||
Cur uint32
|
|
||||||
Max uint32
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
|
|
||||||
|
|
||||||
const rlimInf32 = ^uint32(0)
|
|
||||||
const rlimInf64 = ^uint64(0)
|
|
||||||
|
|
||||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
|
||||||
err = Prlimit(0, resource, nil, rlim)
|
|
||||||
if err != ENOSYS {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
rl := rlimit32{}
|
|
||||||
err = getrlimit(resource, &rl)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if rl.Cur == rlimInf32 {
|
|
||||||
rlim.Cur = rlimInf64
|
|
||||||
} else {
|
|
||||||
rlim.Cur = uint64(rl.Cur)
|
|
||||||
}
|
|
||||||
|
|
||||||
if rl.Max == rlimInf32 {
|
|
||||||
rlim.Max = rlimInf64
|
|
||||||
} else {
|
|
||||||
rlim.Max = uint64(rl.Max)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
|
||||||
|
|
||||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
|
||||||
err = Prlimit(0, resource, rlim, nil)
|
|
||||||
if err != ENOSYS {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
rl := rlimit32{}
|
|
||||||
if rlim.Cur == rlimInf64 {
|
|
||||||
rl.Cur = rlimInf32
|
|
||||||
} else if rlim.Cur < uint64(rlimInf32) {
|
|
||||||
rl.Cur = uint32(rlim.Cur)
|
|
||||||
} else {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
if rlim.Max == rlimInf64 {
|
|
||||||
rl.Max = rlimInf32
|
|
||||||
} else if rlim.Max < uint64(rlimInf32) {
|
|
||||||
rl.Max = uint32(rlim.Max)
|
|
||||||
} else {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
return setrlimit(resource, &rl)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint32 { return r.Nip }
|
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }
|
|
||||||
|
|
||||||
func (iov *Iovec) SetLen(length int) {
|
|
||||||
iov.Len = uint32(length)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (msghdr *Msghdr) SetControllen(length int) {
|
|
||||||
msghdr.Controllen = uint32(length)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (msghdr *Msghdr) SetIovlen(length int) {
|
|
||||||
msghdr.Iovlen = uint32(length)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (cmsg *Cmsghdr) SetLen(length int) {
|
|
||||||
cmsg.Len = uint32(length)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
|
||||||
rsa.Service_name_len = uint32(length)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
|
||||||
|
|
||||||
func SyncFileRange(fd int, off int64, n int64, flags int) error {
|
|
||||||
// The sync_file_range and sync_file_range2 syscalls differ only in the
|
|
||||||
// order of their arguments.
|
|
||||||
return syncFileRange2(fd, flags, off, n)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
|
||||||
|
|
||||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
|
||||||
cmdlineLen := len(cmdline)
|
|
||||||
if cmdlineLen > 0 {
|
|
||||||
// Account for the additional NULL byte added by
|
|
||||||
// BytePtrFromString in kexecFileLoad. The kexec_file_load
|
|
||||||
// syscall expects a NULL-terminated string.
|
|
||||||
cmdlineLen++
|
|
||||||
}
|
|
||||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
|
||||||
}
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
@ -20,6 +22,7 @@ package unix
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
|
//sysnb InotifyInit() (fd int, err error)
|
||||||
//sys Ioperm(from int, num int, on int) (err error)
|
//sys Ioperm(from int, num int, on int) (err error)
|
||||||
//sys Iopl(level int) (err error)
|
//sys Iopl(level int) (err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
|
@ -97,8 +100,39 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
//sysnb pipe(p *[2]_C_int) (err error)
|
||||||
rsa.Service_name_len = uint64(length)
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe(&pp)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
|
||||||
|
|
|
@ -9,6 +9,13 @@ package unix
|
||||||
|
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
|
||||||
|
func EpollCreate(size int) (fd int, err error) {
|
||||||
|
if size <= 0 {
|
||||||
|
return -1, EINVAL
|
||||||
|
}
|
||||||
|
return EpollCreate1(0)
|
||||||
|
}
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
@ -137,6 +144,30 @@ func utimes(path string, tv *[2]Timeval) (err error) {
|
||||||
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, 0)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
func (r *PtraceRegs) PC() uint64 { return r.Pc }
|
||||||
|
|
||||||
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
|
||||||
|
@ -157,8 +188,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
func InotifyInit() (fd int, err error) {
|
||||||
rsa.Service_name_len = uint64(length)
|
return InotifyInit1(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pause() error {
|
func Pause() error {
|
||||||
|
@ -166,6 +197,18 @@ func Pause() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
var ts *Timespec
|
||||||
|
if timeout >= 0 {
|
||||||
|
ts = new(Timespec)
|
||||||
|
*ts = NsecToTimespec(int64(timeout) * 1e6)
|
||||||
|
}
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return ppoll(nil, 0, ts, nil)
|
||||||
|
}
|
||||||
|
return ppoll(&fds[0], len(fds), ts, nil)
|
||||||
|
}
|
||||||
|
|
||||||
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
||||||
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
|
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
|
||||||
}
|
}
|
||||||
|
@ -182,3 +225,7 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
|
||||||
}
|
}
|
||||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dup2 exists because func Dup3 in syscall_linux.go references
|
||||||
|
// it in an unreachable path. dup2 isn't available on arm64.
|
||||||
|
func dup2(oldfd int, newfd int) error
|
||||||
|
|
|
@ -11,6 +11,8 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
|
//sysnb EpollCreate(size int) (fd int, err error)
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
|
@ -23,6 +25,7 @@ import (
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
|
//sysnb InotifyInit() (fd int, err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
//sys Pause() (err error)
|
//sys Pause() (err error)
|
||||||
|
@ -74,6 +77,30 @@ func setTimeval(sec, usec int64) Timeval {
|
||||||
return Timeval{Sec: sec, Usec: usec}
|
return Timeval{Sec: sec, Usec: usec}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func Ioperm(from int, num int, on int) (err error) {
|
func Ioperm(from int, num int, on int) (err error) {
|
||||||
return ENOSYS
|
return ENOSYS
|
||||||
}
|
}
|
||||||
|
@ -102,10 +129,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
|
||||||
rsa.Service_name_len = uint64(length)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
|
// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
|
||||||
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
|
// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
|
||||||
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
|
||||||
|
@ -227,7 +250,7 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
|
||||||
}
|
}
|
||||||
|
|
||||||
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
|
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
|
||||||
args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen}
|
args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
|
||||||
_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
|
_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
|
||||||
if err != 0 {
|
if err != 0 {
|
||||||
return err
|
return err
|
||||||
|
@ -297,6 +320,15 @@ func Shutdown(s, how int) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
|
}
|
||||||
|
|
||||||
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
|
||||||
|
|
||||||
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
|
||||||
|
|
|
@ -9,6 +9,7 @@ package unix
|
||||||
|
|
||||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||||
|
//sys dup2(oldfd int, newfd int) (err error)
|
||||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||||
|
@ -19,6 +20,7 @@ package unix
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
|
||||||
//sysnb Getuid() (uid int)
|
//sysnb Getuid() (uid int)
|
||||||
|
//sysnb InotifyInit() (fd int, err error)
|
||||||
//sys Lchown(path string, uid int, gid int) (err error)
|
//sys Lchown(path string, uid int, gid int) (err error)
|
||||||
//sys Listen(s int, n int) (err error)
|
//sys Listen(s int, n int) (err error)
|
||||||
//sys Lstat(path string, stat *Stat_t) (err error)
|
//sys Lstat(path string, stat *Stat_t) (err error)
|
||||||
|
@ -114,6 +116,37 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
cmsg.Len = uint64(length)
|
cmsg.Len = uint64(length)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
|
//sysnb pipe(p *[2]_C_int) (err error)
|
||||||
rsa.Service_name_len = uint64(length)
|
|
||||||
|
func Pipe(p []int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe(&pp)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
|
||||||
|
func Pipe2(p []int, flags int) (err error) {
|
||||||
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
var pp [2]_C_int
|
||||||
|
err = pipe2(&pp, flags)
|
||||||
|
p[0] = int(pp[0])
|
||||||
|
p[1] = int(pp[1])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
|
||||||
|
|
||||||
|
func Poll(fds []PollFd, timeout int) (n int, err error) {
|
||||||
|
if len(fds) == 0 {
|
||||||
|
return poll(nil, 0, timeout)
|
||||||
|
}
|
||||||
|
return poll(&fds[0], len(fds), timeout)
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,8 +110,14 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
||||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sysnb pipe() (fd1 int, fd2 int, err error)
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
func Pipe(p []int) (err error) {
|
||||||
return Pipe2(p, 0)
|
if len(p) != 2 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
p[0], p[1], err = pipe()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
|
||||||
|
@ -122,10 +128,8 @@ func Pipe2(p []int, flags int) error {
|
||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,10 +87,8 @@ func Pipe2(p []int, flags int) error {
|
||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,7 @@
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
@ -66,10 +63,8 @@ func Pipe(p []int) (err error) {
|
||||||
if n != 0 {
|
if n != 0 {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,10 +76,8 @@ func Pipe2(p []int, flags int) error {
|
||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err := pipe2(&pp, flags)
|
err := pipe2(&pp, flags)
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +89,9 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +104,9 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +414,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
|
@ -426,7 +425,9 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
|
@ -564,12 +565,7 @@ func Minor(dev uint64) uint32 {
|
||||||
* Expose the ioctl function
|
* Expose the ioctl function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
|
//sys ioctl(fd int, req uint, arg uintptr) (err error)
|
||||||
|
|
||||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|
||||||
_, err = ioctlRet(fd, req, arg)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func IoctlSetTermio(fd int, req uint, value *Termio) error {
|
func IoctlSetTermio(fd int, req uint, value *Termio) error {
|
||||||
err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
||||||
|
@ -743,240 +739,3 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
|
||||||
func Munmap(b []byte) (err error) {
|
func Munmap(b []byte) (err error) {
|
||||||
return mapper.Munmap(b)
|
return mapper.Munmap(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Event Ports
|
|
||||||
|
|
||||||
type fileObjCookie struct {
|
|
||||||
fobj *fileObj
|
|
||||||
cookie interface{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// EventPort provides a safe abstraction on top of Solaris/illumos Event Ports.
|
|
||||||
type EventPort struct {
|
|
||||||
port int
|
|
||||||
mu sync.Mutex
|
|
||||||
fds map[uintptr]interface{}
|
|
||||||
paths map[string]*fileObjCookie
|
|
||||||
}
|
|
||||||
|
|
||||||
// PortEvent is an abstraction of the port_event C struct.
|
|
||||||
// Compare Source against PORT_SOURCE_FILE or PORT_SOURCE_FD
|
|
||||||
// to see if Path or Fd was the event source. The other will be
|
|
||||||
// uninitialized.
|
|
||||||
type PortEvent struct {
|
|
||||||
Cookie interface{}
|
|
||||||
Events int32
|
|
||||||
Fd uintptr
|
|
||||||
Path string
|
|
||||||
Source uint16
|
|
||||||
fobj *fileObj
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewEventPort creates a new EventPort including the
|
|
||||||
// underlying call to port_create(3c).
|
|
||||||
func NewEventPort() (*EventPort, error) {
|
|
||||||
port, err := port_create()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
e := &EventPort{
|
|
||||||
port: port,
|
|
||||||
fds: make(map[uintptr]interface{}),
|
|
||||||
paths: make(map[string]*fileObjCookie),
|
|
||||||
}
|
|
||||||
return e, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
//sys port_create() (n int, err error)
|
|
||||||
//sys port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error)
|
|
||||||
//sys port_dissociate(port int, source int, object uintptr) (n int, err error)
|
|
||||||
//sys port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error)
|
|
||||||
//sys port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error)
|
|
||||||
|
|
||||||
// Close closes the event port.
|
|
||||||
func (e *EventPort) Close() error {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
e.fds = nil
|
|
||||||
e.paths = nil
|
|
||||||
return Close(e.port)
|
|
||||||
}
|
|
||||||
|
|
||||||
// PathIsWatched checks to see if path is associated with this EventPort.
|
|
||||||
func (e *EventPort) PathIsWatched(path string) bool {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
_, found := e.paths[path]
|
|
||||||
return found
|
|
||||||
}
|
|
||||||
|
|
||||||
// FdIsWatched checks to see if fd is associated with this EventPort.
|
|
||||||
func (e *EventPort) FdIsWatched(fd uintptr) bool {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
_, found := e.fds[fd]
|
|
||||||
return found
|
|
||||||
}
|
|
||||||
|
|
||||||
// AssociatePath wraps port_associate(3c) for a filesystem path including
|
|
||||||
// creating the necessary file_obj from the provided stat information.
|
|
||||||
func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, cookie interface{}) error {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
if _, found := e.paths[path]; found {
|
|
||||||
return fmt.Errorf("%v is already associated with this Event Port", path)
|
|
||||||
}
|
|
||||||
fobj, err := createFileObj(path, stat)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
fCookie := &fileObjCookie{fobj, cookie}
|
|
||||||
_, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
e.paths[path] = fCookie
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DissociatePath wraps port_dissociate(3c) for a filesystem path.
|
|
||||||
func (e *EventPort) DissociatePath(path string) error {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
f, ok := e.paths[path]
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("%v is not associated with this Event Port", path)
|
|
||||||
}
|
|
||||||
_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
delete(e.paths, path)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// AssociateFd wraps calls to port_associate(3c) on file descriptors.
|
|
||||||
func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) error {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
if _, found := e.fds[fd]; found {
|
|
||||||
return fmt.Errorf("%v is already associated with this Event Port", fd)
|
|
||||||
}
|
|
||||||
pcookie := &cookie
|
|
||||||
_, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie)))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
e.fds[fd] = pcookie
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// DissociateFd wraps calls to port_dissociate(3c) on file descriptors.
|
|
||||||
func (e *EventPort) DissociateFd(fd uintptr) error {
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
_, ok := e.fds[fd]
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("%v is not associated with this Event Port", fd)
|
|
||||||
}
|
|
||||||
_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
delete(e.fds, fd)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
|
|
||||||
fobj := new(fileObj)
|
|
||||||
bs, err := ByteSliceFromString(name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
|
|
||||||
s := stat.Sys().(*syscall.Stat_t)
|
|
||||||
fobj.Atim.Sec = s.Atim.Sec
|
|
||||||
fobj.Atim.Nsec = s.Atim.Nsec
|
|
||||||
fobj.Mtim.Sec = s.Mtim.Sec
|
|
||||||
fobj.Mtim.Nsec = s.Mtim.Nsec
|
|
||||||
fobj.Ctim.Sec = s.Ctim.Sec
|
|
||||||
fobj.Ctim.Nsec = s.Ctim.Nsec
|
|
||||||
return fobj, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetOne wraps port_get(3c) and returns a single PortEvent.
|
|
||||||
func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
|
|
||||||
pe := new(portEvent)
|
|
||||||
_, err := port_get(e.port, pe, t)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
p := new(PortEvent)
|
|
||||||
p.Events = pe.Events
|
|
||||||
p.Source = pe.Source
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
switch pe.Source {
|
|
||||||
case PORT_SOURCE_FD:
|
|
||||||
p.Fd = uintptr(pe.Object)
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(pe.User))
|
|
||||||
p.Cookie = *cookie
|
|
||||||
delete(e.fds, p.Fd)
|
|
||||||
case PORT_SOURCE_FILE:
|
|
||||||
p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
|
|
||||||
p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(pe.User))
|
|
||||||
p.Cookie = *cookie
|
|
||||||
delete(e.paths, p.Path)
|
|
||||||
}
|
|
||||||
return p, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pending wraps port_getn(3c) and returns how many events are pending.
|
|
||||||
func (e *EventPort) Pending() (int, error) {
|
|
||||||
var n uint32 = 0
|
|
||||||
_, err := port_getn(e.port, nil, 0, &n, nil)
|
|
||||||
return int(n), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get wraps port_getn(3c) and fills a slice of PortEvent.
|
|
||||||
// It will block until either min events have been received
|
|
||||||
// or the timeout has been exceeded. It will return how many
|
|
||||||
// events were actually received along with any error information.
|
|
||||||
func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error) {
|
|
||||||
if min == 0 {
|
|
||||||
return 0, fmt.Errorf("need to request at least one event or use Pending() instead")
|
|
||||||
}
|
|
||||||
if len(s) < min {
|
|
||||||
return 0, fmt.Errorf("len(s) (%d) is less than min events requested (%d)", len(s), min)
|
|
||||||
}
|
|
||||||
got := uint32(min)
|
|
||||||
max := uint32(len(s))
|
|
||||||
var err error
|
|
||||||
ps := make([]portEvent, max, max)
|
|
||||||
_, err = port_getn(e.port, &ps[0], max, &got, timeout)
|
|
||||||
// got will be trustworthy with ETIME, but not any other error.
|
|
||||||
if err != nil && err != ETIME {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
e.mu.Lock()
|
|
||||||
defer e.mu.Unlock()
|
|
||||||
for i := 0; i < int(got); i++ {
|
|
||||||
s[i].Events = ps[i].Events
|
|
||||||
s[i].Source = ps[i].Source
|
|
||||||
switch ps[i].Source {
|
|
||||||
case PORT_SOURCE_FD:
|
|
||||||
s[i].Fd = uintptr(ps[i].Object)
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
|
|
||||||
s[i].Cookie = *cookie
|
|
||||||
delete(e.fds, s[i].Fd)
|
|
||||||
case PORT_SOURCE_FILE:
|
|
||||||
s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
|
|
||||||
s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
|
|
||||||
cookie := (*interface{})(unsafe.Pointer(ps[i].User))
|
|
||||||
s[i].Cookie = *cookie
|
|
||||||
delete(e.paths, s[i].Path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return int(got), err
|
|
||||||
}
|
|
||||||
|
|
|
@ -313,10 +313,6 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func Send(s int, buf []byte, flags int) (err error) {
|
|
||||||
return sendto(s, buf, flags, nil, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
|
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
|
||||||
ptr, n, err := to.sockaddr()
|
ptr, n, err := to.sockaddr()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -67,7 +67,9 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +83,9 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
p[0] = byte(sa.Port >> 8)
|
p[0] = byte(sa.Port >> 8)
|
||||||
p[1] = byte(sa.Port)
|
p[1] = byte(sa.Port)
|
||||||
sa.raw.Scope_id = sa.ZoneId
|
sa.raw.Scope_id = sa.ZoneId
|
||||||
sa.raw.Addr = sa.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.raw.Addr[i] = sa.Addr[i]
|
||||||
|
}
|
||||||
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +144,9 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
sa := new(SockaddrInet4)
|
sa := new(SockaddrInet4)
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
|
@ -149,7 +155,9 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
|
||||||
sa.Port = int(p[0])<<8 + int(p[1])
|
sa.Port = int(p[0])<<8 + int(p[1])
|
||||||
sa.ZoneId = pp.Scope_id
|
sa.ZoneId = pp.Scope_id
|
||||||
sa.Addr = pp.Addr
|
for i := 0; i < len(sa.Addr); i++ {
|
||||||
|
sa.Addr[i] = pp.Addr[i]
|
||||||
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
|
@ -214,8 +222,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
|
||||||
//sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A
|
//sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A
|
||||||
//sys Dup(oldfd int) (fd int, err error)
|
//sys Dup(oldfd int) (fd int, err error)
|
||||||
//sys Dup2(oldfd int, newfd int) (err error)
|
//sys Dup2(oldfd int, newfd int) (err error)
|
||||||
//sys Errno2() (er2 int) = SYS___ERRNO2
|
|
||||||
//sys Err2ad() (eadd *int) = SYS___ERR2AD
|
|
||||||
//sys Exit(code int)
|
//sys Exit(code int)
|
||||||
//sys Fchdir(fd int) (err error)
|
//sys Fchdir(fd int) (err error)
|
||||||
//sys Fchmod(fd int, mode uint32) (err error)
|
//sys Fchmod(fd int, mode uint32) (err error)
|
||||||
|
@ -239,12 +245,10 @@ func Fstat(fd int, stat *Stat_t) (err error) {
|
||||||
//sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL
|
//sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL
|
||||||
//sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES
|
//sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES
|
||||||
//sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT
|
//sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT
|
||||||
//sys W_Getmntent_A(buff *byte, size int) (lastsys int, err error) = SYS___W_GETMNTENT_A
|
|
||||||
|
|
||||||
//sys mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A
|
//sys Mount(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A
|
||||||
//sys unmount(filesystem string, mtm int) (err error) = SYS___UMOUNT_A
|
//sys Unmount(filesystem string, mtm int) (err error) = SYS___UMOUNT_A
|
||||||
//sys Chroot(path string) (err error) = SYS___CHROOT_A
|
//sys Chroot(path string) (err error) = SYS___CHROOT_A
|
||||||
//sys Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) = SYS_SELECT
|
|
||||||
//sysnb Uname(buf *Utsname) (err error) = SYS___UNAME_A
|
//sysnb Uname(buf *Utsname) (err error) = SYS___UNAME_A
|
||||||
|
|
||||||
func Ptsname(fd int) (name string, err error) {
|
func Ptsname(fd int) (name string, err error) {
|
||||||
|
@ -579,10 +583,8 @@ func Pipe(p []int) (err error) {
|
||||||
}
|
}
|
||||||
var pp [2]_C_int
|
var pp [2]_C_int
|
||||||
err = pipe(&pp)
|
err = pipe(&pp)
|
||||||
if err == nil {
|
|
||||||
p[0] = int(pp[0])
|
p[0] = int(pp[0])
|
||||||
p[1] = int(pp[1])
|
p[1] = int(pp[1])
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1777,47 +1779,3 @@ func SetNonblock(fd int, nonblocking bool) (err error) {
|
||||||
func Exec(argv0 string, argv []string, envv []string) error {
|
func Exec(argv0 string, argv []string, envv []string) error {
|
||||||
return syscall.Exec(argv0, argv, envv)
|
return syscall.Exec(argv0, argv, envv)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
|
|
||||||
if needspace := 8 - len(fstype); needspace <= 0 {
|
|
||||||
fstype = fstype[:8]
|
|
||||||
} else {
|
|
||||||
fstype += " "[:needspace]
|
|
||||||
}
|
|
||||||
return mount_LE(target, source, fstype, uint32(flags), int32(len(data)), data)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Unmount(name string, mtm int) (err error) {
|
|
||||||
// mountpoint is always a full path and starts with a '/'
|
|
||||||
// check if input string is not a mountpoint but a filesystem name
|
|
||||||
if name[0] != '/' {
|
|
||||||
return unmount(name, mtm)
|
|
||||||
}
|
|
||||||
// treat name as mountpoint
|
|
||||||
b2s := func(arr []byte) string {
|
|
||||||
nulli := bytes.IndexByte(arr, 0)
|
|
||||||
if nulli == -1 {
|
|
||||||
return string(arr)
|
|
||||||
} else {
|
|
||||||
return string(arr[:nulli])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var buffer struct {
|
|
||||||
header W_Mnth
|
|
||||||
fsinfo [64]W_Mntent
|
|
||||||
}
|
|
||||||
fsCount, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer)))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if fsCount == 0 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
for i := 0; i < fsCount; i++ {
|
|
||||||
if b2s(buffer.fsinfo[i].Mountpoint[:]) == name {
|
|
||||||
err = unmount(b2s(buffer.fsinfo[i].Fsname[:]), mtm)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build linux
|
|
||||||
// +build linux
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import "runtime"
|
|
||||||
|
|
||||||
// SysvShmCtl performs control operations on the shared memory segment
|
|
||||||
// specified by id.
|
|
||||||
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
|
|
||||||
if runtime.GOARCH == "arm" ||
|
|
||||||
runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
|
|
||||||
cmd |= ipc_64
|
|
||||||
}
|
|
||||||
|
|
||||||
return shmctl(id, cmd, desc)
|
|
||||||
}
|
|
|
@ -1,61 +0,0 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build (darwin && !ios) || linux
|
|
||||||
// +build darwin,!ios linux
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import (
|
|
||||||
"unsafe"
|
|
||||||
|
|
||||||
"golang.org/x/sys/internal/unsafeheader"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SysvShmAttach attaches the Sysv shared memory segment associated with the
|
|
||||||
// shared memory identifier id.
|
|
||||||
func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
|
|
||||||
addr, errno := shmat(id, addr, flag)
|
|
||||||
if errno != nil {
|
|
||||||
return nil, errno
|
|
||||||
}
|
|
||||||
|
|
||||||
// Retrieve the size of the shared memory to enable slice creation
|
|
||||||
var info SysvShmDesc
|
|
||||||
|
|
||||||
_, err := SysvShmCtl(id, IPC_STAT, &info)
|
|
||||||
if err != nil {
|
|
||||||
// release the shared memory if we can't find the size
|
|
||||||
|
|
||||||
// ignoring error from shmdt as there's nothing sensible to return here
|
|
||||||
shmdt(addr)
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use unsafe to convert addr into a []byte.
|
|
||||||
// TODO: convert to unsafe.Slice once we can assume Go 1.17
|
|
||||||
var b []byte
|
|
||||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
|
||||||
hdr.Data = unsafe.Pointer(addr)
|
|
||||||
hdr.Cap = int(info.Segsz)
|
|
||||||
hdr.Len = int(info.Segsz)
|
|
||||||
return b, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
|
|
||||||
//
|
|
||||||
// It is not safe to use the slice after calling this function.
|
|
||||||
func SysvShmDetach(data []byte) error {
|
|
||||||
if len(data) == 0 {
|
|
||||||
return EINVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
return shmdt(uintptr(unsafe.Pointer(&data[0])))
|
|
||||||
}
|
|
||||||
|
|
||||||
// SysvShmGet returns the Sysv shared memory identifier associated with key.
|
|
||||||
// If the IPC_CREAT flag is specified a new segment is created.
|
|
||||||
func SysvShmGet(key, size, flag int) (id int, err error) {
|
|
||||||
return shmget(key, size, flag)
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
// Copyright 2021 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build darwin && !ios
|
|
||||||
// +build darwin,!ios
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
// SysvShmCtl performs control operations on the shared memory segment
|
|
||||||
// specified by id.
|
|
||||||
func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
|
|
||||||
return shmctl(id, cmd, desc)
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -130,9 +130,8 @@ const (
|
||||||
ATTR_VOL_SIZE = 0x4
|
ATTR_VOL_SIZE = 0x4
|
||||||
ATTR_VOL_SPACEAVAIL = 0x10
|
ATTR_VOL_SPACEAVAIL = 0x10
|
||||||
ATTR_VOL_SPACEFREE = 0x8
|
ATTR_VOL_SPACEFREE = 0x8
|
||||||
ATTR_VOL_SPACEUSED = 0x800000
|
|
||||||
ATTR_VOL_UUID = 0x40000
|
ATTR_VOL_UUID = 0x40000
|
||||||
ATTR_VOL_VALIDMASK = 0xf087ffff
|
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||||
B0 = 0x0
|
B0 = 0x0
|
||||||
B110 = 0x6e
|
B110 = 0x6e
|
||||||
B115200 = 0x1c200
|
B115200 = 0x1c200
|
||||||
|
@ -662,7 +661,6 @@ const (
|
||||||
IN_CLASSD_NSHIFT = 0x1c
|
IN_CLASSD_NSHIFT = 0x1c
|
||||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||||
IN_LOOPBACKNET = 0x7f
|
IN_LOOPBACKNET = 0x7f
|
||||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
|
||||||
IPPROTO_3PC = 0x22
|
IPPROTO_3PC = 0x22
|
||||||
IPPROTO_ADFS = 0x44
|
IPPROTO_ADFS = 0x44
|
||||||
IPPROTO_AH = 0x33
|
IPPROTO_AH = 0x33
|
||||||
|
@ -778,24 +776,15 @@ const (
|
||||||
IPV6_2292PKTINFO = 0x13
|
IPV6_2292PKTINFO = 0x13
|
||||||
IPV6_2292PKTOPTIONS = 0x19
|
IPV6_2292PKTOPTIONS = 0x19
|
||||||
IPV6_2292RTHDR = 0x18
|
IPV6_2292RTHDR = 0x18
|
||||||
IPV6_3542DSTOPTS = 0x32
|
|
||||||
IPV6_3542HOPLIMIT = 0x2f
|
|
||||||
IPV6_3542HOPOPTS = 0x31
|
|
||||||
IPV6_3542NEXTHOP = 0x30
|
|
||||||
IPV6_3542PKTINFO = 0x2e
|
|
||||||
IPV6_3542RTHDR = 0x33
|
|
||||||
IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
|
IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
|
||||||
IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
|
IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
|
||||||
IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
|
IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
|
||||||
IPV6_AUTOFLOWLABEL = 0x3b
|
|
||||||
IPV6_BINDV6ONLY = 0x1b
|
IPV6_BINDV6ONLY = 0x1b
|
||||||
IPV6_BOUND_IF = 0x7d
|
IPV6_BOUND_IF = 0x7d
|
||||||
IPV6_CHECKSUM = 0x1a
|
IPV6_CHECKSUM = 0x1a
|
||||||
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
|
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
|
||||||
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
|
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
|
||||||
IPV6_DEFHLIM = 0x40
|
IPV6_DEFHLIM = 0x40
|
||||||
IPV6_DONTFRAG = 0x3e
|
|
||||||
IPV6_DSTOPTS = 0x32
|
|
||||||
IPV6_FAITH = 0x1d
|
IPV6_FAITH = 0x1d
|
||||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||||
|
@ -807,8 +796,6 @@ const (
|
||||||
IPV6_FW_GET = 0x22
|
IPV6_FW_GET = 0x22
|
||||||
IPV6_FW_ZERO = 0x21
|
IPV6_FW_ZERO = 0x21
|
||||||
IPV6_HLIMDEC = 0x1
|
IPV6_HLIMDEC = 0x1
|
||||||
IPV6_HOPLIMIT = 0x2f
|
|
||||||
IPV6_HOPOPTS = 0x31
|
|
||||||
IPV6_IPSEC_POLICY = 0x1c
|
IPV6_IPSEC_POLICY = 0x1c
|
||||||
IPV6_JOIN_GROUP = 0xc
|
IPV6_JOIN_GROUP = 0xc
|
||||||
IPV6_LEAVE_GROUP = 0xd
|
IPV6_LEAVE_GROUP = 0xd
|
||||||
|
@ -820,34 +807,20 @@ const (
|
||||||
IPV6_MAX_SOCK_SRC_FILTER = 0x80
|
IPV6_MAX_SOCK_SRC_FILTER = 0x80
|
||||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||||
IPV6_MMTU = 0x500
|
IPV6_MMTU = 0x500
|
||||||
IPV6_MSFILTER = 0x4a
|
|
||||||
IPV6_MULTICAST_HOPS = 0xa
|
IPV6_MULTICAST_HOPS = 0xa
|
||||||
IPV6_MULTICAST_IF = 0x9
|
IPV6_MULTICAST_IF = 0x9
|
||||||
IPV6_MULTICAST_LOOP = 0xb
|
IPV6_MULTICAST_LOOP = 0xb
|
||||||
IPV6_NEXTHOP = 0x30
|
|
||||||
IPV6_PATHMTU = 0x2c
|
|
||||||
IPV6_PKTINFO = 0x2e
|
|
||||||
IPV6_PORTRANGE = 0xe
|
IPV6_PORTRANGE = 0xe
|
||||||
IPV6_PORTRANGE_DEFAULT = 0x0
|
IPV6_PORTRANGE_DEFAULT = 0x0
|
||||||
IPV6_PORTRANGE_HIGH = 0x1
|
IPV6_PORTRANGE_HIGH = 0x1
|
||||||
IPV6_PORTRANGE_LOW = 0x2
|
IPV6_PORTRANGE_LOW = 0x2
|
||||||
IPV6_PREFER_TEMPADDR = 0x3f
|
|
||||||
IPV6_RECVDSTOPTS = 0x28
|
|
||||||
IPV6_RECVHOPLIMIT = 0x25
|
|
||||||
IPV6_RECVHOPOPTS = 0x27
|
|
||||||
IPV6_RECVPATHMTU = 0x2b
|
|
||||||
IPV6_RECVPKTINFO = 0x3d
|
|
||||||
IPV6_RECVRTHDR = 0x26
|
|
||||||
IPV6_RECVTCLASS = 0x23
|
IPV6_RECVTCLASS = 0x23
|
||||||
IPV6_RTHDR = 0x33
|
|
||||||
IPV6_RTHDRDSTOPTS = 0x39
|
|
||||||
IPV6_RTHDR_LOOSE = 0x0
|
IPV6_RTHDR_LOOSE = 0x0
|
||||||
IPV6_RTHDR_STRICT = 0x1
|
IPV6_RTHDR_STRICT = 0x1
|
||||||
IPV6_RTHDR_TYPE_0 = 0x0
|
IPV6_RTHDR_TYPE_0 = 0x0
|
||||||
IPV6_SOCKOPT_RESERVED1 = 0x3
|
IPV6_SOCKOPT_RESERVED1 = 0x3
|
||||||
IPV6_TCLASS = 0x24
|
IPV6_TCLASS = 0x24
|
||||||
IPV6_UNICAST_HOPS = 0x4
|
IPV6_UNICAST_HOPS = 0x4
|
||||||
IPV6_USE_MIN_MTU = 0x2a
|
|
||||||
IPV6_V6ONLY = 0x1b
|
IPV6_V6ONLY = 0x1b
|
||||||
IPV6_VERSION = 0x60
|
IPV6_VERSION = 0x60
|
||||||
IPV6_VERSION_MASK = 0xf0
|
IPV6_VERSION_MASK = 0xf0
|
||||||
|
@ -1208,7 +1181,6 @@ const (
|
||||||
RTF_DONE = 0x40
|
RTF_DONE = 0x40
|
||||||
RTF_DYNAMIC = 0x10
|
RTF_DYNAMIC = 0x10
|
||||||
RTF_GATEWAY = 0x2
|
RTF_GATEWAY = 0x2
|
||||||
RTF_GLOBAL = 0x40000000
|
|
||||||
RTF_HOST = 0x4
|
RTF_HOST = 0x4
|
||||||
RTF_IFREF = 0x4000000
|
RTF_IFREF = 0x4000000
|
||||||
RTF_IFSCOPE = 0x1000000
|
RTF_IFSCOPE = 0x1000000
|
||||||
|
@ -1265,11 +1237,6 @@ const (
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIMESTAMP_MONOTONIC = 0x4
|
SCM_TIMESTAMP_MONOTONIC = 0x4
|
||||||
SEEK_CUR = 0x1
|
|
||||||
SEEK_DATA = 0x4
|
|
||||||
SEEK_END = 0x2
|
|
||||||
SEEK_HOLE = 0x3
|
|
||||||
SEEK_SET = 0x0
|
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
@ -1386,10 +1353,6 @@ const (
|
||||||
SO_SNDTIMEO = 0x1005
|
SO_SNDTIMEO = 0x1005
|
||||||
SO_TIMESTAMP = 0x400
|
SO_TIMESTAMP = 0x400
|
||||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||||
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
|
||||||
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
|
||||||
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
|
||||||
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
SO_UPCALLCLOSEWAIT = 0x1027
|
SO_UPCALLCLOSEWAIT = 0x1027
|
||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
|
@ -1435,21 +1398,6 @@ const (
|
||||||
TCOFLUSH = 0x2
|
TCOFLUSH = 0x2
|
||||||
TCOOFF = 0x1
|
TCOOFF = 0x1
|
||||||
TCOON = 0x2
|
TCOON = 0x2
|
||||||
TCPOPT_CC = 0xb
|
|
||||||
TCPOPT_CCECHO = 0xd
|
|
||||||
TCPOPT_CCNEW = 0xc
|
|
||||||
TCPOPT_EOL = 0x0
|
|
||||||
TCPOPT_FASTOPEN = 0x22
|
|
||||||
TCPOPT_MAXSEG = 0x2
|
|
||||||
TCPOPT_NOP = 0x1
|
|
||||||
TCPOPT_SACK = 0x5
|
|
||||||
TCPOPT_SACK_HDR = 0x1010500
|
|
||||||
TCPOPT_SACK_PERMITTED = 0x4
|
|
||||||
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
|
||||||
TCPOPT_SIGNATURE = 0x13
|
|
||||||
TCPOPT_TIMESTAMP = 0x8
|
|
||||||
TCPOPT_TSTAMP_HDR = 0x101080a
|
|
||||||
TCPOPT_WINDOW = 0x3
|
|
||||||
TCP_CONNECTIONTIMEOUT = 0x20
|
TCP_CONNECTIONTIMEOUT = 0x20
|
||||||
TCP_CONNECTION_INFO = 0x106
|
TCP_CONNECTION_INFO = 0x106
|
||||||
TCP_ENABLE_ECN = 0x104
|
TCP_ENABLE_ECN = 0x104
|
||||||
|
@ -1552,11 +1500,6 @@ const (
|
||||||
VINTR = 0x8
|
VINTR = 0x8
|
||||||
VKILL = 0x5
|
VKILL = 0x5
|
||||||
VLNEXT = 0xe
|
VLNEXT = 0xe
|
||||||
VMADDR_CID_ANY = 0xffffffff
|
|
||||||
VMADDR_CID_HOST = 0x2
|
|
||||||
VMADDR_CID_HYPERVISOR = 0x0
|
|
||||||
VMADDR_CID_RESERVED = 0x1
|
|
||||||
VMADDR_PORT_ANY = 0xffffffff
|
|
||||||
VMIN = 0x10
|
VMIN = 0x10
|
||||||
VM_LOADAVG = 0x2
|
VM_LOADAVG = 0x2
|
||||||
VM_MACHFACTOR = 0x4
|
VM_MACHFACTOR = 0x4
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -130,9 +130,8 @@ const (
|
||||||
ATTR_VOL_SIZE = 0x4
|
ATTR_VOL_SIZE = 0x4
|
||||||
ATTR_VOL_SPACEAVAIL = 0x10
|
ATTR_VOL_SPACEAVAIL = 0x10
|
||||||
ATTR_VOL_SPACEFREE = 0x8
|
ATTR_VOL_SPACEFREE = 0x8
|
||||||
ATTR_VOL_SPACEUSED = 0x800000
|
|
||||||
ATTR_VOL_UUID = 0x40000
|
ATTR_VOL_UUID = 0x40000
|
||||||
ATTR_VOL_VALIDMASK = 0xf087ffff
|
ATTR_VOL_VALIDMASK = 0xf007ffff
|
||||||
B0 = 0x0
|
B0 = 0x0
|
||||||
B110 = 0x6e
|
B110 = 0x6e
|
||||||
B115200 = 0x1c200
|
B115200 = 0x1c200
|
||||||
|
@ -662,7 +661,6 @@ const (
|
||||||
IN_CLASSD_NSHIFT = 0x1c
|
IN_CLASSD_NSHIFT = 0x1c
|
||||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||||
IN_LOOPBACKNET = 0x7f
|
IN_LOOPBACKNET = 0x7f
|
||||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
|
||||||
IPPROTO_3PC = 0x22
|
IPPROTO_3PC = 0x22
|
||||||
IPPROTO_ADFS = 0x44
|
IPPROTO_ADFS = 0x44
|
||||||
IPPROTO_AH = 0x33
|
IPPROTO_AH = 0x33
|
||||||
|
@ -778,24 +776,15 @@ const (
|
||||||
IPV6_2292PKTINFO = 0x13
|
IPV6_2292PKTINFO = 0x13
|
||||||
IPV6_2292PKTOPTIONS = 0x19
|
IPV6_2292PKTOPTIONS = 0x19
|
||||||
IPV6_2292RTHDR = 0x18
|
IPV6_2292RTHDR = 0x18
|
||||||
IPV6_3542DSTOPTS = 0x32
|
|
||||||
IPV6_3542HOPLIMIT = 0x2f
|
|
||||||
IPV6_3542HOPOPTS = 0x31
|
|
||||||
IPV6_3542NEXTHOP = 0x30
|
|
||||||
IPV6_3542PKTINFO = 0x2e
|
|
||||||
IPV6_3542RTHDR = 0x33
|
|
||||||
IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
|
IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
|
||||||
IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
|
IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
|
||||||
IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
|
IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
|
||||||
IPV6_AUTOFLOWLABEL = 0x3b
|
|
||||||
IPV6_BINDV6ONLY = 0x1b
|
IPV6_BINDV6ONLY = 0x1b
|
||||||
IPV6_BOUND_IF = 0x7d
|
IPV6_BOUND_IF = 0x7d
|
||||||
IPV6_CHECKSUM = 0x1a
|
IPV6_CHECKSUM = 0x1a
|
||||||
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
|
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
|
||||||
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
|
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
|
||||||
IPV6_DEFHLIM = 0x40
|
IPV6_DEFHLIM = 0x40
|
||||||
IPV6_DONTFRAG = 0x3e
|
|
||||||
IPV6_DSTOPTS = 0x32
|
|
||||||
IPV6_FAITH = 0x1d
|
IPV6_FAITH = 0x1d
|
||||||
IPV6_FLOWINFO_MASK = 0xffffff0f
|
IPV6_FLOWINFO_MASK = 0xffffff0f
|
||||||
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
IPV6_FLOWLABEL_MASK = 0xffff0f00
|
||||||
|
@ -807,8 +796,6 @@ const (
|
||||||
IPV6_FW_GET = 0x22
|
IPV6_FW_GET = 0x22
|
||||||
IPV6_FW_ZERO = 0x21
|
IPV6_FW_ZERO = 0x21
|
||||||
IPV6_HLIMDEC = 0x1
|
IPV6_HLIMDEC = 0x1
|
||||||
IPV6_HOPLIMIT = 0x2f
|
|
||||||
IPV6_HOPOPTS = 0x31
|
|
||||||
IPV6_IPSEC_POLICY = 0x1c
|
IPV6_IPSEC_POLICY = 0x1c
|
||||||
IPV6_JOIN_GROUP = 0xc
|
IPV6_JOIN_GROUP = 0xc
|
||||||
IPV6_LEAVE_GROUP = 0xd
|
IPV6_LEAVE_GROUP = 0xd
|
||||||
|
@ -820,34 +807,20 @@ const (
|
||||||
IPV6_MAX_SOCK_SRC_FILTER = 0x80
|
IPV6_MAX_SOCK_SRC_FILTER = 0x80
|
||||||
IPV6_MIN_MEMBERSHIPS = 0x1f
|
IPV6_MIN_MEMBERSHIPS = 0x1f
|
||||||
IPV6_MMTU = 0x500
|
IPV6_MMTU = 0x500
|
||||||
IPV6_MSFILTER = 0x4a
|
|
||||||
IPV6_MULTICAST_HOPS = 0xa
|
IPV6_MULTICAST_HOPS = 0xa
|
||||||
IPV6_MULTICAST_IF = 0x9
|
IPV6_MULTICAST_IF = 0x9
|
||||||
IPV6_MULTICAST_LOOP = 0xb
|
IPV6_MULTICAST_LOOP = 0xb
|
||||||
IPV6_NEXTHOP = 0x30
|
|
||||||
IPV6_PATHMTU = 0x2c
|
|
||||||
IPV6_PKTINFO = 0x2e
|
|
||||||
IPV6_PORTRANGE = 0xe
|
IPV6_PORTRANGE = 0xe
|
||||||
IPV6_PORTRANGE_DEFAULT = 0x0
|
IPV6_PORTRANGE_DEFAULT = 0x0
|
||||||
IPV6_PORTRANGE_HIGH = 0x1
|
IPV6_PORTRANGE_HIGH = 0x1
|
||||||
IPV6_PORTRANGE_LOW = 0x2
|
IPV6_PORTRANGE_LOW = 0x2
|
||||||
IPV6_PREFER_TEMPADDR = 0x3f
|
|
||||||
IPV6_RECVDSTOPTS = 0x28
|
|
||||||
IPV6_RECVHOPLIMIT = 0x25
|
|
||||||
IPV6_RECVHOPOPTS = 0x27
|
|
||||||
IPV6_RECVPATHMTU = 0x2b
|
|
||||||
IPV6_RECVPKTINFO = 0x3d
|
|
||||||
IPV6_RECVRTHDR = 0x26
|
|
||||||
IPV6_RECVTCLASS = 0x23
|
IPV6_RECVTCLASS = 0x23
|
||||||
IPV6_RTHDR = 0x33
|
|
||||||
IPV6_RTHDRDSTOPTS = 0x39
|
|
||||||
IPV6_RTHDR_LOOSE = 0x0
|
IPV6_RTHDR_LOOSE = 0x0
|
||||||
IPV6_RTHDR_STRICT = 0x1
|
IPV6_RTHDR_STRICT = 0x1
|
||||||
IPV6_RTHDR_TYPE_0 = 0x0
|
IPV6_RTHDR_TYPE_0 = 0x0
|
||||||
IPV6_SOCKOPT_RESERVED1 = 0x3
|
IPV6_SOCKOPT_RESERVED1 = 0x3
|
||||||
IPV6_TCLASS = 0x24
|
IPV6_TCLASS = 0x24
|
||||||
IPV6_UNICAST_HOPS = 0x4
|
IPV6_UNICAST_HOPS = 0x4
|
||||||
IPV6_USE_MIN_MTU = 0x2a
|
|
||||||
IPV6_V6ONLY = 0x1b
|
IPV6_V6ONLY = 0x1b
|
||||||
IPV6_VERSION = 0x60
|
IPV6_VERSION = 0x60
|
||||||
IPV6_VERSION_MASK = 0xf0
|
IPV6_VERSION_MASK = 0xf0
|
||||||
|
@ -1208,7 +1181,6 @@ const (
|
||||||
RTF_DONE = 0x40
|
RTF_DONE = 0x40
|
||||||
RTF_DYNAMIC = 0x10
|
RTF_DYNAMIC = 0x10
|
||||||
RTF_GATEWAY = 0x2
|
RTF_GATEWAY = 0x2
|
||||||
RTF_GLOBAL = 0x40000000
|
|
||||||
RTF_HOST = 0x4
|
RTF_HOST = 0x4
|
||||||
RTF_IFREF = 0x4000000
|
RTF_IFREF = 0x4000000
|
||||||
RTF_IFSCOPE = 0x1000000
|
RTF_IFSCOPE = 0x1000000
|
||||||
|
@ -1265,11 +1237,6 @@ const (
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIMESTAMP_MONOTONIC = 0x4
|
SCM_TIMESTAMP_MONOTONIC = 0x4
|
||||||
SEEK_CUR = 0x1
|
|
||||||
SEEK_DATA = 0x4
|
|
||||||
SEEK_END = 0x2
|
|
||||||
SEEK_HOLE = 0x3
|
|
||||||
SEEK_SET = 0x0
|
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
@ -1386,10 +1353,6 @@ const (
|
||||||
SO_SNDTIMEO = 0x1005
|
SO_SNDTIMEO = 0x1005
|
||||||
SO_TIMESTAMP = 0x400
|
SO_TIMESTAMP = 0x400
|
||||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||||
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
|
||||||
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
|
||||||
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
|
||||||
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
SO_UPCALLCLOSEWAIT = 0x1027
|
SO_UPCALLCLOSEWAIT = 0x1027
|
||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
|
@ -1435,21 +1398,6 @@ const (
|
||||||
TCOFLUSH = 0x2
|
TCOFLUSH = 0x2
|
||||||
TCOOFF = 0x1
|
TCOOFF = 0x1
|
||||||
TCOON = 0x2
|
TCOON = 0x2
|
||||||
TCPOPT_CC = 0xb
|
|
||||||
TCPOPT_CCECHO = 0xd
|
|
||||||
TCPOPT_CCNEW = 0xc
|
|
||||||
TCPOPT_EOL = 0x0
|
|
||||||
TCPOPT_FASTOPEN = 0x22
|
|
||||||
TCPOPT_MAXSEG = 0x2
|
|
||||||
TCPOPT_NOP = 0x1
|
|
||||||
TCPOPT_SACK = 0x5
|
|
||||||
TCPOPT_SACK_HDR = 0x1010500
|
|
||||||
TCPOPT_SACK_PERMITTED = 0x4
|
|
||||||
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
|
||||||
TCPOPT_SIGNATURE = 0x13
|
|
||||||
TCPOPT_TIMESTAMP = 0x8
|
|
||||||
TCPOPT_TSTAMP_HDR = 0x101080a
|
|
||||||
TCPOPT_WINDOW = 0x3
|
|
||||||
TCP_CONNECTIONTIMEOUT = 0x20
|
TCP_CONNECTIONTIMEOUT = 0x20
|
||||||
TCP_CONNECTION_INFO = 0x106
|
TCP_CONNECTION_INFO = 0x106
|
||||||
TCP_ENABLE_ECN = 0x104
|
TCP_ENABLE_ECN = 0x104
|
||||||
|
@ -1552,11 +1500,6 @@ const (
|
||||||
VINTR = 0x8
|
VINTR = 0x8
|
||||||
VKILL = 0x5
|
VKILL = 0x5
|
||||||
VLNEXT = 0xe
|
VLNEXT = 0xe
|
||||||
VMADDR_CID_ANY = 0xffffffff
|
|
||||||
VMADDR_CID_HOST = 0x2
|
|
||||||
VMADDR_CID_HYPERVISOR = 0x0
|
|
||||||
VMADDR_CID_RESERVED = 0x1
|
|
||||||
VMADDR_PORT_ANY = 0xffffffff
|
|
||||||
VMIN = 0x10
|
VMIN = 0x10
|
||||||
VM_LOADAVG = 0x2
|
VM_LOADAVG = 0x2
|
||||||
VM_MACHFACTOR = 0x4
|
VM_MACHFACTOR = 0x4
|
||||||
|
|
|
@ -1297,11 +1297,6 @@ const (
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIME_INFO = 0x7
|
SCM_TIME_INFO = 0x7
|
||||||
SEEK_CUR = 0x1
|
|
||||||
SEEK_DATA = 0x3
|
|
||||||
SEEK_END = 0x2
|
|
||||||
SEEK_HOLE = 0x4
|
|
||||||
SEEK_SET = 0x0
|
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|
|
@ -1298,11 +1298,6 @@ const (
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIME_INFO = 0x7
|
SCM_TIME_INFO = 0x7
|
||||||
SEEK_CUR = 0x1
|
|
||||||
SEEK_DATA = 0x3
|
|
||||||
SEEK_END = 0x2
|
|
||||||
SEEK_HOLE = 0x4
|
|
||||||
SEEK_SET = 0x0
|
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|
|
@ -1022,15 +1022,6 @@ const (
|
||||||
MAP_RESERVED0100 = 0x100
|
MAP_RESERVED0100 = 0x100
|
||||||
MAP_SHARED = 0x1
|
MAP_SHARED = 0x1
|
||||||
MAP_STACK = 0x400
|
MAP_STACK = 0x400
|
||||||
MCAST_BLOCK_SOURCE = 0x54
|
|
||||||
MCAST_EXCLUDE = 0x2
|
|
||||||
MCAST_INCLUDE = 0x1
|
|
||||||
MCAST_JOIN_GROUP = 0x50
|
|
||||||
MCAST_JOIN_SOURCE_GROUP = 0x52
|
|
||||||
MCAST_LEAVE_GROUP = 0x51
|
|
||||||
MCAST_LEAVE_SOURCE_GROUP = 0x53
|
|
||||||
MCAST_UNBLOCK_SOURCE = 0x55
|
|
||||||
MCAST_UNDEFINED = 0x0
|
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MNT_ACLS = 0x8000000
|
MNT_ACLS = 0x8000000
|
||||||
|
@ -1276,11 +1267,6 @@ const (
|
||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SEEK_CUR = 0x1
|
|
||||||
SEEK_DATA = 0x3
|
|
||||||
SEEK_END = 0x2
|
|
||||||
SEEK_HOLE = 0x4
|
|
||||||
SEEK_SET = 0x0
|
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|
|
@ -1298,11 +1298,6 @@ const (
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
SCM_TIME_INFO = 0x7
|
SCM_TIME_INFO = 0x7
|
||||||
SEEK_CUR = 0x1
|
|
||||||
SEEK_DATA = 0x3
|
|
||||||
SEEK_END = 0x2
|
|
||||||
SEEK_HOLE = 0x4
|
|
||||||
SEEK_SET = 0x0
|
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
SHUT_WR = 0x1
|
SHUT_WR = 0x1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Code generated by mkmerge; DO NOT EDIT.
|
// Code generated by mkmerge.go; DO NOT EDIT.
|
||||||
|
|
||||||
//go:build linux
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
@ -38,8 +38,7 @@ const (
|
||||||
AF_KEY = 0xf
|
AF_KEY = 0xf
|
||||||
AF_LLC = 0x1a
|
AF_LLC = 0x1a
|
||||||
AF_LOCAL = 0x1
|
AF_LOCAL = 0x1
|
||||||
AF_MAX = 0x2e
|
AF_MAX = 0x2d
|
||||||
AF_MCTP = 0x2d
|
|
||||||
AF_MPLS = 0x1c
|
AF_MPLS = 0x1c
|
||||||
AF_NETBEUI = 0xd
|
AF_NETBEUI = 0xd
|
||||||
AF_NETLINK = 0x10
|
AF_NETLINK = 0x10
|
||||||
|
@ -117,7 +116,6 @@ const (
|
||||||
ARPHRD_LAPB = 0x204
|
ARPHRD_LAPB = 0x204
|
||||||
ARPHRD_LOCALTLK = 0x305
|
ARPHRD_LOCALTLK = 0x305
|
||||||
ARPHRD_LOOPBACK = 0x304
|
ARPHRD_LOOPBACK = 0x304
|
||||||
ARPHRD_MCTP = 0x122
|
|
||||||
ARPHRD_METRICOM = 0x17
|
ARPHRD_METRICOM = 0x17
|
||||||
ARPHRD_NETLINK = 0x338
|
ARPHRD_NETLINK = 0x338
|
||||||
ARPHRD_NETROM = 0x0
|
ARPHRD_NETROM = 0x0
|
||||||
|
@ -168,16 +166,13 @@ const (
|
||||||
BPF_ALU64 = 0x7
|
BPF_ALU64 = 0x7
|
||||||
BPF_AND = 0x50
|
BPF_AND = 0x50
|
||||||
BPF_ARSH = 0xc0
|
BPF_ARSH = 0xc0
|
||||||
BPF_ATOMIC = 0xc0
|
|
||||||
BPF_B = 0x10
|
BPF_B = 0x10
|
||||||
BPF_BUILD_ID_SIZE = 0x14
|
BPF_BUILD_ID_SIZE = 0x14
|
||||||
BPF_CALL = 0x80
|
BPF_CALL = 0x80
|
||||||
BPF_CMPXCHG = 0xf1
|
|
||||||
BPF_DIV = 0x30
|
BPF_DIV = 0x30
|
||||||
BPF_DW = 0x18
|
BPF_DW = 0x18
|
||||||
BPF_END = 0xd0
|
BPF_END = 0xd0
|
||||||
BPF_EXIT = 0x90
|
BPF_EXIT = 0x90
|
||||||
BPF_FETCH = 0x1
|
|
||||||
BPF_FROM_BE = 0x8
|
BPF_FROM_BE = 0x8
|
||||||
BPF_FROM_LE = 0x0
|
BPF_FROM_LE = 0x0
|
||||||
BPF_FS_MAGIC = 0xcafe4a11
|
BPF_FS_MAGIC = 0xcafe4a11
|
||||||
|
@ -230,11 +225,7 @@ const (
|
||||||
BPF_OR = 0x40
|
BPF_OR = 0x40
|
||||||
BPF_PSEUDO_BTF_ID = 0x3
|
BPF_PSEUDO_BTF_ID = 0x3
|
||||||
BPF_PSEUDO_CALL = 0x1
|
BPF_PSEUDO_CALL = 0x1
|
||||||
BPF_PSEUDO_FUNC = 0x4
|
|
||||||
BPF_PSEUDO_KFUNC_CALL = 0x2
|
|
||||||
BPF_PSEUDO_MAP_FD = 0x1
|
BPF_PSEUDO_MAP_FD = 0x1
|
||||||
BPF_PSEUDO_MAP_IDX = 0x5
|
|
||||||
BPF_PSEUDO_MAP_IDX_VALUE = 0x6
|
|
||||||
BPF_PSEUDO_MAP_VALUE = 0x2
|
BPF_PSEUDO_MAP_VALUE = 0x2
|
||||||
BPF_RET = 0x6
|
BPF_RET = 0x6
|
||||||
BPF_RSH = 0x70
|
BPF_RSH = 0x70
|
||||||
|
@ -249,7 +240,6 @@ const (
|
||||||
BPF_W = 0x0
|
BPF_W = 0x0
|
||||||
BPF_X = 0x8
|
BPF_X = 0x8
|
||||||
BPF_XADD = 0xc0
|
BPF_XADD = 0xc0
|
||||||
BPF_XCHG = 0xe1
|
|
||||||
BPF_XOR = 0xa0
|
BPF_XOR = 0xa0
|
||||||
BRKINT = 0x2
|
BRKINT = 0x2
|
||||||
BS0 = 0x0
|
BS0 = 0x0
|
||||||
|
@ -474,7 +464,6 @@ const (
|
||||||
DM_DEV_WAIT = 0xc138fd08
|
DM_DEV_WAIT = 0xc138fd08
|
||||||
DM_DIR = "mapper"
|
DM_DIR = "mapper"
|
||||||
DM_GET_TARGET_VERSION = 0xc138fd11
|
DM_GET_TARGET_VERSION = 0xc138fd11
|
||||||
DM_IMA_MEASUREMENT_FLAG = 0x80000
|
|
||||||
DM_INACTIVE_PRESENT_FLAG = 0x40
|
DM_INACTIVE_PRESENT_FLAG = 0x40
|
||||||
DM_INTERNAL_SUSPEND_FLAG = 0x40000
|
DM_INTERNAL_SUSPEND_FLAG = 0x40000
|
||||||
DM_IOCTL = 0xfd
|
DM_IOCTL = 0xfd
|
||||||
|
@ -482,8 +471,6 @@ const (
|
||||||
DM_LIST_VERSIONS = 0xc138fd0d
|
DM_LIST_VERSIONS = 0xc138fd0d
|
||||||
DM_MAX_TYPE_NAME = 0x10
|
DM_MAX_TYPE_NAME = 0x10
|
||||||
DM_NAME_LEN = 0x80
|
DM_NAME_LEN = 0x80
|
||||||
DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID = 0x2
|
|
||||||
DM_NAME_LIST_FLAG_HAS_UUID = 0x1
|
|
||||||
DM_NOFLUSH_FLAG = 0x800
|
DM_NOFLUSH_FLAG = 0x800
|
||||||
DM_PERSISTENT_DEV_FLAG = 0x8
|
DM_PERSISTENT_DEV_FLAG = 0x8
|
||||||
DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000
|
DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000
|
||||||
|
@ -503,9 +490,9 @@ const (
|
||||||
DM_UUID_FLAG = 0x4000
|
DM_UUID_FLAG = 0x4000
|
||||||
DM_UUID_LEN = 0x81
|
DM_UUID_LEN = 0x81
|
||||||
DM_VERSION = 0xc138fd00
|
DM_VERSION = 0xc138fd00
|
||||||
DM_VERSION_EXTRA = "-ioctl (2021-03-22)"
|
DM_VERSION_EXTRA = "-ioctl (2020-10-01)"
|
||||||
DM_VERSION_MAJOR = 0x4
|
DM_VERSION_MAJOR = 0x4
|
||||||
DM_VERSION_MINOR = 0x2d
|
DM_VERSION_MINOR = 0x2b
|
||||||
DM_VERSION_PATCHLEVEL = 0x0
|
DM_VERSION_PATCHLEVEL = 0x0
|
||||||
DT_BLK = 0x6
|
DT_BLK = 0x6
|
||||||
DT_CHR = 0x2
|
DT_CHR = 0x2
|
||||||
|
@ -719,7 +706,6 @@ const (
|
||||||
ETH_P_LOOPBACK = 0x9000
|
ETH_P_LOOPBACK = 0x9000
|
||||||
ETH_P_MACSEC = 0x88e5
|
ETH_P_MACSEC = 0x88e5
|
||||||
ETH_P_MAP = 0xf9
|
ETH_P_MAP = 0xf9
|
||||||
ETH_P_MCTP = 0xfa
|
|
||||||
ETH_P_MOBITEX = 0x15
|
ETH_P_MOBITEX = 0x15
|
||||||
ETH_P_MPLS_MC = 0x8848
|
ETH_P_MPLS_MC = 0x8848
|
||||||
ETH_P_MPLS_UC = 0x8847
|
ETH_P_MPLS_UC = 0x8847
|
||||||
|
@ -742,7 +728,6 @@ const (
|
||||||
ETH_P_QINQ2 = 0x9200
|
ETH_P_QINQ2 = 0x9200
|
||||||
ETH_P_QINQ3 = 0x9300
|
ETH_P_QINQ3 = 0x9300
|
||||||
ETH_P_RARP = 0x8035
|
ETH_P_RARP = 0x8035
|
||||||
ETH_P_REALTEK = 0x8899
|
|
||||||
ETH_P_SCA = 0x6007
|
ETH_P_SCA = 0x6007
|
||||||
ETH_P_SLOW = 0x8809
|
ETH_P_SLOW = 0x8809
|
||||||
ETH_P_SNAP = 0x5
|
ETH_P_SNAP = 0x5
|
||||||
|
@ -756,21 +741,6 @@ const (
|
||||||
ETH_P_WCCP = 0x883e
|
ETH_P_WCCP = 0x883e
|
||||||
ETH_P_X25 = 0x805
|
ETH_P_X25 = 0x805
|
||||||
ETH_P_XDSA = 0xf8
|
ETH_P_XDSA = 0xf8
|
||||||
EV_ABS = 0x3
|
|
||||||
EV_CNT = 0x20
|
|
||||||
EV_FF = 0x15
|
|
||||||
EV_FF_STATUS = 0x17
|
|
||||||
EV_KEY = 0x1
|
|
||||||
EV_LED = 0x11
|
|
||||||
EV_MAX = 0x1f
|
|
||||||
EV_MSC = 0x4
|
|
||||||
EV_PWR = 0x16
|
|
||||||
EV_REL = 0x2
|
|
||||||
EV_REP = 0x14
|
|
||||||
EV_SND = 0x12
|
|
||||||
EV_SW = 0x5
|
|
||||||
EV_SYN = 0x0
|
|
||||||
EV_VERSION = 0x10001
|
|
||||||
EXABYTE_ENABLE_NEST = 0xf0
|
EXABYTE_ENABLE_NEST = 0xf0
|
||||||
EXT2_SUPER_MAGIC = 0xef53
|
EXT2_SUPER_MAGIC = 0xef53
|
||||||
EXT3_SUPER_MAGIC = 0xef53
|
EXT3_SUPER_MAGIC = 0xef53
|
||||||
|
@ -809,15 +779,11 @@ const (
|
||||||
FAN_DELETE_SELF = 0x400
|
FAN_DELETE_SELF = 0x400
|
||||||
FAN_DENY = 0x2
|
FAN_DENY = 0x2
|
||||||
FAN_ENABLE_AUDIT = 0x40
|
FAN_ENABLE_AUDIT = 0x40
|
||||||
FAN_EPIDFD = -0x2
|
|
||||||
FAN_EVENT_INFO_TYPE_DFID = 0x3
|
FAN_EVENT_INFO_TYPE_DFID = 0x3
|
||||||
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
|
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
|
||||||
FAN_EVENT_INFO_TYPE_ERROR = 0x5
|
|
||||||
FAN_EVENT_INFO_TYPE_FID = 0x1
|
FAN_EVENT_INFO_TYPE_FID = 0x1
|
||||||
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
|
|
||||||
FAN_EVENT_METADATA_LEN = 0x18
|
FAN_EVENT_METADATA_LEN = 0x18
|
||||||
FAN_EVENT_ON_CHILD = 0x8000000
|
FAN_EVENT_ON_CHILD = 0x8000000
|
||||||
FAN_FS_ERROR = 0x8000
|
|
||||||
FAN_MARK_ADD = 0x1
|
FAN_MARK_ADD = 0x1
|
||||||
FAN_MARK_DONT_FOLLOW = 0x4
|
FAN_MARK_DONT_FOLLOW = 0x4
|
||||||
FAN_MARK_FILESYSTEM = 0x100
|
FAN_MARK_FILESYSTEM = 0x100
|
||||||
|
@ -835,7 +801,6 @@ const (
|
||||||
FAN_MOVE_SELF = 0x800
|
FAN_MOVE_SELF = 0x800
|
||||||
FAN_NOFD = -0x1
|
FAN_NOFD = -0x1
|
||||||
FAN_NONBLOCK = 0x2
|
FAN_NONBLOCK = 0x2
|
||||||
FAN_NOPIDFD = -0x1
|
|
||||||
FAN_ONDIR = 0x40000000
|
FAN_ONDIR = 0x40000000
|
||||||
FAN_OPEN = 0x20
|
FAN_OPEN = 0x20
|
||||||
FAN_OPEN_EXEC = 0x1000
|
FAN_OPEN_EXEC = 0x1000
|
||||||
|
@ -846,7 +811,6 @@ const (
|
||||||
FAN_REPORT_DIR_FID = 0x400
|
FAN_REPORT_DIR_FID = 0x400
|
||||||
FAN_REPORT_FID = 0x200
|
FAN_REPORT_FID = 0x200
|
||||||
FAN_REPORT_NAME = 0x800
|
FAN_REPORT_NAME = 0x800
|
||||||
FAN_REPORT_PIDFD = 0x80
|
|
||||||
FAN_REPORT_TID = 0x100
|
FAN_REPORT_TID = 0x100
|
||||||
FAN_UNLIMITED_MARKS = 0x20
|
FAN_UNLIMITED_MARKS = 0x20
|
||||||
FAN_UNLIMITED_QUEUE = 0x10
|
FAN_UNLIMITED_QUEUE = 0x10
|
||||||
|
@ -896,7 +860,6 @@ const (
|
||||||
FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
|
FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
|
FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
|
||||||
FS_IOC_MEASURE_VERITY = 0xc0046686
|
FS_IOC_MEASURE_VERITY = 0xc0046686
|
||||||
FS_IOC_READ_VERITY_METADATA = 0xc0286687
|
|
||||||
FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
|
FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
|
||||||
FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
|
FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
|
||||||
FS_KEY_DESCRIPTOR_SIZE = 0x8
|
FS_KEY_DESCRIPTOR_SIZE = 0x8
|
||||||
|
@ -912,9 +875,6 @@ const (
|
||||||
FS_VERITY_FL = 0x100000
|
FS_VERITY_FL = 0x100000
|
||||||
FS_VERITY_HASH_ALG_SHA256 = 0x1
|
FS_VERITY_HASH_ALG_SHA256 = 0x1
|
||||||
FS_VERITY_HASH_ALG_SHA512 = 0x2
|
FS_VERITY_HASH_ALG_SHA512 = 0x2
|
||||||
FS_VERITY_METADATA_TYPE_DESCRIPTOR = 0x2
|
|
||||||
FS_VERITY_METADATA_TYPE_MERKLE_TREE = 0x1
|
|
||||||
FS_VERITY_METADATA_TYPE_SIGNATURE = 0x3
|
|
||||||
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
FUTEXFS_SUPER_MAGIC = 0xbad1dea
|
||||||
F_ADD_SEALS = 0x409
|
F_ADD_SEALS = 0x409
|
||||||
F_DUPFD = 0x0
|
F_DUPFD = 0x0
|
||||||
|
@ -1013,6 +973,7 @@ const (
|
||||||
HPFS_SUPER_MAGIC = 0xf995e849
|
HPFS_SUPER_MAGIC = 0xf995e849
|
||||||
HUGETLBFS_MAGIC = 0x958458f6
|
HUGETLBFS_MAGIC = 0x958458f6
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
|
ICMPV6_FILTER = 0x1
|
||||||
ICRNL = 0x100
|
ICRNL = 0x100
|
||||||
IFA_F_DADFAILED = 0x8
|
IFA_F_DADFAILED = 0x8
|
||||||
IFA_F_DEPRECATED = 0x20
|
IFA_F_DEPRECATED = 0x20
|
||||||
|
@ -1268,9 +1229,6 @@ const (
|
||||||
IP_XFRM_POLICY = 0x11
|
IP_XFRM_POLICY = 0x11
|
||||||
ISOFS_SUPER_MAGIC = 0x9660
|
ISOFS_SUPER_MAGIC = 0x9660
|
||||||
ISTRIP = 0x20
|
ISTRIP = 0x20
|
||||||
ITIMER_PROF = 0x2
|
|
||||||
ITIMER_REAL = 0x0
|
|
||||||
ITIMER_VIRTUAL = 0x1
|
|
||||||
IUTF8 = 0x4000
|
IUTF8 = 0x4000
|
||||||
IXANY = 0x800
|
IXANY = 0x800
|
||||||
JFFS2_SUPER_MAGIC = 0x72b6
|
JFFS2_SUPER_MAGIC = 0x72b6
|
||||||
|
@ -1286,7 +1244,6 @@ const (
|
||||||
KEXEC_ARCH_PARISC = 0xf0000
|
KEXEC_ARCH_PARISC = 0xf0000
|
||||||
KEXEC_ARCH_PPC = 0x140000
|
KEXEC_ARCH_PPC = 0x140000
|
||||||
KEXEC_ARCH_PPC64 = 0x150000
|
KEXEC_ARCH_PPC64 = 0x150000
|
||||||
KEXEC_ARCH_RISCV = 0xf30000
|
|
||||||
KEXEC_ARCH_S390 = 0x160000
|
KEXEC_ARCH_S390 = 0x160000
|
||||||
KEXEC_ARCH_SH = 0x2a0000
|
KEXEC_ARCH_SH = 0x2a0000
|
||||||
KEXEC_ARCH_X86_64 = 0x3e0000
|
KEXEC_ARCH_X86_64 = 0x3e0000
|
||||||
|
@ -1362,20 +1319,6 @@ const (
|
||||||
KEY_SPEC_THREAD_KEYRING = -0x1
|
KEY_SPEC_THREAD_KEYRING = -0x1
|
||||||
KEY_SPEC_USER_KEYRING = -0x4
|
KEY_SPEC_USER_KEYRING = -0x4
|
||||||
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
||||||
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
|
||||||
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
|
||||||
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
|
||||||
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
|
||||||
LANDLOCK_ACCESS_FS_MAKE_FIFO = 0x400
|
|
||||||
LANDLOCK_ACCESS_FS_MAKE_REG = 0x100
|
|
||||||
LANDLOCK_ACCESS_FS_MAKE_SOCK = 0x200
|
|
||||||
LANDLOCK_ACCESS_FS_MAKE_SYM = 0x1000
|
|
||||||
LANDLOCK_ACCESS_FS_READ_DIR = 0x8
|
|
||||||
LANDLOCK_ACCESS_FS_READ_FILE = 0x4
|
|
||||||
LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10
|
|
||||||
LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20
|
|
||||||
LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
|
|
||||||
LANDLOCK_CREATE_RULESET_VERSION = 0x1
|
|
||||||
LINUX_REBOOT_CMD_CAD_OFF = 0x0
|
LINUX_REBOOT_CMD_CAD_OFF = 0x0
|
||||||
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
|
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
|
||||||
LINUX_REBOOT_CMD_HALT = 0xcdef0123
|
LINUX_REBOOT_CMD_HALT = 0xcdef0123
|
||||||
|
@ -1426,8 +1369,6 @@ const (
|
||||||
MADV_NOHUGEPAGE = 0xf
|
MADV_NOHUGEPAGE = 0xf
|
||||||
MADV_NORMAL = 0x0
|
MADV_NORMAL = 0x0
|
||||||
MADV_PAGEOUT = 0x15
|
MADV_PAGEOUT = 0x15
|
||||||
MADV_POPULATE_READ = 0x16
|
|
||||||
MADV_POPULATE_WRITE = 0x17
|
|
||||||
MADV_RANDOM = 0x1
|
MADV_RANDOM = 0x1
|
||||||
MADV_REMOVE = 0x9
|
MADV_REMOVE = 0x9
|
||||||
MADV_SEQUENTIAL = 0x2
|
MADV_SEQUENTIAL = 0x2
|
||||||
|
@ -1452,10 +1393,6 @@ const (
|
||||||
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
MCAST_LEAVE_SOURCE_GROUP = 0x2f
|
||||||
MCAST_MSFILTER = 0x30
|
MCAST_MSFILTER = 0x30
|
||||||
MCAST_UNBLOCK_SOURCE = 0x2c
|
MCAST_UNBLOCK_SOURCE = 0x2c
|
||||||
MEMGETREGIONINFO = 0xc0104d08
|
|
||||||
MEMREADOOB64 = 0xc0184d16
|
|
||||||
MEMWRITE = 0xc0304d18
|
|
||||||
MEMWRITEOOB64 = 0xc0184d15
|
|
||||||
MFD_ALLOW_SEALING = 0x2
|
MFD_ALLOW_SEALING = 0x2
|
||||||
MFD_CLOEXEC = 0x1
|
MFD_CLOEXEC = 0x1
|
||||||
MFD_HUGETLB = 0x4
|
MFD_HUGETLB = 0x4
|
||||||
|
@ -1483,18 +1420,6 @@ const (
|
||||||
MNT_FORCE = 0x1
|
MNT_FORCE = 0x1
|
||||||
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
||||||
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
||||||
MOUNT_ATTR_IDMAP = 0x100000
|
|
||||||
MOUNT_ATTR_NOATIME = 0x10
|
|
||||||
MOUNT_ATTR_NODEV = 0x4
|
|
||||||
MOUNT_ATTR_NODIRATIME = 0x80
|
|
||||||
MOUNT_ATTR_NOEXEC = 0x8
|
|
||||||
MOUNT_ATTR_NOSUID = 0x2
|
|
||||||
MOUNT_ATTR_NOSYMFOLLOW = 0x200000
|
|
||||||
MOUNT_ATTR_RDONLY = 0x1
|
|
||||||
MOUNT_ATTR_RELATIME = 0x0
|
|
||||||
MOUNT_ATTR_SIZE_VER0 = 0x20
|
|
||||||
MOUNT_ATTR_STRICTATIME = 0x20
|
|
||||||
MOUNT_ATTR__ATIME = 0x70
|
|
||||||
MSDOS_SUPER_MAGIC = 0x4d44
|
MSDOS_SUPER_MAGIC = 0x4d44
|
||||||
MSG_BATCH = 0x40000
|
MSG_BATCH = 0x40000
|
||||||
MSG_CMSG_CLOEXEC = 0x40000000
|
MSG_CMSG_CLOEXEC = 0x40000000
|
||||||
|
@ -1556,35 +1481,7 @@ const (
|
||||||
MS_SYNCHRONOUS = 0x10
|
MS_SYNCHRONOUS = 0x10
|
||||||
MS_UNBINDABLE = 0x20000
|
MS_UNBINDABLE = 0x20000
|
||||||
MS_VERBOSE = 0x8000
|
MS_VERBOSE = 0x8000
|
||||||
MTD_ABSENT = 0x0
|
|
||||||
MTD_BIT_WRITEABLE = 0x800
|
|
||||||
MTD_CAP_NANDFLASH = 0x400
|
|
||||||
MTD_CAP_NORFLASH = 0xc00
|
|
||||||
MTD_CAP_NVRAM = 0x1c00
|
|
||||||
MTD_CAP_RAM = 0x1c00
|
|
||||||
MTD_CAP_ROM = 0x0
|
|
||||||
MTD_DATAFLASH = 0x6
|
|
||||||
MTD_INODE_FS_MAGIC = 0x11307854
|
MTD_INODE_FS_MAGIC = 0x11307854
|
||||||
MTD_MAX_ECCPOS_ENTRIES = 0x40
|
|
||||||
MTD_MAX_OOBFREE_ENTRIES = 0x8
|
|
||||||
MTD_MLCNANDFLASH = 0x8
|
|
||||||
MTD_NANDECC_AUTOPLACE = 0x2
|
|
||||||
MTD_NANDECC_AUTOPL_USR = 0x4
|
|
||||||
MTD_NANDECC_OFF = 0x0
|
|
||||||
MTD_NANDECC_PLACE = 0x1
|
|
||||||
MTD_NANDECC_PLACEONLY = 0x3
|
|
||||||
MTD_NANDFLASH = 0x4
|
|
||||||
MTD_NORFLASH = 0x3
|
|
||||||
MTD_NO_ERASE = 0x1000
|
|
||||||
MTD_OTP_FACTORY = 0x1
|
|
||||||
MTD_OTP_OFF = 0x0
|
|
||||||
MTD_OTP_USER = 0x2
|
|
||||||
MTD_POWERUP_LOCK = 0x2000
|
|
||||||
MTD_RAM = 0x1
|
|
||||||
MTD_ROM = 0x2
|
|
||||||
MTD_SLC_ON_MLC_EMULATION = 0x4000
|
|
||||||
MTD_UBIVOLUME = 0x7
|
|
||||||
MTD_WRITEABLE = 0x400
|
|
||||||
NAME_MAX = 0xff
|
NAME_MAX = 0xff
|
||||||
NCP_SUPER_MAGIC = 0x564c
|
NCP_SUPER_MAGIC = 0x564c
|
||||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||||
|
@ -1624,59 +1521,6 @@ const (
|
||||||
NETLINK_XFRM = 0x6
|
NETLINK_XFRM = 0x6
|
||||||
NETNSA_MAX = 0x5
|
NETNSA_MAX = 0x5
|
||||||
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
NETNSA_NSID_NOT_ASSIGNED = -0x1
|
||||||
NFC_ATR_REQ_GB_MAXSIZE = 0x30
|
|
||||||
NFC_ATR_REQ_MAXSIZE = 0x40
|
|
||||||
NFC_ATR_RES_GB_MAXSIZE = 0x2f
|
|
||||||
NFC_ATR_RES_MAXSIZE = 0x40
|
|
||||||
NFC_COMM_ACTIVE = 0x0
|
|
||||||
NFC_COMM_PASSIVE = 0x1
|
|
||||||
NFC_DEVICE_NAME_MAXSIZE = 0x8
|
|
||||||
NFC_DIRECTION_RX = 0x0
|
|
||||||
NFC_DIRECTION_TX = 0x1
|
|
||||||
NFC_FIRMWARE_NAME_MAXSIZE = 0x20
|
|
||||||
NFC_GB_MAXSIZE = 0x30
|
|
||||||
NFC_GENL_MCAST_EVENT_NAME = "events"
|
|
||||||
NFC_GENL_NAME = "nfc"
|
|
||||||
NFC_GENL_VERSION = 0x1
|
|
||||||
NFC_HEADER_SIZE = 0x1
|
|
||||||
NFC_ISO15693_UID_MAXSIZE = 0x8
|
|
||||||
NFC_LLCP_MAX_SERVICE_NAME = 0x3f
|
|
||||||
NFC_LLCP_MIUX = 0x1
|
|
||||||
NFC_LLCP_REMOTE_LTO = 0x3
|
|
||||||
NFC_LLCP_REMOTE_MIU = 0x2
|
|
||||||
NFC_LLCP_REMOTE_RW = 0x4
|
|
||||||
NFC_LLCP_RW = 0x0
|
|
||||||
NFC_NFCID1_MAXSIZE = 0xa
|
|
||||||
NFC_NFCID2_MAXSIZE = 0x8
|
|
||||||
NFC_NFCID3_MAXSIZE = 0xa
|
|
||||||
NFC_PROTO_FELICA = 0x3
|
|
||||||
NFC_PROTO_FELICA_MASK = 0x8
|
|
||||||
NFC_PROTO_ISO14443 = 0x4
|
|
||||||
NFC_PROTO_ISO14443_B = 0x6
|
|
||||||
NFC_PROTO_ISO14443_B_MASK = 0x40
|
|
||||||
NFC_PROTO_ISO14443_MASK = 0x10
|
|
||||||
NFC_PROTO_ISO15693 = 0x7
|
|
||||||
NFC_PROTO_ISO15693_MASK = 0x80
|
|
||||||
NFC_PROTO_JEWEL = 0x1
|
|
||||||
NFC_PROTO_JEWEL_MASK = 0x2
|
|
||||||
NFC_PROTO_MAX = 0x8
|
|
||||||
NFC_PROTO_MIFARE = 0x2
|
|
||||||
NFC_PROTO_MIFARE_MASK = 0x4
|
|
||||||
NFC_PROTO_NFC_DEP = 0x5
|
|
||||||
NFC_PROTO_NFC_DEP_MASK = 0x20
|
|
||||||
NFC_RAW_HEADER_SIZE = 0x2
|
|
||||||
NFC_RF_INITIATOR = 0x0
|
|
||||||
NFC_RF_NONE = 0x2
|
|
||||||
NFC_RF_TARGET = 0x1
|
|
||||||
NFC_SENSB_RES_MAXSIZE = 0xc
|
|
||||||
NFC_SENSF_RES_MAXSIZE = 0x12
|
|
||||||
NFC_SE_DISABLED = 0x0
|
|
||||||
NFC_SE_EMBEDDED = 0x2
|
|
||||||
NFC_SE_ENABLED = 0x1
|
|
||||||
NFC_SE_UICC = 0x1
|
|
||||||
NFC_SOCKPROTO_LLCP = 0x1
|
|
||||||
NFC_SOCKPROTO_MAX = 0x2
|
|
||||||
NFC_SOCKPROTO_RAW = 0x0
|
|
||||||
NFNETLINK_V0 = 0x0
|
NFNETLINK_V0 = 0x0
|
||||||
NFNLGRP_ACCT_QUOTA = 0x8
|
NFNLGRP_ACCT_QUOTA = 0x8
|
||||||
NFNLGRP_CONNTRACK_DESTROY = 0x3
|
NFNLGRP_CONNTRACK_DESTROY = 0x3
|
||||||
|
@ -1694,12 +1538,11 @@ const (
|
||||||
NFNL_MSG_BATCH_END = 0x11
|
NFNL_MSG_BATCH_END = 0x11
|
||||||
NFNL_NFA_NEST = 0x8000
|
NFNL_NFA_NEST = 0x8000
|
||||||
NFNL_SUBSYS_ACCT = 0x7
|
NFNL_SUBSYS_ACCT = 0x7
|
||||||
NFNL_SUBSYS_COUNT = 0xd
|
NFNL_SUBSYS_COUNT = 0xc
|
||||||
NFNL_SUBSYS_CTHELPER = 0x9
|
NFNL_SUBSYS_CTHELPER = 0x9
|
||||||
NFNL_SUBSYS_CTNETLINK = 0x1
|
NFNL_SUBSYS_CTNETLINK = 0x1
|
||||||
NFNL_SUBSYS_CTNETLINK_EXP = 0x2
|
NFNL_SUBSYS_CTNETLINK_EXP = 0x2
|
||||||
NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
|
NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
|
||||||
NFNL_SUBSYS_HOOK = 0xc
|
|
||||||
NFNL_SUBSYS_IPSET = 0x6
|
NFNL_SUBSYS_IPSET = 0x6
|
||||||
NFNL_SUBSYS_NFTABLES = 0xa
|
NFNL_SUBSYS_NFTABLES = 0xa
|
||||||
NFNL_SUBSYS_NFT_COMPAT = 0xb
|
NFNL_SUBSYS_NFT_COMPAT = 0xb
|
||||||
|
@ -1815,27 +1658,16 @@ const (
|
||||||
PERF_ATTR_SIZE_VER4 = 0x68
|
PERF_ATTR_SIZE_VER4 = 0x68
|
||||||
PERF_ATTR_SIZE_VER5 = 0x70
|
PERF_ATTR_SIZE_VER5 = 0x70
|
||||||
PERF_ATTR_SIZE_VER6 = 0x78
|
PERF_ATTR_SIZE_VER6 = 0x78
|
||||||
PERF_ATTR_SIZE_VER7 = 0x80
|
|
||||||
PERF_AUX_FLAG_COLLISION = 0x8
|
PERF_AUX_FLAG_COLLISION = 0x8
|
||||||
PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0
|
|
||||||
PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100
|
|
||||||
PERF_AUX_FLAG_OVERWRITE = 0x2
|
PERF_AUX_FLAG_OVERWRITE = 0x2
|
||||||
PERF_AUX_FLAG_PARTIAL = 0x4
|
PERF_AUX_FLAG_PARTIAL = 0x4
|
||||||
PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00
|
|
||||||
PERF_AUX_FLAG_TRUNCATED = 0x1
|
PERF_AUX_FLAG_TRUNCATED = 0x1
|
||||||
PERF_FLAG_FD_CLOEXEC = 0x8
|
PERF_FLAG_FD_CLOEXEC = 0x8
|
||||||
PERF_FLAG_FD_NO_GROUP = 0x1
|
PERF_FLAG_FD_NO_GROUP = 0x1
|
||||||
PERF_FLAG_FD_OUTPUT = 0x2
|
PERF_FLAG_FD_OUTPUT = 0x2
|
||||||
PERF_FLAG_PID_CGROUP = 0x4
|
PERF_FLAG_PID_CGROUP = 0x4
|
||||||
PERF_HW_EVENT_MASK = 0xffffffff
|
|
||||||
PERF_MAX_CONTEXTS_PER_STACK = 0x8
|
PERF_MAX_CONTEXTS_PER_STACK = 0x8
|
||||||
PERF_MAX_STACK_DEPTH = 0x7f
|
PERF_MAX_STACK_DEPTH = 0x7f
|
||||||
PERF_MEM_BLK_ADDR = 0x4
|
|
||||||
PERF_MEM_BLK_DATA = 0x2
|
|
||||||
PERF_MEM_BLK_NA = 0x1
|
|
||||||
PERF_MEM_BLK_SHIFT = 0x28
|
|
||||||
PERF_MEM_HOPS_0 = 0x1
|
|
||||||
PERF_MEM_HOPS_SHIFT = 0x2b
|
|
||||||
PERF_MEM_LOCK_LOCKED = 0x2
|
PERF_MEM_LOCK_LOCKED = 0x2
|
||||||
PERF_MEM_LOCK_NA = 0x1
|
PERF_MEM_LOCK_NA = 0x1
|
||||||
PERF_MEM_LOCK_SHIFT = 0x18
|
PERF_MEM_LOCK_SHIFT = 0x18
|
||||||
|
@ -1888,7 +1720,6 @@ const (
|
||||||
PERF_MEM_TLB_OS = 0x40
|
PERF_MEM_TLB_OS = 0x40
|
||||||
PERF_MEM_TLB_SHIFT = 0x1a
|
PERF_MEM_TLB_SHIFT = 0x1a
|
||||||
PERF_MEM_TLB_WK = 0x20
|
PERF_MEM_TLB_WK = 0x20
|
||||||
PERF_PMU_TYPE_SHIFT = 0x20
|
|
||||||
PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1
|
PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1
|
||||||
PERF_RECORD_MISC_COMM_EXEC = 0x2000
|
PERF_RECORD_MISC_COMM_EXEC = 0x2000
|
||||||
PERF_RECORD_MISC_CPUMODE_MASK = 0x7
|
PERF_RECORD_MISC_CPUMODE_MASK = 0x7
|
||||||
|
@ -1900,14 +1731,12 @@ const (
|
||||||
PERF_RECORD_MISC_GUEST_USER = 0x5
|
PERF_RECORD_MISC_GUEST_USER = 0x5
|
||||||
PERF_RECORD_MISC_HYPERVISOR = 0x3
|
PERF_RECORD_MISC_HYPERVISOR = 0x3
|
||||||
PERF_RECORD_MISC_KERNEL = 0x1
|
PERF_RECORD_MISC_KERNEL = 0x1
|
||||||
PERF_RECORD_MISC_MMAP_BUILD_ID = 0x4000
|
|
||||||
PERF_RECORD_MISC_MMAP_DATA = 0x2000
|
PERF_RECORD_MISC_MMAP_DATA = 0x2000
|
||||||
PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT = 0x1000
|
PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT = 0x1000
|
||||||
PERF_RECORD_MISC_SWITCH_OUT = 0x2000
|
PERF_RECORD_MISC_SWITCH_OUT = 0x2000
|
||||||
PERF_RECORD_MISC_SWITCH_OUT_PREEMPT = 0x4000
|
PERF_RECORD_MISC_SWITCH_OUT_PREEMPT = 0x4000
|
||||||
PERF_RECORD_MISC_USER = 0x2
|
PERF_RECORD_MISC_USER = 0x2
|
||||||
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
||||||
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
|
|
||||||
PIPEFS_MAGIC = 0x50495045
|
PIPEFS_MAGIC = 0x50495045
|
||||||
PPC_CMM_MAGIC = 0xc7571590
|
PPC_CMM_MAGIC = 0xc7571590
|
||||||
PPPIOCGNPMODE = 0xc008744c
|
PPPIOCGNPMODE = 0xc008744c
|
||||||
|
@ -1988,18 +1817,7 @@ const (
|
||||||
PR_PAC_APGAKEY = 0x10
|
PR_PAC_APGAKEY = 0x10
|
||||||
PR_PAC_APIAKEY = 0x1
|
PR_PAC_APIAKEY = 0x1
|
||||||
PR_PAC_APIBKEY = 0x2
|
PR_PAC_APIBKEY = 0x2
|
||||||
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
|
||||||
PR_PAC_RESET_KEYS = 0x36
|
PR_PAC_RESET_KEYS = 0x36
|
||||||
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
|
||||||
PR_SCHED_CORE = 0x3e
|
|
||||||
PR_SCHED_CORE_CREATE = 0x1
|
|
||||||
PR_SCHED_CORE_GET = 0x0
|
|
||||||
PR_SCHED_CORE_MAX = 0x4
|
|
||||||
PR_SCHED_CORE_SCOPE_PROCESS_GROUP = 0x2
|
|
||||||
PR_SCHED_CORE_SCOPE_THREAD = 0x0
|
|
||||||
PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1
|
|
||||||
PR_SCHED_CORE_SHARE_FROM = 0x3
|
|
||||||
PR_SCHED_CORE_SHARE_TO = 0x2
|
|
||||||
PR_SET_CHILD_SUBREAPER = 0x24
|
PR_SET_CHILD_SUBREAPER = 0x24
|
||||||
PR_SET_DUMPABLE = 0x4
|
PR_SET_DUMPABLE = 0x4
|
||||||
PR_SET_ENDIAN = 0x14
|
PR_SET_ENDIAN = 0x14
|
||||||
|
@ -2043,7 +1861,6 @@ const (
|
||||||
PR_SPEC_ENABLE = 0x2
|
PR_SPEC_ENABLE = 0x2
|
||||||
PR_SPEC_FORCE_DISABLE = 0x8
|
PR_SPEC_FORCE_DISABLE = 0x8
|
||||||
PR_SPEC_INDIRECT_BRANCH = 0x1
|
PR_SPEC_INDIRECT_BRANCH = 0x1
|
||||||
PR_SPEC_L1D_FLUSH = 0x2
|
|
||||||
PR_SPEC_NOT_AFFECTED = 0x0
|
PR_SPEC_NOT_AFFECTED = 0x0
|
||||||
PR_SPEC_PRCTL = 0x1
|
PR_SPEC_PRCTL = 0x1
|
||||||
PR_SPEC_STORE_BYPASS = 0x0
|
PR_SPEC_STORE_BYPASS = 0x0
|
||||||
|
@ -2082,7 +1899,6 @@ const (
|
||||||
PTRACE_GETREGSET = 0x4204
|
PTRACE_GETREGSET = 0x4204
|
||||||
PTRACE_GETSIGINFO = 0x4202
|
PTRACE_GETSIGINFO = 0x4202
|
||||||
PTRACE_GETSIGMASK = 0x420a
|
PTRACE_GETSIGMASK = 0x420a
|
||||||
PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
|
|
||||||
PTRACE_GET_SYSCALL_INFO = 0x420e
|
PTRACE_GET_SYSCALL_INFO = 0x420e
|
||||||
PTRACE_INTERRUPT = 0x4207
|
PTRACE_INTERRUPT = 0x4207
|
||||||
PTRACE_KILL = 0x8
|
PTRACE_KILL = 0x8
|
||||||
|
@ -2124,11 +1940,6 @@ const (
|
||||||
QNX4_SUPER_MAGIC = 0x2f
|
QNX4_SUPER_MAGIC = 0x2f
|
||||||
QNX6_SUPER_MAGIC = 0x68191122
|
QNX6_SUPER_MAGIC = 0x68191122
|
||||||
RAMFS_MAGIC = 0x858458f6
|
RAMFS_MAGIC = 0x858458f6
|
||||||
RAW_PAYLOAD_DIGITAL = 0x3
|
|
||||||
RAW_PAYLOAD_HCI = 0x2
|
|
||||||
RAW_PAYLOAD_LLCP = 0x0
|
|
||||||
RAW_PAYLOAD_NCI = 0x1
|
|
||||||
RAW_PAYLOAD_PROPRIETARY = 0x4
|
|
||||||
RDTGROUP_SUPER_MAGIC = 0x7655821
|
RDTGROUP_SUPER_MAGIC = 0x7655821
|
||||||
REISERFS_SUPER_MAGIC = 0x52654973
|
REISERFS_SUPER_MAGIC = 0x52654973
|
||||||
RENAME_EXCHANGE = 0x2
|
RENAME_EXCHANGE = 0x2
|
||||||
|
@ -2179,23 +1990,8 @@ const (
|
||||||
RTCF_NAT = 0x800000
|
RTCF_NAT = 0x800000
|
||||||
RTCF_VALVE = 0x200000
|
RTCF_VALVE = 0x200000
|
||||||
RTC_AF = 0x20
|
RTC_AF = 0x20
|
||||||
RTC_BSM_DIRECT = 0x1
|
|
||||||
RTC_BSM_DISABLED = 0x0
|
|
||||||
RTC_BSM_LEVEL = 0x2
|
|
||||||
RTC_BSM_STANDBY = 0x3
|
|
||||||
RTC_FEATURE_ALARM = 0x0
|
|
||||||
RTC_FEATURE_ALARM_RES_2S = 0x3
|
|
||||||
RTC_FEATURE_ALARM_RES_MINUTE = 0x1
|
|
||||||
RTC_FEATURE_BACKUP_SWITCH_MODE = 0x6
|
|
||||||
RTC_FEATURE_CNT = 0x7
|
|
||||||
RTC_FEATURE_CORRECTION = 0x5
|
|
||||||
RTC_FEATURE_NEED_WEEK_DAY = 0x2
|
|
||||||
RTC_FEATURE_UPDATE_INTERRUPT = 0x4
|
|
||||||
RTC_IRQF = 0x80
|
RTC_IRQF = 0x80
|
||||||
RTC_MAX_FREQ = 0x2000
|
RTC_MAX_FREQ = 0x2000
|
||||||
RTC_PARAM_BACKUP_SWITCH_MODE = 0x2
|
|
||||||
RTC_PARAM_CORRECTION = 0x1
|
|
||||||
RTC_PARAM_FEATURES = 0x0
|
|
||||||
RTC_PF = 0x40
|
RTC_PF = 0x40
|
||||||
RTC_UF = 0x10
|
RTC_UF = 0x10
|
||||||
RTF_ADDRCLASSMASK = 0xf8000000
|
RTF_ADDRCLASSMASK = 0xf8000000
|
||||||
|
@ -2254,7 +2050,6 @@ const (
|
||||||
RTM_DELNEIGH = 0x1d
|
RTM_DELNEIGH = 0x1d
|
||||||
RTM_DELNETCONF = 0x51
|
RTM_DELNETCONF = 0x51
|
||||||
RTM_DELNEXTHOP = 0x69
|
RTM_DELNEXTHOP = 0x69
|
||||||
RTM_DELNEXTHOPBUCKET = 0x75
|
|
||||||
RTM_DELNSID = 0x59
|
RTM_DELNSID = 0x59
|
||||||
RTM_DELQDISC = 0x25
|
RTM_DELQDISC = 0x25
|
||||||
RTM_DELROUTE = 0x19
|
RTM_DELROUTE = 0x19
|
||||||
|
@ -2268,7 +2063,6 @@ const (
|
||||||
RTM_F_LOOKUP_TABLE = 0x1000
|
RTM_F_LOOKUP_TABLE = 0x1000
|
||||||
RTM_F_NOTIFY = 0x100
|
RTM_F_NOTIFY = 0x100
|
||||||
RTM_F_OFFLOAD = 0x4000
|
RTM_F_OFFLOAD = 0x4000
|
||||||
RTM_F_OFFLOAD_FAILED = 0x20000000
|
|
||||||
RTM_F_PREFIX = 0x800
|
RTM_F_PREFIX = 0x800
|
||||||
RTM_F_TRAP = 0x8000
|
RTM_F_TRAP = 0x8000
|
||||||
RTM_GETACTION = 0x32
|
RTM_GETACTION = 0x32
|
||||||
|
@ -2285,7 +2079,6 @@ const (
|
||||||
RTM_GETNEIGHTBL = 0x42
|
RTM_GETNEIGHTBL = 0x42
|
||||||
RTM_GETNETCONF = 0x52
|
RTM_GETNETCONF = 0x52
|
||||||
RTM_GETNEXTHOP = 0x6a
|
RTM_GETNEXTHOP = 0x6a
|
||||||
RTM_GETNEXTHOPBUCKET = 0x76
|
|
||||||
RTM_GETNSID = 0x5a
|
RTM_GETNSID = 0x5a
|
||||||
RTM_GETQDISC = 0x26
|
RTM_GETQDISC = 0x26
|
||||||
RTM_GETROUTE = 0x1a
|
RTM_GETROUTE = 0x1a
|
||||||
|
@ -2294,7 +2087,7 @@ const (
|
||||||
RTM_GETTCLASS = 0x2a
|
RTM_GETTCLASS = 0x2a
|
||||||
RTM_GETTFILTER = 0x2e
|
RTM_GETTFILTER = 0x2e
|
||||||
RTM_GETVLAN = 0x72
|
RTM_GETVLAN = 0x72
|
||||||
RTM_MAX = 0x77
|
RTM_MAX = 0x73
|
||||||
RTM_NEWACTION = 0x30
|
RTM_NEWACTION = 0x30
|
||||||
RTM_NEWADDR = 0x14
|
RTM_NEWADDR = 0x14
|
||||||
RTM_NEWADDRLABEL = 0x48
|
RTM_NEWADDRLABEL = 0x48
|
||||||
|
@ -2308,7 +2101,6 @@ const (
|
||||||
RTM_NEWNEIGHTBL = 0x40
|
RTM_NEWNEIGHTBL = 0x40
|
||||||
RTM_NEWNETCONF = 0x50
|
RTM_NEWNETCONF = 0x50
|
||||||
RTM_NEWNEXTHOP = 0x68
|
RTM_NEWNEXTHOP = 0x68
|
||||||
RTM_NEWNEXTHOPBUCKET = 0x74
|
|
||||||
RTM_NEWNSID = 0x58
|
RTM_NEWNSID = 0x58
|
||||||
RTM_NEWNVLAN = 0x70
|
RTM_NEWNVLAN = 0x70
|
||||||
RTM_NEWPREFIX = 0x34
|
RTM_NEWPREFIX = 0x34
|
||||||
|
@ -2318,8 +2110,8 @@ const (
|
||||||
RTM_NEWSTATS = 0x5c
|
RTM_NEWSTATS = 0x5c
|
||||||
RTM_NEWTCLASS = 0x28
|
RTM_NEWTCLASS = 0x28
|
||||||
RTM_NEWTFILTER = 0x2c
|
RTM_NEWTFILTER = 0x2c
|
||||||
RTM_NR_FAMILIES = 0x1a
|
RTM_NR_FAMILIES = 0x19
|
||||||
RTM_NR_MSGTYPES = 0x68
|
RTM_NR_MSGTYPES = 0x64
|
||||||
RTM_SETDCB = 0x4f
|
RTM_SETDCB = 0x4f
|
||||||
RTM_SETLINK = 0x13
|
RTM_SETLINK = 0x13
|
||||||
RTM_SETNEIGHTBL = 0x43
|
RTM_SETNEIGHTBL = 0x43
|
||||||
|
@ -2347,7 +2139,6 @@ const (
|
||||||
RTPROT_MROUTED = 0x11
|
RTPROT_MROUTED = 0x11
|
||||||
RTPROT_MRT = 0xa
|
RTPROT_MRT = 0xa
|
||||||
RTPROT_NTK = 0xf
|
RTPROT_NTK = 0xf
|
||||||
RTPROT_OPENR = 0x63
|
|
||||||
RTPROT_OSPF = 0xbc
|
RTPROT_OSPF = 0xbc
|
||||||
RTPROT_RA = 0x9
|
RTPROT_RA = 0x9
|
||||||
RTPROT_REDIRECT = 0x1
|
RTPROT_REDIRECT = 0x1
|
||||||
|
@ -2378,14 +2169,7 @@ const (
|
||||||
SECCOMP_MODE_DISABLED = 0x0
|
SECCOMP_MODE_DISABLED = 0x0
|
||||||
SECCOMP_MODE_FILTER = 0x2
|
SECCOMP_MODE_FILTER = 0x2
|
||||||
SECCOMP_MODE_STRICT = 0x1
|
SECCOMP_MODE_STRICT = 0x1
|
||||||
SECRETMEM_MAGIC = 0x5345434d
|
|
||||||
SECURITYFS_MAGIC = 0x73636673
|
SECURITYFS_MAGIC = 0x73636673
|
||||||
SEEK_CUR = 0x1
|
|
||||||
SEEK_DATA = 0x3
|
|
||||||
SEEK_END = 0x2
|
|
||||||
SEEK_HOLE = 0x4
|
|
||||||
SEEK_MAX = 0x4
|
|
||||||
SEEK_SET = 0x0
|
|
||||||
SELINUX_MAGIC = 0xf97cff8c
|
SELINUX_MAGIC = 0xf97cff8c
|
||||||
SHUT_RD = 0x0
|
SHUT_RD = 0x0
|
||||||
SHUT_RDWR = 0x2
|
SHUT_RDWR = 0x2
|
||||||
|
@ -2490,15 +2274,12 @@ const (
|
||||||
SMART_WRITE_THRESHOLDS = 0xd7
|
SMART_WRITE_THRESHOLDS = 0xd7
|
||||||
SMB_SUPER_MAGIC = 0x517b
|
SMB_SUPER_MAGIC = 0x517b
|
||||||
SOCKFS_MAGIC = 0x534f434b
|
SOCKFS_MAGIC = 0x534f434b
|
||||||
SOCK_BUF_LOCK_MASK = 0x3
|
|
||||||
SOCK_DCCP = 0x6
|
SOCK_DCCP = 0x6
|
||||||
SOCK_IOC_TYPE = 0x89
|
SOCK_IOC_TYPE = 0x89
|
||||||
SOCK_PACKET = 0xa
|
SOCK_PACKET = 0xa
|
||||||
SOCK_RAW = 0x3
|
SOCK_RAW = 0x3
|
||||||
SOCK_RCVBUF_LOCK = 0x2
|
|
||||||
SOCK_RDM = 0x4
|
SOCK_RDM = 0x4
|
||||||
SOCK_SEQPACKET = 0x5
|
SOCK_SEQPACKET = 0x5
|
||||||
SOCK_SNDBUF_LOCK = 0x1
|
|
||||||
SOL_AAL = 0x109
|
SOL_AAL = 0x109
|
||||||
SOL_ALG = 0x117
|
SOL_ALG = 0x117
|
||||||
SOL_ATM = 0x108
|
SOL_ATM = 0x108
|
||||||
|
@ -2555,8 +2336,6 @@ const (
|
||||||
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW = 0x8
|
|
||||||
SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD = 0x6
|
|
||||||
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
SO_VM_SOCKETS_TRUSTED = 0x5
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
|
@ -2637,14 +2416,6 @@ const (
|
||||||
TCOFLUSH = 0x1
|
TCOFLUSH = 0x1
|
||||||
TCOOFF = 0x0
|
TCOOFF = 0x0
|
||||||
TCOON = 0x1
|
TCOON = 0x1
|
||||||
TCPOPT_EOL = 0x0
|
|
||||||
TCPOPT_MAXSEG = 0x2
|
|
||||||
TCPOPT_NOP = 0x1
|
|
||||||
TCPOPT_SACK = 0x5
|
|
||||||
TCPOPT_SACK_PERMITTED = 0x4
|
|
||||||
TCPOPT_TIMESTAMP = 0x8
|
|
||||||
TCPOPT_TSTAMP_HDR = 0x101080a
|
|
||||||
TCPOPT_WINDOW = 0x3
|
|
||||||
TCP_CC_INFO = 0x1a
|
TCP_CC_INFO = 0x1a
|
||||||
TCP_CM_INQ = 0x24
|
TCP_CM_INQ = 0x24
|
||||||
TCP_CONGESTION = 0xd
|
TCP_CONGESTION = 0xd
|
||||||
|
@ -2851,13 +2622,6 @@ const (
|
||||||
WDIOS_TEMPPANIC = 0x4
|
WDIOS_TEMPPANIC = 0x4
|
||||||
WDIOS_UNKNOWN = -0x1
|
WDIOS_UNKNOWN = -0x1
|
||||||
WEXITED = 0x4
|
WEXITED = 0x4
|
||||||
WGALLOWEDIP_A_MAX = 0x3
|
|
||||||
WGDEVICE_A_MAX = 0x8
|
|
||||||
WGPEER_A_MAX = 0xa
|
|
||||||
WG_CMD_MAX = 0x1
|
|
||||||
WG_GENL_NAME = "wireguard"
|
|
||||||
WG_GENL_VERSION = 0x1
|
|
||||||
WG_KEY_LEN = 0x20
|
|
||||||
WIN_ACKMEDIACHANGE = 0xdb
|
WIN_ACKMEDIACHANGE = 0xdb
|
||||||
WIN_CHECKPOWERMODE1 = 0xe5
|
WIN_CHECKPOWERMODE1 = 0xe5
|
||||||
WIN_CHECKPOWERMODE2 = 0x98
|
WIN_CHECKPOWERMODE2 = 0x98
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build 386,linux
|
// +build 386,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x81484d11
|
|
||||||
ECCGETSTATS = 0x80104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -125,19 +123,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x40084d02
|
|
||||||
MEMERASE64 = 0x40104d14
|
|
||||||
MEMGETBADBLOCK = 0x40084d0b
|
|
||||||
MEMGETINFO = 0x80204d01
|
|
||||||
MEMGETOOBSEL = 0x80c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x80044d07
|
|
||||||
MEMISLOCKED = 0x80084d17
|
|
||||||
MEMLOCK = 0x40084d05
|
|
||||||
MEMREADOOB = 0xc00c4d04
|
|
||||||
MEMSETBADBLOCK = 0x40084d0c
|
|
||||||
MEMUNLOCK = 0x40084d06
|
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
|
||||||
MTDFILEMODE = 0x4d13
|
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -147,11 +132,6 @@ const (
|
||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x400c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
|
||||||
OTPLOCK = 0x800c4d10
|
|
||||||
OTPSELECT = 0x80044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -250,8 +230,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x4004700e
|
RTC_EPOCH_SET = 0x4004700e
|
||||||
RTC_IRQP_READ = 0x8004700b
|
RTC_IRQP_READ = 0x8004700b
|
||||||
RTC_IRQP_SET = 0x4004700c
|
RTC_IRQP_SET = 0x4004700c
|
||||||
RTC_PARAM_GET = 0x40187013
|
|
||||||
RTC_PARAM_SET = 0x40187014
|
|
||||||
RTC_PIE_OFF = 0x7006
|
RTC_PIE_OFF = 0x7006
|
||||||
RTC_PIE_ON = 0x7005
|
RTC_PIE_ON = 0x7005
|
||||||
RTC_PLL_GET = 0x801c7011
|
RTC_PLL_GET = 0x801c7011
|
||||||
|
@ -295,7 +273,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -312,7 +289,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
@ -329,7 +305,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x14
|
SO_RCVTIMEO = 0x14
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x14
|
SO_RCVTIMEO_OLD = 0x14
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build amd64,linux
|
// +build amd64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x81484d11
|
|
||||||
ECCGETSTATS = 0x80104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -125,19 +123,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x40084d02
|
|
||||||
MEMERASE64 = 0x40104d14
|
|
||||||
MEMGETBADBLOCK = 0x40084d0b
|
|
||||||
MEMGETINFO = 0x80204d01
|
|
||||||
MEMGETOOBSEL = 0x80c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x80044d07
|
|
||||||
MEMISLOCKED = 0x80084d17
|
|
||||||
MEMLOCK = 0x40084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x40084d0c
|
|
||||||
MEMUNLOCK = 0x40084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x4d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -147,11 +132,6 @@ const (
|
||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x400c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
|
||||||
OTPLOCK = 0x800c4d10
|
|
||||||
OTPSELECT = 0x80044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -251,8 +231,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x4008700e
|
RTC_EPOCH_SET = 0x4008700e
|
||||||
RTC_IRQP_READ = 0x8008700b
|
RTC_IRQP_READ = 0x8008700b
|
||||||
RTC_IRQP_SET = 0x4008700c
|
RTC_IRQP_SET = 0x4008700c
|
||||||
RTC_PARAM_GET = 0x40187013
|
|
||||||
RTC_PARAM_SET = 0x40187014
|
|
||||||
RTC_PIE_OFF = 0x7006
|
RTC_PIE_OFF = 0x7006
|
||||||
RTC_PIE_ON = 0x7005
|
RTC_PIE_ON = 0x7005
|
||||||
RTC_PLL_GET = 0x80207011
|
RTC_PLL_GET = 0x80207011
|
||||||
|
@ -296,7 +274,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -313,7 +290,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
@ -330,7 +306,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x14
|
SO_RCVTIMEO = 0x14
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x14
|
SO_RCVTIMEO_OLD = 0x14
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build arm,linux
|
// +build arm,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x81484d11
|
|
||||||
ECCGETSTATS = 0x80104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x40084d02
|
|
||||||
MEMERASE64 = 0x40104d14
|
|
||||||
MEMGETBADBLOCK = 0x40084d0b
|
|
||||||
MEMGETINFO = 0x80204d01
|
|
||||||
MEMGETOOBSEL = 0x80c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x80044d07
|
|
||||||
MEMISLOCKED = 0x80084d17
|
|
||||||
MEMLOCK = 0x40084d05
|
|
||||||
MEMREADOOB = 0xc00c4d04
|
|
||||||
MEMSETBADBLOCK = 0x40084d0c
|
|
||||||
MEMUNLOCK = 0x40084d06
|
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
|
||||||
MTDFILEMODE = 0x4d13
|
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -145,11 +130,6 @@ const (
|
||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x400c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
|
||||||
OTPLOCK = 0x800c4d10
|
|
||||||
OTPSELECT = 0x80044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -257,8 +237,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x4004700e
|
RTC_EPOCH_SET = 0x4004700e
|
||||||
RTC_IRQP_READ = 0x8004700b
|
RTC_IRQP_READ = 0x8004700b
|
||||||
RTC_IRQP_SET = 0x4004700c
|
RTC_IRQP_SET = 0x4004700c
|
||||||
RTC_PARAM_GET = 0x40187013
|
|
||||||
RTC_PARAM_SET = 0x40187014
|
|
||||||
RTC_PIE_OFF = 0x7006
|
RTC_PIE_OFF = 0x7006
|
||||||
RTC_PIE_ON = 0x7005
|
RTC_PIE_ON = 0x7005
|
||||||
RTC_PLL_GET = 0x801c7011
|
RTC_PLL_GET = 0x801c7011
|
||||||
|
@ -302,7 +280,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -319,7 +296,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
@ -336,7 +312,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x14
|
SO_RCVTIMEO = 0x14
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x14
|
SO_RCVTIMEO_OLD = 0x14
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build arm64,linux
|
// +build arm64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x81484d11
|
|
||||||
ECCGETSTATS = 0x80104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -126,19 +124,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x40084d02
|
|
||||||
MEMERASE64 = 0x40104d14
|
|
||||||
MEMGETBADBLOCK = 0x40084d0b
|
|
||||||
MEMGETINFO = 0x80204d01
|
|
||||||
MEMGETOOBSEL = 0x80c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x80044d07
|
|
||||||
MEMISLOCKED = 0x80084d17
|
|
||||||
MEMLOCK = 0x40084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x40084d0c
|
|
||||||
MEMUNLOCK = 0x40084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x4d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -148,11 +133,6 @@ const (
|
||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x400c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
|
||||||
OTPLOCK = 0x800c4d10
|
|
||||||
OTPSELECT = 0x80044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -247,8 +227,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x4008700e
|
RTC_EPOCH_SET = 0x4008700e
|
||||||
RTC_IRQP_READ = 0x8008700b
|
RTC_IRQP_READ = 0x8008700b
|
||||||
RTC_IRQP_SET = 0x4008700c
|
RTC_IRQP_SET = 0x4008700c
|
||||||
RTC_PARAM_GET = 0x40187013
|
|
||||||
RTC_PARAM_SET = 0x40187014
|
|
||||||
RTC_PIE_OFF = 0x7006
|
RTC_PIE_OFF = 0x7006
|
||||||
RTC_PIE_ON = 0x7005
|
RTC_PIE_ON = 0x7005
|
||||||
RTC_PLL_GET = 0x80207011
|
RTC_PLL_GET = 0x80207011
|
||||||
|
@ -292,7 +270,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -309,7 +286,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
@ -326,7 +302,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x14
|
SO_RCVTIMEO = 0x14
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x14
|
SO_RCVTIMEO_OLD = 0x14
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build mips,linux
|
// +build mips,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc00c4d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -145,11 +130,6 @@ const (
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x8
|
O_APPEND = 0x8
|
||||||
O_ASYNC = 0x1000
|
O_ASYNC = 0x1000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -250,8 +230,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x8004700e
|
RTC_EPOCH_SET = 0x8004700e
|
||||||
RTC_IRQP_READ = 0x4004700b
|
RTC_IRQP_READ = 0x4004700b
|
||||||
RTC_IRQP_SET = 0x8004700c
|
RTC_IRQP_SET = 0x8004700c
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
RTC_PIE_OFF = 0x20007006
|
||||||
RTC_PIE_ON = 0x20007005
|
RTC_PIE_ON = 0x20007005
|
||||||
RTC_PLL_GET = 0x401c7011
|
RTC_PLL_GET = 0x401c7011
|
||||||
|
@ -295,7 +273,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -312,7 +289,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
@ -329,7 +305,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x1006
|
SO_RCVTIMEO = 0x1006
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x1006
|
SO_RCVTIMEO_OLD = 0x1006
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x4
|
SO_REUSEADDR = 0x4
|
||||||
SO_REUSEPORT = 0x200
|
SO_REUSEPORT = 0x200
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build mips64,linux
|
// +build mips64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -145,11 +130,6 @@ const (
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x8
|
O_APPEND = 0x8
|
||||||
O_ASYNC = 0x1000
|
O_ASYNC = 0x1000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -250,8 +230,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x8008700e
|
RTC_EPOCH_SET = 0x8008700e
|
||||||
RTC_IRQP_READ = 0x4008700b
|
RTC_IRQP_READ = 0x4008700b
|
||||||
RTC_IRQP_SET = 0x8008700c
|
RTC_IRQP_SET = 0x8008700c
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
RTC_PIE_OFF = 0x20007006
|
||||||
RTC_PIE_ON = 0x20007005
|
RTC_PIE_ON = 0x20007005
|
||||||
RTC_PLL_GET = 0x40207011
|
RTC_PLL_GET = 0x40207011
|
||||||
|
@ -295,7 +273,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -312,7 +289,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
@ -329,7 +305,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x1006
|
SO_RCVTIMEO = 0x1006
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x1006
|
SO_RCVTIMEO_OLD = 0x1006
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x4
|
SO_REUSEADDR = 0x4
|
||||||
SO_REUSEPORT = 0x200
|
SO_REUSEPORT = 0x200
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build mips64le,linux
|
// +build mips64le,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -145,11 +130,6 @@ const (
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x8
|
O_APPEND = 0x8
|
||||||
O_ASYNC = 0x1000
|
O_ASYNC = 0x1000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -250,8 +230,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x8008700e
|
RTC_EPOCH_SET = 0x8008700e
|
||||||
RTC_IRQP_READ = 0x4008700b
|
RTC_IRQP_READ = 0x4008700b
|
||||||
RTC_IRQP_SET = 0x8008700c
|
RTC_IRQP_SET = 0x8008700c
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
RTC_PIE_OFF = 0x20007006
|
||||||
RTC_PIE_ON = 0x20007005
|
RTC_PIE_ON = 0x20007005
|
||||||
RTC_PLL_GET = 0x40207011
|
RTC_PLL_GET = 0x40207011
|
||||||
|
@ -295,7 +273,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -312,7 +289,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
@ -329,7 +305,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x1006
|
SO_RCVTIMEO = 0x1006
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x1006
|
SO_RCVTIMEO_OLD = 0x1006
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x4
|
SO_REUSEADDR = 0x4
|
||||||
SO_REUSEPORT = 0x200
|
SO_REUSEPORT = 0x200
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build mipsle,linux
|
// +build mipsle,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc00c4d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -145,11 +130,6 @@ const (
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x8
|
O_APPEND = 0x8
|
||||||
O_ASYNC = 0x1000
|
O_ASYNC = 0x1000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -250,8 +230,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x8004700e
|
RTC_EPOCH_SET = 0x8004700e
|
||||||
RTC_IRQP_READ = 0x4004700b
|
RTC_IRQP_READ = 0x4004700b
|
||||||
RTC_IRQP_SET = 0x8004700c
|
RTC_IRQP_SET = 0x8004700c
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
RTC_PIE_OFF = 0x20007006
|
||||||
RTC_PIE_ON = 0x20007005
|
RTC_PIE_ON = 0x20007005
|
||||||
RTC_PLL_GET = 0x401c7011
|
RTC_PLL_GET = 0x401c7011
|
||||||
|
@ -295,7 +273,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -312,7 +289,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x11
|
SO_PASSCRED = 0x11
|
||||||
|
@ -329,7 +305,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x1006
|
SO_RCVTIMEO = 0x1006
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x1006
|
SO_RCVTIMEO_OLD = 0x1006
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x4
|
SO_REUSEADDR = 0x4
|
||||||
SO_REUSEPORT = 0x200
|
SO_REUSEPORT = 0x200
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -1,885 +0,0 @@
|
||||||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
|
||||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
|
||||||
|
|
||||||
//go:build ppc && linux
|
|
||||||
// +build ppc,linux
|
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
|
||||||
|
|
||||||
package unix
|
|
||||||
|
|
||||||
import "syscall"
|
|
||||||
|
|
||||||
const (
|
|
||||||
B1000000 = 0x17
|
|
||||||
B115200 = 0x11
|
|
||||||
B1152000 = 0x18
|
|
||||||
B1500000 = 0x19
|
|
||||||
B2000000 = 0x1a
|
|
||||||
B230400 = 0x12
|
|
||||||
B2500000 = 0x1b
|
|
||||||
B3000000 = 0x1c
|
|
||||||
B3500000 = 0x1d
|
|
||||||
B4000000 = 0x1e
|
|
||||||
B460800 = 0x13
|
|
||||||
B500000 = 0x14
|
|
||||||
B57600 = 0x10
|
|
||||||
B576000 = 0x15
|
|
||||||
B921600 = 0x16
|
|
||||||
BLKBSZGET = 0x40041270
|
|
||||||
BLKBSZSET = 0x80041271
|
|
||||||
BLKFLSBUF = 0x20001261
|
|
||||||
BLKFRAGET = 0x20001265
|
|
||||||
BLKFRASET = 0x20001264
|
|
||||||
BLKGETSIZE = 0x20001260
|
|
||||||
BLKGETSIZE64 = 0x40041272
|
|
||||||
BLKPBSZGET = 0x2000127b
|
|
||||||
BLKRAGET = 0x20001263
|
|
||||||
BLKRASET = 0x20001262
|
|
||||||
BLKROGET = 0x2000125e
|
|
||||||
BLKROSET = 0x2000125d
|
|
||||||
BLKRRPART = 0x2000125f
|
|
||||||
BLKSECTGET = 0x20001267
|
|
||||||
BLKSECTSET = 0x20001266
|
|
||||||
BLKSSZGET = 0x20001268
|
|
||||||
BOTHER = 0x1f
|
|
||||||
BS1 = 0x8000
|
|
||||||
BSDLY = 0x8000
|
|
||||||
CBAUD = 0xff
|
|
||||||
CBAUDEX = 0x0
|
|
||||||
CIBAUD = 0xff0000
|
|
||||||
CLOCAL = 0x8000
|
|
||||||
CR1 = 0x1000
|
|
||||||
CR2 = 0x2000
|
|
||||||
CR3 = 0x3000
|
|
||||||
CRDLY = 0x3000
|
|
||||||
CREAD = 0x800
|
|
||||||
CS6 = 0x100
|
|
||||||
CS7 = 0x200
|
|
||||||
CS8 = 0x300
|
|
||||||
CSIZE = 0x300
|
|
||||||
CSTOPB = 0x400
|
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x40
|
|
||||||
ECHOE = 0x2
|
|
||||||
ECHOK = 0x4
|
|
||||||
ECHOKE = 0x1
|
|
||||||
ECHONL = 0x10
|
|
||||||
ECHOPRT = 0x20
|
|
||||||
EFD_CLOEXEC = 0x80000
|
|
||||||
EFD_NONBLOCK = 0x800
|
|
||||||
EPOLL_CLOEXEC = 0x80000
|
|
||||||
EXTPROC = 0x10000000
|
|
||||||
FF1 = 0x4000
|
|
||||||
FFDLY = 0x4000
|
|
||||||
FICLONE = 0x80049409
|
|
||||||
FICLONERANGE = 0x8020940d
|
|
||||||
FLUSHO = 0x800000
|
|
||||||
FS_IOC_ENABLE_VERITY = 0x80806685
|
|
||||||
FS_IOC_GETFLAGS = 0x40046601
|
|
||||||
FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
|
|
||||||
FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
|
|
||||||
FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
|
|
||||||
FS_IOC_SETFLAGS = 0x80046602
|
|
||||||
FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
|
|
||||||
F_GETLK = 0xc
|
|
||||||
F_GETLK64 = 0xc
|
|
||||||
F_GETOWN = 0x9
|
|
||||||
F_RDLCK = 0x0
|
|
||||||
F_SETLK = 0xd
|
|
||||||
F_SETLK64 = 0xd
|
|
||||||
F_SETLKW = 0xe
|
|
||||||
F_SETLKW64 = 0xe
|
|
||||||
F_SETOWN = 0x8
|
|
||||||
F_UNLCK = 0x2
|
|
||||||
F_WRLCK = 0x1
|
|
||||||
HIDIOCGRAWINFO = 0x40084803
|
|
||||||
HIDIOCGRDESC = 0x50044802
|
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
|
||||||
HUPCL = 0x4000
|
|
||||||
ICANON = 0x100
|
|
||||||
IEXTEN = 0x400
|
|
||||||
IN_CLOEXEC = 0x80000
|
|
||||||
IN_NONBLOCK = 0x800
|
|
||||||
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
|
|
||||||
ISIG = 0x80
|
|
||||||
IUCLC = 0x1000
|
|
||||||
IXOFF = 0x400
|
|
||||||
IXON = 0x200
|
|
||||||
MAP_ANON = 0x20
|
|
||||||
MAP_ANONYMOUS = 0x20
|
|
||||||
MAP_DENYWRITE = 0x800
|
|
||||||
MAP_EXECUTABLE = 0x1000
|
|
||||||
MAP_GROWSDOWN = 0x100
|
|
||||||
MAP_HUGETLB = 0x40000
|
|
||||||
MAP_LOCKED = 0x80
|
|
||||||
MAP_NONBLOCK = 0x10000
|
|
||||||
MAP_NORESERVE = 0x40
|
|
||||||
MAP_POPULATE = 0x8000
|
|
||||||
MAP_STACK = 0x20000
|
|
||||||
MAP_SYNC = 0x80000
|
|
||||||
MCL_CURRENT = 0x2000
|
|
||||||
MCL_FUTURE = 0x4000
|
|
||||||
MCL_ONFAULT = 0x8000
|
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc00c4d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc00c4d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x20
|
|
||||||
NL2 = 0x200
|
|
||||||
NL3 = 0x300
|
|
||||||
NLDLY = 0x300
|
|
||||||
NOFLSH = 0x80000000
|
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
|
||||||
NS_GET_PARENT = 0x2000b702
|
|
||||||
NS_GET_USERNS = 0x2000b701
|
|
||||||
OLCUC = 0x4
|
|
||||||
ONLCR = 0x2
|
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x400
|
|
||||||
O_ASYNC = 0x2000
|
|
||||||
O_CLOEXEC = 0x80000
|
|
||||||
O_CREAT = 0x40
|
|
||||||
O_DIRECT = 0x20000
|
|
||||||
O_DIRECTORY = 0x4000
|
|
||||||
O_DSYNC = 0x1000
|
|
||||||
O_EXCL = 0x80
|
|
||||||
O_FSYNC = 0x101000
|
|
||||||
O_LARGEFILE = 0x10000
|
|
||||||
O_NDELAY = 0x800
|
|
||||||
O_NOATIME = 0x40000
|
|
||||||
O_NOCTTY = 0x100
|
|
||||||
O_NOFOLLOW = 0x8000
|
|
||||||
O_NONBLOCK = 0x800
|
|
||||||
O_PATH = 0x200000
|
|
||||||
O_RSYNC = 0x101000
|
|
||||||
O_SYNC = 0x101000
|
|
||||||
O_TMPFILE = 0x404000
|
|
||||||
O_TRUNC = 0x200
|
|
||||||
PARENB = 0x1000
|
|
||||||
PARODD = 0x2000
|
|
||||||
PENDIN = 0x20000000
|
|
||||||
PERF_EVENT_IOC_DISABLE = 0x20002401
|
|
||||||
PERF_EVENT_IOC_ENABLE = 0x20002400
|
|
||||||
PERF_EVENT_IOC_ID = 0x40042407
|
|
||||||
PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
|
|
||||||
PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
|
|
||||||
PERF_EVENT_IOC_PERIOD = 0x80082404
|
|
||||||
PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
|
|
||||||
PERF_EVENT_IOC_REFRESH = 0x20002402
|
|
||||||
PERF_EVENT_IOC_RESET = 0x20002403
|
|
||||||
PERF_EVENT_IOC_SET_BPF = 0x80042408
|
|
||||||
PERF_EVENT_IOC_SET_FILTER = 0x80042406
|
|
||||||
PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
|
|
||||||
PPPIOCATTACH = 0x8004743d
|
|
||||||
PPPIOCATTCHAN = 0x80047438
|
|
||||||
PPPIOCBRIDGECHAN = 0x80047435
|
|
||||||
PPPIOCCONNECT = 0x8004743a
|
|
||||||
PPPIOCDETACH = 0x8004743c
|
|
||||||
PPPIOCDISCONN = 0x20007439
|
|
||||||
PPPIOCGASYNCMAP = 0x40047458
|
|
||||||
PPPIOCGCHAN = 0x40047437
|
|
||||||
PPPIOCGDEBUG = 0x40047441
|
|
||||||
PPPIOCGFLAGS = 0x4004745a
|
|
||||||
PPPIOCGIDLE = 0x4008743f
|
|
||||||
PPPIOCGIDLE32 = 0x4008743f
|
|
||||||
PPPIOCGIDLE64 = 0x4010743f
|
|
||||||
PPPIOCGL2TPSTATS = 0x40487436
|
|
||||||
PPPIOCGMRU = 0x40047453
|
|
||||||
PPPIOCGRASYNCMAP = 0x40047455
|
|
||||||
PPPIOCGUNIT = 0x40047456
|
|
||||||
PPPIOCGXASYNCMAP = 0x40207450
|
|
||||||
PPPIOCSACTIVE = 0x80087446
|
|
||||||
PPPIOCSASYNCMAP = 0x80047457
|
|
||||||
PPPIOCSCOMPRESS = 0x800c744d
|
|
||||||
PPPIOCSDEBUG = 0x80047440
|
|
||||||
PPPIOCSFLAGS = 0x80047459
|
|
||||||
PPPIOCSMAXCID = 0x80047451
|
|
||||||
PPPIOCSMRRU = 0x8004743b
|
|
||||||
PPPIOCSMRU = 0x80047452
|
|
||||||
PPPIOCSNPMODE = 0x8008744b
|
|
||||||
PPPIOCSPASS = 0x80087447
|
|
||||||
PPPIOCSRASYNCMAP = 0x80047454
|
|
||||||
PPPIOCSXASYNCMAP = 0x8020744f
|
|
||||||
PPPIOCUNBRIDGECHAN = 0x20007434
|
|
||||||
PPPIOCXFERUNIT = 0x2000744e
|
|
||||||
PROT_SAO = 0x10
|
|
||||||
PR_SET_PTRACER_ANY = 0xffffffff
|
|
||||||
PTRACE_GETEVRREGS = 0x14
|
|
||||||
PTRACE_GETFPREGS = 0xe
|
|
||||||
PTRACE_GETREGS64 = 0x16
|
|
||||||
PTRACE_GETVRREGS = 0x12
|
|
||||||
PTRACE_GETVSRREGS = 0x1b
|
|
||||||
PTRACE_GET_DEBUGREG = 0x19
|
|
||||||
PTRACE_SETEVRREGS = 0x15
|
|
||||||
PTRACE_SETFPREGS = 0xf
|
|
||||||
PTRACE_SETREGS64 = 0x17
|
|
||||||
PTRACE_SETVRREGS = 0x13
|
|
||||||
PTRACE_SETVSRREGS = 0x1c
|
|
||||||
PTRACE_SET_DEBUGREG = 0x1a
|
|
||||||
PTRACE_SINGLEBLOCK = 0x100
|
|
||||||
PTRACE_SYSEMU = 0x1d
|
|
||||||
PTRACE_SYSEMU_SINGLESTEP = 0x1e
|
|
||||||
PT_CCR = 0x26
|
|
||||||
PT_CTR = 0x23
|
|
||||||
PT_DAR = 0x29
|
|
||||||
PT_DSCR = 0x2c
|
|
||||||
PT_DSISR = 0x2a
|
|
||||||
PT_FPR0 = 0x30
|
|
||||||
PT_FPR31 = 0x6e
|
|
||||||
PT_FPSCR = 0x71
|
|
||||||
PT_LNK = 0x24
|
|
||||||
PT_MQ = 0x27
|
|
||||||
PT_MSR = 0x21
|
|
||||||
PT_NIP = 0x20
|
|
||||||
PT_ORIG_R3 = 0x22
|
|
||||||
PT_R0 = 0x0
|
|
||||||
PT_R1 = 0x1
|
|
||||||
PT_R10 = 0xa
|
|
||||||
PT_R11 = 0xb
|
|
||||||
PT_R12 = 0xc
|
|
||||||
PT_R13 = 0xd
|
|
||||||
PT_R14 = 0xe
|
|
||||||
PT_R15 = 0xf
|
|
||||||
PT_R16 = 0x10
|
|
||||||
PT_R17 = 0x11
|
|
||||||
PT_R18 = 0x12
|
|
||||||
PT_R19 = 0x13
|
|
||||||
PT_R2 = 0x2
|
|
||||||
PT_R20 = 0x14
|
|
||||||
PT_R21 = 0x15
|
|
||||||
PT_R22 = 0x16
|
|
||||||
PT_R23 = 0x17
|
|
||||||
PT_R24 = 0x18
|
|
||||||
PT_R25 = 0x19
|
|
||||||
PT_R26 = 0x1a
|
|
||||||
PT_R27 = 0x1b
|
|
||||||
PT_R28 = 0x1c
|
|
||||||
PT_R29 = 0x1d
|
|
||||||
PT_R3 = 0x3
|
|
||||||
PT_R30 = 0x1e
|
|
||||||
PT_R31 = 0x1f
|
|
||||||
PT_R4 = 0x4
|
|
||||||
PT_R5 = 0x5
|
|
||||||
PT_R6 = 0x6
|
|
||||||
PT_R7 = 0x7
|
|
||||||
PT_R8 = 0x8
|
|
||||||
PT_R9 = 0x9
|
|
||||||
PT_REGS_COUNT = 0x2c
|
|
||||||
PT_RESULT = 0x2b
|
|
||||||
PT_TRAP = 0x28
|
|
||||||
PT_XER = 0x25
|
|
||||||
RLIMIT_AS = 0x9
|
|
||||||
RLIMIT_MEMLOCK = 0x8
|
|
||||||
RLIMIT_NOFILE = 0x7
|
|
||||||
RLIMIT_NPROC = 0x6
|
|
||||||
RLIMIT_RSS = 0x5
|
|
||||||
RNDADDENTROPY = 0x80085203
|
|
||||||
RNDADDTOENTCNT = 0x80045201
|
|
||||||
RNDCLEARPOOL = 0x20005206
|
|
||||||
RNDGETENTCNT = 0x40045200
|
|
||||||
RNDGETPOOL = 0x40085202
|
|
||||||
RNDRESEEDCRNG = 0x20005207
|
|
||||||
RNDZAPENTCNT = 0x20005204
|
|
||||||
RTC_AIE_OFF = 0x20007002
|
|
||||||
RTC_AIE_ON = 0x20007001
|
|
||||||
RTC_ALM_READ = 0x40247008
|
|
||||||
RTC_ALM_SET = 0x80247007
|
|
||||||
RTC_EPOCH_READ = 0x4004700d
|
|
||||||
RTC_EPOCH_SET = 0x8004700e
|
|
||||||
RTC_IRQP_READ = 0x4004700b
|
|
||||||
RTC_IRQP_SET = 0x8004700c
|
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
|
||||||
RTC_PIE_ON = 0x20007005
|
|
||||||
RTC_PLL_GET = 0x401c7011
|
|
||||||
RTC_PLL_SET = 0x801c7012
|
|
||||||
RTC_RD_TIME = 0x40247009
|
|
||||||
RTC_SET_TIME = 0x8024700a
|
|
||||||
RTC_UIE_OFF = 0x20007004
|
|
||||||
RTC_UIE_ON = 0x20007003
|
|
||||||
RTC_VL_CLR = 0x20007014
|
|
||||||
RTC_VL_READ = 0x40047013
|
|
||||||
RTC_WIE_OFF = 0x20007010
|
|
||||||
RTC_WIE_ON = 0x2000700f
|
|
||||||
RTC_WKALM_RD = 0x40287010
|
|
||||||
RTC_WKALM_SET = 0x8028700f
|
|
||||||
SCM_TIMESTAMPING = 0x25
|
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
|
||||||
SCM_TIMESTAMPNS = 0x23
|
|
||||||
SCM_TXTIME = 0x3d
|
|
||||||
SCM_WIFI_STATUS = 0x29
|
|
||||||
SFD_CLOEXEC = 0x80000
|
|
||||||
SFD_NONBLOCK = 0x800
|
|
||||||
SIOCATMARK = 0x8905
|
|
||||||
SIOCGPGRP = 0x8904
|
|
||||||
SIOCGSTAMPNS_NEW = 0x40108907
|
|
||||||
SIOCGSTAMP_NEW = 0x40108906
|
|
||||||
SIOCINQ = 0x4004667f
|
|
||||||
SIOCOUTQ = 0x40047473
|
|
||||||
SIOCSPGRP = 0x8902
|
|
||||||
SOCK_CLOEXEC = 0x80000
|
|
||||||
SOCK_DGRAM = 0x2
|
|
||||||
SOCK_NONBLOCK = 0x800
|
|
||||||
SOCK_STREAM = 0x1
|
|
||||||
SOL_SOCKET = 0x1
|
|
||||||
SO_ACCEPTCONN = 0x1e
|
|
||||||
SO_ATTACH_BPF = 0x32
|
|
||||||
SO_ATTACH_REUSEPORT_CBPF = 0x33
|
|
||||||
SO_ATTACH_REUSEPORT_EBPF = 0x34
|
|
||||||
SO_BINDTODEVICE = 0x19
|
|
||||||
SO_BINDTOIFINDEX = 0x3e
|
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
|
||||||
SO_BROADCAST = 0x6
|
|
||||||
SO_BSDCOMPAT = 0xe
|
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
|
||||||
SO_CNX_ADVICE = 0x35
|
|
||||||
SO_COOKIE = 0x39
|
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
|
||||||
SO_DOMAIN = 0x27
|
|
||||||
SO_DONTROUTE = 0x5
|
|
||||||
SO_ERROR = 0x4
|
|
||||||
SO_INCOMING_CPU = 0x31
|
|
||||||
SO_INCOMING_NAPI_ID = 0x38
|
|
||||||
SO_KEEPALIVE = 0x9
|
|
||||||
SO_LINGER = 0xd
|
|
||||||
SO_LOCK_FILTER = 0x2c
|
|
||||||
SO_MARK = 0x24
|
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
|
||||||
SO_MEMINFO = 0x37
|
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
|
||||||
SO_OOBINLINE = 0xa
|
|
||||||
SO_PASSCRED = 0x14
|
|
||||||
SO_PASSSEC = 0x22
|
|
||||||
SO_PEEK_OFF = 0x2a
|
|
||||||
SO_PEERCRED = 0x15
|
|
||||||
SO_PEERGROUPS = 0x3b
|
|
||||||
SO_PEERSEC = 0x1f
|
|
||||||
SO_PREFER_BUSY_POLL = 0x45
|
|
||||||
SO_PROTOCOL = 0x26
|
|
||||||
SO_RCVBUF = 0x8
|
|
||||||
SO_RCVBUFFORCE = 0x21
|
|
||||||
SO_RCVLOWAT = 0x10
|
|
||||||
SO_RCVTIMEO = 0x12
|
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
|
||||||
SO_RCVTIMEO_OLD = 0x12
|
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
|
||||||
SO_REUSEPORT = 0xf
|
|
||||||
SO_RXQ_OVFL = 0x28
|
|
||||||
SO_SECURITY_AUTHENTICATION = 0x16
|
|
||||||
SO_SECURITY_ENCRYPTION_NETWORK = 0x18
|
|
||||||
SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
|
|
||||||
SO_SELECT_ERR_QUEUE = 0x2d
|
|
||||||
SO_SNDBUF = 0x7
|
|
||||||
SO_SNDBUFFORCE = 0x20
|
|
||||||
SO_SNDLOWAT = 0x11
|
|
||||||
SO_SNDTIMEO = 0x13
|
|
||||||
SO_SNDTIMEO_NEW = 0x43
|
|
||||||
SO_SNDTIMEO_OLD = 0x13
|
|
||||||
SO_TIMESTAMPING = 0x25
|
|
||||||
SO_TIMESTAMPING_NEW = 0x41
|
|
||||||
SO_TIMESTAMPING_OLD = 0x25
|
|
||||||
SO_TIMESTAMPNS = 0x23
|
|
||||||
SO_TIMESTAMPNS_NEW = 0x40
|
|
||||||
SO_TIMESTAMPNS_OLD = 0x23
|
|
||||||
SO_TIMESTAMP_NEW = 0x3f
|
|
||||||
SO_TXTIME = 0x3d
|
|
||||||
SO_TYPE = 0x3
|
|
||||||
SO_WIFI_STATUS = 0x29
|
|
||||||
SO_ZEROCOPY = 0x3c
|
|
||||||
TAB1 = 0x400
|
|
||||||
TAB2 = 0x800
|
|
||||||
TAB3 = 0xc00
|
|
||||||
TABDLY = 0xc00
|
|
||||||
TCFLSH = 0x2000741f
|
|
||||||
TCGETA = 0x40147417
|
|
||||||
TCGETS = 0x402c7413
|
|
||||||
TCSAFLUSH = 0x2
|
|
||||||
TCSBRK = 0x2000741d
|
|
||||||
TCSBRKP = 0x5425
|
|
||||||
TCSETA = 0x80147418
|
|
||||||
TCSETAF = 0x8014741c
|
|
||||||
TCSETAW = 0x80147419
|
|
||||||
TCSETS = 0x802c7414
|
|
||||||
TCSETSF = 0x802c7416
|
|
||||||
TCSETSW = 0x802c7415
|
|
||||||
TCXONC = 0x2000741e
|
|
||||||
TFD_CLOEXEC = 0x80000
|
|
||||||
TFD_NONBLOCK = 0x800
|
|
||||||
TIOCCBRK = 0x5428
|
|
||||||
TIOCCONS = 0x541d
|
|
||||||
TIOCEXCL = 0x540c
|
|
||||||
TIOCGDEV = 0x40045432
|
|
||||||
TIOCGETC = 0x40067412
|
|
||||||
TIOCGETD = 0x5424
|
|
||||||
TIOCGETP = 0x40067408
|
|
||||||
TIOCGEXCL = 0x40045440
|
|
||||||
TIOCGICOUNT = 0x545d
|
|
||||||
TIOCGISO7816 = 0x40285442
|
|
||||||
TIOCGLCKTRMIOS = 0x5456
|
|
||||||
TIOCGLTC = 0x40067474
|
|
||||||
TIOCGPGRP = 0x40047477
|
|
||||||
TIOCGPKT = 0x40045438
|
|
||||||
TIOCGPTLCK = 0x40045439
|
|
||||||
TIOCGPTN = 0x40045430
|
|
||||||
TIOCGPTPEER = 0x20005441
|
|
||||||
TIOCGRS485 = 0x542e
|
|
||||||
TIOCGSERIAL = 0x541e
|
|
||||||
TIOCGSID = 0x5429
|
|
||||||
TIOCGSOFTCAR = 0x5419
|
|
||||||
TIOCGWINSZ = 0x40087468
|
|
||||||
TIOCINQ = 0x4004667f
|
|
||||||
TIOCLINUX = 0x541c
|
|
||||||
TIOCMBIC = 0x5417
|
|
||||||
TIOCMBIS = 0x5416
|
|
||||||
TIOCMGET = 0x5415
|
|
||||||
TIOCMIWAIT = 0x545c
|
|
||||||
TIOCMSET = 0x5418
|
|
||||||
TIOCM_CAR = 0x40
|
|
||||||
TIOCM_CD = 0x40
|
|
||||||
TIOCM_CTS = 0x20
|
|
||||||
TIOCM_DSR = 0x100
|
|
||||||
TIOCM_LOOP = 0x8000
|
|
||||||
TIOCM_OUT1 = 0x2000
|
|
||||||
TIOCM_OUT2 = 0x4000
|
|
||||||
TIOCM_RI = 0x80
|
|
||||||
TIOCM_RNG = 0x80
|
|
||||||
TIOCM_SR = 0x10
|
|
||||||
TIOCM_ST = 0x8
|
|
||||||
TIOCNOTTY = 0x5422
|
|
||||||
TIOCNXCL = 0x540d
|
|
||||||
TIOCOUTQ = 0x40047473
|
|
||||||
TIOCPKT = 0x5420
|
|
||||||
TIOCSBRK = 0x5427
|
|
||||||
TIOCSCTTY = 0x540e
|
|
||||||
TIOCSERCONFIG = 0x5453
|
|
||||||
TIOCSERGETLSR = 0x5459
|
|
||||||
TIOCSERGETMULTI = 0x545a
|
|
||||||
TIOCSERGSTRUCT = 0x5458
|
|
||||||
TIOCSERGWILD = 0x5454
|
|
||||||
TIOCSERSETMULTI = 0x545b
|
|
||||||
TIOCSERSWILD = 0x5455
|
|
||||||
TIOCSER_TEMT = 0x1
|
|
||||||
TIOCSETC = 0x80067411
|
|
||||||
TIOCSETD = 0x5423
|
|
||||||
TIOCSETN = 0x8006740a
|
|
||||||
TIOCSETP = 0x80067409
|
|
||||||
TIOCSIG = 0x80045436
|
|
||||||
TIOCSISO7816 = 0xc0285443
|
|
||||||
TIOCSLCKTRMIOS = 0x5457
|
|
||||||
TIOCSLTC = 0x80067475
|
|
||||||
TIOCSPGRP = 0x80047476
|
|
||||||
TIOCSPTLCK = 0x80045431
|
|
||||||
TIOCSRS485 = 0x542f
|
|
||||||
TIOCSSERIAL = 0x541f
|
|
||||||
TIOCSSOFTCAR = 0x541a
|
|
||||||
TIOCSTART = 0x2000746e
|
|
||||||
TIOCSTI = 0x5412
|
|
||||||
TIOCSTOP = 0x2000746f
|
|
||||||
TIOCSWINSZ = 0x80087467
|
|
||||||
TIOCVHANGUP = 0x5437
|
|
||||||
TOSTOP = 0x400000
|
|
||||||
TUNATTACHFILTER = 0x800854d5
|
|
||||||
TUNDETACHFILTER = 0x800854d6
|
|
||||||
TUNGETDEVNETNS = 0x200054e3
|
|
||||||
TUNGETFEATURES = 0x400454cf
|
|
||||||
TUNGETFILTER = 0x400854db
|
|
||||||
TUNGETIFF = 0x400454d2
|
|
||||||
TUNGETSNDBUF = 0x400454d3
|
|
||||||
TUNGETVNETBE = 0x400454df
|
|
||||||
TUNGETVNETHDRSZ = 0x400454d7
|
|
||||||
TUNGETVNETLE = 0x400454dd
|
|
||||||
TUNSETCARRIER = 0x800454e2
|
|
||||||
TUNSETDEBUG = 0x800454c9
|
|
||||||
TUNSETFILTEREBPF = 0x400454e1
|
|
||||||
TUNSETGROUP = 0x800454ce
|
|
||||||
TUNSETIFF = 0x800454ca
|
|
||||||
TUNSETIFINDEX = 0x800454da
|
|
||||||
TUNSETLINK = 0x800454cd
|
|
||||||
TUNSETNOCSUM = 0x800454c8
|
|
||||||
TUNSETOFFLOAD = 0x800454d0
|
|
||||||
TUNSETOWNER = 0x800454cc
|
|
||||||
TUNSETPERSIST = 0x800454cb
|
|
||||||
TUNSETQUEUE = 0x800454d9
|
|
||||||
TUNSETSNDBUF = 0x800454d4
|
|
||||||
TUNSETSTEERINGEBPF = 0x400454e0
|
|
||||||
TUNSETTXFILTER = 0x800454d1
|
|
||||||
TUNSETVNETBE = 0x800454de
|
|
||||||
TUNSETVNETHDRSZ = 0x800454d8
|
|
||||||
TUNSETVNETLE = 0x800454dc
|
|
||||||
UBI_IOCATT = 0x80186f40
|
|
||||||
UBI_IOCDET = 0x80046f41
|
|
||||||
UBI_IOCEBCH = 0x80044f02
|
|
||||||
UBI_IOCEBER = 0x80044f01
|
|
||||||
UBI_IOCEBISMAP = 0x40044f05
|
|
||||||
UBI_IOCEBMAP = 0x80084f03
|
|
||||||
UBI_IOCEBUNMAP = 0x80044f04
|
|
||||||
UBI_IOCMKVOL = 0x80986f00
|
|
||||||
UBI_IOCRMVOL = 0x80046f01
|
|
||||||
UBI_IOCRNVOL = 0x91106f03
|
|
||||||
UBI_IOCRPEB = 0x80046f04
|
|
||||||
UBI_IOCRSVOL = 0x800c6f02
|
|
||||||
UBI_IOCSETVOLPROP = 0x80104f06
|
|
||||||
UBI_IOCSPEB = 0x80046f05
|
|
||||||
UBI_IOCVOLCRBLK = 0x80804f07
|
|
||||||
UBI_IOCVOLRMBLK = 0x20004f08
|
|
||||||
UBI_IOCVOLUP = 0x80084f00
|
|
||||||
VDISCARD = 0x10
|
|
||||||
VEOF = 0x4
|
|
||||||
VEOL = 0x6
|
|
||||||
VEOL2 = 0x8
|
|
||||||
VMIN = 0x5
|
|
||||||
VREPRINT = 0xb
|
|
||||||
VSTART = 0xd
|
|
||||||
VSTOP = 0xe
|
|
||||||
VSUSP = 0xc
|
|
||||||
VSWTC = 0x9
|
|
||||||
VT1 = 0x10000
|
|
||||||
VTDLY = 0x10000
|
|
||||||
VTIME = 0x7
|
|
||||||
VWERASE = 0xa
|
|
||||||
WDIOC_GETBOOTSTATUS = 0x40045702
|
|
||||||
WDIOC_GETPRETIMEOUT = 0x40045709
|
|
||||||
WDIOC_GETSTATUS = 0x40045701
|
|
||||||
WDIOC_GETSUPPORT = 0x40285700
|
|
||||||
WDIOC_GETTEMP = 0x40045703
|
|
||||||
WDIOC_GETTIMELEFT = 0x4004570a
|
|
||||||
WDIOC_GETTIMEOUT = 0x40045707
|
|
||||||
WDIOC_KEEPALIVE = 0x40045705
|
|
||||||
WDIOC_SETOPTIONS = 0x40045704
|
|
||||||
WORDSIZE = 0x20
|
|
||||||
XCASE = 0x4000
|
|
||||||
XTABS = 0xc00
|
|
||||||
_HIDIOCGRAWNAME = 0x40804804
|
|
||||||
_HIDIOCGRAWPHYS = 0x40404805
|
|
||||||
_HIDIOCGRAWUNIQ = 0x40404808
|
|
||||||
)
|
|
||||||
|
|
||||||
// Errors
|
|
||||||
const (
|
|
||||||
EADDRINUSE = syscall.Errno(0x62)
|
|
||||||
EADDRNOTAVAIL = syscall.Errno(0x63)
|
|
||||||
EADV = syscall.Errno(0x44)
|
|
||||||
EAFNOSUPPORT = syscall.Errno(0x61)
|
|
||||||
EALREADY = syscall.Errno(0x72)
|
|
||||||
EBADE = syscall.Errno(0x34)
|
|
||||||
EBADFD = syscall.Errno(0x4d)
|
|
||||||
EBADMSG = syscall.Errno(0x4a)
|
|
||||||
EBADR = syscall.Errno(0x35)
|
|
||||||
EBADRQC = syscall.Errno(0x38)
|
|
||||||
EBADSLT = syscall.Errno(0x39)
|
|
||||||
EBFONT = syscall.Errno(0x3b)
|
|
||||||
ECANCELED = syscall.Errno(0x7d)
|
|
||||||
ECHRNG = syscall.Errno(0x2c)
|
|
||||||
ECOMM = syscall.Errno(0x46)
|
|
||||||
ECONNABORTED = syscall.Errno(0x67)
|
|
||||||
ECONNREFUSED = syscall.Errno(0x6f)
|
|
||||||
ECONNRESET = syscall.Errno(0x68)
|
|
||||||
EDEADLK = syscall.Errno(0x23)
|
|
||||||
EDEADLOCK = syscall.Errno(0x3a)
|
|
||||||
EDESTADDRREQ = syscall.Errno(0x59)
|
|
||||||
EDOTDOT = syscall.Errno(0x49)
|
|
||||||
EDQUOT = syscall.Errno(0x7a)
|
|
||||||
EHOSTDOWN = syscall.Errno(0x70)
|
|
||||||
EHOSTUNREACH = syscall.Errno(0x71)
|
|
||||||
EHWPOISON = syscall.Errno(0x85)
|
|
||||||
EIDRM = syscall.Errno(0x2b)
|
|
||||||
EILSEQ = syscall.Errno(0x54)
|
|
||||||
EINPROGRESS = syscall.Errno(0x73)
|
|
||||||
EISCONN = syscall.Errno(0x6a)
|
|
||||||
EISNAM = syscall.Errno(0x78)
|
|
||||||
EKEYEXPIRED = syscall.Errno(0x7f)
|
|
||||||
EKEYREJECTED = syscall.Errno(0x81)
|
|
||||||
EKEYREVOKED = syscall.Errno(0x80)
|
|
||||||
EL2HLT = syscall.Errno(0x33)
|
|
||||||
EL2NSYNC = syscall.Errno(0x2d)
|
|
||||||
EL3HLT = syscall.Errno(0x2e)
|
|
||||||
EL3RST = syscall.Errno(0x2f)
|
|
||||||
ELIBACC = syscall.Errno(0x4f)
|
|
||||||
ELIBBAD = syscall.Errno(0x50)
|
|
||||||
ELIBEXEC = syscall.Errno(0x53)
|
|
||||||
ELIBMAX = syscall.Errno(0x52)
|
|
||||||
ELIBSCN = syscall.Errno(0x51)
|
|
||||||
ELNRNG = syscall.Errno(0x30)
|
|
||||||
ELOOP = syscall.Errno(0x28)
|
|
||||||
EMEDIUMTYPE = syscall.Errno(0x7c)
|
|
||||||
EMSGSIZE = syscall.Errno(0x5a)
|
|
||||||
EMULTIHOP = syscall.Errno(0x48)
|
|
||||||
ENAMETOOLONG = syscall.Errno(0x24)
|
|
||||||
ENAVAIL = syscall.Errno(0x77)
|
|
||||||
ENETDOWN = syscall.Errno(0x64)
|
|
||||||
ENETRESET = syscall.Errno(0x66)
|
|
||||||
ENETUNREACH = syscall.Errno(0x65)
|
|
||||||
ENOANO = syscall.Errno(0x37)
|
|
||||||
ENOBUFS = syscall.Errno(0x69)
|
|
||||||
ENOCSI = syscall.Errno(0x32)
|
|
||||||
ENODATA = syscall.Errno(0x3d)
|
|
||||||
ENOKEY = syscall.Errno(0x7e)
|
|
||||||
ENOLCK = syscall.Errno(0x25)
|
|
||||||
ENOLINK = syscall.Errno(0x43)
|
|
||||||
ENOMEDIUM = syscall.Errno(0x7b)
|
|
||||||
ENOMSG = syscall.Errno(0x2a)
|
|
||||||
ENONET = syscall.Errno(0x40)
|
|
||||||
ENOPKG = syscall.Errno(0x41)
|
|
||||||
ENOPROTOOPT = syscall.Errno(0x5c)
|
|
||||||
ENOSR = syscall.Errno(0x3f)
|
|
||||||
ENOSTR = syscall.Errno(0x3c)
|
|
||||||
ENOSYS = syscall.Errno(0x26)
|
|
||||||
ENOTCONN = syscall.Errno(0x6b)
|
|
||||||
ENOTEMPTY = syscall.Errno(0x27)
|
|
||||||
ENOTNAM = syscall.Errno(0x76)
|
|
||||||
ENOTRECOVERABLE = syscall.Errno(0x83)
|
|
||||||
ENOTSOCK = syscall.Errno(0x58)
|
|
||||||
ENOTSUP = syscall.Errno(0x5f)
|
|
||||||
ENOTUNIQ = syscall.Errno(0x4c)
|
|
||||||
EOPNOTSUPP = syscall.Errno(0x5f)
|
|
||||||
EOVERFLOW = syscall.Errno(0x4b)
|
|
||||||
EOWNERDEAD = syscall.Errno(0x82)
|
|
||||||
EPFNOSUPPORT = syscall.Errno(0x60)
|
|
||||||
EPROTO = syscall.Errno(0x47)
|
|
||||||
EPROTONOSUPPORT = syscall.Errno(0x5d)
|
|
||||||
EPROTOTYPE = syscall.Errno(0x5b)
|
|
||||||
EREMCHG = syscall.Errno(0x4e)
|
|
||||||
EREMOTE = syscall.Errno(0x42)
|
|
||||||
EREMOTEIO = syscall.Errno(0x79)
|
|
||||||
ERESTART = syscall.Errno(0x55)
|
|
||||||
ERFKILL = syscall.Errno(0x84)
|
|
||||||
ESHUTDOWN = syscall.Errno(0x6c)
|
|
||||||
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
|
|
||||||
ESRMNT = syscall.Errno(0x45)
|
|
||||||
ESTALE = syscall.Errno(0x74)
|
|
||||||
ESTRPIPE = syscall.Errno(0x56)
|
|
||||||
ETIME = syscall.Errno(0x3e)
|
|
||||||
ETIMEDOUT = syscall.Errno(0x6e)
|
|
||||||
ETOOMANYREFS = syscall.Errno(0x6d)
|
|
||||||
EUCLEAN = syscall.Errno(0x75)
|
|
||||||
EUNATCH = syscall.Errno(0x31)
|
|
||||||
EUSERS = syscall.Errno(0x57)
|
|
||||||
EXFULL = syscall.Errno(0x36)
|
|
||||||
)
|
|
||||||
|
|
||||||
// Signals
|
|
||||||
const (
|
|
||||||
SIGBUS = syscall.Signal(0x7)
|
|
||||||
SIGCHLD = syscall.Signal(0x11)
|
|
||||||
SIGCLD = syscall.Signal(0x11)
|
|
||||||
SIGCONT = syscall.Signal(0x12)
|
|
||||||
SIGIO = syscall.Signal(0x1d)
|
|
||||||
SIGPOLL = syscall.Signal(0x1d)
|
|
||||||
SIGPROF = syscall.Signal(0x1b)
|
|
||||||
SIGPWR = syscall.Signal(0x1e)
|
|
||||||
SIGSTKFLT = syscall.Signal(0x10)
|
|
||||||
SIGSTOP = syscall.Signal(0x13)
|
|
||||||
SIGSYS = syscall.Signal(0x1f)
|
|
||||||
SIGTSTP = syscall.Signal(0x14)
|
|
||||||
SIGTTIN = syscall.Signal(0x15)
|
|
||||||
SIGTTOU = syscall.Signal(0x16)
|
|
||||||
SIGURG = syscall.Signal(0x17)
|
|
||||||
SIGUSR1 = syscall.Signal(0xa)
|
|
||||||
SIGUSR2 = syscall.Signal(0xc)
|
|
||||||
SIGVTALRM = syscall.Signal(0x1a)
|
|
||||||
SIGWINCH = syscall.Signal(0x1c)
|
|
||||||
SIGXCPU = syscall.Signal(0x18)
|
|
||||||
SIGXFSZ = syscall.Signal(0x19)
|
|
||||||
)
|
|
||||||
|
|
||||||
// Error table
|
|
||||||
var errorList = [...]struct {
|
|
||||||
num syscall.Errno
|
|
||||||
name string
|
|
||||||
desc string
|
|
||||||
}{
|
|
||||||
{1, "EPERM", "operation not permitted"},
|
|
||||||
{2, "ENOENT", "no such file or directory"},
|
|
||||||
{3, "ESRCH", "no such process"},
|
|
||||||
{4, "EINTR", "interrupted system call"},
|
|
||||||
{5, "EIO", "input/output error"},
|
|
||||||
{6, "ENXIO", "no such device or address"},
|
|
||||||
{7, "E2BIG", "argument list too long"},
|
|
||||||
{8, "ENOEXEC", "exec format error"},
|
|
||||||
{9, "EBADF", "bad file descriptor"},
|
|
||||||
{10, "ECHILD", "no child processes"},
|
|
||||||
{11, "EAGAIN", "resource temporarily unavailable"},
|
|
||||||
{12, "ENOMEM", "cannot allocate memory"},
|
|
||||||
{13, "EACCES", "permission denied"},
|
|
||||||
{14, "EFAULT", "bad address"},
|
|
||||||
{15, "ENOTBLK", "block device required"},
|
|
||||||
{16, "EBUSY", "device or resource busy"},
|
|
||||||
{17, "EEXIST", "file exists"},
|
|
||||||
{18, "EXDEV", "invalid cross-device link"},
|
|
||||||
{19, "ENODEV", "no such device"},
|
|
||||||
{20, "ENOTDIR", "not a directory"},
|
|
||||||
{21, "EISDIR", "is a directory"},
|
|
||||||
{22, "EINVAL", "invalid argument"},
|
|
||||||
{23, "ENFILE", "too many open files in system"},
|
|
||||||
{24, "EMFILE", "too many open files"},
|
|
||||||
{25, "ENOTTY", "inappropriate ioctl for device"},
|
|
||||||
{26, "ETXTBSY", "text file busy"},
|
|
||||||
{27, "EFBIG", "file too large"},
|
|
||||||
{28, "ENOSPC", "no space left on device"},
|
|
||||||
{29, "ESPIPE", "illegal seek"},
|
|
||||||
{30, "EROFS", "read-only file system"},
|
|
||||||
{31, "EMLINK", "too many links"},
|
|
||||||
{32, "EPIPE", "broken pipe"},
|
|
||||||
{33, "EDOM", "numerical argument out of domain"},
|
|
||||||
{34, "ERANGE", "numerical result out of range"},
|
|
||||||
{35, "EDEADLK", "resource deadlock avoided"},
|
|
||||||
{36, "ENAMETOOLONG", "file name too long"},
|
|
||||||
{37, "ENOLCK", "no locks available"},
|
|
||||||
{38, "ENOSYS", "function not implemented"},
|
|
||||||
{39, "ENOTEMPTY", "directory not empty"},
|
|
||||||
{40, "ELOOP", "too many levels of symbolic links"},
|
|
||||||
{42, "ENOMSG", "no message of desired type"},
|
|
||||||
{43, "EIDRM", "identifier removed"},
|
|
||||||
{44, "ECHRNG", "channel number out of range"},
|
|
||||||
{45, "EL2NSYNC", "level 2 not synchronized"},
|
|
||||||
{46, "EL3HLT", "level 3 halted"},
|
|
||||||
{47, "EL3RST", "level 3 reset"},
|
|
||||||
{48, "ELNRNG", "link number out of range"},
|
|
||||||
{49, "EUNATCH", "protocol driver not attached"},
|
|
||||||
{50, "ENOCSI", "no CSI structure available"},
|
|
||||||
{51, "EL2HLT", "level 2 halted"},
|
|
||||||
{52, "EBADE", "invalid exchange"},
|
|
||||||
{53, "EBADR", "invalid request descriptor"},
|
|
||||||
{54, "EXFULL", "exchange full"},
|
|
||||||
{55, "ENOANO", "no anode"},
|
|
||||||
{56, "EBADRQC", "invalid request code"},
|
|
||||||
{57, "EBADSLT", "invalid slot"},
|
|
||||||
{58, "EDEADLOCK", "file locking deadlock error"},
|
|
||||||
{59, "EBFONT", "bad font file format"},
|
|
||||||
{60, "ENOSTR", "device not a stream"},
|
|
||||||
{61, "ENODATA", "no data available"},
|
|
||||||
{62, "ETIME", "timer expired"},
|
|
||||||
{63, "ENOSR", "out of streams resources"},
|
|
||||||
{64, "ENONET", "machine is not on the network"},
|
|
||||||
{65, "ENOPKG", "package not installed"},
|
|
||||||
{66, "EREMOTE", "object is remote"},
|
|
||||||
{67, "ENOLINK", "link has been severed"},
|
|
||||||
{68, "EADV", "advertise error"},
|
|
||||||
{69, "ESRMNT", "srmount error"},
|
|
||||||
{70, "ECOMM", "communication error on send"},
|
|
||||||
{71, "EPROTO", "protocol error"},
|
|
||||||
{72, "EMULTIHOP", "multihop attempted"},
|
|
||||||
{73, "EDOTDOT", "RFS specific error"},
|
|
||||||
{74, "EBADMSG", "bad message"},
|
|
||||||
{75, "EOVERFLOW", "value too large for defined data type"},
|
|
||||||
{76, "ENOTUNIQ", "name not unique on network"},
|
|
||||||
{77, "EBADFD", "file descriptor in bad state"},
|
|
||||||
{78, "EREMCHG", "remote address changed"},
|
|
||||||
{79, "ELIBACC", "can not access a needed shared library"},
|
|
||||||
{80, "ELIBBAD", "accessing a corrupted shared library"},
|
|
||||||
{81, "ELIBSCN", ".lib section in a.out corrupted"},
|
|
||||||
{82, "ELIBMAX", "attempting to link in too many shared libraries"},
|
|
||||||
{83, "ELIBEXEC", "cannot exec a shared library directly"},
|
|
||||||
{84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
|
|
||||||
{85, "ERESTART", "interrupted system call should be restarted"},
|
|
||||||
{86, "ESTRPIPE", "streams pipe error"},
|
|
||||||
{87, "EUSERS", "too many users"},
|
|
||||||
{88, "ENOTSOCK", "socket operation on non-socket"},
|
|
||||||
{89, "EDESTADDRREQ", "destination address required"},
|
|
||||||
{90, "EMSGSIZE", "message too long"},
|
|
||||||
{91, "EPROTOTYPE", "protocol wrong type for socket"},
|
|
||||||
{92, "ENOPROTOOPT", "protocol not available"},
|
|
||||||
{93, "EPROTONOSUPPORT", "protocol not supported"},
|
|
||||||
{94, "ESOCKTNOSUPPORT", "socket type not supported"},
|
|
||||||
{95, "ENOTSUP", "operation not supported"},
|
|
||||||
{96, "EPFNOSUPPORT", "protocol family not supported"},
|
|
||||||
{97, "EAFNOSUPPORT", "address family not supported by protocol"},
|
|
||||||
{98, "EADDRINUSE", "address already in use"},
|
|
||||||
{99, "EADDRNOTAVAIL", "cannot assign requested address"},
|
|
||||||
{100, "ENETDOWN", "network is down"},
|
|
||||||
{101, "ENETUNREACH", "network is unreachable"},
|
|
||||||
{102, "ENETRESET", "network dropped connection on reset"},
|
|
||||||
{103, "ECONNABORTED", "software caused connection abort"},
|
|
||||||
{104, "ECONNRESET", "connection reset by peer"},
|
|
||||||
{105, "ENOBUFS", "no buffer space available"},
|
|
||||||
{106, "EISCONN", "transport endpoint is already connected"},
|
|
||||||
{107, "ENOTCONN", "transport endpoint is not connected"},
|
|
||||||
{108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
|
|
||||||
{109, "ETOOMANYREFS", "too many references: cannot splice"},
|
|
||||||
{110, "ETIMEDOUT", "connection timed out"},
|
|
||||||
{111, "ECONNREFUSED", "connection refused"},
|
|
||||||
{112, "EHOSTDOWN", "host is down"},
|
|
||||||
{113, "EHOSTUNREACH", "no route to host"},
|
|
||||||
{114, "EALREADY", "operation already in progress"},
|
|
||||||
{115, "EINPROGRESS", "operation now in progress"},
|
|
||||||
{116, "ESTALE", "stale file handle"},
|
|
||||||
{117, "EUCLEAN", "structure needs cleaning"},
|
|
||||||
{118, "ENOTNAM", "not a XENIX named type file"},
|
|
||||||
{119, "ENAVAIL", "no XENIX semaphores available"},
|
|
||||||
{120, "EISNAM", "is a named type file"},
|
|
||||||
{121, "EREMOTEIO", "remote I/O error"},
|
|
||||||
{122, "EDQUOT", "disk quota exceeded"},
|
|
||||||
{123, "ENOMEDIUM", "no medium found"},
|
|
||||||
{124, "EMEDIUMTYPE", "wrong medium type"},
|
|
||||||
{125, "ECANCELED", "operation canceled"},
|
|
||||||
{126, "ENOKEY", "required key not available"},
|
|
||||||
{127, "EKEYEXPIRED", "key has expired"},
|
|
||||||
{128, "EKEYREVOKED", "key has been revoked"},
|
|
||||||
{129, "EKEYREJECTED", "key was rejected by service"},
|
|
||||||
{130, "EOWNERDEAD", "owner died"},
|
|
||||||
{131, "ENOTRECOVERABLE", "state not recoverable"},
|
|
||||||
{132, "ERFKILL", "operation not possible due to RF-kill"},
|
|
||||||
{133, "EHWPOISON", "memory page has hardware error"},
|
|
||||||
}
|
|
||||||
|
|
||||||
// Signal table
|
|
||||||
var signalList = [...]struct {
|
|
||||||
num syscall.Signal
|
|
||||||
name string
|
|
||||||
desc string
|
|
||||||
}{
|
|
||||||
{1, "SIGHUP", "hangup"},
|
|
||||||
{2, "SIGINT", "interrupt"},
|
|
||||||
{3, "SIGQUIT", "quit"},
|
|
||||||
{4, "SIGILL", "illegal instruction"},
|
|
||||||
{5, "SIGTRAP", "trace/breakpoint trap"},
|
|
||||||
{6, "SIGABRT", "aborted"},
|
|
||||||
{7, "SIGBUS", "bus error"},
|
|
||||||
{8, "SIGFPE", "floating point exception"},
|
|
||||||
{9, "SIGKILL", "killed"},
|
|
||||||
{10, "SIGUSR1", "user defined signal 1"},
|
|
||||||
{11, "SIGSEGV", "segmentation fault"},
|
|
||||||
{12, "SIGUSR2", "user defined signal 2"},
|
|
||||||
{13, "SIGPIPE", "broken pipe"},
|
|
||||||
{14, "SIGALRM", "alarm clock"},
|
|
||||||
{15, "SIGTERM", "terminated"},
|
|
||||||
{16, "SIGSTKFLT", "stack fault"},
|
|
||||||
{17, "SIGCHLD", "child exited"},
|
|
||||||
{18, "SIGCONT", "continued"},
|
|
||||||
{19, "SIGSTOP", "stopped (signal)"},
|
|
||||||
{20, "SIGTSTP", "stopped"},
|
|
||||||
{21, "SIGTTIN", "stopped (tty input)"},
|
|
||||||
{22, "SIGTTOU", "stopped (tty output)"},
|
|
||||||
{23, "SIGURG", "urgent I/O condition"},
|
|
||||||
{24, "SIGXCPU", "CPU time limit exceeded"},
|
|
||||||
{25, "SIGXFSZ", "file size limit exceeded"},
|
|
||||||
{26, "SIGVTALRM", "virtual timer expired"},
|
|
||||||
{27, "SIGPROF", "profiling timer expired"},
|
|
||||||
{28, "SIGWINCH", "window changed"},
|
|
||||||
{29, "SIGIO", "I/O possible"},
|
|
||||||
{30, "SIGPWR", "power failure"},
|
|
||||||
{31, "SIGSYS", "bad system call"},
|
|
||||||
}
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build ppc64,linux
|
// +build ppc64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x300
|
CS8 = 0x300
|
||||||
CSIZE = 0x300
|
CSIZE = 0x300
|
||||||
CSTOPB = 0x400
|
CSTOPB = 0x400
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x40
|
ECHOCTL = 0x40
|
||||||
ECHOE = 0x2
|
ECHOE = 0x2
|
||||||
ECHOK = 0x4
|
ECHOK = 0x4
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x2000
|
MCL_CURRENT = 0x2000
|
||||||
MCL_FUTURE = 0x4000
|
MCL_FUTURE = 0x4000
|
||||||
MCL_ONFAULT = 0x8000
|
MCL_ONFAULT = 0x8000
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NL2 = 0x200
|
NL2 = 0x200
|
||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
|
@ -147,11 +132,6 @@ const (
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -309,8 +289,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x8008700e
|
RTC_EPOCH_SET = 0x8008700e
|
||||||
RTC_IRQP_READ = 0x4008700b
|
RTC_IRQP_READ = 0x4008700b
|
||||||
RTC_IRQP_SET = 0x8008700c
|
RTC_IRQP_SET = 0x8008700c
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
RTC_PIE_OFF = 0x20007006
|
||||||
RTC_PIE_ON = 0x20007005
|
RTC_PIE_ON = 0x20007005
|
||||||
RTC_PLL_GET = 0x40207011
|
RTC_PLL_GET = 0x40207011
|
||||||
|
@ -354,7 +332,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -371,7 +348,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x14
|
SO_PASSCRED = 0x14
|
||||||
|
@ -388,7 +364,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x12
|
SO_RCVTIMEO = 0x12
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x12
|
SO_RCVTIMEO_OLD = 0x12
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build ppc64le,linux
|
// +build ppc64le,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x300
|
CS8 = 0x300
|
||||||
CSIZE = 0x300
|
CSIZE = 0x300
|
||||||
CSTOPB = 0x400
|
CSTOPB = 0x400
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x40
|
ECHOCTL = 0x40
|
||||||
ECHOE = 0x2
|
ECHOE = 0x2
|
||||||
ECHOK = 0x4
|
ECHOK = 0x4
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x2000
|
MCL_CURRENT = 0x2000
|
||||||
MCL_FUTURE = 0x4000
|
MCL_FUTURE = 0x4000
|
||||||
MCL_ONFAULT = 0x8000
|
MCL_ONFAULT = 0x8000
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NL2 = 0x200
|
NL2 = 0x200
|
||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
|
@ -147,11 +132,6 @@ const (
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -309,8 +289,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x8008700e
|
RTC_EPOCH_SET = 0x8008700e
|
||||||
RTC_IRQP_READ = 0x4008700b
|
RTC_IRQP_READ = 0x4008700b
|
||||||
RTC_IRQP_SET = 0x8008700c
|
RTC_IRQP_SET = 0x8008700c
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
RTC_PIE_OFF = 0x20007006
|
||||||
RTC_PIE_ON = 0x20007005
|
RTC_PIE_ON = 0x20007005
|
||||||
RTC_PLL_GET = 0x40207011
|
RTC_PLL_GET = 0x40207011
|
||||||
|
@ -354,7 +332,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -371,7 +348,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x14
|
SO_PASSCRED = 0x14
|
||||||
|
@ -388,7 +364,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x12
|
SO_RCVTIMEO = 0x12
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x12
|
SO_RCVTIMEO_OLD = 0x12
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build riscv64,linux
|
// +build riscv64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x81484d11
|
|
||||||
ECCGETSTATS = 0x80104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x40084d02
|
|
||||||
MEMERASE64 = 0x40104d14
|
|
||||||
MEMGETBADBLOCK = 0x40084d0b
|
|
||||||
MEMGETINFO = 0x80204d01
|
|
||||||
MEMGETOOBSEL = 0x80c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x80044d07
|
|
||||||
MEMISLOCKED = 0x80084d17
|
|
||||||
MEMLOCK = 0x40084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x40084d0c
|
|
||||||
MEMUNLOCK = 0x40084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x4d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -145,11 +130,6 @@ const (
|
||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x400c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
|
||||||
OTPLOCK = 0x800c4d10
|
|
||||||
OTPSELECT = 0x80044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -238,8 +218,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x4008700e
|
RTC_EPOCH_SET = 0x4008700e
|
||||||
RTC_IRQP_READ = 0x8008700b
|
RTC_IRQP_READ = 0x8008700b
|
||||||
RTC_IRQP_SET = 0x4008700c
|
RTC_IRQP_SET = 0x4008700c
|
||||||
RTC_PARAM_GET = 0x40187013
|
|
||||||
RTC_PARAM_SET = 0x40187014
|
|
||||||
RTC_PIE_OFF = 0x7006
|
RTC_PIE_OFF = 0x7006
|
||||||
RTC_PIE_ON = 0x7005
|
RTC_PIE_ON = 0x7005
|
||||||
RTC_PLL_GET = 0x80207011
|
RTC_PLL_GET = 0x80207011
|
||||||
|
@ -283,7 +261,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -300,7 +277,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
@ -317,7 +293,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x14
|
SO_RCVTIMEO = 0x14
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x14
|
SO_RCVTIMEO_OLD = 0x14
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build s390x,linux
|
// +build s390x,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x81484d11
|
|
||||||
ECCGETSTATS = 0x80104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -123,19 +121,6 @@ const (
|
||||||
MCL_CURRENT = 0x1
|
MCL_CURRENT = 0x1
|
||||||
MCL_FUTURE = 0x2
|
MCL_FUTURE = 0x2
|
||||||
MCL_ONFAULT = 0x4
|
MCL_ONFAULT = 0x4
|
||||||
MEMERASE = 0x40084d02
|
|
||||||
MEMERASE64 = 0x40104d14
|
|
||||||
MEMGETBADBLOCK = 0x40084d0b
|
|
||||||
MEMGETINFO = 0x80204d01
|
|
||||||
MEMGETOOBSEL = 0x80c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x80044d07
|
|
||||||
MEMISLOCKED = 0x80084d17
|
|
||||||
MEMLOCK = 0x40084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x40084d0c
|
|
||||||
MEMUNLOCK = 0x40084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x4d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -145,11 +130,6 @@ const (
|
||||||
NS_GET_USERNS = 0xb701
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x400c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x40044d0e
|
|
||||||
OTPGETREGIONINFO = 0x400c4d0f
|
|
||||||
OTPLOCK = 0x800c4d10
|
|
||||||
OTPSELECT = 0x80044d0d
|
|
||||||
O_APPEND = 0x400
|
O_APPEND = 0x400
|
||||||
O_ASYNC = 0x2000
|
O_ASYNC = 0x2000
|
||||||
O_CLOEXEC = 0x80000
|
O_CLOEXEC = 0x80000
|
||||||
|
@ -232,8 +212,6 @@ const (
|
||||||
PTRACE_POKE_SYSTEM_CALL = 0x5008
|
PTRACE_POKE_SYSTEM_CALL = 0x5008
|
||||||
PTRACE_PROT = 0x15
|
PTRACE_PROT = 0x15
|
||||||
PTRACE_SINGLEBLOCK = 0xc
|
PTRACE_SINGLEBLOCK = 0xc
|
||||||
PTRACE_SYSEMU = 0x1f
|
|
||||||
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
|
||||||
PTRACE_TE_ABORT_RAND = 0x5011
|
PTRACE_TE_ABORT_RAND = 0x5011
|
||||||
PT_ACR0 = 0x90
|
PT_ACR0 = 0x90
|
||||||
PT_ACR1 = 0x94
|
PT_ACR1 = 0x94
|
||||||
|
@ -313,8 +291,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x4008700e
|
RTC_EPOCH_SET = 0x4008700e
|
||||||
RTC_IRQP_READ = 0x8008700b
|
RTC_IRQP_READ = 0x8008700b
|
||||||
RTC_IRQP_SET = 0x4008700c
|
RTC_IRQP_SET = 0x4008700c
|
||||||
RTC_PARAM_GET = 0x40187013
|
|
||||||
RTC_PARAM_SET = 0x40187014
|
|
||||||
RTC_PIE_OFF = 0x7006
|
RTC_PIE_OFF = 0x7006
|
||||||
RTC_PIE_ON = 0x7005
|
RTC_PIE_ON = 0x7005
|
||||||
RTC_PLL_GET = 0x80207011
|
RTC_PLL_GET = 0x80207011
|
||||||
|
@ -358,7 +334,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x30
|
SO_BPF_EXTENSIONS = 0x30
|
||||||
SO_BROADCAST = 0x6
|
SO_BROADCAST = 0x6
|
||||||
SO_BSDCOMPAT = 0xe
|
SO_BSDCOMPAT = 0xe
|
||||||
SO_BUF_LOCK = 0x48
|
|
||||||
SO_BUSY_POLL = 0x2e
|
SO_BUSY_POLL = 0x2e
|
||||||
SO_BUSY_POLL_BUDGET = 0x46
|
SO_BUSY_POLL_BUDGET = 0x46
|
||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
|
@ -375,7 +350,6 @@ const (
|
||||||
SO_MARK = 0x24
|
SO_MARK = 0x24
|
||||||
SO_MAX_PACING_RATE = 0x2f
|
SO_MAX_PACING_RATE = 0x2f
|
||||||
SO_MEMINFO = 0x37
|
SO_MEMINFO = 0x37
|
||||||
SO_NETNS_COOKIE = 0x47
|
|
||||||
SO_NOFCS = 0x2b
|
SO_NOFCS = 0x2b
|
||||||
SO_OOBINLINE = 0xa
|
SO_OOBINLINE = 0xa
|
||||||
SO_PASSCRED = 0x10
|
SO_PASSCRED = 0x10
|
||||||
|
@ -392,7 +366,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x14
|
SO_RCVTIMEO = 0x14
|
||||||
SO_RCVTIMEO_NEW = 0x42
|
SO_RCVTIMEO_NEW = 0x42
|
||||||
SO_RCVTIMEO_OLD = 0x14
|
SO_RCVTIMEO_OLD = 0x14
|
||||||
SO_RESERVE_MEM = 0x49
|
|
||||||
SO_REUSEADDR = 0x2
|
SO_REUSEADDR = 0x2
|
||||||
SO_REUSEPORT = 0xf
|
SO_REUSEPORT = 0xf
|
||||||
SO_RXQ_OVFL = 0x28
|
SO_RXQ_OVFL = 0x28
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// +build sparc64,linux
|
// +build sparc64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
|
// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
|
@ -63,8 +63,6 @@ const (
|
||||||
CS8 = 0x30
|
CS8 = 0x30
|
||||||
CSIZE = 0x30
|
CSIZE = 0x30
|
||||||
CSTOPB = 0x40
|
CSTOPB = 0x40
|
||||||
ECCGETLAYOUT = 0x41484d11
|
|
||||||
ECCGETSTATS = 0x40104d12
|
|
||||||
ECHOCTL = 0x200
|
ECHOCTL = 0x200
|
||||||
ECHOE = 0x10
|
ECHOE = 0x10
|
||||||
ECHOK = 0x20
|
ECHOK = 0x20
|
||||||
|
@ -128,19 +126,6 @@ const (
|
||||||
MCL_CURRENT = 0x2000
|
MCL_CURRENT = 0x2000
|
||||||
MCL_FUTURE = 0x4000
|
MCL_FUTURE = 0x4000
|
||||||
MCL_ONFAULT = 0x8000
|
MCL_ONFAULT = 0x8000
|
||||||
MEMERASE = 0x80084d02
|
|
||||||
MEMERASE64 = 0x80104d14
|
|
||||||
MEMGETBADBLOCK = 0x80084d0b
|
|
||||||
MEMGETINFO = 0x40204d01
|
|
||||||
MEMGETOOBSEL = 0x40c84d0a
|
|
||||||
MEMGETREGIONCOUNT = 0x40044d07
|
|
||||||
MEMISLOCKED = 0x40084d17
|
|
||||||
MEMLOCK = 0x80084d05
|
|
||||||
MEMREADOOB = 0xc0104d04
|
|
||||||
MEMSETBADBLOCK = 0x80084d0c
|
|
||||||
MEMUNLOCK = 0x80084d06
|
|
||||||
MEMWRITEOOB = 0xc0104d03
|
|
||||||
MTDFILEMODE = 0x20004d13
|
|
||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
@ -150,11 +135,6 @@ const (
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
OTPERASE = 0x800c4d19
|
|
||||||
OTPGETREGIONCOUNT = 0x80044d0e
|
|
||||||
OTPGETREGIONINFO = 0x800c4d0f
|
|
||||||
OTPLOCK = 0x400c4d10
|
|
||||||
OTPSELECT = 0x40044d0d
|
|
||||||
O_APPEND = 0x8
|
O_APPEND = 0x8
|
||||||
O_ASYNC = 0x40
|
O_ASYNC = 0x40
|
||||||
O_CLOEXEC = 0x400000
|
O_CLOEXEC = 0x400000
|
||||||
|
@ -304,8 +284,6 @@ const (
|
||||||
RTC_EPOCH_SET = 0x8008700e
|
RTC_EPOCH_SET = 0x8008700e
|
||||||
RTC_IRQP_READ = 0x4008700b
|
RTC_IRQP_READ = 0x4008700b
|
||||||
RTC_IRQP_SET = 0x8008700c
|
RTC_IRQP_SET = 0x8008700c
|
||||||
RTC_PARAM_GET = 0x80187013
|
|
||||||
RTC_PARAM_SET = 0x80187014
|
|
||||||
RTC_PIE_OFF = 0x20007006
|
RTC_PIE_OFF = 0x20007006
|
||||||
RTC_PIE_ON = 0x20007005
|
RTC_PIE_ON = 0x20007005
|
||||||
RTC_PLL_GET = 0x40207011
|
RTC_PLL_GET = 0x40207011
|
||||||
|
@ -349,7 +327,6 @@ const (
|
||||||
SO_BPF_EXTENSIONS = 0x32
|
SO_BPF_EXTENSIONS = 0x32
|
||||||
SO_BROADCAST = 0x20
|
SO_BROADCAST = 0x20
|
||||||
SO_BSDCOMPAT = 0x400
|
SO_BSDCOMPAT = 0x400
|
||||||
SO_BUF_LOCK = 0x51
|
|
||||||
SO_BUSY_POLL = 0x30
|
SO_BUSY_POLL = 0x30
|
||||||
SO_BUSY_POLL_BUDGET = 0x49
|
SO_BUSY_POLL_BUDGET = 0x49
|
||||||
SO_CNX_ADVICE = 0x37
|
SO_CNX_ADVICE = 0x37
|
||||||
|
@ -366,7 +343,6 @@ const (
|
||||||
SO_MARK = 0x22
|
SO_MARK = 0x22
|
||||||
SO_MAX_PACING_RATE = 0x31
|
SO_MAX_PACING_RATE = 0x31
|
||||||
SO_MEMINFO = 0x39
|
SO_MEMINFO = 0x39
|
||||||
SO_NETNS_COOKIE = 0x50
|
|
||||||
SO_NOFCS = 0x27
|
SO_NOFCS = 0x27
|
||||||
SO_OOBINLINE = 0x100
|
SO_OOBINLINE = 0x100
|
||||||
SO_PASSCRED = 0x2
|
SO_PASSCRED = 0x2
|
||||||
|
@ -383,7 +359,6 @@ const (
|
||||||
SO_RCVTIMEO = 0x2000
|
SO_RCVTIMEO = 0x2000
|
||||||
SO_RCVTIMEO_NEW = 0x44
|
SO_RCVTIMEO_NEW = 0x44
|
||||||
SO_RCVTIMEO_OLD = 0x2000
|
SO_RCVTIMEO_OLD = 0x2000
|
||||||
SO_RESERVE_MEM = 0x52
|
|
||||||
SO_REUSEADDR = 0x4
|
SO_REUSEADDR = 0x4
|
||||||
SO_REUSEPORT = 0x200
|
SO_REUSEPORT = 0x200
|
||||||
SO_RXQ_OVFL = 0x24
|
SO_RXQ_OVFL = 0x24
|
||||||
|
|
|
@ -1020,10 +1020,7 @@ const (
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
RLIMIT_DATA = 0x2
|
RLIMIT_DATA = 0x2
|
||||||
RLIMIT_FSIZE = 0x1
|
RLIMIT_FSIZE = 0x1
|
||||||
RLIMIT_MEMLOCK = 0x6
|
|
||||||
RLIMIT_NOFILE = 0x8
|
RLIMIT_NOFILE = 0x8
|
||||||
RLIMIT_NPROC = 0x7
|
|
||||||
RLIMIT_RSS = 0x5
|
|
||||||
RLIMIT_STACK = 0x3
|
RLIMIT_STACK = 0x3
|
||||||
RLIM_INFINITY = 0x7fffffffffffffff
|
RLIM_INFINITY = 0x7fffffffffffffff
|
||||||
RTAX_AUTHOR = 0x6
|
RTAX_AUTHOR = 0x6
|
||||||
|
|
|
@ -1020,10 +1020,7 @@ const (
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
RLIMIT_DATA = 0x2
|
RLIMIT_DATA = 0x2
|
||||||
RLIMIT_FSIZE = 0x1
|
RLIMIT_FSIZE = 0x1
|
||||||
RLIMIT_MEMLOCK = 0x6
|
|
||||||
RLIMIT_NOFILE = 0x8
|
RLIMIT_NOFILE = 0x8
|
||||||
RLIMIT_NPROC = 0x7
|
|
||||||
RLIMIT_RSS = 0x5
|
|
||||||
RLIMIT_STACK = 0x3
|
RLIMIT_STACK = 0x3
|
||||||
RLIM_INFINITY = 0x7fffffffffffffff
|
RLIM_INFINITY = 0x7fffffffffffffff
|
||||||
RTAX_AUTHOR = 0x6
|
RTAX_AUTHOR = 0x6
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue