summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpd/timer.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make the timer code independent of struct peer this way it can be usedclaudio2020-12-111-50/+51
| | | | | in other places as well. ok procter@
* Change timer_nextisdue() and timer_nextduein() to take the current timeclaudio2019-05-241-5/+5
| | | | | | | as an argument. This way getmonotime() can be called once at the start of looping over all peers instead of twice during the loop. Makes a big difference with many peers. OK florian@ sthen@
* sync log.c from relayd et al to bgpd.benno2017-01-241-1/+2
| | | | | | | there is still a little difference regarding handling of the verbosity value that will be handled later. ok claudio@ florian@
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-3/+4
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* accept() pacing for bgpd based on similar work done on other daemons.claudio2012-04-121-3/+1
| | | | OK henning@ sthen@
* spacing and irrelevant glitches which disrupt lintderaadt2010-10-241-2/+2
|
* timer_nextduein returned crap. fix it. so obvious... how could that happen.henning2009-01-211-2/+2
| | | | found out the hard way by Marc Runkel <MRunkel@untangle.com>
* use monotime instead of wallclock.henning2008-06-111-5/+18
| | | | | makes us independent from system time changes. diff from japan,was hiding... ok claudio some time ago
* timer_due is not needed any morehenning2008-05-081-11/+1
|
* KNFhenning2008-05-081-2/+2
|
* take advanatge of the timewheelin timer_nextduein - we just need to lookhenning2008-05-081-11/+6
| | | | at the first one
* we can stopin timer_set if new timeout equals the oldone.henning2008-05-081-1/+3
| | | | matters for stuff like the HoldTimer that gets reset often
* take advantage of the timewheel: instead of checking each an everyhenning2008-05-081-1/+13
| | | | timer, just get the first off the queue and check wether it is due
* in timer_set, when figuring out the right position for the timer,henning2008-05-081-2/+2
| | | | | | wemust stop walking the list once werun into a stopped timer, or eventually all stopped timers will queue up at the very front (instead of at the tail)
* change timer internals so that we use a timewheel (tailq, sorted by expiryhenning2008-05-081-29/+60
| | | | | | so that the timer that will expire first is always the first element, and so on). will make the checking a bit faster and moreelegant and more conveniant. ok claudio
* provide timer_nextduein, which provides the number of seconds until thehenning2007-12-231-1/+15
| | | | | | | next timer expires. use that in the session engine's mainloop, which simplifies it and removes the last bits of timer internals knowledge from anywhere outside timer.c.
* send timers for bgpctlshow neighbor foo timer in seperate messages afterhenning2007-12-231-1/+3
| | | | | | the peer data. makes bgpctl display code independent from timer implementation internals. only running timers are displayed now, stopped ones are skipped.
* make all timer_get() callers (except timer_set which will needhenning2007-12-231-5/+8
| | | | | special handling) and onein session.c that will go away able to cope with timer_get() returning NULL (i.e.nosuch timer/not running)
* rework timers.henning2007-12-201-0/+81
stop changing tienmr values directly, always use new timer_(get/set/stop/running) functions. preparation for more to come :) ok claudio