Module org.jnetpcap
Package org.jnetpcap

Class PcapIf.PcapAddr<T extends SockAddr>

java.lang.Object
org.jnetpcap.PcapIf.PcapAddr<T>
Type Parameters:
T - the generic socket address subclass type
Enclosing class:
PcapIf

public static class PcapIf.PcapAddr<T extends SockAddr> extends Object
The struct pcap_addr structure containing network interfaces/devices addresses.
  • Method Details

    • broadcast

      public Optional<T> broadcast()
      The broadcast address corresponding to socketAddress(), if the interface supports broadcasts.
      Returns:
      optional broadcast address interface
    • destination

      public Optional<T> destination()
      The destination address corresponding to socketAddress() if the interface is a point-to-point interface.
      Returns:
      the optional destination address of a point-to-point interface
    • netmask

      public Optional<T> netmask()
      The netmask corresponding to socketAddress() if the interface supports netmasks.
      Returns:
      interface's optional netmask address
    • socketAddress

      public T socketAddress()
      A family specific socket address for this interface.
      Returns:
      network family specific interface address
    • toString

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