mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 10:08:41 +00:00
babeld: Use enum instead of #defines for kernel route type information
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
1314370166
commit
e8c8f2e064
@ -73,9 +73,9 @@ kernel_interface_wireless(struct interface *interface)
|
||||
}
|
||||
|
||||
int
|
||||
kernel_route(int operation, const unsigned char *pref, unsigned short plen,
|
||||
const unsigned char *gate, int ifindex, unsigned int metric,
|
||||
const unsigned char *newgate, int newifindex,
|
||||
kernel_route(enum babel_kernel_routes operation, const unsigned char *pref,
|
||||
unsigned short plen, const unsigned char *gate, int ifindex,
|
||||
unsigned int metric, const unsigned char *newgate, int newifindex,
|
||||
unsigned int newmetric)
|
||||
{
|
||||
int rc;
|
||||
@ -116,12 +116,9 @@ kernel_route(int operation, const unsigned char *pref, unsigned short plen,
|
||||
newmetric);
|
||||
return rc;
|
||||
break;
|
||||
default:
|
||||
zlog_err("this should never happen (false value - kernel_route)");
|
||||
assert(0);
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -29,17 +29,19 @@ THE SOFTWARE.
|
||||
|
||||
#define KERNEL_INFINITY 0xFFFF
|
||||
|
||||
#define ROUTE_FLUSH 0
|
||||
#define ROUTE_ADD 1
|
||||
#define ROUTE_MODIFY 2
|
||||
enum babel_kernel_routes {
|
||||
ROUTE_FLUSH,
|
||||
ROUTE_ADD,
|
||||
ROUTE_MODIFY,
|
||||
};
|
||||
|
||||
int kernel_interface_operational(struct interface *interface);
|
||||
int kernel_interface_mtu(struct interface *interface);
|
||||
int kernel_interface_wireless(struct interface *interface);
|
||||
int kernel_route(int operation, const unsigned char *dest, unsigned short plen,
|
||||
const unsigned char *gate, int ifindex, unsigned int metric,
|
||||
const unsigned char *newgate, int newifindex,
|
||||
unsigned int newmetric);
|
||||
int kernel_route(enum babel_kernel_routes operation, const unsigned char *dest,
|
||||
unsigned short plen, const unsigned char *gate, int ifindex,
|
||||
unsigned int metric, const unsigned char *newgate,
|
||||
int newifindex, unsigned int newmetric);
|
||||
int if_eui64(int ifindex, unsigned char *eui);
|
||||
int gettime(struct timeval *tv);
|
||||
int read_random_bytes(void *buf, size_t len);
|
||||
|
Loading…
Reference in New Issue
Block a user