|
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.InetPacket
Defines the packet structure for the INET framework.
| Field Summary | |
static long |
CE
CE (Congestion Experience) bit mask in the ToS field. |
static long |
CONTROL
Control packet type. |
static long |
DATA
Data packet type. |
static int |
DONT_FRAGMENT
The ``don't fragment'' bit mask in the flag field. |
static long |
ECT
ECT (ECN-Capable Transport) bit mask in the ToS field. |
static int |
LABELLED
The ``labelled'' bit mask in the flag field. |
static int |
MORE_FRAGMENT
The ``more fragment'' bit mask in the flag field. |
static java.lang.String |
NAME
Name of the InetPacket. |
static int |
PACKET_IN_PACKET
The ``packet-in-packet'' bit mask in the flag field. |
static long |
TYPE_MASK
Packet type bit mask in the ToS field. |
| Fields inherited from class drcl.net.Packet |
body, headerSize, size |
| Constructor Summary | |
InetPacket()
|
|
InetPacket(long src_,
long des_,
int ulp_,
int ttl_,
int hops_,
boolean ra_,
long tos_,
int id_,
int flag_,
int fragment_,
java.lang.Object pkt_,
int pktsize_)
|
|
InetPacket(long src_,
long des_,
int ulp_,
int ttl_,
int hops_,
boolean ra_,
long tos_,
int id_,
int flag_,
int fragment_,
java.lang.Object pkt_,
int pktsize_,
long nexthop_)
|
|
| Method Summary | |
InetPacket |
_clone()
Returns a clone of this packet. |
java.lang.String |
_toString(java.lang.String separator_)
Prints the packet header. |
java.lang.Object |
clone()
Returns a clone of this object. |
boolean |
dontFragment()
|
boolean |
equals(java.lang.Object o_)
Returns true if that_ is a packet, and its packet size,
header size and the encapsulated object are all equal to those of this
packet. |
long |
getDestination()
|
java.lang.Object |
getExtension()
|
int |
getFlag()
|
int |
getFragmentOffset()
|
int |
getHops()
|
int |
getID()
|
int |
getIncomingIf()
|
short |
getLabel()
|
java.lang.String |
getName()
Returns the name of this packet. |
long |
getNextHop()
|
int |
getProtocol()
|
long |
getSource()
|
long |
getTOS()
|
int |
getTTL()
|
boolean |
hasMoreFragment()
|
boolean |
isCE()
|
boolean |
isControlPacket()
|
boolean |
isDataPacket()
|
boolean |
isECT()
|
boolean |
isFragment()
|
boolean |
isLabelled()
|
boolean |
isPacketInPacket()
|
boolean |
isRouterAlertEnabled()
|
void |
setCE(boolean enabled_)
|
void |
setDestination(long des)
|
void |
setDontFragment(boolean value_)
|
void |
setECT(boolean enabled_)
|
void |
setExtension(java.lang.Object o_)
|
void |
setFlag(int flag_)
|
void |
setFragmentOffset(int offset_)
|
void |
setFragmentParam(boolean more_,
int offset_,
int id_)
One shot to set all the fragment parameters. |
void |
setHops(int hops_)
|
void |
setID(int no_)
|
void |
setIncomingIf(int if_)
|
void |
setLabel(short label_)
|
void |
setLabelled(boolean value_)
|
void |
setMoreFragment(boolean value_)
|
void |
setNextHop(long nexthop_)
|
void |
setPacketInPacket(boolean value_)
|
void |
setProtocol(int ulp_)
|
void |
setRouterAlertEnabled(boolean ra)
|
void |
setSource(long src_)
|
void |
setTOS(long tos_)
|
void |
setTOSBit(long bitmask_,
boolean enabled_)
|
void |
setTTL(int ttl_)
|
| Methods inherited from class drcl.net.Packet |
getBody, getByteCount, getHeaderSize, getNumberCount, getPacketCount, getPacketSize, getPacketType, 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 final java.lang.String NAME
public static final long TYPE_MASK
public static final long DATA
public static final long CONTROL
public static final long ECT
public static final long CE
public static final int DONT_FRAGMENT
public static final int MORE_FRAGMENT
public static final int PACKET_IN_PACKET
public static final int LABELLED
| Constructor Detail |
public InetPacket()
public InetPacket(long src_,
long des_,
int ulp_,
int ttl_,
int hops_,
boolean ra_,
long tos_,
int id_,
int flag_,
int fragment_,
java.lang.Object pkt_,
int pktsize_)
public InetPacket(long src_,
long des_,
int ulp_,
int ttl_,
int hops_,
boolean ra_,
long tos_,
int id_,
int flag_,
int fragment_,
java.lang.Object pkt_,
int pktsize_,
long nexthop_)
| Method Detail |
public void setSource(long src_)
public long getSource()
public void setDestination(long des)
public long getDestination()
public void setProtocol(int ulp_)
public int getProtocol()
public void setTTL(int ttl_)
public int getTTL()
public void setHops(int hops_)
public int getHops()
public void setRouterAlertEnabled(boolean ra)
public boolean isRouterAlertEnabled()
public void setTOS(long tos_)
public long getTOS()
public void setID(int no_)
public int getID()
public void setFlag(int flag_)
public int getFlag()
public void setFragmentParam(boolean more_,
int offset_,
int id_)
public void setFragmentOffset(int offset_)
public int getFragmentOffset()
public boolean dontFragment()
public void setDontFragment(boolean value_)
public boolean hasMoreFragment()
public boolean isFragment()
public void setMoreFragment(boolean value_)
public boolean isPacketInPacket()
public void setPacketInPacket(boolean value_)
public boolean isLabelled()
public void setLabelled(boolean value_)
public short getLabel()
public void setLabel(short label_)
public java.lang.Object getExtension()
public void setExtension(java.lang.Object o_)
public boolean isDataPacket()
public boolean isControlPacket()
public boolean isECT()
public boolean isCE()
public void setECT(boolean enabled_)
public void setCE(boolean enabled_)
public void setTOSBit(long bitmask_,
boolean enabled_)
public int getIncomingIf()
public void setIncomingIf(int if_)
public void setNextHop(long nexthop_)
public long getNextHop()
public boolean equals(java.lang.Object o_)
Packetthat_ is a packet, and its packet size,
header size and the encapsulated object are all equal to those of this
packet.
equals in class Packetpublic java.lang.Object clone()
ObjectCloneable
clone in interface ObjectCloneableclone in class Packetpublic InetPacket _clone()
clone()
is that this method only copies the reference of the encapsulated
object rather than the object content.
public java.lang.String getName()
Packet
getName 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 | ||||||||||