package documentation
Library for reading and managing network connections.
From __init__.py:
| Function | drop |
Flush all connections. |
| Function | drop |
Drop a connection by its id. |
| Function | list |
List all network connections. |
| Function | __parse |
Parse the connection information from a flow tag. |
Drop a connection by its id.
- Args:
- connection_id: id of the connection to drop.
- Raises:
- ValueError: if the connection with the given id is not found.
- RuntimeError: if the connection could not be dropped.
List all network connections.
- Args:
- labels: optional list of label strings to filter by. Only connections that have
- ALL the specified labels are returned. If None or empty, all connections are returned.
- extra_args: optional list of extra conntrack arguments, e.g. ["--orig-src", "10.0.0.1"].
- Returns:
- list of connections.