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 Details

  • Constructor Details

    • LUNlriParser

      public LUNlriParser()
  • Method Details

    • serializeAttribute

      public void serializeAttribute(Attributes pathAttributes, io.netty.buffer.ByteBuf byteAggregator)
      Specified by:
      serializeAttribute in interface NlriSerializer
    • 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, 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 interface NlriParser
      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 interface NlriParser
      Parameters:
      nlri - Encoded unreachable NLRI in ByteBuf.
      builder - MP UNREACH NLRI builder.
      constraint - Peer specific constraints.
      Throws:
      BGPParsingException - exception.