Package oshi.software.os.linux
Class LinuxInternetProtocolStats
java.lang.Object
oshi.software.common.AbstractInternetProtocolStats
oshi.software.os.linux.LinuxInternetProtocolStats
- All Implemented Interfaces:
InternetProtocolStats
@ThreadSafe public class LinuxInternetProtocolStats 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 -
Constructor Summary
Constructors Constructor Description LinuxInternetProtocolStats() -
Method Summary
Modifier and Type Method Description java.util.List<InternetProtocolStats.IPConnection>getConnections()Gets a list of TCP and UDP connections.InternetProtocolStats.TcpStatsgetTCPv4Stats()Get the TCP stats for IPv4 connections.InternetProtocolStats.UdpStatsgetUDPv4Stats()Get the UDP stats for IPv4 datagrams.InternetProtocolStats.UdpStatsgetUDPv6Stats()Get the UDP stats for IPv6 datagrams, if available.Methods inherited from class oshi.software.common.AbstractInternetProtocolStats
getTCPv6StatsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
LinuxInternetProtocolStats
public LinuxInternetProtocolStats()
-
-
Method Details
-
getTCPv4Stats
Description copied from interface:InternetProtocolStatsGet the TCP stats for IPv4 connections.On macOS connection information requires elevated permissions. Without elevatd permissions, segment data is estimated.
- Returns:
- a
InternetProtocolStats.TcpStatsobject encapsulating the stats.
-
getUDPv4Stats
Description copied from interface:InternetProtocolStatsGet the UDP stats for IPv4 datagrams.- Returns:
- a
InternetProtocolStats.UdpStatsobject encapsulating the stats.
-
getUDPv6Stats
Description copied from interface:InternetProtocolStatsGet the UDP stats for IPv6 datagrams, if available. If not available separately, these may be 0 and included in IPv4 datagrams.- Specified by:
getUDPv6Statsin interfaceInternetProtocolStats- Overrides:
getUDPv6Statsin classAbstractInternetProtocolStats- Returns:
- a
InternetProtocolStats.UdpStatsobject encapsulating the stats.
-
getConnections
Description copied from interface:InternetProtocolStatsGets a list of TCP and UDP connections.- Specified by:
getConnectionsin interfaceInternetProtocolStats- Overrides:
getConnectionsin classAbstractInternetProtocolStats- Returns:
- A list of
InternetProtocolStats.IPConnectionobjects for TCP and UDP connections.
-