diff options
Diffstat (limited to 'module/ri-engine/src/main/java')
-rw-r--r-- | module/ri-engine/src/main/java/io/trygvis/rules/network/IpCalc.java (renamed from module/ri-engine/src/main/java/io/trygvis/rules/acme/IpCalc.java) | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/module/ri-engine/src/main/java/io/trygvis/rules/acme/IpCalc.java b/module/ri-engine/src/main/java/io/trygvis/rules/network/IpCalc.java index 5369d62..e40e169 100644 --- a/module/ri-engine/src/main/java/io/trygvis/rules/acme/IpCalc.java +++ b/module/ri-engine/src/main/java/io/trygvis/rules/network/IpCalc.java @@ -1,26 +1,10 @@ -package io.trygvis.rules.acme; +package io.trygvis.rules.network; -import io.trygvis.rules.network.Ipv4Cidr; - -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.ArrayList; -import java.util.List; import java.util.regex.Pattern; public class IpCalc { private static final Pattern pattern = Pattern.compile("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})/([0-9]{1,3})"); - public static class FirstLast { - public final int first; - public final int last; - - public FirstLast(int first, int last) { - this.first = first; - this.last = last; - } - } - public static Ipv4Cidr cidr(String cidr) { var matcher = pattern.matcher(cidr); if (!matcher.matches()) { |