]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/kernel_null.c
1 /* NULL kernel methods for testing. */
6 #include "zebra/zserv.h"
8 #include "zebra/redistribute.h"
9 #include "zebra/connected.h"
11 int kernel_add_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
12 #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
13 #pragma weak kernel_delete_ipv4 = kernel_add_ipv4
15 int kernel_delete_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
18 int kernel_add_ipv6 (struct prefix
*a
, struct rib
*b
) { return 0; }
19 #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA_PRAGMA
20 #pragma weak kernel_delete_ipv6 = kernel_add_ipv6
22 int kernel_delete_ipv6 (struct prefix
*a
, struct rib
*b
) { return 0; }
25 int kernel_delete_ipv6_old (struct prefix_ipv6
*dest
, struct in6_addr
*gate
,
26 unsigned int index
, int flags
, int table
)
29 int kernel_add_route (struct prefix_ipv4
*a
, struct in_addr
*b
, int c
, int d
)
32 int kernel_address_add_ipv4 (struct interface
*a
, struct connected
*b
)
34 zlog_debug ("%s", __func__
);
35 SET_FLAG (b
->conf
, ZEBRA_IFC_REAL
);
36 connected_add_ipv4 (a
, 0, &b
->address
->u
.prefix4
, b
->address
->prefixlen
,
37 (b
->destination
? &b
->destination
->u
.prefix4
: NULL
),
42 int kernel_address_delete_ipv4 (struct interface
*a
, struct connected
*b
)
44 zlog_debug ("%s", __func__
);
45 connected_delete_ipv4 (a
, 0, &b
->address
->u
.prefix4
, b
->address
->prefixlen
,
46 (b
->destination
? &b
->destination
->u
.prefix4
: NULL
));
50 void kernel_init (void) { return; }
51 #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
52 #pragma weak route_read = kernel_init
54 void route_read (void) { return; }