Tabnine Logo
EthType.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.onlab.packet.EthType
constructor

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

origin: org.onosproject/onlab-misc

/**
 * Constructs a new ethertype.
 *
 * @param ethType The actual ethertype
 * @param type it's textual representation
 * @param deserializer a parser for this ethertype
 */
EtherType(int ethType, String type, Deserializer<?> deserializer) {
  this.etherType = new EthType(ethType);
  this.type = type;
  this.deserializer = deserializer;
}
origin: org.onosproject/onos-core-common

/**
 * Returns Ethernet type.
 *
 * @return ethernet type
 * @throws IllegalArgumentException if the JSON is invalid
 */
private EthType getEthType() {
  String ethTypeStr = nullIsIllegal(json.get(InstructionCodec.ETHERNET_TYPE),
       InstructionCodec.ETHERNET_TYPE + InstructionCodec.MISSING_MEMBER_MESSAGE).asText();
  Matcher matcher = ETHTYPE_PATTERN.matcher(ethTypeStr);
  if (!matcher.matches()) {
    throw new IllegalArgumentException("ETHERNET_TYPE must be a four digit hex string starting with 0x");
  }
  short ethernetType = (short) Integer.parseInt(matcher.group(1), 16);
  return new EthType(ethernetType);
}
origin: org.onosproject/onos-of-provider-flow

case POP_MPLS:
  OFActionPopMpls popMpls = (OFActionPopMpls) act;
  builder.popMpls(new EthType(popMpls.getEthertype().getValue()));
  break;
case PUSH_MPLS:
org.onlab.packetEthType<init>

Javadoc

Builds the EthType.

Popular methods of EthType

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

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • CodeWhisperer alternatives
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