aboutsummaryrefslogtreecommitdiffstats
path: root/src/helper_test.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-08-11 16:18:20 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-08-11 16:18:20 +0200
commita4eff12d7f749c992247579161c4ce9e60e2df47 (patch)
tree6032dd0a96ced8313d7199e569ab657f3ba91ca7 /src/helper_test.go
parentNumber of fixes in response to code review (diff)
downloadwireguard-go-a4eff12d7f749c992247579161c4ce9e60e2df47.tar.xz
wireguard-go-a4eff12d7f749c992247579161c4ce9e60e2df47.zip
Improved receive.go
- Fixed configuration listen-port semantics - Improved receive.go code for updating listen port - Updated under load detection, how follows the kernel space implementation - Fixed trie bug accidentally introduced in last commit - Added interface name to log (format still subject to change) - Can now configure the logging level using the LOG_LEVEL variable - Begin porting netsh.sh tests - A number of smaller changes
Diffstat (limited to '')
-rw-r--r--src/helper_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/helper_test.go b/src/helper_test.go
index 3838a7c..fc171e8 100644
--- a/src/helper_test.go
+++ b/src/helper_test.go
@@ -12,6 +12,7 @@ type DummyTUN struct {
name string
mtu int
packets chan []byte
+ events chan TUNEvent
}
func (tun *DummyTUN) Name() string {
@@ -27,6 +28,14 @@ func (tun *DummyTUN) Write(d []byte) (int, error) {
return len(d), nil
}
+func (tun *DummyTUN) Close() error {
+ return nil
+}
+
+func (tun *DummyTUN) Events() chan TUNEvent {
+ return tun.events
+}
+
func (tun *DummyTUN) Read(d []byte) (int, error) {
t := <-tun.packets
copy(d, t)