summaryrefslogtreecommitdiffstats
path: root/isys/isys.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-02 21:56:42 +0000
committerMatt Wilson <msw@redhat.com>1999-08-02 21:56:42 +0000
commit2672cf81e733e3d4c041fb209b3dac92ed8d3c00 (patch)
treea98acbc5b7bf4d57c31d1bec54a6dd36bcf91adb /isys/isys.py
parent1c09b275897c8b12e3ba52ea51a99d6115e7884e (diff)
downloadanaconda-2672cf81e733e3d4c041fb209b3dac92ed8d3c00.tar.gz
anaconda-2672cf81e733e3d4c041fb209b3dac92ed8d3c00.tar.xz
anaconda-2672cf81e733e3d4c041fb209b3dac92ed8d3c00.zip
gw and ns
Diffstat (limited to 'isys/isys.py')
-rw-r--r--isys/isys.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 2e5ca6d12..ea85d5d84 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -81,6 +81,22 @@ def inet_calcNetBroad (ip, nm):
return (inet_ntoa (netaddr), inet_ntoa (bcaddr))
+def inet_calcGateway (bc):
+ if isinstance (bc, type ("")):
+ bcaddr = inet_aton (bc)
+ else:
+ bcaddr = ip
+
+ return inet_ntoa (bcaddr - 1)
+
+def inet_calcNS (net):
+ if isinstance (net, type ("")):
+ netaddr = inet_aton (net)
+ else:
+ netaddr = net
+
+ return inet_ntoa (netaddr + 1)
+
try:
_isys.readmoduleinfo("/modules/module-info")
except IOError: