|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--IPRange
IPRange constructors.
Field Summary | |
static int |
BYTES_PER_ADDRESS
bytes needed to store an IP address range. |
Constructor Summary | |
IPRange(java.net.InetAddress ipAddr,
int bitsLong)
|
|
IPRange(java.lang.String unparsedString)
constuct an IPRange if the bit length is not known. |
|
IPRange(java.lang.String dottedDecimal,
int bitsLong)
creates new IP Address Range Object if the AS Number is not known. |
|
IPRange(java.lang.String dottedDecimal,
java.lang.String givenASN)
|
Method Summary | |
void |
addChild(IPRange kid)
add a subrange as a child to this IPRange. |
void |
checkMask()
verify that the bitLen of the mask for an IP Address is plausible. |
int |
compareTo(java.lang.Object otherRange)
compares this range to another. |
boolean |
covers(IPRange subrange)
true if this range completely covers all addresses in the subrange. |
void |
delChild(int kidLocation)
delete a subrange if its location is known in the children arraylist. |
void |
delChild(IPRange kid)
delete a subrange as a child of this range (used when inserting a larger subrange). |
static byte[] |
discoverAddr(java.lang.String str,
int bitsLong)
discover the 5-byte range for an IP address and mask length. |
static java.lang.String |
discoverBaseIP(java.lang.String str)
accepts a string representation of an IP Range and gives back the base address portion. |
static int |
discoverBitLength(java.lang.String str)
looks up the mask length for an IP Range. |
boolean |
dummy()
true if this IPRange is a dummy range inserted to speed up searches. |
boolean |
equals(java.lang.Object otherRange)
|
static java.net.InetAddress |
findIPv4Address(java.lang.String dottedDecimal)
convert ascii IP address (or name, actually) to an IP address. |
long |
fullRangeCount()
the number of IP Addresses encompassed by this entire range, including any subranges. |
byte[] |
getAddress()
|
java.lang.String |
getASN()
|
int |
getASNum()
|
int |
getBitLength()
|
java.util.ArrayList |
getChildren()
|
long |
getIPCount()
the number of IP Addresses in this range, excluding any subranges. |
java.lang.String |
getPrintedName()
|
boolean |
interior(long address)
true if an IP Address is inside this range. |
static IPRange |
loadAllRanges()
|
long |
longAddr()
returns the long representation of the base address. |
static int |
lookupASNum(java.net.InetAddress address)
|
static int |
lookupASNum(IPAddress ipAddr)
|
static int |
lookupASNum(long address)
translates an IPRange to its Autonomous System number. |
static int |
lookupASNum(java.lang.String address)
|
void |
setASN(int asNumber)
|
void |
setASN(java.lang.String asn)
|
static long |
toLongAddr(byte[] b)
converts a byte array representation of an IP address into a 64-bit long. |
static long |
toLongAddr(java.lang.String str)
converts an IP address string into a numerical address. |
java.lang.String |
toSortString()
|
static java.lang.String |
toSortString(byte[] addr,
int bitLength)
|
static java.lang.String |
toSortString(java.lang.String unparsedString)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int BYTES_PER_ADDRESS
Constructor Detail |
public IPRange(java.lang.String dottedDecimal, int bitsLong)
public IPRange(java.lang.String dottedDecimal, java.lang.String givenASN)
public IPRange(java.lang.String unparsedString)
public IPRange(java.net.InetAddress ipAddr, int bitsLong)
Method Detail |
public static java.net.InetAddress findIPv4Address(java.lang.String dottedDecimal)
public static java.lang.String discoverBaseIP(java.lang.String str)
public static int discoverBitLength(java.lang.String str)
public boolean covers(IPRange subrange)
public long longAddr()
public static long toLongAddr(byte[] b)
public static long toLongAddr(java.lang.String str)
public static byte[] discoverAddr(java.lang.String str, int bitsLong)
public void checkMask()
public void addChild(IPRange kid)
public void delChild(IPRange kid)
public void delChild(int kidLocation)
public java.util.ArrayList getChildren()
public boolean dummy()
public int getASNum()
public byte[] getAddress()
public boolean interior(long address)
public static int lookupASNum(long address)
public static int lookupASNum(java.lang.String address)
public static int lookupASNum(java.net.InetAddress address)
public static int lookupASNum(IPAddress ipAddr)
public static IPRange loadAllRanges()
public int compareTo(java.lang.Object otherRange)
compareTo
in interface java.lang.Comparable
public long fullRangeCount()
public int getBitLength()
public java.lang.String getPrintedName()
public void setASN(java.lang.String asn)
public void setASN(int asNumber)
public java.lang.String getASN()
public long getIPCount()
public boolean equals(java.lang.Object otherRange)
equals
in class java.lang.Object
public static java.lang.String toSortString(java.lang.String unparsedString)
public static java.lang.String toSortString(byte[] addr, int bitLength)
public java.lang.String toSortString()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |