summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/netflow/netflow.c
Commit message (Collapse)AuthorAgeFilesLines
* Catch up with new ng_package_data().glebius2005-05-161-1/+1
|
* - Gather statistics about failed mbuf+cluster+ng_item allocations.glebius2005-05-121-3/+2
| | | | - Adjust comments and variables names in nfinfo.
* A new version of NetFlow node.glebius2005-05-111-269/+293
| | | | | | | | | | | | | | | | | | | The most significant changes are: - Use UMA zone instead of own chunk of memory. - Lock each hash entry separately. - Expire items "actively" - interrupt method can expire flows from hash slot, when it searches through it. - Remove global tailqueue. Make callout thread search through every hash slot. - Export datagram is detached from private data and filled. If it is incomplete, it is attached back. Another thread will continue working with it. Lesser, but also important speedups: - Flows in hash slot are stored in tailqueue. Whenever a flow is hit, it is moved to the begging, so it can be located quicker. - When callout thread works with hash slot it bails out if slot mutex is contested.
* Remove goto.glebius2005-04-111-20/+16
|
* Refactor node so that it does not modify mbuf contents. Next step wouldglebius2005-03-211-92/+60
| | | | | | | | | | | | | be pass-thru mode, when traffic is not copied by ng_tee, but passed thru ng_netflow. Changes made: - In ng_netflow_rcvdata() do all necessary pulluping: Ethernet header, IP header, and TCP/UDP header. - Pass only pointer to struct ip to ng_netflow_flow_add(). Any TCP/UDP headers are guaranteed to by after it. - Merge make_flow_rec() function into ng_netflow_flow_add().
* - Don't lose TCP flags of the first packet in a flow.glebius2005-03-201-4/+4
| | | | - Don't account length of the first packet in a flow twice.
* Cisco uses milliseconds for uptime. This is stupid. Nobody cares of suchglebius2005-03-031-4/+16
| | | | | | | | | | | precision when IP packet may travel through internet for several seconds. Also uptime measured in milliseconds overflows every 48+ days. But we have to do same to keep compatibility with Cisco and flow-tools. Make a macro MILLIUPTIME, which does overflowable multiplication to 1000. Requested by: Sergey Ryabin, Oleg Bulyzhin MFC after: 1 week
* Expire aged flows in normal expiry thread. This fixes the problem, whenglebius2005-02-051-1/+2
| | | | a node disconnected from all sources of traffic never purges its cache.
* Break long lines in code and comments.glebius2005-02-051-15/+18
|
* In case of various tunneling protocols, mbuf may pass several interfacesglebius2005-02-011-3/+5
| | | | | | | | | before entering ng_netflow. In this case it will have not NULL m_pkthdr.rcvif. However, it will enter ng_iface soon with another index. So let in_ifIndex value configured by user override m_pkthdr.rcvif. Reported by: Damir Bikmuhametov MFC after: 1 week
* Use log() instead of printf(), to reduce flood on console.glebius2005-01-201-4/+7
| | | | MFC after: 1 week
* - Plug a memory leak in ng_netflow_cache_init().glebius2004-12-281-5/+10
| | | | | | | - Initialize error to 0 in ng_netflow_flow_add() (a nop change). - Update cache statistics holding workqueue mutex. MFC after: 3 days
* Removed bogus comment.glebius2004-11-011-2/+0
|
* - Remove advertising clause from copyright [1]glebius2004-09-171-8/+1
| | | | | | - Change my email to glebius@FreeBSD.org Requested by: ru [1]
* A netgraph node implementing Netflow version 5.glebius2004-09-161-0/+736
Supported by: Bestcom ISP, Rinet ISP Approved by: julian (mentor)
OpenPOWER on IntegriCloud