# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
BeautifyKey returns a human readable byte key (used for debugging purposes) it should be in sync with ByteKey Note: This is only used in /debug/* endpoints.
ConnectionSummary returns a string summarizing a connection.
DNSKey generates a key suitable for looking up DNS stats based on a ConnectionStats object.
GetNATLocalAddress returns the translated (local ip, local port) pair.
GetNATRemoteAddress returns the translated (remote ip, remote port) pair.
IsEphemeralPort returns true if a port belongs to the ephemeral range This is mostly a placeholder for now as we have work planned for a platform-agnostic solution that will, among other things, source these values from procfs for Linux hosts.
IsExcludedConnection returns true if a given connection should be excluded by the tracer based on user defined filters.
IsPortInEphemeralRange returns whether the port is ephemeral based on the OS-specific configuration.
NewConnectionBuffer creates a ConnectionBuffer with initial size `size`.
NewNetlinkRouter create a Router that queries routes via netlink.
NewRouteCache creates a new RouteCache.
NewState creates a new network state.
ParseConnectionFilters takes the user defined excludelist and returns a slice of ConnectionFilters.
ReadInitialState reads the /proc filesystem and determines which ports are being listened on.
Reclaim memory from the `Connections` underlying buffer.
# Constants
AFINET represents v4 connections.
AFINET6 represents v6 connections.
ConnectionByteKeyMaxLen represents the maximum size in bytes of a connection byte key.
DEBUGCLIENT is the ClientID for debugging.
DNSResponseCodeNoError is the value that indicates that the DNS reply contains no errors.
EphemeralFalse means the port has been detected to not be in the configured ephemeral range.
EphemeralTrue means the port has been detected to be in the configured ephemeral range.
EphemeralUnknown indicates inability to determine whether the port is in the ephemeral range or not.
INCOMING represents connections inbound to the host.
LOCAL represents connections that don't leave the host.
NONE represents connections that have no direction (udp, for example).
OUTGOING represents outbound connections from the host.
TCP connection type.
UDP connection type.
# Structs
BufferedData encapsulates data whose underlying memory can be recycled.
ConnectionBuffer encapsulates a resizing buffer for ConnectionStat objects.
ConnectionFilter holds a user-defined excluded IP/CIDR, and ports.
Connections wraps a collection of ConnectionStats.
ConnectionStats stores statistics for a single connection.
ConnectionsTelemetry stores telemetry from the system probe related to connections collection.
ConnTypeFilter holds user-defined protocols.
Delta represents a delta of network data compared to the last call to State.
IPTranslation can be associated with a connection to show the connection is NAT'd.
PortMapping represents a port binding.
Route stores info for a route table entry.
RuntimeCompilationTelemetry stores telemetry related to the runtime compilation of various assets.
Subnet stores info about a subnet.
Via has info about the routing decision for a flow.
# Interfaces
RouteCache is the interface to a cache that stores routes for a given (source, destination, net ns) tuple.
Router is an interface to get a route for a (source, destination, net ns) tuple.
State takes care of handling the logic for: - closed connections - sent and received bytes per connection.
# Type aliases
ConnectionDirection indicates if the connection is incoming to the host or outbound.
ConnectionFamily will be either v4 or v6.
ConnectionType will be either TCP or UDP.
EphemeralPortType will be either EphemeralUnknown, EphemeralTrue, EphemeralFalse.