SunSPOT API V6.0


com.sun.spot.ipv6.icmp
Class ICMP6Packet

java.lang.Object
  extended by com.sun.spot.ipv6.GenericPacket
      extended by com.sun.spot.ipv6.IPv6Packet
          extended by com.sun.spot.ipv6.icmp.ICMP6Packet

public class ICMP6Packet
extends IPv6Packet


Field Summary
static int AUTOCONFIG
           
static boolean debug
           
static int DISPATCH
           
static int ECHO_REPLY
           
static int ECHO_REQUEST
           
static int FLAG_OVERRIDE
           
static int FLAG_ROUTER
           
static int FLAG_SOLICITED
           
static byte FRAG_REQUIRED
           
static int GROUP_QUERY
           
static int GROUP_REDUCTION
           
static int GROUP_REPORT
           
static byte HOST_UNREACHABLE
           
static int MTU_INFO
           
static int NEIGHBOR_ADVERTISEMENT
           
static int NEIGHBOR_SOLICITATION
           
static byte NET_UNREACHABLE
           
static int ON_LINK
           
static byte PORT_UNREACHABLE
           
static int PREFIX_INFO
           
static byte PROTO_UNREACHABLE
           
static int ROUTER_ADVERTISEMENT
           
static int ROUTER_SOLICITATION
           
static int SOURCE_LINKADDR
           
static byte SOURCE_ROUTE_FAIL
           
static int TARGET_LINKADDR
           
static String[] TYPE_NAME
           
 
Fields inherited from class com.sun.spot.ipv6.IPv6Packet
HEADER_SIZE
 
Fields inherited from class com.sun.spot.ipv6.GenericPacket
bytes, headerSize, headerStart, length, link_destination, link_source
 
Constructor Summary
ICMP6Packet()
           
ICMP6Packet(byte[] src, byte[] dst, int type)
           
ICMP6Packet(int type)
           
ICMP6Packet(IPv6Packet p, int headerSize)
           
 
Method Summary
 String debug()
          Creates a labled string representation of the UDP packet, suitable for debugging
 void generatePacketData()
           
 int getChecksum()
          Return the checksum field of the ICMP packet
 int getDataLength()
          Return the length of the data portion of the ICMP request
 byte getDispatch()
           
 byte[] getEchoData()
           
 int getEchoId()
           
 int getFlags()
           
 byte[] getOption(int type)
           
 int getSequenceNo()
           
 int getType()
           
protected  boolean isChecksumValid()
           
 void printPacket(PrintStream out)
           
 void setChecksum()
          Sets the value of the checksum field of the UDP header.
 void setEchoData(byte[] edata)
           
 void setFlags(int flags)
           
 void setICMPTarget(byte[] t)
           
 void setType(int type)
           
 
Methods inherited from class com.sun.spot.ipv6.IPv6Packet
calculatePseudoHeaderChecksum, copy, get16, get32, getData, getDstAddress, getFlowLabel, getHopLimit, getInterface, getNextHeader, getNextHeaderString, getPacketEnd, getPayloadBytes, getPayloadLength, getSrcAddress, getTotalLength, getTrafficClass, getVersion, resetHopLimit, set16, set32, setData, setDstAddress, setFlowLabel, setHopLimit, setInterface, setNextHeader, setPayloadLength, setSrcAddress, setTrafficClass, setVersion, toString
 
Methods inherited from class com.sun.spot.ipv6.GenericPacket
getBytes, getDataOffset, getDataSize, getHeaderOffset, getHeaderSize, getLinkDestination, getLinkSource, setLinkDestination, setLinkSource, toBytes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static final boolean debug

NET_UNREACHABLE

public static final byte NET_UNREACHABLE
See Also:
Constant Field Values

HOST_UNREACHABLE

public static final byte HOST_UNREACHABLE
See Also:
Constant Field Values

PROTO_UNREACHABLE

public static final byte PROTO_UNREACHABLE
See Also:
Constant Field Values

PORT_UNREACHABLE

public static final byte PORT_UNREACHABLE
See Also:
Constant Field Values

FRAG_REQUIRED

public static final byte FRAG_REQUIRED
See Also:
Constant Field Values

SOURCE_ROUTE_FAIL

public static final byte SOURCE_ROUTE_FAIL
See Also:
Constant Field Values

DISPATCH

public static final int DISPATCH
See Also:
Constant Field Values

ECHO_REQUEST

public static final int ECHO_REQUEST
See Also:
Constant Field Values

ECHO_REPLY

public static final int ECHO_REPLY
See Also:
Constant Field Values

GROUP_QUERY

public static final int GROUP_QUERY
See Also:
Constant Field Values

GROUP_REPORT

public static final int GROUP_REPORT
See Also:
Constant Field Values

GROUP_REDUCTION

public static final int GROUP_REDUCTION
See Also:
Constant Field Values

ROUTER_SOLICITATION

public static final int ROUTER_SOLICITATION
See Also:
Constant Field Values

ROUTER_ADVERTISEMENT

public static final int ROUTER_ADVERTISEMENT
See Also:
Constant Field Values

NEIGHBOR_SOLICITATION

public static final int NEIGHBOR_SOLICITATION
See Also:
Constant Field Values

NEIGHBOR_ADVERTISEMENT

public static final int NEIGHBOR_ADVERTISEMENT
See Also:
Constant Field Values

FLAG_ROUTER

public static final int FLAG_ROUTER
See Also:
Constant Field Values

FLAG_SOLICITED

public static final int FLAG_SOLICITED
See Also:
Constant Field Values

FLAG_OVERRIDE

public static final int FLAG_OVERRIDE
See Also:
Constant Field Values

ON_LINK

public static final int ON_LINK
See Also:
Constant Field Values

AUTOCONFIG

public static final int AUTOCONFIG
See Also:
Constant Field Values

SOURCE_LINKADDR

public static final int SOURCE_LINKADDR
See Also:
Constant Field Values

TARGET_LINKADDR

public static final int TARGET_LINKADDR
See Also:
Constant Field Values

PREFIX_INFO

public static final int PREFIX_INFO
See Also:
Constant Field Values

MTU_INFO

public static final int MTU_INFO
See Also:
Constant Field Values

TYPE_NAME

public static final String[] TYPE_NAME
Constructor Detail

ICMP6Packet

public ICMP6Packet()

ICMP6Packet

public ICMP6Packet(int type)

ICMP6Packet

public ICMP6Packet(byte[] src,
                   byte[] dst,
                   int type)

ICMP6Packet

public ICMP6Packet(IPv6Packet p,
                   int headerSize)
Method Detail

setICMPTarget

public void setICMPTarget(byte[] t)

getChecksum

public int getChecksum()
Return the checksum field of the ICMP packet

Returns:
the checksum

setChecksum

public void setChecksum()
Sets the value of the checksum field of the UDP header.

Overrides:
setChecksum in class IPv6Packet

isChecksumValid

protected boolean isChecksumValid()

getDataLength

public int getDataLength()
Return the length of the data portion of the ICMP request

Returns:
ICMP request data length

getType

public int getType()

setType

public void setType(int type)

getFlags

public int getFlags()

setFlags

public void setFlags(int flags)

getOption

public byte[] getOption(int type)

getEchoData

public byte[] getEchoData()

getEchoId

public int getEchoId()

getSequenceNo

public int getSequenceNo()

setEchoData

public void setEchoData(byte[] edata)

printPacket

public void printPacket(PrintStream out)

generatePacketData

public void generatePacketData()

getDispatch

public byte getDispatch()

debug

public String debug()
Creates a labled string representation of the UDP packet, suitable for debugging

Overrides:
debug in class IPv6Packet
Returns:
a string representation of the UDP packet

SunSPOT API V6.0


Copyright © 2006-2010 Oracle. All Rights Reserved.