Class AbstractFlowspecNlriParser

    • Field Detail

      • DEST_PREFIX_NID

        public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier DEST_PREFIX_NID
      • SOURCE_PREFIX_NID

        public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier SOURCE_PREFIX_NID
      • OP_NID

        public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier OP_NID
      • VALUE_NID

        public static final org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier VALUE_NID
    • Constructor Detail

      • AbstractFlowspecNlriParser

        protected AbstractFlowspecNlriParser​(FlowspecTypeRegistry flowspecTypeRegistry)
    • Method Detail

      • serializeMpReachNlri

        protected abstract void serializeMpReachNlri​(DestinationType dstType,
                                                     io.netty.buffer.ByteBuf byteAggregator)
      • serializeMpUnreachNlri

        protected abstract void serializeMpUnreachNlri​(DestinationType dstType,
                                                       io.netty.buffer.ByteBuf byteAggregator)
      • extractSpecificFlowspec

        public abstract void extractSpecificFlowspec​(org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode fsType,
                                                     FlowspecBuilder fsBuilder)
      • createWithdrawnDestinationType

        public abstract DestinationType createWithdrawnDestinationType​(Object @NonNull [] nlriFields,
                                                                       @Nullable PathId pathId)
        Create withdrawn destination type.
        Parameters:
        nlriFields - a list of NLRI fields to be included in the destination type
        pathId - associated path id with given NLRI
        Returns:
        created destination type
      • createAdvertizedRoutesDestinationType

        public abstract DestinationType createAdvertizedRoutesDestinationType​(Object @NonNull [] nlriFields,
                                                                              @Nullable PathId pathId)
        Create advertized destination type.
        Parameters:
        nlriFields - a list of NLRI fields to be included in the destination type
        pathId - associated path id with given NLRI
        Returns:
        created destination type
      • serializeNlri

        protected void serializeNlri​(Object @NonNull [] nlriFields,
                                     @NonNull io.netty.buffer.ByteBuf buffer)
      • serializeNlri

        protected final void serializeNlri​(List<Flowspec> flowspecList,
                                           @NonNull io.netty.buffer.ByteBuf buffer)
      • serializeNlri

        protected final void serializeNlri​(Object @NonNull [] nlriFields,
                                           @Nullable PathId pathId,
                                           @NonNull io.netty.buffer.ByteBuf buffer)
        Serializes Flowspec NLRI to ByteBuf.
        Parameters:
        nlriFields - NLRI fields to be serialized
        pathId - path ID
        buffer - where flowspec NLRI will be serialized
      • stringNlri

        public String stringNlri​(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode flowspec)
      • extractFlowspec

        public final List<Flowspec> extractFlowspec​(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route)
      • readNlriLength

        public static int readNlriLength​(@NonNull io.netty.buffer.ByteBuf nlri)
      • parseNlriFlowspecList

        protected final List<Flowspec> parseNlriFlowspecList​(@NonNull io.netty.buffer.ByteBuf nlri)
        Parses Flowspec NLRI into list of Flowspec.
        Parameters:
        nlri - byte representation of NLRI which will be parsed
        Returns:
        list of Flowspec
      • parseNlri

        protected Object @NonNull [] parseNlri​(@NonNull io.netty.buffer.ByteBuf nlri)
                                        throws BGPParsingException
        Override this function to parse additional NLRI fields.
        Parameters:
        nlri - NLRI buffer
        Returns:
        Parsed additional fields
        Throws:
        BGPParsingException