mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 12:49:18 +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
|
int
|
||||||
kernel_route(int operation, const unsigned char *pref, unsigned short plen,
|
kernel_route(enum babel_kernel_routes operation, const unsigned char *pref,
|
||||||
const unsigned char *gate, int ifindex, unsigned int metric,
|
unsigned short plen, const unsigned char *gate, int ifindex,
|
||||||
const unsigned char *newgate, int newifindex,
|
unsigned int metric, const unsigned char *newgate, int newifindex,
|
||||||
unsigned int newmetric)
|
unsigned int newmetric)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
@ -116,12 +116,9 @@ kernel_route(int operation, const unsigned char *pref, unsigned short plen,
|
|||||||
newmetric);
|
newmetric);
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
zlog_err("this should never happen (false value - kernel_route)");
|
|
||||||
assert(0);
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -29,17 +29,19 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#define KERNEL_INFINITY 0xFFFF
|
#define KERNEL_INFINITY 0xFFFF
|
||||||
|
|
||||||
#define ROUTE_FLUSH 0
|
enum babel_kernel_routes {
|
||||||
#define ROUTE_ADD 1
|
ROUTE_FLUSH,
|
||||||
#define ROUTE_MODIFY 2
|
ROUTE_ADD,
|
||||||
|
ROUTE_MODIFY,
|
||||||
|
};
|
||||||
|
|
||||||
int kernel_interface_operational(struct interface *interface);
|
int kernel_interface_operational(struct interface *interface);
|
||||||
int kernel_interface_mtu(struct interface *interface);
|
int kernel_interface_mtu(struct interface *interface);
|
||||||
int kernel_interface_wireless(struct interface *interface);
|
int kernel_interface_wireless(struct interface *interface);
|
||||||
int kernel_route(int operation, const unsigned char *dest, unsigned short plen,
|
int kernel_route(enum babel_kernel_routes operation, const unsigned char *dest,
|
||||||
const unsigned char *gate, int ifindex, unsigned int metric,
|
unsigned short plen, const unsigned char *gate, int ifindex,
|
||||||
const unsigned char *newgate, int newifindex,
|
unsigned int metric, const unsigned char *newgate,
|
||||||
unsigned int newmetric);
|
int newifindex, unsigned int newmetric);
|
||||||
int if_eui64(int ifindex, unsigned char *eui);
|
int if_eui64(int ifindex, unsigned char *eui);
|
||||||
int gettime(struct timeval *tv);
|
int gettime(struct timeval *tv);
|
||||||
int read_random_bytes(void *buf, size_t len);
|
int read_random_bytes(void *buf, size_t len);
|
||||||
|
Loading…
Reference in New Issue
Block a user