From 5e152be2dd6f708410cb46e671245e649991f92b Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Mon, 2 Aug 1999 15:16:56 +0000 Subject: o New interface requirements: exceptionWindow, messageWindow o Network device configuration, configuration file writing o Root password dialog, /etc/password modification o isys has the ntoa and aton functions in it now --- isys/isys.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'isys/isys.py') diff --git a/isys/isys.py b/isys/isys.py index e350d10d0..664cbbfe7 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -1,4 +1,5 @@ import _isys +import string def mount(device, location, fstype = "ext2"): return _isys.mount(fstype, device, location) @@ -30,7 +31,20 @@ def moduleListByType(type): def makeDevInode(name, fn): return _isys.mkdevinode(name, fn) - + +def inet_ntoa (addr): + return "%d.%d.%d.%d" % ((addr >> 24) & 0x000000ff, + (addr >> 16) & 0x000000ff, + (addr >> 8) & 0x000000ff, + addr & 0x000000ff) + +def inet_aton (addr): + quad = string.splitfields (addr, ".") + return ((string.atoi (quad[0]) << 24) + + (string.atoi (quad[1]) << 16) + + (string.atoi (quad[2]) << 8) + + string.atoi (quad[3])) + try: _isys.readmoduleinfo("/modules/module-info") except IOError: -- cgit