Begin work on outbound packet flow

This commit is contained in:
Mathias Hall-Andersen
2017-06-26 13:14:02 +02:00
parent cf3a5130d3
commit 9d806d3853
9 changed files with 319 additions and 99 deletions

View File

@@ -1,18 +1,22 @@
package main
import (
"log"
"sync"
)
type Device struct {
mutex sync.RWMutex
peers map[NoisePublicKey]*Peer
indices IndexTable
privateKey NoisePrivateKey
publicKey NoisePublicKey
fwMark uint32
listenPort uint16
routingTable RoutingTable
mtu int
mutex sync.RWMutex
peers map[NoisePublicKey]*Peer
indices IndexTable
privateKey NoisePrivateKey
publicKey NoisePublicKey
fwMark uint32
listenPort uint16
routingTable RoutingTable
logger log.Logger
queueWorkOutbound chan *OutboundWorkQueueElement
}
func (device *Device) SetPrivateKey(sk NoisePrivateKey) {