edu.utah.janos.util
Class Packet
java.lang.Object
|
+--edu.utah.janos.util.Packet
- Direct Known Subclasses:
- ICMPEcho, ICMPTimeExceeded
- public class Packet
- extends java.lang.Object
Packet is a helper class that can be used to build packets from several
PacketSegments.
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Packet
public Packet(PacketSegment[] segs)
- Parameters:
segs
- The array of segments that make up this Packet.
getSegments
public PacketSegment[] getSegments()
- Returns:
- The array of packet segments that make up this Packet.
getLength
public int getLength()
- Returns:
- The total length of this packet.
marshal
public void marshal(BufferHandle bh,
int offset)
- Parameters:
bh
- The buffer to marshal this packet into.offset
- The offset in the buffer to start marshalling.
marshal
public void marshal(BufferHandle bh)
- Marshal this packet into the beginning of the given buffer.
- Parameters:
bh
- The buffer to marshal this packet into.
unmarshal
public void unmarshal(BufferHandle bh,
int offset)
throws InvalidPacketException
- Parameters:
bh
- The buffer that contains the marshalled packet segments.offset
- The offset in the buffer to start unmarshalling.
unmarshal
public void unmarshal(BufferHandle bh)
throws InvalidPacketException
- Unmarshal this packet from the beginning of the given buffer.
- Parameters:
bh
- The buffer that contains the marshalled packet segments.
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
This documentation is Copyright (C) 1998-2001 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/