Package oshi.software.os
Interface InternetProtocolStats
- All Known Implementing Classes:
FreeBsdInternetProtocolStats
,LinuxInternetProtocolStats
,MacInternetProtocolStats
,SolarisInternetProtocolStats
,WindowsInternetProtocolStats
@ThreadSafe public interface InternetProtocolStats
Includes key statistics of TCP and UDP protocols
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InternetProtocolStats.TcpStats
static class
InternetProtocolStats.UdpStats
-
Method Summary
Modifier and Type Method Description InternetProtocolStats.TcpStats
getTCPv4Stats()
Get the TCP stats for IPv4 connections.InternetProtocolStats.TcpStats
getTCPv6Stats()
Get the TCP stats for IPv6 connections, if available.InternetProtocolStats.UdpStats
getUDPv4Stats()
Get the UDP stats for IPv4 datagrams.InternetProtocolStats.UdpStats
getUDPv6Stats()
Get the UDP stats for IPv6 datagrams, if available.
-
Method Details
-
getTCPv4Stats
InternetProtocolStats.TcpStats getTCPv4Stats()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.
-
getTCPv6Stats
InternetProtocolStats.TcpStats getTCPv6Stats()Get the TCP stats for IPv6 connections, if available. If not available separately, these may be 0 and included in IPv4 connections.- Returns:
- a
InternetProtocolStats.TcpStats
object encapsulating the stats.
-
getUDPv4Stats
InternetProtocolStats.UdpStats getUDPv4Stats()Get the UDP stats for IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-
getUDPv6Stats
InternetProtocolStats.UdpStats getUDPv6Stats()Get the UDP stats for IPv6 datagrams, if available. If not available separately, these may be 0 and included in IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStats
object encapsulating the stats.
-