Skip to content

Commit 1578e2a

Browse files
authored
Merge branch 'master' into export-vlan-id
2 parents cdbe783 + 078207e commit 1578e2a

File tree

26 files changed

+1432
-1179
lines changed

26 files changed

+1432
-1179
lines changed

.clang-format

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: WebKit
4+
5+
AlwaysBreakBeforeMultilineStrings: true
6+
AlignAfterOpenBracket: AlwaysBreak
7+
AllowAllArgumentsOnNextLine: false
8+
AllowAllParametersOfDeclarationOnNextLine: false
9+
AllowShortFunctionsOnASingleLine: Inline
10+
AlwaysBreakTemplateDeclarations: Yes
11+
BinPackArguments: false
12+
BinPackParameters: false
13+
BreakInheritanceList: BeforeComma
14+
ColumnLimit: 100
15+
Cpp11BracedListStyle: true
16+
FixNamespaceComments: true
17+
IndentGotoLabels: false
18+
KeepEmptyLinesAtTheStartOfBlocks: false
19+
NamespaceIndentation: None
20+
ShortNamespaceLines: 0
21+
SpaceAfterCStyleCast: true
22+
SpaceAfterTemplateKeyword: false
23+
SpaceInEmptyBlock: false
24+
SpacesInContainerLiterals: false
25+
PointerAlignment: Left
26+
UseTab: false
27+
IndentWidth: 4
28+
...

.github/workflows/c-cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
with:
1717
submodules: recursive
1818
- name: Install dependencies

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
2929

3030
- name: Install dependencies
3131
run: |

.github/workflows/coverity.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
- name: Install dependencies
1717
run: |
1818
sudo apt-get update

ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2023-07-21 ipfixprobe-4.9.2
2+
* NetTiSA: Fix time comparison, handle Nan values
3+
4+
2023-07-18 ipfixprobe-4.9.1
5+
* NetTiSA: Add new NetTisa process plugin
6+
* OVPN: Imporovments (Added rtp header validation function, Improve detection)
7+
* HTTP: Add parsing HTTP response headers server and set-cookie names
8+
* ICMP: Add new ICMP process plugin
9+
* Code format: Changing uncrustify to clang format
10+
111
2023-06-01 ipfixprobe-4.9.0
212
* flow cache: add VLAN ID to the flow key
313
* SSADetector: detect SYN-SYNACK-ACK sequence to detect VPN within exiting connection

Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ ipfixprobe_process_src=\
130130
process/icmp.hpp \
131131
process/icmp.cpp \
132132
process/vlan.hpp \
133-
process/vlan.cpp
133+
process/vlan.cpp \
134+
process/nettisa.hpp \
135+
process/nettisa.cpp
134136

135137
if WITH_QUIC
136138
ipfixprobe_process_src+=\
@@ -184,7 +186,8 @@ ipfixprobe_headers_src=\
184186
include/ipfixprobe/packet.hpp \
185187
include/ipfixprobe/ring.h \
186188
include/ipfixprobe/byte-utils.hpp \
187-
include/ipfixprobe/ipfix-elements.hpp
189+
include/ipfixprobe/ipfix-elements.hpp \
190+
include/ipfixprobe/rtp.hpp
188191

189192
ipfixprobe_src=\
190193
$(ipfixprobe_input_src) \

NEWS

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
2023-07-20 (Josef Koumar): NetTiSA: Handle NaN values
2+
2023-07-18 (Pavel Siska): Nettisa - fix invalid time conversion
3+
2023-07-18 (Pavel Siska): utils - add function that convert struct timeval to microseconds
4+
2023-07-18 (Pavel Siska): utils - fix static_assert function to c++11 standard
5+
6+
2023-07-17 (Pavel Siska): NetTiSA: Add NetTiSA into README.md
7+
2023-07-17 (Pavel Siska): NetTiSA: Add NetTiSA to Makefile
8+
2023-07-17 (Pavel Siska): NetTiSA: Add NetTiSA plugin
9+
2023-07-17 (Pavel Siska): NetTiSA: Add NetTiSA IPFIX elements
10+
2023-07-17 (Pavel Siska): utils - format code with clang-format
11+
2023-07-17 (Pavel Siska): Byte-utils - introduce htonf() function to convert float to network order
12+
2023-07-14 (Karel Hynek): OVPN: Code reformat
13+
2023-07-14 (Karel Hynek): OVPN: checking datapackets for RTP validity to reduce false positives
14+
2023-07-14 (Karel Hynek): OVPN: Added rtp header validation function
15+
2023-07-14 (Karel Hynek): OVPN plugin: Improve detection for flows with large small number packets
16+
2023-07-07 (Jakub Magda): Add new HTTP fields to README.md
17+
2023-07-07 (Karel Hynek): HTTP: Updated functional tests
18+
2023-07-07 (Karel Hynek): HTTP: Added missing pointer check
19+
2023-07-07 (Karel Hynek): HTTP: Code reformat
20+
2023-07-07 (Karel Hynek): HTTP: FIXED invalid pointer check
21+
2023-06-28 (Karel Hynek): Changing uncrustify to clang format
22+
2023-06-17 (Tomas Cejka): actions: update to actions/checkout@v3
23+
2023-06-17 (Tomas Cejka): coverity: update to actions/checkout@v3
24+
2023-06-15 (Jakub Magda): Add parsing HTTP response headers server and set-cookie names
25+
2023-06-06 (Jakub Antoní Stigler): Update functional test references
26+
2023-06-01 (jaroslavpesek): dpdk - updated README.md for multiport read
27+
2023-05-23 (Jakub Antoní Stigler): improve readablility
28+
2023-04-25 (Jakub Antoní Stigler): Add icmp to README
29+
2023-04-25 (Jakub Antoní Stigler): remove icmp from parser
30+
2023-04-25 (Jakub Antoní Stigler): Implement fill functions in icmp
31+
2023-04-25 (Jakub Antoní Stigler): Add binaries to gitignore
32+
2023-04-25 (Jakub Antoní Stigler): Implement ICMP plugin
33+
2023-04-25 (Jakub Antoní Stigler): generate empty icmp plugin
34+
135
2023-05-30 (jaroslavpesek): Merge pull request #157 from CESNET/dpdk-port
236
2023-05-29 (Pavel Siska): Ipfixprobed - support dpdk option `lcores`
337
2023-05-29 (Pavel Siska): Ipfixprobed - remove dpdk option `cpu_mask`

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,39 @@ Fields without `_REV` suffix are fields from source flow. Fields with `_REV` are
239239
| TCP_MSS_REV | uint32 | TCP maximum segment size |
240240
| TCP_SYN_SIZE | uint16 | TCP SYN packet size |
241241

242+
### NetTiSA
243+
List of unirec fields exported together with NetTiSA flow fields on interface by nettisa plugin.
244+
245+
| Output field | Type | Description |
246+
|:------------:|:------:|:---------------------------:|
247+
| NTS_MEAN | float | The mean of the payload lengths of packets |
248+
| NTS_MIN | uint16 | Minimal value from all packet payload lengths |
249+
| NTS_MAX | uint16 | Maximum value from all packet payload lengths |
250+
| NTS_STDEV | float | Represents a switching ratio between different values of the sequence of observation. |
251+
| NTS_KURTOSIS | float | The standard deviation is measure of the variation of data from the mean. |
252+
| NTS_ROOT_MEAN_SQUARE | float | The measure of the magnitude of payload lengths of packets. |
253+
| NTS_AVERAGE_DISPERSION | float | The average absolute difference between each payload length of packet and the mean value. |
254+
| NTS_MEAN_SCALED_TIME | float | The kurtosis is the measure describing the extent to which the tails of a distribution differ from the tails of a normal distribution. |
255+
| NTS_MEAN_DIFFTIMES | float | The scaled times is defined as sequence $\{st\} = \{ t_1 - t_1, t_2 - t_1, \dots, t_n - t_1 \}$. We compute the mean of the value with same method as for feature \textit{Mean}. |
256+
| NTS_MIN_DIFFTIMES | float | The time differences is defined as sequence $ \{dt\} = \{ t_j - t_i \| j = i + 1, i \in \{1, 2, \dots, n - 1\}\}$. We compute the mean of the value with same method as for feature \textit{Mean}. |
257+
| NTS_MAX_DIFFTIMES | float | Minimal value from all time differences, i.e., min space between packets. |
258+
| NTS_TIME_DISTRIBUTION | float | Maximum value from all time differences, i.e., max space between packets. |
259+
| NTS_SWITCHING_RATIO | float | Describes the distribution of time differences between individual packets. |
260+
242261
### HTTP
243262
List of unirec fields exported together with basic flow fields on interface by HTTP plugin.
244263

245-
| Output field | Type | Description |
246-
|:----------------------------:|:------:|:---------------------------:|
247-
| HTTP_REQUEST_METHOD | string | HTTP request method |
248-
| HTTP_REQUEST_HOST | string | HTTP request host |
249-
| HTTP_REQUEST_URL | string | HTTP request url |
250-
| HTTP_REQUEST_AGENT | string | HTTP request user agent |
251-
| HTTP_REQUEST_REFERER | string | HTTP request referer |
252-
| HTTP_RESPONSE_STATUS_CODE | uint16 | HTTP response code |
253-
| HTTP_RESPONSE_CONTENT_TYPE | string | HTTP response content type |
264+
| Output field | Type | Description |
265+
|:------------------------------:|:------:|:-----------------------------------------------------------:|
266+
| HTTP_REQUEST_METHOD | string | HTTP request method |
267+
| HTTP_REQUEST_HOST | string | HTTP request host |
268+
| HTTP_REQUEST_URL | string | HTTP request url |
269+
| HTTP_REQUEST_AGENT | string | HTTP request user agent |
270+
| HTTP_REQUEST_REFERER | string | HTTP request referer |
271+
| HTTP_RESPONSE_STATUS_CODE | uint16 | HTTP response code |
272+
| HTTP_RESPONSE_CONTENT_TYPE | string | HTTP response content type |
273+
| HTTP_RESPONSE_SERVER | string | HTTP response server |
274+
| HTTP_RESPONSE_SET_COOKIE_NAMES | string | HTTP response all set-cookie names separated by a delimiter |
254275

255276
### RTSP
256277
List of unirec fields exported together with basic flow fields on interface by RTSP plugin.

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ([2.69])
5-
AC_INIT([ipfixprobe], [4.9.0], [[email protected]])
5+
AC_INIT([ipfixprobe], [4.9.2], [[email protected]])
66

77
AC_CONFIG_SRCDIR([main.cpp])
88
AC_CONFIG_HEADERS([config.h])

include/ipfixprobe/byte-utils.hpp

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
#ifndef IPXP_BYTE_UTILS_HPP
3232
#define IPXP_BYTE_UTILS_HPP
3333

34-
#include <stdint.h>
34+
#include <arpa/inet.h>
3535
#include <endian.h>
36+
#include <stdint.h>
3637

3738
namespace ipxp {
3839

@@ -44,21 +45,29 @@ namespace ipxp {
4445
#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
4546
static inline uint64_t swap_uint64(uint64_t value)
4647
{
47-
return value;
48+
return value;
4849
}
4950
#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
5051
static inline uint64_t swap_uint64(uint64_t value)
5152
{
52-
value = ((value << 8) & 0xFF00FF00FF00FF00ULL ) | ((value >> 8) & 0x00FF00FF00FF00FFULL );
53-
value = ((value << 16) & 0xFFFF0000FFFF0000ULL ) | ((value >> 16) & 0x0000FFFF0000FFFFULL );
54-
return (value << 32) | (value >> 32);
53+
value = ((value << 8) & 0xFF00FF00FF00FF00ULL) | ((value >> 8) & 0x00FF00FF00FF00FFULL);
54+
value = ((value << 16) & 0xFFFF0000FFFF0000ULL) | ((value >> 16) & 0x0000FFFF0000FFFFULL);
55+
return (value << 32) | (value >> 32);
5556
}
56-
# else
57-
# error "Please fix <endian.h>"
58-
# endif
57+
#else
58+
#error "Please fix <endian.h>"
59+
#endif
5960

60-
void phton64(uint8_t *p, uint64_t v);
61-
uint64_t pntoh64(const void *p);
61+
void phton64(uint8_t* p, uint64_t v);
62+
uint64_t pntoh64(const void* p);
63+
64+
/**
65+
* \brief Swaps byte order of float value.
66+
* @param value Value to swap
67+
* @return Swapped value
68+
*/
69+
uint32_t htonf(float value);
70+
71+
} // namespace ipxp
6272

63-
}
6473
#endif /* IPXP_BYTE_UTILS_HPP */

0 commit comments

Comments
 (0)