summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/birdlib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index 93f25fb..b7cd6b4 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -9,6 +9,8 @@
#ifndef _BIRD_BIRDLIB_H_
#define _BIRD_BIRDLIB_H_
+#include "timer.h"
+
/* Ugly structure offset handling macros */
#define OFFSETOF(s, i) ((unsigned int)&((s *)0)->i)
@@ -33,8 +35,14 @@
/* Logging and dying */
+struct rate_limit {
+ bird_clock_t timestamp;
+ int count;
+};
+
#define log log_msg
void log_msg(char *msg, ...);
+void log_rl(struct rate_limit *rl, char *msg, ...);
void die(char *msg, ...) NORET;
void bug(char *msg, ...) NORET;