Move tun to subpackage

This commit is contained in:
Jason A. Donenfeld
2018-05-23 02:10:54 +02:00
parent 65a74f3175
commit 0a63188afa
9 changed files with 127 additions and 131 deletions

View File

@@ -41,13 +41,6 @@ func (a *AtomicBool) Set(val bool) {
atomic.StoreInt32(&a.flag, flag)
}
/* Integer manipulation */
func toInt32(n uint32) int32 {
mask := uint32(1 << 31)
return int32(-(n & mask) + (n & ^mask))
}
func min(a, b uint) uint {
if a > b {
return b