net.clackrouter.packets
Class VNSUDPPacket
java.lang.Object
net.clackrouter.protocol.data.VNSData
net.clackrouter.packets.VNSPacket
net.clackrouter.packets.VNSUDPPacket
public class VNSUDPPacket
- extends VNSPacket
A User Datagram Protocol (UDP) Packet.
Constructor Summary |
VNSUDPPacket(java.nio.ByteBuffer packetBuffer)
Constructs an IMCP packet from the supplied byte buffer. |
VNSUDPPacket(int sport,
int dport,
java.nio.ByteBuffer body)
|
Methods inherited from class net.clackrouter.packets.VNSPacket |
addToPath, get16bit, get32bit, getByteBuffer, getInputInterfaceName, getLength, getLevel2Type, getNextHopIPAddress, getNextHopMacAddress, getOutputInterfaceName, getParentHeader, getStringBuffer, isPacket, needsSourceAddress, setByteBuffer, setInputInterfaceName, setLevel2Type, setNeedsSourceAddress, setNextHopIPAddress, setNextHopMacAddress, setOutputInterfaceName, setParentHeader, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UDP_HEADER_LEN
public static int UDP_HEADER_LEN
src_port
public int src_port
dst_port
public int dst_port
length
public int length
checksum
public int checksum
m_bodyBuffer
protected java.nio.ByteBuffer m_bodyBuffer
mDestAddress
protected java.net.InetAddress mDestAddress
mSrcAddress
protected java.net.InetAddress mSrcAddress
VNSUDPPacket
public VNSUDPPacket(int sport,
int dport,
java.nio.ByteBuffer body)
VNSUDPPacket
public VNSUDPPacket(java.nio.ByteBuffer packetBuffer)
- Constructs an IMCP packet from the supplied byte buffer.
- Parameters:
packetBuffer
- Byte buffer containing an ICMP packet
getBodyBuffer
public java.nio.ByteBuffer getBodyBuffer()
setBodyBuffer
public void setBodyBuffer(java.nio.ByteBuffer buf)
pack
public void pack()
calculateChecksum
public int calculateChecksum()
getDestinationPort
public int getDestinationPort()
getSourcePort
public int getSourcePort()
setDestinationAddress
public void setDestinationAddress(java.net.InetAddress dest)
getDestinationAddress
public java.net.InetAddress getDestinationAddress()
setSourceAddress
public void setSourceAddress(java.net.InetAddress source)
getSourceAddress
public java.net.InetAddress getSourceAddress()