com.cysols.iodef.analysis.packet
Class Packet

java.lang.Object
  extended by com.cysols.iodef.analysis.packet.Packet
All Implemented Interfaces:
Event

public class Packet
extends Object
implements Event

This class represents a packet itself, this value class has six values as following, and some methods accessing them.

type, timestamp, source ipaddress, source port, destination ip address, destination port

Author:
cysol

Constructor Summary
Packet()
          Default constructor, instantiates an empty packet object.
 
Method Summary
 String getDstIPAddr()
          Returns the destination address of this packet event.
 String getDstPort()
          Returns the destinatin port number of this packet event.
 String getRawData()
          Returns the raw data (original packet dump text) of this packet event.
 String getSrcIPAddr()
          Returns the source address of this packet event.
 String getSrcPort()
          Returns the source port number of this packet event.
 long getTimestamp()
          Retuns the timestamp of this packet event.
 String getType()
          Returns the type (simple description) of this packet event.
 void setDstIPAddr(String dstIPAddr)
          Sets a destination address as the destination address of this packet event.
 void setDstPort(String dstPort)
          Sets a destination port number as the destinatin port number of this packet event.
 void setRawData(String rawdata)
          Sets a raw data (original packet dump text) as the raw data of this packet event.
 void setSrcIPAddr(String srcIPAddr)
          Sets a source address as the source address of this packet event.
 void setSrcPort(String srcPort)
          Sets a source address as the source port number of this packet event.
 void setTimestamp(long timestamp)
          Sets a timestamp as the timestamp of this packet event.
 void setType(String type)
          Sets a type (simple description) as the type of this packet event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Packet

public Packet()
Default constructor, instantiates an empty packet object.

Method Detail

getDstIPAddr

public String getDstIPAddr()
Returns the destination address of this packet event.

Returns:
destination IP address.

setDstIPAddr

public void setDstIPAddr(String dstIPAddr)
Sets a destination address as the destination address of this packet event.

Parameters:
dstIPAddr - destination IP addres.

getDstPort

public String getDstPort()
Returns the destinatin port number of this packet event.

Returns:
destination port number.

setDstPort

public void setDstPort(String dstPort)
Sets a destination port number as the destinatin port number of this packet event.

Parameters:
dstPort - destination port number.

getSrcIPAddr

public String getSrcIPAddr()
Returns the source address of this packet event.

Specified by:
getSrcIPAddr in interface Event
Returns:
source IP address.

setSrcIPAddr

public void setSrcIPAddr(String srcIPAddr)
Sets a source address as the source address of this packet event.

Parameters:
srcIPAddr - source IP address.

getSrcPort

public String getSrcPort()
Returns the source port number of this packet event.

Returns:
source IP address

setSrcPort

public void setSrcPort(String srcPort)
Sets a source address as the source port number of this packet event.

Parameters:
srcPort - source IP address.

getTimestamp

public long getTimestamp()
Retuns the timestamp of this packet event.

Specified by:
getTimestamp in interface Event
Returns:
timestamp milliseconds

setTimestamp

public void setTimestamp(long timestamp)
Sets a timestamp as the timestamp of this packet event.

Parameters:
timestamp - milliseconds

getType

public String getType()
Returns the type (simple description) of this packet event.

Returns:
type description.

setType

public void setType(String type)
Sets a type (simple description) as the type of this packet event.

Parameters:
type - type description.

getRawData

public String getRawData()
Returns the raw data (original packet dump text) of this packet event.

Returns:
raw packet dump data.

setRawData

public void setRawData(String rawdata)
Sets a raw data (original packet dump text) as the raw data of this packet event.

Parameters:
rawdata - row packet dump data.