NetworkDestination

A NetworkDestination represents a cluster of flows that communicate with the same destination.

class network_destination.NetworkDestination(identifier, samples=[])[source]

NetworkDestination object for flow samples

identifier

Unique identifier for NetworkDestination

Type:object
samples

List of flows stored in NetworkDestination

Type:list
destinations

Set of destination (IP, port) tuples related to NetworkDestination

Type:set
certificates

Set of TLS certificates related to NetworkDestination

Type:set
labels

Labels related to NetworkDestination

Type:Counter
NetworkDestination.__init__(identifier, samples=[])[source]

NetworkDestination object for flow samples

Parameters:
  • identifier (object) – Identifier for NetworkDestination Important: identifier must be unique!
  • samples (iterable of Flow) – Samples to store in this NetworkDestination.

Adding Flows

We add new Flows using the network_destination.NetworkDestination.add() method.

NetworkDestination.add(X, y=None)[source]

Add flow X to NetworkDestination object.

Parameters:
  • X (Flow) – Datapoint to store in this NetworkDestination.
  • y (object) – Label for datapoint

Merging destinations

When merging two network destinations, we use the network_destination.NetworkDestination.merge() method.

NetworkDestination.merge(other)[source]

Merge NetworkDestination with other NetworkDestination object.

Parameters:other (NetworkDestination) – Other NetworkDestination object to merge with.