Codota Logo
EthType.<init>
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
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

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now