interface to control and query file writer, which stores packets on disk, for statistics, filters, etc
refer:*)filter_comparison_fields refers to the following fields:
optional "mac_src": {
"value": string, // format: mac address, example: "00:B0:D0:63:C2:26"
"mask": string, // format: mac address, example: "FF:FF:FF:FF:FF:FE"
},
optional "mac_dst": {
"value": string, // format: mac address, example: "00:B0:D0:63:C2:26"
"mask": string // format: mac address, example: "FF:FF:FF:FF:FF:FE"
},
optional "vlan_id_first": { // inclusive range. if `begin > end` then it's ignored. for exact match: `begin == end`
"begin": positive_integer,
"end": positive_integer
},
optional "vlan_id_second": { // inclusive range. if `begin > end` then it's ignored. for exact match: `begin == end`
"begin": positive_integer,
"end": positive_integer
},
optional "ip_src": {
"value": string, // format: ipv4 or ipv6. examples: "127.0.0.1", "::1", "2001:0000:130F:0000:0000:09C0:876A:130B".
"mask": string // format: ipv4 or ipv6. note: its type must match the `value`.
},
optional "ip_dst": {
"value": string, // format: ipv4 or ipv6. examples: "127.0.0.1", "::1", "2001:0000:130F:0000:0000:09C0:876A:130B".
"mask": string // format: ipv4 or ipv6. note: its type must match the `value`.
},
optional "port_src": { // inclusive range. if `begin > end` then it's ignored. for exact match: `begin == end`
"begin": positive_integer,
"end": 24 positive_integer
},
optional "port_dst": { // inclusive range. if `begin > end` then it's ignored. for exact match: `begin == end`
"begin": positive_integer,
"end": positive_integer
},
optional "ip_protocol": positive_integer, // accepted range: 0..255 inclusive
optional "ether_type": positive_integer, // accepted range: 0..65535 inclusiveDescription: Get and Modify information related with writers of flow-tracker-ng.
Path: /api/ftng/writer/statistics
Method: GET
Response on success (200 OK):
{
"written_bps": positive_integer, // bits per second
"written_pps": positive_integer, // packets per second
"written_packets": positive_integer,
"written_bytes": positive_integer,
"filtered_out_packets": positive_integer, // packets that have been filtered to not to be written.
"filtered_out_bytes": positive_integer, // amount of packet bytes that have been filtered to not to be written.
"early_released_packets": positive_integer, // packets that have been released after analysis and do not reach the writer and other components down the pipeline.
"early_released_bytes": positive_integer, // amount of bytes of the early released packets.
}/api/ftng/writer/statisticsDELETEPath: /api/ftng/writer/filters/stateless/config
Method: GET
Response on success (200 OK):
{
"default_policy": string, // possible values: "allow", "drop", "slice".
"current_filter_count": positive_integer,
"maximum_filter_count" : positive_integer,
optional "slice": { // present when policy is "slice"
"preserve_bytes": positive_integer
}
}Path: /api/ftng/writer/filters/stateless/config
Method: PUT
Request schema:
{
"default_policy": string, // possible values: "allow", "drop", "slice".
optional "slice": { // required when policy is "slice", otherwise it is ignored
"preserve_bytes": positive_integer
}
}Response on success (200 OK):
GET /api/writer/filters/stateless/configResponse on invalid data (400 BAD REQUEST):
{
"message_key": string,
"message": string,
}Path: /api/ftng/writer/filters/stateless
Method: GET
Response on success (200 OK):
// the size of the array is arbitrary, it's possible to be empty.
[
{
"policy": string, // possible values: "allow", "drop", "slice".
optional "slice": { // present when policy is "slice"
"preserve_bytes": positive_integer
}
refer:filter_comparison_fields
},
...
]NOTE: either the whole array of filters is applied and replaced or update fails to be applied.
NOTE: the order or filters indicate priority. earlier filters in the list are applied first.
Path: /api/ftng/writer/filters/stateless
Method: PUT
Request schema:
// the list size can be arbitrary (even empty).
// there shouldn't be any duplicate `filter_id`s.
[
{
"policy": string, // possible values: "allow", "drop", "slice".
optional "slice": { // required when the policy is "slice", otherwise it is ignored.
"preserve_bytes": positive_integer
}
refer:filter_comparison_fields // all of them are optional.
},
...
]Response on success (200 OK):
GET /api/writer/filters/statelessResponse on invalid data (400 BAD REQUEST):
{
"message_key": string,
"message": string
}