public class OPEN extends PCEPObject
Represents a PCEP OPEN Object, as described in RFC 5440.
No optional TLVs in current version
From RFC 5440, Section 7.3. OPEN Object
The OPEN object MUST be present in each Open message and MAY be
present in a PCErr message. There MUST be only one OPEN object per
Open or PCErr message.
The OPEN object contains a set of fields used to specify the PCEP
version, Keepalive frequency, DeadTimer, and PCEP session ID, along
with various flags. The OPEN object may also contain a set of TLVs
used to convey various session characteristics such as the detailed
PCE capabilities, policy rules, and so on. No TLVs are currently
defined.
OPEN Object-Class is 1.
OPEN Object-Type is 1.
The format of the OPEN object body is as follows:
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ver | Flags | Keepalive | DeadTimer | SID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
// Optional TLVs //
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9: OPEN Object Format
Ver (3 bits): PCEP version. Current version is 1.
Flags (5 bits): No flags are currently defined. Unassigned bits are
considered as reserved. They MUST be set to zero on transmission
and MUST be ignored on receipt.
Keepalive (8 bits): maximum period of time (in seconds) between two
consecutive PCEP messages sent by the sender of this message. The
minimum value for the Keepalive is 1 second. When set to 0, once
the session is established, no further Keepalive messages are sent
to the remote peer. A RECOMMENDED value for the keepalive
frequency is 30 seconds.
DeadTimer (8 bits): specifies the amount of time after the
expiration of which the PCEP peer can declare the session with the
sender of the Open message to be down if no PCEP message has been
received. The DeadTimer SHOULD be set to 0 and MUST be ignored if
the Keepalive is set to 0. A RECOMMENDED value for the DeadTimer
is 4 times the value of the Keepalive.
Example:
A sends an Open message to B with Keepalive=10 seconds and
DeadTimer=40 seconds. This means that A sends Keepalive messages (or
any other PCEP message) to B every 10 seconds and B can declare the
PCEP session with A down if no PCEP message has been received from A
within any 40-second period.
SID (PCEP session ID - 8 bits): unsigned PCEP session number that
identifies the current session. The SID MUST be incremented each
time a new PCEP session is established. It is used for logging
and troubleshooting purposes. Each increment SHOULD have a value
of 1 and may cause a wrap back to zero.
The SID is used to disambiguate instances of sessions to the same
peer. A PCEP implementation could use a single source of SIDs
across all peers, or one source for each peer. The former might
constrain the implementation to only 256 concurrent sessions. The
latter potentially requires more states. There is one SID number
in each direction.
Optional TLVs may be included within the OPEN object body to specify
PCC or PCE characteristics. The specification of such TLVs is
outside the scope of this document.
When present in an Open message, the OPEN object specifies the
proposed PCEP session characteristics. Upon receiving unacceptable
PCEP session characteristics during the PCEP session initialization
phase, the receiving PCEP peer (PCE) MAY include an OPEN object
within the PCErr message so as to propose alternative acceptable
session characteristic values.
Ibit, log, object_bytes, ObjectClass, ObjectLength, OT, Pbit, Res| Constructor and Description |
|---|
OPEN()
Default constructor.
|
OPEN(byte[] bytes,
int offset)
Constructs a new OPEN Object from a sequence of bytes
|
decode, decodeHeader, encode_header, getBytes, getLength, getObject_bytes, getObjectClass, getObjectClass, getObjectLength, getObjectType, getOT, getRes, isIbit, isPbit, setIbit, setObject_bytes, setObjectClass, setObjectLength, setOT, setPbit, setRes, supportedObjectpublic OPEN()
public OPEN(byte[] bytes,
int offset)
throws MalformedPCEPObjectException
bytes - Sequence of bytes where the object is presentoffset - Position at which the object startsMalformedPCEPObjectException - Thrown if the decoded object is not well formedpublic void encode()
encode in interface PCEPElementencode in class PCEPObjectpublic void decode()
throws MalformedPCEPObjectException
decode in class PCEPObjectMalformedPCEPObjectExceptionpublic int getDeadtimer()
public int getKeepalive()
public int getSID()
public int getVer()
public void setDeadtimer(int dt)
dt - Deadtimerpublic void setKeeealive(int ka)
ka - Keepalive timerpublic void setKeepalive(int keepalive)
public void setSID(int sd)
sd - Session IDpublic void setVer(int version)
version - PCEP Versionpublic boolean isParentPCERequestBit()
public void setParentPCERequestBit(boolean parentPCERequestBit)
public boolean isParentPCEIndicationBit()
public void setParentPCEIndicationBit(boolean parentPCEIndicationBit)
public OF_LIST_TLV getOf_list_tlv()
public void setOf_list_tlv(OF_LIST_TLV of_list_tlv)
public DomainIDTLV getDomain_id_tlv()
public void setDomain_id_tlv(DomainIDTLV domain_id_tlv)
public PCE_ID_TLV getPce_id_tlv()
public void setPce_id_tlv(PCE_ID_TLV pce_id_tlv)
public StatefulCapabilityTLV getStateful_capability_tlv()
public void setStateful_capability_tlv(StatefulCapabilityTLV stateful_capability_tlv)
public SRCapabilityTLV getSR_capability_tlv()
public void setSR_capability_tlv(SRCapabilityTLV SR_capability_tlv)
public LSPDatabaseVersionTLV getLsp_database_version_tlv()
public void setLsp_database_version_tlv(LSPDatabaseVersionTLV lsp_database_version_tlv)
public PCE_Redundancy_Group_Identifier_TLV getRedundancy_indetifier_tlv()
public void setRedundancy_indetifier_tlv(PCE_Redundancy_Group_Identifier_TLV redundancy_indetifier_tlv)
public GMPLSCapabilityTLV getGmplsCapabilityTLV()
public void setGmplsCapabilityTLV(GMPLSCapabilityTLV gmplsCapabilityTLV)
public int hashCode()
hashCode in class PCEPObjectpublic boolean equals(Object obj)
equals in class PCEPObjectCopyright © 2016. All rights reserved.