|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.network.QNetworkAddressEntry
public class QNetworkAddressEntry
The QNetworkAddressEntry class stores one IP address supported by a network interface, along with its associated netmask and broadcast address. Each network interface can contain zero or more IP addresses, which in turn can be associated with a netmask and/or a broadcast address (depending on support from the operating system).
This class represents one such group.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QNetworkAddressEntry()
Constructs an empty QNetworkAddressEntry object. |
|
QNetworkAddressEntry(QNetworkAddressEntry other)
Constructs a QNetworkAddressEntry object that is a copy of the object other. |
Method Summary | |
---|---|
QHostAddress |
broadcast()
Returns the broadcast address associated with the IPv4 address and netmask. |
QNetworkAddressEntry |
clone()
This method is reimplemented for internal reasons |
QHostAddress |
ip()
This function returns one IPv4 or IPv6 address found, that was found in a network interface. |
QHostAddress |
netmask()
Returns the netmask associated with the IP address. |
int |
prefixLength()
Returns the prefix length of this IP address. |
void |
setBroadcast(QHostAddress newBroadcast)
Sets the broadcast IP address of this QNetworkAddressEntry object to newBroadcast. |
void |
setIp(QHostAddress newIp)
Sets the IP address the QNetworkAddressEntry object contains to newIp. |
void |
setNetmask(QHostAddress newNetmask)
Sets the netmask that this QNetworkAddressEntry object contains to newNetmask. |
void |
setPrefixLength(int length)
Sets the prefix length of this IP address to length. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QNetworkAddressEntry()
public QNetworkAddressEntry(QNetworkAddressEntry other)
Method Detail |
---|
public final QHostAddress broadcast()
This member is always empty for IPv6 addresses, since the concept of broadcast has been abandoned in that system in favor of multicast. In particular, the group of hosts corresponding to all the nodes in the local network can be reached by the "all-nodes" special multicast group (address FF02::1).
setBroadcast()
.
public final QHostAddress ip()
setIp()
.
public final QHostAddress netmask()
For IPv6 addresses, the prefix length is converted to an address where the number of bits set to 1 is equal to the prefix length. For a prefix length of 64 bits (the most common value), the netmask will be expressed as a QHostAddress
holding the address FFFF:FFFF:FFFF:FFFF::
setNetmask()
, and prefixLength()
.
public final int prefixLength()
netmask()
). For IPv4 addresses, the value is between 0 and 32. For IPv6 addresses, it's contained between 0 and 128 and is the preferred form of representing addresses. This function returns -1 if the prefix length could not be determined (i.e., netmask()
returns a null QHostAddress()).
setPrefixLength()
, and netmask()
.
public final void setBroadcast(QHostAddress newBroadcast)
broadcast()
.
public final void setIp(QHostAddress newIp)
ip()
.
public final void setNetmask(QHostAddress newNetmask)
netmask()
, and setPrefixLength()
.
public final void setPrefixLength(int length)
Setting the prefix length also sets the netmask (see netmask()
).
prefixLength()
, and setNetmask()
.
public QNetworkAddressEntry clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |