Class ParameterUtil
java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.ParameterUtil
Utility class which is intended for formatting parameter.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
formatExtendedParameter
(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer) Adds header to parameter value in draft-ietf-idr-ext-opt-param-05 format.static void
formatParameter
(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer) Adds header to parameter value in RFC4271 format.
-
Method Details
-
formatParameter
public static void formatParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer) throws ParameterLengthOverflowException Adds header to parameter value in RFC4271 format.- Parameters:
type
- of the parametervalue
- parameter valuebuffer
- ByteBuf where the parameter will be copied with its header- Throws:
IllegalArgumentException
- if value length exceeds 255 bytesParameterLengthOverflowException
-
formatExtendedParameter
public static void formatExtendedParameter(int type, io.netty.buffer.ByteBuf value, io.netty.buffer.ByteBuf buffer) Adds header to parameter value in draft-ietf-idr-ext-opt-param-05 format.- Parameters:
type
- of the parametervalue
- parameter valuebuffer
- ByteBuf where the parameter will be copied with its header- Throws:
IllegalArgumentException
- if value length exceeds 65535 bytes
-