summaryrefslogtreecommitdiff
path: root/src/Network.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network.hs')
-rw-r--r--src/Network.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Network.hs b/src/Network.hs
index aa06952..c841acb 100644
--- a/src/Network.hs
+++ b/src/Network.hs
@@ -5,6 +5,7 @@ module Network (
NodeName(..), textNodeName, unpackNodeName,
nextNodeName,
+ rootNetworkVar,
newInternet, delInternet,
newSubnet,
newNode,
@@ -112,6 +113,9 @@ instance ExprType Node where
]
+rootNetworkVar :: TypedVarName Network
+rootNetworkVar = TypedVarName (VarName "$ROOT_NET")
+
nextPrefix :: IpPrefix -> [Word8] -> Word8
nextPrefix _ used = maximum (0 : used) + 1