Class LUNlriParser
- java.lang.Object
-
- org.opendaylight.protocol.bgp.labeled.unicast.LUNlriParser
-
- All Implemented Interfaces:
NlriParser
,NlriSerializer
public class LUNlriParser extends Object implements NlriParser, NlriSerializer
-
-
Field Summary
Fields Modifier and Type Field Description static int
LABEL_LENGTH
-
Constructor Summary
Constructors Constructor Description LUNlriParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
getPrefixLength(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix)
static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix
parseIpPrefix(io.netty.buffer.ByteBuf nlri, int prefixLen, Class<? extends AddressFamily> afi)
static List<LabelStack>
parseLabel(io.netty.buffer.ByteBuf nlri)
void
parseNlri(io.netty.buffer.ByteBuf nlri, MpReachNlriBuilder builder, PeerSpecificParserConstraint constraint)
Parse MP UN_REACH NLRI from buffer.void
parseNlri(io.netty.buffer.ByteBuf nlri, MpUnreachNlriBuilder builder, PeerSpecificParserConstraint constraint)
Parse MP UN_REACH NLRI from buffer.void
serializeAttribute(Attributes pathAttributes, io.netty.buffer.ByteBuf byteAggregator)
static void
serializeLabelStackEntries(List<LabelStack> stack, boolean isUnreachNlri, io.netty.buffer.ByteBuf buffer)
protected static void
serializeNlri(List<CLabeledUnicastDestination> dests, boolean isUnreachNlri, io.netty.buffer.ByteBuf buffer)
static void
serializePrefixField(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix, io.netty.buffer.ByteBuf buffer)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.protocol.bgp.parser.spi.NlriParser
convertMpReachToMpUnReach
-
-
-
-
Field Detail
-
LABEL_LENGTH
public static final int LABEL_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
serializeAttribute
public void serializeAttribute(Attributes pathAttributes, io.netty.buffer.ByteBuf byteAggregator)
- Specified by:
serializeAttribute
in interfaceNlriSerializer
-
serializeNlri
protected static void serializeNlri(List<CLabeledUnicastDestination> dests, boolean isUnreachNlri, io.netty.buffer.ByteBuf buffer)
-
serializeLabelStackEntries
public static void serializeLabelStackEntries(List<LabelStack> stack, boolean isUnreachNlri, io.netty.buffer.ByteBuf buffer)
-
serializePrefixField
public static void serializePrefixField(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix, io.netty.buffer.ByteBuf buffer)
-
getPrefixLength
public static int getPrefixLength(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix)
-
parseIpPrefix
public static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix parseIpPrefix(io.netty.buffer.ByteBuf nlri, int prefixLen, Class<? extends AddressFamily> afi)
-
parseLabel
public static List<LabelStack> parseLabel(io.netty.buffer.ByteBuf nlri)
-
parseNlri
public void parseNlri(io.netty.buffer.ByteBuf nlri, MpReachNlriBuilder builder, PeerSpecificParserConstraint constraint) throws BGPParsingException
Description copied from interface:NlriParser
Parse MP UN_REACH NLRI from buffer.- Specified by:
parseNlri
in interfaceNlriParser
- Parameters:
nlri
- Encoded reachable NLRI in ByteBuf.builder
- MP REACH NLRI builder.constraint
- Peer specific constraints.- Throws:
BGPParsingException
- exception.
-
parseNlri
public void parseNlri(io.netty.buffer.ByteBuf nlri, MpUnreachNlriBuilder builder, PeerSpecificParserConstraint constraint) throws BGPParsingException
Description copied from interface:NlriParser
Parse MP UN_REACH NLRI from buffer.- Specified by:
parseNlri
in interfaceNlriParser
- Parameters:
nlri
- Encoded unreachable NLRI in ByteBuf.builder
- MP UNREACH NLRI builder.constraint
- Peer specific constraints.- Throws:
BGPParsingException
- exception.
-
-