/* Altran Technologies Proprietary This source code is the sole property of Altran Technologies. Any form of utilization of this source code in whole or in part is prohibited without written consent from Altran Technologies File Name : PcepReqAdapCap.java Principal Author : Supriya Saini Subsystem Name : Module Name : Pcepio Date of First Release : 15/5/2019 Author : Supriya Saini Description : Change History Version : 1.0 Date(DD/MM/YYYY) : 6/4/2019 Modified by : Supriya Saini Description of change : Initial version */ package org.onosproject.pcepio.protocol; import org.jboss.netty.buffer.ChannelBuffer; import org.onosproject.pcepio.exceptions.PcepParseException; /** * REQ-ADAP-CAP Object *
* The REQ-ADAP-CAP object is optional and is used to specify a * requested adaptation capability for both ends of the lower layer LSP. * The REQ-ADAP-CAP object is used in a PCReq message for inter-PCE * communication, where the PCE that is responsible for computing higher * layer paths acts as a PCC to request a path computation from a PCE * that is responsible for computing lower layer paths. *
* draft-ietf-pce-inter-layer-ext-08.txt January 2014 *
*
* The REQ-ADAP-CAP object is used in a PCRep message in case of * unsuccessful path computation (in this case, the PCRep message also * contains a NO-PATH object, and the REQ-ADAP-CAP object is used to * indicate the set of constraints that could not be satisfied). *
* The REQ-ADAP-CAP object MAY be used in a PCReq message in a mono- * layer network to specify a requested adaptation capability for both * ends of the LSP. In this case, it MAY be carried without INTER-LAYER * Object. *
* REQ-ADAP-CAP Object-Class is to be assigned by IANA (recommended * value=20) *
* REQ-ADAP-CAP Object-Type is to be assigned by IANA (recommended * value=1) *
* The format of the REQ-ADAP-CAP 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 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Switching Cap | Encoding | Reserved | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ *
*
* The format is based on [RFC6001] and has equivalent semantics as the * IACD Upper SC and Lower SC. *
* Switching Capability (8 bits): see [RFC4203] for a description of * parameters. *
* Encoding (8 bits): see [RFC3471] for a description of parameters. *
* A PCC may want to specify a Switching Capability, but not an Encoding. * In this case, the Encoding MUST be set zero. * * @author ogondio */ public interface PcepReqAdapCap { /** * Returns switching capability. * * @return int */ int getSwitchingCap(); /** * Sets switching capability. * * @param switchingCap switching capability */ void setSwitchingCap(int switchingCap); /** * Returns encoding type. * * @return int */ int getEncoding(); /** * Sets encoding type. * * @param encoding encoding type */ void setEncoding(int encoding); /** * Writes the PcepReqAdapCap into channel buffer. * * @param bb channel buffer * @return Returns the writerIndex of this buffer * @throws PcepParseException while writing PcepReqAdapCap object. */ int write(ChannelBuffer bb) throws PcepParseException; /** * Builder interface with get and set functions to build PcepReqAdapCap object. */ interface Builder { /** * Builds PcepReqAdapCap Object. * * @return PcepReqAdapCap Object */ PcepReqAdapCap build(); /** * Returns switching capability. * * @return int */ int getSwitchingCap(); /** * Sets switching capability and returns its builder. * * @param switchingCap switching capability * @return Builder */ Builder setSwitchingCap(int switchingCap); /** * Returns encoding type. * * @return int */ int getEncoding(); /** * Sets encoding type and returns its builder. * * @param encoding encoding type * @return Builder */ Builder setEncoding(int encoding); /** * Sets P flag in PcepReqAdapCap object header and returns its builder. * * @param value boolean value to set P flag * @return Builder by setting P flag */ Builder setPFlag(boolean value); /** * Sets I flag in PcepReqAdapCap object header and returns its builder. * * @param value boolean value to set I flag * @return Builder by setting I flag */ Builder setIFlag(boolean value); } }