summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/log.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-05-23 19:09:26 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-05-23 19:09:26 +0000
commit9a6be7cacb6639ebc04ff1c77d286ff2bfeab4ac (patch)
tree70480467d857aa1836cf8a37bb8dfe4d40f7aaef /usr.sbin/ldpd/log.h
parent67d9951684dd55318043e75ea48c0967801eb517 (diff)
Make functions and variables static whenever possible.
The benefits of this include: * clean up of the ldpd global namespace; * improved readability; * more hints to the compiler/linker to generate more efficient code. Whenever possible, move global static variables to a smaller scope (function). All extern variables are now declared in header files to avoid unnecessary duplication. This patch also cleans up the indentation of all function prototypes and global variables.
Diffstat (limited to 'usr.sbin/ldpd/log.h')
-rw-r--r--usr.sbin/ldpd/log.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/usr.sbin/ldpd/log.h b/usr.sbin/ldpd/log.h
index aedc26dccc1..18a338ac7af 100644
--- a/usr.sbin/ldpd/log.h
+++ b/usr.sbin/ldpd/log.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.h,v 1.10 2016/05/23 18:58:48 renato Exp $ */
+/* $OpenBSD: log.h,v 1.11 2016/05/23 19:09:25 renato Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -23,30 +23,32 @@
struct in6_addr;
union ldpd_addr;
-
-void log_init(int);
-void log_verbose(int);
-void logit(int, const char *, ...);
-void vlog(int, const char *, va_list);
-void log_warn(const char *, ...);
-void log_warnx(const char *, ...);
-void log_info(const char *, ...);
-void log_debug(const char *, ...);
-void fatal(const char *) __dead;
-void fatalx(const char *) __dead;
-const char *af_name(int);
-const char *socket_name(int);
-const char *pw_type_name(uint16_t);
-const char *log_map(const struct map *);
-struct fec;
-const char *log_fec(const struct fec *);
-void log_rtmsg(unsigned char);
struct hello_source;
-char *log_hello_src(const struct hello_source *);
+struct fec;
+void log_init(int);
+void log_verbose(int);
+void logit(int, const char *, ...);
+void log_warn(const char *, ...);
+void log_warnx(const char *, ...);
+void log_info(const char *, ...);
+void log_debug(const char *, ...);
+void fatal(const char *) __dead;
+void fatalx(const char *) __dead;
+const char *log_sockaddr(void *);
const char *log_in6addr(const struct in6_addr *);
const char *log_in6addr_scope(const struct in6_addr *, unsigned int);
-const char *log_sockaddr(void *);
const char *log_addr(int, const union ldpd_addr *);
+const char *af_name(int);
+const char *socket_name(int);
+const char *nbr_state_name(int);
+const char *if_state_name(int);
+const char *if_type_name(enum iface_type);
+const char *notification_name(uint32_t);
+const char *pw_type_name(uint16_t);
+char *log_hello_src(const struct hello_source *);
+const char *log_map(const struct map *);
+const char *log_fec(const struct fec *);
+void log_rtmsg(unsigned char);
#endif /* _LOG_H_ */