/** * Tests whether the IP version of this prefix is IPv6. * * @return true if the IP version of this prefix is IPv6, otherwise false. */ public boolean isIp6() { return address.isIp6(); }
/** * Initializes LISP locator's IPv6 address. * * @param address IP address */ public LispIpv6Address(IpAddress address) { super(address, AddressFamilyIdentifierEnum.IP6); checkArgument(address.isIp6()); }
/** * Gets the {@link Ip6Address} view of the IP address. * * @return the {@link Ip6Address} view of the IP address if it is IPv6, * otherwise null */ public Ip6Address getIp6Address() { if (!isIp6()) { return null; } // Return this object itself if it is already instance of Ip6Address if (this instanceof Ip6Address) { return (Ip6Address) this; } return Ip6Address.valueOf(octets); }
.filter(mcastRoute -> mcastRoute.group().isIp6()) .collect(Collectors.toSet());
.filter(mcastRoute -> mcastRoute.group().isIp6()) .collect(Collectors.toSet());
@Override public void writeTo(ByteBuf byteBuf, LispIpAddress address) throws LispWriterException { if (address.getAddress().isIp4()) { new Ipv4AddressWriter().writeTo(byteBuf, (LispIpv4Address) address); } if (address.getAddress().isIp6()) { new Ipv6AddressWriter().writeTo(byteBuf, (LispIpv6Address) address); } } }