]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Move some log.c functions declarations to log.h
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 2 Jun 2019 19:21:01 +0000 (15:21 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 2 Jun 2019 20:07:48 +0000 (16:07 -0400)
We have some functions that are owned by log.c, so
move their declarations from zebra.h to log.h

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/log.h
lib/zebra.h

index 9368bf9e829937fda784740a036e86450325d4b8..608b8f3362e308d4b230f99811a012b9d021d43d 100644 (file)
--- a/lib/log.h
+++ b/lib/log.h
@@ -158,6 +158,25 @@ extern void zlog_hexdump(const void *mem, unsigned int len);
 extern const char *zlog_sanitize(char *buf, size_t bufsz, const void *in,
                                 size_t inlen);
 
+/* Note: whenever a new route-type or zserv-command is added the
+ * corresponding {command,route}_types[] table in lib/log.c MUST be
+ * updated! */
+
+/* Map a route type to a string.  For example, ZEBRA_ROUTE_RIPNG -> "ripng". */
+extern const char *zebra_route_string(unsigned int route_type);
+/* Map a route type to a char.  For example, ZEBRA_ROUTE_RIPNG -> 'R'. */
+extern char zebra_route_char(unsigned int route_type);
+/* Map a zserv command type to the same string,
+ * e.g. ZEBRA_INTERFACE_ADD -> "ZEBRA_INTERFACE_ADD" */
+/* Map a protocol name to its number. e.g. ZEBRA_ROUTE_BGP->9*/
+extern int proto_name2num(const char *s);
+/* Map redistribute X argument to protocol number.
+ * unlike proto_name2num, this accepts shorthands and takes
+ * an AFI value to restrict input */
+extern int proto_redistnum(int afi, const char *s);
+
+extern const char *zserv_command_string(unsigned int command);
+
 
 extern int vzlog_test(int priority);
 
index 3e1eefdb2e31efeb4dee3d6fb2ef954516c9b9ce..c19c5e0aae8c3e19a939f81e46a11b6075333e7c 100644 (file)
@@ -358,25 +358,6 @@ struct in_pktinfo {
 /* Zebra route's types are defined in route_types.h */
 #include "route_types.h"
 
-/* Note: whenever a new route-type or zserv-command is added the
- * corresponding {command,route}_types[] table in lib/log.c MUST be
- * updated! */
-
-/* Map a route type to a string.  For example, ZEBRA_ROUTE_RIPNG -> "ripng". */
-extern const char *zebra_route_string(unsigned int route_type);
-/* Map a route type to a char.  For example, ZEBRA_ROUTE_RIPNG -> 'R'. */
-extern char zebra_route_char(unsigned int route_type);
-/* Map a zserv command type to the same string,
- * e.g. ZEBRA_INTERFACE_ADD -> "ZEBRA_INTERFACE_ADD" */
-/* Map a protocol name to its number. e.g. ZEBRA_ROUTE_BGP->9*/
-extern int proto_name2num(const char *s);
-/* Map redistribute X argument to protocol number.
- * unlike proto_name2num, this accepts shorthands and takes
- * an AFI value to restrict input */
-extern int proto_redistnum(int afi, const char *s);
-
-extern const char *zserv_command_string(unsigned int command);
-
 #define strmatch(a,b) (!strcmp((a), (b)))
 
 /* Zebra message flags */