Base class for IP addresses and netmasks.
Methods
|
|
|
|
__cmp__
|
__cmp__ ( self, other )
Compare two addresses/netmasks.
|
|
__hex__
|
__hex__ ( self )
Return the hexadecimal representation of the address/netmask.
|
|
__init__
|
__init__ (
self,
ip,
notation=IP_UNKNOWN,
)
|
|
__int__
|
__int__ ( self )
Return the decimal representation of the address/netmask.
|
|
__long__
|
__long__ ( self )
Return the decimal representation of the address/netmask (long).
|
|
__oct__
|
__oct__ ( self )
Return the octal representation of the address/netmask.
|
|
__str__
|
__str__ ( self )
Print this address/netmask.
|
|
get
|
get ( self )
Return the address/netmask.
|
|
get_bin
|
get_bin ( self )
Return the binary notation of the address/netmask.
|
|
get_dec
|
get_dec ( self )
Return the decimal notation of the address/netmask.
|
|
get_dot
|
get_dot ( self )
Return the dotted decimal notation of the address/netmask.
|
|
get_hex
|
get_hex ( self )
Return the hexadecimal notation of the address/netmask.
|
|
get_oct
|
get_oct ( self )
Return the octal notation of the address/netmask.
|
|
set
|
set (
self,
ip,
notation=IP_UNKNOWN,
)
Set the IP address/netmask.
|