Class MessageUtil

java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.MessageUtil

public final class MessageUtil extends Object
  • Field Details

  • Method Details

    • formatMessage

      public static void formatMessage(int type, io.netty.buffer.ByteBuf body, io.netty.buffer.ByteBuf buffer)
      Adds header to message value.
      Parameters:
      type - of the message
      body - message body
      buffer - ByteBuf where the message will be copied with its header
    • isAnyNlriPresent

      public static boolean isAnyNlriPresent(Update message)
      Check for NLRI attribute in Update message.
      Parameters:
      message - Update message
      Returns:
      true if any prefix or MP-REACH-NLRI attribute is present, false otherwise
    • getMpReachNlri

      public static MpReachNlri getMpReachNlri(Attributes attrs)
      Finds MP-REACH-NLRI in Update message attributes.
      Parameters:
      attrs - Update message attributes
      Returns:
      MP-REACH-NLRI if present in the attributes, null otherwise
    • getMpUnreachNlri

      public static MpUnreachNlri getMpUnreachNlri(Attributes attrs)
      Finds MP-UNREACH-NLRI in Update message attributes.
      Parameters:
      attrs - Update message attributes
      Returns:
      MP-UNREACH-NLRI if present in the attributes, null otherwise