diff options
Diffstat (limited to 'src/routing.go')
-rw-r--r-- | src/routing.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/routing.go b/src/routing.go index 553df11..4189c25 100644 --- a/src/routing.go +++ b/src/routing.go @@ -2,7 +2,6 @@ package main import ( "errors" - "fmt" "net" "sync" ) @@ -52,25 +51,3 @@ func (table *RoutingTable) LookupIPv6(address []byte) *Peer { defer table.mutex.RUnlock() return table.IPv6.Lookup(address) } - -func OutgoingRoutingWorker(device *Device, queue chan []byte) { - for { - packet := <-queue - switch packet[0] >> 4 { - - case IPv4version: - dst := packet[IPv4offsetDst : IPv4offsetDst+net.IPv4len] - peer := device.routingTable.LookupIPv4(dst) - fmt.Println("IPv4", peer) - - case IPv6version: - dst := packet[IPv6offsetDst : IPv6offsetDst+net.IPv6len] - peer := device.routingTable.LookupIPv6(dst) - fmt.Println("IPv6", peer) - - default: - // todo: log - fmt.Println("Unknown IP version") - } - } -} |