aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_source.h
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Remove defunct email address from header as well.Ed Maste2010-07-061-1/+1
| | | | Notes: svn path=/head/; revision=209730
* Add "setcounter" and "getcounter" messages, providing the the abilityEd Maste2007-03-021-0/+29
| | | | | | | | | | | | | | | | to embed up to four counters in outgoing packets. The message specifies the offset at which the counter should be inserted as well as the parameters of the counter. Example usage: ngctl msg src0: setcounter \ '{ index=0 offset=0x40 flags=1 width=4 increment=1 max_val=12345 }' Sponsored by: Sandvine Incorporated Notes: svn path=/head/; revision=167160
* Add "settimestamp" and "gettimestamp" messages, providing the the abilityEd Maste2007-03-011-0/+17
| | | | | | | | | | | | | | | | to embed a timestamp (struct timeval) in outgoing packets. The message specifies the offset at which the timestamp should be inserted. NG_SOURCE(4) gives an example usage that queues an ICMP packet. Using that example, the following command will insert a timestamp in the ICMP's data payload: ngctl msg src0: settimestamp '{ offset=0x2a flags=1 }' Sponsored by: Sandvine Incorporated Notes: svn path=/head/; revision=167156
* Implement an upper limit for packets per second sent by node.Gleb Smirnoff2005-12-231-4/+9
| | | | Notes: svn path=/head/; revision=153690
* Major overhaul and cleanup of ng_source node.Gleb Smirnoff2005-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functional changes: - Cut struct source_hookinfo. Just use hook_p pointer. - Remove "start_now" command. "start" command now requires number of packets to send as argument. "start" command actually starts sending. Move the code that actually starts sending from ng_source_rcvmsg() to ng_source_start(). - Remove check for NG_SOURCE_ACTIVE in ng_source_stop(). We can be called with flag cleared (see begin of ng_source_intr()). - If NG_SEND_DATA_ONLY() use log(LOG_DEBUG) instead of printf(). Otherwise we will *flood* console. - Add ng_connect_t method, which sends NGM_ETHER_GET_IFNAME command to "output" hook. Cut ng_source_request_output_ifp(). Refactor ng_source_store_output_ifp() to use ifunit() and don't muck through interface list. - Add "setiface" command, which gives ability to configure interface in case when ng_source_connect() failed. This happens, when we are not connected directly to ng_ether(4) node. - Remove KASSERTs, which can never fire. - Don't check for M_PKTHDR in rcvdata method. netgraph(4) does this for us. Style: - Assign sc_p = NG_NODE_PRIVATE(node) in declaration, to be consistent with style of other nodes. - Sort variables. - u_intXX -> uintXX. - Dots at ends of comments. Sponsored by: Rambler Notes: svn path=/head/; revision=144674
* Make some basic grammar and style fixes to ng_source.c and ng_source.h.Bosko Milekic2005-03-101-18/+9
| | | | | | | | The latter was particularly violated by someone's editor in the past, due to an effect I like to call "premature linewrapping." Notes: svn path=/head/; revision=143387
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-1/+3
| | | | Notes: svn path=/head/; revision=139823
* Define the new command NGM_SOURCE_START_NOW to allow generation ofHartmut Brandt2004-01-261-0/+1
| | | | | | | | traffic for non-ethernet hooks. This commit should have been packaged with the commit to ng_source.c. Notes: svn path=/head/; revision=125034
* Use a single style of multiple inclusion protection for Netgraph headers.Ruslan Ermilov2003-11-111-3/+3
| | | | | | | Reviewed by: archie, harti, emax Notes: svn path=/head/; revision=122481
* Add the netgraph 'source' module.Julian Elischer2002-10-311-0/+94
This is NOT YET CONVERTED TO -current. This node is a source for preprogrammed packets at a known rate for testing. I will convert it to -current "in place" but will MFC teh original pre-conversion variant as that is what is originally submitted. Man page my me, info from Dave's README. Submitted by: Dave Chapeskie <dchapeskie@SANDVINE.com> Obtained from: Sandvine inc. MFC after: 1 week Notes: svn path=/head/; revision=106266