Tabnine Logo
EthType.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.onlab.packet.EthType

Best Java code snippets using org.onlab.packet.EthType.toString (Showing top 3 results out of 315)

origin: org.onosproject/onos-core-common

@Override
public ObjectNode encode(Host host, CodecContext context) {
  checkNotNull(host, "Host cannot be null");
  final JsonCodec<HostLocation> locationCodec =
      context.codec(HostLocation.class);
  final ObjectNode result = context.mapper().createObjectNode()
      .put("id", host.id().toString())
      .put("mac", host.mac().toString())
      .put("vlan", host.vlan().toString())
      .put("innerVlan", host.innerVlan().toString())
      .put("outerTpid", host.tpid().toString())
      .put("configured", host.configured());
  final ArrayNode jsonIpAddresses = result.putArray("ipAddresses");
  for (final IpAddress ipAddress : host.ipAddresses()) {
    jsonIpAddresses.add(ipAddress.toString());
  }
  result.set("ipAddresses", jsonIpAddresses);
  final ArrayNode jsonLocations = result.putArray("locations");
  for (final HostLocation location : host.locations()) {
    jsonLocations.add(locationCodec.encode(location, context));
  }
  result.set("locations", jsonLocations);
  return annotate(result, host, context);
}
origin: org.onosproject/onos-core-common

  final L2ModificationInstruction.ModVlanHeaderInstruction pushVlanInstruction =
      (L2ModificationInstruction.ModVlanHeaderInstruction) l2Instruction;
  result.put(InstructionCodec.ETHERNET_TYPE, pushVlanInstruction.ethernetType().toString());
  break;
case VLAN_POP:
origin: org.onosproject/onos-cli

  /**
   * Prints information about a host.
   *
   * @param host end-station host
   */
  protected void printHost(Host host) {
    if (shortOnly) {
      print(FMT_SHORT, host.id(), host.mac(),
         host.locations(),
         host.vlan(), host.ipAddresses());
    } else {
      print(FMT, host.id(), host.mac(),
         host.locations(),
         host.vlan(), host.ipAddresses(), annotations(host.annotations()),
         host.innerVlan(), host.tpid().toString(),
         host.providerId().scheme(), host.providerId().id(),
         host.configured());
    }
  }
}
org.onlab.packetEthTypetoString

Popular methods of EthType

  • toShort
    Returns the short value for this ethtype.
  • <init>
    Builds the EthType.
  • equals
  • lookup
    Looks up the ethertype by it's numerical representation and returns it's textual format.

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • 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