testIp4SubnetFilterRule() — netty Function Reference
Architecture documentation for the testIp4SubnetFilterRule() function in IpSubnetFilterTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d6ce6b18_7463_c831_eb6a_d31727823fb6["testIp4SubnetFilterRule()"] a29baed8_7220_9a86_5676_d9b84ff398ba["IpSubnetFilterTest"] d6ce6b18_7463_c831_eb6a_d31727823fb6 -->|defined in| a29baed8_7220_9a86_5676_d9b84ff398ba cba4d8c1_ee71_7b1a_b7df_9afd19b3641e["IpSubnetFilterRule()"] d6ce6b18_7463_c831_eb6a_d31727823fb6 -->|calls| cba4d8c1_ee71_7b1a_b7df_9afd19b3641e style d6ce6b18_7463_c831_eb6a_d31727823fb6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/ipfilter/IpSubnetFilterTest.java lines 59–73
@Test
public void testIp4SubnetFilterRule() throws Exception {
IpSubnetFilterRule rule = new IpSubnetFilterRule("192.168.56.1", 24, IpFilterRuleType.ACCEPT);
for (int i = 0; i <= 255; i++) {
assertTrue(rule.matches(newSockAddress(String.format("192.168.56.%d", i))));
}
assertFalse(rule.matches(newSockAddress("192.168.57.1")));
rule = new IpSubnetFilterRule("91.114.240.1", 23, IpFilterRuleType.ACCEPT);
assertTrue(rule.matches(newSockAddress("91.114.240.43")));
assertTrue(rule.matches(newSockAddress("91.114.240.255")));
assertTrue(rule.matches(newSockAddress("91.114.241.193")));
assertTrue(rule.matches(newSockAddress("91.114.241.254")));
assertFalse(rule.matches(newSockAddress("91.115.241.2")));
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testIp4SubnetFilterRule() do?
testIp4SubnetFilterRule() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ipfilter/IpSubnetFilterTest.java.
Where is testIp4SubnetFilterRule() defined?
testIp4SubnetFilterRule() is defined in handler/src/test/java/io/netty/handler/ipfilter/IpSubnetFilterTest.java at line 59.
What does testIp4SubnetFilterRule() call?
testIp4SubnetFilterRule() calls 1 function(s): IpSubnetFilterRule.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free