diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-08-11 16:18:20 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-08-11 16:18:20 +0200 |
commit | a4eff12d7f749c992247579161c4ce9e60e2df47 (patch) | |
tree | 6032dd0a96ced8313d7199e569ab657f3ba91ca7 /src/helper_test.go | |
parent | cba1d6585ab9b12ae3e0897db85675ba452c3f09 (diff) |
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 'src/helper_test.go')
-rw-r--r-- | src/helper_test.go | 9 |
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) |