Tabnine Logo
Ipv6Address
Code IndexAdd Tabnine to your IDE (free)

How to use
Ipv6Address
in
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715

Best Java code snippets using org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address (Showing top 20 results out of 369)

origin: io.fd.hc2vpp.srv6/srv6-impl

/**
 * Constructs unique name for candidate path based on binding sid and weight
 *
 * @param bsid   binding sid associated with candidate path
 * @param weight weight of actual sidList
 * @return candidate path name
 */
public static String getCandidatePathName(final Ipv6Address bsid, final long weight) {
  return bsid.getValue() + "-" + weight;
}
origin: org.opendaylight.bgpcep/util

/**
 * Creates uncompressed IP Address
 *
 * @param ip to be uncompressed
 * @return Ipv6Address with same, but uncompressed, value
 */
public static Ipv6Address getFullForm(final Ipv6Address ip) {
  return new Ipv6Address(InetAddresses.forString(ip.getValue()).getHostAddress());
}
origin: io.fd.hc2vpp.srv6/srv6-impl

@Override
public Ipv6Address getPolicyBsid(@Nonnull Long color, @Nonnull Ipv6Address endpoint,
                 @Nonnull final MappingContext ctx) {
  Optional<Srv6PolicyMappings> read = ctx.read(ctxIid);
  if (read.isPresent()) {
    return read.get().getSrv6PolicyMapping().stream()
        .filter(srv6PolicyMapping -> srv6PolicyMapping.getColor().equals(color) &&
            srv6PolicyMapping.getEndpoint().equals(endpoint))
        .map(Srv6PolicyMapping::getBsid).findFirst().orElse(null);
  }
  return null;
}
origin: org.opendaylight.mdsal.model/ietf-inet-types-2013-07-15

public static Ipv6Address getDefaultInstance(String defaultValue) {
  return new Ipv6Address(defaultValue);
}
origin: org.opendaylight.mdsal.model/ietf-inet-types-2013-07-15

@ConstructorProperties("value")
public Ipv6Address(java.lang.String _value) {
  if (_value != null) {
    check_valueLength(_value);
    }


  Preconditions.checkNotNull(_value, "Supplied value may not be null");

    for (Pattern p : patterns) {
      Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p);
    }

  this._value = _value;
}

origin: org.opendaylight.coretutorials/openconfig-bgp

public static Ipv6Address getDefaultInstance(String defaultValue) {
  return new Ipv6Address(defaultValue);
}
origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-inet-types

@ConstructorProperties("value")
public Ipv6Address(String _value) {
  if (_value != null) {
    check_valueLength(_value);
  }

  Objects.requireNonNull(_value, "Supplied value may not be null");
  CodeHelpers.checkPattern(_value, patterns, regexes);

  this._value = _value;
}

origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-inet-types

@Override
protected String ipv6AddressString(final Ipv6Address addr) {
  return addr.getValue();
}
origin: org.opendaylight.openflowplugin/openflowplugin

public static Ipv6Address compressedIpv6AddressFormat(final Ipv6Address ipv6Address) {
  return new Ipv6Address(compressedIpv6FormatFromString(ipv6Address.getValue()));
}
origin: org.opendaylight.mdsal.binding.model.ietf/rfc6991-ietf-inet-types

public static Ipv6Address getDefaultInstance(String defaultValue) {
  return new Ipv6Address(defaultValue);
}
origin: org.opendaylight.coretutorials/openconfig-bgp

    return false;
} else if(!_ipv6Address.equals(other._ipv6Address)) {
  return false;
origin: org.opendaylight.mdsal.model/ietf-inet-types-2013-07-15

@Override
protected String ipv6AddressString(final Ipv6Address addr) {
  return addr.getValue();
}
origin: org.opendaylight.netvirt/neutronvpn-impl

protected static IpAddress getIpv6LinkLocalAddressFromMac(MacAddress mac) {
  byte[] octets = bytesFromHexString(mac.getValue());
  /* As per the RFC2373, steps involved to generate a LLA include
    1. Convert the 48 bit MAC address to 64 bit value by inserting 0xFFFE
     between OUI and NIC Specific part.
    2. Invert the Universal/Local flag in the OUI portion of the address.
    3. Use the prefix "FE80::/10" along with the above 64 bit Interface
     identifier to generate the IPv6 LLA. */
  StringBuffer interfaceID = new StringBuffer();
  short u8byte = (short) (octets[0] & 0xff);
  u8byte ^= 1 << 1;
  interfaceID.append(Integer.toHexString(0xFF & u8byte));
  interfaceID.append(StringUtils.leftPad(Integer.toHexString(0xFF & octets[1]), 2, "0"));
  interfaceID.append(":");
  interfaceID.append(Integer.toHexString(0xFF & octets[2]));
  interfaceID.append("ff:fe");
  interfaceID.append(StringUtils.leftPad(Integer.toHexString(0xFF & octets[3]), 2, "0"));
  interfaceID.append(":");
  interfaceID.append(Integer.toHexString(0xFF & octets[4]));
  interfaceID.append(StringUtils.leftPad(Integer.toHexString(0xFF & octets[5]), 2, "0"));
  Ipv6Address ipv6LLA = new Ipv6Address("fe80:0:0:0:" + interfaceID.toString());
  IpAddress ipAddress = new IpAddress(ipv6LLA.getValue().toCharArray());
  return ipAddress;
}
origin: io.fd.hc2vpp.srv6/srv6-impl

  static Ipv6Address parseLocator(@Nonnull final Ipv6Prefix prefix) {
    Matcher matcher = IP_PREFIX_PATTERN.matcher(prefix.getValue());
    checkArgument(matcher.matches(), "Could`t parse Locator: {}", prefix);
    return new Ipv6Address(matcher.group(GROUP_IP));
  }
}
origin: org.opendaylight.netvirt/ipv6service-impl

private void updateNAResponse(NeighborSolicitationPacket pdu,
               VirtualPort port, NeighborAdvertisePacketBuilder naPacket) {
  long flag = 0;
  if (!pdu.getSourceIpv6().equals(ipv6Utils.UNSPECIFIED_ADDR)) {
    naPacket.setDestinationIpv6(pdu.getSourceIpv6());
    flag = 0xE0; // Set Router, Solicited and Override Flag.
  } else {
    naPacket.setDestinationIpv6(ipv6Utils.ALL_NODES_MCAST_ADDR);
    flag = 0xA0; // Set Router and Override Flag.
  }
  naPacket.setDestinationMac(pdu.getSourceMac());
  naPacket.setEthertype(pdu.getEthertype());
  naPacket.setSourceIpv6(pdu.getTargetIpAddress());
  naPacket.setSourceMac(new MacAddress(port.getMacAddress()));
  naPacket.setHopLimit(Ipv6Constants.ICMP_V6_MAX_HOP_LIMIT);
  naPacket.setIcmp6Type(Ipv6Constants.ICMP_V6_NA_CODE);
  naPacket.setIcmp6Code(pdu.getIcmp6Code());
  flag = flag << 24;
  naPacket.setFlags(flag);
  naPacket.setFlowLabel(pdu.getFlowLabel());
  naPacket.setIpv6Length(32);
  naPacket.setNextHeader(pdu.getNextHeader());
  naPacket.setOptionType((short)2);
  naPacket.setTargetAddrLength((short)1);
  naPacket.setTargetAddress(pdu.getTargetIpAddress());
  naPacket.setTargetLlAddress(new MacAddress(port.getMacAddress()));
  naPacket.setVersion(pdu.getVersion());
  naPacket.setIcmp6Chksum(0);
  return;
}
origin: org.opendaylight.coretutorials/openconfig-bgp

public IpAddress(Ipv6Address _ipv6Address) {
  super();
  this._ipv6Address = _ipv6Address;
  this._ipv4Address = null;
  this._value = _ipv6Address.getValue().toString().toCharArray();
}

origin: io.fd.hc2vpp.srv6/srv6-impl

Ipv6Address resolveSidAddress(@Nonnull final Prefix locPrefix, @Nonnull Sid localSid) {
  com.googlecode.ipv6.IPv6Address ip =
      com.googlecode.ipv6.IPv6Address.fromString(locPrefix.getAddress().getValue());
  IPv6NetworkMask mask = IPv6NetworkMask.fromPrefixLength(locPrefix.getLength().getValue());
  // strip function part if present
  ip = ip.maskWithNetworkMask(mask);
  //add new function part based on opcode
  String locIp = ip.add(localSid.getOpcode().getValue().intValue()).toString();
  return new Ipv6Address(locIp);
}
origin: org.opendaylight.mdsal.binding.model.ietf/rfc8294-ietf-routing-types

public static Ipv6MulticastSourceAddress getDefaultInstance(final String defaultValue) {
  return Enumeration.forName(defaultValue).map(ENUMERATED::get)
      .orElse(new Ipv6MulticastSourceAddress(new Ipv6Address(defaultValue)));
}
origin: org.opendaylight.openflowplugin.applications/statistics-manager

private static Ipv6Prefix createPrefix(final Ipv6Address ipv6Address, final String mask) {
  if (mask != null && !mask.isEmpty()) {
    return new Ipv6Prefix(ipv6Address.getValue() + PREFIX_SEPARATOR + mask);
  } else {
    return new Ipv6Prefix(ipv6Address.getValue() + PREFIX_SEPARATOR + IPV6_ADDRESS_LENGTH);
  }
}
origin: io.fd.hc2vpp.srv6/srv6-impl

@Nonnull
public synchronized Srv6PolicyMapping getPolicy(@Nonnull final Ipv6Address bsid,
                        @Nonnull final MappingContext ctx) {
  final Optional<Srv6PolicyMapping> read = ctx.read(getPolicyIid(bsid));
  if (read.isPresent()) {
    return read.get();
  }
  //if not present we need to generate artificial mapping
  Long nextArtificialColor = getNextArtificialColor();
  Ipv6Address endpoint = new Ipv6Address(DUMMY_EP + nextArtificialColor);
  Srv6PolicyMapping mapping =
      new Srv6PolicyMappingBuilder().setBsid(bsid).setColor(nextArtificialColor).setEndpoint(endpoint)
          .setName(bsid.getValue()).build();
  addPolicy(mapping.getName(), mapping.getColor(), mapping.getEndpoint(), mapping.getBsid(), ctx);
  return mapping;
}
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715Ipv6Address

Javadoc

The ipv6-address type represents an IPv6 address in full, mixed, shortened, and shortened-mixed notation. The IPv6 address may include a zone index, separated by a % sign. The zone index is used to disambiguate identical address values. For link-local addresses, the zone index will typically be the interface index number or the name of an interface. If the zone index is not present, the default zone of the device will be used. The canonical format of IPv6 addresses uses the textual representation defined in Section 4 of RFC 5952. The canonical format for the zone index is the numerical format as described in Section 11.2 of RFC 4007.

Most used methods

  • getValue
  • <init>
    Creates a copy from Source Object.
  • equals
  • check_valueLength
  • getDefaultInstance
  • hashCode

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JTable (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now