OpenNMS API 1.2.3

org.opennms.protocols.ip
Class IPHeader.EndOfOptions

java.lang.Object
  extended byorg.opennms.protocols.ip.IPHeader.Option
      extended byorg.opennms.protocols.ip.IPHeader.EndOfOptions
Enclosing class:
IPHeader

public static final class IPHeader.EndOfOptions
extends IPHeader.Option

This class is used to represent the End-Of-Option list in the IP header. After this option, the option list is not processed any further.

Author:
Brian Weaver , OpenNMS

Field Summary
 
Fields inherited from class org.opennms.protocols.ip.IPHeader.Option
CODE_END_OF_OPTION_LIST, CODE_LOOSE_SOURCE_ROUTE, CODE_ROUTE_RECORD, CODE_STRICT_SOURCE_ROUTE, m_code
 
Constructor Summary
IPHeader.EndOfOptions()
          Constructs a new End-Of-Options list instance that can be added or found in the IP header.
 
Method Summary
(package private)  int bytesRequired()
          Returns the number of bytes requried to represent this option
(package private)  int writeBytes(byte[] dest, int offset)
          Converts the option to an array of bytes and writes those bytes in to the destiantion buffer.
 
Methods inherited from class org.opennms.protocols.ip.IPHeader.Option
getOptionClass, getOptionNumber, isOptionCopied
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPHeader.EndOfOptions

public IPHeader.EndOfOptions()
Constructs a new End-Of-Options list instance that can be added or found in the IP header.

Method Detail

bytesRequired

int bytesRequired()
Returns the number of bytes requried to represent this option

Specified by:
bytesRequired in class IPHeader.Option
Returns:
The bytes used by this option

writeBytes

int writeBytes(byte[] dest,
               int offset)
Converts the option to an array of bytes and writes those bytes in to the destiantion buffer. The bytes are written startint at the offset passed to the method.

Specified by:
writeBytes in class IPHeader.Option
Parameters:
dest - The destiantion buffer to write the bytes
offset - The offset to start writing in the buffer
Returns:
The offset plus the number of bytes written to the buffer.
Throws:
java.lang.ArrayIndexOutOfBounds - Throws in there is insufficient space in the buffer.

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.