DRCL J-Sim API

drcl.inet.transport
Class UDPPacket

java.lang.Object
  extended bydrcl.net.Packet
      extended bydrcl.inet.transport.UDPPacket
All Implemented Interfaces:
java.lang.Cloneable, Countable, ObjectCloneable, PacketWrapper

public class UDPPacket
extends Packet

This class defines the UDP packet header used by UDP.


Field Summary
 
Fields inherited from class drcl.net.Packet
body, headerSize, id, size
 
Constructor Summary
UDPPacket()
           
UDPPacket(int sport_, int dport_, int hsize_)
           
UDPPacket(int sport_, int dport_, int hsize_, int bsize_, java.lang.Object body_)
           
 
Method Summary
 java.lang.String _toString(java.lang.String separator_)
          Prints the packet header.
 java.lang.Object clone()
          Returns a clone of this object.
 int getDPort()
          Returns the destination port number of the UDP packet.
 java.lang.String getName()
          Returns the name of this packet.
 int getSPort()
          Returns the source port number of the UDP packet.
 void setDPort(int value_)
           
 void setSPort(int value_)
           
 
Methods inherited from class drcl.net.Packet
equals, 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
 

Constructor Detail

UDPPacket

public UDPPacket()

UDPPacket

public UDPPacket(int sport_,
                 int dport_,
                 int hsize_)
Parameters:
sport_ - source port number
dport_ - destination port number

UDPPacket

public UDPPacket(int sport_,
                 int dport_,
                 int hsize_,
                 int bsize_,
                 java.lang.Object body_)
Parameters:
sport_ - source port number
dport_ - destination port number
Method Detail

getName

public java.lang.String getName()
Description copied from class: Packet
Returns the name of this packet.

Specified by:
getName in class Packet

getSPort

public int getSPort()
Returns the source port number of the UDP packet.


getDPort

public int getDPort()
Returns the destination port number of the UDP packet.


setSPort

public void setSPort(int value_)

setDPort

public void setDPort(int value_)

clone

public java.lang.Object clone()
Description copied from interface: ObjectCloneable
Returns a clone of this object.

Specified by:
clone in interface ObjectCloneable
Specified by:
clone in class Packet

_toString

public java.lang.String _toString(java.lang.String separator_)
Description copied from class: Packet
Prints the packet header.

Overrides:
_toString in class Packet

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~