public class SwitchLayer extends PCEPObject
Represents a SWITCH-LAYER Object, as defined in http://tools.ietf.org/id/draft-ietf-pce-inter-layer-ext-04.txt
From draft-ietf-pce-inter-layer-ext-04.txt, section 3.2. SWITCH-LAYER Object
The SWITCH-LAYER object is optional on a PCReq message and specifies switching layers in which a path MUST, or MUST NOT, be established. A switching layer is expressed as a switching type and encoding type. The SWITCH-LAYER object MUST NOT be used on a PCReq unless an INTER-LAYER object is also present on the PCReq message. The SWITCH-LAYER object is optional on a PCRep message, where it is used with the NO-PATH object in the case of unsuccessful path computation to indicate the set of constraints that could not be satisfied. SWITCH-LAYER Object-Class is to be assigned by IANA (recommended value=19) SWITCH-LAYER Object-Type is to be assigned by IANA (recommended value=1) The format of the SWITCH-LAYER 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LSP Enc. Type |Switching Type | Reserved |I| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | . | // . // | . | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LSP Enc. Type |Switching Type | Reserved |I| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Each row indicates a switching type and encoding type that must or must not be used for specified layer(s) in the computed path. The format is based on [RFC3471], and has equivalent semantics. LSP Encoding Type (8 bits): see [RFC3471] for a description of parameters. Switching Type (8 bits): see [RFC3471] for a description of parameters. I flag (1 bit): the I flag indicates whether a layer with the specified switching type and encoding type must or must not be used by the computed path. When the I flag is set (one), the computed path MUST traverse a layer with the specified switching type and encoding type. When the I flag is clear (zero), the computed path MUST NOT enter or traverse any layer with the specified switching type and encoding type. When a combination of switching type and encoding type is not included in SWITCH-LAYER object, the computed path MAY traverse a layer with that combination of switching type and encoding type. A PCC may want to specify only a Switching Type and not an LSP Encoding Type. In this case, the LSP Encoding Type is set to zero.Ibit, log, object_bytes, ObjectClass, ObjectLength, OT, Pbit, Res
Constructor and Description |
---|
SwitchLayer() |
SwitchLayer(byte[] bytes,
int offset) |
Modifier and Type | Method and Description |
---|---|
void |
decode()
Decode SwitchLayer PCEP Object
|
void |
encode()
Encode SwitchLayer PCEP Object
|
boolean |
equals(Object obj) |
LinkedList<SwitchEncodingType> |
getSwitchLayers() |
int |
hashCode() |
void |
setSwitchLayers(LinkedList<SwitchEncodingType> switchLayers) |
decode, decodeHeader, encode_header, getBytes, getLength, getObject_bytes, getObjectClass, getObjectClass, getObjectLength, getObjectType, getOT, getRes, isIbit, isPbit, setIbit, setObject_bytes, setObjectClass, setObjectLength, setOT, setPbit, setRes, supportedObject
public SwitchLayer()
public SwitchLayer(byte[] bytes, int offset) throws MalformedPCEPObjectException
MalformedPCEPObjectException
public void encode()
encode
in interface PCEPElement
encode
in class PCEPObject
public void decode() throws MalformedPCEPObjectException
decode
in class PCEPObject
MalformedPCEPObjectException
public LinkedList<SwitchEncodingType> getSwitchLayers()
public void setSwitchLayers(LinkedList<SwitchEncodingType> switchLayers)
public int hashCode()
hashCode
in class PCEPObject
public boolean equals(Object obj)
equals
in class PCEPObject
Copyright © 2016. All rights reserved.