Skip to content

Commit 6944012

Browse files
authored
Improved description of output
Based on feedback from #81, it was not very clear what is the output of ipfixprobe when some output plugin is used. The aim of this patch is to make the readme file more general - if a user enables some processing plugin (by `-p`), there are extended fields included in the output flow records. It works for `unirec`, `ipfix`, or `text` plugins.
1 parent ab8293b commit 6944012

File tree

1 file changed

+51
-32
lines changed

1 file changed

+51
-32
lines changed

README.md

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,15 @@ us.
104104

105105
### Output
106106

107-
- For NEMEA, the output is in UniRec format using [https://nemea.liberouter.org/trap-ifcspec/](https://nemea.liberouter.org/trap-ifcspec/)
108-
- IPFIX [RFC 5101](https://tools.ietf.org/html/rfc5101)
107+
There are several currently available output plugins, such as:
108+
109+
- `ipfix` standard IPFIX [RFC 5101](https://tools.ietf.org/html/rfc5101)
110+
- `unirec` data source for the [NEMEA system](https://nemea.liberouter.org), the output is in the UniRec format sent via a configurable interface using [https://nemea.liberouter.org/trap-ifcspec/](https://nemea.liberouter.org/trap-ifcspec/)
111+
- `text` output in human readable text format on standard output file descriptor (stdout)
112+
113+
The output flow records are composed of information provided by the enabled plugins (using `-p` parameter, see [Flow Data Extension - Processing Plugins](./README.md#flow-data-extension---processing-plugins)).
114+
115+
See `ipfixprobe -h output` for more information and complete list of output plugins and their parameters.
109116

110117
## Parameters
111118
### Module specific parameters
@@ -154,11 +161,17 @@ Here are the examples of various plugins usage:
154161
`./ipfixprobe -i "dpdk;p=0;q=3;e=-c 0x1 -a <[domain:]bus:devid.func>" -i dpdk -i dpdk -p http "-p" bstats -p tls -o "ipfix;h=127.0.0.1"`
155162
```
156163

157-
## Extension
164+
## Flow Data Extension - Processing Plugins
165+
158166
`ipfixprobe` can be extended by new plugins for exporting various new information from flow.
159167
There are already some existing plugins that export e.g. `DNS`, `HTTP`, `SIP`, `NTP`, `PassiveDNS`.
160168

169+
To enable a plugin, add `-p` option with argument (it can be used multiple times). Each plugin provides a set of information described in section Output data.
170+
171+
See `ipfixprobe -h process` for more information and complete list of processing plugins and their parameters.
172+
161173
## Adding new plugin
174+
162175
To create new plugin use [process/create_plugin.sh](process/create_plugin.sh) script. This interactive script will generate .cpp and .h
163176
file template and will also print `TODO` guide what needs to be done.
164177

@@ -172,10 +185,16 @@ Turn off message buffering using `buffer=off` option and set `timeout=WAIT` on o
172185
```
173186

174187
## Output data
188+
189+
The following sections describe set of information fields provided by the processing plugins.
190+
The columns `Output field` and `Type` represent the name and type of UniRec elements (NEMEA output); however, the equivalent fields are exported in other output plugins as well --- e.g., in IPFIX format.
191+
192+
Note: to lookup IPFIX enterprise id and element id have a look into [header file](https://github.com/CESNET/ipfixprobe/blob/master/include/ipfixprobe/ipfix-elements.hpp#L85) with the mapping to IPFIX elements.
193+
175194
### Basic
176195
Basic unirec fields exported on interface with basic (pseudo) plugin. These fields are also exported on interfaces where HTTP, DNS, SIP and NTP plugins are active.
177196

178-
| UniRec field | Type | Description |
197+
| Output field | Type | Description |
179198
|:----------------------:|:----------------:|:---------------------------------------------------:|
180199
| DST_MAC | macaddr | destination MAC address |
181200
| SRC_MAC | macaddr | source MAC address |
@@ -199,7 +218,7 @@ Basic unirec fields exported on interface with basic (pseudo) plugin. These fiel
199218
List of unirec fields exported together with basic flow fields on interface by basicplus plugin.
200219
Fields without `_REV` suffix are fields from source flow. Fields with `_REV` are from the opposite direction.
201220

202-
| UniRec field | Type | Description |
221+
| Output field | Type | Description |
203222
|:------------:|:------:|:---------------------------:|
204223
| IP_TTL | uint8 | IP TTL field |
205224
| IP_TTL_REV | uint8 | IP TTL field |
@@ -216,7 +235,7 @@ Fields without `_REV` suffix are fields from source flow. Fields with `_REV` are
216235
### HTTP
217236
List of unirec fields exported together with basic flow fields on interface by HTTP plugin.
218237

219-
| UniRec field | Type | Description |
238+
| Output field | Type | Description |
220239
|:----------------------------:|:------:|:---------------------------:|
221240
| HTTP_REQUEST_METHOD | string | HTTP request method |
222241
| HTTP_REQUEST_HOST | string | HTTP request host |
@@ -229,7 +248,7 @@ List of unirec fields exported together with basic flow fields on interface by H
229248
### RTSP
230249
List of unirec fields exported together with basic flow fields on interface by RTSP plugin.
231250

232-
| UniRec field | Type | Description |
251+
| Output field | Type | Description |
233252
|:----------------------------:|:------:|:---------------------------:|
234253
| RTSP_REQUEST_METHOD | string | RTSP request method name |
235254
| RTSP_REQUEST_AGENT | string | RTSP request user agent |
@@ -241,7 +260,7 @@ List of unirec fields exported together with basic flow fields on interface by R
241260
### TLS
242261
List of unirec fields exported together with basic flow fields on interface by TLS plugin.
243262

244-
| UniRec field | Type | Description |
263+
| Output field | Type | Description |
245264
|:-------------------:|:------:|:-------------------------------------------------------------:|
246265
| TLS_SNI | string | TLS server name indication field from client |
247266
| TLS_ALPN | string | TLS application protocol layer negotiation field from server |
@@ -251,7 +270,7 @@ List of unirec fields exported together with basic flow fields on interface by T
251270
### DNS
252271
List of unirec fields exported together with basic flow fields on interface by DNS plugin.
253272

254-
| UniRec field | Type | Description |
273+
| Output field | Type | Description |
255274
|:------------:|:------:|:-------------------------------:|
256275
| DNS_ID | uint16 | transaction ID |
257276
| DNS_ANSWERS | uint16 | number of DNS answer records |
@@ -295,7 +314,7 @@ Same as [here](https://www.liberouter.org/technologies/exporter/dns-plugin/):
295314
### PassiveDNS
296315
List of unirec fields exported together with basic flow fields on interface by PassiveDNS plugin.
297316

298-
| UniRec field | Type | Description |
317+
| Output field | Type | Description |
299318
|:------------:|:------:|:---------------------------------------:|
300319
| DNS_ID | uint16 | transaction ID |
301320
| DNS_ATYPE | uint8 | response record type |
@@ -306,7 +325,7 @@ List of unirec fields exported together with basic flow fields on interface by P
306325
### SIP
307326
List of unirec fields exported together with basic flow fields on interface by SIP plugin.
308327

309-
| UniRec field | Type | Description |
328+
| Output field | Type | Description |
310329
|:-----------------:|:------:|:-------------------------------:|
311330
| SIP_MSG_TYPE | uint16 | SIP message code |
312331
| SIP_STATUS_CODE | uint16 | status of the SIP request |
@@ -321,7 +340,7 @@ List of unirec fields exported together with basic flow fields on interface by S
321340
### NTP
322341
List of unirec fields exported together with basic flow fields on interface by NTP plugin.
323342

324-
| UniRec field | Type | Description |
343+
| Output field | Type | Description |
325344
|:--------------:|:------:|:-------------------------:|
326345
| NTP_LEAP | uint8 | NTP leap field |
327346
| NTP_VERSION | uint8 | NTP message version |
@@ -340,7 +359,7 @@ List of unirec fields exported together with basic flow fields on interface by N
340359
### SMTP
341360
List of unirec fields exported on interface by SMTP plugin
342361

343-
| UniRec field | Type | Description |
362+
| Output field | Type | Description |
344363
|:-------------------------:|:------:|:-----------------------------------:|
345364
| SMTP_2XX_STAT_CODE_COUNT | uint32 | number of 2XX status codes |
346365
| SMTP_3XX_STAT_CODE_COUNT | uint32 | number of 3XX status codes |
@@ -408,9 +427,9 @@ The following table shows bit values of `SMTP\_STAT_CODE\_FLAGS` for each presen
408427

409428
### PSTATS
410429
List of unirec fields exported on interface by PSTATS plugin. The plugin is compiled to gather statistics for the first `PSTATS_MAXELEMCOUNT` (30 by default) packets in the biflow record.
411-
Note: the following fields are UniRec arrays.
430+
Note: the following fields are UniRec arrays (or basicList in IPFIX).
412431

413-
| UniRec field | Type | Description |
432+
| Output field | Type | Description |
414433
|:--------------------------:|:--------:|:--------------------------------------:|
415434
| PPI_PKT_LENGTHS | uint16\* | sizes of the first packets |
416435
| PPI_PKT_TIMES | time\* | timestamps of the first packets |
@@ -429,7 +448,7 @@ ipfixprobe 'pcap;file=pcaps/http.pcap' -p "pstats;includezeros" -o 'unirec;i=u:s
429448
### OSQUERY
430449
List of unirec fields exported together with basic flow fields on interface by OSQUERY plugin.
431450

432-
| UniRec field | Type | Description |
451+
| Output field | Type | Description |
433452
|:--------------------------:|:--------:|:---------------------------------------------------:|
434453
| PROGRAM_NAME | string | The name of the program that handles the connection |
435454
| USERNAME | string | The name of the user who starts the process |
@@ -446,7 +465,7 @@ List of unirec fields exported together with basic flow fields on interface by O
446465
### SSDP
447466
List of unirec fields exported together with basic flow fields on interface by SSDP plugin.
448467

449-
| UniRec field | Type | Description |
468+
| Output field | Type | Description |
450469
|:------------------:|:------:|:-------------------------------:|
451470
| SSDP_LOCATION_PORT | uint16 | service port |
452471
| SSDP_NT | string | list of advertised service urns |
@@ -459,7 +478,7 @@ All lists are semicolon separated.
459478
### DNS-SD
460479
List of unirec fields exported together with basic flow fields on interface by DNS-SD plugin.
461480

462-
| UniRec field | Type | Description |
481+
| Output field | Type | Description |
463482
|:---------------:|:------:|:-------------------------------:|
464483
| DNSSD_QUERIES | string | list of queries for services |
465484
| DNSSD_RESPONSES | string | list of advertised services |
@@ -476,36 +495,36 @@ Format of DNSSD_RESPONSES: [service_instance_name;service_port;service_target;hi
476495

477496
### OVPN (OpenVPN)
478497

479-
List of UniRec fields exported together with basic flow fields on interface by OVPN plugin.
498+
List of fields exported together with basic flow fields on interface by OVPN plugin.
480499

481-
| UniRec field | Type | Description |
500+
| Output field | Type | Description |
482501
|:------------------:|:------:|:-------------------------------:|
483502
| OVPN_CONF_LEVEL | uint8 | level of confidence that the flow record is an OpenVPN tunnel |
484503

485504

486505
### IDPContent (Initial Data Packets Content)
487506

488-
List of UniRec fields exported together with basic flow fields on the interface by IDPContent plugin.
507+
List of fields exported together with basic flow fields on the interface by IDPContent plugin.
489508
The plugin is compiled to export `IDPCONTENT_SIZE` (100 by default) bytes from the first data packet in SRC -> DST direction,
490509
and the first data packet in DST -> SRC direction.
491510

492-
| UniRec field | Type | Description |
511+
| Output field | Type | Description |
493512
|:------------------:|:------:|:-------------------------------:|
494513
| IDP_CONTENT | bytes | Content of first data packet from SRC -> DST|
495514
| IDP_CONTENT_REV | bytes | Content of first data packet from DST -> SRC|
496515

497516
### NetBIOS
498517

499-
List of UniRec fields exported together with basic flow fields on interface by NetBIOS plugin.
518+
List of fields exported together with basic flow fields on interface by NetBIOS plugin.
500519

501-
| UniRec field | Type | Description |
520+
| Output field | Type | Description |
502521
|:-------------:|:------:|:---------------------------:|
503522
| NB_NAME | string | NetBIOS Name Service name |
504523
| NB_SUFFIX | uint8 | NetBIOS Name Service suffix |
505524

506525
### PHISTS
507526

508-
List of UniRec fields exported together with basic flow fields on the interface by PHISTS plugin.
527+
List of fields exported together with basic flow fields on the interface by PHISTS plugin.
509528
The plugin exports the histograms of Payload sizes and Inter-Packet-Times for each direction. The
510529
histograms bins are scaled logarithmicaly and are shown in following table:
511530

@@ -522,7 +541,7 @@ histograms bins are scaled logarithmicaly and are shown in following table:
522541

523542
The exported unirec fields and IPFIX basiclists is shown in following table:
524543

525-
| UniRec field | Type | Description |
544+
| Output field | Type | Description |
526545
|:-------------------:|:-------:|:---------------------------------------:|
527546
| D_PHISTS_IPT | uint32\*| DST->SRC: Histogram of interpacket times|
528547
| D_PHISTS_SIZES | uint32\*| DST->SRC: Histogram of packet sizes |
@@ -538,11 +557,11 @@ ipfixprobe 'pcap;file=pcaps/http.pcap' -p "phists;includezeros" -o 'unirec;i=u:h
538557
```
539558
### BSTATS
540559

541-
List of UniRec fields exported together with basic flow fields on the interface by BSTATS plugin.
560+
List of fields exported together with basic flow fields on the interface by BSTATS plugin.
542561
The plugin is compiled to export the first `BSTATS_MAXELENCOUNT` (15 by default) burst in each direction.
543562
The bursts are computed separately for each direction. Burst is defined by `MINIMAL_PACKETS_IN_BURST` (3 by default) and by `MAXIMAL_INTERPKT_TIME` (1000 ms by default) between packets to be included in a burst.
544563

545-
| UniRec field | Type | Description |
564+
| Output field | Type | Description |
546565
|:-------------------:|:-------:|:---------------------------------------------------------------:|
547566
| SBI_BRST_PACKETS | uint32\* | SRC->DST: Number of packets transmitted in i<sup>th</sup> burst|
548567
| SBI_BRST_BYTES | uint32\* | SRC->DST: Number of bytes transmitted in i<sup>th</sup> burst |
@@ -555,19 +574,19 @@ The bursts are computed separately for each direction. Burst is defined by `MINI
555574

556575
### WG (WireGuard)
557576

558-
List of UniRec fields exported together with basic flow fields on interface by WG plugin.
577+
List of fields exported together with basic flow fields on interface by WG plugin.
559578

560-
| UniRec field | Type | Description |
579+
| Output field | Type | Description |
561580
|:------------------:|:------:|:-------------------------------:|
562581
| WG_CONF_LEVEL | uint8 | level of confidence that the flow record is a WireGuard tunnel|
563582
| WG_SRC_PEER | uint32 | ephemeral SRC peer identifier |
564583
| WG_DST_PEER | uint32 | ephemeral DST peer identifier |
565584

566585
### QUIC
567586

568-
List of UniRec fields exported together with basic flow fields on interface by quic plugin.
587+
List of fields exported together with basic flow fields on interface by quic plugin.
569588

570-
| UniRec field | Type | Description |
589+
| Output field | Type | Description |
571590
|:------------------:|:------:|:-------------------------------:|
572591
| QUIC_SNI | string | Decrypted server name |
573592

0 commit comments

Comments
 (0)