Package org.onlab.packet
Class EthType
- java.lang.Object
-
- org.onlab.packet.EthType
-
public class EthType extends java.lang.ObjectRepresentation of an Ethertype.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEthType.EtherTypeA list of known ethertypes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()EthType.EtherTypelookup(short etherType)Looks up the ethertype by it's numerical representation and returns it's textual format.shorttoShort()Returns the short value for this ethtype.java.lang.StringtoString()
-
-
-
Method Detail
-
toShort
public short toShort()
Returns the short value for this ethtype.- Returns:
- a short value
-
lookup
public EthType.EtherType lookup(short etherType)
Looks up the ethertype by it's numerical representation and returns it's textual format.- Parameters:
etherType- the short value of the ethertype- Returns:
- a textual representation
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-