From 94ed344a8f895dd1bc7d8b9cde1b39902744238e Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 12 Dec 2016 12:16:21 -0500 Subject: [PATCH] zebra: Refactor Error codes to proper place 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 --- lib/zebra.h | 8 -------- zebra/kernel_socket.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/zebra.h b/lib/zebra.h index bb43d062bc..39f77ce3fe 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -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 diff --git a/zebra/kernel_socket.h b/zebra/kernel_socket.h index 18d69343a4..04e3054312 100644 --- a/zebra/kernel_socket.h +++ b/zebra/kernel_socket.h @@ -23,6 +23,14 @@ #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 *); -- 2.39.5