|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.net.Packet
drcl.inet.transport.TCPPacket
This class defines the TCP packet header. Fields implemented in this class are SOURCE_port, DEST_port, SEQNo, ACKNo, AdvertisedWnd, ACK, SYN, FIN, SACK option, timestamp option. RFC requirements NOT implemented in this class are URG, PSH, RST, TCP checksum, Urgent pointer, and other options References:
| Field Summary | |
static int |
FLAG_ACK
|
static int |
FLAG_FIN
|
static int |
FLAG_SACK
|
static int |
FLAG_SYN
|
static long |
MSS
Size of maximum transmission unit, used to set/calculate packet count from sequence number. |
| Fields inherited from class drcl.net.Packet |
body, headerSize, id, size |
| Constructor Summary | |
TCPPacket()
|
|
TCPPacket(int sport_,
int dport_,
long Seqno_,
long AckNo_,
int AdvWin_,
boolean Ack_,
boolean SYN_,
boolean FIN_,
double ts_,
double ats_,
boolean sack_,
int sackLen_,
int hsize_,
int bsize_,
java.lang.Object body_)
Constructor for TCPPacket with SACK option. |
|
TCPPacket(int sport_,
int dport_,
long Seqno_,
long AckNo_,
int AdvWin_,
boolean Ack_,
boolean SYN_,
boolean FIN_,
double ts_,
double ats_,
int hsize_,
int bsize_,
java.lang.Object body_)
Constructor for TCPPacket without SACK option. |
|
| Method Summary | |
java.lang.String |
_toString(java.lang.String separator_)
Prints the packet header. |
java.lang.Object |
clone()
Returns a clone of this object. |
long |
getAckNo()
|
int |
getAdvWin()
|
double |
getaTS()
|
long |
getByteCount()
Returns the byte count of this packet in the connection to which this packet belongs. |
int |
getDPort()
|
long[] |
getLEblk()
|
java.lang.String |
getName()
Returns the name of this packet. |
int |
getPacketCount()
Returns the count of this packet in the connection to which this packet belongs. |
java.lang.String |
getPacketType()
Returns the type of packet. |
long[] |
getREblk()
|
int |
getSACKLen()
|
long |
getSeqNo()
|
int |
getSPort()
|
double |
getTS()
|
boolean |
isACK()
|
boolean |
isFIN()
|
boolean |
isSACK()
|
boolean |
isSYN()
|
void |
setACK(boolean enabled_)
|
void |
setaTS(double aTS_)
|
void |
setFIN(boolean enabled_)
|
void |
setLEblk(long[] LEblk_)
|
void |
setREblk(long[] REblk_)
|
void |
setSACK(boolean enabled_)
|
void |
setSACKBlocks(long[] LEblk_,
long[] REblk_)
|
void |
setSACKLen(int len_)
|
void |
setSeqNo(long seqno_)
|
void |
setSYN(boolean enabled_)
|
void |
setTS(double ts_)
|
| Methods inherited from class drcl.net.Packet |
equals, getBody, getHeaderSize, getNumberCount, getPacketSize, getSize, getSizeCount, getTimestamp, isByteCountSupported, isPacketCountSupported, isTimestampSupported, setBody, setBody, setHeaderSize, setPacketSize, setSize, setTimestamp, toString, toString, wraps |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static long MSS
public static final int FLAG_ACK
public static final int FLAG_SYN
public static final int FLAG_FIN
public static final int FLAG_SACK
| Constructor Detail |
public TCPPacket()
public TCPPacket(int sport_,
int dport_,
long Seqno_,
long AckNo_,
int AdvWin_,
boolean Ack_,
boolean SYN_,
boolean FIN_,
double ts_,
double ats_,
int hsize_,
int bsize_,
java.lang.Object body_)
Seqno_ - Sequence number of dataAckNo_ - Acknowledge sequence numberAdvWin_ - Advertised windowAck_ - flag ACKSYN_ - flag SYNFIN_ - flag FINts_ - Timestampats_ - Ackknowledge Timestamphsize_ - header size, calculated by callerbsize_ - body sizebody_ - body
public TCPPacket(int sport_,
int dport_,
long Seqno_,
long AckNo_,
int AdvWin_,
boolean Ack_,
boolean SYN_,
boolean FIN_,
double ts_,
double ats_,
boolean sack_,
int sackLen_,
int hsize_,
int bsize_,
java.lang.Object body_)
Seqno_ - Sequence number of dataAckNo_ - Acknowledge sequence numberAdvWin_ - Advertised windowAck_ - flag ACKSYN_ - flag SYNFIN_ - flag FINts_ - Timestampats_ - Ackknowledge Timestampsack_ - flag SACKsackLen_ - # of SACK blockshsize_ - header size, calculated by callerbsize_ - body sizebody_ - body| Method Detail |
public java.lang.String getName()
Packet
getName in class Packetpublic int getPacketCount()
PacketPacketException if the encapsulated object is not a packet.
getPacketCount in class Packetpublic long getByteCount()
PacketPacketException if the encapsulated object is not a packet.
This method approximates the byte count with the byte count obtained from
the encapsulated packet plus the header size times the packet count.
getByteCount in class Packetpublic int getDPort()
public int getSPort()
public double getTS()
public void setTS(double ts_)
public double getaTS()
public void setaTS(double aTS_)
public void setSeqNo(long seqno_)
public long getSeqNo()
public long getAckNo()
public int getAdvWin()
public void setACK(boolean enabled_)
public boolean isACK()
public void setSYN(boolean enabled_)
public boolean isSYN()
public void setFIN(boolean enabled_)
public boolean isFIN()
public void setSACK(boolean enabled_)
public boolean isSACK()
public int getSACKLen()
public void setSACKLen(int len_)
public long[] getLEblk()
public void setLEblk(long[] LEblk_)
public long[] getREblk()
public void setREblk(long[] REblk_)
public void setSACKBlocks(long[] LEblk_,
long[] REblk_)
public java.lang.Object clone()
ObjectCloneable
clone in interface ObjectCloneableclone in class Packetpublic java.lang.String getPacketType()
PacketPacket.getName() otherwise.
getPacketType in class Packetpublic java.lang.String _toString(java.lang.String separator_)
Packet
_toString in class Packet
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||