#include <IPCalc.h>
Public Member Functions | |
| IPCalc (string aString1, string aString2) | |
| Constructor for IPCalc (string version). | |
| IPCalc (unsigned long aLong1, unsigned long aLong2) | |
| Constructor for IPCalc (unsigned long version). | |
| unsigned long | getAddress () |
| Get the current address. | |
| unsigned long | getNetworkAddress () |
| Get the current network address. | |
| unsigned long | getIPClass () |
| Get the current IP address class. | |
| unsigned long | getHostNumber () |
| Get the current host number if the current IP address is a host address. | |
| unsigned long | getFirstHost () |
| Get the IP address of the first host on the current network. | |
| unsigned long | getLastHost () |
| Get the IP address of the last host on the current network. | |
| unsigned long | getNetMask () |
| Get the (sub)net mask of the current IP address. | |
| int | isInSameNet (IPCalc aIpc) |
| determines if the IP address contained in the given IPCalc is in the same network as the current IPCalc object | |
| int | isHost () |
| Determines if the current address is a host address. | |
| int | isNetwork () |
| Determines if the current address is a network address. | |
| void | display () |
| display the IPCalc object | |
| int | checkAddress () |
| checks the IPCalc object. Bad cases : IP address is a broadcast, netmask inferior to the IP address class mask eg. 192.168.1.1/255.128.0.0 | |
Static Public Attributes | |
| static const unsigned long | kCLASS_A |
| static const unsigned long | kCLASS_B |
| static const unsigned long | kCLASS_C |
| static const unsigned long | kCLASS_A_NETWORK_MASK |
| static const unsigned long | kCLASS_B_NETWORK_MASK |
| static const unsigned long | kCLASS_C_NETWORK_MASK |
|
||||||||||||
|
Constructor for IPCalc (string version).
|
|
||||||||||||
|
Constructor for IPCalc (unsigned long version).
|
|
|
checks the IPCalc object. Bad cases : IP address is a broadcast, netmask inferior to the IP address class mask eg. 192.168.1.1/255.128.0.0
|
|
|
Get the current address.
|
|
|
Get the IP address of the first host on the current network.
|
|
|
Get the current host number if the current IP address is a host address.
|
|
|
Get the current IP address class.
|
|
|
Get the IP address of the last host on the current network.
|
|
|
Get the (sub)net mask of the current IP address.
|
|
|
Get the current network address.
|
|
|
Determines if the current address is a host address.
|
|
|
determines if the IP address contained in the given IPCalc is in the same network as the current IPCalc object
|
|
|
Determines if the current address is a network address.
|
1.4.4