MODE="minicom"
-# z = antall svitsjer pr. distro
-# DEN FANTASTISKE Z-KONSTANTEN
-Z = 42
-
import sys
import os
import time
else:
sys.stdout.write(text + "\n")
+# No Z-constant for you!
def retSubnet(sw):
(rad,num) = sw
- b = (((rad * 3)-4) / Z) + 1
- if b == 6:
- b=5
- return "24%s" % b
+ if rad <= 7 or (rad == 8 and (sw <= 3 or sw == 6)):
+ return "241"
+ if rad <= 13 or (rad == 14 and sw != 4) or (rad == 15 and sw <= 3):
+ return "242"
+ if rad <= 22 or (rad == 23 and sw >= 4) or (rad == 24 and sw == 4):
+ return "243"
+ if rad <= 29 or (rad == 30 and (sw == 4 or sw == 5)):
+ return "244"
+ return "245"
def retIP(sw):
(rad,num) = sw