Ray Milkey | 9fdf1ea | 2014-10-21 09:48:02 -0700 | [diff] [blame] | 1 | package org.onlab.onos.cli.net; |
| 2 | |
| 3 | import 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 | */ |
| 9 | public 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 | } |