Class NextHopUtil


  • public final class NextHopUtil
    extends Object
    Utility class for of CNextHop serialization and parsing.
    • Method Detail

      • serializeNextHop

        public static void serializeNextHop​(CNextHop cnextHop,
                                            io.netty.buffer.ByteBuf byteAggregator)
        Writes serialized cnextHop IP address as byte value into ByteBuf.
        Parameters:
        cnextHop - next hop to be serialized
        byteAggregator - where the next hop will be written
      • parseNextHop

        public static CNextHop parseNextHop​(io.netty.buffer.ByteBuf buffer)
        Parses CNextHop IP address from given ByteBuf.
        Parameters:
        buffer - contains byte array representation of CNextHop
        Returns:
        CNexthop object
      • parseNextHopIpv4

        public static CNextHop parseNextHopIpv4​(io.netty.buffer.ByteBuf buffer)
        Parses CNextHop IPv4 address from given ByteBuf, which has already been checked for size.
        Parameters:
        buffer - contains byte array representation of CNextHop
        Returns:
        CNexthop object
      • parseNextHopIpv6

        public static CNextHop parseNextHopIpv6​(io.netty.buffer.ByteBuf buffer)
        Parses CNextHop IPv6 global address from given ByteBuf, which has already been checked for size.
        Parameters:
        buffer - contains byte array representation of CNextHop
        Returns:
        CNexthop object
      • parseNextHopFullIpv6

        public static CNextHop parseNextHopFullIpv6​(io.netty.buffer.ByteBuf buffer)
        Parses CNextHop IPv6 global+local address from given ByteBuf, which has already been checked for size.
        Parameters:
        buffer - contains byte array representation of CNextHop
        Returns:
        CNexthop object