Package org.opensearch.common.network
Class Cidrs
java.lang.Object
org.opensearch.common.network.Cidrs
Network Cidrs
- Opensearch.internal:
-
Method Summary
Modifier and TypeMethodDescriptionstatic long[]cidrMaskToMinMax(String cidr) Parses an IPv4 address block in CIDR notation into a pair of longs representing the bottom and top of the address blockstatic StringcreateCIDR(long ipAddress, int networkMask)
-
Method Details
-
cidrMaskToMinMax
Parses an IPv4 address block in CIDR notation into a pair of longs representing the bottom and top of the address block- Parameters:
cidr- an address block in CIDR notation a.b.c.d/n- Returns:
- array representing the address block
- Throws:
IllegalArgumentException- if the cidr can not be parsed
-
createCIDR
-