Class MessageUtil
java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.MessageUtil
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int - 
Method Summary
Modifier and TypeMethodDescriptionstatic 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 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
 
 
 -