[haiku-gsoc] Re: Licensing questions

  • From: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Sun, 11 Jun 2017 20:31:44 +0000

sön 11 juni 2017 kl 21:30 skrev Vivek Roy <vivekroyandroid@xxxxxxxxx>:

One last hurdle (for now): ppsratecheck
<http://xref.plausible.coop/source/xref/freebsd-current/sys/kern/kern_time.c#1052>
.

The documentation says:

/*
* ppsratecheck(): packets (or events) per second limitation.
*
* Return 0 if the limit is to be enforced (e.g. the caller
* should drop a packet because of the rate limitation).
*
* maxpps of 0 always causes zero to be returned.  maxpps of -1
* always causes 1 to be returned; this effectively defeats rate
* limiting.
*
* Note that we maintain the struct timeval for compatibility
* with other bsd systems.  We reuse the storage and just monitor
* clock ticks for minimal overhead.
*/

Any Haiku equivalent?


Yes, we have a implementation in our FreeBSD network compability lib:
https://github.com/haiku/haiku/blob/master/src/libs/compat/freebsd_network/compat/sys/time.h
https://github.com/haiku/haiku/blob/master/src/libs/compat/freebsd_network/fbsd_time.c#L35

/Fredrik Holmqvist, TQH

Other related posts: