Package ZenUtils :: Module IpUtil
[show private | hide private]
[frames | no frames]

Module ZenUtils.IpUtil

Util

Utility functions for the Confmon Product

$Id: IpUtil.py,v 1.4 2002/12/18 18:50:47 edahl Exp $
Exceptions
IpAddressError  

Function Summary
  bitsToMask(netbits)
  bitsToMaskNumb(netbits)
convert integer number of netbits to string netmask
  checkip(ip)
check that an ip is valid
  getnet(ip, netmask)
get network address of ip as string netmask is in form 255.255.255.0
  getnetstr(ip, netmask)
return network number as string
  hexToBits(hex)
convert hex number (0xff000000 of netbits to numeric netmask (8)
  hexToMask(hex)
converts a netmask represented in hex to octets represented in decimal.
  ipFromIpMask(ipmask)
get just the ip from an ip mask pair like 1.1.1.1/24
  maskToBits(netmask)
convert string rep of netmask to number of bits
  numbip(ip)
convert a string ip to number
  strip(ip)
convert a number ip to a string

Variable Summary
str __version__ = '1.4'

Function Details

bitsToMaskNumb(netbits)

convert integer number of netbits to string netmask

checkip(ip)

check that an ip is valid

getnet(ip, netmask)

get network address of ip as string netmask is in form 255.255.255.0

getnetstr(ip, netmask)

return network number as string

hexToBits(hex)

convert hex number (0xff000000 of netbits to numeric netmask (8)

hexToMask(hex)

converts a netmask represented in hex to octets represented in decimal. e.g. "0xffffff00" -> "255.255.255.0"

ipFromIpMask(ipmask)

get just the ip from an ip mask pair like 1.1.1.1/24

maskToBits(netmask)

convert string rep of netmask to number of bits

numbip(ip)

convert a string ip to number

strip(ip)

convert a number ip to a string

Variable Details

__version__

Type:
str
Value:
'1.4'                                                                  

Generated by Epydoc 2.1 on Thu Aug 16 09:55:13 2007 http://epydoc.sf.net