1
0
mirror of https://github.com/netsampler/goflow2.git synced 2024-05-06 15:54:52 +00:00

19 Commits

Author SHA1 Message Date
332655476b proto: change protobuf definition case (#109) 2022-10-08 15:47:31 -07:00
e3471e58c6 fix single ip template case (#106) 2022-10-08 15:16:40 -07:00
57fad2e0c8 Fix SrcAS/DstAS for sFlow (#125) 2022-10-08 08:41:47 -07:00
1468ff77c2 BGP Next Hop, Communities and AS-Path fields (#101)
* Add BGP Next Hop field to flow message (#11)
* Add BGP Communities and AS Path fields (#12)

Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
2022-07-20 22:04:43 -07:00
e0abb7ba07 Add MPLS decoding for IPFIX (#95)
* Add MPLS decoding for IPFIX
Co-authored-by: David Roy <door7302@gmail.com>
2022-07-20 21:40:11 -07:00
0020934574 Observation domain (#98)
* netflow: Add observation domain and point to message

The ObservationDomainID and ObservationPointID are two IPFIX fields that
identify the entity that is capturing flows and can be used to enrich
the context around a specific sample.

Parse these fields from the sample and add them to the FlowMessage.

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Co-authored-by: Adrian Moreno <amorenoz@redhat.com>
2022-07-20 21:27:51 -07:00
97d58ccfe2 Adding field names to allow ipfix yaml mapping field to parse 2022-07-06 13:53:57 -07:00
10dc7271d5 In IPFIX DeltaMicroseconds case, basetime must be converted to MS 2022-05-09 11:05:49 +02:00
23e75e85f8 Added TimeFlowStartMs and TimeFlowEndMs to Netflow v10 (IPFIX) 2022-05-07 12:11:47 +02:00
3e6a0510fd Added TimeFlowStartMs and TimeFlowEndMs to Netflow v5 2022-05-07 12:05:42 +02:00
55bef5b2f0 Added TimeFlowStartMs and TimeFlowEndMs to Netflow v9 2022-05-07 12:00:33 +02:00
615b9f697c Avoid unnecessary memory allocations 2022-01-26 17:24:35 +01:00
27863691f0 Bugfix: index out of range in some cases 2022-01-06 21:59:02 +01:00
b0b73b2b90 Merge pull request #38 from vincentbernat/fix/defer-unlock
style: defer unlock when possible/not trivial
2021-09-23 20:44:05 -07:00
536b08812f Custom map flow fields (#36)
* adds dataframe link decoding
* can map NetFlow/IPFIX fields and bytes sections from sFlow/packets to any field inside the protobuf
* add CLI argument for loading a mapping yaml file
2021-09-23 20:41:17 -07:00
95945d3042 style: defer unlock when possible/not trivial
Defer unlocking just after taking a lock when possible (when unlock is
done at the very end) and when not trivial (the function body is more
than a couple of lines). This simplifies a bit some functions (no need
to unlock before each return) and for the other, it may avoid a bug in
the future in case a return is inserted into the body of a function.

Use of defer has been optimized a lot in Go and it is believed that
simpler defers have zero overhead since Go 1.14:
https://golang.org/doc/go1.14#runtime

> This release improves the performance of most uses of defer to incur
> almost zero overhead compared to calling the deferred function
> directly. As a result, defer can now be used in performance-critical
> code without overhead concerns.
2021-09-23 10:01:24 +02:00
9247511c44 ipfix: support relative flow timestamps
IPFIX supports sending flowEndDeltaMicroseconds (159) and
flowEndDeltaMicroseconds (160) to provide flow timestamps relative to
the exportTime in the IPFIX Message Header.

Use them to calculate flow TimeFlowStart and TimeFlowEnd.

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
2021-09-08 17:12:31 +02:00
04c8543306 Bugfix NetFlow/IPFIX producer
* Source and destination mac addresses are fed from `NFV9_FIELD_xx_yyy_MAC`
  Fixes a bug where the samples were missing either source or destination Mac.
  This is supposed to be linked to the sampling direction.
2021-06-09 18:08:55 -07:00
e4bacbc4bd init 2021-05-25 17:33:26 -07:00