Package org.opennms.protocols.ip
Class IPHeader.Option
java.lang.Object
org.opennms.protocols.ip.IPHeader.Option
- Direct Known Subclasses:
IPHeader.EndOfOptions,IPHeader.RouteOption
- Enclosing class:
- IPHeader
The Option class is used as the base class for any options that are at
the end of the IP header.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefines the code for the End-Of-Options liststatic final intDefines the code for the loose source routing optionstatic final intDefines the code for the packet route record option.static final intDefines the code for the strict soruce routing optionprotected intThe single byte that defiend the copied bit, class, and code for the option -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOption(byte code) Class constructor that is only available to the derived classes of the Option class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the class for the option.intReturns the option number for the instancebooleanReturns true if the copy flag is set in the options header
-
Field Details
-
m_code
protected int m_codeThe 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_LISTDefines the code for the End-Of-Options list- See Also:
-
CODE_LOOSE_SOURCE_ROUTE
public static final int CODE_LOOSE_SOURCE_ROUTEDefines the code for the loose source routing option- See Also:
-
CODE_STRICT_SOURCE_ROUTE
public static final int CODE_STRICT_SOURCE_ROUTEDefines the code for the strict soruce routing option- See Also:
-
CODE_ROUTE_RECORD
public static final int CODE_ROUTE_RECORDDefines 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
-