ppsratecheck man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

PPSRATECHECK(9)		 BSD Kernel Developer's Manual	       PPSRATECHECK(9)

NAME
     ppsratecheck — function to help implement rate-limited actions

SYNOPSIS
     #include <sys/time.h>

     int
     ppsratecheck(struct timeval *lasttime, int *curpps, int maxpps);

DESCRIPTION
     The ppsratecheck() function provides easy way to perform packet-per-sec,
     or event-per-sec, rate limitation.	 The motivation for implementing
     ppsratecheck() was to provide a mechanism that could be used to add rate
     limitation to network packet output.  For certain network packets, we may
     want to impose rate limitation, to avoid denial-of-service attack possi‐
     bilities.

     maxpps specifies maximum permitted packets, or events, per second.	 If
     ppsratecheck() is called more than maxpps times in a given one second
     period, the function will return 0, indicating that we exceeded the
     limit.  If we are below the limit, the function will return 1.  If maxpps
     is set to 0, the function will always return 0 (no packets/events are
     permitted).  Negative maxpps indicates that rate limitation is disabled,
     and ppsratecheck will always return 1.

     curpps and lasttime are used to maintain the number of recent calls.
     curpps will be incremented every time ppsratecheck() is called, and will
     be reset whenever necessary.

SEE ALSO
     log(9), printf(9), ratecheck(9), time_second(9)

HISTORY
     The ppsratecheck() function appeared in NetBSD 1.5.

BSD				August 3, 2000				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net