summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.h
diff options
context:
space:
mode:
authorFeng Lu <lu.feng@6wind.com>2014-07-03 12:23:09 +0200
committerVipin Kumar <vipin@cumulusnetworks.com>2015-10-30 09:45:21 +0100
commit8f7d9fc0883869bb32f67b4f70f017141d412ccb (patch)
tree0fcdf5979c2e3ebae576c3d14843827cc1c387a9 /zebra/rt_netlink.h
parentzebra: maintain RTADV per VRF (diff)
downloadfrr-8f7d9fc0883869bb32f67b4f70f017141d412ccb.tar.xz
frr-8f7d9fc0883869bb32f67b4f70f017141d412ccb.zip
zebra, lib/memtypes.c: the netlink sockets work per VRF
This patch lets the netlink sockets work per VRF. * The definition of "struct nlsock" is moved into zebra/rib.h. * The previous global variables "netlink" and "netlink_cmd" now become the members of "struct zebra_vrf", and are initialized in zebra_vrf_alloc(). * All relative functions now work for a specific VRF, by adding a new parameter which specifies the working VRF, except those functions in which the VRF ID can be obtained from the interface. * kernel_init(), interface_list() and route_read() are now also working per VRF, and moved from main() to zebra_vrf_enable(). * A new function kernel_terminate() is added to release the netlink sockets. It is called from zebra_vrf_disable(). * Correct VRF ID, instead of the previous VRF_DEFAULT, are now passed to the functions of processing interfaces or route entries. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> Conflicts: lib/memtypes.c zebra/rib.h zebra/rt_netlink.c Conflicts: zebra/if_netlink.c zebra/if_sysctl.c zebra/kernel_null.c zebra/rib.h zebra/rt_netlink.c zebra/rt_netlink.h
Diffstat (limited to 'zebra/rt_netlink.h')
-rw-r--r--zebra/rt_netlink.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/rt_netlink.h b/zebra/rt_netlink.h
index 5b1b48cb0..d45d22f93 100644
--- a/zebra/rt_netlink.h
+++ b/zebra/rt_netlink.h
@@ -44,8 +44,8 @@ nl_rtproto_to_str (u_char rtproto);
int
netlink_neigh_update (int cmd, int ifindex, __u32 addr, char *lla, int llalen);
-extern int netlink_route_read(void);
-extern int interface_lookup_netlink(void);
+extern int interface_lookup_netlink (struct zebra_vrf *zvrf);
+extern int netlink_route_read (struct zebra_vrf *zvrf);
#endif /* HAVE_NETLINK */