diff options
author | Martin Mares <mj@ucw.cz> | 1998-05-03 18:43:39 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-05-03 18:43:39 +0200 |
commit | 18c8241a91bd9208879666f1a1a13f454e66d75b (patch) | |
tree | 8bdc5f3e384b6b9198d5ab834d869c8d1fb261a7 /lib/birdlib.h | |
parent | a8b6038225d18155883e330c96b2bc2e44153e1e (diff) | |
download | bird-18c8241a91bd9208879666f1a1a13f454e66d75b.tar bird-18c8241a91bd9208879666f1a1a13f454e66d75b.zip |
BIRD library: The story continues.
Complete resource manages and IP address handling.
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r-- | lib/birdlib.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h index eb95585..5e533b6 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -13,17 +13,28 @@ #define OFFSETOF(s, i) ((unsigned int)&((s *)0)->i) #define SKIP_BACK(s, i, p) ((s *)((char *)p - OFFSETOF(s, i))) +#define ALIGN(s, a) (((s)+a-1)&~(a-1)) + +/* Functions which don't return */ + +#define NORET __attribute__((noreturn)) /* Logging and dying */ void log(char *msg, ...); -void die(char *msg, ...); +void die(char *msg, ...) NORET; #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. */ +#define L_FATAL "\006" /* Fatal errors */ + +void log_init(char *); /* Initialize logging to given file (NULL=stderr, ""=syslog) */ +void log_init_debug(char *); /* Initialize debug dump to given file (NULL=stderr, ""=off) */ + +void debug(char *msg, ...); /* Printf to debug output */ /* Debugging */ |