Package org.apache.mina.filter.firewall
Class Subnet
java.lang.Object
org.apache.mina.filter.firewall.Subnet
A IP subnet using the CIDR notation. Currently, only IP version 4
address are supported.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanprivate SubnetUtilsprivate SubnetUtils6 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleaninSubnet(InetAddress address) Checks if theInetAddressis within this subnettoString()
-
Field Details
-
subnetUtils
-
subnetUtils6
-
isIpv6
boolean isIpv6
-
-
Constructor Details
-
Subnet
Creates a subnet from CIDR notation. For example, the subnet 192.168.0.0/24 would be created using theInetAddress192.168.0.0 and the mask 24.- Parameters:
subnet- TheInetAddressof the subnetmask- The mask
-
-
Method Details
-
inSubnet
Checks if theInetAddressis within this subnet- Parameters:
address- TheInetAddressto check- Returns:
- True if the address is within this subnet, false otherwise
-
toString
-
equals
-