blob: e7ae79eee22db6c2b116830f77d28788fa015323 [file] [log] [blame]
Ray Milkey9fdf1ea2014-10-21 09:48:02 -07001package org.onlab.onos.cli.net;
2
3import org.onlab.packet.Ethernet;
4
5/**
6 * Allowed values for Ethernet types. Used by the CLI completer for
7 * connectivity based intent L2 parameters.
8 */
9public enum EthType {
10 /** ARP. */
11 ARP(Ethernet.TYPE_ARP),
12 /** RARP. */
13 RARP(Ethernet.TYPE_RARP),
14 /** IPV4. */
15 IPV4(Ethernet.TYPE_IPV4),
16 /** LLDP. */
17 LLDP(Ethernet.TYPE_LLDP),
18 /** BSN. */
19 BSN(Ethernet.TYPE_BSN);
20
21 private short value;
22
23 /**
24 * Constructs an EthType with the given value.
25 *
26 * @param value value to use when this EthType is seen.
27 */
28 private EthType(short value) {
29 this.value = value;
30 }
31
32 /**
33 * Gets the value to use for this EthType.
34 *
35 * @return short value to use for this EthType
36 */
37 public short value() {
38 return this.value;
39 }
40}