Class IPHeader.Option

java.lang.Object
org.opennms.protocols.ip.IPHeader.Option
Direct Known Subclasses:
IPHeader.EndOfOptions, IPHeader.RouteOption
Enclosing class:
IPHeader

public abstract static class IPHeader.Option extends Object
The Option class is used as the base class for any options that are at the end of the IP header.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Defines the code for the End-Of-Options list
    static final int
    Defines the code for the loose source routing option
    static final int
    Defines the code for the packet route record option.
    static final int
    Defines the code for the strict soruce routing option
    protected int
    The single byte that defiend the copied bit, class, and code for the option
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Option(byte code)
    Class constructor that is only available to the derived classes of the Option class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the class for the option.
    int
    Returns the option number for the instance
    boolean
    Returns true if the copy flag is set in the options header

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m_code

      protected int m_code
      The single byte that defiend the copied bit, class, and code for the option
    • CODE_END_OF_OPTION_LIST

      public static final int CODE_END_OF_OPTION_LIST
      Defines the code for the End-Of-Options list
      See Also:
    • CODE_LOOSE_SOURCE_ROUTE

      public static final int CODE_LOOSE_SOURCE_ROUTE
      Defines the code for the loose source routing option
      See Also:
    • CODE_STRICT_SOURCE_ROUTE

      public static final int CODE_STRICT_SOURCE_ROUTE
      Defines the code for the strict soruce routing option
      See Also:
    • CODE_ROUTE_RECORD

      public static final int CODE_ROUTE_RECORD
      Defines the code for the packet route record option.
      See Also:
  • Constructor Details

    • Option

      protected Option(byte code)
      Class constructor that is only available to the derived classes of the Option class.
      Parameters:
      code - The code for the option.
  • Method Details

    • getOptionClass

      public int getOptionClass()
      Returns the class for the option.
    • getOptionNumber

      public int getOptionNumber()
      Returns the option number for the instance
    • isOptionCopied

      public boolean isOptionCopied()
      Returns true if the copy flag is set in the options header