|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.importer.analysis.HostCommRenderer
public class HostCommRenderer
Each host is stored as an HostCommRenderer object in a HashMap in the SnifferThread. In such an object the found information about a host will be stored. For each portnumber a new PortDescriptor will be used.
| Field Summary | |
|---|---|
private Vector |
children
The children of this host, form a tree view. |
private String |
hostName
|
private String |
ipAddress
|
private Logger |
log
|
private String |
MACAddress
|
private Vector |
neighbours
The neightbours of this host, form a graph view. |
private String |
operatingSystem
Textual information about the operating system to add into the node description. |
private HostCommRenderer |
parent
The partent of this host, form a tree view. |
private HashMap |
portsMap
|
private int |
xpos
|
private int |
ypos
|
| Constructor Summary | |
|---|---|
HostCommRenderer(String ipAddress,
String HWA)
Creates a new host renderer and tries to lookup host name using reverse DNS in a separate thread. |
|
HostCommRenderer(String hostname,
String ipAddress,
String HWA)
Creates a new host renderer with known host name. |
|
| Method Summary | |
|---|---|
void |
addChild(HostCommRenderer child)
Add a child to the host associated with this renderer |
void |
addNeighbour(HostCommRenderer neighbour)
Add a neighbour of the host associated with this renderer. |
PortDescriptor |
createPortDescriptor(String protocol,
int port,
String state)
Create a new PortDescriptor and add it to the host. |
HostCommRenderer |
getChild(int i)
Fetch a specified child. |
HostCommRenderer |
getChild(String ip)
Test if the host associated with this renderer has a specified child. |
int |
getChildCount()
Fetch the number of childs of the host associated with this renderer. |
Vector |
getChildren()
Fetch the childs, ie. this host is one step closer to the root than its childs. |
String |
getHostName()
Fetch the name of the host associated with this renderer. |
String |
getIpAddress()
Fetch the IP address of the host associated with this renderer. |
String |
getMACAdress()
Fetch the MAC Address of the host associated with this renderer. |
Vector |
getNeighbours()
Get the neighbours of the host associated with this renderer. |
HostCommRenderer |
getParent()
Fetch the parent of the host associated with this renderer. |
PortDescriptor |
getPortDescriptor(int port)
Fetch a PortDescriptor. |
int[] |
getPortsList()
Fetch the used ports on this host. |
int |
getXpos()
Fetch the x postion. |
int |
getYpos()
Fetch the y position. |
boolean |
hasChild(String ip)
Test if the host associated with this renderer has a specified child. |
void |
removeChild(HostCommRenderer child)
Add a child to the host associated with this renderer |
void |
setChildren(Vector childs)
Fetch the children of the host associated with this renderer. |
void |
setHostName(String hostName)
Set the name of the host associated with this renderer. |
void |
setOperatingSystem(String os)
Set the operating system. |
void |
setParent(HostCommRenderer parent)
Set the partent of the host associated with this renderer. |
void |
setXPos(int x)
Set the x position to hnow, where the node should be placed in the gui. |
void |
setYPos(int y)
Set the y position to hnow, where the node should be placed in the gui. |
String |
toString()
Convert this host renderer to a readable string. |
void |
updateNode(Element node)
Add the scan result to a node xml tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String ipAddress
private String hostName
private String operatingSystem
setOperatingSystem(String).
private String MACAddress
private HashMap portsMap
private Logger log
private Vector children
private Vector neighbours
private HostCommRenderer parent
private int xpos
private int ypos
| Constructor Detail |
|---|
public HostCommRenderer(String ipAddress,
String HWA)
ipAddress - the ip address of the hostHWA - the hardware address (MAC) of the host
public HostCommRenderer(String hostname,
String ipAddress,
String HWA)
hostname - the host name without domainipAddress - The IP address in string notation: 123.231.132.213HWA - Hardware (MAC) address| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getIpAddress()
public String getHostName()
public String getMACAdress()
public void setHostName(String hostName)
hostName - The host name as a string.public void setOperatingSystem(String os)
os - Operating system.public int[] getPortsList()
public PortDescriptor getPortDescriptor(int port)
port - Portnumber
public PortDescriptor createPortDescriptor(String protocol,
int port,
String state)
protocol - one of tcp, udp or ipport - the tcp/udp portnumberstate - nmap state string for the port (open, closed, ...)
public void updateNode(Element node)
node - The XML of a node element, as returned by PCNode.public void addChild(HostCommRenderer child)
child - The child to add.public void removeChild(HostCommRenderer child)
child - The child to add.public Vector getChildren()
public Vector getNeighbours()
public void addNeighbour(HostCommRenderer neighbour)
neighbour - The host, which is a neighbour of the host associated with this renderer.public void setParent(HostCommRenderer parent)
parent - The parent node.public void setChildren(Vector childs)
childs - A vector, which contains the HostCommRenderer objects of the childs.public HostCommRenderer getParent()
public void setXPos(int x)
x - The x postion.public int getXpos()
public void setYPos(int y)
y - The y position.public int getYpos()
public int getChildCount()
public HostCommRenderer getChild(int i)
i - The number, ie index, of the child
public boolean hasChild(String ip)
ip - The ip of the child.
public HostCommRenderer getChild(String ip)
ip - The ip of the child.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||