Package org.opennms.protocols.ip
Class IPHeader.StrictSourceRouteOption
java.lang.Object
org.opennms.protocols.ip.IPHeader.Option
org.opennms.protocols.ip.IPHeader.RouteOption
org.opennms.protocols.ip.IPHeader.StrictSourceRouteOption
- Enclosing class:
- IPHeader
This class represents the strict source routing options that may be part
of an IP header. The strict source route defines a set of IP addresses
that a packet must pass though. As the packet reaches each address the
packet is forwarded to the next element in the route.
-
Field Summary
Fields inherited from class org.opennms.protocols.ip.IPHeader.RouteOption
m_addrsFields 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
ConstructorsConstructorDescriptionStrictSourceRouteOption(List<IPv4Address> addrs) Constructs a new instance of the class with the passed addresses used for the routing.StrictSourceRouteOption(IPv4Address[] addrs) Constructs a new instance of the class with the passed addresses used for the routing. -
Method Summary
Methods inherited from class org.opennms.protocols.ip.IPHeader.RouteOption
iterator, sizeMethods inherited from class org.opennms.protocols.ip.IPHeader.Option
getOptionClass, getOptionNumber, isOptionCopied
-
Constructor Details
-
StrictSourceRouteOption
Constructs a new instance of the class with the passed addresses used for the routing. If the set of addresses is larger than the option can hold an exception is thrown.- Parameters:
addrs- The list of addresses for the loose source route.- Throws:
IndexOutOfBoundsException- Thrown if the number of addresses is to large for the option
-
StrictSourceRouteOption
Constructs a new instance of the class with the passed addresses used for the routing. If the set of addresses is larger than the option can hold an exception is thrown.- Parameters:
addrs- The list of addresses for the loose source route.- Throws:
IndexOutOfBoundsException- Thrown if the number of addresses is to large for the option
-