|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.net.RawPacket
|
+--java.net.IcmpPacket
This class represents an ICMP packet.
ICMP packets are used to implement a connectionless ICMP packet delivery service. Each message is routed from one machine to another based solely on information contained within that packet. Multiple packets sent from one machine to another might be routed differently, and might arrive in any order.
| Constructor Summary | |
IcmpPacket(byte[] ibuf,
int ilength,
InetAddress iaddr,
int tvalue)
Constructs an ICMP packet for sending packets of length ilength with the specified type on the specified
host. |
|
IcmpPacket(byte[] ibuf,
int ilength,
InetAddress iaddr,
int tvalue,
int cvalue)
Constructs an ICMP packet for sending packets of length ilength with the specified type and code on the specified
host. |
|
IcmpPacket(byte[] ibuf,
int ilength,
int tvalue)
Constructs an IcmpPacket for receiving packets of
length ilength. |
|
IcmpPacket(byte[] ibuf,
int ilength,
int tvalue,
int cvalue)
Constructs an IcmpPacket for receiving packets of
length ilength. |
|
| Method Summary | |
byte |
getCode()
Return the ICMP code of the packet. |
byte |
getType()
Return the ICMP type of the packet. |
void |
setType(int value)
Set the ICMP type of the packet. |
void |
setType(int tvalue,
int cvalue)
Set the ICMP type and code of the packet. |
| Methods inherited from class java.net.RawPacket |
getAddress, getData, getLength, getOffset, setAddress, setData, setData, setLength |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IcmpPacket(byte[] ibuf,
int ilength,
int tvalue)
IcmpPacket for receiving packets of
length ilength.
The length argument must be less than or equal to
ibuf.length.
ibuf - buffer for holding the incoming datagram.ilength - the number of bytes to read.tvalue - the ICMP type of the packet
public IcmpPacket(byte[] ibuf,
int ilength,
int tvalue,
int cvalue)
IcmpPacket for receiving packets of
length ilength.
The length argument must be less than or equal to
ibuf.length.
ibuf - buffer for holding the incoming datagram.ilength - the number of bytes to read.tvalue - the ICMP type of the packetcvalue - the ICMP code of the packet
public IcmpPacket(byte[] ibuf,
int ilength,
InetAddress iaddr,
int tvalue)
ilength with the specified type on the specified
host. The length argument must be less than or equal
to ibuf.length.ibuf - the packet data.ilength - the packet length.iaddr - the destination address.tvalue - the type of the packet.InetAddress
public IcmpPacket(byte[] ibuf,
int ilength,
InetAddress iaddr,
int tvalue,
int cvalue)
ilength with the specified type and code on the specified
host. The length argument must be less than or equal
to ibuf.length.ibuf - the packet data.ilength - the packet length.iaddr - the destination address.tvalue - the type of the packet.cvalue - the code of the packet.InetAddress| Method Detail |
public void setType(int value)
value - the type of the packetpublic byte getCode()
public void setType(int tvalue,
int cvalue)
tvalue - the type of the packetcvalue - the code of the packetpublic byte getType()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||