|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdesmoj.core.simulator.NamedObject
desmoj.core.simulator.ModelComponent
desmoj.core.simulator.Schedulable
desmoj.core.simulator.Entity
verinec.netsim.entities.packets.Packet
verinec.netsim.entities.packets.Leaf
verinec.netsim.entities.packets.UDPPacket
verinec.netsim.entities.packets.TCPPacket
public class TCPPacket
A TCP Packet
| Field Summary | |
|---|---|
private int |
ack
the acknowledgment number |
private boolean |
fin
the finish flag. |
private boolean |
psh
the push flag. |
private boolean |
rst
the reset flag. |
private int |
seq
the sequence number |
private boolean |
syn
the synchronize flag. |
private boolean |
urg
the urgent flag. |
private boolean |
validity
validity simulates the checksum. |
private int |
windowsize
the sender's remainig window size |
| Constructor Summary | |
|---|---|
TCPPacket(Model owner,
IPAddress srcaddress,
IPAddress dstaddress,
int srcPort,
int dstPort)
Creates a new TCP Packet |
|
| Method Summary | |
|---|---|
int |
getAck()
gets the ack field |
String |
getProcessorName()
gets the name of the processor that will process this packet |
int |
getSeq()
gets the seq field |
int |
getWindowsize()
gets the sender's remainig window size |
boolean |
isAck()
test if the ackfied is set |
boolean |
isFin()
gets the fin bit |
boolean |
isPsh()
gets the psh bit |
boolean |
isRst()
gets the rst bit |
boolean |
isSyn()
tests if the syn field is set |
boolean |
isUrg()
gets the urg bit |
boolean |
isValid()
gets the packets validity (simulates checksum testing) |
protected Leaf |
selfClone()
|
void |
setAck(int i)
sets the ack bit |
void |
setFin(boolean b)
sets the fin bit |
void |
setPsh(boolean b)
sets the psh bit |
void |
setRst(boolean b)
sets the rst bit |
void |
setSeq(int i)
sets the seq bit |
void |
setSyn(boolean b)
sets the syn bit |
void |
setUrg(boolean b)
sets the urg bit |
void |
setValidity(boolean validity)
sets the validity of this packet. |
void |
setWindowsize(int windowsize)
sets the sender's remainig window size |
String |
toString()
This returns a String representation of the Packet. |
| Methods inherited from class verinec.netsim.entities.packets.UDPPacket |
|---|
byteArrayToPayload, createString, getDstPort, getSrcPort, payloadToByteArray, setDstPort, setSrcPort |
| 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 |
|---|
private boolean urg
private boolean psh
private boolean rst
private boolean fin
private boolean syn
private int seq
private int ack
private int windowsize
private boolean validity
| Constructor Detail |
|---|
public TCPPacket(Model owner,
IPAddress srcaddress,
IPAddress dstaddress,
int srcPort,
int dstPort)
owner - a Modelsrcaddress - source address of this packetdstaddress - destination address of this packetsrcPort - source portdstPort - destionation port| Method Detail |
|---|
public String getProcessorName()
Packet
getProcessorName in class UDPPacketUDPPacket.getProcessorName()public boolean isAck()
public int getAck()
public boolean isFin()
public boolean isPsh()
public boolean isRst()
public boolean isSyn()
public int getSeq()
public boolean isUrg()
public void setAck(int i)
i - a integer value for the ack fieldpublic void setFin(boolean b)
b - a boolean value for the fin bitpublic void setPsh(boolean b)
b - a boolean value for the psh bitpublic void setRst(boolean b)
b - a boolean value for the rst bitpublic void setSeq(int i)
i - a integer value for the seq fieldpublic void setUrg(boolean b)
b - a boolean value for the urg bitpublic void setSyn(boolean b)
b - a boolean value for the syn bitpublic String toString()
Packet
toString in class UDPPacketLeaf.toString()public boolean isValid()
public void setValidity(boolean validity)
validity - the validity of this packetpublic int getWindowsize()
public void setWindowsize(int windowsize)
windowsize - the sender's remainig window sizeprotected Leaf selfClone()
selfClone in class UDPPacket
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||