Class EvpnNlriParser

java.lang.Object
org.opendaylight.protocol.bgp.evpn.impl.nlri.EvpnNlriParser
All Implemented Interfaces:
NlriParser, NlriSerializer

public final class EvpnNlriParser extends Object implements NlriParser, NlriSerializer
  • Constructor Details

    • EvpnNlriParser

      public EvpnNlriParser()
  • Method Details

    • extractEvpnDestination

      public static EvpnDestination extractEvpnDestination(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route)
    • extractRouteKeyDestination

      public static EvpnDestination extractRouteKeyDestination(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode evpnChoice)
    • 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.
    • 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.
    • serializeAttribute

      public void serializeAttribute(Attributes pathAttributes, io.netty.buffer.ByteBuf byteAggregator)
      Specified by:
      serializeAttribute in interface NlriSerializer
    • serializeNlri

      public static void serializeNlri(List<EvpnDestination> destinationList, io.netty.buffer.ByteBuf output)
    • convertMpReachToMpUnReach

      public boolean convertMpReachToMpUnReach(MpReachNlri mpReachNlri, MpUnreachNlriBuilder builder)
      Description copied from interface: NlriParser
      Convert MP_REACH attribute and merge it to existing MpUnreachNlriBuilder.
      Specified by:
      convertMpReachToMpUnReach in interface NlriParser
      Parameters:
      mpReachNlri - MP_REACH attribute to be converted
      builder - to which converted routing information should be added
      Returns:
      True if the conversion was successful, false otherwise