java.lang.Object
org.jnetpcap.SockAddr
org.jnetpcap.SockAddr.LinkSockAddr
- Enclosing class:
SockAddr
The structure of
sockaddr_dl
, used with AF_LINK sockets on macOS
to access link-layer information.-
Nested Class Summary
Nested classes/interfaces inherited from class org.jnetpcap.SockAddr
SockAddr.Inet6SockAddr, SockAddr.InetSockAddr, SockAddr.IpxSockAddr, SockAddr.IrdaSockAddr, SockAddr.LinkSockAddr, SockAddr.PacketSockAddr
-
Method Summary
Modifier and TypeMethodDescriptionOptional
<byte[]> address()
Length of the link-layer selector (usually 0).int
Length of the link-layer address in bytes.int
Link-layer address type (e.g., IFT_ETHER for Ethernet).byte[]
data()
Variable-length data containing, interface name (null-terminated), Link-layer address Link-layer and selector (if any).int
index()
Interface index of the network device.name()
interface name.int
Length of the interface name string.selector()
Link-layer selector.int
Selector length.toString()
String representation of the structure field values.Methods inherited from class org.jnetpcap.SockAddr
family, familyConstant, isFamily, totalLength
-
Method Details
-
data
public byte[] data()Variable-length data containing, interface name (null-terminated), Link-layer address Link-layer and selector (if any). -
index
public int index()Interface index of the network device.- Returns:
- index field value
-
addressType
public int addressType()Link-layer address type (e.g., IFT_ETHER for Ethernet).- Returns:
- type field value
-
nameLength
public int nameLength()Length of the interface name string.- Returns:
- nlen field value
-
addressLength
public int addressLength()Length of the link-layer address in bytes.- Returns:
- alen field value
-
selectorLength
public int selectorLength()Selector length.- Returns:
- type field value
-
address
Length of the link-layer selector (usually 0).- Returns:
- address field value
-
name
interface name.- Returns:
- name field value
-
selector
Link-layer selector.- Returns:
- selector field value
-
toString
String representation of the structure field values.
-