aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/netflow
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove one very strange unneded if.Alexander Motin2008-01-271-7/+2
| | | | Notes: svn path=/head/; revision=175717
* Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, whichRobert Watson2007-08-061-1/+0
| | | | | | | | | | | | | | | | | | previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Removing them significantly simplifies error-handling in the socket layer, eliminated quite a bit of unwinding of locking in error cases. While here clean up the now unneeded opt_net.h, which previously was used for the NET_WITH_GIANT kernel option. Clean up some related gotos for consistency. Reviewed by: bz, csjp Tested by: kris Approved by: re (kensmith) Notes: svn path=/head/; revision=171744
* Bump maximum number of interface hooks to the maximum possible value.Gleb Smirnoff2007-03-282-1/+2
| | | | | | | | | | | This will increase the memory consumption for more than 1 Mb, but this is required for operation on multiinterface access concentrators running mpd. Requested by: Alexander Motin Notes: svn path=/head/; revision=167990
* Recognize 802.1q frames in Ethernet input and process them.Gleb Smirnoff2006-10-111-1/+29
| | | | | | | | PR: kern/101162 Submitted by: CoolDavid (Tseng Guo-Fu) <cooldavid cdpa.nsysu.edu.tw> Notes: svn path=/head/; revision=163247
* Make it buildable.Gleb Smirnoff2006-10-111-1/+1
| | | | Notes: svn path=/head/; revision=163241
* Unbreak a short one.Gleb Smirnoff2006-10-111-2/+1
| | | | | | | Submitted by: maxim Notes: svn path=/head/; revision=163240
* Break long line.Gleb Smirnoff2006-10-111-1/+2
| | | | Notes: svn path=/head/; revision=163239
* Use hash functions with better distribution. Tested on live traffic.Gleb Smirnoff2006-10-111-11/+11
| | | | | | | Submitted by: Alexander Motin <mav alkar.net> Notes: svn path=/head/; revision=163238
* Use bitcount32() from sys/systm.h instead of my own.Gleb Smirnoff2006-10-111-17/+4
| | | | Notes: svn path=/head/; revision=163234
* o Replace disappeared URLs to Cisco docs by new ones, style.Maxim Konovalov2006-04-251-8/+14
| | | | | | | No functional changes. Notes: svn path=/head/; revision=158028
* o Set to zero engine_type, engine_id and pad (cisco calls itMaxim Konovalov2006-04-251-0/+3
| | | | | | | | | | | | | sampling_interval) fields in netflow v5 header. We do not use them but some netflow tools show garbage. PR: kern/96296 Submitted by: David Duchscher Approved by: glebius MFC after: 1 week Notes: svn path=/head/; revision=158027
* - Increase maximum number of interfaces to 2048.Gleb Smirnoff2006-02-091-9/+8
| | | | | | | | | - Regroup softc so that frequently used elements are grouped in the beginning, while the interfaces array is at the end. Notes: svn path=/head/; revision=155468
* Correct off-by-one errors.Gleb Smirnoff2006-01-141-3/+3
| | | | | | | Found with: Coverity Prevent(tm) Notes: svn path=/head/; revision=154354
* When sending export datagram from interrupt thread, use NG_QUEUEGleb Smirnoff2006-01-121-15/+15
| | | | | | | | | | in flags. When sending export datagram from expiry thread, then use default zero flags. This removes unpleasant contention of the interrupt thread on mutexes (usually ng_ksocket's socket buffer mutex). Notes: svn path=/head/; revision=154277
* Mark appropriate commands with NGM_READONLY and NGM_HASREPLY andGleb Smirnoff2006-01-121-7/+7
| | | | | | | bump type cookie. Notes: svn path=/head/; revision=154267
* In ng_netflow_disconnect() check whether we are working with "iface"Gleb Smirnoff2005-12-281-2/+6
| | | | | | | | | or with "out" hook, and clear the right pointer. Reported by: Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru> Notes: svn path=/head/; revision=153791
* - Update the flow sequence before converting count toGleb Smirnoff2005-11-271-5/+2
| | | | | | | | | | | | network byte order. - Update the flow sequence in one atomic op instead of two. Reported by: Denis Shaposhnikov <dsh vlink.ru> Reported by: Daniil Kharoun <kdl chelcom.ru> PR: kern/89417 Notes: svn path=/head/; revision=152847
* Normalize a significant number of kernel malloc type names:Robert Watson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names. Notes: svn path=/head/; revision=151897
* Check that we have first fragment before pulling up TCP/UDP header.Gleb Smirnoff2005-07-171-12/+14
| | | | Notes: svn path=/head/; revision=148091
* Catch up with new ng_package_data().Gleb Smirnoff2005-05-161-1/+1
| | | | Notes: svn path=/head/; revision=146285
* - Gather statistics about failed mbuf+cluster+ng_item allocations.Gleb Smirnoff2005-05-122-11/+12
| | | | | | | - Adjust comments and variables names in nfinfo. Notes: svn path=/head/; revision=146139
* A new version of NetFlow node.Gleb Smirnoff2005-05-114-298/+336
| | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=146092
* Remove goto.Gleb Smirnoff2005-04-111-19/+15
| | | | Notes: svn path=/head/; revision=144901
* Add a possibility to bypass unmodified accounted data to specialGleb Smirnoff2005-03-222-5/+50
| | | | | | | hook(s). Data received on these hook(s) is sent back to ifaceX hook(s). Notes: svn path=/head/; revision=143988
* Refactor node so that it does not modify mbuf contents. Next step wouldGleb Smirnoff2005-03-211-19/+68
| | | | | | | | | | | | | | | | 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(). Notes: svn path=/head/; revision=143924
* Refactor node so that it does not modify mbuf contents. Next step wouldGleb Smirnoff2005-03-213-100/+67
| | | | | | | | | | | | | | | | 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(). Notes: svn path=/head/; revision=143923
* Plug item leak, which occured when m_pullup() failed.Gleb Smirnoff2005-03-211-4/+3
| | | | Notes: svn path=/head/; revision=143912
* - Don't lose TCP flags of the first packet in a flow.Gleb Smirnoff2005-03-201-4/+4
| | | | | | | - Don't account length of the first packet in a flow twice. Notes: svn path=/head/; revision=143890
* Cisco uses milliseconds for uptime. This is stupid. Nobody cares of suchGleb Smirnoff2005-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 Notes: svn path=/head/; revision=143103
* Expire aged flows in normal expiry thread. This fixes the problem, whenGleb Smirnoff2005-02-051-1/+2
| | | | | | | a node disconnected from all sources of traffic never purges its cache. Notes: svn path=/head/; revision=141348
* Break long lines in code and comments.Gleb Smirnoff2005-02-051-15/+18
| | | | Notes: svn path=/head/; revision=141343
* In case of various tunneling protocols, mbuf may pass several interfacesGleb Smirnoff2005-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 Notes: svn path=/head/; revision=141112
* Use log() instead of printf(), to reduce flood on console.Gleb Smirnoff2005-01-202-5/+9
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=140511
* - Plug a memory leak in ng_netflow_cache_init().Gleb Smirnoff2004-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 Notes: svn path=/head/; revision=139374
* - Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.Gleb Smirnoff2004-12-052-6/+12
| | | | | | | | | | | | | - Always check that index number passed from userland is <= NG_NETFLOW_MAXIFACES. [1] - Increase NG_NETFLOW_MAXIFACES up to 512. [2] Noticed by: Roman Palagin [1] Requested by: Yuri Y. Bushmelev [2] MFC after: 1 week Notes: svn path=/head/; revision=138392
* Removed bogus comment.Gleb Smirnoff2004-11-011-2/+0
| | | | Notes: svn path=/head/; revision=137115
* - Remove advertising clause from copyright [1]Gleb Smirnoff2004-09-174-32/+4
| | | | | | | | | - Change my email to glebius@FreeBSD.org Requested by: ru [1] Notes: svn path=/head/; revision=135400
* A netgraph node implementing Netflow version 5.Gleb Smirnoff2004-09-164-0/+1670
Supported by: Bestcom ISP, Rinet ISP Approved by: julian (mentor) Notes: svn path=/head/; revision=135332