]>
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"
10 #include "zebra/rt_netlink.h"
11 #include "zebra/rib.h"
13 int kernel_add_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
14 int kernel_update_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
15 #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
16 #pragma weak kernel_delete_ipv4 = kernel_add_ipv4
18 int kernel_delete_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
21 int kernel_add_ipv6 (struct prefix
*a
, struct rib
*b
) { return 0; }
22 #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
23 #pragma weak kernel_delete_ipv6 = kernel_add_ipv6
25 int kernel_delete_ipv6 (struct prefix
*a
, struct rib
*b
) { return 0; }
28 int kernel_delete_ipv6_old (struct prefix_ipv6
*dest
, struct in6_addr
*gate
,
29 unsigned int index
, int flags
, int table
)
32 int kernel_add_route (struct prefix_ipv4
*a
, struct in_addr
*b
, int c
, int d
)
35 int kernel_address_add_ipv4 (struct interface
*a
, struct connected
*b
)
37 zlog_debug ("%s", __func__
);
38 SET_FLAG (b
->conf
, ZEBRA_IFC_REAL
);
39 connected_add_ipv4 (a
, 0, &b
->address
->u
.prefix4
, b
->address
->prefixlen
,
40 (b
->destination
? &b
->destination
->u
.prefix4
: NULL
),
45 int kernel_address_delete_ipv4 (struct interface
*a
, struct connected
*b
)
47 zlog_debug ("%s", __func__
);
48 connected_delete_ipv4 (a
, 0, &b
->address
->u
.prefix4
, b
->address
->prefixlen
,
49 (b
->destination
? &b
->destination
->u
.prefix4
: NULL
));
53 int netlink_neigh_update (int cmd
, int ifindex
, __u32 addr
, char *lla
, int llalen
)
58 void kernel_init (struct zebra_vrf
*zvrf
) { return; }
59 void kernel_terminate (struct zebra_vrf
*zvrf
) { return; }
60 #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
61 #pragma weak route_read = kernel_init
63 void route_read (struct zebra_vrf
*zvrf
) { return; }