diff options
author | Martin Mares <mj@ucw.cz> | 1998-04-23 14:01:15 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-04-23 14:01:15 +0000 |
commit | c40e05a0dffa33a8724e56121a2b6dcdfa9183e0 (patch) | |
tree | 4c4322c6900ae4788006d72195028ac71ecb11c1 /lib/birdlib.h | |
parent | 481f69854a788bd2bea5c6938e038ec6e21c491b (diff) |
Added IP address manipulation macros, interface declarations and logging.
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r-- | lib/birdlib.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h index fb4814f9..eb95585f 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -14,4 +14,23 @@ #define OFFSETOF(s, i) ((unsigned int)&((s *)0)->i) #define SKIP_BACK(s, i, p) ((s *)((char *)p - OFFSETOF(s, i))) +/* Logging and dying */ + +void log(char *msg, ...); +void die(char *msg, ...); + +#define L_DEBUG "\001" /* Debugging messages */ +#define L_INFO "\002" /* Informational messages */ +#define L_WARN "\003" /* Warnings */ +#define L_ERR "\004" /* Errors */ +#define L_AUTH "\005" /* Authorization failed etc. */ + +/* Debugging */ + +#ifdef LOCAL_DEBUG +#define DBG(x, y...) log(L_DEBUG x, ##y) +#else +#define DBG(x, y...) +#endif + #endif |