Module org.jnetpcap
Package org.jnetpcap

Class SockAddr.PacketSockAddr

java.lang.Object
org.jnetpcap.SockAddr
org.jnetpcap.SockAddr.PacketSockAddr
Enclosing class:
SockAddr

public static final class SockAddr.PacketSockAddr extends SockAddr
The structure of sockaddr_ll, used with AF_PACKET sockets for raw packet access on Linux.
  • Method Details

    • address

      public byte[] address()
      Hardware address.
      Returns:
      address field value
    • hardwareLength

      public int hardwareLength()
      Hardware length.
      Returns:
      the int
    • hardwareType

      public int hardwareType()
      Hardware type.
      Returns:
      haType field value
    • interfaceIndex

      public int interfaceIndex()
      Interface index.
      Returns:
      ifIndex field value
    • packetType

      public int packetType()
      Packet type.
      Returns:
      pktType field value
    • protocol

      public int protocol()
      Protocol (e.g., ETH_P_ALL, ETH_P_IP) .
      Returns:
      protocol field value
    • toString

      public String toString()
      String representation of the structure field values.
      Overrides:
      toString in class SockAddr
      Returns:
      the string
      See Also: