WireGuard / wgctrl-go

Package wgctrl enables control of WireGuard interfaces on multiple platforms.
https://godoc.org/golang.zx2c4.com/wireguard/wgctrl
MIT License
727 stars 85 forks source link

internal/openbsd: initial hooks and test for Client.Devices #52

Closed mdlayher closed 5 years ago

mdlayher commented 5 years ago

The idea here is to enable testing as much of the functionality in the package as possible, without having to actually do the real ioctl calls. These hooks can emulate what the kernel implementation is doing, although manipulating cbuf unsafe.Pointer to populate it in the tests feels a little iffy. Feedback is welcome.