Package oshi.software.os.unix.freebsd
Class FreeBsdInternetProtocolStats
- java.lang.Object
-
- oshi.software.common.AbstractInternetProtocolStats
-
- oshi.software.os.unix.freebsd.FreeBsdInternetProtocolStats
-
- All Implemented Interfaces:
InternetProtocolStats
@ThreadSafe public class FreeBsdInternetProtocolStats extends AbstractInternetProtocolStats
Internet Protocol Stats implementation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface oshi.software.os.InternetProtocolStats
InternetProtocolStats.IPConnection, InternetProtocolStats.TcpState, InternetProtocolStats.TcpStats, InternetProtocolStats.UdpStats
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Supplier<Pair<java.lang.Long,java.lang.Long>>
establishedv4v6
private java.util.function.Supplier<CLibrary.BsdTcpstat>
tcpstat
private java.util.function.Supplier<CLibrary.BsdUdpstat>
udpstat
-
Constructor Summary
Constructors Constructor Description FreeBsdInternetProtocolStats()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InternetProtocolStats.TcpStats
getTCPv4Stats()
Get the TCP stats for IPv4 connections.InternetProtocolStats.UdpStats
getUDPv4Stats()
Get the UDP stats for IPv4 datagrams.InternetProtocolStats.UdpStats
getUDPv6Stats()
Get the UDP stats for IPv6 datagrams, if available.private static CLibrary.BsdTcpstat
queryTcpstat()
private static CLibrary.BsdUdpstat
queryUdpstat()
-
Methods inherited from class oshi.software.common.AbstractInternetProtocolStats
getConnections, getTCPv6Stats
-
-
-
-
Field Detail
-
establishedv4v6
private java.util.function.Supplier<Pair<java.lang.Long,java.lang.Long>> establishedv4v6
-
tcpstat
private java.util.function.Supplier<CLibrary.BsdTcpstat> tcpstat
-
udpstat
private java.util.function.Supplier<CLibrary.BsdUdpstat> udpstat
-
-
Method Detail
-
getTCPv4Stats
public InternetProtocolStats.TcpStats getTCPv4Stats()
Description copied from interface:InternetProtocolStats
Get the TCP stats for IPv4 connections.On macOS connection information requires elevated permissions. Without elevatd permissions, segment data is estimated.
- Returns:
- a
InternetProtocolStats.TcpStats
object encapsulating the stats.
-
getUDPv4Stats
public InternetProtocolStats.UdpStats getUDPv4Stats()
Description copied from interface:InternetProtocolStats
Get the UDP stats for IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
getUDPv6Stats
public InternetProtocolStats.UdpStats getUDPv6Stats()
Description copied from interface:InternetProtocolStats
Get the UDP stats for IPv6 datagrams, if available. If not available separately, these may be 0 and included in IPv4 datagrams.- Specified by:
getUDPv6Stats
in interfaceInternetProtocolStats
- Overrides:
getUDPv6Stats
in classAbstractInternetProtocolStats
- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
queryTcpstat
private static CLibrary.BsdTcpstat queryTcpstat()
-
queryUdpstat
private static CLibrary.BsdUdpstat queryUdpstat()
-
-