Class MessageUtil
- java.lang.Object
-
- org.opendaylight.protocol.bgp.parser.spi.MessageUtil
-
public final class MessageUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intCOMMON_HEADER_LENGTHstatic intMARKER_LENGTH
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidformatMessage(int type, io.netty.buffer.ByteBuf body, io.netty.buffer.ByteBuf buffer)Adds header to message value.static MpReachNlrigetMpReachNlri(Attributes attrs)Finds MP-REACH-NLRI in Update message attributes.static MpUnreachNlrigetMpUnreachNlri(Attributes attrs)Finds MP-UNREACH-NLRI in Update message attributes.static booleanisAnyNlriPresent(Update message)Check for NLRI attribute in Update message.
-
-
-
Field Detail
-
MARKER_LENGTH
public static final int MARKER_LENGTH
- See Also:
- Constant Field Values
-
COMMON_HEADER_LENGTH
public static final int COMMON_HEADER_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 messagebody- message bodybuffer- 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
-
-