verinec.netsim.entities.packets
Class IPPacket

java.lang.Object
  extended by desmoj.core.simulator.NamedObject
      extended by desmoj.core.simulator.ModelComponent
          extended by desmoj.core.simulator.Schedulable
              extended by desmoj.core.simulator.Entity
                  extended by verinec.netsim.entities.packets.Packet
                      extended by verinec.netsim.entities.packets.Leaf
                          extended by verinec.netsim.entities.packets.IPPacket
All Implemented Interfaces:
Cloneable

public class IPPacket
extends Leaf

a IP Packet

Version:
$Revision:835 $
Author:
Dominik Jungo

Field Summary
private  String Protocol
           
private  int TTL
           
 
Constructor Summary
IPPacket(Model owner, IPAddress srcaddress, IPAddress dstaddress)
          Creates a new IPPacket
 
Method Summary
 String getProcessorName()
          gets the name of the processor that will process this packet
 String getProtocol()
          gets the overlying protocol
 int getTTL()
          gets the time to live value of the packet
protected  Leaf selfClone()
           
 void setProtocol(String protocol)
          sets the overlying protocol
 void setTTL(int i)
          sets the time to live value of the packet
 
Methods inherited from class verinec.netsim.entities.packets.Leaf
clone, getPayload, setPayload, toString
 
Methods inherited from class verinec.netsim.entities.packets.Packet
getAge, getDstAddress, getPacketID, getSrcAddress, incrAge, setAge, setDstAddress, setPacketID, setSrcAddress
 
Methods inherited from class desmoj.core.simulator.Entity
getPriority, isEqual, isLarger, isLargerOrEqual, isNotEqual, isSimProcess, isSmaller, isSmallerOrEqual, numQueues, schedule, scheduleAfter, scheduleBefore, setPriority
 
Methods inherited from class desmoj.core.simulator.Schedulable
cancel, isCurrent, isScheduled, nextEntity, nextEvent, nextSchedulable, rename, reSchedule, scheduledAt
 
Methods inherited from class desmoj.core.simulator.ModelComponent
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
 
Methods inherited from class desmoj.core.simulator.NamedObject
getName, getQuotedName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TTL

private int TTL

Protocol

private String Protocol
Constructor Detail

IPPacket

public IPPacket(Model owner,
                IPAddress srcaddress,
                IPAddress dstaddress)
Creates a new IPPacket

Parameters:
owner - a Model
srcaddress - the source address of the ip packet
dstaddress - the destination address of the ip packet
Method Detail

getProcessorName

public String getProcessorName()
Description copied from class: Packet
gets the name of the processor that will process this packet

Specified by:
getProcessorName in class Packet
Returns:
the name of the processor that will process this packet
See Also:
Packet.getProcessorName()

getTTL

public int getTTL()
gets the time to live value of the packet

Returns:
the time to live value of the packet

setTTL

public void setTTL(int i)
sets the time to live value of the packet

Parameters:
i - a time value

getProtocol

public String getProtocol()
gets the overlying protocol

Returns:
the overlying protocol

setProtocol

public void setProtocol(String protocol)
sets the overlying protocol

Parameters:
protocol - a protocol

selfClone

protected Leaf selfClone()
Specified by:
selfClone in class Leaf

Copyright © 2005 Verinec, DIUF