Commit graph

25 commits

Author SHA1 Message Date
Dominik Pataky 71fb316a24 Hotfix release v0.12.2 2023-08-20 14:44:44 +02:00
Dominik Pataky 942df30bf6 Release v0.12.1 2023-08-19 19:16:02 +02:00
Dominik Pataky a410ef7de9 Bump to v0.11.3
Includes fixes for enterprise bit flag and templatefield type check.
2023-01-30 13:30:53 +01:00
Dominik Pataky ff24da9743 Merge branch 'grafolean-fix/performance-improvements'
Bump version to v0.11.2

Closes #38
Closes #39
2022-07-02 11:53:12 +02:00
Dominik Pataky 8b5675913d Small changes to PR #37 preventing infinite loops; bump version
Closes #37
2022-04-25 20:26:04 +02:00
Dominik Pataky 87c1bfb892 Release v0.11.0; adds Netflow v9 option headers 2021-11-14 17:53:27 +01:00
Dominik Pataky 3f62e4a163 Merge branch 'j-licht-master' 2021-04-04 10:54:02 +02:00
Dominik Pataky 06d7c0c5d0 Improve parse_packet documentation and error handling (exception)
The parse_packet function is one of the main functions for usage of this
library in other scripts. It works, but was under-documented until now.
Especially the 'templates' parameter might lead to confusions for new
users who have not yet worked with templates. This commit should make
things clearer.

Refs #28
2020-08-01 12:33:40 +02:00
Dominik Pataky 5cdb514ffc Ensure compatibility with Python 3.5.3
This commit replaces multiple occurences of new features which were not
yet implemented with Python 3.5.3, which is the reference backwards
compatibility version for this package. The version is based on the
current Python version in Debian Stretch (oldstable). According to
pkgs.org, all other distros use 3.6+, so 3.5.3 is the lower boundary.

Changes:
  * Add maxsize argument to functools.lru_cache decorator
  * Replace f"" with .format()
  * Replace variable type hints "var: type = val" with "# type:" comments
  * Replace pstats.SortKey enum with strings in performance tests

Additionally, various styling fixes were applied.
The version compatibility was tested with tox, pyenv and Python 3.5.3,
but there is no tox.ini yet which automates this test.

Bump patch version number to 0.10.3
Update author's email address.

Resolves #27
2020-04-24 16:52:25 +02:00
Dominik Pataky 5d1c5b8710 IPFIX: add template withdrawal handling; bump version to v0.10.2
Templates may be withdrawn as per RFC7011. Receiving a template with an
existing template_id and a field_count of 0 now triggers deletion of
this template.
2020-04-06 17:27:26 +02:00
Dominik Pataky f7a44852c3 Tests: add memory performance test for v1 and v5; bump version to 0.10.1 2020-04-04 10:58:06 +02:00
Dominik Pataky 27525887bd Update README to reflect IPFIX implementation; bump version to v0.10.0
Resolves #20
2020-04-01 14:40:21 +02:00
Dominik Pataky d4d6d59713 Provide parse_packet as API; fix parse_packet input handling; README
To get closer to a stable package, netflow now offers the parse_packet
function in its top-level __init__ file. This function was also enhanced
to handle multiple input formats (str, bytes, hex bytes).

Updated README accordingly.
2020-03-30 13:04:25 +02:00
Dominik Pataky 8b70fb1058 Fix to_dict() in headers; formatting
The collector uses the .to_dict() function to persist the header in its
gzipped output file. Now all headers implement this function.
2020-03-29 23:17:05 +02:00
Dominik Pataky 4a90e0ce34 Update README, bump minor version to v0.9.0 2020-03-29 22:34:30 +02:00
Dominik Pataky 9d2bc21ae2 Extend and reformat tests, add tests for v1 and v5, bump version
The tests are now also parsing export packets for version 1 and 5.
Version 9 received an additional test, inspecting the data inside the
export.

All new packet hex dumps were created by using a Docker container with
alpine Linux, running a softflowd daemon inside and then pinging the
Docker host IP. After review with "softflowctl dump-flows" issueing
"softflowctl expire-all" sends the packets away to the collector (should
be an IP address outside of the Docker bridge). The export network
packets are then collected with Wireshark running in the host namespace,
capturing on the Docker bridge.

Bump version to v0.8.3

Resolves #13
Resolves #14
Refs #18
2020-03-29 19:57:13 +02:00
Dominik Pataky 5fd4e9bd24 Update README/setup.py; add .json property to v9 header for export
The README and setup.py were adapted to the current state, preparing for
PyPI upload and package info.

In v9, the header received an additional .json property, which exports
the header as a dict to allow JSON serialization in the export file.
This export is used in main.py
2020-03-29 18:06:52 +02:00
Dominik Pataky 0d8f1a2ecb Add ParsedPacket named tuple for queue; extend tests
Before, the output queue of the collector received unnamed tuples with
three fields. This broke the tests and was less understandable. The new
version uses a named tuple for clarity.

The tests were adapted to the new type in the queue and are fixed.

For backwards compatibility a check of the Python version is added and
the subprocess stdout/stderr arguments are passed depending on this
version. See #18.
2020-03-19 18:16:03 +01:00
Dominik Pataky bfec3953e6 Bump version, fix small errors, decrease packet num in tests 2019-10-31 17:35:15 +01:00
Carey Metcalfe 345a5b08ff Fix setup.py file 2019-10-16 23:46:32 -04:00
Dominik Pataky 85e6af4bd2 Add buffering of exports with unknown template
Until now, exports which were received, but their template was not known,
resulted in KeyError exceptions due to a missing key in the template dict.
With this release, these exports are buffered until a template export
updates this dict, and all buffered exports are again examined.

Release v0.7.0

Fixes #4
Fixes #5
2019-03-31 20:51:34 +02:00
Dominik Pataky 9395aafa71 Fix missing IP_PROTOCOL_VERSION field in analyzer
Checks for the key first and handles non-existence.
Update to Copyright notices.

Fixes #3
2018-02-20 12:09:54 +01:00
Dominik Pataky 6c267c8c77 Bump to 0.6; expand analyzer 2017-10-29 11:53:32 +01:00
Dominik Pataky 92d8e724bf Fix merge for Python3 2017-10-28 17:34:55 +02:00
Adam Pridgen e11105e950 added setup main file 2017-09-16 14:11:44 -05:00