修复读取配置IP冲突问题

This commit is contained in:
wanglihui
2021-09-23 18:36:27 +08:00
parent e930fa23ed
commit 77bc6a844e
5 changed files with 47 additions and 28 deletions

View File

@@ -41,8 +41,8 @@ public class IpTest {
IPAddress pv43 = new IPAddressString("fc00::").getAddress();
IPAddress pv44 = new IPAddressString("fc00::10:1").getAddress();
IPAddress pv45 = new IPAddressString("12.56.4.3/24").getAddress();
IPAddress pv46 = new IPAddressString("12.56.4.0/24").getAddress();
IPAddress pv45 = new IPAddressString("192.168.42.1/32").getAddress();
IPAddress pv46 = new IPAddressString("192.168.42.1/32").getAddress();
IPAddress pv47 = new IPAddressString("12.56.4.0").getAddress();
System.out.println(pv45.isMultiple());
System.out.println(pv46.isMultiple());
@@ -50,6 +50,8 @@ public class IpTest {
System.out.println(pv47.isPrefixed());
System.out.println(pv45+"---"+pv45.toMaxHost().withoutPrefixLength()+"---"+pv45.adjustPrefixLength(pv45.getBitCount()));
System.out.println(pv45.adjustPrefixLength(pv45.getBitCount())+"---"+pv45.toMaxHost().withoutPrefixLength());
/*
System.out.println(str5.getUpper()+"---"+str5.getLower());