Interface NlriRegistry
-
@NonNullByDefault public interface NlriRegistry
The codec registry for BGP NLRI, offers services for NLRI encoding/decoding.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<MpUnreachNlri>
convertMpReachToMpUnReach(MpReachNlri mpReachNlri, @Nullable MpUnreachNlri mpUnreachNlri)
Convert MP_REACH attribute to MP_UNREACH attribute and merge it with original one if it exists.Iterable<NlriSerializer>
getSerializers()
Get all available NLRI encoders.MpReachNlri
parseMpReach(io.netty.buffer.ByteBuf buffer, @Nullable PeerSpecificParserConstraint constraint)
Decode MP REACH NLRI Attribute.MpUnreachNlri
parseMpUnreach(io.netty.buffer.ByteBuf buffer, @Nullable PeerSpecificParserConstraint constraint)
Decode MP REACH NLRI Attribute.void
serializeMpReach(MpReachNlri mpReachNlri, io.netty.buffer.ByteBuf byteAggregator)
Encode BGP MP REACH NLRI Attribute.void
serializeMpUnReach(MpUnreachNlri mpUnreachNlri, io.netty.buffer.ByteBuf byteAggregator)
Encode BGP MP UNREACH NLRI Attribute.
-
-
-
Method Detail
-
parseMpReach
MpReachNlri parseMpReach(io.netty.buffer.ByteBuf buffer, @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException
Decode MP REACH NLRI Attribute.- Parameters:
buffer
- Input buffer.constraint
- Peer specific constraint.- Returns:
- Parsed reach NLRI.
- Throws:
BGPParsingException
-
parseMpUnreach
MpUnreachNlri parseMpUnreach(io.netty.buffer.ByteBuf buffer, @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException
Decode MP REACH NLRI Attribute.- Parameters:
buffer
- Input buffer.constraint
- Peer specific constraint.- Returns:
- Parsed unreach NLRI.
- Throws:
BGPParsingException
-
serializeMpReach
void serializeMpReach(MpReachNlri mpReachNlri, io.netty.buffer.ByteBuf byteAggregator)
Encode BGP MP REACH NLRI Attribute.- Parameters:
mpReachNlri
- Input reach NLRI.byteAggregator
- Output buffer.
-
serializeMpUnReach
void serializeMpUnReach(MpUnreachNlri mpUnreachNlri, io.netty.buffer.ByteBuf byteAggregator)
Encode BGP MP UNREACH NLRI Attribute.- Parameters:
mpUnreachNlri
- Input unreach NLRI.byteAggregator
- Output buffer.
-
getSerializers
Iterable<NlriSerializer> getSerializers()
Get all available NLRI encoders.- Returns:
- Iterable of NLRI serializers.
-
convertMpReachToMpUnReach
Optional<MpUnreachNlri> convertMpReachToMpUnReach(MpReachNlri mpReachNlri, @Nullable MpUnreachNlri mpUnreachNlri)
Convert MP_REACH attribute to MP_UNREACH attribute and merge it with original one if it exists.The default implementation rejects the conversion.
- Parameters:
mpReachNlri
- MP_REACH attribute to be convertedmpUnreachNlri
- original MP_UNREACH attribute- Returns:
- resulting MP_UNREACH attribute after conversion
-
-