Qt 4.8
|
#include <qhostaddress_p.h>
Public Functions | |
int | prefixLength () const |
QNetmaskAddress () | |
bool | setAddress (const QString &address) |
bool | setAddress (const QHostAddress &address) |
void | setPrefixLength (QAbstractSocket::NetworkLayerProtocol proto, int len) |
Public Functions inherited from QHostAddress | |
void | clear () |
Sets the host address to 0.0.0.0. More... | |
bool | isInSubnet (const QHostAddress &subnet, int netmask) const |
Returns true if this IP is in the subnet described by the network prefix subnet and netmask netmask. More... | |
bool | isInSubnet (const QPair< QHostAddress, int > &subnet) const |
Returns true if this IP is in the subnet described by subnet. More... | |
bool | isNull () const |
Returns true if this host address is null (INADDR_ANY or in6addr_any). More... | |
bool | operator!= (const QHostAddress &address) const |
Returns true if this host address is not the same as the other address given; otherwise returns false. More... | |
bool | operator!= (SpecialAddress address) const |
Returns true if this host address is not the same as the other address given; otherwise returns false. More... | |
QHostAddress & | operator= (const QHostAddress &other) |
Assigns another host address to this object, and returns a reference to this object. More... | |
QHostAddress & | operator= (const QString &address) |
Assigns the host address address to this object, and returns a reference to this object. More... | |
bool | operator== (const QHostAddress &address) const |
Returns true if this host address is the same as the other address given; otherwise returns false. More... | |
bool | operator== (SpecialAddress address) const |
Returns true if this host address is the same as the other address given; otherwise returns false. More... | |
QAbstractSocket::NetworkLayerProtocol | protocol () const |
Returns the network layer protocol of the host address. More... | |
QHostAddress () | |
Constructs a host address object with the IP address 0.0.0.0. More... | |
QHostAddress (quint32 ip4Addr) | |
Constructs a host address object with the IPv4 address ip4Addr. More... | |
QHostAddress (quint8 *ip6Addr) | |
Constructs a host address object with the IPv6 address ip6Addr. More... | |
QHostAddress (const Q_IPV6ADDR &ip6Addr) | |
Constructs a host address object with the IPv6 address ip6Addr. More... | |
QHostAddress (const sockaddr *sockaddr) | |
Constructs an IPv4 or IPv6 address using the address specified by the native structure sockaddr. More... | |
QHostAddress (const QString &address) | |
Constructs an IPv4 or IPv6 address based on the string address (e.g., "127.0.0.1"). More... | |
QHostAddress (const QHostAddress ©) | |
Constructs a copy of the given address. More... | |
QHostAddress (SpecialAddress address) | |
Constructs a QHostAddress object for address. More... | |
QString | scopeId () const |
Returns the scope ID of an IPv6 address. More... | |
void | setAddress (quint32 ip4Addr) |
Set the IPv4 address specified by ip4Addr. More... | |
void | setAddress (quint8 *ip6Addr) |
Set the IPv6 address specified by ip6Addr. More... | |
void | setAddress (const Q_IPV6ADDR &ip6Addr) |
Set the IPv6 address specified by ip6Addr. More... | |
void | setAddress (const sockaddr *sockaddr) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the IPv4 or IPv6 address specified by the native structure sockaddr. More... | |
bool | setAddress (const QString &address) |
Sets the IPv4 or IPv6 address specified by the string representation specified by address (e. More... | |
void | setScopeId (const QString &id) |
Sets the IPv6 scope ID of the address to id. More... | |
quint32 | toIPv4Address () const |
Returns the IPv4 address as a number. More... | |
Q_IPV6ADDR | toIPv6Address () const |
Returns the IPv6 address as a Q_IPV6ADDR structure. More... | |
QString | toString () const |
Returns the address as a string. More... | |
~QHostAddress () | |
Destroys the host address object. More... | |
Properties | |
int | length |
Additional Inherited Members | |
Public Types inherited from QHostAddress | |
enum | SpecialAddress { Null, Broadcast, LocalHost, LocalHostIPv6, Any, AnyIPv6 } |
Static Public Functions inherited from QHostAddress | |
static QPair< QHostAddress, int > | parseSubnet (const QString &subnet) |
Parses the IP and subnet information contained in subnet and returns the network prefix for that network and its prefix length. More... | |
Protected Variables inherited from QHostAddress | |
QScopedPointer< QHostAddressPrivate > | d |
Related Functions inherited from QHostAddress | |
QDataStream & | operator<< (QDataStream &out, const QHostAddress &address) |
Writes host address address to the stream out and returns a reference to the stream. More... | |
QDataStream & | operator>> (QDataStream &in, QHostAddress &address) |
Reads a host address into address from the stream in and returns a reference to the stream. More... | |
Definition at line 61 of file qhostaddress_p.h.
|
inline |
Definition at line 65 of file qhostaddress_p.h.
int QNetmaskAddress::prefixLength | ( | ) | const |
Definition at line 388 of file qhostaddress.cpp.
Referenced by QHostAddress::parseSubnet(), QNetworkAddressEntry::prefixLength(), and QNetmaskAddress().
bool QNetmaskAddress::setAddress | ( | const QString & | address | ) |
Definition at line 299 of file qhostaddress.cpp.
Referenced by QHostAddress::parseSubnet(), QNetmaskAddress(), and QNetworkAddressEntry::setNetmask().
bool QNetmaskAddress::setAddress | ( | const QHostAddress & | address | ) |
Definition at line 306 of file qhostaddress.cpp.
void QNetmaskAddress::setPrefixLength | ( | QAbstractSocket::NetworkLayerProtocol | proto, |
int | len | ||
) |
Definition at line 393 of file qhostaddress.cpp.
Referenced by QNetmaskAddress(), and QNetworkAddressEntry::setPrefixLength().
|
private |
Definition at line 63 of file qhostaddress_p.h.