PPSRATECHECK(9) | Kernel Developer's Manual | PPSRATECHECK(9) |
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.
August 3, 2000 | NetBSD 6.1 |