package syscall
-// These seem not to be defined in our gcc's ARM headers
-// and are thus missing from zerrors_linux_arm.go.
-const (
- WSTOPPED = 0x7f
- O_CLOEXEC = 0
- EPOLLRDHUP = EPOLLHUP
- EPOLLONESHOT = 0x40000000
-)
-
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int)
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int)
//sys sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno int)
+//sys socketpair(domain int, typ int, flags int, fd *[2]int) (errno int)
//sys Chown(path string, uid int, gid int) (errno int)
//sys Fchown(fd int, uid int, gid int) (errno int)
// mkerrors.sh
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-// godefs -c arm-gcc -gsyscall _const.c
+// godefs -c gcc -gsyscall _const.c
// MACHINE GENERATED - DO NOT EDIT.
AF_INET6 = 0xa
AF_IPX = 0x4
AF_IRDA = 0x17
+ AF_ISDN = 0x22
+ AF_IUCV = 0x20
AF_KEY = 0xf
AF_LOCAL = 0x1
- AF_MAX = 0x20
+ AF_MAX = 0x23
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
AF_NETROM = 0x6
AF_PPPOX = 0x18
AF_ROSE = 0xb
AF_ROUTE = 0x10
+ AF_RXRPC = 0x21
AF_SECURITY = 0xe
AF_SNA = 0x16
AF_UNIX = 0x1
EPOLLHUP = 0x10
EPOLLIN = 0x1
EPOLLMSG = 0x400
+ EPOLLONESHOT = 0x40000000
EPOLLOUT = 0x4
EPOLLPRI = 0x2
EPOLLRDBAND = 0x80
+ EPOLLRDHUP = 0x2000
EPOLLRDNORM = 0x40
EPOLLWRBAND = 0x200
EPOLLWRNORM = 0x100
+ EPOLL_CLOEXEC = 0x80000
EPOLL_CTL_ADD = 0x1
EPOLL_CTL_DEL = 0x2
EPOLL_CTL_MOD = 0x3
+ EPOLL_NONBLOCK = 0x800
EPROTO = 0x47
EPROTONOSUPPORT = 0x5d
EPROTOTYPE = 0x5b
EREMOTE = 0x42
EREMOTEIO = 0x79
ERESTART = 0x55
+ ERFKILL = 0x84
EROFS = 0x1e
ESHUTDOWN = 0x6c
ESOCKTNOSUPPORT = 0x5e
EWOULDBLOCK = 0xb
EXDEV = 0x12
EXFULL = 0x36
- EXPR_NEST_MAX = 0x20
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
F_DUPFD = 0
+ F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4
F_GETFD = 0x1
F_GETFL = 0x3
F_WRLCK = 0x1
IPPROTO_AH = 0x33
IPPROTO_COMP = 0x6c
+ IPPROTO_DCCP = 0x21
IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8
IPPROTO_ENCAP = 0x62
IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_2292DSTOPTS = 0x4
+ IPV6_2292HOPLIMIT = 0x8
+ IPV6_2292HOPOPTS = 0x3
+ IPV6_2292PKTINFO = 0x2
+ IPV6_2292PKTOPTIONS = 0x6
+ IPV6_2292RTHDR = 0x5
IPV6_ADDRFORM = 0x1
IPV6_ADD_MEMBERSHIP = 0x14
IPV6_AUTHHDR = 0xa
IPV6_CHECKSUM = 0x7
IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x4
- IPV6_HOPLIMIT = 0x8
- IPV6_HOPOPTS = 0x3
+ IPV6_DSTOPTS = 0x3b
+ IPV6_HOPLIMIT = 0x34
+ IPV6_HOPOPTS = 0x36
+ IPV6_IPSEC_POLICY = 0x22
+ IPV6_JOIN_ANYCAST = 0x1b
IPV6_JOIN_GROUP = 0x14
+ IPV6_LEAVE_ANYCAST = 0x1c
IPV6_LEAVE_GROUP = 0x15
IPV6_MTU = 0x18
IPV6_MTU_DISCOVER = 0x17
IPV6_MULTICAST_IF = 0x11
IPV6_MULTICAST_LOOP = 0x13
IPV6_NEXTHOP = 0x9
- IPV6_PKTINFO = 0x2
- IPV6_PKTOPTIONS = 0x6
+ IPV6_PKTINFO = 0x32
IPV6_PMTUDISC_DO = 0x2
IPV6_PMTUDISC_DONT = 0
+ IPV6_PMTUDISC_PROBE = 0x3
IPV6_PMTUDISC_WANT = 0x1
+ IPV6_RECVDSTOPTS = 0x3a
IPV6_RECVERR = 0x19
+ IPV6_RECVHOPLIMIT = 0x33
+ IPV6_RECVHOPOPTS = 0x35
+ IPV6_RECVPKTINFO = 0x31
+ IPV6_RECVRTHDR = 0x38
+ IPV6_RECVTCLASS = 0x42
IPV6_ROUTER_ALERT = 0x16
- IPV6_RTHDR = 0x5
+ IPV6_RTHDR = 0x39
+ IPV6_RTHDRDSTOPTS = 0x37
IPV6_RTHDR_LOOSE = 0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0
- IPV6_RXDSTOPTS = 0x4
- IPV6_RXHOPOPTS = 0x3
+ IPV6_RXDSTOPTS = 0x3b
+ IPV6_RXHOPOPTS = 0x36
+ IPV6_TCLASS = 0x43
IPV6_UNICAST_HOPS = 0x10
+ IPV6_V6ONLY = 0x1a
+ IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
+ IP_ADD_SOURCE_MEMBERSHIP = 0x27
+ IP_BLOCK_SOURCE = 0x26
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
IP_DROP_MEMBERSHIP = 0x24
+ IP_DROP_SOURCE_MEMBERSHIP = 0x28
IP_HDRINCL = 0x3
IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000
+ IP_MSFILTER = 0x29
IP_MSS = 0x240
IP_MTU_DISCOVER = 0xa
IP_MULTICAST_IF = 0x20
IP_PMTUDISC = 0xa
IP_PMTUDISC_DO = 0x2
IP_PMTUDISC_DONT = 0
+ IP_PMTUDISC_PROBE = 0x3
IP_PMTUDISC_WANT = 0x1
IP_RECVERR = 0xb
IP_RECVOPTS = 0x6
IP_ROUTER_ALERT = 0x5
IP_TOS = 0x1
IP_TTL = 0x2
+ IP_UNBLOCK_SOURCE = 0x25
NAME_MAX = 0xff
O_ACCMODE = 0x3
O_APPEND = 0x400
O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
O_CREAT = 0x40
O_DIRECT = 0x10000
O_DIRECTORY = 0x4000
O_FSYNC = 0x1000
O_LARGEFILE = 0x20000
O_NDELAY = 0x800
+ O_NOATIME = 0x40000
O_NOCTTY = 0x100
O_NOFOLLOW = 0x8000
O_NONBLOCK = 0x800
PTRACE_EVENT_FORK = 0x1
PTRACE_EVENT_VFORK = 0x2
PTRACE_EVENT_VFORK_DONE = 0x5
+ PTRACE_GETCRUNCHREGS = 0x19
PTRACE_GETEVENTMSG = 0x4201
PTRACE_GETFPREGS = 0xe
PTRACE_GETREGS = 0xc
PTRACE_GETSIGINFO = 0x4202
+ PTRACE_GETVFPREGS = 0x1b
PTRACE_GETWMMXREGS = 0x12
PTRACE_GET_THREAD_AREA = 0x16
PTRACE_KILL = 0x8
PTRACE_POKEDATA = 0x5
PTRACE_POKETEXT = 0x4
PTRACE_POKEUSR = 0x6
+ PTRACE_SETCRUNCHREGS = 0x1a
PTRACE_SETFPREGS = 0xf
PTRACE_SETOPTIONS = 0x4200
PTRACE_SETREGS = 0xd
PTRACE_SETSIGINFO = 0x4203
+ PTRACE_SETVFPREGS = 0x1c
PTRACE_SETWMMXREGS = 0x13
+ PTRACE_SET_SYSCALL = 0x17
PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18
PTRACE_TRACEME = 0
SIGWINCH = 0x1c
SIGXCPU = 0x18
SIGXFSZ = 0x19
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
SOCK_RDM = 0x4
SO_ERROR = 0x4
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
+ SO_MARK = 0x24
SO_NO_CHECK = 0xb
SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
SO_PEERCRED = 0x11
SO_PEERNAME = 0x1c
SO_PEERSEC = 0x1f
SO_PRIORITY = 0xc
SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVTIMEO = 0x14
SO_REUSEADDR = 0x2
SO_SECURITY_ENCRYPTION_NETWORK = 0x18
SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
SO_SNDLOWAT = 0x13
SO_SNDTIMEO = 0x15
SO_TIMESTAMP = 0x1d
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
+ TCP_CONGESTION = 0xd
TCP_CORK = 0x3
TCP_DEFER_ACCEPT = 0x9
TCP_INFO = 0xb
TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff
TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0xe
+ TCP_MD5SIG_MAXKEYLEN = 0x50
TCP_MSS = 0x200
TCP_NODELAY = 0x1
TCP_QUICKACK = 0xc
TCP_WINDOW_CLAMP = 0xa
WALL = 0x40000000
WCLONE = 0x80000000
- WCOREFLAG = 0x80
+ WCONTINUED = 0x8
+ WEXITED = 0x4
WNOHANG = 0x1
+ WNOTHREAD = 0x20000000
+ WNOWAIT = 0x1000000
WORDSIZE = 0x20
+ WSTOPPED = 0x2
WUNTRACED = 0x2
)
106: "transport endpoint is already connected",
21: "is a directory",
120: "is a named type file",
- 127: "unknown error 127",
- 129: "unknown error 129",
- 128: "unknown error 128",
+ 127: "key has expired",
+ 129: "key was rejected by service",
+ 128: "key has been revoked",
51: "level 2 halted",
45: "level 2 not synchronized",
46: "level 3 halted",
19: "no such device",
2: "no such file or directory",
8: "exec format error",
- 126: "unknown error 126",
+ 126: "required key not available",
37: "no locks available",
67: "link has been severed",
123: "no medium found",
20: "not a directory",
39: "directory not empty",
118: "not a XENIX named type file",
- 131: "unknown error 131",
+ 131: "state not recoverable",
88: "socket operation on non-socket",
95: "operation not supported",
25: "inappropriate ioctl for device",
76: "name not unique on network",
6: "no such device or address",
75: "value too large for defined data type",
- 130: "unknown error 130",
+ 130: "owner died",
1: "operation not permitted",
96: "protocol family not supported",
32: "broken pipe",
66: "object is remote",
121: "remote I/O error",
85: "interrupted system call should be restarted",
+ 132: "unknown error 132",
30: "read-only file system",
108: "cannot send after transport endpoint shutdown",
94: "socket type not supported",
return
}
-func socketpair(domain int, typ int, proto int) (fd [2]int, errno int) {
- var f [2]int
- _, _, e1 := Syscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(&f)), 0, 0)
- fd = f
- errno = int(e1)
- return
-}
-
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
_, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
errno = int(e1)
return
}
+func socketpair(domain int, typ int, flags int, fd *[2]int) (errno int) {
+ _, _, e1 := Syscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
+ errno = int(e1)
+ return
+}
+
func Chown(path string, uid int, gid int) (errno int) {
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid))
errno = int(e1)