From 1670b628cc7accea1c7ecd9359a7dccb6bd50a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 29 Nov 2024 21:40:16 +0100 Subject: Represent root network as an internal variable --- src/Network.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Network.hs') 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 -- cgit v1.2.3