org.opennms.jicmp.ip
Class IPPacket

java.lang.Object
  extended by org.opennms.jicmp.ip.IPPacket

public class IPPacket
extends Object

IPPacket

Author:
brozow

Nested Class Summary
static class IPPacket.Protocol
           
 
Constructor Summary
IPPacket(byte[] data, int offset, int length)
           
IPPacket(ByteBuffer buffer)
           
IPPacket(IPPacket p)
           
IPPacket(NativeDatagramPacket datagram)
           
 
Method Summary
 InetAddress getDestinationAddress()
           
 int getHeaderLength()
          Returns the length of the header in bytes
 ByteBuffer getPayload()
           
 int getPayloadLength()
           
 IPPacket.Protocol getProtocol()
           
 InetAddress getSourceAddress()
           
 int getTimeToLive()
           
 int getVersion()
          Returns the version of the IP Packet which must be '4'
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPPacket

public IPPacket(IPPacket p)

IPPacket

public IPPacket(ByteBuffer buffer)

IPPacket

public IPPacket(byte[] data,
                int offset,
                int length)

IPPacket

public IPPacket(NativeDatagramPacket datagram)
Method Detail

getVersion

public int getVersion()
Returns the version of the IP Packet which must be '4'


getHeaderLength

public int getHeaderLength()
Returns the length of the header in bytes


getTimeToLive

public int getTimeToLive()

getProtocol

public IPPacket.Protocol getProtocol()

getSourceAddress

public InetAddress getSourceAddress()

getDestinationAddress

public InetAddress getDestinationAddress()

getPayload

public ByteBuffer getPayload()

getPayloadLength

public int getPayloadLength()


Copyright © 2011. All Rights Reserved.