diff options
-rw-r--r-- | bittorrent/bittorrent.cabal | 4 | ||||
-rw-r--r-- | dht-client.cabal | 4 | ||||
-rw-r--r-- | examples/dhtd.hs | 2 | ||||
-rw-r--r-- | src/Data/Torrent.hs | 2 | ||||
-rw-r--r-- | src/Network/BitTorrent/MainlineDHT.hs | 4 | ||||
-rw-r--r-- | src/Network/Kademlia.hs | 2 | ||||
-rw-r--r-- | src/Network/Kademlia/Routing.hs (renamed from src/Network/DHT/Routing.hs) | 20 | ||||
-rw-r--r-- | src/Network/Kademlia/Search.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox/DHT/Handlers.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox/Onion/Handlers.hs | 2 |
11 files changed, 23 insertions, 23 deletions
diff --git a/bittorrent/bittorrent.cabal b/bittorrent/bittorrent.cabal index 555143f7..bb34e0ec 100644 --- a/bittorrent/bittorrent.cabal +++ b/bittorrent/bittorrent.cabal | |||
@@ -81,7 +81,7 @@ library | |||
81 | Data.Wrapper.PSQInt | 81 | Data.Wrapper.PSQInt |
82 | Data.MinMaxPSQ | 82 | Data.MinMaxPSQ |
83 | Network.Address | 83 | Network.Address |
84 | Network.DHT.Routing | 84 | Network.Kademlia.Routing |
85 | Data.Torrent | 85 | Data.Torrent |
86 | Network.BitTorrent.DHT.ContactInfo | 86 | Network.BitTorrent.DHT.ContactInfo |
87 | Network.BitTorrent.DHT.Token | 87 | Network.BitTorrent.DHT.Token |
@@ -243,7 +243,7 @@ test-suite spec | |||
243 | Network.BitTorrent.DHT.TestData | 243 | Network.BitTorrent.DHT.TestData |
244 | Network.BitTorrent.DHT.MessageSpec | 244 | Network.BitTorrent.DHT.MessageSpec |
245 | Network.BitTorrent.DHT.QuerySpec | 245 | Network.BitTorrent.DHT.QuerySpec |
246 | Network.DHT.RoutingSpec | 246 | Network.Kademlia.RoutingSpec |
247 | Network.BitTorrent.DHT.SessionSpec | 247 | Network.BitTorrent.DHT.SessionSpec |
248 | Network.BitTorrent.DHT.TokenSpec | 248 | Network.BitTorrent.DHT.TokenSpec |
249 | Network.BitTorrent.Internal.CacheSpec | 249 | Network.BitTorrent.Internal.CacheSpec |
diff --git a/dht-client.cabal b/dht-client.cabal index 12f5cddd..afd3f8da 100644 --- a/dht-client.cabal +++ b/dht-client.cabal | |||
@@ -65,7 +65,7 @@ library | |||
65 | Data.Wrapper.PSQInt | 65 | Data.Wrapper.PSQInt |
66 | Data.MinMaxPSQ | 66 | Data.MinMaxPSQ |
67 | Network.Address | 67 | Network.Address |
68 | Network.DHT.Routing | 68 | Network.Kademlia.Routing |
69 | Data.Torrent | 69 | Data.Torrent |
70 | Network.BitTorrent.DHT.ContactInfo | 70 | Network.BitTorrent.DHT.ContactInfo |
71 | Network.BitTorrent.DHT.Token | 71 | Network.BitTorrent.DHT.Token |
@@ -138,7 +138,7 @@ library | |||
138 | Build-depends: network >= 2.4 && < 2.6 | 138 | Build-depends: network >= 2.4 && < 2.6 |
139 | 139 | ||
140 | 140 | ||
141 | other-modules: Paths_bittorrent | 141 | other-modules: Paths_dht_client |
142 | Crypto.Cipher.Salsa | 142 | Crypto.Cipher.Salsa |
143 | Crypto.Cipher.XSalsa | 143 | Crypto.Cipher.XSalsa |
144 | Crypto.ECC.Class | 144 | Crypto.ECC.Class |
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index 5c002363..6c655458 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -52,7 +52,7 @@ import Network.StreamServer | |||
52 | import Network.Kademlia | 52 | import Network.Kademlia |
53 | import qualified Network.BitTorrent.MainlineDHT as Mainline | 53 | import qualified Network.BitTorrent.MainlineDHT as Mainline |
54 | import qualified Network.Tox as Tox | 54 | import qualified Network.Tox as Tox |
55 | import Network.DHT.Routing as R | 55 | import Network.Kademlia.Routing as R |
56 | import Data.Aeson as J (ToJSON, FromJSON) | 56 | import Data.Aeson as J (ToJSON, FromJSON) |
57 | import qualified Data.Aeson as J | 57 | import qualified Data.Aeson as J |
58 | import qualified Data.ByteString.Lazy as L | 58 | import qualified Data.ByteString.Lazy as L |
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs index 55b34f98..4af583ed 100644 --- a/src/Data/Torrent.hs +++ b/src/Data/Torrent.hs | |||
@@ -195,7 +195,7 @@ import System.FilePath | |||
195 | import System.Posix.Types | 195 | import System.Posix.Types |
196 | 196 | ||
197 | import Network.Address | 197 | import Network.Address |
198 | import Network.DHT.Routing | 198 | import Network.Kademlia.Routing |
199 | 199 | ||
200 | 200 | ||
201 | {----------------------------------------------------------------------- | 201 | {----------------------------------------------------------------------- |
diff --git a/src/Network/BitTorrent/MainlineDHT.hs b/src/Network/BitTorrent/MainlineDHT.hs index e7d702c3..4566471a 100644 --- a/src/Network/BitTorrent/MainlineDHT.hs +++ b/src/Network/BitTorrent/MainlineDHT.hs | |||
@@ -60,8 +60,8 @@ import Network.Address (Address, fromAddr, fromSockAddr, | |||
60 | import Network.BitTorrent.DHT.ContactInfo as Peers | 60 | import Network.BitTorrent.DHT.ContactInfo as Peers |
61 | import Network.Kademlia.Search (Search (..)) | 61 | import Network.Kademlia.Search (Search (..)) |
62 | import Network.BitTorrent.DHT.Token as Token | 62 | import Network.BitTorrent.DHT.Token as Token |
63 | import qualified Network.DHT.Routing as R | 63 | import qualified Network.Kademlia.Routing as R |
64 | ;import Network.DHT.Routing (Timestamp, getTimestamp) | 64 | ;import Network.Kademlia.Routing (Timestamp, getTimestamp) |
65 | import Network.QueryResponse | 65 | import Network.QueryResponse |
66 | import Network.Socket | 66 | import Network.Socket |
67 | import System.IO | 67 | import System.IO |
diff --git a/src/Network/Kademlia.hs b/src/Network/Kademlia.hs index 5fb1e334..873fc8c0 100644 --- a/src/Network/Kademlia.hs +++ b/src/Network/Kademlia.hs | |||
@@ -11,7 +11,7 @@ import Data.Maybe | |||
11 | import qualified Data.Set as Set | 11 | import qualified Data.Set as Set |
12 | import Data.Time.Clock (getCurrentTime) | 12 | import Data.Time.Clock (getCurrentTime) |
13 | import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds) | 13 | import Data.Time.Clock.POSIX (getPOSIXTime, utcTimeToPOSIXSeconds) |
14 | import Network.DHT.Routing as R | 14 | import Network.Kademlia.Routing as R |
15 | #ifdef THREAD_DEBUG | 15 | #ifdef THREAD_DEBUG |
16 | import Control.Concurrent.Lifted.Instrument | 16 | import Control.Concurrent.Lifted.Instrument |
17 | #else | 17 | #else |
diff --git a/src/Network/DHT/Routing.hs b/src/Network/Kademlia/Routing.hs index 11dbd11e..7f76ac77 100644 --- a/src/Network/DHT/Routing.hs +++ b/src/Network/Kademlia/Routing.hs | |||
@@ -26,7 +26,7 @@ | |||
26 | {-# LANGUAGE TupleSections #-} | 26 | {-# LANGUAGE TupleSections #-} |
27 | {-# LANGUAGE StandaloneDeriving, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-} | 27 | {-# LANGUAGE StandaloneDeriving, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-} |
28 | {-# OPTIONS_GHC -fno-warn-orphans #-} | 28 | {-# OPTIONS_GHC -fno-warn-orphans #-} |
29 | module Network.DHT.Routing | 29 | module Network.Kademlia.Routing |
30 | {- | 30 | {- |
31 | ( -- * BucketList | 31 | ( -- * BucketList |
32 | BucketList | 32 | BucketList |
@@ -40,12 +40,12 @@ module Network.DHT.Routing | |||
40 | , NodeCount | 40 | , NodeCount |
41 | 41 | ||
42 | -- * Query | 42 | -- * Query |
43 | , Network.DHT.Routing.null | 43 | , Network.Kademlia.Routing.null |
44 | , Network.DHT.Routing.full | 44 | , Network.Kademlia.Routing.full |
45 | , thisId | 45 | , thisId |
46 | , shape | 46 | , shape |
47 | , Network.DHT.Routing.size | 47 | , Network.Kademlia.Routing.size |
48 | , Network.DHT.Routing.depth | 48 | , Network.Kademlia.Routing.depth |
49 | , compatibleNodeId | 49 | , compatibleNodeId |
50 | 50 | ||
51 | -- * Lookup | 51 | -- * Lookup |
@@ -55,14 +55,14 @@ module Network.DHT.Routing | |||
55 | , kclosest | 55 | , kclosest |
56 | 56 | ||
57 | -- * Construction | 57 | -- * Construction |
58 | , Network.DHT.Routing.nullTable | 58 | , Network.Kademlia.Routing.nullTable |
59 | , Event(..) | 59 | , Event(..) |
60 | , CheckPing(..) | 60 | , CheckPing(..) |
61 | , Network.DHT.Routing.insert | 61 | , Network.Kademlia.Routing.insert |
62 | 62 | ||
63 | -- * Conversion | 63 | -- * Conversion |
64 | , Network.DHT.Routing.TableEntry | 64 | , Network.Kademlia.Routing.TableEntry |
65 | , Network.DHT.Routing.toList | 65 | , Network.Kademlia.Routing.toList |
66 | 66 | ||
67 | -- * Routing | 67 | -- * Routing |
68 | , Timestamp | 68 | , Timestamp |
@@ -436,7 +436,7 @@ mapTable g f tbl@(BucketList self bkts) = reify (contramapC g $ bucketCompare bk | |||
436 | resolve = const id | 436 | resolve = const id |
437 | 437 | ||
438 | instance (Eq ni) => Eq (BucketList ni) where | 438 | instance (Eq ni) => Eq (BucketList ni) where |
439 | (==) = (==) `on` Network.DHT.Routing.toList | 439 | (==) = (==) `on` Network.Kademlia.Routing.toList |
440 | 440 | ||
441 | #if 0 | 441 | #if 0 |
442 | 442 | ||
diff --git a/src/Network/Kademlia/Search.hs b/src/Network/Kademlia/Search.hs index 195bed14..71107fbd 100644 --- a/src/Network/Kademlia/Search.hs +++ b/src/Network/Kademlia/Search.hs | |||
@@ -26,7 +26,7 @@ import qualified Data.MinMaxPSQ as MM | |||
26 | import qualified Data.Wrapper.PSQ as PSQ | 26 | import qualified Data.Wrapper.PSQ as PSQ |
27 | ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ, PSQKey) | 27 | ;import Data.Wrapper.PSQ (pattern (:->), Binding, PSQ, PSQKey) |
28 | import Network.Address hiding (NodeId) | 28 | import Network.Address hiding (NodeId) |
29 | import Network.DHT.Routing as R | 29 | import Network.Kademlia.Routing as R |
30 | #ifdef THREAD_DEBUG | 30 | #ifdef THREAD_DEBUG |
31 | import Control.Concurrent.Lifted.Instrument | 31 | import Control.Concurrent.Lifted.Instrument |
32 | #else | 32 | #else |
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index 7279c2e3..c49cfe90 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -71,7 +71,7 @@ import Network.Address (Address, WantIP (..), either4or6, | |||
71 | sockAddrPort, testIdBit, | 71 | sockAddrPort, testIdBit, |
72 | toSockAddr, un4map) | 72 | toSockAddr, un4map) |
73 | import Network.Kademlia.Search (Search (..)) | 73 | import Network.Kademlia.Search (Search (..)) |
74 | import qualified Network.DHT.Routing as R | 74 | import qualified Network.Kademlia.Routing as R |
75 | import Network.QueryResponse | 75 | import Network.QueryResponse |
76 | import Network.Socket | 76 | import Network.Socket |
77 | import System.Endian | 77 | import System.Endian |
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs index 2dc183cd..4e43c4a7 100644 --- a/src/Network/Tox/DHT/Handlers.hs +++ b/src/Network/Tox/DHT/Handlers.hs | |||
@@ -11,7 +11,7 @@ import Network.Kademlia.Search | |||
11 | import qualified Data.Wrapper.PSQInt as Int | 11 | import qualified Data.Wrapper.PSQInt as Int |
12 | import Network.Kademlia | 12 | import Network.Kademlia |
13 | import Network.Address (WantIP (..), ipFamily, testIdBit,fromSockAddr, sockAddrPort) | 13 | import Network.Address (WantIP (..), ipFamily, testIdBit,fromSockAddr, sockAddrPort) |
14 | import qualified Network.DHT.Routing as R | 14 | import qualified Network.Kademlia.Routing as R |
15 | import Control.TriadCommittee | 15 | import Control.TriadCommittee |
16 | import System.Global6 | 16 | import System.Global6 |
17 | 17 | ||
diff --git a/src/Network/Tox/Onion/Handlers.hs b/src/Network/Tox/Onion/Handlers.hs index f02bac98..9dc6177c 100644 --- a/src/Network/Tox/Onion/Handlers.hs +++ b/src/Network/Tox/Onion/Handlers.hs | |||
@@ -18,7 +18,7 @@ import Data.Serialize as S | |||
18 | import qualified Data.Wrapper.PSQInt as Int | 18 | import qualified Data.Wrapper.PSQInt as Int |
19 | import Network.Kademlia | 19 | import Network.Kademlia |
20 | import Network.Address (WantIP (..), ipFamily, testIdBit) | 20 | import Network.Address (WantIP (..), ipFamily, testIdBit) |
21 | import qualified Network.DHT.Routing as R | 21 | import qualified Network.Kademlia.Routing as R |
22 | import Control.TriadCommittee | 22 | import Control.TriadCommittee |
23 | import qualified Data.MinMaxPSQ as MinMaxPSQ | 23 | import qualified Data.MinMaxPSQ as MinMaxPSQ |
24 | ;import Data.MinMaxPSQ (MinMaxPSQ') | 24 | ;import Data.MinMaxPSQ (MinMaxPSQ') |