|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.protocols.ip.IPHeader.Option
The Option class is used as the base class for any options that are at the end of the IP header.
Field Summary | |
static int |
CODE_END_OF_OPTION_LIST
Defines the code for the End-Of-Options list |
static int |
CODE_LOOSE_SOURCE_ROUTE
Defines the code for the loose source routing option |
static int |
CODE_ROUTE_RECORD
Defines the code for the packet route record option. |
static int |
CODE_STRICT_SOURCE_ROUTE
Defines the code for the strict soruce routing option |
protected int |
m_code
The single byte that defiend the copied bit, class, and code for the option |
Constructor Summary | |
protected |
IPHeader.Option(byte code)
Class constructor that is only available to the derived classes of the Option class. |
Method Summary | |
(package private) abstract int |
bytesRequired()
The nubmer of bytes required to represent this option in the IP header |
int |
getOptionClass()
Returns the class for the option. |
int |
getOptionNumber()
Returns the option number for the instance |
boolean |
isOptionCopied()
Returns true if the copy flag is set in the options header |
(package private) abstract int |
writeBytes(byte[] dest,
int offset)
Writes the option to the passed array, starting at the defined offset. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int m_code
public static final int CODE_END_OF_OPTION_LIST
public static final int CODE_LOOSE_SOURCE_ROUTE
public static final int CODE_STRICT_SOURCE_ROUTE
public static final int CODE_ROUTE_RECORD
Constructor Detail |
protected IPHeader.Option(byte code)
code
- The code for the option.Method Detail |
abstract int bytesRequired()
abstract int writeBytes(byte[] dest, int offset)
dest
- The destination to write the dataoffset
- The offset of the first written byte
public int getOptionClass()
public int getOptionNumber()
public boolean isOptionCopied()
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |