#include <QHostAddress.h>
This is a Qt compatible IP address container capable of working transparently with IPv4 and IPv6 addresses. It has no network knowledge and so cannot be more intelligent than what the IP specification rules permit (eg; it can't tell if an IPv4 and IPv6 addresses refer to the same machine).
An IPv4 address is 32 bits long whereas IPv6, a substantial improvement over IPv4, is up to 128 bits long (though it can vary). A discussion of IP is beyond the scope of this page, there are hundreds of books and RFC's about the matter which you should consult.
Some mapping though is provided. IPv4 maps to IPv6 where an IPv4 address AA.BB.CC.DD
(if the numbers were in hex) becomes in IPv6 FFFF:AABB:CCDD
. Also loopback is treated specially: 127.0.0.1 is equivalent to ::1 and vice versa. In the comparison operators, 0.0.0.0 is treated as being equivalent to loopback.
See FX::QHostAddressDict for a linear access time dictionary of QHostAddresses. You may also wish to consult FX::Maths::Vector<> for enhanced bit operations for when working with IPv6 addresses.
Definition at line 64 of file QHostAddress.h.