mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Documentation for the python API
This commit is contained in:
parent
d43f2c98c2
commit
1b73a56dd5
4 changed files with 536 additions and 0 deletions
44
python/docs/python_API_Host.md
Normal file
44
python/docs/python_API_Host.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# Host Class
|
||||
|
||||
The `Host` class provides information about hosts.
|
||||
|
||||
## Constructor
|
||||
|
||||
### `__init__(self, ntopng_obj, ifid, ip, vlan=None)`
|
||||
|
||||
Constructs a new `Host` object.
|
||||
|
||||
- `ntopng_obj`: The ntopng handle (Ntopng instance).
|
||||
- `ifid`: The interface ID (integer).
|
||||
- `ip`: The host IP address (string).
|
||||
- `vlan` (optional): The host VLAN ID (integer, if applicable).
|
||||
|
||||
## Methods
|
||||
|
||||
### `get_host_data(self)`
|
||||
|
||||
Returns all available information about a single host.
|
||||
|
||||
- Returns: Information about the host (object).
|
||||
|
||||
### `get_l7_stats(self)`
|
||||
|
||||
Returns statistics about Layer 7 protocols for the host.
|
||||
|
||||
- Returns: Layer 7 protocol statistics (object).
|
||||
|
||||
### `get_dscp_stats(self, direction_rcvd)`
|
||||
|
||||
Returns statistics about DSCP (Differentiated Services Code Point) per traffic direction for a host.
|
||||
|
||||
- `direction_rcvd`: The traffic direction (True for received traffic, False for sent).
|
||||
- Returns: DSCP statistics (object).
|
||||
|
||||
### `get_active_flows_paginated(self, currentPage, perPage)`
|
||||
|
||||
Retrieves the paginated list of active flows for the specified interface and host.
|
||||
|
||||
- `currentPage`: The current page (integer).
|
||||
- `perPage`: The number of results per page (integer).
|
||||
- Returns: All active flows (array).
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue