public class EthType
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
EthType.EtherType
A list of known ethertypes.
|
Constructor and Description |
---|
EthType(int etherType)
Builds the EthType.
|
EthType(short etherType)
Builds the EthType.
|
Modifier and Type | Method and 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() |
public EthType(int etherType)
etherType
- an integer representing an ethtypepublic EthType(short etherType)
etherType
- a short representing the ethtypepublic short toShort()
public EthType.EtherType lookup(short etherType)
etherType
- the short value of the ethertypepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object