Package org.onlab.packet
Class EthType
- java.lang.Object
-
- org.onlab.packet.EthType
-
public class EthType extends Object
Representation 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(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.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
-
-