edu.utah.janos.protocols.icmp
Class ICMPEcho
java.lang.Object
|
+--edu.utah.janos.util.Packet
|
+--edu.utah.janos.protocols.icmp.ICMPEcho
- Direct Known Subclasses:
- PingPacket
- public class ICMPEcho
- extends Packet
An ICMPEcho is a full ICMP ECHO_REQUEST packet, including the ip header,
ICMP header, and a body segment.
|
Field Summary |
static int |
ICMP_SLOT
The index of the ICMP header in the array of PacketSegments. |
static int |
ID_SEQ_SLOT
The index of the Identifier/SequenceNumber option in the array of
PacketSegments. |
static int |
IP_SLOT
The index of the IP header in the array of PacketSegments. |
|
Constructor Summary |
ICMPEcho(boolean withID,
PacketSegment body)
Construct, but don't initialize, an ICMP ECHO_REQUEST packet with
the identifier and sequence number optional fields. |
ICMPEcho(int src,
int dst,
PacketSegment body)
Construct an ICMP ECHO_REQUEST packet. |
ICMPEcho(int src,
int dst,
short identifier,
short sequenceNumber,
PacketSegment body)
Construct an ICMP ECHO_REQUEST packet with the optional identifier
and sequence number fields. |
ICMPEcho(PacketSegment body)
Construct, but don't initialize, an ICMP ECHO_REQUEST packet. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
IP_SLOT
public static final int IP_SLOT
- The index of the IP header in the array of PacketSegments.
ICMP_SLOT
public static final int ICMP_SLOT
- The index of the ICMP header in the array of PacketSegments.
ID_SEQ_SLOT
public static final int ID_SEQ_SLOT
- The index of the Identifier/SequenceNumber option in the array of
PacketSegments.
ICMPEcho
public ICMPEcho(int src,
int dst,
PacketSegment body)
- Construct an ICMP ECHO_REQUEST packet.
- Parameters:
src - The source address for the packet.dst - The destination address for the packet.body - The body of the echo that will be sent back in thebody - reply packet.
ICMPEcho
public ICMPEcho(int src,
int dst,
short identifier,
short sequenceNumber,
PacketSegment body)
- Construct an ICMP ECHO_REQUEST packet with the optional identifier
and sequence number fields.
- Parameters:
src - The source address for the packet.dst - The destination address for the packet.identifier - The value for the identifier field in the packet.sequenceNumber - The value of the sequence number field in thesequenceNumber - packet.body - The body of the echo that will be sent back in thebody - reply packet.
ICMPEcho
public ICMPEcho(PacketSegment body)
- Construct, but don't initialize, an ICMP ECHO_REQUEST packet.
- Parameters:
body - The body of the echo packet.
ICMPEcho
public ICMPEcho(boolean withID,
PacketSegment body)
- Construct, but don't initialize, an ICMP ECHO_REQUEST packet with
the identifier and sequence number optional fields.
getIdentifier
public short getIdentifier()
- Returns:
- The application specific identifier value.
setIdentifier
public void setIdentifier(short id)
- Parameters:
id - The application specific identifier value.
getSequenceNumber
public short getSequenceNumber()
- Returns:
- The application specific sequence number value.
setSequenceNumber
public void setSequenceNumber(short value)
- Parameters:
seqNum - The application specific sequence number value.
This documentation is Copyright (C) 1998-2002 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 web site: http://www.cs.utah.edu/flux/janos/
Generated on Mar 17, 2002