summaryrefslogtreecommitdiffstats
path: root/lib/log.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2016-02-23 12:38:23 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2017-03-08 00:15:40 +0100
commitbf1013e6c4e05ba48e5b35192000123becdf426d (patch)
treea20c87261562f02f648eddbd59ea568b6815273e /lib/log.h
parentlib: ditch struct zlog * argument on zlog/vzlog() (diff)
downloadfrr-bf1013e6c4e05ba48e5b35192000123becdf426d.tar.xz
frr-bf1013e6c4e05ba48e5b35192000123becdf426d.zip
lib: simplify protocol/log naming
The protocols enum serves no purpose other than adding potential for bugs and making it complicated to add a new protocol... nuke. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/log.h')
-rw-r--r--lib/log.h31
1 files changed, 4 insertions, 27 deletions
diff --git a/lib/log.h b/lib/log.h
index d0f8c0c3a..3d887fdbb 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -42,28 +42,6 @@
* please use LOG_ERR instead.
*/
-/*
- * This must be kept in the same order as
- * zlog_proto_names[]
- */
-typedef enum
-{
- ZLOG_NONE,
- ZLOG_DEFAULT,
- ZLOG_ZEBRA,
- ZLOG_RIP,
- ZLOG_BGP,
- ZLOG_OSPF,
- ZLOG_RIPNG,
- ZLOG_OSPF6,
- ZLOG_LDP,
- ZLOG_ISIS,
- ZLOG_PIM,
- ZLOG_NHRP,
- ZLOG_RFP,
- ZLOG_WATCHFRR,
-} zlog_proto_t;
-
/* If maxlvl is set to ZLOG_DISABLED, then no messages will be sent
to that logging destination. */
#define ZLOG_DISABLED (LOG_EMERG-1)
@@ -80,7 +58,7 @@ typedef enum
struct zlog
{
const char *ident; /* daemon name (first arg to openlog) */
- zlog_proto_t protocol;
+ const char *protoname;
u_short instance;
int maxlvl[ZLOG_NUM_DESTS]; /* maximum priority to send to associated
logging destination */
@@ -105,11 +83,11 @@ struct message
extern struct zlog *zlog_default;
/* Open zlog function */
-extern struct zlog *openzlog (const char *progname, zlog_proto_t protocol,
- u_short instance, int syslog_options, int syslog_facility);
+extern void openzlog (const char *progname, const char *protoname,
+ u_short instance, int syslog_options, int syslog_facility);
/* Close zlog function. */
-extern void closezlog (struct zlog *zl);
+extern void closezlog (void);
/* GCC have printf type attribute check. */
#ifdef __GNUC__
@@ -156,7 +134,6 @@ extern const char *mes_lookup (const struct message *meslist,
const char *no_item, const char *mesname);
extern const char *zlog_priority[];
-extern const char *zlog_proto_names[];
/* Safe version of strerror -- never returns NULL. */
extern const char *safe_strerror(int errnum);