summaryrefslogtreecommitdiff
path: root/dht/src/Data
diff options
context:
space:
mode:
Diffstat (limited to 'dht/src/Data')
-rw-r--r--dht/src/Data/Tox/Relay.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/dht/src/Data/Tox/Relay.hs b/dht/src/Data/Tox/Relay.hs
index 64c90806..1bce76db 100644
--- a/dht/src/Data/Tox/Relay.hs
+++ b/dht/src/Data/Tox/Relay.hs
@@ -72,8 +72,9 @@ data RelayPacket
72newtype PacketNumber = PacketNumber { packetNumberToWord8 :: Word8 } 72newtype PacketNumber = PacketNumber { packetNumberToWord8 :: Word8 }
73 deriving (Eq,Ord,Show) 73 deriving (Eq,Ord,Show)
74 74
75pattern PingPacket = PacketNumber 4 75pattern RoutingRequestPacket = PacketNumber 0
76pattern OnionPacketID = PacketNumber 8 76pattern PingPacket = PacketNumber 4
77pattern OnionPacketID = PacketNumber 8
77 78
78packetNumber :: RelayPacket -> PacketNumber 79packetNumber :: RelayPacket -> PacketNumber
79packetNumber (RelayData _ (ConId conid)) = PacketNumber $ conid -- 0 to 15 not allowed. 80packetNumber (RelayData _ (ConId conid)) = PacketNumber $ conid -- 0 to 15 not allowed.