summaryrefslogtreecommitdiff
path: root/src/config.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-20 15:06:24 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-20 15:06:24 +0200
commit47f8a3d89ad0d1478246bf62140eb4fbfe83ac72 (patch)
tree6842d0c3617c4a621ff12ad7749d7eaa77b2bd66 /src/config.go
parent18714fc4a444f3369dc9ca25e5a6e50343770ea4 (diff)
downloadwireguard-go-47f8a3d89ad0d1478246bf62140eb4fbfe83ac72.tar.gz
wireguard-go-47f8a3d89ad0d1478246bf62140eb4fbfe83ac72.zip
Moved remaining platform dependent UAPI code
Diffstat (limited to 'src/config.go')
-rw-r--r--src/config.go15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/config.go b/src/config.go
index ad4ac97..509da58 100644
--- a/src/config.go
+++ b/src/config.go
@@ -9,28 +9,19 @@ import (
"strconv"
"strings"
"sync/atomic"
- "syscall"
"time"
)
-const (
- ipcErrorIO = syscall.EIO
- ipcErrorNoPeer = syscall.EPROTO
- ipcErrorNoKeyValue = syscall.EPROTO
- ipcErrorInvalidKey = syscall.EPROTO
- ipcErrorInvalidValue = syscall.EPROTO
-)
-
type IPCError struct {
- Code syscall.Errno
+ Code int64
}
func (s *IPCError) Error() string {
return fmt.Sprintf("IPC error: %d", s.Code)
}
-func (s *IPCError) ErrorCode() uintptr {
- return uintptr(s.Code)
+func (s *IPCError) ErrorCode() int64 {
+ return s.Code
}
func ipcGetOperation(device *Device, socket *bufio.ReadWriter) *IPCError {