| Trees | Index | Help |
|
|---|
| Package ZenUtils :: Module 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)
| |
convert integer number of netbits to string netmask | |
check that an ip is valid | |
get network address of ip as string netmask is in form 255.255.255.0 | |
return network number as string | |
convert hex number (0xff000000 of netbits to numeric netmask (8) | |
converts a netmask represented in hex to octets represented in decimal. | |
get just the ip from an ip mask pair like 1.1.1.1/24 | |
convert string rep of netmask to number of bits | |
convert a string ip to number | |
convert a number ip to a string | |
| Variable Summary | |
|---|---|
str |
__version__ = '1.4'
|
tuple |
_masks = (255L, 65280L, 16711680L, 4278190080L)
|
builtin_function_or_method |
isip = _sre.SRE_Pattern.search |
| 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__
|
_masks
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Aug 16 09:55:13 2007 | http://epydoc.sf.net |