ipcalc
index
/home/harald/cvs/netconf.old/src/ipcalc.py

# Python wrapper for ipcalc command line IP address manipulation tool
# Copyright (c) 2001 Red Hat, Inc. All rights reserved.
#
# This software may be freely redistributed under the terms of the GNU
# public license.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Author: Preston Brown <pbrown@redhat.com>

 
Modules
            
os
re

 
Classes
            
IPCalc

 
class IPCalc
      A wrapper class that encapsulates the command line
functionality of the ipcalc command, providing access to computing
network prefixes, netmasks, etc. from python.
 
  
__init__(self, address, prefix=None, netmask=None)
Initialize an IPCalc object.  Address must be provided, and
in order for most of the other calculations to be possible,
one of prefix or netmask must also be provided.
broadcast(self)
netmask(self)
network(self)
prefix(self)

 
Functions
            
test()
Test function for the IPCalc class.

 
Data
             __file__ = './ipcalc.pyc'
__name__ = 'ipcalc'