edu.utah.janos.protocols.icmp
Class ICMPHeader
java.lang.Object
|
+--edu.utah.janos.protocols.icmp.ICMPHeader
- public class ICMPHeader
- extends java.lang.Object
- implements PacketSegment
The ICMPHeader is a PacketSegment for the standard ICMP header.
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
ECHOREPLY
public static final byte ECHOREPLY
- Message types and their codes.
UNREACH
public static final byte UNREACH
UNREACH_NET
public static final byte UNREACH_NET
UNREACH_HOST
public static final byte UNREACH_HOST
UNREACH_PROTOCOL
public static final byte UNREACH_PROTOCOL
UNREACH_PORT
public static final byte UNREACH_PORT
UNREACH_NEEDFRAG
public static final byte UNREACH_NEEDFRAG
UNREACH_SRCFAIL
public static final byte UNREACH_SRCFAIL
UNREACH_NET_UNKNOWN
public static final byte UNREACH_NET_UNKNOWN
UNREACH_HOST_UNKNOWN
public static final byte UNREACH_HOST_UNKNOWN
UNREACH_ISOLATED
public static final byte UNREACH_ISOLATED
UNREACH_NET_PROHIB
public static final byte UNREACH_NET_PROHIB
UNREACH_HOST_PROHIB
public static final byte UNREACH_HOST_PROHIB
UNREACH_TOSNET
public static final byte UNREACH_TOSNET
UNREACH_TOSHOST
public static final byte UNREACH_TOSHOST
UNREACH_FILTER_PROHIB
public static final byte UNREACH_FILTER_PROHIB
UNREACH_HOST_PRECEDENCE
public static final byte UNREACH_HOST_PRECEDENCE
UNREACH_PRECEDENCE_CUTOFF
public static final byte UNREACH_PRECEDENCE_CUTOFF
SOURCEQUENCH
public static final byte SOURCEQUENCH
REDIRECT
public static final byte REDIRECT
REDIRECT_NET
public static final byte REDIRECT_NET
REDIRECT_HOST
public static final byte REDIRECT_HOST
REDIRECT_TOSNET
public static final byte REDIRECT_TOSNET
REDIRECT_TOSHOST
public static final byte REDIRECT_TOSHOST
ECHO
public static final byte ECHO
ROUTERADVERT
public static final byte ROUTERADVERT
ROUTERSOLICIT
public static final byte ROUTERSOLICIT
TIMXCEED
public static final byte TIMXCEED
TIMXCEED_INTRANS
public static final byte TIMXCEED_INTRANS
TIMXCEED_REASS
public static final byte TIMXCEED_REASS
PARAMPROB
public static final byte PARAMPROB
PARAMPROB_OPTABSENT
public static final byte PARAMPROB_OPTABSENT
TSTAMP
public static final byte TSTAMP
TSTAMPREPLY
public static final byte TSTAMPREPLY
IREQ
public static final byte IREQ
IREQREPLY
public static final byte IREQREPLY
MASKREQ
public static final byte MASKREQ
MASKREPLY
public static final byte MASKREPLY
MAXTYPE
public static final byte MAXTYPE
HEADER_LENGTH
public static final int HEADER_LENGTH
- Length of the header.
ICMPHeader
public ICMPHeader(byte type,
byte code)
- Parameters:
type
- The type to give this header segment.code
- The code to give this header segment.
ICMPHeader
public ICMPHeader(byte type)
- Parameters:
type
- The type to give this header segment.
ICMPHeader
public ICMPHeader()
- Construct an ICMPHeader with zero type and code values.
matchType
public static void matchType(DemultiplexKey dk,
int offset,
byte type)
- Parameters:
dk
- The key to add the matching data to.offset
- Offset of the IP header in the buffer.type
- The ICMP message type to match.
matchCode
public static void matchCode(DemultiplexKey dk,
int offset,
byte code)
- Parameters:
dk
- The key to add the matching data to.offset
- Offset of the IP header in the buffer.code
- The ICMP message code to match.
getLength
public int getLength()
- Specified by:
- getLength in interface PacketSegment
- Tags copied from interface: PacketSegment
- Returns:
- The length of this packet segment.
getType
public byte getType()
setType
public void setType(byte type)
getCode
public byte getCode()
setCode
public void setCode(byte code)
marshal
public int marshal(BufferHandle bh,
int offset)
- Specified by:
- marshal in interface PacketSegment
- Tags copied from interface: PacketSegment
- Parameters:
bh
- The buffer to marshal this packet into.offset
- The offset in the buffer to start marshalling.
unmarshal
public int unmarshal(BufferHandle bh,
int offset)
throws InvalidPacketException
- Specified by:
- unmarshal in interface PacketSegment
- Tags copied from interface: PacketSegment
- Parameters:
bh
- The buffer that contains the marshalled packet segments.offset
- The offset in the buffer to start unmarshalling.
hashCode
public int hashCode()
- Overrides:
- hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
- equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
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