Revision 3a991f2d test/hs/Test/Ganeti/TestCommon.hs
b/test/hs/Test/Ganeti/TestCommon.hs | ||
---|---|---|
65 | 65 |
import Control.Exception (catchJust) |
66 | 66 |
import Control.Monad |
67 | 67 |
import Data.List |
68 |
import Data.Word |
|
68 | 69 |
import qualified Data.Set as Set |
69 | 70 |
import System.Environment (getEnv) |
70 | 71 |
import System.Exit (ExitCode(..)) |
... | ... | |
280 | 281 |
|
281 | 282 |
-- | Helper function to compute the number of hosts in a network |
282 | 283 |
-- given the netmask. (For IPv4 only.) |
283 |
netmask2NumHosts :: Int -> Int
|
|
284 |
netmask2NumHosts :: Word8 -> Int
|
|
284 | 285 |
netmask2NumHosts n = 2^(32-n) |
285 | 286 |
|
286 | 287 |
-- | Generates an arbitrary IPv6 network address in textual form. |
Also available in: Unified diff