Package org.onlab.packet
Class EthType
- java.lang.Object
-
- org.onlab.packet.EthType
-
public class EthType extends java.lang.Object
Representation of an Ethertype.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EthType.EtherType
A list of known ethertypes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
EthType.EtherType
lookup(short etherType)
Looks up the ethertype by it's numerical representation and returns it's textual format.short
toShort()
Returns the short value for this ethtype.java.lang.String
toString()
-
-
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-