Package | Description |
---|---|
org.jboss.netty.handler.ipfilter |
Implementation of a Ip based Filter handlers.
|
Modifier and Type | Interface and Description |
---|---|
interface |
IpFilterRule
This Interface defines an Ip Filter Rule.
|
Modifier and Type | Class and Description |
---|---|
class |
IpSubnet
This class allows to check if an IP V4 or V6 Address is contained in a subnet.
Supported IP V4 Formats for the Subnets are: 1.1.1.1/255.255.255.255 or 1.1.1.1/32 (CIDR-Notation) and (InetAddress,Mask) where Mask is a integer for CIDR-notation or a String for Standard Mask notation. Example1: IpV4Subnet ips = new IpV4Subnet("192.168.1.0/24"); System.out.println("Result: "+ ips.contains("192.168.1.123")); System.out.println("Result: "+ ips.contains(inetAddress2)); Example1 bis: IpV4Subnet ips = new IpV4Subnet(inetAddress, 24); where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123 Example2: IpV4Subnet ips = new IpV4Subnet("192.168.1.0/255.255.255.0"); System.out.println("Result: "+ ips.contains("192.168.1.123")); System.out.println("Result: "+ ips.contains(inetAddress2)); Example2 bis: IpV4Subnet ips = new IpV4Subnet(inetAddress, "255.255.255.0"); where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123 Supported IP V6 Formats for the Subnets are: a:b:c:d:e:f:g:h/NN (CIDR-Notation) or any IPV6 notations (like a:b:c:d::/NN, a:b:c:d:e:f:w.x.y.z/NN) and (InetAddress,Mask) where Mask is a integer for CIDR-notation and (InetAddress,subnet). Example1: IpSubnet ips = new IpSubnet("1fff:0:0a88:85a3:0:0:0:0/24"); IpSubnet ips = new IpSubnet("1fff:0:0a88:85a3::/24"); System.out.println("Result: "+ ips.contains("1fff:0:0a88:85a3:0:0:ac1f:8001")); System.out.println("Result: "+ ips.contains(inetAddress2)); Example1 bis: IpSubnet ips = new IpSubnet(inetAddress, 24); where inetAddress2 is 1fff:0:0a88:85a3:0:0:ac1f:8001 |
class |
IpSubnetFilterRule
Ip V4 and Ip V6 filter rule.
Note that mix of IPV4 and IPV6 is allowed but it is not recommended. |
class |
IpV4Subnet
This class allows to check if an IP-V4-Address is contained in a subnet.
Supported Formats for the Subnets are: 1.1.1.1/255.255.255.255 or 1.1.1.1/32 (CIDR-Notation) and (InetAddress,Mask) where Mask is a integer for CIDR-notation or a String for Standard Mask notation. Example1: IpV4Subnet ips = new IpV4Subnet("192.168.1.0/24"); System.out.println("Result: "+ ips.contains("192.168.1.123")); System.out.println("Result: "+ ips.contains(inetAddress2)); Example1 bis: IpV4Subnet ips = new IpV4Subnet(inetAddress, 24); where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123 Example2: IpV4Subnet ips = new IpV4Subnet("192.168.1.0/255.255.255.0"); System.out.println("Result: "+ ips.contains("192.168.1.123")); System.out.println("Result: "+ ips.contains(inetAddress2)); Example2 bis: IpV4Subnet ips = new IpV4Subnet(inetAddress, "255.255.255.0"); where inetAddress is 192.168.1.0 and inetAddress2 is 192.168.1.123 |
class |
IpV4SubnetFilterRule
IpV4 only Filter Rule
|
class |
PatternRule
The Class PatternRule represents an IP filter rule using string patterns.
|
Copyright © 2008–2016 The Netty Project. All rights reserved.