public abstract class OpaqueLSA extends LSA
Opaque LSAs provide a generalized mechanism to allow for the future extensibility of OSPF. The information contained in Opaque LSAs may be used directly by OSPF or indirectly by some application wishing to distribute information throughout the OSPF domain. The exact use of Opaque LSAs is beyond the scope of this document.
Opaque LSAs consist of a standard LSA header followed by a 32-bit aligned application-specific information field. Like any other LSA, the Opaque LSA uses the link-state database distribution mechanism for flooding this information throughout the topology. The link- state type field of the Opaque LSA identifies the LSA's range of topological distribution. This range is referred to as the flooding scope.
It is envisioned that an implementation of the Opaque option provides an application interface for 1) encapsulating application-specific information in a specific Opaque type, 2) sending and receiving application-specific information, and 3) if required, informing the application of the change in validity of previously received information when topological changes are detected.
Opaque LSAs are types 9, 10, and 11 link state advertisements. Opaque LSAs consist of a standard LSA header followed by a 32-bit aligned application-specific information field. Standard link-state database flooding mechanisms are used for distribution of Opaque LSAs. The range of topological distribution (i.e., the flooding scope) of an Opaque LSA is identified by its link-state type. This section documents the flooding of Opaque LSAs.
The flooding scope associated with each Opaque link-state type is defined as follows.
The link-state ID of the Opaque LSA is divided into an Opaque type field (the first 8 bits) and a type-specific ID (the remaining 24 bits).
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS age | Options | 9, 10, or 11 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opaque Type | Opaque ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Advertising Router | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LS checksum | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Opaque Information | + + | ... |
Constructor and Description |
---|
OpaqueLSA()
Default Constructor
|
OpaqueLSA(byte[] bytes,
int offset)
Create opaque LSA from a bunch of bytes
|
Modifier and Type | Method and Description |
---|---|
void |
encodeLSAHeader() |
boolean |
equals(Object object)
Compare LSA by LStype
|
int |
getOpaqueId() |
int |
getOpaqueType() |
void |
setOpaqueId(int opaqueId) |
void |
setOpaqueType(int opaqueType) |
encode, getAdvertisingRouter, getChecksum, getLength, getLinkStateId, getLSAbytes, getLSage, getLSlength, getLSsequenceNumber, getLStype, getLStype, getOptions, printHeader, setAdvertisingRouter, setLength, setLinkStateId, setLSage, setLSsequenceNumber, setLStype, setOptions
public OpaqueLSA()
public OpaqueLSA(byte[] bytes, int offset) throws MalformedOSPFLSAException
bytes
- offset
- MalformedOSPFLSAException
public int getOpaqueType()
public void setOpaqueType(int opaqueType)
public int getOpaqueId()
public void setOpaqueId(int opaqueId)
public void encodeLSAHeader()
encodeLSAHeader
in class LSA
Copyright © 2016. All rights reserved.