Class IPPacket


  • public class IPPacket
    extends Object
    IPPacket
    Author:
    brozow
    • Constructor Detail

      • IPPacket

        public IPPacket​(IPPacket p)
      • IPPacket

        public IPPacket​(ByteBuffer buffer)
      • IPPacket

        public IPPacket​(byte[] data,
                        int offset,
                        int length)
    • 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()
      • getSourceAddress

        public InetAddress getSourceAddress()
      • getDestinationAddress

        public InetAddress getDestinationAddress()
      • getPayloadLength

        public int getPayloadLength()