public class IPv4Calculator
extends java.lang.Object
Constructor and Description |
---|
IPv4Calculator() |
Modifier and Type | Method and Description |
---|---|
static int[] |
calcBroadcast(int[] net,
int[] mask)
Calculates the broadcast address for a network adress and netmask
|
static IPv4Address |
calcHostMax(int[] net,
int[] mask)
Calculates the highest possible ip address from an network address and a netmask
|
static IPv4Address |
calcHostMax(IPv4Address net,
IPv4Address netmask)
Calculates the highest possible ip address from an network address and a netmask
|
static IPv4Address |
calcHostMin(int[] net,
int[] mask)
Calculates the lowest possible ip address from an network address and a netmask
|
static IPv4Address |
calcHostMin(IPv4Address net,
IPv4Address netmask)
Calculates the lowest possible ip address from an network address and a netmask
|
static IPv4Address |
calcNetwork(int[] ip,
int[] mask)
Calculates the network address from an ip address and a network mask
|
public static IPv4Address calcNetwork(int[] ip, int[] mask)
ip
- The ip address as int arraymask
- The netmask as int arraypublic static IPv4Address calcHostMin(IPv4Address net, IPv4Address netmask) throws java.lang.Exception
net
- The network address as int arraynetmask
- The netmask as int arrayjava.lang.Exception
public static IPv4Address calcHostMax(IPv4Address net, IPv4Address netmask) throws java.lang.Exception
net
- The network addressnetmask
- The netmaskjava.lang.Exception
public static IPv4Address calcHostMin(int[] net, int[] mask) throws java.lang.Exception
net
- The network addressmask
- The netmaskjava.lang.Exception
public static IPv4Address calcHostMax(int[] net, int[] mask) throws java.lang.Exception
net
- The network address as int arraymask
- The netmask as int arrayjava.lang.Exception
public static int[] calcBroadcast(int[] net, int[] mask)
net
- The network address as int arraymask
- The netmask as int array