Package dns :: Module inet
[show private | hide private]
[frames | no frames]

Module dns.inet

Generic Internet address helper functions.
Function Summary
int af_for_address(text)
Determine the address family of a textual-form network address.
string inet_ntop(family, address)
Convert the binary form of a network address into its textual form.
string inet_pton(family, text)
Convert the textual form of a network address into its binary form.
bool is_multicast(text)
Is the textual-form network address a multicast address?

Function Details

af_for_address(text)

Determine the address family of a textual-form network address.
Parameters:
text - the textual address
           (type=string)
Returns:
int
Raises:
ValueError - the address family cannot be determined from the input.

inet_ntop(family, address)

Convert the binary form of a network address into its textual form.
Parameters:
family - the address family
           (type=int)
address - the binary address
           (type=string)
Returns:
string
Raises:
NotImplementedError - the address family specified is not implemented.

inet_pton(family, text)

Convert the textual form of a network address into its binary form.
Parameters:
family - the address family
           (type=int)
text - the textual address
           (type=string)
Returns:
string
Raises:
NotImplementedError - the address family specified is not implemented.

is_multicast(text)

Is the textual-form network address a multicast address?
Parameters:
text - the textual address
Returns:
bool
Raises:
ValueError - the address family cannot be determined from the input.

Generated by Epydoc 2.1 on Sun Nov 25 17:43:04 2007 http://epydoc.sf.net