simnet
Class TCP_Packet

java.lang.Object
  extended bysimnet.Packet
      extended bysimnet.TCP_Packet
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class TCP_Packet
extends Packet
implements java.io.Serializable, java.lang.Cloneable

A packet for the TCP protocol.

See Also:
Serialized Form

Field Summary
 int ack
          Acknowledgement number
 boolean ACK
          ACK flag
 java.lang.Object data
          Data
 int dest_port
          Destination port
 boolean FIN
          FIN flag
 boolean RST
          RST flag
 int seq
          Sequence number
 int src_port
          Source port
 boolean SYN
          SYN flag
 
Fields inherited from class simnet.Packet
cached_size, id
 
Constructor Summary
TCP_Packet()
           
 
Method Summary
 java.lang.Object clone()
          Return a copy of this packet.
 boolean isAck()
           
 boolean isFin()
           
 boolean isRst()
           
 boolean isSyn()
           
 boolean isSynAck()
           
 java.lang.String toString()
          Return a string representation of this object.
 
Methods inherited from class simnet.Packet
getSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

src_port

public int src_port
Source port


dest_port

public int dest_port
Destination port


seq

public int seq
Sequence number


ack

public int ack
Acknowledgement number


SYN

public boolean SYN
SYN flag


ACK

public boolean ACK
ACK flag


FIN

public boolean FIN
FIN flag


RST

public boolean RST
RST flag


data

public java.lang.Object data
Data

Constructor Detail

TCP_Packet

public TCP_Packet()
Method Detail

isSyn

public boolean isSyn()

isSynAck

public boolean isSynAck()

isRst

public boolean isRst()

isAck

public boolean isAck()

isFin

public boolean isFin()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Return a copy of this packet.

Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
Return a string representation of this object.