summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* zebra: Refactor netlink interactionsvivek2016-10-171-16/+2
| | | | | | | | | | | | | Separate core netlink functions and library functions from route-related interactions and interface-related interactions. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-13199 Reviewed By: CCR-5254 Testing Done: bgp-min, ospf-min
* zebra: Fix signed / unsigned comparisonsDonald Sharp2016-10-111-1/+1
| | | | | | | clang is complaining about signed/unsigned comparisons for rta_addattr_l. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* mpls: add null driverRenato Westphal2016-09-231-0/+7
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: create an abstraction layer for netlink_neigh_update()Renato Westphal2016-08-081-3/+0
| | | | | | | | | | | We shouldn't have platform-agnostic code (e.g. zebra/interface.c) calling platform-specific functions (e.g. netlink_neigh_update). This commit introduces the kernel_neigh_update() function, which then has to be implemented by all supported platforms. Currently only Linux implements this function, which is only used by the RTADV code. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* zebra: replace __u32 with standard uint32_tRenato Westphal2016-08-081-1/+1
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib, zebra: The Bulk of the conversion over to NS and VRFDonald Sharp2016-02-011-2/+2
| | | | | | | Convert the rest of zebra over to use a Namespae and VRF. Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra, lib/memtypes.c: the netlink sockets work per VRFFeng Lu2015-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* (no commit message)Donald Sharp2015-06-111-0/+3
|
* zebra: zebra-warnings.patchDonald Sharp2015-05-201-2/+4
| | | | | | Remove compiled warnings for the zebra directory Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by:
* zebra: zebra-use-fixed-metric-cost.patchDonald Sharp2015-05-201-1/+2
| | | | | | | | | | | | | | | | | | | Zebra: Use a fixed route metric when populating kernel The route metric is not used by the Linux kernel and is irrelevant to the forwarding decision made by the kernel. Metric is a parameter used only by a routing protocol to compute best path(s) and to communicate this info to its peers. Consequently, there is no value in pushing the metric provided by a protocol daemon to the kernel. There is a significant advantage, at least on the Linux kernel, in pushing a constant metric with a route populated by zebra. The metric is used as a priority field in the kernel and modifying the metric due to say topology changes causes multiple routes to be inserted into the kernel, with differing priorities instead of replacing the existing one. This prevents us from using replace semantic when a route changes. So, this patch pushes a constant metric with a route populated by zebra.
* zebra: fix netlink NL_PKT_BUF_SIZE高鹏2013-01-111-1/+1
| | | | | | | | | | | | | Change default value of variable NL_PKT_BUF_SIZE to 8192UL. Cf. NLMSG_GOODSIZE definition of linux in include/linux/netlink.h for detail. Previously, on platforms with a page size greater than 8192, if you had added too many interfaces, zebra would not have enough buffer space to get the entire interface list. This resulted in an incomplete interface list. From: 高鹏 <gpstrive@gmail.com> [updated to apply after FPM patches] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: extern/extract some functions from rt_netlink.cAvneesh Sachdev2012-11-301-0/+46
* zebra/{rib.h,zebra_rib.c} Add nexthop_type_to_str(), which returns a human-readable string corresponding to a nexthop type. * zebra/rt_netlink.[hc] - Add new header file that exposes some existing and new netlink-related functions from rt_netlink.c to the rest of zebra. addattr32 addattr_l rta_addattr_l nl_msg_type_to_str (new) nl_rtproto_to_str (new) - Use nexthop_type_to_str() instead of the static array 'nexthop_types_desc'. Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>