Package io.netty.handler.ipfilter
Class IpSubnetFilterRule.Ip6SubnetFilterRule
java.lang.Object
io.netty.handler.ipfilter.IpSubnetFilterRule.Ip6SubnetFilterRule
- All Implemented Interfaces:
IpFilterRule
- Enclosing class:
IpSubnetFilterRule
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final BigInteger
private final BigInteger
private final IpFilterRuleType
private final BigInteger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Ip6SubnetFilterRule
(Inet6Address ipAddress, int cidrPrefix, IpFilterRuleType ruleType) -
Method Summary
Modifier and TypeMethodDescriptionprivate static BigInteger
ipToInt
(Inet6Address ipAddress) boolean
matches
(InetSocketAddress remoteAddress) private static BigInteger
prefixToSubnetMask
(int cidrPrefix) ruleType()
-
Field Details
-
MINUS_ONE
-
networkAddress
-
subnetMask
-
ruleType
-
-
Constructor Details
-
Ip6SubnetFilterRule
-
-
Method Details
-
matches
- Specified by:
matches
in interfaceIpFilterRule
- Returns:
- This method should return true if remoteAddress is valid according to your criteria. False otherwise.
-
ruleType
- Specified by:
ruleType
in interfaceIpFilterRule
- Returns:
- This method should return
IpFilterRuleType.ACCEPT
if allIpFilterRule.matches(InetSocketAddress)
for whichIpFilterRule.matches(InetSocketAddress)
returns true should the accepted. If you want to exclude all of those IP addresses thenIpFilterRuleType.REJECT
should be returned.
-
ipToInt
-
prefixToSubnetMask
-