verinec.netsim.entities.packets
Class ARPPacket

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.ARPPacket
All Implemented Interfaces:
Cloneable

public class ARPPacket
extends Leaf

A ARP Packet used for arp request/responses, where a Layer 3 Address should be resolved to a Layer 2 address by broadcasting this packet.

Author:
Dominik Jungo, PhD Student, University of Fribourg, Switzerland dominik.jungo@unifr.ch http://home.rega-sense.ch/jungod

Field Summary
private  IAddress spa
           
private  IAddress tpa
           
 
Constructor Summary
ARPPacket(Model owner, IAddress sha, IAddress spa, IAddress tpa)
          creates a new arp packet
 
Method Summary
 String getProcessorName()
          gets the name of the processor that will process this packet
 IAddress getSpa()
          gets the Layer 3 Source Address
 IAddress getTpa()
          gets the Layer 3 Destination Address
protected  Leaf selfClone()
           
 void setSpa(IAddress address)
          sets the Layer 3 Source Address
 void setTpa(IAddress address)
          sets the Layer 3 Destination Address
 String toString()
          This returns a String representation of the Packet.
 
Methods inherited from class verinec.netsim.entities.packets.Leaf
clone, getPayload, setPayload
 
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

spa

private IAddress spa

tpa

private IAddress tpa
Constructor Detail

ARPPacket

public ARPPacket(Model owner,
                 IAddress sha,
                 IAddress spa,
                 IAddress tpa)
creates a new arp packet

Parameters:
owner - a model
sha - the source MAC address
spa - the source Layer 3 Address
tpa - the destination Layer 3 Address
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()

getSpa

public IAddress getSpa()
gets the Layer 3 Source Address

Returns:
the Layer 3 Source Address

getTpa

public IAddress getTpa()
gets the Layer 3 Destination Address

Returns:
the Layer 3 Destination Address

setSpa

public void setSpa(IAddress address)
sets the Layer 3 Source Address

Parameters:
address - a Layer 3 Address

setTpa

public void setTpa(IAddress address)
sets the Layer 3 Destination Address

Parameters:
address - a Layer 3 Address

toString

public String toString()
Description copied from class: Packet
This returns a String representation of the Packet.

Overrides:
toString in class Leaf
Returns:
the a String representation of the Packet
See Also:
Leaf.toString()

selfClone

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

Copyright © 2005 Verinec, DIUF