Class MessageUtil
java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.MessageUtil
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
formatMessage
(int type, io.netty.buffer.ByteBuf body, io.netty.buffer.ByteBuf buffer) Adds header to message value.static MpReachNlri
getMpReachNlri
(Attributes attrs) Finds MP-REACH-NLRI in Update message attributes.static MpUnreachNlri
getMpUnreachNlri
(Attributes attrs) Finds MP-UNREACH-NLRI in Update message attributes.static boolean
isAnyNlriPresent
(Update message) Check for NLRI attribute in Update message.
-
Field Details
-
MARKER_LENGTH
public static final int MARKER_LENGTH- See Also:
-
COMMON_HEADER_LENGTH
public static final int COMMON_HEADER_LENGTH- See Also:
-
-
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 messagebody
- message bodybuffer
- ByteBuf where the message will be copied with its header
-
isAnyNlriPresent
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
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
Finds MP-UNREACH-NLRI in Update message attributes.- Parameters:
attrs
- Update message attributes- Returns:
- MP-UNREACH-NLRI if present in the attributes, null otherwise
-