|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MakeIPCounts
MakeIPCounts.java Jim Gast, jgast@cs.wisc.edu MakeIPCounts takes command-line arguments. See: usage() This program counts the number of IP addresses in each IPRange. The output can be redirected to a file (typically IPCounts.txt). IPCounts file format: Each line consists of a canonical IPRange (always includes bitLength), and the Autonomous System Number that owns that range 012.006.104.000/23 AS13625 The input file is expected to already be sorted by IPRange. Note that BGP routing tables sometimes put /24 addresses ahead of the /23 that contains them!
Field Summary | |
static java.text.DecimalFormat |
commas
|
static int |
debugLevel
drives debugging output debugLevel = 5 traces actions in methods 4 logs method entry / exit 3 dumps structures 2 displays internal statistics 1 dumps final statistics |
static IPRange |
fullList
|
static long[] |
ipAddrsOwned
|
static int |
linesRead
|
static int |
rootChildren
|
Constructor Summary | |
MakeIPCounts()
|
Method Summary | |
static void |
main(java.lang.String[] args)
main method starts off with empty tables, builds a List of IPRanges and calculates the number of IP addresses that EXCLUSIVELY match that range. |
static void |
printChildTree(java.lang.String prefix,
IPRange rng)
|
static void |
printCountByASN()
|
static int |
printIPCounts(IPRange mother)
compute the number of IP addresses in each Range, excluding holes |
static void |
readIP2ASFile(java.io.InputStream sysIn)
|
static IPRange |
readIP2ASLine(java.lang.String str)
readRoutingLine finds all pairs of ASNumbers whether on best paths or worst. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int linesRead
public static int rootChildren
public static long[] ipAddrsOwned
public static IPRange fullList
public static int debugLevel
public static java.text.DecimalFormat commas
Constructor Detail |
public MakeIPCounts()
Method Detail |
public static void main(java.lang.String[] args) throws java.io.IOException
args
- options IP2ASTable
java.io.IOException
public static void readIP2ASFile(java.io.InputStream sysIn)
public static IPRange readIP2ASLine(java.lang.String str)
public static int printIPCounts(IPRange mother)
public static void printChildTree(java.lang.String prefix, IPRange rng)
public static void printCountByASN()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |