« Previous | Next » 

Revision 8b312c1d


Added by Manuel Franceschini almost 14 years ago

Introduce new IPAddress classes

This patch unifies the netutils functions dealing with IP addresses to
three classes:
- IPAddress: Common IP address functionality
- IPv4Address: IPv4 specific functionality
- IPv6address: IPv6-specific functionality

Furthermore it adds methods to check whether an address is a loopback
address, replacing the .startswith("127") for IPv4 and adding IPv6

It also provides the basis for future IPv6 address handling. Methods to
convert IP strings to their corresponding interger values will allow to
canonicalize IPv6 addresses.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences