- java.lang.Object
-
- org.pcap4j.util.LinkLayerAddress
-
- org.pcap4j.util.MacAddress
-
- All Implemented Interfaces:
java.io.Serializable
public final class MacAddress extends LinkLayerAddress
- Since:
- pcap4j 0.9.1
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static MacAddressETHER_BROADCAST_ADDRESSprivate static longserialVersionUIDstatic intSIZE_IN_BYTES-
Fields inherited from class org.pcap4j.util.LinkLayerAddress
HEX_SEPARATOR_PATTERN
-
-
Constructor Summary
Constructors Modifier Constructor Description privateMacAddress(byte[] address)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MacAddressgetByAddress(byte[] address)static MacAddressgetByName(java.lang.String name)static MacAddressgetByName(java.lang.String name, java.lang.String separator)OuigetOui()booleanisGloballyUnique()booleanisUnicast()-
Methods inherited from class org.pcap4j.util.LinkLayerAddress
equals, getAddress, hashCode, length, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ETHER_BROADCAST_ADDRESS
public static final MacAddress ETHER_BROADCAST_ADDRESS
-
SIZE_IN_BYTES
public static final int SIZE_IN_BYTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getByAddress
public static MacAddress getByAddress(byte[] address)
- Parameters:
address- address- Returns:
- a new MacAddress object.
-
getByName
public static MacAddress getByName(java.lang.String name)
- Parameters:
name- name- Returns:
- a new MacAddress object.
-
getByName
public static MacAddress getByName(java.lang.String name, java.lang.String separator)
- Parameters:
name- nameseparator- separator- Returns:
- a new MacAddress object.
-
getOui
public Oui getOui()
- Returns:
- OUI
-
isUnicast
public boolean isUnicast()
- Returns:
- true if the MAC address represented by this object is a unicast address; otherwise false.
-
isGloballyUnique
public boolean isGloballyUnique()
- Returns:
- true if the MAC address represented by this object is a globally unique address; otherwise false.
-
-