Package org.opendaylight.bgp.concepts
Class NextHopUtil
- java.lang.Object
-
- org.opendaylight.bgp.concepts.NextHopUtil
-
public final class NextHopUtil extends Object
Utility class for of CNextHop serialization and parsing.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CNextHop
parseNextHop(io.netty.buffer.ByteBuf buffer)
Parses CNextHop IP address from given ByteBuf.static CNextHop
parseNextHopFullIpv6(io.netty.buffer.ByteBuf buffer)
Parses CNextHop IPv6 global+local address from given ByteBuf, which has already been checked for size.static CNextHop
parseNextHopIpv4(io.netty.buffer.ByteBuf buffer)
Parses CNextHop IPv4 address from given ByteBuf, which has already been checked for size.static CNextHop
parseNextHopIpv6(io.netty.buffer.ByteBuf buffer)
Parses CNextHop IPv6 global address from given ByteBuf, which has already been checked for size.static void
serializeNextHop(CNextHop cnextHop, io.netty.buffer.ByteBuf byteAggregator)
Writes serialized cnextHop IP address as byte value into ByteBuf.
-
-
-
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 serializedbyteAggregator
- 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
-
-