Class IpV4Packet.IpV4Header

    • Method Detail

      • getIhl

        public byte getIhl()
        Returns:
        ihl
      • getIhlAsInt

        public int getIhlAsInt()
        Returns:
        ihl
      • getTotalLength

        public short getTotalLength()
        Returns:
        totalLength
      • getTotalLengthAsInt

        public int getTotalLengthAsInt()
        Returns:
        totalLength
      • getIdentification

        public short getIdentification()
        Returns:
        identification
      • getIdentificationAsInt

        public int getIdentificationAsInt()
        Returns:
        identification
      • getReservedFlag

        public boolean getReservedFlag()
        Returns:
        reservedFlag
      • getDontFragmentFlag

        public boolean getDontFragmentFlag()
        Returns:
        dontFragmentFlag
      • getMoreFragmentFlag

        public boolean getMoreFragmentFlag()
        Returns:
        moreFragmentFlag
      • getFragmentOffset

        public short getFragmentOffset()
        Returns:
        fragmentOffset
      • getTtl

        public byte getTtl()
        Returns:
        ttl
      • getTtlAsInt

        public int getTtlAsInt()
        Returns:
        ttl
      • getProtocol

        public IpNumber getProtocol()
        Specified by:
        getProtocol in interface IpPacket.IpHeader
        Returns:
        an IpNumber object which indicates the protocol of the following header.
      • getHeaderChecksum

        public short getHeaderChecksum()
        Returns:
        headerChecksum
      • getPadding

        public byte[] getPadding()
        Returns:
        padding
      • hasValidChecksum

        public boolean hasValidChecksum​(boolean acceptZero)
        Parameters:
        acceptZero - acceptZero
        Returns:
        true if the packet represented by this object has a valid checksum; false otherwise.