]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Refactor Error codes to proper place
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 12 Dec 2016 17:16:21 +0000 (12:16 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 Jan 2017 16:48:38 +0000 (11:48 -0500)
These error codes have ended up only being used
for socket type interfaces to the kernel(*bsd),
yet we were exposing the #defines to the entirety
of the project.

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

index bb43d062bc42e4a9a1ec2a811a9f3a6ed301c62a..39f77ce3fe8729371848479b1c6e856b94a96497 100644 (file)
@@ -438,14 +438,6 @@ extern const char *zserv_command_string (unsigned int command);
 
 #define strmatch(a,b) (!strcmp((a), (b)))
 
-/* Error codes of zebra. */
-#define ZEBRA_ERR_NOERROR                0
-#define ZEBRA_ERR_RTEXIST               -1
-#define ZEBRA_ERR_RTUNREACH             -2
-#define ZEBRA_ERR_EPERM                 -3
-#define ZEBRA_ERR_RTNOEXIST             -4
-#define ZEBRA_ERR_KERNEL                -5
-
 /* Zebra message flags */
 #define ZEBRA_FLAG_INTERNAL           0x01
 #define ZEBRA_FLAG_SELFROUTE          0x02
index 18d69343a4bb8cc47c7faaeb62f7589d7945507c..04e3054312356dc72cf0e6bb930f1f2eab14d383 100644 (file)
 #ifndef __ZEBRA_KERNEL_SOCKET_H
 #define __ZEBRA_KERNEL_SOCKET_H
 
+/* Error codes of zebra. */
+#define ZEBRA_ERR_NOERROR                0
+#define ZEBRA_ERR_RTEXIST               -1
+#define ZEBRA_ERR_RTUNREACH             -2
+#define ZEBRA_ERR_EPERM                 -3
+#define ZEBRA_ERR_RTNOEXIST             -4
+#define ZEBRA_ERR_KERNEL                -5
+
 extern void rtm_read (struct rt_msghdr *);
 extern int ifam_read (struct ifa_msghdr *);
 extern int ifm_read (struct if_msghdr *);